Definition max_elt (s : t) : option elt :=
    match max_elt s with
    | inleft (exist _ x _) => Some x
    | inright _ => None
    end.

(* Specifications: *)
Lemma max_elt_1 : forall (s : t) (x : elt), max_elt s = Some x -> In x s.
Lemma max_elt_2 : forall (s : t) (x y : elt), max_elt s = Some x -> In y s -> ~ E.lt x y.
Lemma max_elt_3 : forall s : t, max_elt s = None -> Empty s.