Mercurial > hg > Members > kono > Proof > category
annotate equalizer.agda @ 278:9fafe4a53f89
univ2limit
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Sep 2013 02:39:57 +0900 |
parents | a87d3ea9efe4 |
children | d6a6dd305da2 |
rev | line source |
---|---|
205 | 1 --- |
2 -- | |
3 -- Equalizer | |
4 -- | |
208 | 5 -- e f |
205 | 6 -- c --------> a ----------> b |
208 | 7 -- ^ . ----------> |
205 | 8 -- | . g |
230 | 9 -- |k . |
10 -- | . h | |
11 -- d | |
205 | 12 -- |
13 -- Shinji KONO <kono@ie.u-ryukyu.ac.jp> | |
14 ---- | |
15 | |
230 | 16 open import Category -- https://github.com/konn/category-agda |
205 | 17 open import Level |
18 module equalizer { c₁ c₂ ℓ : Level} { A : Category c₁ c₂ ℓ } where | |
19 | |
20 open import HomReasoning | |
21 open import cat-utility | |
22 | |
260 | 23 -- in cat-utility |
24 -- record Equalizer { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ ) {c a b : Obj A} (e : Hom A c a) (f g : Hom A a b) : Set (ℓ ⊔ (c₁ ⊔ c₂)) where | |
25 -- field | |
26 -- fe=ge : A [ A [ f o e ] ≈ A [ g o e ] ] | |
27 -- k : {d : Obj A} (h : Hom A d a) → A [ A [ f o h ] ≈ A [ g o h ] ] → Hom A d c | |
28 -- ek=h : {d : Obj A} → ∀ {h : Hom A d a} → {eq : A [ A [ f o h ] ≈ A [ g o h ] ] } → A [ A [ e o k {d} h eq ] ≈ h ] | |
29 -- uniqueness : {d : Obj A} → ∀ {h : Hom A d a} → {eq : A [ A [ f o h ] ≈ A [ g o h ] ] } → {k' : Hom A d c } → | |
30 -- A [ A [ e o k' ] ≈ h ] → A [ k {d} h eq ≈ k' ] | |
31 -- equalizer : Hom A c a | |
32 -- equalizer = e | |
206 | 33 |
253 | 34 |
230 | 35 -- |
251 | 36 -- Burroni's Flat Equational Definition of Equalizer |
230 | 37 -- |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
38 record Burroni { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ ) {c a b : Obj A} (f g : Hom A a b) (e : Hom A c a) : Set (ℓ ⊔ (c₁ ⊔ c₂)) where |
206 | 39 field |
245 | 40 α : {a b c : Obj A } → (f : Hom A a b) → (g : Hom A a b ) → (e : Hom A c a ) → Hom A c a |
214 | 41 γ : {a b c d : Obj A } → (f : Hom A a b) → (g : Hom A a b ) → (h : Hom A d a ) → Hom A d c |
245 | 42 δ : {a b c : Obj A } → (e : Hom A c a ) → (f : Hom A a b) → Hom A a c |
242 | 43 cong-α : {a b c : Obj A } → { e : Hom A c a } |
245 | 44 → {f g g' : Hom A a b } → A [ g ≈ g' ] → A [ α f g e ≈ α f g' e ] |
242 | 45 cong-γ : {a _ c d : Obj A } → {f g : Hom A a b} {h h' : Hom A d a } → A [ h ≈ h' ] |
243 | 46 → A [ γ {a} {b} {c} {d} f g h ≈ γ f g h' ] |
245 | 47 cong-δ : {a b c : Obj A } → {e : Hom A c a} → {f f' : Hom A a b} → A [ f ≈ f' ] → A [ δ e f ≈ δ e f' ] |
48 b1 : A [ A [ f o α {a} {b} {c} f g e ] ≈ A [ g o α {a} {b} {c} f g e ] ] | |
49 b2 : {d : Obj A } → {h : Hom A d a } → A [ A [ ( α {a} {b} {c} f g e ) o (γ {a} {b} {c} f g h) ] ≈ A [ h o α (A [ f o h ]) (A [ g o h ]) (id1 A d) ] ] | |
50 b3 : {a b d : Obj A} → (f : Hom A a b ) → {h : Hom A d a } → A [ A [ α {a} {b} {d} f f h o δ {a} {b} {d} h f ] ≈ id1 A a ] | |
207
22811f7a04e1
Equalizer problems have written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
206
diff
changeset
|
51 -- b4 : {c d : Obj A } {k : Hom A c a} → A [ β f g ( A [ α f g o k ] ) ≈ k ] |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
52 b4 : {d : Obj A } {k : Hom A d c} → |
245 | 53 A [ A [ γ {a} {b} {c} {d} f g ( A [ α {a} {b} {c} f g e o k ] ) o ( δ {d} {b} {d} (id1 A d) (A [ f o A [ α {a} {b} {c} f g e o k ] ] ) )] ≈ k ] |
207
22811f7a04e1
Equalizer problems have written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
206
diff
changeset
|
54 -- A [ α f g o β f g h ] ≈ h |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
55 β : { d a b : Obj A} → (f : Hom A a b) → (g : Hom A a b ) → (h : Hom A d a ) → Hom A d c |
245 | 56 β {d} {a} {b} f g h = A [ γ {a} {b} {c} f g h o δ {d} {b} {d} (id1 A d) (A [ f o h ]) ] |
207
22811f7a04e1
Equalizer problems have written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
206
diff
changeset
|
57 |
209 | 58 open Equalizer |
225 | 59 open Burroni |
209 | 60 |
225 | 61 -- |
62 -- Some obvious conditions for k (fe = ge) → ( fh = gh ) | |
63 -- | |
219 | 64 |
224 | 65 f1=g1 : { a b c : Obj A } {f g : Hom A a b } → (eq : A [ f ≈ g ] ) → (h : Hom A c a) → A [ A [ f o h ] ≈ A [ g o h ] ] |
66 f1=g1 eq h = let open ≈-Reasoning (A) in (resp refl-hom eq ) | |
67 | |
226 | 68 f1=f1 : { a b : Obj A } (f : Hom A a b ) → A [ A [ f o (id1 A a) ] ≈ A [ f o (id1 A a) ] ] |
230 | 69 f1=f1 f = let open ≈-Reasoning (A) in refl-hom |
226 | 70 |
224 | 71 f1=gh : { a b c d : Obj A } {f g : Hom A a b } → { e : Hom A c a } → { h : Hom A d c } → |
72 (eq : A [ A [ f o e ] ≈ A [ g o e ] ] ) → A [ A [ f o A [ e o h ] ] ≈ A [ g o A [ e o h ] ] ] | |
230 | 73 f1=gh {a} {b} {c} {d} {f} {g} {e} {h} eq = let open ≈-Reasoning (A) in |
224 | 74 begin |
75 f o ( e o h ) | |
76 ≈⟨ assoc ⟩ | |
230 | 77 (f o e ) o h |
224 | 78 ≈⟨ car eq ⟩ |
230 | 79 (g o e ) o h |
224 | 80 ≈↑⟨ assoc ⟩ |
81 g o ( e o h ) | |
82 ∎ | |
219 | 83 |
255
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
84 ------------------------------- |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
85 -- |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
86 -- Every equalizer is monic |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
87 -- |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
88 -- e i = e j → i = j |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
89 -- |
259 | 90 -- e eqa f g f |
91 -- c ----------> a ------->b | |
92 -- ^^ | |
93 -- || | |
94 -- i||j | |
95 -- || | |
96 -- d | |
255
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
97 |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
98 monoic : { c a b d : Obj A } {f g : Hom A a b } → {e : Hom A c a } ( eqa : Equalizer A e f g) |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
99 → { i j : Hom A d c } |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
100 → A [ A [ equalizer eqa o i ] ≈ A [ equalizer eqa o j ] ] → A [ i ≈ j ] |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
101 monoic {c} {a} {b} {d} {f} {g} {e} eqa {i} {j} ei=ej = let open ≈-Reasoning (A) in begin |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
102 i |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
103 ≈↑⟨ uniqueness eqa ( begin |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
104 equalizer eqa o i |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
105 ≈⟨ ei=ej ⟩ |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
106 equalizer eqa o j |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
107 ∎ )⟩ |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
108 k eqa (equalizer eqa o j) ( f1=gh (fe=ge eqa ) ) |
257 | 109 ≈⟨ uniqueness eqa ( begin |
110 equalizer eqa o j | |
111 ≈⟨⟩ | |
112 equalizer eqa o j | |
113 ∎ )⟩ | |
255
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
114 j |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
115 ∎ |
7e7b2c38dee1
every equalizer is monic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
254
diff
changeset
|
116 |
251 | 117 -------------------------------- |
225 | 118 -- |
119 -- | |
259 | 120 -- Isomorphic arrows from c' to c makes another equalizer |
225 | 121 -- |
230 | 122 -- e eqa f g f |
222 | 123 -- c ----------> a ------->b |
230 | 124 -- |^ |
125 -- || | |
222 | 126 -- h || h-1 |
230 | 127 -- v| |
128 -- c' | |
222 | 129 |
234 | 130 equalizer+iso : {a b c c' : Obj A } {f g : Hom A a b } {e : Hom A c a } |
131 (h-1 : Hom A c' c ) → (h : Hom A c c' ) → | |
132 A [ A [ h o h-1 ] ≈ id1 A c' ] → A [ A [ h-1 o h ] ≈ id1 A c ] → | |
133 ( eqa : Equalizer A e f g ) | |
134 → Equalizer A (A [ e o h-1 ] ) f g | |
254 | 135 equalizer+iso {a} {b} {c} {c'} {f} {g} {e} h-1 h hh-1=1 h-1h=1 eqa = record { |
222 | 136 fe=ge = fe=ge1 ; |
137 k = λ j eq → A [ h o k eqa j eq ] ; | |
230 | 138 ek=h = ek=h1 ; |
222 | 139 uniqueness = uniqueness1 |
140 } where | |
234 | 141 fe=ge1 : A [ A [ f o A [ e o h-1 ] ] ≈ A [ g o A [ e o h-1 ] ] ] |
254 | 142 fe=ge1 = f1=gh ( fe=ge eqa ) |
222 | 143 ek=h1 : {d : Obj A} {j : Hom A d a} {eq : A [ A [ f o j ] ≈ A [ g o j ] ]} → |
234 | 144 A [ A [ A [ e o h-1 ] o A [ h o k eqa j eq ] ] ≈ j ] |
222 | 145 ek=h1 {d} {j} {eq} = let open ≈-Reasoning (A) in |
146 begin | |
234 | 147 ( e o h-1 ) o ( h o k eqa j eq ) |
148 ≈↑⟨ assoc ⟩ | |
149 e o ( h-1 o ( h o k eqa j eq ) ) | |
150 ≈⟨ cdr assoc ⟩ | |
151 e o (( h-1 o h) o k eqa j eq ) | |
152 ≈⟨ cdr (car h-1h=1 ) ⟩ | |
253 | 153 e o (id c o k eqa j eq ) |
234 | 154 ≈⟨ cdr idL ⟩ |
155 e o k eqa j eq | |
222 | 156 ≈⟨ ek=h eqa ⟩ |
157 j | |
158 ∎ | |
159 uniqueness1 : {d : Obj A} {h' : Hom A d a} {eq : A [ A [ f o h' ] ≈ A [ g o h' ] ]} {j : Hom A d c'} → | |
234 | 160 A [ A [ A [ e o h-1 ] o j ] ≈ h' ] → |
222 | 161 A [ A [ h o k eqa h' eq ] ≈ j ] |
162 uniqueness1 {d} {h'} {eq} {j} ej=h = let open ≈-Reasoning (A) in | |
163 begin | |
164 h o k eqa h' eq | |
234 | 165 ≈⟨ cdr (uniqueness eqa ( begin |
166 e o ( h-1 o j ) | |
167 ≈⟨ assoc ⟩ | |
168 (e o h-1 ) o j | |
169 ≈⟨ ej=h ⟩ | |
170 h' | |
171 ∎ )) ⟩ | |
172 h o ( h-1 o j ) | |
173 ≈⟨ assoc ⟩ | |
174 (h o h-1 ) o j | |
175 ≈⟨ car hh-1=1 ⟩ | |
253 | 176 id c' o j |
234 | 177 ≈⟨ idL ⟩ |
222 | 178 j |
179 ∎ | |
180 | |
251 | 181 -------------------------------- |
225 | 182 -- |
183 -- If we have two equalizers on c and c', there are isomorphic pair h, h' | |
184 -- | |
185 -- h : c → c' h' : c' → c | |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
186 -- e' = h o e |
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
187 -- e = h' o e' |
259 | 188 -- |
189 -- | |
190 -- | |
191 -- e eqa f g f | |
192 -- c ---------->a ------->b | |
193 -- ^ ^ g | |
194 -- | | | |
195 -- |k = id c' | | |
196 -- v | | |
197 -- c'-----------+ | |
198 -- e eqa' f g | |
225 | 199 |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
200 c-iso-l : { c c' a b : Obj A } {f g : Hom A a b } → {e : Hom A c a } { e' : Hom A c' a } |
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
201 ( eqa : Equalizer A e f g) → ( eqa' : Equalizer A e' f g ) |
258 | 202 → Hom A c c' |
203 c-iso-l {c} {c'} eqa eqa' = k eqa' (equalizer eqa) ( fe=ge eqa ) | |
223 | 204 |
258 | 205 c-iso-r : { c c' a b : Obj A } {f g : Hom A a b } → {e : Hom A c a } { e' : Hom A c' a } |
206 ( eqa : Equalizer A e f g) → ( eqa' : Equalizer A e' f g ) | |
207 → Hom A c' c | |
208 c-iso-r {c} {c'} eqa eqa' = k eqa (equalizer eqa') ( fe=ge eqa' ) | |
228 | 209 |
258 | 210 c-iso-lr : { c c' a b : Obj A } {f g : Hom A a b } → {e : Hom A c a } { e' : Hom A c' a } |
211 ( eqa : Equalizer A e f g) → ( eqa' : Equalizer A e' f g ) → | |
212 A [ A [ c-iso-l eqa eqa' o c-iso-r eqa eqa' ] ≈ id1 A c' ] | |
213 c-iso-lr {c} {c'} {a} {b} {f} {g} {e} {e'} eqa eqa' = let open ≈-Reasoning (A) in begin | |
214 c-iso-l eqa eqa' o c-iso-r eqa eqa' | |
250 | 215 ≈⟨⟩ |
258 | 216 k eqa' (equalizer eqa) ( fe=ge eqa ) o k eqa (equalizer eqa') ( fe=ge eqa' ) |
217 ≈↑⟨ uniqueness eqa' ( begin | |
218 e' o ( k eqa' (equalizer eqa) (fe=ge eqa) o k eqa (equalizer eqa') (fe=ge eqa') ) | |
219 ≈⟨ assoc ⟩ | |
220 ( e' o k eqa' (equalizer eqa) (fe=ge eqa) ) o k eqa (equalizer eqa') (fe=ge eqa') | |
221 ≈⟨ car (ek=h eqa') ⟩ | |
222 e o k eqa (equalizer eqa') (fe=ge eqa') | |
223 ≈⟨ ek=h eqa ⟩ | |
224 e' | |
225 ∎ )⟩ | |
226 k eqa' e' ( fe=ge eqa' ) | |
227 ≈⟨ uniqueness eqa' ( begin | |
228 e' o id c' | |
250 | 229 ≈⟨ idR ⟩ |
258 | 230 e' |
231 ∎ )⟩ | |
253 | 232 id c' |
229
68b2681ea9df
c in equalizer is equal up to iso done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
228
diff
changeset
|
233 ∎ |
226 | 234 |
258 | 235 -- c-iso-rl is obvious from the symmetry |
234 | 236 |
230 | 237 |
251 | 238 -------------------------------- |
225 | 239 ---- |
240 -- | |
254 | 241 -- Existence of equalizer satisfies Burroni equations |
225 | 242 -- |
243 ---- | |
244 | |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
245 lemma-equ1 : {a b c : Obj A} (f g : Hom A a b) → (e : Hom A c a ) → |
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
246 ( eqa : {a b c : Obj A} → (f g : Hom A a b) → {e : Hom A c a } → Equalizer A e f g ) |
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
247 → Burroni A {c} {a} {b} f g e |
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
248 lemma-equ1 {a} {b} {c} f g e eqa = record { |
245 | 249 α = λ {a} {b} {c} f g e → equalizer (eqa {a} {b} {c} f g {e} ) ; -- Hom A c a |
242 | 250 γ = λ {a} {b} {c} {d} f g h → k (eqa f g ) {d} ( A [ h o (equalizer ( eqa (A [ f o h ] ) (A [ g o h ] ))) ] ) |
251 (lemma-equ4 {a} {b} {c} {d} f g h ) ; -- Hom A c d | |
249 | 252 δ = λ {a} {b} {c} e f → k (eqa {a} {b} {c} f f {e} ) (id1 A a) (f1=f1 f); -- Hom A a c |
246
80d9ef47566b
cong-γ1 done, cong-δ1 remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
245
diff
changeset
|
253 cong-α = λ {a b c e f g g'} eq → cong-α1 {a} {b} {c} {e} {f} {g} {g'} eq ; |
247 | 254 cong-γ = λ {a} {_} {c} {d} {f} {g} {h} {h'} eq → cong-γ1 {a} {c} {d} {f} {g} {h} {h'} eq ; |
245 | 255 cong-δ = λ {a b c e f f'} f=f' → cong-δ1 {a} {b} {c} {e} {f} {f'} f=f' ; |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
256 b1 = fe=ge (eqa {a} {b} {c} f g {e}) ; |
226 | 257 b2 = lemma-b2 ; |
258 b3 = lemma-b3 ; | |
230 | 259 b4 = lemma-b4 |
211 | 260 } where |
216 | 261 -- |
262 -- e eqa f g f | |
263 -- c ----------> a ------->b | |
230 | 264 -- ^ g |
265 -- | | |
216 | 266 -- |k₁ = e eqa (f o (e (eqa f g))) (g o (e (eqa f g)))) |
230 | 267 -- | |
216 | 268 -- d |
230 | 269 -- |
270 -- | |
216 | 271 -- e o id1 ≈ e → k e ≈ id |
272 | |
249 | 273 lemma-b3 : {a b d : Obj A} (f : Hom A a b ) { h : Hom A d a } → A [ A [ equalizer (eqa f f ) o k (eqa f f) (id1 A a) (f1=f1 f) ] ≈ id1 A a ] |
240 | 274 lemma-b3 {a} {b} {d} f {h} = let open ≈-Reasoning (A) in |
230 | 275 begin |
253 | 276 equalizer (eqa f f) o k (eqa f f) (id a) (f1=f1 f) |
215 | 277 ≈⟨ ek=h (eqa f f ) ⟩ |
253 | 278 id a |
211 | 279 ∎ |
230 | 280 lemma-equ4 : {a b c d : Obj A} → (f : Hom A a b) → (g : Hom A a b ) → (h : Hom A d a ) → |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
281 A [ A [ f o A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ] ] ≈ A [ g o A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ] ] ] |
214 | 282 lemma-equ4 {a} {b} {c} {d} f g h = let open ≈-Reasoning (A) in |
212 | 283 begin |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
284 f o ( h o equalizer (eqa (f o h) ( g o h ))) |
212 | 285 ≈⟨ assoc ⟩ |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
286 (f o h) o equalizer (eqa (f o h) ( g o h )) |
221 | 287 ≈⟨ fe=ge (eqa (A [ f o h ]) (A [ g o h ])) ⟩ |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
288 (g o h) o equalizer (eqa (f o h) ( g o h )) |
212 | 289 ≈↑⟨ assoc ⟩ |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
290 g o ( h o equalizer (eqa (f o h) ( g o h ))) |
212 | 291 ∎ |
245 | 292 cong-α1 : {a b c : Obj A } → { e : Hom A c a } |
293 → {f g g' : Hom A a b } → A [ g ≈ g' ] → A [ equalizer (eqa {a} {b} {c} f g {e} )≈ equalizer (eqa {a} {b} {c} f g' {e} ) ] | |
294 cong-α1 {a} {b} {c} {e} {f} {g} {g'} eq = let open ≈-Reasoning (A) in refl-hom | |
247 | 295 cong-γ1 : {a c d : Obj A } → {f g : Hom A a b} {h h' : Hom A d a } → A [ h ≈ h' ] → { e : Hom A c a} → |
246
80d9ef47566b
cong-γ1 done, cong-δ1 remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
245
diff
changeset
|
296 A [ k (eqa f g {e} ) {d} ( A [ h o (equalizer ( eqa (A [ f o h ] ) (A [ g o h ] ) {id1 A d} )) ] ) (lemma-equ4 {a} {b} {c} {d} f g h ) |
80d9ef47566b
cong-γ1 done, cong-δ1 remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
245
diff
changeset
|
297 ≈ k (eqa f g {e} ) {d} ( A [ h' o (equalizer ( eqa (A [ f o h' ] ) (A [ g o h' ] ) {id1 A d} )) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' ) ] |
247 | 298 cong-γ1 {a} {c} {d} {f} {g} {h} {h'} h=h' {e} = let open ≈-Reasoning (A) in begin |
245 | 299 k (eqa f g ) {d} ( A [ h o (equalizer ( eqa (A [ f o h ] ) (A [ g o h ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h ) |
300 ≈⟨ uniqueness (eqa f g) ( begin | |
248 | 301 e o k (eqa f g ) {d} ( A [ h' o (equalizer ( eqa (A [ f o h' ] ) (A [ g o h' ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' ) |
302 ≈⟨ ek=h (eqa f g ) ⟩ | |
303 h' o (equalizer ( eqa (A [ f o h' ] ) (A [ g o h' ] ))) | |
304 ≈↑⟨ car h=h' ⟩ | |
305 h o (equalizer ( eqa (A [ f o h' ] ) (A [ g o h' ] ))) | |
245 | 306 ∎ )⟩ |
307 k (eqa f g ) {d} ( A [ h' o (equalizer ( eqa (A [ f o h' ] ) (A [ g o h' ] ))) ] ) (lemma-equ4 {a} {b} {c} {d} f g h' ) | |
308 ∎ | |
249 | 309 cong-δ1 : {a b c : Obj A} {e : Hom A c a } {f f' : Hom A a b} → A [ f ≈ f' ] → A [ k (eqa {a} {b} {c} f f {e} ) (id1 A a) (f1=f1 f) ≈ |
310 k (eqa {a} {b} {c} f' f' {e} ) (id1 A a) (f1=f1 f') ] | |
247 | 311 cong-δ1 {a} {b} {c} {e} {f} {f'} f=f' = let open ≈-Reasoning (A) in |
312 begin | |
253 | 313 k (eqa {a} {b} {c} f f {e} ) (id a) (f1=f1 f) |
247 | 314 ≈⟨ uniqueness (eqa f f) ( begin |
253 | 315 e o k (eqa {a} {b} {c} f' f' {e} ) (id a) (f1=f1 f') |
247 | 316 ≈⟨ ek=h (eqa {a} {b} {c} f' f' {e} ) ⟩ |
253 | 317 id a |
247 | 318 ∎ )⟩ |
253 | 319 k (eqa {a} {b} {c} f' f' {e} ) (id a) (f1=f1 f') |
247 | 320 ∎ |
321 | |
230 | 322 lemma-b2 : {d : Obj A} {h : Hom A d a} → A [ |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
323 A [ equalizer (eqa f g) o k (eqa f g) (A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ]) (lemma-equ4 {a} {b} {c} f g h) ] |
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
324 ≈ A [ h o equalizer (eqa (A [ f o h ]) (A [ g o h ])) ] ] |
226 | 325 lemma-b2 {d} {h} = let open ≈-Reasoning (A) in |
212 | 326 begin |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
327 equalizer (eqa f g) o k (eqa f g) (h o equalizer (eqa (f o h) (g o h))) (lemma-equ4 {a} {b} {c} f g h) |
215 | 328 ≈⟨ ek=h (eqa f g) ⟩ |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
329 h o equalizer (eqa (f o h ) ( g o h )) |
212 | 330 ∎ |
230 | 331 |
332 lemma-b4 : {d : Obj A} {j : Hom A d c} → A [ | |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
333 A [ k (eqa f g) (A [ A [ equalizer (eqa f g) o j ] o |
254 | 334 equalizer (eqa (A [ f o A [ equalizer (eqa f g {e}) o j ] ]) (A [ g o A [ equalizer (eqa f g {e} ) o j ] ])) ]) |
335 (lemma-equ4 {a} {b} {c} f g (A [ equalizer (eqa f g) o j ])) | |
336 o k (eqa (A [ f o A [ equalizer (eqa f g) o j ] ]) (A [ f o A [ equalizer (eqa f g) o j ] ])) | |
337 (id1 A d) (f1=f1 (A [ f o A [ equalizer (eqa f g) o j ] ])) ] | |
222 | 338 ≈ j ] |
230 | 339 lemma-b4 {d} {j} = let open ≈-Reasoning (A) in |
215 | 340 begin |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
341 ( k (eqa f g) (( ( equalizer (eqa f g) o j ) o equalizer (eqa (( f o ( equalizer (eqa f g {e}) o j ) )) (( g o ( equalizer (eqa f g {e}) o j ) ))) )) |
233
4bba19bc71be
e is now explict parameter
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
232
diff
changeset
|
342 (lemma-equ4 {a} {b} {c} f g (( equalizer (eqa f g) o j ))) o |
249 | 343 k (eqa (( f o ( equalizer (eqa f g) o j ) )) (( f o ( equalizer (eqa f g) o j ) ))) (id1 A d) (f1=f1 (( f o ( equalizer (eqa f g) o j ) ))) ) |
235
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
344 ≈⟨ car ((uniqueness (eqa f g) ( begin |
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
345 equalizer (eqa f g) o j |
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
346 ≈↑⟨ idR ⟩ |
253 | 347 (equalizer (eqa f g) o j ) o id d |
348 ≈⟨⟩ -- here we decide e (fej) (gej)' is id d | |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
349 ((equalizer (eqa f g) o j) o equalizer (eqa (f o equalizer (eqa f g {e}) o j) (g o equalizer (eqa f g {e}) o j))) |
235
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
350 ∎ ))) ⟩ |
249 | 351 j o k (eqa (( f o ( equalizer (eqa f g) o j ) )) (( f o ( equalizer (eqa f g) o j ) ))) (id1 A d) (f1=f1 (( f o ( equalizer (eqa f g) o j ) ))) |
235
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
352 ≈⟨ cdr ((uniqueness (eqa (( f o ( equalizer (eqa f g) o j ) )) (( f o ( equalizer (eqa f g) o j ) ))) ( begin |
253 | 353 equalizer (eqa (f o equalizer (eqa f g {e} ) o j) (f o equalizer (eqa f g {e}) o j)) o id d |
236
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
354 ≈⟨ idR ⟩ |
e20b81102eee
Burroni equational equalizer definition done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
235
diff
changeset
|
355 equalizer (eqa (f o equalizer (eqa f g {e}) o j) (f o equalizer (eqa f g {e}) o j)) |
253 | 356 ≈⟨⟩ -- here we decide e (fej) (fej)' is id d |
357 id d | |
235
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
358 ∎ ))) ⟩ |
253 | 359 j o id d |
235
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
360 ≈⟨ idR ⟩ |
222 | 361 j |
235
8835015a3e1a
passed let;s remove yellow
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
234
diff
changeset
|
362 ∎ |
211 | 363 |
251 | 364 -------------------------------- |
365 -- | |
366 -- Bourroni equations gives an Equalizer | |
367 -- | |
211 | 368 |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
369 lemma-equ2 : {a b c : Obj A} (f g : Hom A a b) (e : Hom A c a ) |
245 | 370 → ( bur : Burroni A {c} {a} {b} f g e ) → Equalizer A {c} {a} {b} (α bur f g e) f g |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
371 lemma-equ2 {a} {b} {c} f g e bur = record { |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
372 fe=ge = fe=ge1 ; |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
373 k = k1 ; |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
374 ek=h = λ {d} {h} {eq} → ek=h1 {d} {h} {eq} ; |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
375 uniqueness = λ {d} {h} {eq} {k'} ek=h → uniqueness1 {d} {h} {eq} {k'} ek=h |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
376 } where |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
377 k1 : {d : Obj A} (h : Hom A d a) → A [ A [ f o h ] ≈ A [ g o h ] ] → Hom A d c |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
378 k1 {d} h fh=gh = β bur {d} {a} {b} f g h |
245 | 379 fe=ge1 : A [ A [ f o (α bur f g e) ] ≈ A [ g o (α bur f g e) ] ] |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
380 fe=ge1 = b1 bur |
245 | 381 ek=h1 : {d : Obj A} → ∀ {h : Hom A d a} → {eq : A [ A [ f o h ] ≈ A [ g o h ] ] } → A [ A [ (α bur f g e) o k1 {d} h eq ] ≈ h ] |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
382 ek=h1 {d} {h} {eq} = let open ≈-Reasoning (A) in |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
383 begin |
245 | 384 α bur f g e o k1 h eq |
239 | 385 ≈⟨⟩ |
253 | 386 α bur f g e o ( γ bur {a} {b} {c} f g h o δ bur {d} {b} {d} (id d) (f o h) ) |
239 | 387 ≈⟨ assoc ⟩ |
253 | 388 ( α bur f g e o γ bur {a} {b} {c} f g h ) o δ bur {d} {b} {d} (id d) (f o h) |
239 | 389 ≈⟨ car (b2 bur) ⟩ |
253 | 390 ( h o ( α bur ( f o h ) ( g o h ) (id d))) o δ bur {d} {b} {d} (id d) (f o h) |
239 | 391 ≈↑⟨ assoc ⟩ |
253 | 392 h o ((( α bur ( f o h ) ( g o h ) (id d) )) o δ bur {d} {b} {d} (id d) (f o h) ) |
240 | 393 ≈↑⟨ cdr ( car ( cong-α bur eq)) ⟩ |
253 | 394 h o ((( α bur ( f o h ) ( f o h ) (id d)))o δ bur {d} {b} {d} (id d) (f o h) ) |
395 ≈⟨ cdr (b3 bur {d} {b} {d} (f o h) {id d} ) ⟩ | |
396 h o id d | |
240 | 397 ≈⟨ idR ⟩ |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
398 h |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
399 ∎ |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
400 uniqueness1 : {d : Obj A} → ∀ {h : Hom A d a} → {eq : A [ A [ f o h ] ≈ A [ g o h ] ] } → {k' : Hom A d c } → |
245 | 401 A [ A [ (α bur f g e) o k' ] ≈ h ] → A [ k1 {d} h eq ≈ k' ] |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
402 uniqueness1 {d} {h} {eq} {k'} ek=h = let open ≈-Reasoning (A) in |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
403 begin |
240 | 404 k1 {d} h eq |
239 | 405 ≈⟨⟩ |
253 | 406 γ bur {a} {b} {c} f g h o δ bur {d} {b} {d} (id d) (f o h) |
240 | 407 ≈↑⟨ car (cong-γ bur {a} {b} {c} {d} ek=h ) ⟩ |
253 | 408 γ bur f g (A [ α bur f g e o k' ]) o δ bur {d} {b} {d} (id d) (f o h) |
245 | 409 ≈↑⟨ cdr (cong-δ bur (resp ek=h refl-hom )) ⟩ |
253 | 410 γ bur f g (A [ α bur f g e o k' ]) o δ bur {d} {b} {d} (id d) ( f o ( α bur f g e o k') ) |
240 | 411 ≈⟨ b4 bur ⟩ |
238
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
412 k' |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
413 ∎ |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
414 |
c8db99cdf72a
Burrnoi to Equalizer problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
237
diff
changeset
|
415 |
225 | 416 -- end |
212 | 417 |
418 | |
419 | |
215 | 420 |
421 |