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_false_NoDup : forall (A : Set)(eqd : EqDec A)(ls : list A), hasDups _ ls = false <-> NoDup ls.