Inductive NoDup : list A -> Prop :=
    | NoDup_nil : NoDup []
    | NoDup_cons : forall x l, ~ In x l -> NoDup l -> NoDup (x::l).Inductive NoDup : list A -> Prop :=
    | NoDup_nil : NoDup []
    | NoDup_cons : forall x l, ~ In x l -> NoDup l -> NoDup (x::l).Inductive NoDup : list A -> Prop :=
    | NoDup_nil : NoDup []
    | NoDup_cons : forall x l, ~ In x l -> NoDup l -> NoDup (x::l).

(* Specifications: *)
Lemma NoDup_Add a l l' : Add a l l' -> (NoDup l' <-> NoDup l /\ ~In a l).
Lemma NoDup_remove l l' a : NoDup (l++a::l') -> NoDup (l++l') /\ ~In a (l++l').
Lemma NoDup_remove_1 l l' a : NoDup (l++a::l') -> NoDup (l++l').
Lemma NoDup_remove_2 l l' a : NoDup (l++a::l') -> ~In a (l++l').
Theorem NoDup_cons_iff a l: NoDup (a::l) <-> ~ In a l /\ NoDup l.
Lemma NoDup_app (l1 l2 : list A): NoDup l1 -> NoDup l2 -> (forall a, In a l1 -> ~ In a l2) -> NoDup (l1 ++ l2).
Lemma NoDup_app_remove_l l l' : NoDup (l++l') -> NoDup l'.
Lemma NoDup_app_remove_r l l' : NoDup (l++l') -> NoDup l.
Lemma NoDup_rev l : NoDup l -> NoDup (rev l).
Lemma NoDup_filter f l : NoDup l -> NoDup (filter f l).