diff options
author | Greg Brown <greg.brown01@ed.ac.uk> | 2022-12-05 14:37:30 +0000 |
---|---|---|
committer | Greg Brown <greg.brown01@ed.ac.uk> | 2022-12-05 14:37:30 +0000 |
commit | e8a5ba7c22c98d32671d02e41960598566bdcc58 (patch) | |
tree | c051ae8e9b4bab7002e0de36bf7266442ce2e891 /src/Data/Setoid | |
parent | 45e9bbec72bf338306d446012f077e195439aed0 (diff) |
WIP: port to libraryrefactor/setoids
Diffstat (limited to 'src/Data/Setoid')
-rw-r--r-- | src/Data/Setoid/Indexed.idr | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/Data/Setoid/Indexed.idr b/src/Data/Setoid/Indexed.idr deleted file mode 100644 index 7277932..0000000 --- a/src/Data/Setoid/Indexed.idr +++ /dev/null @@ -1,44 +0,0 @@ -module Data.Setoid.Indexed - -import public Data.Setoid - -%default total - -public export -IRel : {a : Type} -> (a -> Type) -> Type -IRel {a = a} x = (i : a) -> x i -> x i -> Type - -public export -IReflexive : {a : Type} -> (x : a -> Type) -> IRel x -> Type -IReflexive x rel = (i : a) -> Reflexive (x i) (rel i) - -public export -ISymmetric : {a : Type} -> (x : a -> Type) -> IRel x -> Type -ISymmetric x rel = (i : a) -> Symmetric (x i) (rel i) - -public export -ITransitive : {a : Type} -> (x : a -> Type) -> IRel x -> Type -ITransitive x rel = (i : a) -> Transitive (x i) (rel i) - -public export -IEquivalence : {a : Type} -> (x : a -> Type) -> IRel x -> Type -IEquivalence x rel = (i : a) -> Setoid.Equivalence (x i) (rel i) - -public export -record ISetoid (a : Type) where - constructor MkISetoid - 0 U : a -> Type - 0 relation : IRel U - equivalence : IEquivalence U relation - -public export -fromIndexed : (a -> Setoid) -> ISetoid a -fromIndexed x = MkISetoid (\i => (x i).U) (\i => (x i).relation) (\i => (x i).equivalence) - -public export -(.index) : ISetoid a -> a -> Setoid -(.index) x i = MkSetoid (x.U i) (x.relation i) (x.equivalence i) - -public export -isetoid : (a -> Type) -> ISetoid a -isetoid u = MkISetoid u (\_ => Equal) (\_ => equiv) |