Section Min_Max_Elt.
(** We emulate two [max_elt] and [min_elt] functions. *)
Fixpoint max_elt_aux (l:list (key*elt)) := match l with
| nil => None
| (x,e)::nil => Some (x,e)
| (x,e)::l => max_elt_aux l
end.
Definition max_elt m := max_elt_aux (elements m).
Definition min_elt m : option (key*elt) := match elements m with
| nil => None
| (x,e)::_ => Some (x,e)
end.

Lemma min_elt_MapsTo :
forall m x e, min_elt m = Some (x,e) -> MapsTo x e m.