Section Elt.
Variable elt : Type.
Notation key:=t.
Definition eqk (p p':key*elt) := eq (fst p) (fst p').
Definition eqke (p p':key*elt) :=
eq (fst p) (fst p') /\ (snd p) = (snd p').
Hint Unfold eqk eqke : core.
Hint Extern 2 (eqke ?a ?b) => split : core.
(* eqke is stricter than eqk *)
(* eqk, eqke are equalities *)
Hint Resolve eqk_trans eqke_trans eqk_refl eqke_refl : core.
Hint Immediate eqk_sym eqke_sym : core.
Global Instance eqk_equiv : Equivalence eqk.
Hint Resolve InA_eqke_eqk : core.

Lemma InA_eqk : forall p q m, eqk p q -> InA eqk p m -> InA eqk q m.