Lemma 9.22 — the general solution of (A − r)^k f = 0 is (c₁ + c₂n + ⋯ + c_k n^(k−1)) rⁿ
ProvedAppliedComb.Recurrence.repeated_rootLet be the space of functions and the advancement operator. Let be an integer and a nonzero real number, and consider the equation
Then the general solution of (9.5.7) is
that is, a function solves (9.5.7) if and only if there are real constants with (9.5.8) for every .
This handles a repeated root of the characteristic polynomial; combined with Theorem 9.21 it gives the general solution of any constant-coefficient linear recurrence whose characteristic polynomial splits over .
Formalization Note. The book's statement does not repeat ; it is the standing assumption of Section 9.5.2 (p. 200, "an equation of the form where ") and is added as a hypothesis. "General solution" is read as an equality of sets, so the Lean statement is an iff. The constant c i for i : Fin k is the book's and multiplies (with ); is cast to and is the integer power.
import Mathlib import Definitions.Def_AppliedComb_Recurrence_advance
namespace AppliedComb.Recurrence
/-- Keller–Trotter, Lemma 9.22 (p. 201). Let `k ≥ 1` and `r ≠ 0` (the standing assumption of
Section 9.5.2, p. 200: the book's lemma is stated for a root `r` of an equation `(A − r) f = 0`
with `r ≠ 0`). Then the general solution `f : ℤ → ℝ` of `(A − r)^k f = 0` (9.5.7) is
`f(n) = c₁ rⁿ + c₂ n rⁿ + c₃ n² rⁿ + ⋯ + c_k n^(k-1) rⁿ` (9.5.8): a function solves (9.5.7) if and
only if it has this form for some real constants `c₁, …, c_k` (here `c i` for `i : Fin k`
multiplies `n^i rⁿ`, so `c 0` is the book's `c₁`). -/
theorem repeated_root (k : ℕ) (hk : 1 ≤ k) (r : ℝ) (hr : r ≠ 0) (f : ℤ → ℝ) :
((advance - r • (1 : Module.End ℝ (ℤ → ℝ))) ^ k) f = 0 ↔
∃ c : Fin k → ℝ, ∀ n : ℤ, f n = ∑ i : Fin k, c i * (n : ℝ) ^ (i : ℕ) * r ^ n := by sorry
end AppliedComb.Recurrence
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be the space of all functions . Let be the advancement operator, , and the identity operator. The statement has these inputs:
- a natural number with ;
- a real number with ;
- a function .
The theorem asserts an equivalence. The left side is
Here is the operator composed with itself times. The right side says there exist real constants such that
In this formula:
- is the integer , viewed as a real number, raised to the natural power , with ;
- is an integer power, well defined for negative because .
The equivalence runs in both directions: every such combination solves the equation, and every solution has this form. Uniqueness of the constants is not asserted.
Degenerate cases:
- : excluded by the hypothesis .
- : the equation is for all . The form is .
- : the power is taken to be , so the term is . Every term with vanishes, so the formula gives .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.