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