diff options
Diffstat (limited to 'src/Data/Setoid/Product.idr')
-rw-r--r-- | src/Data/Setoid/Product.idr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Data/Setoid/Product.idr b/src/Data/Setoid/Product.idr index 6693d40..b1e8ce3 100644 --- a/src/Data/Setoid/Product.idr +++ b/src/Data/Setoid/Product.idr @@ -101,6 +101,11 @@ wrapIntro [] = [] wrapIntro (r :: rs) = r :: wrapIntro rs public export +wrapFunc : (0 x : IndexedSetoid b) -> (0 f : a -> b) + -> Product (reindex f x) ~> reindex (map f) (Product x) +wrapFunc x f = MkIndexedSetoidHomomorphism (\_ => wrap f) (\_, _, _ => wrapIntro) + +public export unwrapIntro : forall f . {0 rel : (i : b) -> Rel (x i)} -> {is : _} -> {0 xs, ys : x ^ map f is} -> Pointwise rel xs ys -> Pointwise (\i => rel (f i)) {is = is} (unwrap f xs) (unwrap f ys) unwrapIntro {is = []} [] = [] |