Define profunctor adjunctions
This commit is contained in:
parent
f2392954c2
commit
80fb506448
|
@ -10,11 +10,20 @@ interface ProfunctorFunctor (0 t : (Type -> Type -> Type) -> k -> k' -> Type) wh
|
||||||
promap : Profunctor p => p :-> q -> t p :-> t q
|
promap : Profunctor p => p :-> q -> t p :-> t q
|
||||||
|
|
||||||
public export
|
public export
|
||||||
interface ProfunctorFunctor t => ProfunctorMonad (0 t : (Type -> Type -> Type) -> Type -> Type -> Type) where
|
interface ProfunctorFunctor t =>
|
||||||
|
ProfunctorMonad (0 t : (Type -> Type -> Type) -> Type -> Type -> Type) where
|
||||||
propure : Profunctor p => p :-> t p
|
propure : Profunctor p => p :-> t p
|
||||||
projoin : Profunctor p => t (t p) :-> t p
|
projoin : Profunctor p => t (t p) :-> t p
|
||||||
|
|
||||||
public export
|
public export
|
||||||
interface ProfunctorFunctor t => ProfunctorComonad (0 t : (Type -> Type -> Type) -> Type -> Type -> Type) where
|
interface ProfunctorFunctor t =>
|
||||||
|
ProfunctorComonad (0 t : (Type -> Type -> Type) -> Type -> Type -> Type) where
|
||||||
proextract : Profunctor p => t p :-> p
|
proextract : Profunctor p => t p :-> p
|
||||||
produplicate : Profunctor p => t p :-> t (t p)
|
produplicate : Profunctor p => t p :-> t (t p)
|
||||||
|
|
||||||
|
public export
|
||||||
|
interface (ProfunctorFunctor f, ProfunctorFunctor u) =>
|
||||||
|
ProfunctorAdjunction (0 f : (Type -> Type -> Type) -> Type -> Type -> Type)
|
||||||
|
(0 u : (Type -> Type -> Type) -> Type -> Type -> Type) | f, u where
|
||||||
|
prounit : Profunctor p => p :-> u (f p)
|
||||||
|
procounit : Profunctor p => f (u p) :-> p
|
||||||
|
|
Loading…
Reference in a new issue