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 function- f : σ →₀ Rwith respect to- w: it is the sum- ∑ (f i) • (w i). It is an- AddMonoidHommap defined using- Finsupp.linearCombination.
- Finsupp.le_weightsays that- f s ≤ f.weight wwhen- M = ℕ
- Finsupp.le_weight_of_ne_zerosays that- w s ≤ f.weight wfor- OrderedAddCommMonoid M, when- f s ≠ 0and all- w iare nonnegative.
- Finsupp.le_weight_of_ne_zero'is the same statement for- CanonicallyOrderedAddCommMonoid M.
- NonTorsionWeight: all values- w sare non torsion in- M.
- Finsupp.weight_eq_zero_iff_eq_zerosays that- f.weight w = 0iff- f = 0for- NonTorsionWeight wand- CanonicallyOrderedAddCommMonoid M.
- For - w : σ → ℕand- Finite σ,- Finsupp.finite_of_nat_weight_leproves that there are finitely many- f : σ →₀ ℕof bounded weight.
Degree #
- Finsupp.degree fis the sum of all- f s, for- s ∈ f.support. The present choice is to have it defined as a plain function.
- Finsupp.degree_eq_zero_iffsays that- f.degree = 0iff- f = 0.
- Finsupp.le_degreesays that- f s ≤ f.degree.
- Finsupp.degree_eq_weight_onesays- f.degree = f.weight 1when- Ris a semiring. This is useful to access the additivity properties of- Finsupp.degree
- For - Finite σ,- Finsupp.finite_of_degree_leproves that there are finitely many- f : σ →₀ ℕ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.