weights of Finsupp functions #
The theory of multivariate polynomials and power series is built
on the type σ →₀ ℕ which gives the exponents of the monomials.
Many aspects of the theory (degree, order, graded ring structure)
require to classify these exponents according to their total sum
∑ i, f i, or variants, and this files provides some API for that.
Weight #
We fix a type σ, a semiring R, an R-module M,
as well as a function w : σ → M. (The important case is R = ℕ.)
Finsupp.weightof a finitely supported functionf : σ →₀ Rwith respect tow: it is the sum∑ (f i) • (w i). It is anAddMonoidHommap defined usingFinsupp.linearCombination.Finsupp.le_weightsays thatf s ≤ f.weight wwhenM = ℕFinsupp.le_weight_of_ne_zerosays thatw s ≤ f.weight wforOrderedAddCommMonoid M, whenf s ≠ 0and allw iare nonnegative.Finsupp.le_weight_of_ne_zero'is the same statement forCanonicallyOrderedAddCommMonoid M.NonTorsionWeight: all valuesw sare non torsion inM.Finsupp.weight_eq_zero_iff_eq_zerosays thatf.weight w = 0ifff = 0forNonTorsionWeight wandCanonicallyOrderedAddCommMonoid M.For
w : σ → ℕandFinite σ,Finsupp.finite_of_nat_weight_leproves that there are finitely manyf : σ →₀ ℕof bounded weight.
Degree #
Finsupp.degree fis the sum of allf s, fors ∈ f.support. The present choice is to have it defined as a plain function.Finsupp.degree_eq_zero_iffsays thatf.degree = 0ifff = 0.Finsupp.le_degreesays thatf s ≤ f.degree.Finsupp.degree_eq_weight_onesaysf.degree = f.weight 1whenRis a semiring. This is useful to access the additivity properties ofFinsupp.degreeFor
Finite σ,Finsupp.finite_of_degree_leproves that there are finitely manyf : σ →₀ ℕof bounded degree.
TODO #
- Maybe
Finsupp.weight wandFinsupp.degreeshould have similar types, bothAddMonoidHomor both functions.
The weight of the finitely supported function f : σ →₀ R
with respect to w : σ → M is the sum ∑ i, f i • w i.
Equations
Instances For
Without zero divisors, nonzero weight is a NonTorsionWeight
If M is a CanonicallyOrderedAddCommMonoid, then weight f is zero iff f = 0.
The degree of a finsupp function.