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:
List.join_splitBy
: the lists inList.splitBy
join to the original list.List.nil_not_mem_splitBy
: the empty list is not contained inList.splitBy
.List.chain'_of_mem_splitBy
: any two adjacent elements in a list inList.splitBy
are related by the specified relation.List.chain'_getLast_head_splitBy
: the last element of each list inList.splitBy
is not related to the first element of the next list.
@[deprecated List.splitBy_nil (since := "2024-10-30")]
Alias of List.splitBy_nil
.
@[deprecated List.flatten_splitBy (since := "2024-10-30")]
Alias of List.flatten_splitBy
.
@[deprecated List.flatten_splitBy (since := "2024-10-15")]
Alias of List.flatten_splitBy
.
@[deprecated List.nil_not_mem_splitBy (since := "2024-10-30")]
Alias of List.nil_not_mem_splitBy
.
@[deprecated List.ne_nil_of_mem_splitBy (since := "2024-10-30")]
theorem
List.ne_nil_of_mem_groupBy
{α : Type u_1}
{m : List α}
(r : α → α → Bool)
{l : List α}
(h : m ∈ splitBy r l)
:
m ≠ []
Alias of List.ne_nil_of_mem_splitBy
.
@[deprecated List.chain'_getLast_head_splitBy (since := "2024-10-30")]
Alias of List.chain'_getLast_head_splitBy
.