Fixpoint remove_list_sub {A} (A_eqb : A -> A -> bool) (sublist : list A) (lst : list A) : list A :=
match sublist with
| [] => lst
| h :: t => remove_list_sub A_eqb t (remove_aux A_eqb lst h)
end.

(* Specifications: *)
Lemma remove_aux_lemma {A} `{EqDec A} : forall (lst : list A) (a a' : A),
In a' lst ->
In a' (remove_aux eqb lst a) \/ a = a'.
Lemma remove_list_sub_lemma {A} `{EqDec A} : forall (a : A) (sub : list A) (lst : list A),
In a lst ->
In a (remove_list_sub eqb sub lst) \/ In a sub.
Lemma In_remove_aux {A} `{EqDec A} :
forall (lst : list A) (x a : A),
In x (remove_aux eqb lst a) ->
In x lst.
Lemma remove_list_sub_weaken {A} `{EqDec A} : forall dlt lst b,
In b (remove_list_sub eqb dlt lst) -> In b lst.
Lemma map_takeL {A B} (f : A -> B) : forall n l,
List.map f (takeL n l) = takeL n (List.map f l).