English
For successor v, decoding yields a head and tail via unpair, and then recurses.
Русский
Для числа-следователя v разбор даёт голову и хвост через unpair, далее идёт рекурсия.
LaTeX
$$$\\decode(\\text{List } \\alpha) (\\operatorname{succ} v) = (\\cdot :: \\cdot) <$> \\decode(\\alpha) v.\\text{unpair.1} <*> \\decodeList v.\\text{unpair.2}$$$
Lean4
@[simp, nolint unusedHavesSuffices] -- This is a false positive in the unusedHavesSuffices linter.
theorem decode_list_succ (v : ℕ) :
decode (α := List α) (succ v) = (· :: ·) <$> decode (α := α) v.unpair.1 <*> decode (α := List α) v.unpair.2 :=
show decodeList (succ v) = _ by
rcases e : unpair v with ⟨v₁, v₂⟩
simp [decodeList, e]; rfl