Notation Forall_nil := ListDef.Forall_nil (only parsing).Notation Forall_cons := ListDef.Forall_cons (only parsing).

(* Specifications: *)
Lemma Exists_map A B (f : A -> B) P l : Exists P (map f l) <-> Exists (fun x => P (f x)) l.
Lemma Exists_concat A P (ls : list (list A)) : Exists P (concat ls) <-> Exists (Exists P) ls.
Lemma Exists_flat_map A B P ls (f : A -> list B) : Exists P (flat_map f ls) <-> Exists (fun d => Exists P (f d)) ls.
Lemma Forall_map A B (f : A -> B) P l : Forall P (map f l) <-> Forall (fun x => P (f x)) l.
Lemma Forall_concat A P (ls : list (list A)) : Forall P (concat ls) <-> Forall (Forall P) ls.
Lemma Forall_flat_map A B P ls (f : A -> list B) : Forall P (flat_map f ls) <-> Forall (fun d => Forall P (f d)) ls.
Lemma exists_Forall A B : forall (P : A -> B -> Prop) l, (exists k, Forall (P k) l) -> Forall (fun x => exists k, P k x) l.
Lemma Forall_image A B : forall (f : A -> B) l, Forall (fun y => exists x, y = f x) l <-> exists l', l = map f l'.
Lemma concat_nil_Forall A : forall (l : list (list A)), concat l = [] <-> Forall (fun x => x = []) l.
Lemma in_flat_map_Exists A B : forall (f : A -> list B) x l, In x (flat_map f l) <-> Exists (fun y => In x (f y)) l.
Lemma notin_flat_map_Forall A B : forall (f : A -> list B) x l, ~ In x (flat_map f l) <-> Forall (fun y => ~ In x (f y)) l.