Join of a list of lists #
This file proves basic properties of List.flatten, which concatenates a list of lists. It is
defined in Init.Prelude.
We can rebracket x ++ (l₁ ++ x) ++ (l₂ ++ x) ++ ... ++ (lₙ ++ x) to
(x ++ l₁) ++ (x ++ l₂) ++ ... ++ (x ++ lₙ) ++ x where L = [l₁, l₂, ..., lₙ].
@[deprecated List.getLast_getLast_eq_getLast_flatten (since := "2026-01-31")]
theorem
List.getLast_flatten_of_getLast_ne_nil
{α : Type u_1}
{l : List (List α)}
(hl : l ≠ [])
(hl' : l.getLast hl ≠ [])
:
Alias of List.getLast_getLast_eq_getLast_flatten.
See also getLast_flatten_eq_getLast_getLast, which switches around the proof obligations.
@[deprecated List.getLast_flatten_eq_getLast_getLast (since := "2026-01-31")]
theorem
List.getLast_flatten_of_flatten_ne_nil
{α : Type u_1}
{l : List (List α)}
(hl : l.flatten ≠ [])
(hl' : l.getLast ⋯ ≠ [])
:
Alias of List.getLast_flatten_eq_getLast_getLast.
See also getLast_getLast_eq_getLast_flatten, which switches around the proof obligations.