2 | import Control.Relation
7 | record GenIso (carrier : Type)
9 | (rel : {0 x, y : carrier} -> Rel (mor x y))
10 | {auto pre : Preorder carrier mor}
11 | (left, right : carrier) where
12 | constructor MkGenIso
14 | from : mor right left
15 | 0 toFrom : rel (transitive to from) Relation.reflexive
16 | 0 fromTo : rel (transitive from to) Relation.reflexive
20 | record Iso (left, right : Type) where
23 | from : right -> left
24 | 0 toFrom : (x : right) -> to (from x) = x
25 | 0 fromTo : (x : left) -> from (to x) = x