Section CompcertSpec.
Fixpoint xfind (i j : key) (m : t A) : option A :=
match i, j with
| _, xH => find i m
| xO ii, xO jj => xfind ii jj m
| xI ii, xI jj => xfind ii jj m
| _, _ => None
end.
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 := _.

Lemma mem_find :
forall m x, mem x m = match find x m with None => false | _ => true end.