Lemmas about List.Pairwise #
theorem
List.map_getElem_sublist
{α : Type u_1}
{l : List α}
{is : List (Fin l.length)}
(h : List.Pairwise (fun (x1 x2 : Fin l.length) => x1 < x2) is)
:
Given a list is of monotonically increasing indices into l, getting each index
produces a sublist of l.
@[deprecated List.map_getElem_sublist (since := "2024-07-30")]
theorem
List.map_get_sublist
{α : Type u_1}
{l : List α}
{is : List (Fin l.length)}
(h : List.Pairwise (fun (x1 x2 : Fin l.length) => ↑x1 < ↑x2) is)
:
(List.map l.get is).Sublist l
Given a sublist l' <+ l, there exists an increasing list of indices is such that
l' = is.map fun i => l[i].