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.

Lemma remove_all_NoDup_split : forall l l' l0 l1 a, NoDup l' -> remove_all l l' = l0 ++ a :: l1 -> remove_all l (remove A_eq_dec a l') = l0 ++ l1.