Documentation

Mathlib.Algebra.Polynomial.Degree.Lemmas

Theory of degrees of polynomials #

Some of the main results include

theorem Polynomial.degree_pos_of_root {R : Type u} {a : R} [Semiring R] {p : Polynomial R} (hp : p β‰  0) (h : p.IsRoot a) :
0 < p.degree
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) :

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.

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.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) :
(p ^ m).coeff (m * n) = p.coeff n ^ m
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) :
(p ^ m).coeff o = if o = m * n then p.coeff n ^ m else 0
theorem Polynomial.coeff_add_eq_left_of_lt {R : Type u} {n : β„•} [Semiring R] {p q : Polynomial R} (qn : q.natDegree < n) :
(p + q).coeff n = p.coeff n
theorem Polynomial.coeff_add_eq_right_of_lt {R : Type u} {n : β„•} [Semiring R] {p q : Polynomial R} (pn : p.natDegree < n) :
(p + q).coeff n = q.coeff n
theorem Polynomial.degree_sum_eq_of_disjoint {R : Type u} {S : Type v} [Semiring R] (f : S β†’ Polynomial R) (s : Finset S) (h : {i : S | i ∈ s ∧ f i β‰  0}.Pairwise (Function.onFun Ne (degree ∘ f))) :
(s.sum f).degree = s.sup fun (i : S) => (f i).degree
theorem Polynomial.natDegree_sum_eq_of_disjoint {R : Type u} {S : Type v} [Semiring R] (f : S β†’ Polynomial R) (s : Finset S) (h : {i : S | i ∈ s ∧ f i β‰  0}.Pairwise (Function.onFun Ne (natDegree ∘ f))) :
(s.sum f).natDegree = s.sup fun (i : S) => (f i).natDegree
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) :
0 < p.degree
@[simp]
theorem Polynomial.coe_lt_degree {R : Type u} [Semiring R] {p : Polynomial R} {n : β„•} :
↑n < p.degree ↔ n < p.natDegree
@[simp]
theorem Polynomial.degree_map_eq_iff {R : Type u} {S : Type v} [Semiring R] [Semiring S] {f : R β†’+* S} {p : Polynomial R} :
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.coeff_sub_eq_left_of_lt {R : Type u} {n : β„•} [Ring R] {p q : Polynomial R} (dg : q.natDegree < n) :
(p - q).coeff n = p.coeff n
@[simp]
theorem Polynomial.nextCoeff_C_mul_X_add_C {R : Type u} [Semiring R] {a : R} (ha : a β‰  0) (c : R) :
(C a * X + C c).nextCoeff = c
theorem Polynomial.natDegree_eq_one {R : Type u} [Semiring R] {p : Polynomial R} :
p.natDegree = 1 ↔ βˆƒ (a : R), a β‰  0 ∧ βˆƒ (b : R), C a * X + C b = p
theorem Polynomial.degree_mul_C {R : Type u} [Semiring R] {p : Polynomial R} {a : R} [NoZeroDivisors R] (a0 : a β‰  0) :
(p * C a).degree = p.degree
theorem Polynomial.degree_C_mul {R : Type u} [Semiring R] {p : Polynomial R} {a : R} [NoZeroDivisors R] (a0 : a β‰  0) :
(C a * p).degree = p.degree

Useful lemmas for the "monicization" of a nonzero polynomial p.