Proof with auto.
induction l...
simpl.
intros.
destruct (d x a).
elimtype False.
apply H.
left...
simpl.
apply IHl.
intro.
apply H.
right...
Qed.

(* Specifications: *)
Lemma eq_count_NoDup X (d: forall (x y: X), { x = y } + { x <> y }) (x: X) l:
NoDup l -> eq_count d x l <= 1.