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.instWellFoundedRelationPolynomial = { rel := fun (p q : Polynomial R) => Polynomial.degree p < Polynomial.degree q, wf := ⋯ }
leadingCoeff p
gives the coefficient of the highest power of X
in p
Equations
a polynomial is Monic
if its leading coefficient is 1
Equations
- Polynomial.Monic p = (Polynomial.leadingCoeff p = 1)
Instances For
Alias of the forward direction of Polynomial.natDegree_le_iff_degree_le
.
Alias of the reverse direction of Polynomial.natDegree_le_iff_degree_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)
.
The second-highest coefficient, or 0 for constants
Equations
- Polynomial.nextCoeff p = if Polynomial.natDegree p = 0 then 0 else Polynomial.coeff p (Polynomial.natDegree p - 1)
degree
as a monoid homomorphism between R[X]
and Multiplicative (WithBot ℕ)
.
This is useful to prove results about multiplication and degree.
Equations
- Polynomial.degreeMonoidHom = { toOneHom := { toFun := Polynomial.degree, map_one' := ⋯ }, map_mul' := ⋯ }
Polynomial.leadingCoeff
bundled as a MonoidHom
when R
has NoZeroDivisors
, and thus
leadingCoeff
is multiplicative
Equations
- Polynomial.leadingCoeffHom = { toOneHom := { toFun := Polynomial.leadingCoeff, map_one' := ⋯ }, map_mul' := ⋯ }