English
Definition of lower': a recursive transformation on lists of natural numbers that computes successive differences.
Русский
Определение lower': рекурсивное преобразование списка натуральных чисел по последовательным разности
LaTeX
$$$\\text{lower'}:\\ A^* \\times \\mathbb{N} \\to A^*$ with \\text{lower'}(m::l,n)=(m-n)::\\text{lower'}(l,m+1)$$$
Lean4
/-- Outputs the list of differences minus one of the input list, that is
`lower' [a₁, a₂, a₃, ...] n = [a₁ - n, a₂ - a₁ - 1, a₃ - a₂ - 1, ...]`. -/
def lower' : List ℕ → ℕ → List ℕ
| [], _ => []
| m :: l, n => (m - n) :: lower' l (m + 1)