Fixpoint hasDups (A : Set)(eqd : EqDec A)(ls : list A) :=
  match ls with
    | nil => false
    | a :: ls' =>
      if (in_dec (EqDec_dec _) a ls') then true else
        (hasDups _ ls')
  end.

Theorem hasDups_true_not_NoDup : forall (A : Set)(eqd : EqDec A)(ls : list A), hasDups eqd ls = true <-> (~ NoDup ls).