# HG changeset patch # User Shinji KONO # Date 1609555784 -32400 # Node ID 91265c9712004a198a264c61d55ac1b66d6cd4fb # Parent 4b6063ad6de20c6c36d121db00525a77981dd448 ... diff -r 4b6063ad6de2 -r 91265c971200 agda/gcd.agda --- a/agda/gcd.agda Sat Jan 02 10:05:32 2021 +0900 +++ b/agda/gcd.agda Sat Jan 02 11:49:44 2021 +0900 @@ -156,22 +156,30 @@ gcd1 1 1 (suc j) (suc j) ∎ where open ≡-Reasoning gcd200 (suc (suc i)) i0 (suc j) zero i=i0 () -gcd4 : ( n k : ℕ ) → gcd n k ≡ k → k ≤ n -gcd4 n k gn = gcd40 n n k k gn where - gcd40 : (i i0 j j0 : ℕ) → gcd1 i i0 j j0 ≡ j0 → j0 ≤ i0 - gcd40 zero i0 zero j0 gn = {!!} - gcd40 zero i0 (suc j) j0 gn = {!!} - gcd40 (suc i) i0 zero j0 gn = {!!} - gcd40 (suc i) i0 (suc j) j0 gn = gcd40 i i0 j j0 (subst (λ k → k ≡ j0) (gcd22 i i0 j j0) gn) +gcd6 : ( i i0 j j0 n n0 : ℕ) → gcd1 i i0 j j0 ≡ gcd1 0 n 0 n0 → n ≡ n0 +gcd6 i i0 j j0 n n0 = {!!} -gcd3 : ( n k : ℕ ) → n ≤ k + k → gcd n k ≡ k → n ≡ k -gcd3 n k n<2k gn = {!!} +gcd5 : ( n k : ℕ ) → 1 < n → gcd n k ≤ n +gcd5 n k 0 ¬a ¬b c = ≤-refl + gcd50 zero i0 (suc j) j0 0 1 → m > 1 → k > 1 → gcd n k ≡ k → gcd m k ≡ k → ¬ ( gcd n m ≡ 1 ) -gcd24 {n} {m} {k} 1