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 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}

View file

@ -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
: Functor : EndoFunctor
= F[ R R ] = F[ R R ]
ηNatTrans : NaturalTransformation F.identity R ηNatTrans : NaturalTransformation F.identity R