Created
September 15, 2023 09:21
Dependent Profunctor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface HiProfunctor (0 p : (0 xt : Type) -> (xt -> Type) -> Type) where | |
dimap : (a, b : Type) -> (c : b -> Type) -> (d : (a -> Type)) | |
-> (ab : (a -> b)) -> ((y : a) -> c (ab y) -> d y) | |
-> p b c -> p a d | |
data DepFun : (0 xt : Type) -> (xt -> Type) -> Type where | |
DF : (0 xt : Type) -> (yt : xt -> Type) -> ((x : xt) -> yt x) -> DepFun xt yt | |
HiProfunctor DepFun where | |
dimap a b c d ab acd (DF _ _ bc) = DF a d (\av : a => acd av (bc (ab av))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment