Double universal quantification on a list #
This file provides an API for List.Forall₂ (definition in Data.List.Defs).
Forall₂ R l₁ l₂ means that l₁ and l₂ have the same length, and whenever a is the nth element
of l₁, and b is the nth element of l₂, then R a b is satisfied.
theorem List.Forall₂.flip {α : Type u_1} {β : Type u_2} {R : α → β → Prop} {a : List α} {b : List β} :
Forall₂ (_root_.flip R) b a → Forall₂ R a b
theorem Relator.LeftUnique.forall₂ {α : Type u_1} {β : Type u_2} {R : α → β → Prop} (hr : LeftUnique R) :
theorem Relator.RightUnique.forall₂ {α : Type u_1} {β : Type u_2} {R : α → β → Prop} (hr : RightUnique R) :
theorem Relator.BiUnique.forall₂ {α : Type u_1} {β : Type u_2} {R : α → β → Prop} (hr : BiUnique R) :
BiUnique (List.Forall₂ R)
theorem List.rel_mem {α : Type u_1} {β : Type u_2} {R : α → β → Prop} (hr : Relator.BiUnique R) :
Relator.LiftFun R (Relator.LiftFun (Forall₂ R) Iff) (fun (x1 : α) (x2 : List α) => x1 ∈ x2)
fun (x1 : β) (x2 : List β) => x1 ∈ x2
theorem List.rel_map {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {R : α → β → Prop} {P : γ → δ → Prop} :
Relator.LiftFun (Relator.LiftFun R P) (Relator.LiftFun (Forall₂ R) (Forall₂ P)) map map
theorem List.rel_append {α : Type u_1} {β : Type u_2} {R : α → β → Prop} :
Relator.LiftFun (Forall₂ R) (Relator.LiftFun (Forall₂ R) (Forall₂ R)) (fun (x1 x2 : List α) => x1 ++ x2)
fun (x1 x2 : List β) => x1 ++ x2
theorem List.rel_reverse {α : Type u_1} {β : Type u_2} {R : α → β → Prop} :
Relator.LiftFun (Forall₂ R) (Forall₂ R) reverse reverse
theorem List.rel_flatMap {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {R : α → β → Prop} {P : γ → δ → Prop} :
Relator.LiftFun (Forall₂ R) (Relator.LiftFun (Relator.LiftFun R (Forall₂ P)) (Forall₂ P)) (Function.swap flatMap)
(Function.swap flatMap)
theorem List.rel_foldl {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {R : α → β → Prop} {P : γ → δ → Prop} :
Relator.LiftFun (Relator.LiftFun P (Relator.LiftFun R P)) (Relator.LiftFun P (Relator.LiftFun (Forall₂ R) P)) foldl
foldl
theorem List.rel_foldr {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {R : α → β → Prop} {P : γ → δ → Prop} :
Relator.LiftFun (Relator.LiftFun R (Relator.LiftFun P P)) (Relator.LiftFun P (Relator.LiftFun (Forall₂ R) P)) foldr
foldr
theorem List.rel_filterMap {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {R : α → β → Prop} {P : γ → δ → Prop} :
Relator.LiftFun (Relator.LiftFun R (Option.Rel P)) (Relator.LiftFun (Forall₂ R) (Forall₂ P)) filterMap filterMap
Given a relation R, sublist_forall₂ r l₁ l₂ indicates that there is a sublist of l₂ such
that forall₂ r l₁ l₂.
- nil {α : Type u_1} {β : Type u_2} {R : α → β → Prop} {l : List β} : SublistForall₂ R [] l
- cons {α : Type u_1} {β : Type u_2} {R : α → β → Prop} {a₁ : α} {a₂ : β} {l₁ : List α} {l₂ : List β} : R a₁ a₂ → SublistForall₂ R l₁ l₂ → SublistForall₂ R (a₁ :: l₁) (a₂ :: l₂)
- cons_right {α : Type u_1} {β : Type u_2} {R : α → β → Prop} {a : β} {l₁ : List α} {l₂ : List β} : SublistForall₂ R l₁ l₂ → SublistForall₂ R l₁ (a :: l₂)
Instances For
instance List.SublistForall₂.is_refl {α : Type u_1} {Rₐ : α → α → Prop} [Std.Refl Rₐ] :
Std.Refl (SublistForall₂ Rₐ)
instance List.SublistForall₂.is_trans {α : Type u_1} {Rₐ : α → α → Prop} [IsTrans α Rₐ] :
IsTrans (List α) (SublistForall₂ Rₐ)
theorem List.Sublist.sublistForall₂ {α : Type u_1} {Rₐ : α → α → Prop} {l₁ l₂ : List α} (h : l₁.Sublist l₂) [Std.Refl Rₐ] :
SublistForall₂ Rₐ l₁ l₂
theorem List.tail_sublistForall₂_self {α : Type u_1} {Rₐ : α → α → Prop} [Std.Refl Rₐ] (l : List α) :
SublistForall₂ Rₐ l.tail l