Theory of univariate polynomials #
The definitions include
degree
, Monic
, leadingCoeff
Results include
degree_mul
: The degree of the product is the sum of degreesleadingCoeff_add_of_degree_eq
andleadingCoeff_add_of_degree_lt
: The leading_coefficient of a sum is determined by the leading coefficients and degrees
Equations
- Polynomial.instWellFoundedRelation = { rel := fun (p q : Polynomial R) => p.degree < q.degree, wf := ⋯ }
natDegree p
forces degree p
to ℕ, by defining natDegree 0 = 0
.
Equations
- p.natDegree = WithBot.unbot' 0 p.degree
Instances For
leadingCoeff p
gives the coefficient of the highest power of X
in p
Equations
- p.leadingCoeff = p.coeff p.natDegree
Instances For
a polynomial is Monic
if its leading coefficient is 1
Instances For
Alias of the reverse direction of Polynomial.natDegree_le_iff_degree_le
.
Alias of the forward direction of Polynomial.natDegree_le_iff_degree_le
.
Alias of Polynomial.natDegree_natCast
.
Alias of Polynomial.degree_natCast_le
.
We can reexpress a sum over p.support
as a sum over range n
,
for any n
satisfying p.natDegree < n
.
We can reexpress a sum over p.support
as a sum over range (p.natDegree + 1)
.
Alias of Polynomial.natDegree_intCast
.
Alias of Polynomial.degree_intCast_le
.
The second-highest coefficient, or 0 for constants
Instances For
degree
as a monoid homomorphism between R[X]
and Multiplicative (WithBot ℕ)
.
This is useful to prove results about multiplication and degree.
Equations
- Polynomial.degreeMonoidHom = { toFun := Polynomial.degree, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Polynomial.leadingCoeff
bundled as a MonoidHom
when R
has NoZeroDivisors
, and thus
leadingCoeff
is multiplicative
Equations
- Polynomial.leadingCoeffHom = { toFun := Polynomial.leadingCoeff, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Equations
- ⋯ = ⋯
This lemma is useful for working with the intDegree
of a rational function.
Characterization of a unit of a polynomial ring over an integral domain R
.
See Polynomial.isUnit_iff_coeff_isUnit_isNilpotent
when R
is a commutative ring.
Equations
- ⋯ = ⋯