Last active
April 4, 2021 11:51
-
-
Save Gurkenglas/9f02cfeba04b35e178753ae4663349ef to your computer and use it in GitHub Desktop.
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
data o:Category where | |
s:o ~> t:o | |
f:b~>c ⚬ g:a~>b -> a~>c | x⚬y ⚬ z == x ⚬ y⚬z | |
identity: a~>a | identity⚬f == f == f⚬identity | |
hask:Category where | |
hask = Type | |
(~>) = (->) | |
(⚬) = (.) | |
identity = id | |
cat:Category where | |
cat = Category | |
c~>d : Category where | |
c~>d = F: c->d where | |
F: a~>b -> F a ~> F b | F f⚬g == F f ⚬ F g && F identity == identity | |
F:s~>t ≈> G:s~>t = η: F x ~> G x | η⚬f == f⚬η | |
(~>) = (≈>) | |
(⚬) = (.) | |
identity = id | |
opposite c : Category where | |
opposite = id | |
(~>) = flip (~>) | |
(⚬) = flip (⚬) | |
identity = identity | |
yoneda: C ~> opposite C ~> hask where | |
yoneda = flip (->) : C -> opposite C ~> hask where | |
yoneda = flip (⚬) : a~>b -> b~>c -> a~>c | |
yoneda = (⚬) : c~>d -> yoneda c ≈> yoneda d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment