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

Lemma has_key_false_key_of :
forall c i e,
has_key c i e = false ->
key_of e <> (c, i).