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