Theory of degrees of polynomials #
Some of the main results include
natDegree_comp_le: The degree of the composition is at most the product of degrees
theorem
Polynomial.natDegree_comp_eq_of_mul_ne_zero
{R : Type u}
[Semiring R]
{p q : Polynomial R}
(h : p.leadingCoeff * q.leadingCoeff ^ p.natDegree β 0)
:
theorem
Polynomial.degree_pos_of_root
{R : Type u}
{a : R}
[Semiring R]
{p : Polynomial R}
(hp : p β 0)
(h : p.IsRoot a)
:
theorem
Polynomial.natDegree_le_iff_coeff_eq_zero
{R : Type u}
{n : β}
[Semiring R]
{p : Polynomial R}
:
theorem
Polynomial.natDegree_add_le_iff_left
{R : Type u}
[Semiring R]
{n : β}
(p q : Polynomial R)
(qn : q.natDegree β€ n)
:
theorem
Polynomial.natDegree_add_le_iff_right
{R : Type u}
[Semiring R]
{n : β}
(p q : Polynomial R)
(pn : p.natDegree β€ n)
:
theorem
Polynomial.eq_natDegree_of_le_mem_support
{R : Type u}
{n : β}
[Semiring R]
{p : Polynomial R}
(pn : p.natDegree β€ n)
(ns : n β p.support)
:
p.natDegree = n
theorem
Polynomial.natDegree_C_mul_eq_of_mul_eq_one
{R : Type u}
{a : R}
[Semiring R]
{p : Polynomial R}
{ai : R}
(au : ai * a = 1)
:
theorem
Polynomial.natDegree_mul_C_eq_of_mul_eq_one
{R : Type u}
{a : R}
[Semiring R]
{p : Polynomial R}
{ai : R}
(au : a * ai = 1)
:
theorem
Polynomial.natDegree_mul_C_eq_of_mul_ne_zero
{R : Type u}
{a : R}
[Semiring R]
{p : Polynomial R}
(h : p.leadingCoeff * a β 0)
:
Although not explicitly stated, the assumptions of lemma natDegree_mul_C_eq_of_mul_ne_zero
force the polynomial p to be non-zero, via p.leadingCoeff β 0.
theorem
Polynomial.natDegree_C_mul_of_mul_ne_zero
{R : Type u}
{a : R}
[Semiring R]
{p : Polynomial R}
(h : a * p.leadingCoeff β 0)
:
Although not explicitly stated, the assumptions of lemma natDegree_C_mul_of_mul_ne_zero
force the polynomial p to be non-zero, via p.leadingCoeff β 0.
theorem
Polynomial.degree_C_mul_of_mul_ne_zero
{R : Type u}
{a : R}
[Semiring R]
{p : Polynomial R}
(h : a * p.leadingCoeff β 0)
:
theorem
Polynomial.natDegree_lt_coeff_mul
{R : Type u}
{m n : β}
[Semiring R]
{p q : Polynomial R}
(h : p.natDegree + q.natDegree < m + n)
:
(p * q).coeff (m + n) = 0
theorem
Polynomial.coeff_pow_of_natDegree_le
{R : Type u}
{m n : β}
[Semiring R]
{p : Polynomial R}
(pn : p.natDegree β€ n)
:
theorem
Polynomial.coeff_pow_eq_ite_of_natDegree_le_of_le
{R : Type u}
{m n : β}
[Semiring R]
{p : Polynomial R}
{o : β}
(pn : p.natDegree β€ n)
(mno : m * n β€ o)
:
theorem
Polynomial.coeff_add_eq_left_of_lt
{R : Type u}
{n : β}
[Semiring R]
{p q : Polynomial R}
(qn : q.natDegree < n)
:
theorem
Polynomial.coeff_add_eq_right_of_lt
{R : Type u}
{n : β}
[Semiring R]
{p q : Polynomial R}
(pn : p.natDegree < n)
:
theorem
Polynomial.natDegree_pos_of_evalβ_root
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{p : Polynomial R}
(hp : p β 0)
(f : R β+* S)
{z : S}
(hz : evalβ f z p = 0)
(inj : β (x : R), f x = 0 β x = 0)
:
theorem
Polynomial.degree_pos_of_evalβ_root
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{p : Polynomial R}
(hp : p β 0)
(f : R β+* S)
{z : S}
(hz : evalβ f z p = 0)
(inj : β (x : R), f x = 0 β x = 0)
:
@[simp]
@[simp]
theorem
Polynomial.degree_map_eq_iff
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R β+* S}
{p : Polynomial R}
:
(map f p).degree = p.degree β f p.leadingCoeff β 0 β¨ p = 0
@[simp]
theorem
Polynomial.natDegree_map_eq_iff
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R β+* S}
{p : Polynomial R}
:
(map f p).natDegree = p.natDegree β f p.leadingCoeff β 0 β¨ p.natDegree = 0
theorem
Polynomial.degree_map_eq_of_isUnit_leadingCoeff
{R : Type u}
{S : Type v}
[Semiring R]
{p : Polynomial R}
[Semiring S]
[Nontrivial S]
(f : R β+* S)
(hp : IsUnit p.leadingCoeff)
:
theorem
Polynomial.natDegree_map_eq_of_isUnit_leadingCoeff
{R : Type u}
{S : Type v}
[Semiring R]
{p : Polynomial R}
[Semiring S]
[Nontrivial S]
(f : R β+* S)
(hp : IsUnit p.leadingCoeff)
:
theorem
Polynomial.leadingCoeff_map_eq_of_isUnit_leadingCoeff
{R : Type u}
{S : Type v}
[Semiring R]
{p : Polynomial R}
[Semiring S]
[Nontrivial S]
(f : R β+* S)
(hp : IsUnit p.leadingCoeff)
:
(map f p).leadingCoeff = f p.leadingCoeff
theorem
Polynomial.nextCoeff_map_eq_of_isUnit_leadingCoeff
{R : Type u}
{S : Type v}
[Semiring R]
{p : Polynomial R}
[Semiring S]
[Nontrivial S]
(f : R β+* S)
(hp : IsUnit p.leadingCoeff)
:
theorem
Polynomial.degree_map_eq_of_injective
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R β+* S}
(hf : Function.Injective βf)
(p : Polynomial R)
:
theorem
Polynomial.natDegree_map_eq_of_injective
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R β+* S}
(hf : Function.Injective βf)
(p : Polynomial R)
:
theorem
Polynomial.leadingCoeff_map_of_injective
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R β+* S}
(hf : Function.Injective βf)
(p : Polynomial R)
:
(map f p).leadingCoeff = f p.leadingCoeff
theorem
Polynomial.nextCoeff_map
{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R β+* S}
(hf : Function.Injective βf)
(p : Polynomial R)
:
theorem
Polynomial.natDegree_pos_of_nextCoeff_ne_zero
{R : Type u}
[Semiring R]
{p : Polynomial R}
(h : p.nextCoeff β 0)
:
theorem
Polynomial.natDegree_sub_le_iff_left
{R : Type u}
{n : β}
[Ring R]
{p q : Polynomial R}
(qn : q.natDegree β€ n)
:
theorem
Polynomial.natDegree_sub_le_iff_right
{R : Type u}
{n : β}
[Ring R]
{p q : Polynomial R}
(pn : p.natDegree β€ n)
:
theorem
Polynomial.coeff_sub_eq_left_of_lt
{R : Type u}
{n : β}
[Ring R]
{p q : Polynomial R}
(dg : q.natDegree < n)
:
theorem
Polynomial.coeff_sub_eq_neg_right_of_lt
{R : Type u}
{n : β}
[Ring R]
{p q : Polynomial R}
(df : p.natDegree < n)
:
@[simp]
theorem
Polynomial.subsingleton_isRoot_of_natDegree_eq_one
{R : Type u}
[Semiring R]
{p : Polynomial R}
[IsLeftCancelMulZero R]
(h : p.natDegree = 1)
:
theorem
Polynomial.degree_mul_C
{R : Type u}
[Semiring R]
{p : Polynomial R}
{a : R}
[NoZeroDivisors R]
(a0 : a β 0)
:
theorem
Polynomial.degree_C_mul
{R : Type u}
[Semiring R]
{p : Polynomial R}
{a : R}
[NoZeroDivisors R]
(a0 : a β 0)
:
theorem
Polynomial.natDegree_mul_C
{R : Type u}
[Semiring R]
{p : Polynomial R}
{a : R}
[NoZeroDivisors R]
(a0 : a β 0)
:
theorem
Polynomial.natDegree_C_mul
{R : Type u}
[Semiring R]
{p : Polynomial R}
{a : R}
[NoZeroDivisors R]
(a0 : a β 0)
:
theorem
Polynomial.natDegree_comp
{R : Type u}
[Semiring R]
{p q : Polynomial R}
[NoZeroDivisors R]
:
@[simp]
theorem
Polynomial.natDegree_iterate_comp
{R : Type u}
[Semiring R]
{p q : Polynomial R}
[NoZeroDivisors R]
(k : β)
:
theorem
Polynomial.leadingCoeff_comp
{R : Type u}
[Semiring R]
{p q : Polynomial R}
[NoZeroDivisors R]
(hq : q.natDegree β 0)
:
(p.comp q).leadingCoeff = p.leadingCoeff * q.leadingCoeff ^ p.natDegree
@[simp]
theorem
Polynomial.nextCoeff_C_mul
{R : Type u}
[Semiring R]
{p : Polynomial R}
{a : R}
[NoZeroDivisors R]
:
@[simp]
theorem
Polynomial.nextCoeff_mul_C
{R : Type u}
[Semiring R]
{p : Polynomial R}
{a : R}
[NoZeroDivisors R]
:
@[simp]
theorem
Polynomial.comp_neg_X_leadingCoeff_eq
{R : Type u}
[Ring R]
(p : Polynomial R)
:
(p.comp (-X)).leadingCoeff = (-1) ^ p.natDegree * p.leadingCoeff
@[simp]
theorem
Polynomial.comp_eq_zero_iff
{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p q : Polynomial R}
:
theorem
Polynomial.degree_comp
{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p q : Polynomial R}
(hq : 0 < q.degree)
:
@[simp]
Useful lemmas for the "monicization" of a nonzero polynomial p.
@[simp]
theorem
Polynomial.irreducible_mul_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
{p : Polynomial K}
:
Irreducible (p * C p.leadingCoeffβ»ΒΉ) β Irreducible p
theorem
Polynomial.dvd_mul_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
{p q : Polynomial K}
(hp0 : p β 0)
:
q β£ p * C p.leadingCoeffβ»ΒΉ β q β£ p
theorem
Polynomial.monic_mul_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
{p : Polynomial K}
(h : p β 0)
:
(p * C p.leadingCoeffβ»ΒΉ).Monic
theorem
Polynomial.degree_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
{p : Polynomial K}
(hp0 : p β 0)
:
(C p.leadingCoeffβ»ΒΉ).degree = 0
theorem
Polynomial.degree_mul_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
(p : Polynomial K)
{q : Polynomial K}
(h : q β 0)
:
(p * C q.leadingCoeffβ»ΒΉ).degree = p.degree
theorem
Polynomial.natDegree_mul_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
(p : Polynomial K)
{q : Polynomial K}
(h : q β 0)
:
(p * C q.leadingCoeffβ»ΒΉ).natDegree = p.natDegree
theorem
Polynomial.degree_mul_leadingCoeff_self_inv
{K : Type u_1}
[DivisionRing K]
(p : Polynomial K)
:
(p * C p.leadingCoeffβ»ΒΉ).degree = p.degree
theorem
Polynomial.natDegree_mul_leadingCoeff_self_inv
{K : Type u_1}
[DivisionRing K]
(p : Polynomial K)
:
(p * C p.leadingCoeffβ»ΒΉ).natDegree = p.natDegree
@[simp]
theorem
Polynomial.degree_add_degree_leadingCoeff_inv
{K : Type u_1}
[DivisionRing K]
(p : Polynomial K)
: