Finite residues for pure-power polynomial relations #
For relations X i ^ ell - r i with totalDegree (r i) < ell, a finite sum of
polynomial coefficients defines the formal Laurent residue. The degree bound proves
truncated_stable: increasing a sufficiently large truncation bound does not change the sum.
Consequently linear is an actual linear functional, and residue_low_degree identifies it
with the top-box coefficient at low degree. The coefficient ring is any commutative ring.
This is an algebraic step toward real-arithmetic counting bounds, ported from
LeanCanny.CountingHierarchy.PurePowerResidue at lean-canny commit
970f28a5ecefc1327402ade16c068aa4b1b2c183. No resource bound is asserted here.
One summand in the finite Laurent coefficient formula.
The geometric-series numerator grows by at most ell - 1 per index increment.
The total-degree decrease bounds every contributing geometric-series index.
A fixed rectangular truncation is a linear map in its numerator.
All truncations above the numerator's degree give the same finite sum.
The truncation at the numerator degree gives the canonical residue functional.
The canonical residue, with linearity derived from finite degree bounds.
At low degree the residue is simply the top-box coefficient.