Module KeyDecidableType(D:DecidableType).
Local Open Scope signature_scope.
Local Notation key := D.t.
Definition eqk {elt} : relation (key*elt) := D.eq @@1.
Definition eqke {elt} : relation (key*elt) := D.eq * Logic.eq.
Hint Unfold eqk eqke : core.
(** eqk, eqke are equalities *)
Instance eqk_equiv {elt} : Equivalence (@eqk elt) := _.
Instance eqke_equiv {elt} : Equivalence (@eqke elt) := _.
(** eqke is stricter than eqk *)
Instance eqke_eqk {elt} : subrelation (@eqke elt) (@eqk elt).
Hint Resolve InA_eqke_eqk : core.

Lemma InA_eqk_eqke {elt} p (m:list (key*elt)) :
InA eqk p m -> exists q, eqk p q /\ InA eqke q m.