Section RemoveDups.
Variable A : Set.
Variable eqd : EqDec A.
Fixpoint removeDups(ls : list A) :=
match ls with
| nil => nil
| a' :: ls' =>
if (in_dec (EqDec_dec _) a' ls') then (removeDups ls') else (a' :: (removeDups ls'))
end.
induction ls; intuition; simpl in *.
destruct (in_dec (EqDec_dec eqd) a ls).
right.
eauto.
simpl in *.
intuition.
Qed.

Theorem removeDups_NoDup :
forall (ls : list A),
NoDup (removeDups ls).