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

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