English
The function toList maps a NeWord to a list of pairs, concatenating recursively for append.
Русский
Функция toList отображает NeWord в список пар, конкатенируя рекурсивно для append.
LaTeX
$$$$ \\text{toList} : \\mathrm{NeWord}\\, M \\to \\mathrm{List}(\\Sigma i, M i) \\quad\\text{defined by } \\\\$$
Lean4
/-- The list represented by a given `NeWord` -/
@[simp]
def toList : ∀ {i j} (_w : NeWord M i j), List (Σ i, M i)
| i, _, singleton x _ => [⟨i, x⟩]
| _, _, append w₁ _ w₂ => w₁.toList ++ w₂.toList