Proof using.
induction xs; intros; simpl in *.
- intuition.
- break_if; intuition; subst; simpl; auto.
Qed.

Lemma filter_dedup (pred : A -> bool) :
forall xs (p : A) ys,
pred p = false ->
filter pred (dedup (xs ++ ys)) = filter pred (dedup (xs ++ p :: ys)).