Degrees and variables of polynomials #
This file establishes many results about the degree and variable sets of a multivariate polynomial.
The variable set of a polynomial $P \in R[X]$ is a finset containing each $x \in X$
that appears in a monomial in $P$.
The degree set of a polynomial $P \in R[X]$ is a multiset containing, for each $x$ in the
variable set, $n$ copies of $x$, where $n$ is the maximum number of copies of $x$ appearing in a
monomial of $P$.
Main declarations #
-
mv_polynomial.degrees p: the multiset of variables representing the union of the multisets corresponding to each non-zero monomial inp. For example if7 ≠ 0inRandp = x²y+7y³thendegrees p = {x, x, y, y, y} -
mv_polynomial.vars p: the finset of variables occurring inp. For example ifp = x⁴y+yzthenvars p = {x, y, z} -
mv_polynomial.degree_of n p : ℕ: the total degree ofpwith respect to the variablen. For example ifp = x⁴y+yzthendegree_of y p = 1. -
mv_polynomial.total_degree p : ℕ: the max of the sizes of the multisetsswhose monomialsX^soccur inp. For example ifp = x⁴y+yzthentotal_degree p = 5.
Notation #
As in other polynomial files, we typically use the notation:
-
σ τ : Type*(indexing the variables) -
R : Type*[comm_semiring R](the coefficients) -
s : σ →₀ ℕ, a function fromσtoℕwhich is zero away from a finite set. This will give rise to a monomial inmv_polynomial σ Rwhich mathematicians might callX^s -
r : R -
i : σ, with corresponding monomialX i, often denotedX_iby mathematicians -
p : mv_polynomial σ R
degrees #
The maximal degrees of each variable in a multi-variable polynomial, expressed as a multiset.
(For example, degrees (x^2 * y + y^3) would be {x, x, y, y, y}.)
vars #
vars p is the set of variables appearing in the polynomial p
The variables of the product of a family of polynomials are a subset of the union of the sets of variables of each polynomial.
degree_of #
degree_of n p gives the highest power of X_n that appears in p
Equations
total_degree #
total_degree p gives the maximum |s| over the monomials X^s in p
vars and eval #
If f₁ and f₂ are ring homs out of the polynomial ring and p₁ and p₂ are polynomials,
then f₁ p₁ = f₂ p₂ if p₁ = p₂ and f₁ and f₂ are equal on R and on the variables
of p₁.