(** Effective computation of a list without duplicates *)
Fixpoint nodup (l : list A) : list A :=
match l with
| [] => []
| x::xs => if in_dec decA x xs then nodup xs else x::(nodup xs)
end.

Theorem NoDup_count_occ l:
NoDup l <-> (forall x:A, count_occ decA l x <= 1).