Numerical polynomials and mixed finite differences #
This file supplies an algebraic finite-difference API for integer-valued functions on integer
lattices. A point of the lattice is a function ι → ℤ, and a numerical function is simply a
function (ι → ℤ) → ℤ. No scheme, sheaf, or line-bundle vocabulary enters this root; geometric
polynomiality theorems such as Snapper's theorem consume it from algebraic geometry.
Upstream audit #
Mathlib's Mathlib.Algebra.Group.ForwardDiff already provides the one-direction operator
fwdDiff, its iterates, the Gregory--Newton formula, additivity, and the expected vanishing
theorems for ordinary polynomials. We reuse that operator rather than defining a competing
univariate theory.
jjaassoonn/DimensionTheory contains substantial theory of univariate integer-valued and Hilbert
polynomials, including binomial-polynomial coefficient extraction. At the time of this audit it
does not provide arbitrary-direction mixed differences, is pinned to a different Mathlib commit,
and would add a large dependency for an API which is otherwise elementary. Consequently
DerivedAlgGeo
uses it as design precedent but does not depend on it. The definitions below form the small
multivariable layer missing from Mathlib and specialize back to Mathlib's fwdDiff in one variable.
Main definitions #
Lattice ιis the exponent latticeι → ℤ.mixedDifference directions fsuccessively applies forward differences in every direction.DegreeLE n fmeans that every(n + 1)-fold mixed difference vanishes.coefficient directions fevaluates a mixed difference at the origin; in top degree this is a symmetric multilinear function of the directions.surfacePairingbundles the degree-two specialization as a symmetric bilinear form.
The exponent lattice for a family indexed by ι. For ι = Fin r, this is ℤ^r.
Equations
- NumericalPolynomial.Lattice ι = (ι → ℤ)
Instances For
An integer-valued function on an exponent lattice.
Equations
Instances For
The forward difference of f in the lattice direction v.
Equations
- NumericalPolynomial.difference v f = fwdDiff v f
Instances For
Forward differences in two lattice directions commute.
Splitting a direction introduces one second-order correction term.
The positive unit vector in coordinate i.
Equations
Instances For
The forward difference in coordinate i.
Equations
Instances For
Successive forward differences in the listed directions.
Equations
- NumericalPolynomial.mixedDifference [] x✝ = x✝
- NumericalPolynomial.mixedDifference (v :: directions) x✝ = NumericalPolynomial.difference v (NumericalPolynomial.mixedDifference directions x✝)
Instances For
Applying one more difference can be moved past any list of mixed differences.
A mixed difference depends only on the multiset of its directions.
A numerical function has degree at most n when all (n + 1)-fold mixed differences vanish.
This is the Eilenberg--Mac Lane finite-difference characterization in exactly the form used by Snapper's theorem: the directions are arbitrary lattice vectors, not merely coordinate vectors.
Equations
- NumericalPolynomial.DegreeLE n f = ∀ (directions : List (NumericalPolynomial.Lattice ι)), directions.length = n + 1 → NumericalPolynomial.mixedDifference directions f = 0
Instances For
Equivalent fixed-arity form of the degree criterion. This is convenient when a later
construction already presents its directions as an (n + 1)-tuple.
A function of degree at most n also has degree at most n + 1.
Monotonicity of the degree bound.
Taking a finite difference lowers a positive degree bound by one.
The mixed finite-difference coefficient attached to a list of directions.
Equations
- NumericalPolynomial.coefficient directions f = NumericalPolynomial.mixedDifference directions f 0
Instances For
Coefficient extraction is symmetric in the chosen directions.
Coefficient extraction with n explicitly indexed directions.
Equations
- NumericalPolynomial.topCoefficient directions f = NumericalPolynomial.coefficient (List.ofFn directions) f
Instances For
topCoefficient is invariant under every permutation of its n inputs.
The coordinate directions prescribed by a multi-index. The internal order chosen by
Finset.toList is immaterial by coefficient_eq_of_perm.
Equations
- NumericalPolynomial.coordinateDirections powers = List.flatMap (fun (i : ι) => List.replicate (powers i) (NumericalPolynomial.coordinateDirection i)) Finset.univ.toList
Instances For
The multivariable Newton coefficient indexed by coordinate multiplicities.
Equations
Instances For
An n-fold mixed difference of a degree-≤ n function is constant, so evaluating it at the
origin loses no information.
Additivity of a top mixed coefficient in its first direction. The correction term in
difference_add_direction vanishes because it has one direction too many.
Additivity of a top mixed coefficient in an arbitrary direction slot.
A top mixed coefficient, with all but one direction fixed, as an additive homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Integer homogeneity in every slot; together with coefficient_middle_add, this is
multilinearity of the top mixed difference.
One-variable specialization #
Embed an integer as a point of the rank-one lattice.
Equations
Instances For
Regard an ordinary integer-valued function as a function on the rank-one lattice.
Equations
- NumericalPolynomial.oneVariable f x = f (x 0)
Instances For
The positive unit direction in the rank-one lattice.
Instances For
Repeated mixed differences in the unit direction agree with Mathlib's iterated fwdDiff.
In one variable, generic coefficient extraction is the usual Newton coefficient.
Surface specialization #
The degree-two top mixed difference, bundled as a bilinear form over ℤ.
Equations
- NumericalPolynomial.surfacePairing f hf = { toFun := fun (v : NumericalPolynomial.Lattice ι) => (NumericalPolynomial.coefficientAddHom [v] [] ⋯).toIntLinearMap, map_add' := ⋯, map_smul' := ⋯ }
Instances For
The surface pairing is symmetric.