annotate agda/gcd.agda @ 157:0b74851665ee

( n k : ℕ ) → 1 < n → gcd n k ≤ n
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 02 Jan 2021 16:51:34 +0900
parents 91265c971200
children c332bb9dbf98
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
148
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 147
diff changeset
1 {-# OPTIONS --allow-unsolved-metas #-}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 147
diff changeset
2 module gcd where
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
4 open import Data.Nat
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
5 open import Data.Nat.Properties
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 open import Data.Empty
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
7 open import Data.Unit using (⊤ ; tt)
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 open import Relation.Nullary
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 open import Relation.Binary.PropositionalEquality
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
10 open import Relation.Binary.Definitions
149
d3a8572ced9c non terminating GCD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 148
diff changeset
11 open import nat
151
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
12 open import logic
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 even : (n : ℕ ) → Set
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
15 even zero = ⊤
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
16 even (suc zero) = ⊥
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
17 even (suc (suc n)) = even n
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 even? : (n : ℕ ) → Dec ( even n )
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
20 even? zero = yes tt
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
21 even? (suc zero) = no (λ ())
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
22 even? (suc (suc n)) = even? n
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
23
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
24 n+even : {n m : ℕ } → even n → even m → even ( n + m )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
25 n+even {zero} {zero} tt tt = tt
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
26 n+even {zero} {suc m} tt em = em
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
27 n+even {suc (suc n)} {m} en em = n+even {n} {m} en em
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
28
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
29 n*even : {m n : ℕ } → even n → even ( m * n )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
30 n*even {zero} {n} en = tt
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
31 n*even {suc m} {n} en = n+even {n} {m * n} en (n*even {m} {n} en)
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
32
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
33 even*n : {n m : ℕ } → even n → even ( n * m )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
34 even*n {n} {m} en = subst even (*-comm m n) (n*even {m} {n} en)
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
35
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
36 gcd1 : ( i i0 j j0 : ℕ ) → ℕ
146
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
37 gcd1 zero i0 zero j0 with <-cmp i0 j0
157
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
38 ... | tri< a ¬b ¬c = i0
146
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
39 ... | tri≈ ¬a refl ¬c = i0
157
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
40 ... | tri> ¬a ¬b c = j0
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
41 gcd1 zero i0 (suc zero) j0 = 1
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
42 gcd1 zero zero (suc (suc j)) j0 = j0
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
43 gcd1 zero (suc i0) (suc (suc j)) j0 = gcd1 i0 (suc i0) (suc j) (suc (suc j))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
44 gcd1 (suc zero) i0 zero j0 = 1
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
45 gcd1 (suc (suc i)) i0 zero zero = i0
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
46 gcd1 (suc (suc i)) i0 zero (suc j0) = gcd1 (suc i) (suc (suc i)) j0 (suc j0)
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
47 gcd1 (suc i) i0 (suc j) j0 = gcd1 i i0 j j0
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
48
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
49 gcd : ( i j : ℕ ) → ℕ
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
50 gcd i j = gcd1 i i j j
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
52 even→gcd=2 : {n : ℕ} → even n → n > 0 → gcd n 2 ≡ 2
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
53 even→gcd=2 {suc (suc zero)} en (s≤s z≤n) = refl
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
54 even→gcd=2 {suc (suc (suc (suc n)))} en (s≤s z≤n) = begin
152
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
55 gcd (suc (suc (suc (suc n)))) 2 ≡⟨⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
56 gcd (suc (suc n)) 2 ≡⟨ even→gcd=2 {suc (suc n)} en (s≤s z≤n) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
57 2 ∎ where open ≡-Reasoning
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
145
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 144
diff changeset
59 -- gcd26 : { n m : ℕ} → n > 1 → m > 1 → n - m > 0 → gcd n m ≡ gcd (n - m) m
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 144
diff changeset
60 -- gcd27 : { n m : ℕ} → n > 1 → m > 1 → n - m > 0 → gcd n k ≡ k → k ≤ n
143
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 142
diff changeset
61
146
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
62 gcd22 : ( i i0 o o0 : ℕ ) → gcd1 (suc i) i0 (suc o) o0 ≡ gcd1 i i0 o o0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
63 gcd22 zero i0 zero o0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
64 gcd22 zero i0 (suc o) o0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
65 gcd22 (suc i) i0 zero o0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
66 gcd22 (suc i) i0 (suc o) o0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
67
152
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
68 gcd20 : (i : ℕ) → gcd i 0 ≡ i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
69 gcd20 zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
70 gcd20 (suc i) = gcd201 (suc i) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
71 gcd201 : (i : ℕ ) → gcd1 i i zero zero ≡ i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
72 gcd201 zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
73 gcd201 (suc zero) = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
74 gcd201 (suc (suc i)) = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
75
151
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
76 gcdmm : (n m : ℕ) → gcd1 n m n m ≡ m
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
77 gcdmm zero m with <-cmp m m
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
78 ... | tri< a ¬b ¬c = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
79 ... | tri≈ ¬a refl ¬c = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
80 ... | tri> ¬a ¬b c = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
81 gcdmm (suc n) m = subst (λ k → k ≡ m) (sym (gcd22 n m n m )) (gcdmm n m )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
82
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
83 record Comp ( m n : ℕ ) : Set where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
84 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
85 non-1 : 1 < m
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
86 comp : ℕ
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
87 is-comp : n * comp ≡ m
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
88
147
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
89 gcdsym2 : (i j : ℕ) → gcd1 zero i zero j ≡ gcd1 zero j zero i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
90 gcdsym2 i j with <-cmp i j | <-cmp j i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
91 ... | tri< a ¬b ¬c | tri< a₁ ¬b₁ ¬c₁ = ⊥-elim (nat-<> a a₁)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
92 ... | tri< a ¬b ¬c | tri≈ ¬a b ¬c₁ = ⊥-elim (nat-≡< (sym b) a)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
93 ... | tri< a ¬b ¬c | tri> ¬a ¬b₁ c = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
94 ... | tri≈ ¬a b ¬c | tri< a ¬b ¬c₁ = ⊥-elim (nat-≡< (sym b) a)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
95 ... | tri≈ ¬a refl ¬c | tri≈ ¬a₁ refl ¬c₁ = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
96 ... | tri≈ ¬a b ¬c | tri> ¬a₁ ¬b c = ⊥-elim (nat-≡< b c)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
97 ... | tri> ¬a ¬b c | tri< a ¬b₁ ¬c = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
98 ... | tri> ¬a ¬b c | tri≈ ¬a₁ b ¬c = ⊥-elim (nat-≡< b c)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
99 ... | tri> ¬a ¬b c | tri> ¬a₁ ¬b₁ c₁ = ⊥-elim (nat-<> c c₁)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
100 gcdsym1 : ( i i0 j j0 : ℕ ) → gcd1 i i0 j j0 ≡ gcd1 j j0 i i0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
101 gcdsym1 zero zero zero zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
102 gcdsym1 zero zero zero (suc j0) = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
103 gcdsym1 zero (suc i0) zero zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
104 gcdsym1 zero (suc i0) zero (suc j0) = gcdsym2 (suc i0) (suc j0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
105 gcdsym1 zero zero (suc zero) j0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
106 gcdsym1 zero zero (suc (suc j)) j0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
107 gcdsym1 zero (suc i0) (suc zero) j0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
108 gcdsym1 zero (suc i0) (suc (suc j)) j0 = gcdsym1 i0 (suc i0) (suc j) (suc (suc j))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
109 gcdsym1 (suc zero) i0 zero j0 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
110 gcdsym1 (suc (suc i)) i0 zero zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
111 gcdsym1 (suc (suc i)) i0 zero (suc j0) = gcdsym1 (suc i) (suc (suc i))j0 (suc j0)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
112 gcdsym1 (suc i) i0 (suc j) j0 = subst₂ (λ j k → j ≡ k ) (sym (gcd22 i _ _ _)) (sym (gcd22 j _ _ _)) (gcdsym1 i i0 j j0 )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
113
146
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
114 gcdsym : { n m : ℕ} → gcd n m ≡ gcd m n
147
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 146
diff changeset
115 gcdsym {n} {m} = gcdsym1 n n m m
146
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 145
diff changeset
116
152
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
117 gcd11 : ( i : ℕ ) → gcd i i ≡ i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
118 gcd11 i = gcdmm i i
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
119
155
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
120 gcd203 : (i : ℕ) → gcd1 (suc i) (suc i) i i ≡ 1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
121 gcd203 zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
122 gcd203 (suc i) = gcd205 (suc i) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
123 gcd205 : (j : ℕ) → gcd1 (suc j) (suc (suc i)) j (suc i) ≡ 1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
124 gcd205 zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
125 gcd205 (suc j) = subst (λ k → k ≡ 1) (gcd22 (suc j) (suc (suc i)) j (suc i)) (gcd205 j)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
126 gcd204 : (i : ℕ) → gcd1 1 1 i i ≡ 1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
127 gcd204 zero = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
128 gcd204 (suc zero) = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
129 gcd204 (suc (suc zero)) = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
130 gcd204 (suc (suc (suc i))) = gcd204 (suc (suc i))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
131
152
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
132 gcd2 : ( i j : ℕ ) → gcd (i + j) j ≡ gcd i j
155
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
133 gcd2 i j = gcd200 i i j j refl refl where
153
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
134 gcd202 : (i j1 : ℕ) → (i + suc j1) ≡ suc (i + j1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
135 gcd202 zero j1 = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
136 gcd202 (suc i) j1 = cong suc (gcd202 i j1)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
137 gcd201 : (i i0 j j0 j1 : ℕ) → gcd1 (i + j1) (i0 + suc j) j1 j0 ≡ gcd1 i (i0 + suc j) zero j0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
138 gcd201 i i0 j j0 zero = subst (λ k → gcd1 k (i0 + suc j) zero j0 ≡ gcd1 i (i0 + suc j) zero j0 ) (+-comm zero i) refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
139 gcd201 i i0 j j0 (suc j1) = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
140 gcd1 (i + suc j1) (i0 + suc j) (suc j1) j0 ≡⟨ cong (λ k → gcd1 k (i0 + suc j) (suc j1) j0 ) (gcd202 i j1) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
141 gcd1 (suc (i + j1)) (i0 + suc j) (suc j1) j0 ≡⟨ gcd22 (i + j1) (i0 + suc j) j1 j0 ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
142 gcd1 (i + j1) (i0 + suc j) j1 j0 ≡⟨ gcd201 i i0 j j0 j1 ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 152
diff changeset
143 gcd1 i (i0 + suc j) zero j0 ∎ where open ≡-Reasoning
155
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
144 gcd200 : (i i0 j j0 : ℕ) → i ≡ i0 → j ≡ j0 → gcd1 (i + j) (i0 + j) j j0 ≡ gcd1 i i j0 j0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
145 gcd200 i .i zero .0 refl refl = subst (λ k → gcd1 k k zero zero ≡ gcd1 i i zero zero ) (+-comm zero i) refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
146 gcd200 (suc (suc i)) i0 (suc j) (suc j0) i=i0 j=j0 = gcd201 (suc (suc i)) i0 j (suc j0) (suc j)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
147 gcd200 zero zero (suc zero) .1 i=i0 refl = refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
148 gcd200 zero zero (suc (suc j)) .(suc (suc j)) i=i0 refl = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
149 gcd1 (zero + suc (suc j)) (zero + suc (suc j)) (suc (suc j)) (suc (suc j)) ≡⟨ gcdmm (suc (suc j)) (suc (suc j)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
150 suc (suc j) ≡⟨ sym (gcd20 (suc (suc j))) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
151 gcd1 zero zero (suc (suc j)) (suc (suc j)) ∎ where open ≡-Reasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
152 gcd200 zero (suc i0) (suc j) .(suc j) () refl
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
153 gcd200 (suc zero) .1 (suc j) .(suc j) refl refl = begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
154 gcd1 (1 + suc j) (1 + suc j) (suc j) (suc j) ≡⟨ gcd203 (suc j) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
155 1 ≡⟨ sym ( gcd204 (suc j)) ⟩
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
156 gcd1 1 1 (suc j) (suc j) ∎ where open ≡-Reasoning
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
157 gcd200 (suc (suc i)) i0 (suc j) zero i=i0 ()
154
ba7d4cc92e60 ... gcd (i + j) j ≡ gcd i j
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 153
diff changeset
158
156
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
159 gcd5 : ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
160 gcd5 n k 0<n = gcd50 n n k k 0<n ≤-refl ≤-refl where
157
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
161 gcd52 : {i : ℕ } → 1 < suc (suc i)
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
162 gcd52 {zero} = a<sa
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
163 gcd52 {suc i} = <-trans (gcd52 {i}) a<sa
156
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
164 gcd50 : (i i0 j j0 : ℕ) → 1 < i0 → i ≤ i0 → j ≤ j0 → gcd1 i i0 j j0 ≤ i0
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
165 gcd50 zero i0 zero j0 0<i i<i0 j<j0 with <-cmp i0 j0
157
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
166 ... | tri< a ¬b ¬c = ≤-refl
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
167 ... | tri≈ ¬a refl ¬c = ≤-refl
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
168 ... | tri> ¬a ¬b c = ≤-trans refl-≤s c
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
169 gcd50 zero (suc i0) (suc zero) j0 0<i i<i0 j<j0 = gcd51 0<i where
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
170 gcd51 : 1 < suc i0 → gcd1 zero (suc i0) 1 j0 ≤ suc i0
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
171 gcd51 1<i = ≤to< 1<i
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
172 gcd50 zero (suc i0) (suc (suc j)) j0 0<i i<i0 j<j0 = gcd50 i0 (suc i0) (suc j) (suc (suc j)) 0<i refl-≤s refl-≤s
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
173 gcd50 (suc zero) i0 zero j0 0<i i<i0 j<j0 = ≤to< 0<i
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
174 gcd50 (suc (suc i)) i0 zero zero 0<i i<i0 j<j0 = ≤-refl
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
175 gcd50 (suc (suc i)) i0 zero (suc j0) 0<i i<i0 j<j0 = ≤-trans (gcd50 (suc i) (suc (suc i)) j0 (suc j0) gcd52 refl-≤s refl-≤s) i<i0
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
176 gcd50 (suc i) i0 (suc j) j0 0<i i<i0 j<j0 = subst (λ k → k ≤ i0 ) (sym (gcd22 i i0 j j0))
0b74851665ee ( n k : ℕ ) → 1 < n → gcd n k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 156
diff changeset
177 (gcd50 i i0 j j0 0<i (≤-trans refl-≤s i<i0) (≤-trans refl-≤s j<j0))
154
ba7d4cc92e60 ... gcd (i + j) j ≡ gcd i j
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 153
diff changeset
178
156
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
179 gcd4 : ( n k : ℕ ) → 1 < n → gcd n k ≡ k → k ≤ n
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
180 gcd4 = {!!}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
181
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
182 gcd3 : ( n k : ℕ ) → 0 < n → n ≤ k + k → gcd n k ≡ k → n ≡ k
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
183 gcd3 n k 0<n n<2k gn = {!!}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
184
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
185 gcd23 : ( n m k : ℕ) → 0 < n → 0 < m → gcd n k ≡ k → gcd m k ≡ k → k ≤ gcd n m
154
ba7d4cc92e60 ... gcd (i + j) j ≡ gcd i j
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 153
diff changeset
186 gcd23 = {!!}
152
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 151
diff changeset
187
142
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
188 gcd24 : { n m k : ℕ} → n > 1 → m > 1 → k > 1 → gcd n k ≡ k → gcd m k ≡ k → ¬ ( gcd n m ≡ 1 )
156
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 155
diff changeset
189 gcd24 {n} {m} {k} 1<n 1<m 1<k gn gm gnm = ⊥-elim ( nat-≡< (sym gnm) (≤-trans 1<k (gcd23 n m k {!!} {!!} gn gm )))
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
190
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
191 record Even (i : ℕ) : Set where
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
192 field
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
193 j : ℕ
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
194 is-twice : i ≡ 2 * j
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
195
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
196 e2 : (i : ℕ) → even i → Even i
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
197 e2 zero en = record { j = 0 ; is-twice = refl }
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
198 e2 (suc (suc i)) en = record { j = suc (Even.j (e2 i en )) ; is-twice = e21 } where
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
199 e21 : suc (suc i) ≡ 2 * suc (Even.j (e2 i en))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
200 e21 = begin
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
201 suc (suc i) ≡⟨ cong (λ k → suc (suc k)) (Even.is-twice (e2 i en)) ⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
202 suc (suc (2 * Even.j (e2 i en))) ≡⟨ sym (*-distribˡ-+ 2 1 _) ⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
203 2 * suc (Even.j (e2 i en)) ∎ where open ≡-Reasoning
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
204
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
205 record Odd (i : ℕ) : Set where
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
206 field
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
207 j : ℕ
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
208 is-twice : i ≡ suc (2 * j )
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
210 odd2 : (i : ℕ) → ¬ even i → even (suc i)
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
211 odd2 zero ne = ⊥-elim ( ne tt )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
212 odd2 (suc zero) ne = tt
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
213 odd2 (suc (suc i)) ne = odd2 i ne
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
214
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
215 odd3 : (i : ℕ) → ¬ even i → Odd i
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
216 odd3 zero ne = ⊥-elim ( ne tt )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
217 odd3 (suc zero) ne = record { j = 0 ; is-twice = refl }
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
218 odd3 (suc (suc i)) ne = record { j = Even.j (e2 (suc i) (odd2 i ne)) ; is-twice = odd31 } where
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
219 odd31 : suc (suc i) ≡ suc (2 * Even.j (e2 (suc i) (odd2 i ne)))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
220 odd31 = begin
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
221 suc (suc i) ≡⟨ cong suc (Even.is-twice (e2 (suc i) (odd2 i ne))) ⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
222 suc (2 * (Even.j (e2 (suc i) (odd2 i ne)))) ∎ where open ≡-Reasoning
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
223
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
224 odd4 : (i : ℕ) → even i → ¬ even ( suc i )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
225 odd4 (suc (suc i)) en en1 = odd4 i en en1
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
226
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
227 even^2 : {n : ℕ} → even ( n * n ) → even n
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
228 even^2 {n} en with even? n
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
229 ... | yes y = y
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
230 ... | no ne = ⊥-elim ( odd4 ((2 * m) + 2 * m * suc (2 * m)) (n+even {2 * m} {2 * m * suc (2 * m)} ee3 ee4) (subst (λ k → even k) ee2 en )) where
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
231 m : ℕ
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
232 m = Odd.j ( odd3 n ne )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
233 ee3 : even (2 * m)
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
234 ee3 = subst (λ k → even k ) (*-comm m 2) (n*even {m} {2} tt )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
235 ee4 : even ((2 * m) * suc (2 * m))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
236 ee4 = even*n {(2 * m)} {suc (2 * m)} (even*n {2} {m} tt )
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
237 ee2 : n * n ≡ suc (2 * m) + ((2 * m) * (suc (2 * m) ))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
238 ee2 = begin n * n ≡⟨ cong ( λ k → k * k) (Odd.is-twice (odd3 n ne)) ⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
239 suc (2 * m) * suc (2 * m) ≡⟨ *-distribʳ-+ (suc (2 * m)) 1 ((2 * m) ) ⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
240 (1 * suc (2 * m)) + 2 * m * suc (2 * m) ≡⟨ cong (λ k → k + 2 * m * suc (2 * m)) (begin
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
241 suc m + 1 * m + 0 * (suc m + 1 * m ) ≡⟨ +-comm (suc m + 1 * m) 0 ⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
242 suc m + 1 * m ≡⟨⟩
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
243 suc (2 * m)
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
244 ∎) ⟩ suc (2 * m) + 2 * m * suc (2 * m) ∎ where open ≡-Reasoning
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
245
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
246 open import nat
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
247
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
248 e3 : {i j : ℕ } → 2 * i ≡ 2 * j → i ≡ j
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
249 e3 {zero} {zero} refl = refl
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
250 e3 {suc x} {suc y} eq with <-cmp x y
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
251 ... | tri< a ¬b ¬c = ⊥-elim ( nat-≡< eq (s≤s (<-trans (<-plus a) (<-plus-0 (s≤s (<-plus a ))))))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
252 ... | tri≈ ¬a b ¬c = cong suc b
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
253 ... | tri> ¬a ¬b c = ⊥-elim ( nat-≡< (sym eq) (s≤s (<-trans (<-plus c) (<-plus-0 (s≤s (<-plus c ))))))
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 57
diff changeset
254