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.
induction ls; intuition; simpl in *.
econstructor.
destruct (in_dec (EqDec_dec eqd) a ls); intuition.
econstructor; intuition.
eapply n.
eapply removeDups_in.
trivial.
Qed.

Lemma in_removeDups :
forall (ls : list A) a,
In a ls ->
In a (removeDups ls).