End CompcertSpec.
Definition MapsTo (i:key)(v:A)(m:t A) := find i m = Some v.
Definition In (i:key)(m:t A) := exists e:A, MapsTo i e m.
Definition Empty m := forall (a : key)(e:A) , ~ MapsTo a e m.
Definition eq_key (p p':key*A) := E.eq (fst p) (fst p').
Definition eq_key_elt (p p':key*A) :=
E.eq (fst p) (fst p') /\ (snd p) = (snd p').
Definition lt_key (p p':key*A) := E.lt (fst p) (fst p').
Global Instance eqk_equiv : Equivalence eq_key := _.
Global Instance eqke_equiv : Equivalence eq_key_elt := _.
Global Instance ltk_strorder : StrictOrder lt_key := _.

(* Specifications: *)
Lemma mem_find :
forall m x, mem x m = match find x m with None => false | _ => true end.
Lemma Empty_alt : forall m, Empty m <-> forall a, find a m = None.
Lemma Empty_Node : forall l o r, Empty (Node l o r) <-> o=None /\ Empty l /\ Empty r.
Section FMapSpec.
Lemma mem_1 : forall m x, In x m -> mem x m = true.
Lemma mem_2 : forall m x, mem x m = true -> In x m.
Variable  m m' m'' : t A.