# HG changeset patch # User Shinji KONO # Date 1609734031 -32400 # Node ID 690a8352c1ad66aad5f48e4b8afec98e854396b3 # Parent e5dc512f5306ce1b8511340041df73956fe577b6 ... diff -r e5dc512f5306 -r 690a8352c1ad agda/gcd.agda --- a/agda/gcd.agda Mon Jan 04 12:52:04 2021 +0900 +++ b/agda/gcd.agda Mon Jan 04 13:20:31 2021 +0900 @@ -158,12 +158,9 @@ open Comp comp-n : ( n : ℕ ) → (c : Comp n ) → Comp (compa c + n) -comp-n n c = record { compa = suc (compa c) ; compb = n ; is-comp = +comp-n n c = record { compa = compa c ; compb = suc (compb c) ; is-comp = begin - n * suc (compa c) ≡⟨ *-comm n (suc (compa c)) ⟩ - n + compa c * n ≡⟨ +-comm n (compa c * n) ⟩ - compa c * n + n ≡⟨ cong (λ k → k + n) ( *-comm (compa c) n) ⟩ - (n * compa c) + n ≡⟨ cong (λ k → k + n) {!!} ⟩ + compa c + compb c * compa c ≡⟨ cong (λ k → compa c + k) (is-comp c) ⟩ compa c + n ∎ } where open ≡-Reasoning @@ -204,8 +201,9 @@ gcd23 : ( n m k : ℕ) → 1 < n → 1 < m → gcd n k ≡ k → gcd m k ≡ k → k ≤ gcd n m gcd23 n m k 1 ¬a ¬b c = gcd231 j0 k k0 1 1 → m > 1 → k > 1 → gcd n k ≡ k → gcd m k ≡ k → ¬ ( gcd n m ≡ 1 ) gcd24 {n} {m} {k} 1