Section remove_all.
Variable A : Type.
Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}.
Fixpoint remove_all (to_delete l : list A) : list A :=
match to_delete with
| [] => l
| d :: ds => remove_all ds (remove A_eq_dec d l)
end.
Proof using.
induction ds; intros; simpl in *; intuition.
eauto using in_remove.
Qed.
Proof using.
induction ds; intros; simpl in *; intuition auto using remove_preserve.
Qed.
Proof using.
induction ds; intros; simpl in *; intuition.
- subst. find_apply_lem_hyp in_remove_all_was_in.
eapply remove_In; eauto.
- eauto.
Qed.
Proof using.
intros. induction ys; simpl in *; intuition.
Qed.

Lemma remove_all_cons :
forall ys a l,
(remove_all ys (a :: l) = remove_all ys l /\
In a ys) \/
(remove_all ys (a :: l) = a :: (remove_all ys l) /\
~In a ys).