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 Permutation_hasDups : forall (A : Set)(eqd : EqDec A)(ls1 ls2 : list A), Permutation ls1 ls2 -> hasDups eqd ls1 = hasDups eqd ls2.