summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Brown <greg.brown01@ed.ac.uk>2022-11-25 14:32:38 +0000
committerGreg Brown <greg.brown01@ed.ac.uk>2022-11-25 14:32:38 +0000
commitb3319dd7f206a82fde4000526cab766a936afcc3 (patch)
treecbf56ef931400a378707b9cc6ccb47396822bef9
parent865e9dbdd0a7ed2b0dad75f2c672ad84e9e85bcc (diff)
Define indexed function types.
-rw-r--r--src/Soat/Relation.idr10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Soat/Relation.idr b/src/Soat/Relation.idr
index 9a394c2..cb94216 100644
--- a/src/Soat/Relation.idr
+++ b/src/Soat/Relation.idr
@@ -73,3 +73,13 @@ record ISetoid (a : Type) where
0 U : a -> Type
0 relation : IRel U
equivalence : IEquivalence U relation
+
+public export
+IFunc : {a : Type} -> (x, y : a -> Type) -> Type
+IFunc {a} x y = (i : a) -> x i -> y i
+
+public export
+record IFunction {a : Type} (x, y : ISetoid a) where
+ constructor MkIFunction
+ func : IFunc x.U y.U
+ cong : (i : a) -> {u, v : x.U i} -> x.relation i u v -> y.relation i (func i u) (func i v)