Last active
August 29, 2015 14:07
-
-
Save zraffer/a33d32bd9d629bce0f1b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
infixr 1 ~> | |
Relation_Arrow : Type -> Type | |
Relation_Arrow ob = (source, target: ob) -> Type | |
class RelationClass (ob: Type) where | |
(~>) : Relation_Arrow ob | |
record RelationRecord : Type where | |
MkRelation : (recOb: Type) -> (recInst: RelationClass recOb) -> RelationRecord | |
IsProductMorphism' : (RelationClass l, RelationClass r) => Relation_Arrow (l, r) | |
IsProductMorphism' (lS, rS) (lT, rT) = ((lS ~> lT), (rS ~> rT)) | |
IsProductMorphism : (rL, rR: RelationRecord) -> Relation_Arrow ((recOb rL), (recOb rR)) | |
IsProductMorphism rL rR = IsProductMorphism' @{recInst rL} @{recInst rR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment