diff options
author | Greg Brown <greg.brown01@ed.ac.uk> | 2022-12-02 14:14:44 +0000 |
---|---|---|
committer | Greg Brown <greg.brown01@ed.ac.uk> | 2022-12-02 14:14:44 +0000 |
commit | 2bd69bf893b7e1ebe4186639526451caf2083b12 (patch) | |
tree | 9e6830a98da09c91e337b250aa0658caf4c26d69 /src/Data/Morphism | |
parent | 45e9bbec72bf338306d446012f077e195439aed0 (diff) |
Diffstat (limited to 'src/Data/Morphism')
-rw-r--r-- | src/Data/Morphism/Indexed.idr | 8 |
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) |