Define and use Endofunctor
This commit is contained in:
parent
3c77c69cf6
commit
f2b1a36a75
|
@ -45,6 +45,9 @@ module _ {ℓc ℓc' ℓd ℓd'}
|
||||||
|
|
||||||
open Functor
|
open Functor
|
||||||
|
|
||||||
|
EndoFunctor : ∀ {ℓa ℓb} (ℂ : Category ℓa ℓb) → Set _
|
||||||
|
EndoFunctor ℂ = Functor ℂ ℂ
|
||||||
|
|
||||||
module _
|
module _
|
||||||
{ℓa ℓb : Level}
|
{ℓa ℓb : Level}
|
||||||
{ℂ 𝔻 : Category ℓa ℓb}
|
{ℂ 𝔻 : Category ℓa ℓb}
|
||||||
|
|
|
@ -22,7 +22,7 @@ module Monoidal {ℓa ℓb : Level} (ℂ : Category ℓa ℓb) where
|
||||||
record RawMonad : Set ℓ where
|
record RawMonad : Set ℓ where
|
||||||
field
|
field
|
||||||
-- R ~ m
|
-- R ~ m
|
||||||
R : Functor ℂ ℂ
|
R : EndoFunctor ℂ
|
||||||
-- η ~ pure
|
-- η ~ pure
|
||||||
ηNatTrans : NaturalTransformation F.identity R
|
ηNatTrans : NaturalTransformation F.identity R
|
||||||
-- μ ~ join
|
-- μ ~ join
|
||||||
|
@ -208,7 +208,7 @@ module Kleisli {ℓa ℓb : Level} (ℂ : Category ℓa ℓb) where
|
||||||
bind (pure ∘ g) ∘ bind (pure ∘ f) ∎
|
bind (pure ∘ g) ∘ bind (pure ∘ f) ∎
|
||||||
|
|
||||||
-- TODO: Naming!
|
-- TODO: Naming!
|
||||||
R : Functor ℂ ℂ
|
R : EndoFunctor ℂ
|
||||||
Functor.raw R = rawR
|
Functor.raw R = rawR
|
||||||
Functor.isFunctor R = isFunctorR
|
Functor.isFunctor R = isFunctorR
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ module _ {ℓa ℓb : Level} {ℂ : Category ℓa ℓb} where
|
||||||
open K.Monad m
|
open K.Monad m
|
||||||
open NaturalTransformation ℂ ℂ
|
open NaturalTransformation ℂ ℂ
|
||||||
|
|
||||||
R² : Functor ℂ ℂ
|
R² : EndoFunctor ℂ
|
||||||
R² = F[ R ∘ R ]
|
R² = F[ R ∘ R ]
|
||||||
|
|
||||||
ηNatTrans : NaturalTransformation F.identity R
|
ηNatTrans : NaturalTransformation F.identity R
|
||||||
|
|
Loading…
Reference in a new issue