induction l as [|a l IH].
- left. inversion 1.
- destruct (In_dec a l') as [IN|IN].
+ destruct IH as [IC|IC].
* left. destruct 1; subst; auto.
* right. contradict IC. intros x H. apply IC; now right.
+ right. contradict IN. apply IN; now left.
Qed.

(* Specifications: *)
Lemma NoDup_dec (l:list A) : {NoDup l}+{~NoDup l}.
Proof using A dec.