#[global]
Hint Resolve subset_cardinal union_cardinal add_cardinal_1 add_cardinal_2 : core.
End WPropertiesOn.
(** Now comes variants for self-contained weak sets and for full sets. For these variants, only one argument is necessary. Thanks to the subtyping [WS<=S], the [Properties] functor which is meant to be used on modules [(M:S)] can simply be an alias of [WProperties]. *)
Module WProperties (M:WSets) := WPropertiesOn M.E M.
Module Properties := WProperties.
(** Now comes some properties specific to the element ordering, invalid for Weak Sets. *)
Module OrdProperties (M:Sets).
Module Import ME:=OrderedTypeFacts(M.E).
Module Import ML:=OrderedTypeLists(M.E).
Module Import P := Properties M.
#[global]
Hint Resolve elements_spec2 : core.
#[global]
Hint Immediate
min_elt_spec1 min_elt_spec2 min_elt_spec3
max_elt_spec1 max_elt_spec2 max_elt_spec3 : set.

(* Specifications: *)
(** First, a specialized version of SortA_equivlistA_eqlistA: *)
Lemma sort_equivlistA_eqlistA : forall l l' : list elt,
sort E.lt l -> sort E.lt l' -> equivlistA E.eq l l' -> eqlistA E.eq l l'.