Degree of univariate polynomials #
Main definitions #
Polynomial.degree
: the degree of a polynomial, where0
has degree⊥
Polynomial.natDegree
: the degree of a polynomial, where0
has degree0
Polynomial.leadingCoeff
: the leading coefficient of a polynomialPolynomial.Monic
: a polynomial is monic if its leading coefficient is 0Polynomial.nextCoeff
: the next coefficient after the leading coefficient
Main results #
Polynomial.degree_eq_natDegree
: the degree and natDegree coincide for nonzero polynomials
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
Equations
- p.Monic = (p.leadingCoeff = 1)
Instances For
Equations
@[simp]
theorem
Polynomial.Monic.coeff_natDegree
{R : Type u}
[Semiring R]
{p : Polynomial R}
(hp : p.Monic)
:
@[simp]
@[simp]
theorem
Polynomial.natDegree_eq_of_degree_eq_some
{R : Type u}
[Semiring R]
{p : Polynomial R}
{n : ℕ}
(h : p.degree = ↑n)
:
@[simp]
theorem
Polynomial.natDegree_eq_of_degree_eq
{R : Type u}
{S : Type v}
[Semiring R]
{p : Polynomial R}
[Semiring S]
{q : Polynomial S}
(h : p.degree = q.degree)
:
theorem
Polynomial.le_degree_of_ne_zero
{R : Type u}
{n : ℕ}
[Semiring R]
{p : Polynomial R}
(h : p.coeff n ≠ 0)
:
theorem
Polynomial.degree_mono
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : Polynomial R}
{g : Polynomial S}
(h : f.support ⊆ g.support)
:
Alias of the forward direction of Polynomial.natDegree_le_iff_degree_le
.
Alias of the reverse direction of Polynomial.natDegree_le_iff_degree_le
.
theorem
Polynomial.natDegree_le_natDegree
{R : Type u}
{S : Type v}
[Semiring R]
{p : Polynomial R}
[Semiring S]
{q : Polynomial S}
(hpq : p.degree ≤ q.degree)
:
@[simp]
theorem
Polynomial.coeff_ne_zero_of_eq_degree
{R : Type u}
{n : ℕ}
[Semiring R]
{p : Polynomial R}
(hn : p.degree = ↑n)
:
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Polynomial.leadingCoeff_eq_zero_iff_deg_eq_bot
{R : Type u}
[Semiring R]
{p : Polynomial R}
:
@[simp]
@[simp]
theorem
Polynomial.Monic.ne_zero
{R : Type u_2}
[Semiring R]
[Nontrivial R]
{p : Polynomial R}
(hp : p.Monic)
:
theorem
Polynomial.Monic.ne_zero_of_ne
{R : Type u}
[Semiring R]
(h : 0 ≠ 1)
{p : Polynomial R}
(hp : p.Monic)
:
theorem
Polynomial.Monic.ne_zero_of_polynomial_ne
{R : Type u}
[Semiring R]
{p q r : Polynomial R}
(hp : p.Monic)
(hne : q ≠ r)
:
theorem
Polynomial.natDegree_eq_zero_iff_degree_le_zero
{R : Type u}
[Semiring R]
{p : Polynomial R}
:
@[simp]
@[simp]
theorem
Polynomial.degree_sub_lt
{R : Type u}
[Ring R]
{p q : Polynomial R}
(hd : p.degree = q.degree)
(hp0 : p ≠ 0)
(hlc : p.leadingCoeff = q.leadingCoeff)
: