summaryrefslogtreecommitdiff
path: root/src/Data/Morphism/Indexed.idr
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Morphism/Indexed.idr')
-rw-r--r--src/Data/Morphism/Indexed.idr8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Data/Morphism/Indexed.idr b/src/Data/Morphism/Indexed.idr
index c271c90..6737275 100644
--- a/src/Data/Morphism/Indexed.idr
+++ b/src/Data/Morphism/Indexed.idr
@@ -11,3 +11,11 @@ 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)
+
+public export
+ifunc : IFunc x y -> IFunction (isetoid x) (isetoid y)
+ifunc f = MkIFunction f (\i => cong (f i))
+
+public export
+compFunc : IFunction b c -> IFunction a b -> IFunction a c
+compFunc f g = MkIFunction (\i => f.func i . g.func i) (\i => f.cong i . g.cong i)