induction l...
simpl.
intros.
inversion_clear H.
apply NoDup_cons...
Qed.

(* Specifications: *)
Lemma length_filter X (p: X -> bool) (l: list X): length (filter p l) = count p l.
Proof with auto. intros. induction l... simpl. destruct (p a)... simpl... Qed.
Lemma length_filter_le T (p: T -> bool) (l: list T): length (filter p l) <= length l.
Lemma In_filter T (p: T -> bool) (t: T): p t = true -> forall l, In t l -> In t (filter p l).
Lemma incl_trans A (x y: list A): incl x y -> forall z, incl y z -> incl x z.
Hint Resolve filter_preserves_incl.
Lemma In_inv_perm X (x: X) (l: list X):
In x l -> exists l', Permutation (x :: l') l.