Theorem 9.18 — the Principal Theorem: the solutions of p(A)f = 0 form a k-dimensional space
ProvedAppliedComb.Recurrence.principalLet be the real vector space of all functions and the advancement operator, . Let be a positive integer and let be real constants with and . Then the set of all solutions of the homogeneous linear equation
is a -dimensional subspace of :
This is the basic theorem about constant-coefficient linear recurrence equations: solving such an equation amounts to finding a basis of , and every solution is a linear combination of basis functions.
Formalization Note. is solutionSpace k c, the kernel of opPoly k c on ℤ → ℝ, with c 0 and c (Fin.last k) . Dimension is Module.rank (a cardinal), so the statement also asserts that is finite-dimensional. On -indexed functions the hypothesis is essential (for the dimension drops); this is not Mathlib's LinearRecurrence.solSpace_rank, which concerns -indexed sequences and a monic recurrence.
import Mathlib import Definitions.Def_AppliedComb_Recurrence_advance
namespace AppliedComb.Recurrence
/-- Keller–Trotter, Theorem 9.18 (p. 199), the Principal Theorem. Let `k` be a positive integer
and let `c₀, c₁, …, c_k` be real constants with `c₀ ≠ 0` and `c_k ≠ 0`. Then the set `W` of all
solutions `f : ℤ → ℝ` of the homogeneous equation `(c₀ A^k + c₁ A^(k-1) + ⋯ + c_k) f = 0` (9.5.1)
is a `k`-dimensional subspace of `V = (ℤ → ℝ)`: its dimension (`Module.rank`, a cardinal, so
an infinite-dimensional `W` would not satisfy the statement) equals `k`. -/
theorem principal (k : ℕ) (hk : 0 < k) (c : Fin (k + 1) → ℝ) (hc0 : c 0 ≠ 0)
(hck : c (Fin.last k) ≠ 0) :
Module.rank ℝ (solutionSpace k c) = k := by sorry
end AppliedComb.Recurrence
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
The theorem is stated for a natural number and a list of real numbers , indexed by . It has three hypotheses:
- , so ;
- , the coefficient at index ;
- , the coefficient at the last index .
Under these hypotheses it claims that
Here is the object the code calls solutionSpace k c. It is defined in a separate imported definitions file whose code is not part of this declaration, so its actual content cannot be read from what is given here. The statement only shows two things about it:
- it takes and the coefficient list as its only inputs;
- it has the structure of a vector space over , since its rank over is being taken.
A comment attached to the theorem describes as the set of all functions that satisfy a homogeneous linear recurrence with coefficients . That comment is documentation, not code. Nothing in this declaration checks that really is that set.
The rank is the general rank of a module. It is a cardinal number: the largest possible size of a linearly independent subset of over , taken as a supremum. The right-hand side is the natural number read as a cardinal. So the equation says has a linearly independent set of exactly elements and none larger. In other words, is finite-dimensional over with dimension exactly . If were infinite-dimensional, its rank would be an infinite cardinal and the equation would be false. If it were the zero space, its rank would be , which also fails the equation because .
Degenerate cases.
- is excluded. The hypothesis rules it out, so the statement says nothing about a one-coefficient list.
- : the coefficients are just and , both required to be nonzero, and the claim is that has dimension exactly .
- The two nonzero conditions never coincide. Because , index and index are different, so they are two separate conditions on two different coefficients.
- Coefficients in between are unrestricted. Any of may be zero.
- The hypotheses can always be met. For example, every satisfies them, so the theorem is not vacuously true for that reason.
- No hidden default values. The statement itself uses no division, no subtraction of natural numbers, no integrals and no suprema of empty sets. Any such behaviour could only sit inside the hidden definition of , which is not visible here.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.