Vanishing (d+1)-st forward difference characterises numerical polynomials
ProvedfwdDiff_iter_succ_eq_zero_iff_exists_polynomial_natDegree_leLet be a field of characteristic zero, let be an arbitrary function and let be a natural number. Here fwdDiff (1 : ℤ) is the forward difference operator with step on functions , sending to , and (fwdDiff (1 : ℤ))^[d + 1] is its -fold iterate. The theorem asserts the equivalence of two statements: first, that the iterated difference vanishes at every integer ; and second, that there exists a polynomial whose natDegree is at most and which satisfies , the evaluation being at the image of under the canonical map , for every integer . Note that the degree bound is stated for natDegree, so for it allows exactly the constant functions; no regularity or growth hypothesis on is imposed, and agreement of with is required on all of , not merely on the non-negative integers.
This is the basic algebraic lemma of the theory of numerical polynomials: a function on is polynomial of degree at most exactly when its -st finite difference vanishes identically. It is used in the project to show that the Euler characteristics of twists of a module presheaf are given by a polynomial in , with control on its degree.
import Mathlib set_option maxHeartbeats 4000000 set_option synthInstance.maxHeartbeats 400000 set_option backward.isDefEq.respectTransparency.types false set_option autoImplicit false
theorem fwdDiff_iter_succ_eq_zero_iff_exists_polynomial_natDegree_le
{R : Type*} [Field R] [CharZero R] (f : ℤ → R) (d : ℕ) :
(∀ n : ℤ, (fwdDiff (1 : ℤ))^[d + 1] f n = 0) ↔
∃ p : Polynomial R, p.natDegree ≤ d ∧ ∀ n : ℤ, f n = p.eval (n : R) := by sorry