module Equality:sig..end
Representation of an equality between a set of elements.
The signatures is roughly a subset of Ocaml's Set.S.
An equality always contains at least two elements; operations that break
this invariant return Trivial.
include Datatype.S
val pair : Equality.elt -> Equality.elt -> t Equality.trivialThe equality between two elements.
val mem : Equality.elt -> t -> boolmem x s tests whether x belongs to the equality s.
val add : Equality.elt -> t -> tadd x s returns the equality between all elements of s and x.
val remove : Equality.elt -> t -> t Equality.trivialremove x s returns the equality between all elements of s, except x.
val union : t -> t -> tUnion.
val inter : t -> t -> t Equality.trivialIntersection.
val intersects : t -> t -> boolintersect s s' = true iff the two equalities both involve the same
element.
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (Equality.elt -> unit) -> t -> unititer f s applies f in turn to all elements of s.
val fold : (Equality.elt -> 'a -> 'a) -> t -> 'a -> 'afold f s a computes (f xN ... (f x2 (f x1 a))...),
where x1 ... xN are the elements of s, in increasing order.
val for_all : (Equality.elt -> bool) -> t -> boolfor_all p s checks if all elements of the equality
satisfy the predicate p.
val exists : (Equality.elt -> bool) -> t -> boolexists p s checks if at least one element of the equality
satisfies the predicate p.
val filter : (Equality.elt -> bool) -> t -> t Equality.trivialfilter p s returns the equality between all elements in s
that satisfy predicate p.
val cardinal : t -> intReturn the number of elements of the equality.
val choose : t -> Equality.eltReturn the representative of the equality.
val elements : t -> Equality.elt listReturns the list of all elements of the given set.