Mercurial > hg > Members > kono > Proof > category
annotate pullback.agda @ 600:3e2ef72d8d2f
Set Completeness unfinished
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 03 Jun 2017 09:46:59 +0900 |
parents | 3ce21b2a671a |
children | 749df4959d19 |
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 |
282 | 18 -- ^ ^ |
260 | 19 -- π1 | |g |
20 -- | | | |
300 | 21 -- ab ------→ 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 |
261 | 31 open Product |
32 open Pullback | |
33 | |
282 | 34 pullback-from : (a b c ab d : Obj A) |
260 | 35 ( f : Hom A a c ) ( g : Hom A b c ) |
261 | 36 ( π1 : Hom A ab a ) ( π2 : Hom A ab b ) ( e : Hom A d ab ) |
443 | 37 ( eqa : {a b c : Obj A} → (f g : Hom A a b) → {e : Hom A c a } → IsEqualizer A e f g ) |
282 | 38 ( prod : Product A a b ab π1 π2 ) → Pullback A a b c d f g |
443 | 39 ( A [ π1 o equalizer1 ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) ) ] ) |
40 ( A [ π2 o equalizer1 ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) ) ] ) | |
261 | 41 pullback-from a b c ab d f g π1 π2 e eqa prod = record { |
260 | 42 commute = commute1 ; |
282 | 43 p = p1 ; |
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 |
282 | 47 } where |
443 | 48 commute1 : A [ A [ f o A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] ] |
49 ≈ A [ g o A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] ] ] | |
262 | 50 commute1 = let open ≈-Reasoning (A) in |
51 begin | |
443 | 52 f o ( π1 o equalizer1 (eqa ( f o π1 ) ( g o π2 )) ) |
262 | 53 ≈⟨ assoc ⟩ |
443 | 54 ( f o π1 ) o equalizer1 (eqa ( f o π1 ) ( g o π2 )) |
262 | 55 ≈⟨ fe=ge (eqa (A [ f o π1 ]) (A [ g o π2 ])) ⟩ |
443 | 56 ( g o π2 ) o equalizer1 (eqa ( f o π1 ) ( g o π2 )) |
262 | 57 ≈↑⟨ assoc ⟩ |
443 | 58 g o ( π2 o equalizer1 (eqa ( f o π1 ) ( g o π2 )) ) |
262 | 59 ∎ |
282 | 60 lemma1 : {d' : Obj A} {π1' : Hom A d' a} {π2' : Hom A d' b} → A [ A [ f o π1' ] ≈ A [ g o π2' ] ] → |
262 | 61 A [ A [ A [ f o π1 ] o (prod × π1') π2' ] ≈ A [ A [ g o π2 ] o (prod × π1') π2' ] ] |
282 | 62 lemma1 {d'} { π1' } { π2' } eq = let open ≈-Reasoning (A) in |
262 | 63 begin |
64 ( f o π1 ) o (prod × π1') π2' | |
65 ≈↑⟨ assoc ⟩ | |
66 f o ( π1 o (prod × π1') π2' ) | |
67 ≈⟨ cdr (π1fxg=f prod) ⟩ | |
68 f o π1' | |
69 ≈⟨ eq ⟩ | |
70 g o π2' | |
71 ≈↑⟨ cdr (π2fxg=g prod) ⟩ | |
72 g o ( π2 o (prod × π1') π2' ) | |
73 ≈⟨ assoc ⟩ | |
74 ( g o π2 ) o (prod × π1') π2' | |
75 ∎ | |
261 | 76 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 | 77 p1 {d'} { π1' } { π2' } eq = |
262 | 78 let open ≈-Reasoning (A) in k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod π1' π2' ) ( lemma1 eq ) |
282 | 79 π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' ] ]} → |
443 | 80 A [ A [ A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ] o p1 eq ] ≈ π1' ] |
262 | 81 π1p=π11 {d'} {π1'} {π2'} {eq} = let open ≈-Reasoning (A) in |
82 begin | |
443 | 83 ( π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ) o p1 eq |
262 | 84 ≈⟨⟩ |
85 ( π1 o e) o k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod π1' π2' ) (lemma1 eq) | |
86 ≈↑⟨ assoc ⟩ | |
87 π1 o ( e o k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod π1' π2' ) (lemma1 eq) ) | |
88 ≈⟨ cdr ( ek=h ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} )) ⟩ | |
282 | 89 π1 o (_×_ prod π1' π2' ) |
262 | 90 ≈⟨ π1fxg=f prod ⟩ |
91 π1' | |
92 ∎ | |
282 | 93 π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' ] ]} → |
443 | 94 A [ A [ A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ] o p1 eq ] ≈ π2' ] |
262 | 95 π2p=π21 {d'} {π1'} {π2'} {eq} = let open ≈-Reasoning (A) in |
96 begin | |
443 | 97 ( π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ]) {e} ) ) o p1 eq |
262 | 98 ≈⟨⟩ |
99 ( π2 o e) o k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod π1' π2' ) (lemma1 eq) | |
100 ≈↑⟨ assoc ⟩ | |
101 π2 o ( e o k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod π1' π2' ) (lemma1 eq) ) | |
102 ≈⟨ cdr ( ek=h ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} )) ⟩ | |
282 | 103 π2 o (_×_ prod π1' π2' ) |
262 | 104 ≈⟨ π2fxg=g prod ⟩ |
105 π2' | |
106 ∎ | |
302 | 107 uniqueness1 : {d₁ : Obj A} (p' : Hom A d₁ d) {π1' : Hom A d₁ a} {π2' : Hom A d₁ b} |
108 {eq : A [ A [ f o π1' ] ≈ A [ g o π2' ] ]} → | |
443 | 109 {eq1 : A [ A [ A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π1' ]} → |
110 {eq2 : A [ A [ A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ] ≈ π2' ]} → | |
261 | 111 A [ p1 eq ≈ p' ] |
264 | 112 uniqueness1 {d'} p' {π1'} {π2'} {eq} {eq1} {eq2} = let open ≈-Reasoning (A) in |
263 | 113 begin |
114 p1 eq | |
115 ≈⟨⟩ | |
116 k ( eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e} ) (_×_ prod π1' π2' ) (lemma1 eq) | |
443 | 117 ≈⟨ IsEqualizer.uniqueness (eqa ( A [ f o π1 ] ) ( A [ g o π2 ] ) {e}) ( begin |
264 | 118 e o p' |
119 ≈⟨⟩ | |
443 | 120 equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p' |
264 | 121 ≈↑⟨ Product.uniqueness prod ⟩ |
443 | 122 (prod × ( π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p') ) ( π2 o (equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) o p')) |
264 | 123 ≈⟨ ×-cong prod (assoc) (assoc) ⟩ |
443 | 124 (prod × (A [ A [ π1 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ])) |
125 (A [ A [ π2 o equalizer1 (eqa (A [ f o π1 ]) (A [ g o π2 ])) ] o p' ]) | |
264 | 126 ≈⟨ ×-cong prod eq1 eq2 ⟩ |
127 ((prod × π1') π2') | |
128 ∎ ) ⟩ | |
263 | 129 p' |
130 ∎ | |
131 | |
266 | 132 -------------------------------- |
133 -- | |
134 -- If we have two limits on c and c', there are isomorphic pair h, h' | |
135 | |
136 open Limit | |
487 | 137 open IsLimit |
312
702adc45704f
is this right direction?
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
303
diff
changeset
|
138 open NTrans |
266 | 139 |
140 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
|
141 ( 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
|
142 → Hom A (a0 lim )(a0 lim') |
487 | 143 iso-l I Γ lim lim' = limit (isLimit lim') (a0 lim) ( t0 lim) |
266 | 144 |
145 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
|
146 ( 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
|
147 → Hom A (a0 lim') (a0 lim) |
487 | 148 iso-r I Γ lim lim' = limit (isLimit lim) (a0 lim') (t0 lim') |
266 | 149 |
150 | |
151 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
|
152 ( 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
|
153 ∀{ 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
|
154 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
|
155 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
|
156 ≈⟨⟩ |
487 | 157 limit (isLimit lim') (a0 lim) ( t0 lim) o limit (isLimit lim) (a0 lim') (t0 lim') |
495 | 158 ≈↑⟨ limit-uniqueness (isLimit lim') ( λ {i} → ( begin |
487 | 159 TMap (t0 lim') i o ( limit (isLimit lim') (a0 lim) (t0 lim) o limit (isLimit lim) (a0 lim') (t0 lim') ) |
266 | 160 ≈⟨ assoc ⟩ |
487 | 161 ( TMap (t0 lim') i o limit (isLimit lim') (a0 lim) (t0 lim) ) o limit (isLimit lim) (a0 lim') (t0 lim') |
162 ≈⟨ car ( t0f=t (isLimit lim') ) ⟩ | |
163 TMap (t0 lim) i o limit (isLimit lim) (a0 lim') (t0 lim') | |
164 ≈⟨ 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
|
165 TMap (t0 lim') i |
271 | 166 ∎) ) ⟩ |
487 | 167 limit (isLimit lim') (a0 lim') (t0 lim') |
495 | 168 ≈⟨ 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
|
169 id (a0 lim' ) |
266 | 170 ∎ |
171 | |
172 | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
173 |
282 | 174 open import CatExponetial |
267 | 175 |
176 open Functor | |
177 | |
178 -------------------------------- | |
179 -- | |
363 | 180 -- Constancy Functor |
266 | 181 |
268 | 182 KI : { c₁' c₂' ℓ' : Level} ( I : Category c₁' c₂' ℓ' ) → Functor A ( A ^ I ) |
183 KI { c₁'} {c₂'} {ℓ'} I = record { | |
291 | 184 FObj = λ a → K A I a ; |
185 FMap = λ f → record { -- NTrans I A (K A I a) (K A I b) | |
267 | 186 TMap = λ a → f ; |
282 | 187 isNTrans = record { |
267 | 188 commute = λ {a b f₁} → commute1 {a} {b} {f₁} f |
189 } | |
282 | 190 } ; |
266 | 191 isFunctor = let open ≈-Reasoning (A) in record { |
267 | 192 ≈-cong = λ f=g {x} → f=g |
266 | 193 ; identity = refl-hom |
267 | 194 ; distr = refl-hom |
266 | 195 } |
267 | 196 } where |
197 commute1 : {a b : Obj I} {f₁ : Hom I a b} → {a' b' : Obj A} → (f : Hom A a' b' ) → | |
291 | 198 A [ A [ FMap (K A I b') f₁ o f ] ≈ A [ f o FMap (K A I a') f₁ ] ] |
282 | 199 commute1 {a} {b} {f₁} {a'} {b'} f = let open ≈-Reasoning (A) in begin |
291 | 200 FMap (K A I b') f₁ o f |
267 | 201 ≈⟨ idL ⟩ |
202 f | |
203 ≈↑⟨ idR ⟩ | |
291 | 204 f o FMap (K A I a') f₁ |
267 | 205 ∎ |
206 | |
207 | |
272 | 208 --------- |
209 -- | |
298 | 210 -- Limit Constancy Functor F : A → A^I has right adjoint |
211 -- | |
212 -- we are going to prove universal mapping | |
213 | |
214 --------- | |
215 -- | |
272 | 216 -- limit gives co universal mapping ( i.e. adjunction ) |
217 -- | |
218 -- F = KI I : Functor A (A ^ I) | |
282 | 219 -- U = λ b → A0 (lim b {a0 b} {t0 b} |
220 -- ε = λ b → T0 ( lim b {a0 b} {t0 b} ) | |
475 | 221 -- |
222 -- a0 : Obj A and t0 : NTrans K Γ come from the limit | |
272 | 223 |
282 | 224 limit2couniv : |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
225 ( 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
|
226 → ( aΓ : ( Γ : Functor I A ) → Obj A ) ( tΓ : ( Γ : Functor I A ) → NTrans I A ( K A I (aΓ Γ) ) Γ ) |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
227 → coUniversalMapping A ( A ^ I ) (KI I) (λ b → a0 ( lim b) ) ( λ b → t0 (lim b) ) |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
228 limit2couniv lim aΓ tΓ = record { -- F U ε |
487 | 229 _*' = λ {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
|
230 iscoUniversalMapping = record { |
282 | 231 couniversalMapping = λ{ b a f} → couniversalMapping1 {b} {a} {f} ; |
271 | 232 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
|
233 } |
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
|
234 } 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
|
235 couniversalMapping1 : {b : Obj (A ^ I)} {a : Obj A} {f : Hom (A ^ I) (FObj (KI I) a) b} → |
487 | 236 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
|
237 couniversalMapping1 {b} {a} {f} {i} = let open ≈-Reasoning (A) in begin |
487 | 238 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
|
239 ≈⟨⟩ |
487 | 240 TMap (t0 (lim b)) i o (limit (isLimit (lim b)) a f) |
241 ≈⟨ 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
|
242 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
|
243 ∎ |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
244 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
|
245 ( ∀ { i : Obj I } → A [ A [ TMap (t0 (lim b )) i o TMap ( FMap (KI I) g) i ] ≈ TMap f i ] ) |
487 | 246 → A [ limit (isLimit (lim b )) a f ≈ g ] |
271 | 247 couniquness2 {b} {a} {f} {g} lim-g=f = let open ≈-Reasoning (A) in begin |
487 | 248 limit (isLimit (lim b )) a f |
495 | 249 ≈⟨ 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
|
250 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
|
251 ∎ |
268 | 252 |
272 | 253 open import Category.Cat |
275 | 254 |
255 | |
278 | 256 open coUniversalMapping |
282 | 257 |
258 univ2limit : | |
259 ( U : Obj (A ^ I ) → Obj A ) | |
291 | 260 ( ε : ( b : Obj (A ^ I ) ) → NTrans I A (K A I (U b)) b ) |
279
8df8e74e6316
limit and prod/equalizer
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
278
diff
changeset
|
261 ( 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
|
262 ( Γ : Functor I A ) → Limit A I Γ |
278 | 263 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
|
264 a0 = U Γ ; |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
265 t0 = ε Γ ; |
487 | 266 isLimit = record { |
267 limit = λ a t → limit1 a t ; | |
268 t0f=t = λ {a t i } → t0f=t1 {a} {t} {i} ; | |
495 | 269 limit-uniqueness = λ {a} {t} {f} t=f → limit-uniqueness1 {a} {t} {f} t=f |
487 | 270 } |
272 | 271 } where |
291 | 272 limit1 : (a : Obj A) → NTrans I A (K A I a) Γ → Hom A a (U Γ) |
282 | 273 limit1 a t = _*' univ {_} {a} t |
291 | 274 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
|
275 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
|
276 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
|
277 TMap (ε Γ) i o limit1 a t |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
278 ≈⟨⟩ |
280 | 279 TMap (ε Γ) i o _*' univ {Γ} {a} t |
280 ≈⟨ coIsUniversalMapping.couniversalMapping ( iscoUniversalMapping univ) {Γ} {a} {t} ⟩ | |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
281 TMap t i |
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
282 ∎ |
291 | 283 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
|
284 → ( ∀ { 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
|
285 limit-uniqueness1 {a} {t} {f} εf=t = let open ≈-Reasoning (A) in begin |
278 | 286 _*' univ t |
287 ≈⟨ ( coIsUniversalMapping.couniquness ( iscoUniversalMapping univ) ) εf=t ⟩ | |
274
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
288 f |
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
289 ∎ |
1b651faa2391
adjoint2limit problems are written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
273
diff
changeset
|
290 |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
291 |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
292 lemma-p0 : (a b ab : Obj A) ( π1 : Hom A ab a ) ( π2 : Hom A ab b ) ( prod : Product A a b ab π1 π2 ) → |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
293 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
|
294 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
|
295 _×_ prod π1 π2 |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
296 ≈↑⟨ ×-cong prod idR idR ⟩ |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
297 _×_ prod (A [ π1 o id1 A ab ]) (A [ π2 o id1 A ab ]) |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
298 ≈⟨ Product.uniqueness prod ⟩ |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
299 id1 A ab |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
300 ∎ |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
301 |
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
302 |
282 | 303 open IProduct |
508
3ce21b2a671a
IProduct is written in Sets
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
495
diff
changeset
|
304 open IsIProduct |
283 | 305 open Equalizer |
281
dbd2044add2a
limit from product and equalizer continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
280
diff
changeset
|
306 |
282 | 307 -- |
308 -- limit from equalizer and product | |
309 -- | |
310 -- | |
283 | 311 -- ai |
312 -- ^ K f = id lim | |
300 | 313 -- | pi lim = K i -----------→ K j = lim |
283 | 314 -- | | | |
315 -- p | | | |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
316 -- ^ proj i o e = ε i | | ε j = proj j o e |
283 | 317 -- | | | |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
318 -- | e = equalizer (id p) (id p) | | |
283 | 319 -- | v v |
300 | 320 -- lim <------------------ d' a i = Γ i -----------→ Γ j = a j |
283 | 321 -- k ( product pi ) Γ f |
322 -- Γ f o ε i = ε j | |
323 -- | |
291 | 324 |
283 | 325 limit-ε : |
443 | 326 ( eqa : {a b c : Obj A} → (e : Hom A c a ) → (f g : Hom A a b) → IsEqualizer A e f g ) |
282 | 327 ( lim p : Obj A ) ( e : Hom A lim p ) |
328 ( proj : (i : Obj I ) → Hom A p (FObj Γ i) ) → | |
291 | 329 NTrans I A (K A I lim) Γ |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
330 limit-ε eqa lim p e proj = record { |
282 | 331 TMap = tmap ; |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
332 isNTrans = record { commute = commute1 } |
281
dbd2044add2a
limit from product and equalizer continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
280
diff
changeset
|
333 } where |
291 | 334 tmap : (i : Obj I) → Hom A (FObj (K A I lim) i) (FObj Γ i) |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
335 tmap i = A [ proj i o e ] |
283 | 336 commute1 : {i j : Obj I} {f : Hom I i j} → |
291 | 337 A [ A [ FMap Γ f o tmap i ] ≈ A [ tmap j o FMap (K A I lim) f ] ] |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
338 commute1 {i} {j} {f} = let open ≈-Reasoning (A) in begin |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
339 FMap Γ f o tmap i |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
340 ≈⟨⟩ |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
341 FMap Γ f o ( proj i o e ) |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
342 ≈⟨ assoc ⟩ |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
343 ( FMap Γ f o proj i ) o e |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
344 ≈⟨ fe=ge ( eqa e (FMap Γ f o proj i) ( proj j )) ⟩ |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
345 proj j o e |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
346 ≈↑⟨ idR ⟩ |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
347 (proj j o e ) o id1 A lim |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
348 ≈⟨⟩ |
291 | 349 tmap j o FMap (K A I lim) f |
288 | 350 ∎ |
281
dbd2044add2a
limit from product and equalizer continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
280
diff
changeset
|
351 |
282 | 352 limit-from : |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
353 ( prod : (p : Obj A) ( ai : Obj I → Obj A ) ( pi : (i : Obj I) → Hom A p ( ai i ) ) |
508
3ce21b2a671a
IProduct is written in Sets
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
495
diff
changeset
|
354 → IsIProduct {c₁'} A (Obj I) p ai pi ) |
443 | 355 ( eqa : {a b c : Obj A} → (e : Hom A c a ) → (f g : Hom A a b) → IsEqualizer A e f g ) |
290 | 356 ( lim p : Obj A ) -- limit to be made |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
357 ( e : Hom A lim p ) -- existing of equalizer |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
358 ( proj : (i : Obj I ) → Hom A p (FObj Γ i) ) -- existing of product ( projection actually ) |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
359 → Limit A I Γ |
290 | 360 limit-from prod eqa lim p e proj = record { |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
361 a0 = lim ; |
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
362 t0 = limit-ε eqa lim p e proj ; |
487 | 363 isLimit = record { |
364 limit = λ a t → limit1 a t ; | |
365 t0f=t = λ {a t i } → t0f=t1 {a} {t} {i} ; | |
495 | 366 limit-uniqueness = λ {a} {t} {f} t=f → limit-uniqueness1 {a} {t} {f} t=f |
487 | 367 } |
282 | 368 } where |
291 | 369 limit1 : (a : Obj A) → NTrans I A (K A I a) Γ → Hom A a lim |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
370 limit1 a t = let open ≈-Reasoning (A) in k (eqa e (id1 A p) (id1 A p )) (iproduct ( prod p (FObj Γ) proj ) (TMap t) ) refl-hom |
291 | 371 t0f=t1 : {a : Obj A} {t : NTrans I A (K A I a) Γ} {i : Obj I} → |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
372 A [ A [ TMap (limit-ε eqa lim p e proj ) i o limit1 a t ] ≈ TMap t i ] |
283 | 373 t0f=t1 {a} {t} {i} = let open ≈-Reasoning (A) in begin |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
374 TMap (limit-ε eqa lim p e proj ) i o limit1 a t |
283 | 375 ≈⟨⟩ |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
376 ( ( proj i ) o e ) o k (eqa e (id1 A p) (id1 A p )) (iproduct ( prod p (FObj Γ) proj ) (TMap t) ) refl-hom |
283 | 377 ≈↑⟨ assoc ⟩ |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
378 proj i o ( e o k (eqa e (id1 A p) (id1 A p )) (iproduct ( prod p (FObj Γ) proj ) (TMap t) ) refl-hom ) |
283 | 379 ≈⟨ cdr ( ek=h ( eqa e (id1 A p) (id1 A p ) ) ) ⟩ |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
380 proj i o iproduct (prod p (FObj Γ) proj) (TMap t) |
283 | 381 ≈⟨ pif=q (prod p (FObj Γ) proj) (TMap t) ⟩ |
382 TMap t i | |
383 ∎ | |
291 | 384 limit-uniqueness1 : {a : Obj A} {t : NTrans I A (K A I a) Γ} {f : Hom A a lim} |
303
7f40d6a51c72
Limit form equalizer and product done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
302
diff
changeset
|
385 → ({i : Obj I} → A [ A [ TMap (limit-ε eqa lim p e proj ) i o f ] ≈ TMap t i ]) → |
282 | 386 A [ limit1 a t ≈ f ] |
283 | 387 limit-uniqueness1 {a} {t} {f} lim=t = let open ≈-Reasoning (A) in begin |
388 limit1 a t | |
389 ≈⟨⟩ | |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
390 k (eqa e (id1 A p) (id1 A p )) (iproduct ( prod p (FObj Γ) proj ) (TMap t) ) refl-hom |
443 | 391 ≈⟨ IsEqualizer.uniqueness (eqa e (id1 A p) (id1 A p )) ( begin |
283 | 392 e o f |
393 ≈↑⟨ ip-uniqueness (prod p (FObj Γ) proj) ⟩ | |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
394 iproduct (prod p (FObj Γ) proj) (λ i → ( proj i o ( e o f ) ) ) |
284 | 395 ≈⟨ ip-cong (prod p (FObj Γ) proj) ( λ i → begin |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
396 proj i o ( e o f ) |
284 | 397 ≈⟨ assoc ⟩ |
285
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
398 ( proj i o e ) o f |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
399 ≈⟨ lim=t {i} ⟩ |
46d4ad55b948
commutativity continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
284
diff
changeset
|
400 TMap t i |
284 | 401 ∎ ) ⟩ |
468
c375d8f93a2c
discrete category and product from a limit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
443
diff
changeset
|
402 iproduct (prod p (FObj Γ) proj) (TMap t) |
283 | 403 ∎ ) ⟩ |
404 f | |
405 ∎ | |
406 | |
291 | 407 ---- |
408 -- | |
409 -- Adjoint functor preserves limits | |
410 -- | |
411 -- | |
412 | |
413 open import Category.Cat | |
414 | |
415 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
|
416 ( lim : Obj B ) ( tb : NTrans I B ( K B I lim ) Γ ) → |
291 | 417 ( 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
|
418 ta1 B Γ lim tb U = record { |
291 | 419 TMap = TMap (Functor*Nat I A U tb) ; |
420 isNTrans = record { commute = λ {a} {b} {f} → let open ≈-Reasoning (A) in begin | |
421 FMap (U ○ Γ) f o TMap (Functor*Nat I A U tb) a | |
422 ≈⟨ nat ( Functor*Nat I A U tb ) ⟩ | |
423 TMap (Functor*Nat I A U tb) b o FMap (U ○ K B I lim) f | |
424 ≈⟨ cdr (IsFunctor.identity (isFunctor U) ) ⟩ | |
425 TMap (Functor*Nat I A U tb) b o FMap (K A I (FObj U lim)) f | |
426 ∎ | |
427 } } | |
428 | |
429 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
|
430 { c₁' c₂' ℓ' : Level} (B : Category c₁' c₂' ℓ') ( Γ : Functor I B ) ( limitb : Limit B I Γ ) → |
291 | 431 { U : Functor B A } { F : Functor A B } |
293 | 432 { η : NTrans A A identityFunctor ( U ○ F ) } |
291 | 433 { ε : 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
|
434 ( 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
|
435 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
|
436 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
|
437 t0 = ta1 B Γ lim tb U ; |
487 | 438 isLimit = record { |
439 limit = λ a t → limit1 a t ; | |
440 t0f=t = λ {a t i } → t0f=t1 {a} {t} {i} ; | |
495 | 441 limit-uniqueness = λ {a} {t} {f} t=f → limit-uniqueness1 {a} {t} {f} t=f |
487 | 442 } |
291 | 443 } where |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
444 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
|
445 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
|
446 lim = a0 limitb |
293 | 447 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) |
448 tfmap a t i = B [ TMap ε (FObj Γ i) o FMap F (TMap t i) ] | |
449 tF : (a : Obj A) → NTrans I A (K A I a) (U ○ Γ) → NTrans I B (K B I (FObj F a)) Γ | |
450 tF a t = record { | |
451 TMap = tfmap a t ; | |
452 isNTrans = record { commute = λ {a'} {b} {f} → let open ≈-Reasoning (B) in begin | |
453 FMap Γ f o tfmap a t a' | |
294 | 454 ≈⟨⟩ |
455 FMap Γ f o ( TMap ε (FObj Γ a') o FMap F (TMap t a')) | |
456 ≈⟨ assoc ⟩ | |
457 (FMap Γ f o TMap ε (FObj Γ a') ) o FMap F (TMap t a') | |
458 ≈⟨ car (nat ε) ⟩ | |
459 (TMap ε (FObj Γ b) o FMap (F ○ U) (FMap Γ f) ) o FMap F (TMap t a') | |
460 ≈↑⟨ assoc ⟩ | |
461 TMap ε (FObj Γ b) o ( FMap (F ○ U) (FMap Γ f) o FMap F (TMap t a') ) | |
462 ≈↑⟨ cdr ( distr F ) ⟩ | |
463 TMap ε (FObj Γ b) o ( FMap F (A [ FMap U (FMap Γ f) o TMap t a' ] ) ) | |
464 ≈⟨ cdr ( fcong F (nat t) ) ⟩ | |
465 TMap ε (FObj Γ b) o FMap F (A [ TMap t b o FMap (K A I a) f ]) | |
466 ≈⟨⟩ | |
467 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
|
468 ≈⟨ cdr ( fcong F (idR1 A)) ⟩ |
294 | 469 TMap ε (FObj Γ b) o FMap F (TMap t b ) |
470 ≈↑⟨ idR ⟩ | |
471 ( TMap ε (FObj Γ b) o FMap F (TMap t b)) o id1 B (FObj F (FObj (K A I a) b)) | |
472 ≈⟨⟩ | |
293 | 473 tfmap a t b o FMap (K B I (FObj F a)) f |
474 ∎ | |
475 } } | |
484
fcae3025d900
fix Limit pu a0 and t0 in record definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
475
diff
changeset
|
476 limit1 : (a : Obj A) → NTrans I A (K A I a) (U ○ Γ) → Hom A a (FObj U (a0 limitb) ) |
487 | 477 limit1 a t = A [ FMap U (limit (isLimit limitb) (FObj F a) (tF a t )) o TMap η a ] |
293 | 478 t0f=t1 : {a : Obj A} {t : NTrans I A (K A I a) (U ○ Γ)} {i : Obj I} → |
291 | 479 A [ A [ TMap ta i o limit1 a t ] ≈ TMap t i ] |
295 | 480 t0f=t1 {a} {t} {i} = let open ≈-Reasoning (A) in begin |
481 TMap ta i o limit1 a t | |
482 ≈⟨⟩ | |
487 | 483 FMap U ( TMap tb i ) o ( FMap U (limit (isLimit limitb) (FObj F a) (tF a t )) o TMap η a ) |
295 | 484 ≈⟨ assoc ⟩ |
487 | 485 ( FMap U ( TMap tb i ) o FMap U (limit (isLimit limitb) (FObj F a) (tF a t ))) o TMap η a |
295 | 486 ≈↑⟨ car ( distr U ) ⟩ |
487 | 487 FMap U ( B [ TMap tb i o limit (isLimit limitb) (FObj F a) (tF a t ) ] ) o TMap η a |
488 ≈⟨ car ( fcong U ( t0f=t (isLimit limitb) ) ) ⟩ | |
295 | 489 FMap U (TMap (tF a t) i) o TMap η a |
490 ≈⟨⟩ | |
491 FMap U ( B [ TMap ε (FObj Γ i) o FMap F (TMap t i) ] ) o TMap η a | |
492 ≈⟨ car ( distr U ) ⟩ | |
493 ( FMap U ( TMap ε (FObj Γ i)) o FMap U ( FMap F (TMap t i) )) o TMap η a | |
494 ≈↑⟨ assoc ⟩ | |
495 FMap U ( TMap ε (FObj Γ i) ) o ( FMap U ( FMap F (TMap t i) ) o TMap η a ) | |
496 ≈⟨ cdr ( nat η ) ⟩ | |
497 FMap U (TMap ε (FObj Γ i)) o ( TMap η (FObj U (FObj Γ i)) o FMap (identityFunctor {_} {_} {_} {A}) (TMap t i) ) | |
498 ≈⟨ assoc ⟩ | |
499 ( FMap U (TMap ε (FObj Γ i)) o TMap η (FObj U (FObj Γ i))) o TMap t i | |
500 ≈⟨ car ( IsAdjunction.adjoint1 ( Adjunction.isAdjunction adj ) ) ⟩ | |
501 id1 A (FObj (U ○ Γ) i) o TMap t i | |
502 ≈⟨ idL ⟩ | |
503 TMap t i | |
504 ∎ | |
296 | 505 -- ta = TMap (Functor*Nat I A U tb) , FMap U ( TMap tb i ) o f ≈ TMap t i |
293 | 506 limit-uniqueness1 : {a : Obj A} {t : NTrans I A (K A I a) (U ○ Γ)} {f : Hom A a (FObj U lim)} |
291 | 507 → ({i : Obj I} → A [ A [ TMap ta i o f ] ≈ TMap t i ]) → |
508 A [ limit1 a t ≈ f ] | |
295 | 509 limit-uniqueness1 {a} {t} {f} lim=t = let open ≈-Reasoning (A) in begin |
510 limit1 a t | |
511 ≈⟨⟩ | |
487 | 512 FMap U (limit (isLimit limitb) (FObj F a) (tF a t )) o TMap η a |
495 | 513 ≈⟨ car ( fcong U (limit-uniqueness (isLimit limitb) ( λ {i} → lemma1 i) )) ⟩ |
298 | 514 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
|
515 ≈⟨ car (distr U ) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
516 ( (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
|
517 ≈⟨ sym assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
518 (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
|
519 ≈⟨ cdr (nat η) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
520 (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
|
521 ≈⟨ assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
522 ((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
|
523 ≈⟨ car ( IsAdjunction.adjoint1 ( Adjunction.isAdjunction adj)) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
524 id (FObj U lim) o f |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
525 ≈⟨ idL ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
526 f |
296 | 527 ∎ where |
528 lemma1 : (i : Obj I) → B [ B [ TMap tb i o B [ TMap ε lim o FMap F f ] ] ≈ TMap (tF a t) i ] | |
529 lemma1 i = let open ≈-Reasoning (B) in begin | |
530 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
|
531 ≈⟨ assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
532 ( 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
|
533 ≈⟨ car ( nat ε ) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
534 ( 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
|
535 ≈↑⟨ assoc ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
536 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
|
537 ≈↑⟨ cdr ( distr F ) ⟩ |
537570f6a44f
limit preservation proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
296
diff
changeset
|
538 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
|
539 ≈⟨ cdr ( fcong F (lim=t {i}) ) ⟩ |
296 | 540 TMap ε (FObj Γ i) o FMap F (TMap t i) |
541 ≈⟨⟩ | |
542 TMap (tF a t) i | |
543 ∎ | |
295 | 544 |
296 | 545 |
546 |