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 {elt} p q (m:list (key*elt)) :
eqk p q -> InA eqk p m -> InA eqk q m.