Mercurial > hg > Members > kono > Proof > category
annotate universal-mapping.agda @ 689:fb9fc9652c04
fix again
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Nov 2017 00:53:32 +0900 |
parents | a5f2ca67e7c5 |
children | 3d41a8edbf63 |
rev | line source |
---|---|
31 | 1 module universal-mapping where |
2 | |
56 | 3 -- Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
4 | |
31 | 5 open import Category -- https://github.com/konn/category-agda |
6 open import Level | |
56 | 7 open import HomReasoning |
159 | 8 open import cat-utility |
9 open import Category.Cat | |
31 | 10 |
11 open Functor | |
32 | 12 open NTrans |
13 | |
43 | 14 -- |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
15 -- Adjunction yields solution of universal mapping |
43 | 16 -- |
17 -- | |
18 | |
56 | 19 Adj2UM : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
689 | 20 → (adj : Adjunction A B ) → UniversalMapping A B (Adjunction.U adj) (FObj (Adjunction.F adj)) (TMap (Adjunction.η adj)) |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
21 Adj2UM A B adj = record { |
43 | 22 _* = solution ; |
36 | 23 isUniversalMapping = record { |
43 | 24 universalMapping = universalMapping; |
172 | 25 uniquness = uniqueness |
36 | 26 } |
27 } where | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
28 U : Functor B A |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
29 U = Adjunction.U adj |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
30 F : Functor A B |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
31 F = Adjunction.F adj |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
32 η : NTrans A A identityFunctor ( U ○ F ) |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
33 η = Adjunction.η adj |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
34 ε : NTrans B B ( F ○ U ) identityFunctor |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
35 ε = Adjunction.ε adj |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
36 solution : { a : Obj A} { b : Obj B} → ( f : Hom A a (FObj U b) ) → Hom B (FObj F a ) b |
43 | 37 solution {_} {b} f = B [ TMap ε b o FMap F f ] |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
38 universalMapping : {a' : Obj A} { b' : Obj B } → { f : Hom A a' (FObj U b') } → |
43 | 39 A [ A [ FMap U ( solution f) o TMap η a' ] ≈ f ] |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
40 universalMapping {a} {b} {f} = |
38 | 41 let open ≈-Reasoning (A) in |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
42 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
43 FMap U ( solution f) o TMap η a |
39 | 44 ≈⟨⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
45 FMap U ( B [ TMap ε b o FMap F f ] ) o TMap η a |
66 | 46 ≈⟨ car (distr U ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
47 ( (FMap U (TMap ε b)) o (FMap U ( FMap F f )) ) o TMap η a |
40
c34b1cfe9fdc
Adjunction to Universal Mapping end
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
39
diff
changeset
|
48 ≈⟨ sym assoc ⟩ |
c34b1cfe9fdc
Adjunction to Universal Mapping end
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
39
diff
changeset
|
49 (FMap U (TMap ε b)) o ((FMap U ( FMap F f )) o TMap η a ) |
66 | 50 ≈⟨ cdr (nat η) ⟩ |
40
c34b1cfe9fdc
Adjunction to Universal Mapping end
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
39
diff
changeset
|
51 (FMap U (TMap ε b)) o ((TMap η (FObj U b )) o f ) |
c34b1cfe9fdc
Adjunction to Universal Mapping end
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
39
diff
changeset
|
52 ≈⟨ assoc ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
53 ((FMap U (TMap ε b)) o (TMap η (FObj U b))) o f |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
54 ≈⟨ car ( IsAdjunction.adjoint1 ( Adjunction.isAdjunction adj)) ⟩ |
40
c34b1cfe9fdc
Adjunction to Universal Mapping end
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
39
diff
changeset
|
55 id (FObj U b) o f |
c34b1cfe9fdc
Adjunction to Universal Mapping end
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
39
diff
changeset
|
56 ≈⟨ idL ⟩ |
38 | 57 f |
58 ∎ | |
56 | 59 lemma1 : (a : Obj A) ( b : Obj B ) ( f : Hom A a (FObj U b) ) → ( g : Hom B (FObj F a) b) → |
60 A [ A [ FMap U g o TMap η a ] ≈ f ] → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
61 B [ (FMap F (A [ FMap U g o TMap η a ] )) ≈ FMap F f ] |
44 | 62 lemma1 a b f g k = IsFunctor.≈-cong (isFunctor F) k |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
63 uniqueness : {a' : Obj A} { b' : Obj B } → { f : Hom A a' (FObj U b') } → { g : Hom B (FObj F a') b'} → |
56 | 64 A [ A [ FMap U g o TMap η a' ] ≈ f ] → B [ solution f ≈ g ] |
172 | 65 uniqueness {a} {b} {f} {g} k = let open ≈-Reasoning (B) in |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
66 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
67 solution f |
44 | 68 ≈⟨⟩ |
69 TMap ε b o FMap F f | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
70 ≈⟨ cdr (sym ( lemma1 a b f g k )) ⟩ |
44 | 71 TMap ε b o FMap F ( A [ FMap U g o TMap η a ] ) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
72 ≈⟨ cdr (distr F ) ⟩ |
45
659b8a21caf7
uniq-univeralMapping from Adjunction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
73 TMap ε b o ( FMap F ( FMap U g) o FMap F ( TMap η a ) ) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
74 ≈⟨ assoc ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
75 ( TMap ε b o FMap F ( FMap U g) ) o FMap F ( TMap η a ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
76 ≈⟨ sym ( car ( nat ε )) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
77 ( g o TMap ε ( FObj F a) ) o FMap F ( TMap η a ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
78 ≈⟨ sym assoc ⟩ |
45
659b8a21caf7
uniq-univeralMapping from Adjunction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
79 g o ( TMap ε ( FObj F a) o FMap F ( TMap η a ) ) |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
80 ≈⟨ cdr ( IsAdjunction.adjoint2 ( Adjunction.isAdjunction adj )) ⟩ |
45
659b8a21caf7
uniq-univeralMapping from Adjunction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
44
diff
changeset
|
81 g o id (FObj F a) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
82 ≈⟨ idR ⟩ |
44 | 83 g |
84 ∎ | |
85 | |
43 | 86 -- |
87 -- | |
88 -- Universal mapping yields Adjunction | |
89 -- | |
90 -- | |
91 | |
92 | |
93 -- | |
94 -- F is an functor | |
95 -- | |
96 | |
54 | 97 FunctorF : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
689 | 98 { U : Functor B A } |
99 { F : Obj A → Obj B } | |
100 { η : (a : Obj A) → Hom A a ( FObj U (F a) ) } | |
101 → UniversalMapping A B U F η → Functor A B | |
102 FunctorF A B {U} {F} {η} um = record { | |
41 | 103 FObj = F; |
42 | 104 FMap = myFMap ; |
105 isFunctor = myIsFunctor | |
41 | 106 } where |
689 | 107 _* : (UniversalMapping A B U F η ) → { a : Obj A} { b : Obj B} → ( Hom A a (FObj U b) ) → Hom B (F a ) b |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
108 _* _ = UniversalMapping._* um |
56 | 109 myFMap : {a b : Obj A} → Hom A a b → Hom B (F a) (F b) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
110 myFMap f = (_* um) (A [ η (Category.cod A f ) o f ]) |
56 | 111 lemma-id1 : {a : Obj A} → A [ A [ FMap U (id1 B (F a)) o η a ] ≈ (A [ (η a) o (id1 A a) ]) ] |
46 | 112 lemma-id1 {a} = let open ≈-Reasoning (A) in |
42 | 113 begin |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
114 FMap U (id1 B (F a)) o η a |
42 | 115 ≈⟨ ( car ( IsFunctor.identity ( isFunctor U ))) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
116 id (FObj U ( F a )) o η a |
42 | 117 ≈⟨ idL ⟩ |
118 η a | |
119 ≈⟨ sym idR ⟩ | |
46 | 120 η a o id a |
42 | 121 ∎ |
46 | 122 lemma-id : {a : Obj A} → B [ ( (_* um) (A [ (η a) o (id1 A a)] )) ≈ (id1 B (F a)) ] |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
123 lemma-id {a} = ( IsUniversalMapping.uniquness ( UniversalMapping.isUniversalMapping um ) ) lemma-id1 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
124 lemma-cong2 : (a b : Obj A) (f g : Hom A a b) → A [ f ≈ g ] → |
46 | 125 A [ A [ FMap U ((_* um) (A [ η b o g ]) ) o η a ] ≈ A [ η b o f ] ] |
126 lemma-cong2 a b f g eq = let open ≈-Reasoning (A) in | |
127 begin | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
128 ( FMap U ((_* um) (A [ η b o g ]) )) o η a |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
129 ≈⟨ ( IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um )) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
130 η b o g |
46 | 131 ≈⟨ ( IsCategory.o-resp-≈ ( Category.isCategory A ) (sym eq) (refl-hom) ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
132 η b o f |
46 | 133 ∎ |
134 lemma-cong1 : (a b : Obj A) (f g : Hom A a b) → A [ f ≈ g ] → B [ (_* um) (A [ η b o f ] ) ≈ (_* um) (A [ η b o g ]) ] | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
135 lemma-cong1 a b f g eq = ( IsUniversalMapping.uniquness ( UniversalMapping.isUniversalMapping um ) ) ( lemma-cong2 a b f g eq ) |
46 | 136 lemma-cong : {a b : Obj A} {f g : Hom A a b} → A [ f ≈ g ] → B [ myFMap f ≈ myFMap g ] |
137 lemma-cong {a} {b} {f} {g} eq = lemma-cong1 a b f g eq | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
138 lemma-distr2 : (a b c : Obj A) (f : Hom A a b) (g : Hom A b c) → |
47 | 139 A [ A [ FMap U (B [(_* um) (A [ η c o g ]) o (_* um)( A [ η b o f ]) ]) o η a ] ≈ (A [ η c o A [ g o f ] ]) ] |
140 lemma-distr2 a b c f g = let open ≈-Reasoning (A) in | |
141 begin | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
142 ( FMap U (B [(_* um) (A [ η c o g ]) o (_* um)( A [ η b o f ]) ] ) ) o η a |
66 | 143 ≈⟨ car (distr U ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
144 (( FMap U ((_* um) (A [ η c o g ])) o ( FMap U ((_* um)( A [ η b o f ])))) ) o η a |
47 | 145 ≈⟨ sym assoc ⟩ |
146 ( FMap U ((_* um) (A [ η c o g ])) o (( FMap U ((_* um)( A [ η b o f ])))) o η a ) | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
147 ≈⟨ cdr ( IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um )) ⟩ |
47 | 148 ( FMap U ((_* um) (A [ η c o g ])) o ( η b o f) ) |
149 ≈⟨ assoc ⟩ | |
150 ( FMap U ((_* um) (A [ η c o g ])) o η b) o f | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
151 ≈⟨ car ( IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um )) ⟩ |
47 | 152 ( η c o g ) o f |
153 ≈⟨ sym assoc ⟩ | |
154 η c o ( g o f ) | |
155 ∎ | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
156 lemma-distr1 : (a b c : Obj A) (f : Hom A a b) (g : Hom A b c) → |
47 | 157 B [ (_* um) (A [ η c o A [ g o f ] ]) ≈ (B [(_* um) (A [ η c o g ]) o (_* um)( A [ η b o f ]) ] )] |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
158 lemma-distr1 a b c f g = ( IsUniversalMapping.uniquness ( UniversalMapping.isUniversalMapping um )) (lemma-distr2 a b c f g ) |
47 | 159 lemma-distr : {a b c : Obj A} {f : Hom A a b} {g : Hom A b c} → B [ myFMap (A [ g o f ]) ≈ (B [ myFMap g o myFMap f ] )] |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
160 lemma-distr {a} {b} {c} {f} {g} = lemma-distr1 a b c f g |
42 | 161 myIsFunctor : IsFunctor A B F myFMap |
162 myIsFunctor = | |
46 | 163 record { ≈-cong = lemma-cong |
42 | 164 ; identity = lemma-id |
47 | 165 ; distr = lemma-distr |
42 | 166 } |
41 | 167 |
48 | 168 -- |
169 -- naturality of η | |
170 -- | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
171 nat-η : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
689 | 172 { U : Functor B A } |
173 { F : Obj A → Obj B } | |
174 { η : (a : Obj A) → Hom A a ( FObj U (F a) ) } | |
175 → (um : UniversalMapping A B U F η ) → | |
176 NTrans A A identityFunctor ( U ○ FunctorF A B um ) | |
177 nat-η A B {U} {F} { η} um = record { | |
48 | 178 TMap = η ; isNTrans = myIsNTrans |
179 } where | |
180 F' : Functor A B | |
54 | 181 F' = FunctorF A B um |
689 | 182 _* : (UniversalMapping A B U F η ) → { a : Obj A} { b : Obj B} → ( Hom A a (FObj U b) ) → Hom B (F a ) b |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
183 _* _ = UniversalMapping._* um |
130 | 184 commute : {a b : Obj A} {f : Hom A a b} |
48 | 185 → A [ A [ (FMap U (FMap F' f)) o ( η a ) ] ≈ A [ (η b ) o f ] ] |
130 | 186 commute {a} {b} {f} = let open ≈-Reasoning (A) in |
49 | 187 begin |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
188 (FMap U (FMap F' f)) o ( η a ) |
49 | 189 ≈⟨⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
190 (FMap U ((_* um) (A [ η b o f ]))) o ( η a ) |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
191 ≈⟨ (IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um )) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
192 (η b ) o f |
49 | 193 ∎ |
48 | 194 myIsNTrans : IsNTrans A A identityFunctor ( U ○ F' ) η |
130 | 195 myIsNTrans = record { commute = commute } |
49 | 196 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
197 nat-ε : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
689 | 198 { U : Functor B A } |
199 { F : Obj A → Obj B } | |
200 { η : (a : Obj A) → Hom A a ( FObj U (F a) ) } | |
201 → (um : UniversalMapping A B U F η ) → | |
202 NTrans B B ( FunctorF A B um ○ U ) identityFunctor | |
203 nat-ε A B {U} {F} { η} um = record { | |
49 | 204 TMap = ε ; isNTrans = myIsNTrans |
205 } where | |
206 F' : Functor A B | |
54 | 207 F' = FunctorF A B um |
689 | 208 _* : (UniversalMapping A B U F η ) → { a : Obj A} { b : Obj B} → ( Hom A a (FObj U b) ) → Hom B (F a ) b |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
209 _* _ = UniversalMapping._* um |
56 | 210 ε : ( b : Obj B ) → Hom B ( FObj F' ( FObj U b) ) b |
49 | 211 ε b = (_* um) ( id1 A (FObj U b)) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
212 lemma-nat1 : (a b : Obj B) (f : Hom B a b ) → |
51 | 213 A [ A [ FMap U ( B [ (um *) (id1 A (FObj U b)) o ((um *) (A [ η (FObj U b) o FMap U f ])) ] ) o η (FObj U a) ] |
214 ≈ A [ FMap U f o id1 A (FObj U a) ] ] | |
215 lemma-nat1 a b f = let open ≈-Reasoning (A) in | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
216 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
217 FMap U ( B [ (um *) (id1 A (FObj U b)) o ((um *) ( η (FObj U b) o FMap U f )) ] ) o η (FObj U a) |
66 | 218 ≈⟨ car ( distr U ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
219 ( FMap U ((um *) (id1 A (FObj U b))) o FMap U ((um *) ( η (FObj U b) o FMap U f )) ) o η (FObj U a) |
51 | 220 ≈⟨ sym assoc ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
221 FMap U ((um *) (id1 A (FObj U b))) o ( FMap U ((um *) ( η (FObj U b) o FMap U f ))) o η (FObj U a) |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
222 ≈⟨ cdr ((IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um )) ) ⟩ |
51 | 223 FMap U ((um *) (id1 A (FObj U b))) o ( η (FObj U b) o FMap U f ) |
224 ≈⟨ assoc ⟩ | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
225 (FMap U ((um *) (id1 A (FObj U b))) o η (FObj U b)) o FMap U f |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
226 ≈⟨ car ((IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um )) ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
227 id1 A (FObj U b) o FMap U f |
51 | 228 ≈⟨ idL ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
229 FMap U f |
51 | 230 ≈⟨ sym idR ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
231 FMap U f o id (FObj U a) |
51 | 232 ∎ |
56 | 233 lemma-nat2 : (a b : Obj B) (f : Hom B a b ) → A [ A [ FMap U ( B [ f o ((um *) (id1 A (FObj U a ))) ] ) o η (FObj U a) ] |
52 | 234 ≈ A [ FMap U f o id1 A (FObj U a) ] ] |
235 lemma-nat2 a b f = let open ≈-Reasoning (A) in | |
236 begin | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
237 FMap U ( B [ f o ((um *) (id1 A (FObj U a ))) ]) o η (FObj U a) |
66 | 238 ≈⟨ car ( distr U ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
239 (FMap U f o FMap U ((um *) (id1 A (FObj U a )))) o η (FObj U a) |
52 | 240 ≈⟨ sym assoc ⟩ |
241 FMap U f o ( FMap U ((um *) (id1 A (FObj U a ))) o η (FObj U a) ) | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
242 ≈⟨ cdr ( IsUniversalMapping.universalMapping ( UniversalMapping.isUniversalMapping um)) ⟩ |
52 | 243 FMap U f o id (FObj U a ) |
244 ∎ | |
130 | 245 commute : {a b : Obj B} {f : Hom B a b } |
49 | 246 → B [ B [ f o (ε a) ] ≈ B [(ε b) o (FMap F' (FMap U f)) ] ] |
130 | 247 commute {a} {b} {f} = let open ≈-Reasoning (B) in |
49 | 248 sym ( begin |
249 ε b o (FMap F' (FMap U f)) | |
250 ≈⟨⟩ | |
50 | 251 ε b o ((_* um) (A [ η (FObj U b) o (FMap U f) ])) |
252 ≈⟨⟩ | |
253 ((_* um) ( id1 A (FObj U b))) o ((_* um) (A [ η (FObj U b) o (FMap U f) ])) | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
254 ≈⟨ sym ( ( IsUniversalMapping.uniquness ( UniversalMapping.isUniversalMapping um ) (lemma-nat1 a b f))) ⟩ |
51 | 255 (_* um) ( A [ FMap U f o id1 A (FObj U a) ] ) |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
256 ≈⟨ (IsUniversalMapping.uniquness ( UniversalMapping.isUniversalMapping um ) (lemma-nat2 a b f)) ⟩ |
50 | 257 f o ((_* um) ( id1 A (FObj U a))) |
258 ≈⟨⟩ | |
49 | 259 f o (ε a) |
260 ∎ ) | |
261 myIsNTrans : IsNTrans B B ( F' ○ U ) identityFunctor ε | |
130 | 262 myIsNTrans = record { commute = commute } |
53 | 263 |
264 ------ | |
265 -- | |
266 -- Adjunction Construction from Universal Mapping | |
267 -- | |
268 ----- | |
269 | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
270 UMAdjunction : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') → |
689 | 271 ( U : Functor B A ) |
272 ( F' : Obj A → Obj B ) | |
273 ( η' : (a : Obj A) → Hom A a ( FObj U (F' a) ) ) → | |
274 (um : UniversalMapping A B U F' η' ) → | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
275 Adjunction A B |
689 | 276 UMAdjunction A B U F' η' um = record { |
277 U = U ; | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
278 F = FunctorF A B um ; |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
279 η = nat-η A B um ; |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
280 ε = nat-ε A B um ; |
53 | 281 isAdjunction = record { |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
282 adjoint1 = adjoint1 ; |
53 | 283 adjoint2 = adjoint2 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
284 } |
53 | 285 } where |
286 F : Functor A B | |
54 | 287 F = FunctorF A B um |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
288 η : NTrans A A identityFunctor ( U ○ F ) |
54 | 289 η = nat-η A B um |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
290 ε : NTrans B B ( F ○ U ) identityFunctor |
54 | 291 ε = nat-ε A B um |
689 | 292 _* : UniversalMapping A B U F' η' → { a : Obj A}{ b : Obj B} → ( Hom A a (FObj U b) ) → Hom B (FObj F a ) b |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
293 _* _ = UniversalMapping._* um |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
294 isUniversalMapping = UniversalMapping.isUniversalMapping |
56 | 295 adjoint1 : { b : Obj B } → |
53 | 296 A [ A [ ( FMap U ( TMap ε b )) o ( TMap η ( FObj U b )) ] ≈ id1 A (FObj U b) ] |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
297 adjoint1 {b} = let open ≈-Reasoning (A) in |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
298 begin |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
299 FMap U ( TMap ε b ) o TMap η ( FObj U b ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
300 ≈⟨⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
301 FMap U ((_* um) ( id1 A (FObj U b))) o η' ( FObj U b ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
302 ≈⟨ IsUniversalMapping.universalMapping ( isUniversalMapping um ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
303 id (FObj U b) |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
304 ∎ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
305 lemma-adj1 : (a : Obj A) → |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
306 A [ A [ FMap U ((B [((_* um) ( id1 A (FObj U ( FObj F a )))) o (_* um) (A [ η' (FObj U ( FObj F a )) o ( η' a ) ]) ])) o η' a ] |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
307 ≈ (η' a) ] |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
308 lemma-adj1 a = let open ≈-Reasoning (A) in |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
309 begin |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
310 FMap U ((B [((_* um) ( id1 A (FObj U ( FObj F a )))) o (_* um) (A [ η' (FObj U ( FObj F a )) o ( η' a ) ]) ])) o η' a |
66 | 311 ≈⟨ car (distr U) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
312 (FMap U ((_* um) ( id1 A (FObj U ( FObj F a)))) o FMap U ((_* um) (A [ η' (FObj U ( FObj F a )) o ( η' a ) ]))) o η' a |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
313 ≈⟨ sym assoc ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
314 FMap U ((_* um) ( id1 A (FObj U ( FObj F a)))) o ( FMap U ((_* um) (A [ η' (FObj U ( FObj F a )) o ( η' a ) ])) o η' a ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
315 ≈⟨ cdr (IsUniversalMapping.universalMapping ( isUniversalMapping um)) ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
316 FMap U ((_* um) ( id1 A (FObj U ( FObj F a)))) o ( η' (FObj U ( FObj F a )) o ( η' a ) ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
317 ≈⟨ assoc ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
318 (FMap U ((_* um) ( id1 A (FObj U ( FObj F a)))) o ( η' (FObj U ( FObj F a )))) o ( η' a ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
319 ≈⟨ car (IsUniversalMapping.universalMapping ( isUniversalMapping um)) ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
320 id (FObj U ( FObj F a)) o ( η' a ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
321 ≈⟨ idL ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
322 η' a |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
323 ∎ |
56 | 324 lemma-adj2 : (a : Obj A) → A [ A [ FMap U (id1 B (FObj F a)) o η' a ] ≈ η' a ] |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
325 lemma-adj2 a = let open ≈-Reasoning (A) in |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
326 begin |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
327 FMap U (id1 B (FObj F a)) o η' a |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
328 ≈⟨ car ( IsFunctor.identity ( isFunctor U)) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
329 id (FObj U (FObj F a)) o η' a |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
330 ≈⟨ idL ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
331 η' a |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
332 ∎ |
56 | 333 adjoint2 : {a : Obj A} → |
53 | 334 B [ B [ ( TMap ε ( FObj F a )) o ( FMap F ( TMap η a )) ] ≈ id1 B (FObj F a) ] |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
335 adjoint2 {a} = let open ≈-Reasoning (B) in |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
336 begin |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
337 TMap ε ( FObj F a ) o FMap F ( TMap η a ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
338 ≈⟨⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
339 ((_* um) ( id1 A (FObj U ( FObj F a )))) o (_* um) (A [ η' (FObj U ( FObj F a )) o ( η' a ) ]) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
340 ≈⟨ sym ( ( IsUniversalMapping.uniquness ( isUniversalMapping um ) (lemma-adj1 a))) ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
341 (_* um)( η' a ) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
342 ≈⟨ IsUniversalMapping.uniquness ( isUniversalMapping um ) (lemma-adj2 a) ⟩ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
343 id1 B (FObj F a) |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
344 ∎ |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
345 |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
346 |
171 | 347 ------ |
348 -- | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
349 -- Hom Set Adjunction |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
350 -- |
171 | 351 -- Hom(F(-),-) = Hom(-,U(-)) |
352 -- Unity of opposite | |
353 ----- | |
354 | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
355 -- Assuming |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
356 -- naturality of left (Φ) |
177 | 357 -- k = Hom A b b' ; f' = k o f h Hom A a' a ; f' = f o h |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
358 -- left left |
300 | 359 -- f : Hom A F(a) b -------→ f* : Hom B a U(b) f' : Hom A F(a')b ------→ f'* : Hom B a' U(b) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
360 -- | | | | |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
361 -- |k* |U(k*) |F(h*) |h* |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
362 -- v v v v |
300 | 363 -- f': Hom A F(a) b'------→ f'* : Hom B a U(b') f: Hom A F(a) b --------→ f* : Hom B a U(b) |
177 | 364 -- left left |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
365 |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
366 record UnityOfOppsite {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
367 ( U : Functor B A ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
368 ( F : Functor A B ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
369 : Set (suc (c₁ ⊔ c₂ ⊔ ℓ ⊔ c₁' ⊔ c₂' ⊔ ℓ' )) where |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
370 field |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
371 right : {a : Obj A} { b : Obj B } → Hom A a ( FObj U b ) → Hom B (FObj F a) b |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
372 left : {a : Obj A} { b : Obj B } → Hom B (FObj F a) b → Hom A a ( FObj U b ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
373 right-injective : {a : Obj A} { b : Obj B } → {f : Hom A a (FObj U b) } → A [ left ( right f ) ≈ f ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
374 left-injective : {a : Obj A} { b : Obj B } → {f : Hom B (FObj F a) b } → B [ right ( left f ) ≈ f ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
375 --- naturality of Φ |
300 | 376 left-commute1 : {a : Obj A} {b b' : Obj B } → |
377 { f : Hom B (FObj F a) b } → { k : Hom B b b' } → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
378 A [ left ( B [ k o f ] ) ≈ A [ FMap U k o left f ] ] |
300 | 379 left-commute2 : {a a' : Obj A} {b : Obj B } → |
380 { f : Hom B (FObj F a) b } → { h : Hom A a' a } → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
381 A [ left ( B [ f o FMap F h ] ) ≈ A [ left f o h ] ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
382 r-cong : {a : Obj A} { b : Obj B } → { f g : Hom A a ( FObj U b ) } → A [ f ≈ g ] → B [ right f ≈ right g ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
383 l-cong : {a : Obj A} { b : Obj B } → { f g : Hom B (FObj F a) b } → B [ f ≈ g ] → A [ left f ≈ left g ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
384 -- naturality of right (Φ-1) |
300 | 385 right-commute1 : {a : Obj A} {b b' : Obj B } → |
386 { g : Hom A a (FObj U b)} → { k : Hom B b b' } → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
387 B [ B [ k o right g ] ≈ right ( A [ FMap U k o g ] ) ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
388 right-commute1 {a} {b} {b'} {g} {k} = let open ≈-Reasoning (B) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
389 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
390 k o right g |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
391 ≈⟨ sym left-injective ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
392 right ( left ( k o right g ) ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
393 ≈⟨ r-cong left-commute1 ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
394 right ( A [ FMap U k o left ( right g ) ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
395 ≈⟨ r-cong (lemma-1 g k) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
396 right ( A [ FMap U k o g ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
397 ∎ where |
300 | 398 lemma-1 : {a : Obj A} {b b' : Obj B } → |
399 ( g : Hom A a (FObj U b)) → ( k : Hom B b b' ) → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
400 A [ A [ FMap U k o left ( right g ) ] ≈ A [ FMap U k o g ] ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
401 lemma-1 g k = let open ≈-Reasoning (A) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
402 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
403 FMap U k o left ( right g ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
404 ≈⟨ cdr ( right-injective) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
405 FMap U k o g |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
406 ∎ |
300 | 407 right-commute2 : {a a' : Obj A} {b : Obj B } → |
408 { g : Hom A a (FObj U b) } → { h : Hom A a' a } → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
409 B [ B [ right g o FMap F h ] ≈ right ( A [ g o h ] ) ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
410 right-commute2 {a} {a'} {b} {g} {h} = let open ≈-Reasoning (B) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
411 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
412 right g o FMap F h |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
413 ≈⟨ sym left-injective ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
414 right ( left ( right g o FMap F h )) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
415 ≈⟨ r-cong left-commute2 ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
416 right ( A [ left ( right g ) o h ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
417 ≈⟨ r-cong ( lemma-2 g h ) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
418 right ( A [ g o h ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
419 ∎ where |
300 | 420 lemma-2 : {a a' : Obj A} {b : Obj B } → |
421 ( g : Hom A a (FObj U b)) → ( h : Hom A a' a ) → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
422 A [ A [ left ( right g ) o h ] ≈ A [ g o h ] ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
423 lemma-2 g h = let open ≈-Reasoning (A) in car ( right-injective ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
424 |
171 | 425 Adj2UO : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
426 ( adj : Adjunction A B ) → UnityOfOppsite A B (Adjunction.U adj) (Adjunction.F adj) |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
427 Adj2UO A B adj = record { |
171 | 428 right = right ; |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
429 left = left ; |
171 | 430 right-injective = right-injective ; |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
431 left-injective = left-injective ; |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
432 left-commute1 = left-commute1 ; |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
433 left-commute2 = left-commute2 ; |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
434 r-cong = r-cong ; |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
435 l-cong = l-cong |
171 | 436 } where |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
437 U : Functor B A |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
438 U = Adjunction.U adj |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
439 F : Functor A B |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
440 F = Adjunction.F adj |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
441 η : NTrans A A identityFunctor ( U ○ F ) |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
442 η = Adjunction.η adj |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
443 ε : NTrans B B ( F ○ U ) identityFunctor |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
444 ε = Adjunction.ε adj |
171 | 445 right : {a : Obj A} { b : Obj B } → Hom A a ( FObj U b ) → Hom B (FObj F a) b |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
446 right {a} {b} f = B [ TMap ε b o FMap F f ] |
171 | 447 left : {a : Obj A} { b : Obj B } → Hom B (FObj F a) b → Hom A a ( FObj U b ) |
448 left {a} {b} f = A [ FMap U f o (TMap η a) ] | |
449 right-injective : {a : Obj A} { b : Obj B } → {f : Hom A a (FObj U b) } → A [ left ( right f ) ≈ f ] | |
450 right-injective {a} {b} {f} = let open ≈-Reasoning (A) in | |
451 begin | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
452 FMap U (B [ TMap ε b o FMap F f ]) o (TMap η a) |
171 | 453 ≈⟨ car ( distr U ) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
454 ( FMap U (TMap ε b) o FMap U (FMap F f )) o (TMap η a) |
171 | 455 ≈↑⟨ assoc ⟩ |
456 FMap U (TMap ε b) o ( FMap U (FMap F f ) o (TMap η a) ) | |
457 ≈⟨ cdr ( nat η) ⟩ | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
458 FMap U (TMap ε b) o ((TMap η (FObj U b)) o f ) |
171 | 459 ≈⟨ assoc ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
460 (FMap U (TMap ε b) o (TMap η (FObj U b))) o f |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
461 ≈⟨ car ( IsAdjunction.adjoint1 ( Adjunction.isAdjunction adj )) ⟩ |
171 | 462 id1 A (FObj U b) o f |
463 ≈⟨ idL ⟩ | |
464 f | |
465 ∎ | |
466 left-injective : {a : Obj A} { b : Obj B } → {f : Hom B (FObj F a) b } → B [ right ( left f ) ≈ f ] | |
467 left-injective {a} {b} {f} = let open ≈-Reasoning (B) in | |
468 begin | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
469 TMap ε b o FMap F ( A [ FMap U f o (TMap η a) ]) |
171 | 470 ≈⟨ cdr ( distr F ) ⟩ |
471 TMap ε b o ( FMap F (FMap U f) o FMap F (TMap η a)) | |
472 ≈⟨ assoc ⟩ | |
473 ( TMap ε b o FMap F (FMap U f)) o FMap F (TMap η a) | |
474 ≈↑⟨ car (nat ε) ⟩ | |
475 ( f o TMap ε ( FObj F a )) o ( FMap F ( TMap η a )) | |
476 ≈↑⟨ assoc ⟩ | |
477 f o ( TMap ε ( FObj F a ) o ( FMap F ( TMap η a ))) | |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
478 ≈⟨ cdr ( IsAdjunction.adjoint2 ( Adjunction.isAdjunction adj )) ⟩ |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
479 f o id1 B (FObj F a) |
171 | 480 ≈⟨ idR ⟩ |
481 f | |
482 ∎ | |
300 | 483 left-commute1 : {a : Obj A} {b b' : Obj B } → |
484 { f : Hom B (FObj F a) b } → { k : Hom B b b' } → | |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
485 A [ left ( B [ k o f ] ) ≈ A [ FMap U k o left f ] ] |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
486 left-commute1 {a} {b} {b'} {f} {k} = let open ≈-Reasoning (A) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
487 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
488 left ( B [ k o f ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
489 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
490 FMap U ( B [ k o f ] ) o (TMap η a) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
491 ≈⟨ car (distr U) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
492 ( FMap U k o FMap U f ) o (TMap η a) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
493 ≈↑⟨ assoc ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
494 FMap U k o ( FMap U f o (TMap η a) ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
495 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
496 FMap U k o left f |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
497 ∎ |
300 | 498 left-commute2 : {a a' : Obj A} {b : Obj B } → |
499 { f : Hom B (FObj F a) b } → { h : Hom A a' a} → | |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
500 A [ left ( B [ f o FMap F h ] ) ≈ A [ left f o h ] ] |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
501 left-commute2 {a'} {a} {b} {f} {h} = let open ≈-Reasoning (A) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
502 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
503 left ( B [ f o FMap F h ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
504 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
505 FMap U ( B [ f o FMap F h ] ) o TMap η a |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
506 ≈⟨ car (distr U ) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
507 (FMap U f o FMap U (FMap F h )) o TMap η a |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
508 ≈↑⟨ assoc ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
509 FMap U f o ( FMap U (FMap F h ) o TMap η a ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
510 ≈⟨ cdr ( nat η) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
511 FMap U f o (TMap η a' o h ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
512 ≈⟨ assoc ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
513 ( FMap U f o TMap η a') o h |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
514 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
515 left f o h |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
516 ∎ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
517 |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
518 r-cong : {a : Obj A} { b : Obj B } → { f g : Hom A a ( FObj U b ) } → A [ f ≈ g ] → B [ right f ≈ right g ] |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
519 r-cong eq = let open ≈-Reasoning (B) in ( cdr ( fcong F eq ) ) |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
520 l-cong : {a : Obj A} { b : Obj B } → { f g : Hom B (FObj F a) b } → B [ f ≈ g ] → A [ left f ≈ left g ] |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
521 l-cong eq = let open ≈-Reasoning (A) in ( car ( fcong U eq ) ) |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
522 |
171 | 523 |
524 open UnityOfOppsite | |
525 | |
300 | 526 -- f : a ----------→ U(b) |
527 -- 1_F(a) :F(a) --------→ F(a) | |
528 -- ε(b) = right uo (1_F(a)) :UF(b)--------→ a | |
529 -- η(a) = left uo (1_U(a)) : a ----------→ FU(a) | |
172 | 530 |
531 | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
532 uo-η-map : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
533 ( U : Functor B A ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
534 ( F : Functor A B ) → |
174
1c4788483d46
add more axiom on unity of oppsite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
173
diff
changeset
|
535 ( uo : UnityOfOppsite A B U F) → (a : Obj A ) → Hom A a (FObj U ( FObj F a )) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
536 uo-η-map A B U F uo a = left uo ( id1 B (FObj F a) ) |
174
1c4788483d46
add more axiom on unity of oppsite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
173
diff
changeset
|
537 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
538 uo-ε-map : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
539 ( U : Functor B A ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
540 ( F : Functor A B ) → |
174
1c4788483d46
add more axiom on unity of oppsite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
173
diff
changeset
|
541 ( uo : UnityOfOppsite A B U F) → (b : Obj B ) → Hom B (FObj F ( FObj U ( b ) )) b |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
542 uo-ε-map A B U F uo b = right uo ( id1 A (FObj U b) ) |
172 | 543 |
544 uo-solution : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') | |
545 ( U : Functor B A ) | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
546 ( F : Functor A B ) → |
300 | 547 ( uo : UnityOfOppsite A B U F) → {a : Obj A} {b : Obj B } → |
548 ( f : Hom A a (FObj U b )) → Hom B (FObj F a) b | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
549 uo-solution A B U F uo {a} {b} f = -- B [ right uo (id1 A (FObj U b)) o FMap F f ] |
174
1c4788483d46
add more axiom on unity of oppsite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
173
diff
changeset
|
550 right uo f |
172 | 551 |
173 | 552 -- F(ε(b)) o η(F(b)) |
553 -- F( right uo (id1 A (FObj U b)) ) o left uo (id1 B (FObj F a)) ] == 1 | |
172 | 554 |
555 UO2UM : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') | |
556 ( U : Functor B A ) | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
557 ( F : Functor A B ) → |
689 | 558 ( uo : UnityOfOppsite A B U F) → UniversalMapping A B U (FObj F) (uo-η-map A B U F uo ) |
172 | 559 UO2UM A B U F uo = record { |
560 _* = uo-solution A B U F uo ; | |
561 isUniversalMapping = record { | |
562 universalMapping = universalMapping; | |
563 uniquness = uniqueness | |
564 } | |
565 } where | |
566 universalMapping : {a' : Obj A} { b' : Obj B } → { f : Hom A a' (FObj U b') } → | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
567 A [ A [ FMap U ( uo-solution A B U F uo f) o ( uo-η-map A B U F uo ) a' ] ≈ f ] |
172 | 568 universalMapping {a} {b} {f} = let open ≈-Reasoning (A) in |
171 | 569 begin |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
570 FMap U ( uo-solution A B U F uo f) o ( uo-η-map A B U F uo ) a |
174
1c4788483d46
add more axiom on unity of oppsite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
173
diff
changeset
|
571 ≈⟨⟩ |
1c4788483d46
add more axiom on unity of oppsite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
173
diff
changeset
|
572 FMap U ( right uo f) o left uo ( id1 B (FObj F a) ) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
573 ≈↑⟨ left-commute1 uo ⟩ |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
574 left uo ( B [ right uo f o id1 B (FObj F a) ] ) |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
575 ≈⟨ l-cong uo lemma-1 ⟩ |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
576 left uo ( right uo f ) |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
577 ≈⟨ right-injective uo ⟩ |
172 | 578 f |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
579 ∎ where |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
580 lemma-1 : B [ B [ right uo f o id1 B (FObj F a) ] ≈ right uo f ] |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
581 lemma-1 = let open ≈-Reasoning (B) in idR |
172 | 582 uniqueness : {a' : Obj A} { b' : Obj B } → { f : Hom A a' (FObj U b') } → { g : Hom B (FObj F a') b'} → |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
583 A [ A [ FMap U g o ( uo-η-map A B U F uo ) a' ] ≈ f ] → B [ uo-solution A B U F uo f ≈ g ] |
172 | 584 uniqueness {a} {b} {f} {g} eq = let open ≈-Reasoning (B) in |
585 begin | |
586 uo-solution A B U F uo f | |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
587 ≈⟨⟩ |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
588 right uo f |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
589 ≈↑⟨ r-cong uo eq ⟩ |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
590 right uo ( A [ FMap U g o left uo ( id1 B (FObj F a) ) ] ) |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
591 ≈↑⟨ r-cong uo ( left-commute1 uo ) ⟩ |
175
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
592 right uo ( left uo ( g o ( id1 B (FObj F a) ) ) ) |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
593 ≈⟨ left-injective uo ⟩ |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
594 g o ( id1 B (FObj F a) ) |
795be747d7a9
hom-set to universal mapping done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
174
diff
changeset
|
595 ≈⟨ idR ⟩ |
172 | 596 g |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
597 ∎ |
171 | 598 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
599 uo-η : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
600 ( U : Functor B A ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
601 ( F : Functor A B ) → |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
602 ( uo : UnityOfOppsite A B U F) → NTrans A A identityFunctor ( U ○ F ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
603 uo-η A B U F uo = record { |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
604 TMap = uo-η-map A B U F uo ; isNTrans = myIsNTrans |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
605 } where |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
606 η = uo-η-map A B U F uo |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
607 commute : {a b : Obj A} {f : Hom A a b} |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
608 → A [ A [ (FMap U (FMap F f)) o ( η a ) ] ≈ A [ (η b ) o f ] ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
609 commute {a} {b} {f} = let open ≈-Reasoning (A) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
610 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
611 (FMap U (FMap F f)) o (left uo ( id1 B (FObj F a) ) ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
612 ≈↑⟨ left-commute1 uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
613 left uo ( B [ (FMap F f) o ( id1 B (FObj F a) ) ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
614 ≈⟨ l-cong uo (IsCategory.identityR (Category.isCategory B)) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
615 left uo ( FMap F f ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
616 ≈↑⟨ l-cong uo (IsCategory.identityL (Category.isCategory B)) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
617 left uo ( B [ ( id1 B (FObj F b )) o FMap F f ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
618 ≈⟨ left-commute2 uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
619 (left uo ( id1 B (FObj F b) ) ) o f |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
620 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
621 (η b ) o f |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
622 ∎ where |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
623 lemma-1 : B [ B [ (FMap F f) o ( id1 B (FObj F a) ) ] ≈ FMap F f ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
624 lemma-1 = IsCategory.identityR (Category.isCategory B) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
625 myIsNTrans : IsNTrans A A identityFunctor ( U ○ F ) η |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
626 myIsNTrans = record { commute = commute } |
171 | 627 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
628 uo-ε : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
629 ( U : Functor B A ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
630 ( F : Functor A B )→ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
631 ( uo : UnityOfOppsite A B U F) → NTrans B B ( F ○ U ) identityFunctor |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
632 uo-ε A B U F uo = record { |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
633 TMap = ε ; isNTrans = myIsNTrans |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
634 } where |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
635 ε = uo-ε-map A B U F uo |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
636 commute : {a b : Obj B} {f : Hom B a b } |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
637 → B [ B [ f o (ε a) ] ≈ B [(ε b) o (FMap F (FMap U f)) ] ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
638 commute {a} {b} {f} = let open ≈-Reasoning (B) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
639 sym ( begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
640 ε b o (FMap F (FMap U f)) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
641 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
642 right uo ( id1 A (FObj U b) ) o (FMap F (FMap U f)) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
643 ≈⟨ right-commute2 uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
644 right uo ( A [ id1 A (FObj U b) o FMap U f ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
645 ≈⟨ r-cong uo (IsCategory.identityL (Category.isCategory A)) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
646 right uo ( FMap U f ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
647 ≈↑⟨ r-cong uo (IsCategory.identityR (Category.isCategory A)) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
648 right uo ( A [ FMap U f o id1 A (FObj U a) ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
649 ≈↑⟨ right-commute1 uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
650 f o right uo ( id1 A (FObj U a) ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
651 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
652 f o (ε a) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
653 ∎ ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
654 myIsNTrans : IsNTrans B B ( F ○ U ) identityFunctor ε |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
655 myIsNTrans = record { commute = commute } |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
656 |
172 | 657 |
171 | 658 UO2Adj : {c₁ c₂ ℓ c₁' c₂' ℓ' : Level} (A : Category c₁ c₂ ℓ) (B : Category c₁' c₂' ℓ') |
659 { U : Functor B A } | |
660 { F : Functor A B } | |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
661 ( uo : UnityOfOppsite A B U F) |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
662 → Adjunction A B |
171 | 663 UO2Adj A B {U} {F} uo = record { |
688
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
664 U = U ; |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
665 F = F ; |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
666 η = uo-η A B U F uo ; |
a5f2ca67e7c5
fix monad/adjunction definition
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
300
diff
changeset
|
667 ε = uo-ε A B U F uo ; |
171 | 668 isAdjunction = record { |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
669 adjoint1 = adjoint1 ; |
171 | 670 adjoint2 = adjoint2 |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
671 } |
171 | 672 } where |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
673 um = UO2UM A B U F uo |
171 | 674 adjoint1 : { b : Obj B } → |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
675 A [ A [ ( FMap U ( TMap (uo-ε A B U F uo) b )) o ( TMap (uo-η A B U F uo) ( FObj U b )) ] ≈ id1 A (FObj U b) ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
676 adjoint1 {b} = let open ≈-Reasoning (A) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
677 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
678 ( FMap U ( TMap (uo-ε A B U F uo) b )) o ( TMap (uo-η A B U F uo) ( FObj U b )) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
679 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
680 FMap U (right uo (id1 A (FObj U b))) o (left uo (id1 B (FObj F (FObj U b)))) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
681 ≈↑⟨ left-commute1 uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
682 left uo ( B [ right uo (id1 A (FObj U b)) o id1 B (FObj F (FObj U b)) ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
683 ≈⟨ l-cong uo ((IsCategory.identityR (Category.isCategory B))) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
684 left uo ( right uo (id1 A (FObj U b)) ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
685 ≈⟨ right-injective uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
686 id1 A (FObj U b) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
687 ∎ |
171 | 688 adjoint2 : {a : Obj A} → |
176
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
689 B [ B [ ( TMap (uo-ε A B U F uo) ( FObj F a )) o ( FMap F ( TMap (uo-η A B U F uo) a )) ] ≈ id1 B (FObj F a) ] |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
690 adjoint2 {a} = let open ≈-Reasoning (B) in |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
691 begin |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
692 ( TMap (uo-ε A B U F uo) ( FObj F a )) o ( FMap F ( TMap (uo-η A B U F uo) a )) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
693 ≈⟨⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
694 right uo (Category.Category.Id A) o FMap F (left uo (id1 B (FObj F a))) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
695 ≈⟨ right-commute2 uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
696 right uo ( A [ (Category.Category.Id A) o (left uo (id1 B (FObj F a))) ] ) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
697 ≈⟨ r-cong uo ((IsCategory.identityL (Category.isCategory A))) ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
698 right uo ( left uo (id1 B (FObj F a))) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
699 ≈⟨ left-injective uo ⟩ |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
700 id1 B (FObj F a) |
ae1a4f7e5203
hom set adjunction done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
175
diff
changeset
|
701 ∎ |
171 | 702 |
703 | |
55
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
704 -- done! |
1716403c92c2
Adjoint proved. All done.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
54
diff
changeset
|
705 |