Documentation

Mathlib.Data.List.Triplewise

Triplewise predicates on list. #

Main definitions #

inductive List.Triplewise {α : Type u_1} (p : αααProp) :
List αProp

Whether a predicate holds for all ordered triples of elements of a list.

Instances For
    theorem List.triplewise_iff {α : Type u_1} (p : αααProp) (a✝ : List α) :
    Triplewise p a✝ a✝ = [] (a : α), (l : List α), Pairwise (p a) l Triplewise p l a✝ = a :: l
    theorem List.triplewise_cons {α : Type u_1} {a : α} {l : List α} {p : αααProp} :
    Triplewise p (a :: l) Pairwise (p a) l Triplewise p l
    @[simp]
    theorem List.triplewise_singleton {α : Type u_1} (a : α) (p : αααProp) :
    @[simp]
    theorem List.triplewise_pair {α : Type u_1} (a b : α) (p : αααProp) :
    @[simp]
    theorem List.triplewise_triple {α : Type u_1} {a b c : α} {p : αααProp} :
    Triplewise p [a, b, c] p a b c
    theorem List.Triplewise.imp {α : Type u_1} {l : List α} {p q : αααProp} (h : ∀ {a b c : α}, p a b cq a b c) (hl : Triplewise p l) :
    theorem List.triplewise_map {α : Type u_1} {β : Type u_2} {l : List α} {f : αβ} {p' : βββProp} :
    Triplewise p' (map f l) Triplewise (fun (a b c : α) => p' (f a) (f b) (f c)) l
    theorem List.Triplewise.of_map {α : Type u_1} {β : Type u_2} {l : List α} {p : αααProp} {f : αβ} {p' : βββProp} (h : ∀ {a b c : α}, p' (f a) (f b) (f c)p a b c) (hl : Triplewise p' (List.map f l)) :
    theorem List.Triplewise.map {α : Type u_1} {β : Type u_2} {l : List α} {p : αααProp} {f : αβ} {p' : βββProp} (h : ∀ {a b c : α}, p a b cp' (f a) (f b) (f c)) (hl : Triplewise p l) :
    theorem List.triplewise_iff_getElem {α : Type u_1} {l : List α} {p : αααProp} :
    Triplewise p l ∀ (i j k : Nat) (hij : i < j) (hjk : j < k) (hk : k < l.length), p l[i] l[j] l[k]
    theorem List.triplewise_append {α : Type u_1} {l₁ l₂ : List α} {p : αααProp} :
    Triplewise p (l₁ ++ l₂) Triplewise p l₁ Triplewise p l₂ (∀ (a : α), a l₁Pairwise (p a) l₂) ∀ (a : α), a l₂Pairwise (fun (x y : α) => p x y a) l₁
    theorem List.triplewise_reverse {α : Type u_1} {l : List α} {p : αααProp} :
    Triplewise p l.reverse Triplewise (fun (a b c : α) => p c b a) l