Module E := D.Definition compare (s s':t) := M.compare s s'.Definition min_elt (s:t) : option elt := M.min_elt s.Definition max_elt (s:t) : option elt := M.max_elt s.Definition lt (s s':t) := M.lt s s'.(** Specification of [lt] *)
#[global]
  Instance lt_strorder : StrictOrder lt.#[global]
  Instance lt_compat : Proper (eq==>eq==>iff) lt.

(* Specifications: *)
Lemma compare_spec : CompSpec eq lt s s' (compare s s').
Lemma elements_spec2 : sort O.lt (elements s).
Lemma min_elt_spec1 : min_elt s = Some x -> In x s.
Lemma min_elt_spec2 : min_elt s = Some x -> In y s -> ~ O.lt y x.
Lemma min_elt_spec3 : min_elt s = None -> Empty s.
Lemma max_elt_spec1 : max_elt s = Some x -> In x s.
Lemma max_elt_spec2 : max_elt s = Some x -> In y s -> ~ O.lt x y.
Lemma max_elt_spec3 : max_elt s = None -> Empty s.
Lemma choose_spec3 : choose s = Some x -> choose s' = Some y -> Equal s s' -> O.eq x y.