English
The head of a NeWord is defined recursively: for a singleton it is the element itself; for an append, it is the head of the left part.
Русский
Голова NeWord задаётся рекурсивно: для единичного элемента — сам элемент; при конкатенации — голова левой части.
LaTeX
$$$$ head : \\forall {i j}, (\\mathrm{NeWord}\\, M\\, i\\, j) \\to M i \\\\ | singleton x => x \\\\ | append w_1 _ _ => w_1.head $$$$
Lean4
/-- The first letter of a `NeWord` -/
@[simp]
def head : ∀ {i j} (_w : NeWord M i j), M i
| _, _, singleton x _ => x
| _, _, append w₁ _ _ => w₁.head