Mercurial > hg > Members > kono > Proof > category
annotate pullback.agda @ 684:5d9d7c2f2718
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Nov 2017 00:09:21 +0900 |
parents | 88e8a1290dc4 |
children | f5f582ae20bb |
rev | line source |
---|---|
260 | 1 -- Pullback from product and equalizer |
2 -- | |
3 -- | |
4 -- Shinji KONO <kono@ie.u-ryukyu.ac.jp> | |
5 ---- | |
6 | |
7 open import Category -- https://github.com/konn/category-agda | |
8 open import Level | |
266 | 9 module pullback { c₁ c₂ ℓ : Level} ( A : Category c₁ c₂ ℓ ) { c₁' c₂' ℓ' : Level} ( I : Category c₁' c₂' ℓ') ( Γ : Functor I A ) where |
260 | 10 |
11 open import HomReasoning | |
12 open import cat-utility | |
13 | |
282 | 14 -- |
264 | 15 -- Pullback from equalizer and product |
260 | 16 -- f |
300 | 17 -- a ------→ c |
682 | 18 -- ^ ^ |
19 -- π1 | |g | |
20 -- | | | |
21 -- axb -----→ b | |
260 | 22 -- ^ π2 |
23 -- | | |
282 | 24 -- | e = equalizer (f π1) (g π1) |
264 | 25 -- | |
26 -- d <------------------ d' | |
27 -- k (π1' × π2' ) | |
260 | 28 |
261 | 29 open Equalizer |
443 | 30 open IsEqualizer |
672 | 31 open IsProduct |
261 | 32 |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
33 pullback-from : {a b c : Obj A} |
260 | 34 ( f : Hom A a c ) ( g : Hom A b c ) |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
35 ( eqa : {a b : Obj A} → (f g : Hom A a b) → Equalizer A f g ) |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
36 ( prod : ( a b : Obj A ) → Product A a b ) → Pullback A f g |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
37 pullback-from {a} {b} {c} f g eqa prod0 = record { |
682 | 38 ab = d ; |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
39 π1 = A [ π1 o e ] ; |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
40 π2 = A [ π2 o e ] ; |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
41 isPullback = record { |
260 | 42 commute = commute1 ; |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
43 pullback = p1 ; |
282 | 44 π1p=π1 = λ {d} {π1'} {π2'} {eq} → π1p=π11 {d} {π1'} {π2'} {eq} ; |
45 π2p=π2 = λ {d} {π1'} {π2'} {eq} → π2p=π21 {d} {π1'} {π2'} {eq} ; | |
260 | 46 uniqueness = uniqueness1 |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
47 } |
282 | 48 } where |
682 | 49 ab : Obj A |
50 ab = Product.product (prod0 a b) | |
51 π1 : Hom A ab a | |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
52 π1 = Product.π1 (prod0 a b ) |
682 | 53 π2 : Hom A ab b |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
54 π2 = Product.π2 (prod0 a b ) |
682 | 55 d : Obj A |
56 d = equalizer-c (eqa (A [ f o π1 ]) (A [ g o π2 ])) | |
57 e : Hom A d ab | |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
58 e = equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
59 prod = Product.isProduct (prod0 a b) |
682 | 60 commute1 : A [ A [ f o A [ π1 o e ] ] |
61 ≈ A [ g o A [ π2 o e ] ] ] | |
262 | 62 commute1 = let open ≈-Reasoning (A) in |
63 begin | |
682 | 64 f o ( π1 o e ) |
262 | 65 ≈⟨ assoc ⟩ |
682 | 66 ( f o π1 ) o e |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
67 ≈⟨ fe=ge (isEqualizer (eqa (A [ f o π1 ]) (A [ g o π2 ]))) ⟩ |
682 | 68 ( g o π2 ) o e |
262 | 69 ≈↑⟨ assoc ⟩ |
682 | 70 g o ( π2 o e ) |
262 | 71 ∎ |
282 | 72 lemma1 : {d' : Obj A} {π1' : Hom A d' a} {π2' : Hom A d' b} → A [ A [ f o π1' ] ≈ A [ g o π2' ] ] → |
262 | 73 A [ A [ A [ f o π1 ] o (prod × π1') π2' ] ≈ A [ A [ g o π2 ] o (prod × π1') π2' ] ] |
282 | 74 lemma1 {d'} { π1' } { π2' } eq = let open ≈-Reasoning (A) in |
262 | 75 begin |
76 ( f o π1 ) o (prod × π1') π2' | |
77 ≈↑⟨ assoc ⟩ | |
78 f o ( π1 o (prod × π1') π2' ) | |
79 ≈⟨ cdr (π1fxg=f prod) ⟩ | |
80 f o π1' | |
81 ≈⟨ eq ⟩ | |
82 g o π2' | |
83 ≈↑⟨ cdr (π2fxg=g prod) ⟩ | |
84 g o ( π2 o (prod × π1') π2' ) | |
85 ≈⟨ assoc ⟩ | |
86 ( g o π2 ) o (prod × π1') π2' | |
87 ∎ | |
682 | 88 p1 : {d' : Obj A} {π1' : Hom A d' a} {π2' : Hom A d' b} → A [ A [ f o π1' ] ≈ A [ g o π2' ] ] → Hom A d' d |
282 | 89 p1 {d'} { π1' } { π2' } eq = |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
90 let open ≈-Reasoning (A) in k (isEqualizer (eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ))) (_×_ prod π1' π2' ) ( lemma1 eq ) |
282 | 91 π1p=π11 : {d₁ : Obj A} {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} → |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
92 A [ A [ A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) ) ] o p1 eq ] ≈ π1' ] |
262 | 93 π1p=π11 {d'} {π1'} {π2'} {eq} = let open ≈-Reasoning (A) in |
94 begin | |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
95 ( π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) ) ) o p1 eq |
262 | 96 ≈⟨⟩ |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
97 ( π1 o e) o k (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) )) (_×_ prod π1' π2' ) (lemma1 eq) |
262 | 98 ≈↑⟨ assoc ⟩ |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
99 π1 o ( e o k (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) )) (_×_ prod π1' π2' ) (lemma1 eq) ) |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
100 ≈⟨ cdr ( ek=h (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) ))) ⟩ |
282 | 101 π1 o (_×_ prod π1' π2' ) |
262 | 102 ≈⟨ π1fxg=f prod ⟩ |
103 π1' | |
104 ∎ | |
282 | 105 π2p=π21 : {d₁ : Obj A} {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} → |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
106 A [ A [ A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) ) ] o p1 eq ] ≈ π2' ] |
262 | 107 π2p=π21 {d'} {π1'} {π2'} {eq} = let open ≈-Reasoning (A) in |
108 begin | |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
109 ( π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ]) ) ) o p1 eq |
262 | 110 ≈⟨⟩ |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
111 ( π2 o e) o k (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) )) (_×_ prod π1' π2' ) (lemma1 eq) |
262 | 112 ≈↑⟨ assoc ⟩ |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
113 π2 o ( e o k (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) )) (_×_ prod π1' π2' ) (lemma1 eq) ) |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
114 ≈⟨ cdr ( ek=h (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) ))) ⟩ |
282 | 115 π2 o (_×_ prod π1' π2' ) |
262 | 116 ≈⟨ π2fxg=g prod ⟩ |
117 π2' | |
118 ∎ | |
682 | 119 uniqueness1 : {d₁ : Obj A} (p' : Hom A d₁ d) {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} |
302 | 120 {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} → |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
121 {eq1 : A [ A [ A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π1' ]} → |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
122 {eq2 : A [ A [ A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π2' ]} → |
261 | 123 A [ p1 eq ≈ p' ] |
264 | 124 uniqueness1 {d'} p' {π1'} {π2'} {eq} {eq1} {eq2} = let open ≈-Reasoning (A) in |
263 | 125 begin |
126 p1 eq | |
127 ≈⟨⟩ | |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
128 k (isEqualizer ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) )) (_×_ prod π1' π2' ) (lemma1 eq) |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
129 ≈⟨ IsEqualizer.uniqueness (isEqualizer (eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) )) ( begin |
264 | 130 e o p' |
131 ≈⟨⟩ | |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
132 equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p' |
672 | 133 ≈↑⟨ IsProduct.uniqueness prod ⟩ |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
134 (prod × ( π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p') ) ( π2 o (equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p')) |
264 | 135 ≈⟨ ×-cong prod (assoc) (assoc) ⟩ |
681
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
136 (prod × (A [ A [ π1 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ])) |
bd8f7346f252
fix Product and pullback
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
680
diff
changeset
|
137 (A [ A [ π2 o equalizer (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ]) |
264 | 138 ≈⟨ ×-cong prod eq1 eq2 ⟩ |
139 ((prod × π1') π2') | |
140 ∎ ) ⟩ | |
263 | 141 p' |
142 ∎ | |
143 | |
266 | 144 -------------------------------- |
145 -- | |
146 -- If we have two limits on c and c', there are isomorphic pair h, h' | |
147 | |
148 open Limit | |
487 | 149 open IsLimit |
312
702adc45704f
is this right direction?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
303
diff
changeset
|
150 open NTrans |
266 | 151 |
152 iso-l : { c₁' c₂' ℓ' : Level} ( I : Category c₁' c₂' ℓ' ) ( Γ : Functor I A ) | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
153 ( lim : Limit A I Γ ) → ( lim' : Limit A I Γ ) |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
154 → Hom A (a0 lim )(a0 lim') |
487 | 155 iso-l I Γ lim lim' = limit (isLimit lim') (a0 lim) ( t0 lim) |
266 | 156 |
157 iso-r : { c₁' c₂' ℓ' : Level} ( I : Category c₁' c₂' ℓ' ) ( Γ : Functor I A ) | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
158 ( lim : Limit A I Γ ) → ( lim' : Limit A I Γ ) |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
159 → Hom A (a0 lim') (a0 lim) |
487 | 160 iso-r I Γ lim lim' = limit (isLimit lim) (a0 lim') (t0 lim') |
266 | 161 |
162 | |
163 iso-lr : { c₁' c₂' ℓ' : Level} ( I : Category c₁' c₂' ℓ' ) ( Γ : Functor I A ) | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
164 ( lim : Limit A I Γ ) → ( lim' : Limit A I Γ ) → |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
165 ∀{ i : Obj I } → A [ A [ iso-l I Γ lim lim' o iso-r I Γ lim lim' ] ≈ id1 A (a0 lim') ] |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
166 iso-lr I Γ lim lim' {i} = let open ≈-Reasoning (A) in begin |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
167 iso-l I Γ lim lim' o iso-r I Γ lim lim' |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
168 ≈⟨⟩ |
487 | 169 limit (isLimit lim') (a0 lim) ( t0 lim) o limit (isLimit lim) (a0 lim') (t0 lim') |
495 | 170 ≈↑⟨ limit-uniqueness (isLimit lim') ( λ {i} → ( begin |
487 | 171 TMap (t0 lim') i o ( limit (isLimit lim') (a0 lim) (t0 lim) o limit (isLimit lim) (a0 lim') (t0 lim') ) |
266 | 172 ≈⟨ assoc ⟩ |
487 | 173 ( TMap (t0 lim') i o limit (isLimit lim') (a0 lim) (t0 lim) ) o limit (isLimit lim) (a0 lim') (t0 lim') |
174 ≈⟨ car ( t0f=t (isLimit lim') ) ⟩ | |
175 TMap (t0 lim) i o limit (isLimit lim) (a0 lim') (t0 lim') | |
176 ≈⟨ t0f=t (isLimit lim) ⟩ | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
177 TMap (t0 lim') i |
271 | 178 ∎) ) ⟩ |
487 | 179 limit (isLimit lim') (a0 lim') (t0 lim') |
495 | 180 ≈⟨ limit-uniqueness (isLimit lim') idR ⟩ |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
181 id (a0 lim' ) |
266 | 182 ∎ |
183 | |
184 | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
185 |
282 | 186 open import CatExponetial |
267 | 187 |
188 open Functor | |
189 | |
190 -------------------------------- | |
191 -- | |
363 | 192 -- Constancy Functor |
266 | 193 |
268 | 194 KI : { c₁' c₂' ℓ' : Level} ( I : Category c₁' c₂' ℓ' ) → Functor A ( A ^ I ) |
195 KI { c₁'} {c₂'} {ℓ'} I = record { | |
291 | 196 FObj = λ a → K A I a ; |
197 FMap = λ f → record { -- NTrans I A (K A I a) (K A I b) | |
267 | 198 TMap = λ a → f ; |
282 | 199 isNTrans = record { |
267 | 200 commute = λ {a b f₁} → commute1 {a} {b} {f₁} f |
201 } | |
282 | 202 } ; |
266 | 203 isFunctor = let open ≈-Reasoning (A) in record { |
267 | 204 ≈-cong = λ f=g {x} → f=g |
266 | 205 ; identity = refl-hom |
267 | 206 ; distr = refl-hom |
266 | 207 } |
267 | 208 } where |
209 commute1 : {a b : Obj I} {f₁ : Hom I a b} → {a' b' : Obj A} → (f : Hom A a' b' ) → | |
291 | 210 A [ A [ FMap (K A I b') f₁ o f ] ≈ A [ f o FMap (K A I a') f₁ ] ] |
282 | 211 commute1 {a} {b} {f₁} {a'} {b'} f = let open ≈-Reasoning (A) in begin |
291 | 212 FMap (K A I b') f₁ o f |
267 | 213 ≈⟨ idL ⟩ |
214 f | |
215 ≈↑⟨ idR ⟩ | |
291 | 216 f o FMap (K A I a') f₁ |
267 | 217 ∎ |
218 | |
219 | |
272 | 220 --------- |
221 -- | |
298 | 222 -- Limit Constancy Functor F : A → A^I has right adjoint |
223 -- | |
224 -- we are going to prove universal mapping | |
225 | |
226 --------- | |
227 -- | |
272 | 228 -- limit gives co universal mapping ( i.e. adjunction ) |
229 -- | |
230 -- F = KI I : Functor A (A ^ I) | |
282 | 231 -- U = λ b → A0 (lim b {a0 b} {t0 b} |
232 -- ε = λ b → T0 ( lim b {a0 b} {t0 b} ) | |
475 | 233 -- |
234 -- a0 : Obj A and t0 : NTrans K Γ come from the limit | |
272 | 235 |
282 | 236 limit2couniv : |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
237 ( lim : ( Γ : Functor I A ) → Limit A I Γ ) |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
238 → coUniversalMapping A ( A ^ I ) (KI I) (λ b → a0 ( lim b) ) ( λ b → t0 (lim b) ) |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
239 limit2couniv lim = record { -- F U ε |
487 | 240 _*' = λ {b} {a} k → limit (isLimit (lim b )) a k ; -- η |
270
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
241 iscoUniversalMapping = record { |
282 | 242 couniversalMapping = λ{ b a f} → couniversalMapping1 {b} {a} {f} ; |
271 | 243 couniquness = couniquness2 |
270
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
244 } |
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
245 } where |
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
246 couniversalMapping1 : {b : Obj (A ^ I)} {a : Obj A} {f : Hom (A ^ I) (FObj (KI I) a) b} → |
487 | 247 A ^ I [ A ^ I [ t0 (lim b) o FMap (KI I) (limit (isLimit (lim b)) a f) ] ≈ f ] |
270
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
248 couniversalMapping1 {b} {a} {f} {i} = let open ≈-Reasoning (A) in begin |
487 | 249 TMap (t0 (lim b )) i o TMap ( FMap (KI I) (limit (isLimit (lim b )) a f) ) i |
270
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
250 ≈⟨⟩ |
487 | 251 TMap (t0 (lim b)) i o (limit (isLimit (lim b)) a f) |
252 ≈⟨ t0f=t (isLimit (lim b)) ⟩ | |
270
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
253 TMap f i -- i comes from ∀{i} → B [ TMap f i ≈ TMap g i ] |
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
254 ∎ |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
255 couniquness2 : {b : Obj (A ^ I)} {a : Obj A} {f : Hom (A ^ I) (FObj (KI I) a) b} {g : Hom A a (a0 (lim b ))} → |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
256 ( ∀ { i : Obj I } → A [ A [ TMap (t0 (lim b )) i o TMap ( FMap (KI I) g) i ] ≈ TMap f i ] ) |
487 | 257 → A [ limit (isLimit (lim b )) a f ≈ g ] |
271 | 258 couniquness2 {b} {a} {f} {g} lim-g=f = let open ≈-Reasoning (A) in begin |
487 | 259 limit (isLimit (lim b )) a f |
495 | 260 ≈⟨ limit-uniqueness (isLimit ( lim b )) lim-g=f ⟩ |
270
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
261 g |
8ba03259a177
one yellow remain on ∀{x} → B [ TMap f x ≈ TMap g x ]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
269
diff
changeset
|
262 ∎ |
268 | 263 |
272 | 264 open import Category.Cat |
275 | 265 |
266 | |
278 | 267 open coUniversalMapping |
282 | 268 |
269 univ2limit : | |
270 ( U : Obj (A ^ I ) → Obj A ) | |
291 | 271 ( ε : ( b : Obj (A ^ I ) ) → NTrans I A (K A I (U b)) b ) |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
272 ( univ : coUniversalMapping A (A ^ I) (KI I) U ε ) → |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
273 ( Γ : Functor I A ) → Limit A I Γ |
278 | 274 univ2limit U ε univ Γ = record { |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
275 a0 = U Γ ; |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
276 t0 = ε Γ ; |
487 | 277 isLimit = record { |
278 limit = λ a t → limit1 a t ; | |
279 t0f=t = λ {a t i } → t0f=t1 {a} {t} {i} ; | |
495 | 280 limit-uniqueness = λ {a} {t} {f} t=f → limit-uniqueness1 {a} {t} {f} t=f |
487 | 281 } |
272 | 282 } where |
291 | 283 limit1 : (a : Obj A) → NTrans I A (K A I a) Γ → Hom A a (U Γ) |
282 | 284 limit1 a t = _*' univ {_} {a} t |
291 | 285 t0f=t1 : {a : Obj A} {t : NTrans I A (K A I a) Γ} {i : Obj I} → |
279
8df8e74e6316
limit and prod/equalizer
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
278
diff
changeset
|
286 A [ A [ TMap (ε Γ) i o limit1 a t ] ≈ TMap t i ] |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
287 t0f=t1 {a} {t} {i} = let open ≈-Reasoning (A) in begin |
279
8df8e74e6316
limit and prod/equalizer
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
278
diff
changeset
|
288 TMap (ε Γ) i o limit1 a t |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
289 ≈⟨⟩ |
280 | 290 TMap (ε Γ) i o _*' univ {Γ} {a} t |
291 ≈⟨ coIsUniversalMapping.couniversalMapping ( iscoUniversalMapping univ) {Γ} {a} {t} ⟩ | |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
292 TMap t i |
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
293 ∎ |
291 | 294 limit-uniqueness1 : { a : Obj A } → { t : NTrans I A ( K A I a ) Γ } → { f : Hom A a (U Γ)} |
279
8df8e74e6316
limit and prod/equalizer
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
278
diff
changeset
|
295 → ( ∀ { i : Obj I } → A [ A [ TMap (ε Γ) i o f ] ≈ TMap t i ] ) → A [ limit1 a t ≈ f ] |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
296 limit-uniqueness1 {a} {t} {f} εf=t = let open ≈-Reasoning (A) in begin |
278 | 297 _*' univ t |
298 ≈⟨ ( coIsUniversalMapping.couniquness ( iscoUniversalMapping univ) ) εf=t ⟩ | |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
299 f |
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
300 ∎ |
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
301 |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
302 |
672 | 303 lemma-p0 : (a b ab : Obj A) ( π1 : Hom A ab a ) ( π2 : Hom A ab b ) ( prod : IsProduct A a b ab π1 π2 ) → |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
304 A [ _×_ prod π1 π2 ≈ id1 A ab ] |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
305 lemma-p0 a b ab π1 π2 prod = let open ≈-Reasoning (A) in begin |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
306 _×_ prod π1 π2 |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
307 ≈↑⟨ ×-cong prod idR idR ⟩ |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
308 _×_ prod (A [ π1 o id1 A ab ]) (A [ π2 o id1 A ab ]) |
672 | 309 ≈⟨ IsProduct.uniqueness prod ⟩ |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
310 id1 A ab |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
311 ∎ |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
312 |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
313 |
282 | 314 open IProduct |
508
3ce21b2a671a
IProduct is written in Sets
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
495
diff
changeset
|
315 open IsIProduct |
283 | 316 open Equalizer |
281
dbd2044add2a
limit from product and equalizer continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
280
diff
changeset
|
317 |
282 | 318 -- |
319 -- limit from equalizer and product | |
320 -- | |
321 -- | |
682 | 322 -- Γ j = Γ k |
684 | 323 -- ↑ ^ ↑ ↑ |
324 -- | | | |proj k | |
682 | 325 -- | |mu u |mu u |
684 | 326 -- | | | | |
682 | 327 -- | product of Hom i |
684 | 328 -- | ↑ ↑ | K u = id lim |
329 -- | | | | | |
682 | 330 -- | f|id g|λ u → Γ u d = K j -----------→ K k = d |
684 | 331 -- proj j | | | | | u | |
332 -- | | | | proj j o e = ε j | | ε k = proj k o e | |
682 | 333 -- product of Obj i -+ mu u o g o e | | mu u o f o e |
334 -- ^ | | | |
678
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
335 -- | e = equalizer f g | | |
682 | 336 -- | ↓ ↓ |
337 -- lim ←---------------- d' a j = Γ j -----------→ Γ k = a j | |
338 -- k ( product pi ) Γ u | |
339 -- Γ u o ε j = ε k | |
283 | 340 -- |
291 | 341 |
678
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
342 -- homprod should be written by IProduct |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
343 record homprod {c : Level } : Set (suc c₁' ⊔ suc c₂' ) where |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
344 field |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
345 hom-j : Obj I |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
346 hom-k : Obj I |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
347 hom : Hom I hom-j hom-k |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
348 open homprod |
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
349 |
680
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
350 Homprod : {j k : Obj I} (u : Hom I j k) → homprod {c₁} |
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
351 Homprod {j} {k} u = record {hom-j = j ; hom-k = k ; hom = u} |
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
352 |
282 | 353 limit-from : |
678
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
354 ( prod : {c : Level} { I : Set c } → ( ai : I → Obj A ) → IProduct A I ai ) |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
355 ( eqa : {a b : Obj A} → (f g : Hom A a b) → Equalizer A f g ) |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
356 → Limit A I Γ |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
357 limit-from prod eqa = record { |
682 | 358 a0 = d ; |
359 t0 = limit-ε ; | |
487 | 360 isLimit = record { |
361 limit = λ a t → limit1 a t ; | |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
362 t0f=t = λ {a t i } → t0f=t1 {a} {t} {i} ; |
495 | 363 limit-uniqueness = λ {a} {t} {f} t=f → limit-uniqueness1 {a} {t} {f} t=f |
487 | 364 } |
282 | 365 } where |
680
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
366 p0 : Obj A |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
367 p0 = iprod (prod (FObj Γ)) |
682 | 368 Fcod : homprod {c₁} → Obj A |
369 Fcod = λ u → FObj Γ ( hom-k u ) | |
679 | 370 f : Hom A p0 (iprod (prod Fcod)) |
680
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
371 f = iproduct (isIProduct (prod Fcod)) (λ u → pi (prod (FObj Γ)) (hom-k u )) |
679 | 372 g : Hom A p0 (iprod (prod Fcod)) |
680
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
373 g = iproduct (isIProduct (prod Fcod)) (λ u → A [ FMap Γ (hom u) o pi (prod (FObj Γ)) (hom-j u ) ] ) |
682 | 374 equ-ε : Equalizer A g f |
375 equ-ε = eqa g f | |
376 d : Obj A | |
377 d = equalizer-c equ-ε | |
378 e : Hom A d p0 | |
379 e = equalizer equ-ε | |
380 equ = isEqualizer equ-ε | |
683 | 381 -- projection of the product of Obj I |
682 | 382 proj : (i : Obj I) → Hom A p0 (FObj Γ i) |
383 proj = pi ( prod (FObj Γ) ) | |
384 prodΓ = isIProduct ( prod (FObj Γ) ) | |
683 | 385 -- projection of the product of Hom I |
682 | 386 mu : {j k : Obj I} → (u : Hom I j k ) → Hom A (iprod (prod Fcod)) (Fcod (Homprod u)) |
387 mu u = pi (prod Fcod ) (Homprod u) | |
388 limit-ε : NTrans I A (K A I (equalizer-c equ-ε ) ) Γ | |
389 limit-ε = record { | |
390 TMap = λ i → tmap i ; | |
391 isNTrans = record { commute = commute1 } | |
392 } where | |
393 tmap : (i : Obj I) → Hom A (FObj (K A I d) i) (FObj Γ i) | |
394 tmap i = A [ proj i o e ] | |
395 commute1 : {j k : Obj I} {u : Hom I j k} → | |
396 A [ A [ FMap Γ u o tmap j ] ≈ A [ tmap k o FMap (K A I d) u ] ] | |
397 commute1 {j} {k} {u} = let open ≈-Reasoning (A) in begin | |
398 FMap Γ u o tmap j | |
399 ≈⟨⟩ | |
400 FMap Γ u o ( proj j o e ) | |
401 ≈⟨ assoc ⟩ | |
402 ( FMap Γ u o pi (prod (FObj Γ)) j ) o e | |
403 ≈↑⟨ car ( pif=q (isIProduct (prod Fcod )) ) ⟩ | |
404 ( mu u o g ) o e | |
405 ≈↑⟨ assoc ⟩ | |
406 mu u o (g o e ) | |
407 ≈⟨ cdr ( fe=ge (isEqualizer equ-ε )) ⟩ | |
408 mu u o (f o e ) | |
409 ≈⟨ assoc ⟩ | |
410 (mu u o f ) o e | |
411 ≈⟨ car ( pif=q (isIProduct (prod Fcod ))) ⟩ | |
412 pi (prod (FObj Γ)) k o e | |
413 ≈⟨⟩ | |
414 proj k o e | |
415 ≈↑⟨ idR ⟩ | |
416 (proj k o e ) o id1 A d | |
417 ≈⟨⟩ | |
418 tmap k o FMap (K A I d) u | |
419 ∎ | |
683 | 420 -- an arrow to our product of Obj I ( is an equalizer because of commutativity of t ) |
421 h : {a : Obj A} → (t : NTrans I A (K A I a) Γ ) → Hom A a p0 | |
422 h t = iproduct prodΓ (TMap t) | |
679 | 423 fh=gh : (a : Obj A) → (t : NTrans I A (K A I a) Γ ) → |
683 | 424 A [ A [ g o h t ] ≈ A [ f o h t ] ] |
679 | 425 fh=gh a t = let open ≈-Reasoning (A) in begin |
683 | 426 g o h t |
680
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
427 ≈↑⟨ ip-uniqueness (isIProduct (prod Fcod)) ⟩ |
683 | 428 iproduct (isIProduct (prod Fcod)) (λ u → pi (prod Fcod) u o ( g o h t )) |
682 | 429 ≈⟨ ip-cong (isIProduct (prod Fcod)) ( λ u → begin |
683 | 430 pi (prod Fcod) u o ( g o h t ) |
682 | 431 ≈⟨ assoc ⟩ |
683 | 432 ( pi (prod Fcod) u o g ) o h t |
682 | 433 ≈⟨ car (pif=q (isIProduct (prod Fcod ))) ⟩ |
683 | 434 (FMap Γ (hom u) o pi (prod (FObj Γ)) (hom-j u) ) o h t |
682 | 435 ≈↑⟨ assoc ⟩ |
683 | 436 FMap Γ (hom u) o (pi (prod (FObj Γ)) (hom-j u) o h t ) |
682 | 437 ≈⟨ cdr ( pif=q prodΓ ) ⟩ |
438 FMap Γ (hom u) o TMap t (hom-j u) | |
439 ≈⟨ IsNTrans.commute (isNTrans t) ⟩ | |
440 TMap t (hom-k u) o id1 A a | |
441 ≈⟨ idR ⟩ | |
442 TMap t (hom-k u) | |
443 ≈↑⟨ pif=q prodΓ ⟩ | |
683 | 444 pi (prod (FObj Γ)) (hom-k u) o h t |
682 | 445 ≈↑⟨ car (pif=q (isIProduct (prod Fcod ))) ⟩ |
683 | 446 (pi (prod Fcod) u o f ) o h t |
682 | 447 ≈↑⟨ assoc ⟩ |
683 | 448 pi (prod Fcod) u o ( f o h t ) |
682 | 449 ∎ |
450 ) ⟩ | |
683 | 451 iproduct (isIProduct (prod Fcod)) (λ u → pi (prod Fcod) u o ( f o h t )) |
680
5d894993477f
fh=gh done. limit from product and equalizer done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
679
diff
changeset
|
452 ≈⟨ ip-uniqueness (isIProduct (prod Fcod)) ⟩ |
683 | 453 f o h t |
678
867ea41b331c
extensionality remains
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
677
diff
changeset
|
454 ∎ |
682 | 455 limit1 : (a : Obj A) → NTrans I A (K A I a) Γ → Hom A a d |
683 | 456 limit1 a t = k equ (h t) ( fh=gh a t ) |
291 | 457 t0f=t1 : {a : Obj A} {t : NTrans I A (K A I a) Γ} {i : Obj I} → |
682 | 458 A [ A [ TMap limit-ε i o limit1 a t ] ≈ TMap t i ] |
283 | 459 t0f=t1 {a} {t} {i} = let open ≈-Reasoning (A) in begin |
682 | 460 TMap limit-ε i o limit1 a t |
283 | 461 ≈⟨⟩ |
683 | 462 ( ( proj i ) o e ) o k equ (h t) (fh=gh a t) |
283 | 463 ≈↑⟨ assoc ⟩ |
683 | 464 proj i o ( e o k equ (h t) (fh=gh a t ) ) |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
465 ≈⟨ cdr ( ek=h equ) ⟩ |
683 | 466 proj i o h t |
676 | 467 ≈⟨ pif=q prodΓ ⟩ |
283 | 468 TMap t i |
469 ∎ | |
682 | 470 limit-uniqueness1 : {a : Obj A} {t : NTrans I A (K A I a) Γ} {f : Hom A a d} |
471 → ({i : Obj I} → A [ A [ TMap limit-ε i o f ] ≈ TMap t i ]) → | |
282 | 472 A [ limit1 a t ≈ f ] |
283 | 473 limit-uniqueness1 {a} {t} {f} lim=t = let open ≈-Reasoning (A) in begin |
474 limit1 a t | |
475 ≈⟨⟩ | |
683 | 476 k equ (h t) (fh=gh a t) |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
477 ≈⟨ IsEqualizer.uniqueness equ ( begin |
283 | 478 e o f |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
479 ≈↑⟨ ip-uniqueness prodΓ ⟩ |
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
480 iproduct prodΓ (λ i → ( proj i o ( e o f ) ) ) |
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
481 ≈⟨ ip-cong prodΓ ( λ i → begin |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
482 proj i o ( e o f ) |
284 | 483 ≈⟨ assoc ⟩ |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
484 ( proj i o e ) o f |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
485 ≈⟨ lim=t {i} ⟩ |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
486 TMap t i |
284 | 487 ∎ ) ⟩ |
683 | 488 h t |
283 | 489 ∎ ) ⟩ |
490 f | |
491 ∎ | |
492 | |
673
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
493 |
0007f9a25e9c
fix limit from product and equalizer (not yet finished )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
672
diff
changeset
|
494 -- |
291 | 495 -- |
496 -- Adjoint functor preserves limits | |
497 -- | |
498 -- | |
499 | |
500 open import Category.Cat | |
501 | |
502 ta1 : { c₁' c₂' ℓ' : Level} (B : Category c₁' c₂' ℓ') ( Γ : Functor I B ) | |
299
8c72f5284bc8
remove module parameter from yoneda functor
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
503 ( lim : Obj B ) ( tb : NTrans I B ( K B I lim ) Γ ) → |
291 | 504 ( U : Functor B A) → NTrans I A ( K A I (FObj U lim) ) (U ○ Γ) |
299
8c72f5284bc8
remove module parameter from yoneda functor
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
505 ta1 B Γ lim tb U = record { |
291 | 506 TMap = TMap (Functor*Nat I A U tb) ; |
507 isNTrans = record { commute = λ {a} {b} {f} → let open ≈-Reasoning (A) in begin | |
508 FMap (U ○ Γ) f o TMap (Functor*Nat I A U tb) a | |
509 ≈⟨ nat ( Functor*Nat I A U tb ) ⟩ | |
510 TMap (Functor*Nat I A U tb) b o FMap (U ○ K B I lim) f | |
511 ≈⟨ cdr (IsFunctor.identity (isFunctor U) ) ⟩ | |
512 TMap (Functor*Nat I A U tb) b o FMap (K A I (FObj U lim)) f | |
513 ∎ | |
514 } } | |
515 | |
516 adjoint-preseve-limit : | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
517 { c₁' c₂' ℓ' : Level} (B : Category c₁' c₂' ℓ') ( Γ : Functor I B ) ( limitb : Limit B I Γ ) → |
291 | 518 { U : Functor B A } { F : Functor A B } |
293 | 519 { η : NTrans A A identityFunctor ( U ○ F ) } |
291 | 520 { ε : NTrans B B ( F ○ U ) identityFunctor } → |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
521 ( adj : Adjunction A B U F η ε ) → Limit A I (U ○ Γ) |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
522 adjoint-preseve-limit B Γ limitb {U} {F} {η} {ε} adj = record { |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
523 a0 = FObj U lim ; |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
524 t0 = ta1 B Γ lim tb U ; |
487 | 525 isLimit = record { |
526 limit = λ a t → limit1 a t ; | |
527 t0f=t = λ {a t i } → t0f=t1 {a} {t} {i} ; | |
495 | 528 limit-uniqueness = λ {a} {t} {f} t=f → limit-uniqueness1 {a} {t} {f} t=f |
487 | 529 } |
291 | 530 } where |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
531 ta = ta1 B Γ (a0 limitb) (t0 limitb) U |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
532 tb = t0 limitb |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
533 lim = a0 limitb |
293 | 534 tfmap : (a : Obj A) → NTrans I A (K A I a) (U ○ Γ) → (i : Obj I) → Hom B (FObj (K B I (FObj F a)) i) (FObj Γ i) |
535 tfmap a t i = B [ TMap ε (FObj Γ i) o FMap F (TMap t i) ] | |
536 tF : (a : Obj A) → NTrans I A (K A I a) (U ○ Γ) → NTrans I B (K B I (FObj F a)) Γ | |
537 tF a t = record { | |
538 TMap = tfmap a t ; | |
539 isNTrans = record { commute = λ {a'} {b} {f} → let open ≈-Reasoning (B) in begin | |
540 FMap Γ f o tfmap a t a' | |
294 | 541 ≈⟨⟩ |
542 FMap Γ f o ( TMap ε (FObj Γ a') o FMap F (TMap t a')) | |
543 ≈⟨ assoc ⟩ | |
544 (FMap Γ f o TMap ε (FObj Γ a') ) o FMap F (TMap t a') | |
545 ≈⟨ car (nat ε) ⟩ | |
546 (TMap ε (FObj Γ b) o FMap (F ○ U) (FMap Γ f) ) o FMap F (TMap t a') | |
547 ≈↑⟨ assoc ⟩ | |
548 TMap ε (FObj Γ b) o ( FMap (F ○ U) (FMap Γ f) o FMap F (TMap t a') ) | |
549 ≈↑⟨ cdr ( distr F ) ⟩ | |
550 TMap ε (FObj Γ b) o ( FMap F (A [ FMap U (FMap Γ f) o TMap t a' ] ) ) | |
551 ≈⟨ cdr ( fcong F (nat t) ) ⟩ | |
552 TMap ε (FObj Γ b) o FMap F (A [ TMap t b o FMap (K A I a) f ]) | |
553 ≈⟨⟩ | |
554 TMap ε (FObj Γ b) o FMap F (A [ TMap t b o id1 A (FObj (K A I a) b) ]) | |
299
8c72f5284bc8
remove module parameter from yoneda functor
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
298
diff
changeset
|
555 ≈⟨ cdr ( fcong F (idR1 A)) ⟩ |
294 | 556 TMap ε (FObj Γ b) o FMap F (TMap t b ) |
557 ≈↑⟨ idR ⟩ | |
558 ( TMap ε (FObj Γ b) o FMap F (TMap t b)) o id1 B (FObj F (FObj (K A I a) b)) | |
559 ≈⟨⟩ | |
293 | 560 tfmap a t b o FMap (K B I (FObj F a)) f |
561 ∎ | |
562 } } | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
563 limit1 : (a : Obj A) → NTrans I A (K A I a) (U ○ Γ) → Hom A a (FObj U (a0 limitb) ) |
487 | 564 limit1 a t = A [ FMap U (limit (isLimit limitb) (FObj F a) (tF a t )) o TMap η a ] |
293 | 565 t0f=t1 : {a : Obj A} {t : NTrans I A (K A I a) (U ○ Γ)} {i : Obj I} → |
291 | 566 A [ A [ TMap ta i o limit1 a t ] ≈ TMap t i ] |
295 | 567 t0f=t1 {a} {t} {i} = let open ≈-Reasoning (A) in begin |
568 TMap ta i o limit1 a t | |
569 ≈⟨⟩ | |
487 | 570 FMap U ( TMap tb i ) o ( FMap U (limit (isLimit limitb) (FObj F a) (tF a t )) o TMap η a ) |
295 | 571 ≈⟨ assoc ⟩ |
487 | 572 ( FMap U ( TMap tb i ) o FMap U (limit (isLimit limitb) (FObj F a) (tF a t ))) o TMap η a |
295 | 573 ≈↑⟨ car ( distr U ) ⟩ |
487 | 574 FMap U ( B [ TMap tb i o limit (isLimit limitb) (FObj F a) (tF a t ) ] ) o TMap η a |
575 ≈⟨ car ( fcong U ( t0f=t (isLimit limitb) ) ) ⟩ | |
295 | 576 FMap U (TMap (tF a t) i) o TMap η a |
577 ≈⟨⟩ | |
578 FMap U ( B [ TMap ε (FObj Γ i) o FMap F (TMap t i) ] ) o TMap η a | |
579 ≈⟨ car ( distr U ) ⟩ | |
580 ( FMap U ( TMap ε (FObj Γ i)) o FMap U ( FMap F (TMap t i) )) o TMap η a | |
581 ≈↑⟨ assoc ⟩ | |
582 FMap U ( TMap ε (FObj Γ i) ) o ( FMap U ( FMap F (TMap t i) ) o TMap η a ) | |
583 ≈⟨ cdr ( nat η ) ⟩ | |
584 FMap U (TMap ε (FObj Γ i)) o ( TMap η (FObj U (FObj Γ i)) o FMap (identityFunctor {_} {_} {_} {A}) (TMap t i) ) | |
585 ≈⟨ assoc ⟩ | |
586 ( FMap U (TMap ε (FObj Γ i)) o TMap η (FObj U (FObj Γ i))) o TMap t i | |
587 ≈⟨ car ( IsAdjunction.adjoint1 ( Adjunction.isAdjunction adj ) ) ⟩ | |
588 id1 A (FObj (U ○ Γ) i) o TMap t i | |
589 ≈⟨ idL ⟩ | |
590 TMap t i | |
591 ∎ | |
296 | 592 -- ta = TMap (Functor*Nat I A U tb) , FMap U ( TMap tb i ) o f ≈ TMap t i |
293 | 593 limit-uniqueness1 : {a : Obj A} {t : NTrans I A (K A I a) (U ○ Γ)} {f : Hom A a (FObj U lim)} |
291 | 594 → ({i : Obj I} → A [ A [ TMap ta i o f ] ≈ TMap t i ]) → |
595 A [ limit1 a t ≈ f ] | |
295 | 596 limit-uniqueness1 {a} {t} {f} lim=t = let open ≈-Reasoning (A) in begin |
597 limit1 a t | |
598 ≈⟨⟩ | |
487 | 599 FMap U (limit (isLimit limitb) (FObj F a) (tF a t )) o TMap η a |
495 | 600 ≈⟨ car ( fcong U (limit-uniqueness (isLimit limitb) ( λ {i} → lemma1 i) )) ⟩ |
298 | 601 FMap U ( B [ TMap ε lim o FMap F f ] ) o TMap η a -- Universal mapping |
297
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
602 ≈⟨ car (distr U ) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
603 ( (FMap U (TMap ε lim)) o (FMap U ( FMap F f )) ) o TMap η a |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
604 ≈⟨ sym assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
605 (FMap U (TMap ε lim)) o ((FMap U ( FMap F f )) o TMap η a ) |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
606 ≈⟨ cdr (nat η) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
607 (FMap U (TMap ε lim)) o ((TMap η (FObj U lim )) o f ) |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
608 ≈⟨ assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
609 ((FMap U (TMap ε lim)) o (TMap η (FObj U lim))) o f |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
610 ≈⟨ car ( IsAdjunction.adjoint1 ( Adjunction.isAdjunction adj)) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
611 id (FObj U lim) o f |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
612 ≈⟨ idL ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
613 f |
296 | 614 ∎ where |
615 lemma1 : (i : Obj I) → B [ B [ TMap tb i o B [ TMap ε lim o FMap F f ] ] ≈ TMap (tF a t) i ] | |
616 lemma1 i = let open ≈-Reasoning (B) in begin | |
617 TMap tb i o (TMap ε lim o FMap F f) | |
297
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
618 ≈⟨ assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
619 ( TMap tb i o TMap ε lim ) o FMap F f |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
620 ≈⟨ car ( nat ε ) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
621 ( TMap ε (FObj Γ i) o FMap F ( FMap U ( TMap tb i ))) o FMap F f |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
622 ≈↑⟨ assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
623 TMap ε (FObj Γ i) o ( FMap F ( FMap U ( TMap tb i )) o FMap F f ) |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
624 ≈↑⟨ cdr ( distr F ) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
625 TMap ε (FObj Γ i) o FMap F ( A [ FMap U ( TMap tb i ) o f ] ) |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
626 ≈⟨ cdr ( fcong F (lim=t {i}) ) ⟩ |
296 | 627 TMap ε (FObj Γ i) o FMap F (TMap t i) |
628 ≈⟨⟩ | |
629 TMap (tF a t) i | |
630 ∎ | |
295 | 631 |
296 | 632 |
633 |