Definition disjoint_list {A} (l1 l2 : list A) :=
  forall a, ~ (In a l1 /\ In a l2).Fixpoint takeL {A} n (l : list A) : list A :=
  match n with
  | O => []
  | S m => match l with
          | [] => []
          | h :: t => h :: takeL m t 
          end
  end.Fixpoint remove_list {A : Type} (p : A -> bool) (xs : list A) : list A :=
  match xs with
  | [] => [] 
  | x' :: xs' =>
      if p x'
      then remove_list p xs'
      else
        x' :: remove_list p xs'
  end.

(* Specifications: *)
Lemma takeL_in : forall {X} (x : X) n l, In x (takeL n l) -> In x l.
Lemma In_remove_list_In {A} (p : A -> bool) (xs : list A) : forall x, In x (remove_list p xs) -> In x xs.
Lemma In_remove_list_p {A} (p : A -> bool) (xs : list A) : forall x, In x (remove_list p xs) -> p x = false.
Lemma In_remove_list {A} (p : A -> bool) (xs : list A) : forall x, In x xs -> p x = false -> In x (remove_list p xs).
Lemma In_remove_list_iff {A} (p : A -> bool) (xs : list A) : forall x, In x (remove_list p xs) <-> In x xs /\ p x = false.
Lemma takeL_in : forall {X} (x : X) n l, In x (takeL n l) -> In x l.
Lemma In_remove_list_In {A} (p : A -> bool) (xs : list A) : forall x, In x (remove_list p xs) -> In x xs.
Lemma In_remove_list_p {A} (p : A -> bool) (xs : list A) : forall x, In x (remove_list p xs) -> p x = false.
Lemma In_remove_list {A} (p : A -> bool) (xs : list A) : forall x, In x xs -> p x = false -> In x (remove_list p xs).
Lemma In_remove_list_iff {A} (p : A -> bool) (xs : list A) : forall x, In x (remove_list p xs) <-> In x xs /\ p x = false.