Mercurial > hg > Members > kono > Proof > category
annotate kleisli.agda @ 467:ba042c2d3ff5
clean up
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 05 Mar 2017 11:14:32 +0900 |
parents | d6a6dd305da2 |
children | 2d32ded94aaf |
rev | line source |
---|---|
82 | 1 -- -- -- -- -- -- -- -- |
153 | 2 -- Monad to Kelisli Category |
82 | 3 -- defines U_T and F_T as a resolution of Monad |
4 -- checks Adjointness | |
5 -- | |
6 -- Shinji KONO <kono@ie.u-ryukyu.ac.jp> | |
7 -- -- -- -- -- -- -- -- | |
0 | 8 |
9 -- Monad | |
10 -- Category A | |
11 -- A = Category | |
22 | 12 -- Functor T : A → A |
0 | 13 --T(a) = t(a) |
14 --T(f) = tf(f) | |
15 | |
2 | 16 open import Category -- https://github.com/konn/category-agda |
0 | 17 open import Level |
56 | 18 --open import Category.HomReasoning |
19 open import HomReasoning | |
20 open import cat-utility | |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
21 open import Category.Cat |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
22 |
152 | 23 module kleisli { c₁ c₂ ℓ : Level} { A : Category c₁ c₂ ℓ } |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
24 { T : Functor A A } |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
25 { η : NTrans A A identityFunctor T } |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
26 { μ : NTrans A A (T ○ T) T } |
130 | 27 { M : Monad A T η μ } where |
0 | 28 |
1 | 29 --T(g f) = T(g) T(f) |
30 | |
31 | 31 open Functor |
22 | 32 Lemma1 : {c₁ c₂ l : Level} {A : Category c₁ c₂ l} (T : Functor A A) → {a b c : Obj A} {g : Hom A b c} { f : Hom A a b } |
33 → A [ ( FMap T (A [ g o f ] )) ≈ (A [ FMap T g o FMap T f ]) ] | |
300 | 34 Lemma1 = λ t → IsFunctor.distr ( isFunctor t ) |
0 | 35 |
36 | |
7 | 37 open NTrans |
1 | 38 Lemma2 : {c₁ c₂ l : Level} {A : Category c₁ c₂ l} {F G : Functor A A} |
22 | 39 → (μ : NTrans A A F G) → {a b : Obj A} { f : Hom A a b } |
30 | 40 → A [ A [ FMap G f o TMap μ a ] ≈ A [ TMap μ b o FMap F f ] ] |
300 | 41 Lemma2 = λ n → IsNTrans.commute ( isNTrans n ) |
0 | 42 |
82 | 43 -- Laws of Monad |
44 -- | |
22 | 45 -- η : 1_A → T |
46 -- μ : TT → T | |
82 | 47 -- μ(a)η(T(a)) = a -- unity law 1 |
48 -- μ(a)T(η(a)) = a -- unity law 2 | |
49 -- μ(a)(μ(T(a))) = μ(a)T(μ(a)) -- association law | |
0 | 50 |
51 | |
2 | 52 open Monad |
53 Lemma3 : {c₁ c₂ ℓ : Level} {A : Category c₁ c₂ ℓ} | |
54 { T : Functor A A } | |
7 | 55 { η : NTrans A A identityFunctor T } |
56 { μ : NTrans A A (T ○ T) T } | |
22 | 57 { a : Obj A } → |
2 | 58 ( M : Monad A T η μ ) |
30 | 59 → A [ A [ TMap μ a o TMap μ ( FObj T a ) ] ≈ A [ TMap μ a o FMap T (TMap μ a) ] ] |
300 | 60 Lemma3 = λ m → IsMonad.assoc ( isMonad m ) |
2 | 61 |
62 | |
63 Lemma4 : {c₁ c₂ ℓ : Level} (A : Category c₁ c₂ ℓ) {a b : Obj A } { f : Hom A a b} | |
22 | 64 → A [ A [ Id {_} {_} {_} {A} b o f ] ≈ f ] |
300 | 65 Lemma4 = λ a → IsCategory.identityL ( Category.isCategory a ) |
0 | 66 |
3 | 67 Lemma5 : {c₁ c₂ ℓ : Level} {A : Category c₁ c₂ ℓ} |
68 { T : Functor A A } | |
7 | 69 { η : NTrans A A identityFunctor T } |
70 { μ : NTrans A A (T ○ T) T } | |
22 | 71 { a : Obj A } → |
3 | 72 ( M : Monad A T η μ ) |
30 | 73 → A [ A [ TMap μ a o TMap η ( FObj T a ) ] ≈ Id {_} {_} {_} {A} (FObj T a) ] |
300 | 74 Lemma5 = λ m → IsMonad.unity1 ( isMonad m ) |
3 | 75 |
76 Lemma6 : {c₁ c₂ ℓ : Level} {A : Category c₁ c₂ ℓ} | |
77 { T : Functor A A } | |
7 | 78 { η : NTrans A A identityFunctor T } |
79 { μ : NTrans A A (T ○ T) T } | |
22 | 80 { a : Obj A } → |
3 | 81 ( M : Monad A T η μ ) |
30 | 82 → A [ A [ TMap μ a o (FMap T (TMap η a )) ] ≈ Id {_} {_} {_} {A} (FObj T a) ] |
300 | 83 Lemma6 = λ m → IsMonad.unity2 ( isMonad m ) |
3 | 84 |
82 | 85 -- Laws of Kleisli Category |
86 -- | |
0 | 87 -- nat of η |
82 | 88 -- g ○ f = μ(c) T(g) f -- join definition |
89 -- η(b) ○ f = f -- left id (Lemma7) | |
90 -- f ○ η(a) = f -- right id (Lemma8) | |
91 -- h ○ (g ○ f) = (h ○ g) ○ f -- assocation law (Lemma9) | |
11 | 92 |
22 | 93 -- η(b) ○ f = f |
73 | 94 Lemma7 : { a : Obj A } { b : Obj A } ( f : Hom A a ( FObj T b) ) |
130 | 95 → A [ join M (TMap η b) f ≈ f ] |
73 | 96 Lemma7 {_} {b} f = |
97 let open ≈-Reasoning (A) in | |
21 | 98 begin |
130 | 99 join M (TMap η b) f |
21 | 100 ≈⟨ refl-hom ⟩ |
73 | 101 A [ TMap μ b o A [ FMap T ((TMap η b)) o f ] ] |
102 ≈⟨ IsCategory.associative (Category.isCategory A) ⟩ | |
103 A [ A [ TMap μ b o FMap T ((TMap η b)) ] o f ] | |
130 | 104 ≈⟨ car ( IsMonad.unity2 ( isMonad M) ) ⟩ |
73 | 105 A [ id (FObj T b) o f ] |
106 ≈⟨ IsCategory.identityL (Category.isCategory A) ⟩ | |
21 | 107 f |
108 ∎ | |
7 | 109 |
22 | 110 -- f ○ η(a) = f |
73 | 111 Lemma8 : { a : Obj A } { b : Obj A } |
22 | 112 ( f : Hom A a ( FObj T b) ) |
130 | 113 → A [ join M f (TMap η a) ≈ f ] |
73 | 114 Lemma8 {a} {b} f = |
22 | 115 begin |
130 | 116 join M f (TMap η a) |
22 | 117 ≈⟨ refl-hom ⟩ |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
118 A [ TMap μ b o A [ FMap T f o (TMap η a) ] ] |
66 | 119 ≈⟨ cdr ( nat η ) ⟩ |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
120 A [ TMap μ b o A [ (TMap η ( FObj T b)) o f ] ] |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
121 ≈⟨ IsCategory.associative (Category.isCategory A) ⟩ |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
122 A [ A [ TMap μ b o (TMap η ( FObj T b)) ] o f ] |
130 | 123 ≈⟨ car ( IsMonad.unity1 ( isMonad M) ) ⟩ |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
124 A [ id (FObj T b) o f ] |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
125 ≈⟨ IsCategory.identityL (Category.isCategory A) ⟩ |
22 | 126 f |
127 ∎ where | |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
128 open ≈-Reasoning (A) |
5 | 129 |
22 | 130 -- h ○ (g ○ f) = (h ○ g) ○ f |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
131 Lemma9 : { a b c d : Obj A } |
73 | 132 ( h : Hom A c ( FObj T d) ) |
23 | 133 ( g : Hom A b ( FObj T c) ) |
73 | 134 ( f : Hom A a ( FObj T b) ) |
130 | 135 → A [ join M h (join M g f) ≈ join M ( join M h g) f ] |
73 | 136 Lemma9 {a} {b} {c} {d} h g f = |
24 | 137 begin |
130 | 138 join M h (join M g f) |
30 | 139 ≈⟨⟩ |
130 | 140 join M h ( ( TMap μ c o ( FMap T g o f ) ) ) |
28 | 141 ≈⟨ refl-hom ⟩ |
30 | 142 ( TMap μ d o ( FMap T h o ( TMap μ c o ( FMap T g o f ) ) ) ) |
28 | 143 ≈⟨ cdr ( cdr ( assoc )) ⟩ |
30 | 144 ( TMap μ d o ( FMap T h o ( ( TMap μ c o FMap T g ) o f ) ) ) |
28 | 145 ≈⟨ assoc ⟩ --- ( f o ( g o h ) ) = ( ( f o g ) o h ) |
30 | 146 ( ( TMap μ d o FMap T h ) o ( (TMap μ c o FMap T g ) o f ) ) |
25 | 147 ≈⟨ assoc ⟩ |
30 | 148 ( ( ( TMap μ d o FMap T h ) o (TMap μ c o FMap T g ) ) o f ) |
253 | 149 ≈↑⟨ car assoc ⟩ |
30 | 150 ( ( TMap μ d o ( FMap T h o ( TMap μ c o FMap T g ) ) ) o f ) |
28 | 151 ≈⟨ car ( cdr (assoc) ) ⟩ |
30 | 152 ( ( TMap μ d o ( ( FMap T h o TMap μ c ) o FMap T g ) ) o f ) |
28 | 153 ≈⟨ car assoc ⟩ |
30 | 154 ( ( ( TMap μ d o ( FMap T h o TMap μ c ) ) o FMap T g ) o f ) |
28 | 155 ≈⟨ car (car ( cdr ( begin |
30 | 156 ( FMap T h o TMap μ c ) |
66 | 157 ≈⟨ nat μ ⟩ |
30 | 158 ( TMap μ (FObj T d) o FMap T (FMap T h) ) |
25 | 159 ∎ |
160 ))) ⟩ | |
30 | 161 ( ( ( TMap μ d o ( TMap μ ( FObj T d) o FMap T ( FMap T h ) ) ) o FMap T g ) o f ) |
253 | 162 ≈↑⟨ car assoc ⟩ |
30 | 163 ( ( TMap μ d o ( ( TMap μ ( FObj T d) o FMap T ( FMap T h ) ) o FMap T g ) ) o f ) |
253 | 164 ≈↑⟨ car ( cdr assoc ) ⟩ |
30 | 165 ( ( TMap μ d o ( TMap μ ( FObj T d) o ( FMap T ( FMap T h ) o FMap T g ) ) ) o f ) |
253 | 166 ≈↑⟨ car ( cdr (cdr (distr T ))) ⟩ |
30 | 167 ( ( TMap μ d o ( TMap μ ( FObj T d) o FMap T ( ( FMap T h o g ) ) ) ) o f ) |
28 | 168 ≈⟨ car assoc ⟩ |
30 | 169 ( ( ( TMap μ d o TMap μ ( FObj T d) ) o FMap T ( ( FMap T h o g ) ) ) o f ) |
28 | 170 ≈⟨ car ( car ( |
27 | 171 begin |
30 | 172 ( TMap μ d o TMap μ (FObj T d) ) |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
173 ≈⟨ IsMonad.assoc ( isMonad M) ⟩ |
30 | 174 ( TMap μ d o FMap T (TMap μ d) ) |
27 | 175 ∎ |
176 )) ⟩ | |
30 | 177 ( ( ( TMap μ d o FMap T ( TMap μ d) ) o FMap T ( ( FMap T h o g ) ) ) o f ) |
253 | 178 ≈↑⟨ car assoc ⟩ |
30 | 179 ( ( TMap μ d o ( FMap T ( TMap μ d ) o FMap T ( ( FMap T h o g ) ) ) ) o f ) |
253 | 180 ≈↑⟨ assoc ⟩ |
30 | 181 ( TMap μ d o ( ( FMap T ( TMap μ d ) o FMap T ( ( FMap T h o g ) ) ) o f ) ) |
253 | 182 ≈↑⟨ cdr ( car ( distr T )) ⟩ |
30 | 183 ( TMap μ d o ( FMap T ( ( ( TMap μ d ) o ( FMap T h o g ) ) ) o f ) ) |
23 | 184 ≈⟨ refl-hom ⟩ |
130 | 185 join M ( ( TMap μ d o ( FMap T h o g ) ) ) f |
23 | 186 ≈⟨ refl-hom ⟩ |
130 | 187 join M ( join M h g) f |
24 | 188 ∎ where open ≈-Reasoning (A) |
3 | 189 |
82 | 190 -- |
191 -- o-resp in Kleisli Category ( for Functor definitions ) | |
192 -- | |
300 | 193 Lemma10 : {a b c : Obj A} → (f g : Hom A a (FObj T b) ) → (h i : Hom A b (FObj T c) ) → |
130 | 194 A [ f ≈ g ] → A [ h ≈ i ] → A [ (join M h f) ≈ (join M i g) ] |
74
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
195 Lemma10 {a} {b} {c} f g h i eq-fg eq-hi = let open ≈-Reasoning (A) in |
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
196 begin |
130 | 197 join M h f |
74
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
198 ≈⟨⟩ |
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
199 TMap μ c o ( FMap T h o f ) |
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
200 ≈⟨ cdr ( IsCategory.o-resp-≈ (Category.isCategory A) eq-fg ((IsFunctor.≈-cong (isFunctor T)) eq-hi )) ⟩ |
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
201 TMap μ c o ( FMap T i o g ) |
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
202 ≈⟨⟩ |
130 | 203 join M i g |
74
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
204 ∎ |
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
205 |
82 | 206 -- |
207 -- Hom in Kleisli Category | |
208 -- | |
74
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
209 |
87 | 210 |
211 record KleisliHom { c₁ c₂ ℓ : Level} { A : Category c₁ c₂ ℓ } { T : Functor A A } (a : Obj A) (b : Obj A) | |
467 | 212 : Set c₂ where |
213 field | |
214 KMap : Hom A a ( FObj T b ) | |
215 | |
216 open KleisliHom | |
69
84a150c980ce
generalized distr and assco1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
68
diff
changeset
|
217 |
467 | 218 -- we need this to make agda check stop |
300 | 219 KHom = λ (a b : Obj A) → KleisliHom {c₁} {c₂} {ℓ} {A} {T} a b |
87 | 220 |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
221 K-id : {a : Obj A} → KHom a a |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
222 K-id {a = a} = record { KMap = TMap η a } |
56 | 223 |
69
84a150c980ce
generalized distr and assco1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
68
diff
changeset
|
224 open import Relation.Binary.Core |
56 | 225 |
300 | 226 _⋍_ : { a : Obj A } { b : Obj A } (f g : KHom a b ) → Set ℓ |
73 | 227 _⋍_ {a} {b} f g = A [ KMap f ≈ KMap g ] |
71
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
228 |
108 | 229 _*_ : { a b c : Obj A } → ( KHom b c) → ( KHom a b) → KHom a c |
130 | 230 _*_ {a} {b} {c} g f = record { KMap = join M {a} {b} {c} (KMap g) (KMap f) } |
70 | 231 |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
232 isKleisliCategory : IsCategory ( Obj A ) KHom _⋍_ _*_ K-id |
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
233 isKleisliCategory = record { isEquivalence = isEquivalence |
71
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
234 ; identityL = KidL |
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
235 ; identityR = KidR |
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
236 ; o-resp-≈ = Ko-resp |
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
237 ; associative = Kassoc |
69
84a150c980ce
generalized distr and assco1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
68
diff
changeset
|
238 } |
84a150c980ce
generalized distr and assco1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
68
diff
changeset
|
239 where |
73 | 240 open ≈-Reasoning (A) |
300 | 241 isEquivalence : { a b : Obj A } → |
72
cbc30519e961
stack overflow solved by moving implicit parameters to module parameters
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
71
diff
changeset
|
242 IsEquivalence {_} {_} {KHom a b} _⋍_ |
82 | 243 isEquivalence {C} {D} = -- this is the same function as A's equivalence but has different types |
244 record { refl = refl-hom | |
245 ; sym = sym | |
246 ; trans = trans-hom | |
247 } | |
300 | 248 KidL : {C D : Obj A} → {f : KHom C D} → (K-id * f) ⋍ f |
73 | 249 KidL {_} {_} {f} = Lemma7 (KMap f) |
300 | 250 KidR : {C D : Obj A} → {f : KHom C D} → (f * K-id) ⋍ f |
73 | 251 KidR {_} {_} {f} = Lemma8 (KMap f) |
300 | 252 Ko-resp : {a b c : Obj A} → {f g : KHom a b } → {h i : KHom b c } → |
71
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
253 f ⋍ g → h ⋍ i → (h * f) ⋍ (i * g) |
74
49e6eb3ef9c0
Kleisli Category constructed
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
73
diff
changeset
|
254 Ko-resp {a} {b} {c} {f} {g} {h} {i} eq-fg eq-hi = Lemma10 {a} {b} {c} (KMap f) (KMap g) (KMap h) (KMap i) eq-fg eq-hi |
300 | 255 Kassoc : {a b c d : Obj A} → {f : KHom c d } → {g : KHom b c } → {h : KHom a b } → |
71
709c1bde54dc
Kleisli category problem written
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
70
diff
changeset
|
256 (f * (g * h)) ⋍ ((f * g) * h) |
73 | 257 Kassoc {_} {_} {_} {_} {f} {g} {h} = Lemma9 (KMap f) (KMap g) (KMap h) |
3 | 258 |
78 | 259 KleisliCategory : Category c₁ c₂ ℓ |
75 | 260 KleisliCategory = |
261 record { Obj = Obj A | |
262 ; Hom = KHom | |
263 ; _o_ = _*_ | |
264 ; _≈_ = _⋍_ | |
265 ; Id = K-id | |
266 ; isCategory = isKleisliCategory | |
267 } | |
56 | 268 |
82 | 269 -- |
270 -- Resolution | |
271 -- T = U_T U_F | |
272 -- nat-ε | |
273 -- nat-η | |
274 -- | |
275 | |
300 | 276 ufmap : {a b : Obj A} (f : KHom a b ) → Hom A (FObj T a) (FObj T b) |
80 | 277 ufmap {a} {b} f = A [ TMap μ (b) o FMap T (KMap f) ] |
278 | |
75 | 279 U_T : Functor KleisliCategory A |
280 U_T = record { | |
281 FObj = FObj T | |
282 ; FMap = ufmap | |
283 ; isFunctor = record | |
284 { ≈-cong = ≈-cong | |
285 ; identity = identity | |
76 | 286 ; distr = distr1 |
75 | 287 } |
288 } where | |
289 identity : {a : Obj A} → A [ ufmap (K-id {a}) ≈ id1 A (FObj T a) ] | |
290 identity {a} = let open ≈-Reasoning (A) in | |
291 begin | |
292 TMap μ (a) o FMap T (TMap η a) | |
293 ≈⟨ IsMonad.unity2 (isMonad M) ⟩ | |
253 | 294 id (FObj T a) |
75 | 295 ∎ |
296 ≈-cong : {a b : Obj A} {f g : KHom a b} → A [ KMap f ≈ KMap g ] → A [ ufmap f ≈ ufmap g ] | |
297 ≈-cong {a} {b} {f} {g} f≈g = let open ≈-Reasoning (A) in | |
298 begin | |
299 TMap μ (b) o FMap T (KMap f) | |
300 ≈⟨ cdr (fcong T f≈g) ⟩ | |
301 TMap μ (b) o FMap T (KMap g) | |
302 ∎ | |
76 | 303 distr1 : {a b c : Obj A} {f : KHom a b} {g : KHom b c} → A [ ufmap (g * f) ≈ (A [ ufmap g o ufmap f ] )] |
304 distr1 {a} {b} {c} {f} {g} = let open ≈-Reasoning (A) in | |
75 | 305 begin |
306 ufmap (g * f) | |
76 | 307 ≈⟨⟩ |
308 ufmap {a} {c} ( record { KMap = TMap μ (c) o (FMap T (KMap g) o (KMap f)) } ) | |
309 ≈⟨⟩ | |
310 TMap μ (c) o FMap T ( TMap μ (c) o (FMap T (KMap g) o (KMap f))) | |
311 ≈⟨ cdr ( distr T) ⟩ | |
312 TMap μ (c) o (( FMap T ( TMap μ (c)) o FMap T (FMap T (KMap g) o (KMap f)))) | |
313 ≈⟨ assoc ⟩ | |
314 (TMap μ (c) o ( FMap T ( TMap μ (c)))) o FMap T (FMap T (KMap g) o (KMap f)) | |
315 ≈⟨ car (sym (IsMonad.assoc (isMonad M))) ⟩ | |
316 (TMap μ (c) o ( TMap μ (FObj T c))) o FMap T (FMap T (KMap g) o (KMap f)) | |
317 ≈⟨ sym assoc ⟩ | |
318 TMap μ (c) o (( TMap μ (FObj T c)) o FMap T (FMap T (KMap g) o (KMap f))) | |
319 ≈⟨ cdr (cdr (distr T)) ⟩ | |
320 TMap μ (c) o (( TMap μ (FObj T c)) o (FMap T (FMap T (KMap g)) o FMap T (KMap f))) | |
321 ≈⟨ cdr (assoc) ⟩ | |
322 TMap μ (c) o ((( TMap μ (FObj T c)) o (FMap T (FMap T (KMap g)))) o FMap T (KMap f)) | |
323 ≈⟨ sym (cdr (car (nat μ ))) ⟩ | |
324 TMap μ (c) o ((FMap T (KMap g ) o TMap μ (b)) o FMap T (KMap f )) | |
325 ≈⟨ cdr (sym assoc) ⟩ | |
326 TMap μ (c) o (FMap T (KMap g ) o ( TMap μ (b) o FMap T (KMap f ))) | |
327 ≈⟨ assoc ⟩ | |
328 ( TMap μ (c) o FMap T (KMap g ) ) o ( TMap μ (b) o FMap T (KMap f ) ) | |
329 ≈⟨⟩ | |
75 | 330 ufmap g o ufmap f |
331 ∎ | |
332 | |
333 | |
300 | 334 ffmap : {a b : Obj A} (f : Hom A a b) → KHom a b |
75 | 335 ffmap f = record { KMap = A [ TMap η (Category.cod A f) o f ] } |
336 | |
337 F_T : Functor A KleisliCategory | |
338 F_T = record { | |
300 | 339 FObj = λ a → a |
75 | 340 ; FMap = ffmap |
341 ; isFunctor = record | |
342 { ≈-cong = ≈-cong | |
343 ; identity = identity | |
76 | 344 ; distr = distr1 |
75 | 345 } |
346 } where | |
347 identity : {a : Obj A} → A [ A [ TMap η a o id1 A a ] ≈ TMap η a ] | |
348 identity {a} = IsCategory.identityR ( Category.isCategory A) | |
82 | 349 -- Category.cod A f and Category.cod A g are actualy the same b, so we don't need cong-≈, just refl |
75 | 350 lemma1 : {a b : Obj A} {f g : Hom A a b} → A [ f ≈ g ] → A [ TMap η b ≈ TMap η b ] |
351 lemma1 f≈g = IsEquivalence.refl (IsCategory.isEquivalence ( Category.isCategory A )) | |
352 ≈-cong : {a b : Obj A} {f g : Hom A a b} → A [ f ≈ g ] → A [ A [ TMap η (Category.cod A f) o f ] ≈ A [ TMap η (Category.cod A g) o g ] ] | |
353 ≈-cong f≈g = (IsCategory.o-resp-≈ (Category.isCategory A)) f≈g ( lemma1 f≈g ) | |
76 | 354 distr1 : {a b c : Obj A} {f : Hom A a b} {g : Hom A b c} → |
75 | 355 ( ffmap (A [ g o f ]) ⋍ ( ffmap g * ffmap f ) ) |
77 | 356 distr1 {a} {b} {c} {f} {g} = let open ≈-Reasoning (A) in |
75 | 357 begin |
358 KMap (ffmap (A [ g o f ])) | |
77 | 359 ≈⟨⟩ |
360 TMap η (c) o (g o f) | |
361 ≈⟨ assoc ⟩ | |
362 (TMap η (c) o g) o f | |
363 ≈⟨ car (sym (nat η)) ⟩ | |
364 (FMap T g o TMap η (b)) o f | |
365 ≈⟨ sym idL ⟩ | |
253 | 366 id (FObj T c) o ((FMap T g o TMap η (b)) o f) |
77 | 367 ≈⟨ sym (car (IsMonad.unity2 (isMonad M))) ⟩ |
368 (TMap μ c o FMap T (TMap η c)) o ((FMap T g o TMap η (b)) o f) | |
369 ≈⟨ sym assoc ⟩ | |
370 TMap μ c o ( FMap T (TMap η c) o ((FMap T g o TMap η (b)) o f) ) | |
371 ≈⟨ cdr (cdr (sym assoc)) ⟩ | |
372 TMap μ c o ( FMap T (TMap η c) o (FMap T g o (TMap η (b) o f))) | |
373 ≈⟨ cdr assoc ⟩ | |
374 TMap μ c o ( ( FMap T (TMap η c) o FMap T g ) o (TMap η (b) o f) ) | |
375 ≈⟨ sym (cdr ( car ( distr T ))) ⟩ | |
376 TMap μ c o ( ( FMap T (TMap η c o g)) o (TMap η (b) o f)) | |
377 ≈⟨ assoc ⟩ | |
378 (TMap μ c o ( FMap T (TMap η c o g))) o (TMap η (b) o f) | |
379 ≈⟨ assoc ⟩ | |
380 ((TMap μ c o (FMap T (TMap η c o g))) o TMap η b) o f | |
381 ≈⟨ sym assoc ⟩ | |
382 (TMap μ c o (FMap T (TMap η c o g))) o (TMap η b o f) | |
383 ≈⟨ sym assoc ⟩ | |
384 TMap μ c o ( (FMap T (TMap η c o g)) o (TMap η b o f) ) | |
385 ≈⟨⟩ | |
130 | 386 join M (TMap η c o g) (TMap η b o f) |
77 | 387 ≈⟨⟩ |
75 | 388 KMap ( ffmap g * ffmap f ) |
389 ∎ | |
390 | |
82 | 391 -- |
392 -- T = (U_T ○ F_T) | |
393 -- | |
394 | |
300 | 395 Lemma11-1 : ∀{a b : Obj A} → (f : Hom A a b ) → A [ FMap T f ≈ FMap (U_T ○ F_T) f ] |
79 | 396 Lemma11-1 {a} {b} f = let open ≈-Reasoning (A) in |
397 sym ( begin | |
398 FMap (U_T ○ F_T) f | |
399 ≈⟨⟩ | |
400 FMap U_T ( FMap F_T f ) | |
401 ≈⟨⟩ | |
402 TMap μ (b) o FMap T (KMap ( ffmap f ) ) | |
403 ≈⟨⟩ | |
404 TMap μ (b) o FMap T (TMap η (b) o f) | |
405 ≈⟨ cdr (distr T ) ⟩ | |
406 TMap μ (b) o ( FMap T (TMap η (b)) o FMap T f) | |
407 ≈⟨ assoc ⟩ | |
408 (TMap μ (b) o FMap T (TMap η (b))) o FMap T f | |
409 ≈⟨ car (IsMonad.unity2 (isMonad M)) ⟩ | |
253 | 410 id (FObj T b) o FMap T f |
79 | 411 ≈⟨ idL ⟩ |
412 FMap T f | |
413 ∎ ) | |
414 | |
82 | 415 -- construct ≃ |
416 | |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
417 Lemma11 : T ≃ (U_T ○ F_T) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
418 Lemma11 f = Category.Cat.refl (Lemma11-1 f) |
78 | 419 |
82 | 420 -- |
421 -- natural transformations | |
422 -- | |
423 | |
78 | 424 nat-η : NTrans A A identityFunctor ( U_T ○ F_T ) |
467 | 425 nat-η = record { TMap = λ x → TMap η x ; isNTrans = record { commute = commute } } where |
426 commute : {a b : Obj A} {f : Hom A a b} | |
79 | 427 → A [ A [ ( FMap ( U_T ○ F_T ) f ) o ( TMap η a ) ] ≈ A [ (TMap η b ) o f ] ] |
467 | 428 commute {a} {b} {f} = let open ≈-Reasoning (A) in |
79 | 429 begin |
430 ( FMap ( U_T ○ F_T ) f ) o ( TMap η a ) | |
84 | 431 ≈⟨ sym (resp refl-hom (Lemma11-1 f)) ⟩ |
432 FMap T f o TMap η a | |
79 | 433 ≈⟨ nat η ⟩ |
84 | 434 TMap η b o f |
79 | 435 ∎ |
77 | 436 |
300 | 437 tmap-ε : (a : Obj A) → KHom (FObj T a) a |
78 | 438 tmap-ε a = record { KMap = id1 A (FObj T a) } |
439 | |
440 nat-ε : NTrans KleisliCategory KleisliCategory ( F_T ○ U_T ) identityFunctor | |
300 | 441 nat-ε = record { TMap = λ a → tmap-ε a; isNTrans = isNTrans1 } where |
130 | 442 commute1 : {a b : Obj A} {f : KHom a b} |
78 | 443 → (f * ( tmap-ε a ) ) ⋍ (( tmap-ε b ) * ( FMap (F_T ○ U_T) f ) ) |
130 | 444 commute1 {a} {b} {f} = let open ≈-Reasoning (A) in |
79 | 445 sym ( begin |
446 KMap (( tmap-ε b ) * ( FMap (F_T ○ U_T) f )) | |
80 | 447 ≈⟨⟩ |
253 | 448 TMap μ b o ( FMap T ( id (FObj T b) ) o ( KMap (FMap (F_T ○ U_T) f ) )) |
80 | 449 ≈⟨ cdr ( cdr ( |
450 begin | |
451 KMap (FMap (F_T ○ U_T) f ) | |
452 ≈⟨⟩ | |
453 KMap (FMap F_T (FMap U_T f)) | |
454 ≈⟨⟩ | |
455 TMap η (FObj T b) o (TMap μ (b) o FMap T (KMap f)) | |
456 ∎ | |
457 )) ⟩ | |
253 | 458 TMap μ b o ( FMap T ( id (FObj T b) ) o (TMap η (FObj T b) o (TMap μ (b) o FMap T (KMap f)))) |
80 | 459 ≈⟨ cdr (car (IsFunctor.identity (isFunctor T))) ⟩ |
253 | 460 TMap μ b o ( id (FObj T (FObj T b) ) o (TMap η (FObj T b) o (TMap μ (b) o FMap T (KMap f)))) |
80 | 461 ≈⟨ cdr idL ⟩ |
462 TMap μ b o (TMap η (FObj T b) o (TMap μ (b) o FMap T (KMap f))) | |
463 ≈⟨ assoc ⟩ | |
464 (TMap μ b o (TMap η (FObj T b))) o (TMap μ (b) o FMap T (KMap f)) | |
465 ≈⟨ (car (IsMonad.unity1 (isMonad M))) ⟩ | |
253 | 466 id (FObj T b) o (TMap μ (b) o FMap T (KMap f)) |
80 | 467 ≈⟨ idL ⟩ |
468 TMap μ b o FMap T (KMap f) | |
469 ≈⟨ cdr (sym idR) ⟩ | |
253 | 470 TMap μ b o ( FMap T (KMap f) o id (FObj T a) ) |
80 | 471 ≈⟨⟩ |
79 | 472 KMap (f * ( tmap-ε a )) |
473 ∎ ) | |
300 | 474 isNTrans1 : IsNTrans KleisliCategory KleisliCategory ( F_T ○ U_T ) identityFunctor (λ a → tmap-ε a ) |
130 | 475 isNTrans1 = record { commute = commute1 } |
77 | 476 |
82 | 477 -- |
478 -- μ = U_T ε U_F | |
479 -- | |
300 | 480 tmap-μ : (a : Obj A) → Hom A (FObj ( U_T ○ F_T ) (FObj ( U_T ○ F_T ) a)) (FObj ( U_T ○ F_T ) a) |
95 | 481 tmap-μ a = FMap U_T ( TMap nat-ε ( FObj F_T a )) |
482 | |
483 nat-μ : NTrans A A (( U_T ○ F_T ) ○ ( U_T ○ F_T )) ( U_T ○ F_T ) | |
484 nat-μ = record { TMap = tmap-μ ; isNTrans = isNTrans1 } where | |
130 | 485 commute1 : {a b : Obj A} {f : Hom A a b} |
95 | 486 → A [ A [ (FMap (U_T ○ F_T) f) o ( tmap-μ a) ] ≈ A [ ( tmap-μ b ) o FMap (U_T ○ F_T) ( FMap (U_T ○ F_T) f) ] ] |
130 | 487 commute1 {a} {b} {f} = let open ≈-Reasoning (A) in |
95 | 488 sym ( begin |
489 ( tmap-μ b ) o FMap (U_T ○ F_T) ( FMap (U_T ○ F_T) f) | |
490 ≈⟨⟩ | |
491 ( FMap U_T ( TMap nat-ε ( FObj F_T b )) ) o FMap (U_T ○ F_T) ( FMap (U_T ○ F_T) f) | |
492 ≈⟨ sym ( distr U_T) ⟩ | |
493 FMap U_T ( KleisliCategory [ TMap nat-ε ( FObj F_T b ) o FMap F_T ( FMap (U_T ○ F_T) f) ] ) | |
494 ≈⟨ fcong U_T (sym (nat nat-ε)) ⟩ | |
495 FMap U_T ( KleisliCategory [ (FMap F_T f) o TMap nat-ε ( FObj F_T a ) ] ) | |
496 ≈⟨ distr U_T ⟩ | |
497 (FMap U_T (FMap F_T f)) o FMap U_T ( TMap nat-ε ( FObj F_T a )) | |
498 ≈⟨⟩ | |
499 (FMap (U_T ○ F_T) f) o ( tmap-μ a) | |
500 ∎ ) | |
501 isNTrans1 : IsNTrans A A (( U_T ○ F_T ) ○ ( U_T ○ F_T )) ( U_T ○ F_T ) tmap-μ | |
130 | 502 isNTrans1 = record { commute = commute1 } |
95 | 503 |
300 | 504 Lemma12 : {x : Obj A } → A [ TMap nat-μ x ≈ FMap U_T ( TMap nat-ε ( FObj F_T x ) ) ] |
80 | 505 Lemma12 {x} = let open ≈-Reasoning (A) in |
506 sym ( begin | |
507 FMap U_T ( TMap nat-ε ( FObj F_T x ) ) | |
508 ≈⟨⟩ | |
95 | 509 tmap-μ x |
510 ≈⟨⟩ | |
511 TMap nat-μ x | |
512 ∎ ) | |
513 | |
300 | 514 Lemma13 : {x : Obj A } → A [ TMap μ x ≈ FMap U_T ( TMap nat-ε ( FObj F_T x ) ) ] |
95 | 515 Lemma13 {x} = let open ≈-Reasoning (A) in |
516 sym ( begin | |
517 FMap U_T ( TMap nat-ε ( FObj F_T x ) ) | |
518 ≈⟨⟩ | |
253 | 519 TMap μ x o FMap T (id (FObj T x) ) |
80 | 520 ≈⟨ cdr (IsFunctor.identity (isFunctor T)) ⟩ |
253 | 521 TMap μ x o id (FObj T (FObj T x) ) |
80 | 522 ≈⟨ idR ⟩ |
523 TMap μ x | |
524 ∎ ) | |
78 | 525 |
84 | 526 Adj_T : Adjunction A KleisliCategory U_T F_T nat-η nat-ε |
527 Adj_T = record { | |
80 | 528 isAdjunction = record { |
529 adjoint1 = adjoint1 ; | |
530 adjoint2 = adjoint2 | |
531 } | |
532 } where | |
533 adjoint1 : { b : Obj KleisliCategory } → | |
534 A [ A [ ( FMap U_T ( TMap nat-ε b)) o ( TMap nat-η ( FObj U_T b )) ] ≈ id1 A (FObj U_T b) ] | |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
535 adjoint1 {b} = let open ≈-Reasoning (A) in |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
536 begin |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
537 ( FMap U_T ( TMap nat-ε b)) o ( TMap nat-η ( FObj U_T b )) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
538 ≈⟨⟩ |
253 | 539 (TMap μ (b) o FMap T (id (FObj T b ))) o ( TMap η ( FObj T b )) |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
540 ≈⟨ car ( cdr (IsFunctor.identity (isFunctor T))) ⟩ |
253 | 541 (TMap μ (b) o (id (FObj T (FObj T b )))) o ( TMap η ( FObj T b )) |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
542 ≈⟨ car idR ⟩ |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
543 TMap μ (b) o ( TMap η ( FObj T b )) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
544 ≈⟨ IsMonad.unity1 (isMonad M) ⟩ |
253 | 545 id (FObj U_T b) |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
546 ∎ |
80 | 547 adjoint2 : {a : Obj A} → |
548 KleisliCategory [ KleisliCategory [ ( TMap nat-ε ( FObj F_T a )) o ( FMap F_T ( TMap nat-η a )) ] | |
87 | 549 ≈ id1 KleisliCategory (FObj F_T a) ] |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
550 adjoint2 {a} = let open ≈-Reasoning (A) in |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
551 begin |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
552 KMap (( TMap nat-ε ( FObj F_T a )) * ( FMap F_T ( TMap nat-η a )) ) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
553 ≈⟨⟩ |
253 | 554 TMap μ a o (FMap T (id (FObj T a) ) o ((TMap η (FObj T a)) o (TMap η a))) |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
555 ≈⟨ cdr ( car ( IsFunctor.identity (isFunctor T))) ⟩ |
253 | 556 TMap μ a o ((id (FObj T (FObj T a) )) o ((TMap η (FObj T a)) o (TMap η a))) |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
557 ≈⟨ cdr ( idL ) ⟩ |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
558 TMap μ a o ((TMap η (FObj T a)) o (TMap η a)) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
559 ≈⟨ assoc ⟩ |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
560 (TMap μ a o (TMap η (FObj T a))) o (TMap η a) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
561 ≈⟨ car (IsMonad.unity1 (isMonad M)) ⟩ |
253 | 562 id (FObj T a) o (TMap η a) |
81
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
563 ≈⟨ idL ⟩ |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
564 TMap η a |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
565 ≈⟨⟩ |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
566 TMap η (FObj F_T a) |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
567 ≈⟨⟩ |
0404b2ba7db6
Resolution Adjoint proved.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
80
diff
changeset
|
568 KMap (id1 KleisliCategory (FObj F_T a)) |
82 | 569 ∎ |
77 | 570 |
87 | 571 open MResolution |
84 | 572 |
95 | 573 Resolution_T : MResolution A KleisliCategory T U_T F_T {nat-η} {nat-ε} {nat-μ} Adj_T |
84 | 574 Resolution_T = record { |
87 | 575 T=UF = Lemma11; |
576 μ=UεF = Lemma12 | |
84 | 577 } |
578 | |
97
2feec58bb02d
seprate comparison functor
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
96
diff
changeset
|
579 -- end |