summaryrefslogtreecommitdiff
path: root/src/Data/Setoid/Indexed.idr
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Setoid/Indexed.idr')
-rw-r--r--src/Data/Setoid/Indexed.idr7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Data/Setoid/Indexed.idr b/src/Data/Setoid/Indexed.idr
index 7277932..db5fb07 100644
--- a/src/Data/Setoid/Indexed.idr
+++ b/src/Data/Setoid/Indexed.idr
@@ -40,5 +40,12 @@ public export
(.index) x i = MkSetoid (x.U i) (x.relation i) (x.equivalence i)
public export
+(.reindex) : ISetoid b -> (f : a -> b) -> ISetoid a
+(.reindex) x f = MkISetoid
+ (\i => x.U $ f i)
+ (\i => x.relation $ f i)
+ (\i => x.equivalence $ f i)
+
+public export
isetoid : (a -> Type) -> ISetoid a
isetoid u = MkISetoid u (\_ => Equal) (\_ => equiv)