Documentation

Mathlib.Data.List.SplitBy

Split a list into contiguous runs of elements which pairwise satisfy a relation. #

This file provides the basic API for List.splitBy which is defined in Core. The main results are the following:

@[simp]
theorem List.splitBy_nil {α : Type u_1} (r : ααBool) :
List.splitBy r [] = []
@[simp]
theorem List.flatten_splitBy {α : Type u_1} (r : ααBool) (l : List α) :
(List.splitBy r l).flatten = l
theorem List.nil_not_mem_splitBy {α : Type u_1} (r : ααBool) (l : List α) :
theorem List.ne_nil_of_mem_splitBy {α : Type u_1} {m : List α} (r : ααBool) {l : List α} (h : m List.splitBy r l) :
m []
theorem List.chain'_of_mem_splitBy {α : Type u_1} {m : List α} {r : ααBool} {l : List α} (h : m List.splitBy r l) :
List.Chain' (fun (x y : α) => r x y = true) m
theorem List.chain'_getLast_head_splitBy {α : Type u_1} (r : ααBool) (l : List α) :
List.Chain' (fun (a b : List α) => ∃ (ha : a []), ∃ (hb : b []), r (a.getLast ha) (b.head hb) = false) (List.splitBy r l)
@[deprecated List.splitBy_nil]
theorem List.groupBy_nil {α : Type u_1} (r : ααBool) :
List.splitBy r [] = []

Alias of List.splitBy_nil.

@[deprecated List.flatten_splitBy]
theorem List.flatten_groupBy {α : Type u_1} (r : ααBool) (l : List α) :
(List.splitBy r l).flatten = l

Alias of List.flatten_splitBy.

@[deprecated List.flatten_splitBy]
theorem List.join_splitBy {α : Type u_1} (r : ααBool) (l : List α) :
(List.splitBy r l).flatten = l

Alias of List.flatten_splitBy.

@[deprecated List.nil_not_mem_splitBy]
theorem List.nil_not_mem_groupBy {α : Type u_1} (r : ααBool) (l : List α) :

Alias of List.nil_not_mem_splitBy.

@[deprecated List.ne_nil_of_mem_splitBy]
theorem List.ne_nil_of_mem_groupBy {α : Type u_1} {m : List α} (r : ααBool) {l : List α} (h : m List.splitBy r l) :
m []

Alias of List.ne_nil_of_mem_splitBy.

@[deprecated List.chain'_of_mem_splitBy]
theorem List.chain'_of_mem_groupBy {α : Type u_1} {m : List α} {r : ααBool} {l : List α} (h : m List.splitBy r l) :
List.Chain' (fun (x y : α) => r x y = true) m

Alias of List.chain'_of_mem_splitBy.

@[deprecated List.chain'_getLast_head_splitBy]
theorem List.chain'_getLast_head_groupBy {α : Type u_1} (r : ααBool) (l : List α) :
List.Chain' (fun (a b : List α) => ∃ (ha : a []), ∃ (hb : b []), r (a.getLast ha) (b.head hb) = false) (List.splitBy r l)

Alias of List.chain'_getLast_head_splitBy.