Define and use Endofunctor

This commit is contained in:
Frederik Hanghøj Iversen 2018-02-28 19:03:11 +01:00
parent 3c77c69cf6
commit f2b1a36a75
2 changed files with 6 additions and 3 deletions

View file

@ -45,6 +45,9 @@ module _ {c c' d d'}
open Functor
EndoFunctor : {a b} ( : Category a b) Set _
EndoFunctor = Functor
module _
{a b : Level}
{ 𝔻 : Category a b}

View file

@ -22,7 +22,7 @@ module Monoidal {a b : Level} ( : Category a b) where
record RawMonad : Set where
field
-- R ~ m
R : Functor
R : EndoFunctor
-- η ~ pure
ηNatTrans : NaturalTransformation F.identity R
-- μ ~ join
@ -208,7 +208,7 @@ module Kleisli {a b : Level} ( : Category a b) where
bind (pure g) bind (pure f)
-- TODO: Naming!
R : Functor
R : EndoFunctor
Functor.raw R = rawR
Functor.isFunctor R = isFunctorR
@ -275,7 +275,7 @@ module _ {a b : Level} { : Category a b} where
open K.Monad m
open NaturalTransformation
: Functor
: EndoFunctor
= F[ R R ]
ηNatTrans : NaturalTransformation F.identity R