Section Forall2.
(** [Forall2]: stating that elements of two lists are pairwise related. *)
Variables A B : Type.
Variable R : A -> B -> Prop.
Inductive Forall2 : list A -> list B -> Prop :=
| Forall2_nil : Forall2 [] []
| Forall2_cons : forall x y l l',
R x y -> Forall2 l l' -> Forall2 (x::l) (y::l').
#[local]
Hint Constructors Forall2 : core.
(* NB: when deprecation phase ends, instead of removing prove "Reflexive R -> Reflexive Forall2" and close #6131 *)
#[deprecated(since = "8.18", use = Forall2_nil)]

Theorem Forall_Exists_exists_Forall2 l1 l2 :
Forall (fun a => Exists (R a) l2) l1 ->
exists l2', Forall2 l1 l2' /\ incl l2' l2.