Proof using.
intros. unfold has_key, key_of in *.
break_match. subst. simpl in *. break_if; try discriminate. repeat (do_bool; intuition).
subst; reflexivity.
Qed.

Lemma key_of_has_key_true :
forall c i e,
key_of e = (c, i) ->
has_key c i e = true.