File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

full_name: Polynomial.natDegree_comp_le
code: theorem natDegree_comp_le : natDegree (p.comp q) ≤ natDegree p * natDegree q 
goal: (p.comp q).natDegree ≤ p.natDegree * q.natDegree

full_name: Polynomial.degree_pos_of_root
code: theorem degree_pos_of_root {p : R[X]} (hp : p ≠ 0) (h : IsRoot p a) : 0 < degree p 
goal: 0 < p.degree

full_name: Polynomial.natDegree_le_iff_coeff_eq_zero
code: theorem natDegree_le_iff_coeff_eq_zero : p.natDegree ≤ n ↔ ∀ N : ℕ, n < N → p.coeff N = 0 
goal: p.natDegree ≤ n ↔ ∀ (N : ℕ), n < N → p.coeff N = 0

full_name: Polynomial.natDegree_add_le_iff_left
code: theorem natDegree_add_le_iff_left {n : ℕ} (p q : R[X]) (qn : q.natDegree ≤ n) :
    (p + q).natDegree ≤ n ↔ p.natDegree ≤ n 
goal: (p + q).natDegree ≤ n ↔ p.natDegree ≤ n

full_name: Polynomial.natDegree_add_le_iff_right
code: theorem natDegree_add_le_iff_right {n : ℕ} (p q : R[X]) (pn : p.natDegree ≤ n) :
    (p + q).natDegree ≤ n ↔ q.natDegree ≤ n 
goal: (p + q).natDegree ≤ n ↔ q.natDegree ≤ n

full_name: Polynomial.natDegree_C_mul_le
code: theorem natDegree_C_mul_le (a : R) (f : R[X]) : (C a * f).natDegree ≤ f.natDegree 
goal: (Polynomial.C a * f).natDegree ≤ f.natDegree

full_name: Polynomial.natDegree_mul_C_le
code: theorem natDegree_mul_C_le (f : R[X]) (a : R) : (f * C a).natDegree ≤ f.natDegree 
goal: (f * Polynomial.C a).natDegree ≤ f.natDegree

full_name: Polynomial.eq_natDegree_of_le_mem_support
code: theorem eq_natDegree_of_le_mem_support (pn : p.natDegree ≤ n) (ns : n ∈ p.support) :
    p.natDegree = n 
goal: p.natDegree = n

full_name: Polynomial.natDegree_C_mul_eq_of_mul_eq_one
code: theorem natDegree_C_mul_eq_of_mul_eq_one {ai : R} (au : ai * a = 1) :
    (C a * p).natDegree = p.natDegree 
goal: (Polynomial.C a * p).natDegree = p.natDegree

full_name: Polynomial.natDegree_mul_C_eq_of_mul_eq_one
code: theorem natDegree_mul_C_eq_of_mul_eq_one {ai : R} (au : a * ai = 1) :
    (p * C a).natDegree = p.natDegree 
goal: (p * Polynomial.C a).natDegree = p.natDegree

full_name: Polynomial.natDegree_mul_C_eq_of_mul_ne_zero
code: /-- Although not explicitly stated, the assumptions of lemma `nat_degree_mul_C_eq_of_mul_ne_zero`
force the polynomial `p` to be non-zero, via `p.leading_coeff ≠ 0`.
-/
theorem natDegree_mul_C_eq_of_mul_ne_zero (h : p.leadingCoeff * a ≠ 0) :
    (p * C a).natDegree = p.natDegree 
goal: (p * Polynomial.C a).natDegree = p.natDegree

full_name: Polynomial.natDegree_C_mul_eq_of_mul_ne_zero
code: /-- Although not explicitly stated, the assumptions of lemma `nat_degree_C_mul_eq_of_mul_ne_zero`
force the polynomial `p` to be non-zero, via `p.leading_coeff ≠ 0`.
-/
theorem natDegree_C_mul_eq_of_mul_ne_zero (h : a * p.leadingCoeff ≠ 0) :
    (C a * p).natDegree = p.natDegree 
goal: (Polynomial.C a * p).natDegree = p.natDegree

full_name: Polynomial.natDegree_add_coeff_mul
code: theorem natDegree_add_coeff_mul (f g : R[X]) :
    (f * g).coeff (f.natDegree + g.natDegree) = f.coeff f.natDegree * g.coeff g.natDegree 
goal: (f * g).coeff (f.natDegree + g.natDegree) = f.coeff f.natDegree * g.coeff g.natDegree

full_name: Polynomial.natDegree_lt_coeff_mul
code: theorem natDegree_lt_coeff_mul (h : p.natDegree + q.natDegree < m + n) :
    (p * q).coeff (m + n) = 0 
goal: (p * q).coeff (m + n) = 0

full_name: Polynomial.coeff_mul_of_natDegree_le
code: theorem coeff_mul_of_natDegree_le (pm : p.natDegree ≤ m) (qn : q.natDegree ≤ n) :
    (p * q).coeff (m + n) = p.coeff m * q.coeff n 
goal: (p * q).coeff (m + n) = p.coeff m * q.coeff n

full_name: Polynomial.coeff_pow_of_natDegree_le
code: theorem coeff_pow_of_natDegree_le (pn : p.natDegree ≤ n) :
    (p ^ m).coeff (m * n) = p.coeff n ^ m 
goal: (p ^ m).coeff (m * n) = p.coeff n ^ m

full_name: Polynomial.coeff_pow_eq_ite_of_natDegree_le_of_le
code: theorem coeff_pow_eq_ite_of_natDegree_le_of_le {o : ℕ}
    (pn : natDegree p ≤ n) (mno : m * n ≤ o) :
    coeff (p ^ m) o = if o = m * n then (coeff p n) ^ m else 0 
goal: (p ^ m).coeff o = if o = m * n then p.coeff n ^ m else 0

full_name: Polynomial.coeff_add_eq_left_of_lt
code: theorem coeff_add_eq_left_of_lt (qn : q.natDegree < n) : (p + q).coeff n = p.coeff n 
goal: (p + q).coeff n = p.coeff n

full_name: Polynomial.coeff_add_eq_right_of_lt
code: theorem coeff_add_eq_right_of_lt (pn : p.natDegree < n) : (p + q).coeff n = q.coeff n 
goal: (p + q).coeff n = q.coeff n

full_name: Polynomial.degree_sum_eq_of_disjoint
code: theorem degree_sum_eq_of_disjoint (f : S → R[X]) (s : Finset S)
    (h : Set.Pairwise { i | i ∈ s ∧ f i ≠ 0 } (Ne on degree ∘ f)) :
    degree (s.sum f) = s.sup fun i => degree (f i) 
goal: (s.sum f).degree = s.sup fun i => (f i).degree

full_name: Polynomial.natDegree_sum_eq_of_disjoint
code: theorem natDegree_sum_eq_of_disjoint (f : S → R[X]) (s : Finset S)
    (h : Set.Pairwise { i | i ∈ s ∧ f i ≠ 0 } (Ne on natDegree ∘ f)) :
    natDegree (s.sum f) = s.sup fun i => natDegree (f i) 
goal: (s.sum f).natDegree = s.sup fun i => (f i).natDegree

full_name: Polynomial.natDegree_pos_of_eval₂_root
code: theorem natDegree_pos_of_eval₂_root {p : R[X]} (hp : p ≠ 0) (f : R →+* S) {z : S}
    (hz : eval₂ f z p = 0) (inj : ∀ x : R, f x = 0 → x = 0) : 0 < natDegree p 
goal: 0 < p.natDegree

full_name: Polynomial.degree_pos_of_eval₂_root
code: theorem degree_pos_of_eval₂_root {p : R[X]} (hp : p ≠ 0) (f : R →+* S) {z : S}
    (hz : eval₂ f z p = 0) (inj : ∀ x : R, f x = 0 → x = 0) : 0 < degree p 
goal: 0 < p.degree

full_name: Polynomial.coe_lt_degree
code: @[simp]
theorem coe_lt_degree {p : R[X]} {n : ℕ} : (n : WithBot ℕ) < degree p ↔ n < natDegree p 
goal: ↑n < p.degree ↔ n < p.natDegree

full_name: Polynomial.degree_map_eq_iff
code: @[simp]
theorem degree_map_eq_iff {f : R →+* S} {p : Polynomial R} :
    degree (map f p) = degree p ↔ f (leadingCoeff p) ≠ 0 ∨ p = 0 
goal: (Polynomial.map f p).degree = p.degree ↔ f p.leadingCoeff ≠ 0 ∨ p = 0

full_name: Polynomial.natDegree_map_eq_iff
code: @[simp]
theorem natDegree_map_eq_iff {f : R →+* S} {p : Polynomial R} :
    natDegree (map f p) = natDegree p ↔ f (p.leadingCoeff) ≠ 0 ∨ natDegree p = 0 
goal: (Polynomial.map f p).natDegree = p.natDegree ↔ f p.leadingCoeff ≠ 0 ∨ p.natDegree = 0

full_name: Polynomial.natDegree_pos_of_nextCoeff_ne_zero
code: theorem natDegree_pos_of_nextCoeff_ne_zero (h : p.nextCoeff ≠ 0) : 0 < p.natDegree 
goal: 0 < p.natDegree

full_name: Polynomial.natDegree_sub
code: theorem natDegree_sub : (p - q).natDegree = (q - p).natDegree 
goal: (p - q).natDegree = (q - p).natDegree

full_name: Polynomial.natDegree_sub_le_iff_left
code: theorem natDegree_sub_le_iff_left (qn : q.natDegree ≤ n) :
    (p - q).natDegree ≤ n ↔ p.natDegree ≤ n 
goal: (p - q).natDegree ≤ n ↔ p.natDegree ≤ n

full_name: Polynomial.natDegree_sub_le_iff_right
code: theorem natDegree_sub_le_iff_right (pn : p.natDegree ≤ n) :
    (p - q).natDegree ≤ n ↔ q.natDegree ≤ n 
goal: (p - q).natDegree ≤ n ↔ q.natDegree ≤ n

full_name: Polynomial.coeff_sub_eq_left_of_lt
code: theorem coeff_sub_eq_left_of_lt (dg : q.natDegree < n) : (p - q).coeff n = p.coeff n 
goal: (p - q).coeff n = p.coeff n

full_name: Polynomial.coeff_sub_eq_neg_right_of_lt
code: theorem coeff_sub_eq_neg_right_of_lt (df : p.natDegree < n) : (p - q).coeff n = -q.coeff n 
goal: (p - q).coeff n = -q.coeff n

full_name: Polynomial.degree_mul_C
code: theorem degree_mul_C (a0 : a ≠ 0) : (p * C a).degree = p.degree 
goal: (p * Polynomial.C a).degree = p.degree

full_name: Polynomial.degree_C_mul
code: theorem degree_C_mul (a0 : a ≠ 0) : (C a * p).degree = p.degree 
goal: (Polynomial.C a * p).degree = p.degree

full_name: Polynomial.natDegree_mul_C
code: theorem natDegree_mul_C (a0 : a ≠ 0) : (p * C a).natDegree = p.natDegree 
goal: (p * Polynomial.C a).natDegree = p.natDegree

full_name: Polynomial.natDegree_C_mul
code: theorem natDegree_C_mul (a0 : a ≠ 0) : (C a * p).natDegree = p.natDegree 
goal: (Polynomial.C a * p).natDegree = p.natDegree

full_name: Polynomial.nextCoeff_C_mul_X_add_C
code: @[simp]
lemma nextCoeff_C_mul_X_add_C (ha : a ≠ 0) (c : R) : nextCoeff (C a * X + C c) = c 
goal: (Polynomial.C a * Polynomial.X + Polynomial.C c).nextCoeff = c

full_name: Polynomial.natDegree_eq_one
code: lemma natDegree_eq_one : p.natDegree = 1 ↔ ∃ a ≠ 0, ∃ b, C a * X + C b = p 
goal: p.natDegree = 1 ↔ ∃ a, a ≠ 0 ∧ ∃ b, Polynomial.C a * Polynomial.X + Polynomial.C b = p

full_name: Polynomial.natDegree_comp
code: theorem natDegree_comp : natDegree (p.comp q) = natDegree p * natDegree q 
goal: (p.comp q).natDegree = p.natDegree * q.natDegree

full_name: Polynomial.natDegree_iterate_comp
code: @[simp]
theorem natDegree_iterate_comp (k : ℕ) :
    (p.comp^[k] q).natDegree = p.natDegree ^ k * q.natDegree 
goal: (p.comp^[k] q).natDegree = p.natDegree ^ k * q.natDegree

full_name: Polynomial.leadingCoeff_comp
code: theorem leadingCoeff_comp (hq : natDegree q ≠ 0) :
    leadingCoeff (p.comp q) = leadingCoeff p * leadingCoeff q ^ natDegree p 
goal: (p.comp q).leadingCoeff = p.leadingCoeff * q.leadingCoeff ^ p.natDegree

full_name: Polynomial.irreducible_mul_leadingCoeff_inv
code: @[simp]
theorem irreducible_mul_leadingCoeff_inv {p : K[X]} :
    Irreducible (p * C (leadingCoeff p)⁻¹) ↔ Irreducible p 
goal: Irreducible (p * Polynomial.C p.leadingCoeff⁻¹) ↔ Irreducible p

full_name: Polynomial.dvd_mul_leadingCoeff_inv
code: @[simp] lemma dvd_mul_leadingCoeff_inv {p q : K[X]} (hp0 : p ≠ 0) :
    q ∣ p * C (leadingCoeff p)⁻¹ ↔ q ∣ p 
goal: q ∣ p * Polynomial.C p.leadingCoeff⁻¹ ↔ q ∣ p

full_name: Polynomial.monic_mul_leadingCoeff_inv
code: theorem monic_mul_leadingCoeff_inv {p : K[X]} (h : p ≠ 0) : Monic (p * C (leadingCoeff p)⁻¹) 
goal: (p * Polynomial.C p.leadingCoeff⁻¹).Monic

full_name: Polynomial.degree_leadingCoeff_inv
code: @[simp] lemma degree_leadingCoeff_inv {p : K[X]} (hp0 : p ≠ 0) :
    degree (C (leadingCoeff p)⁻¹) = 0 
goal: (Polynomial.C p.leadingCoeff⁻¹).degree = 0

full_name: Polynomial.degree_mul_leadingCoeff_inv
code: theorem degree_mul_leadingCoeff_inv (p : K[X]) {q : K[X]} (h : q ≠ 0) :
    degree (p * C (leadingCoeff q)⁻¹) = degree p 
goal: (p * Polynomial.C q.leadingCoeff⁻¹).degree = p.degree

full_name: Polynomial.natDegree_mul_leadingCoeff_inv
code: theorem natDegree_mul_leadingCoeff_inv (p : K[X]) {q : K[X]} (h : q ≠ 0) :
    natDegree (p * C (leadingCoeff q)⁻¹) = natDegree p 
goal: (p * Polynomial.C q.leadingCoeff⁻¹).natDegree = p.natDegree

full_name: Polynomial.degree_mul_leadingCoeff_self_inv
code: theorem degree_mul_leadingCoeff_self_inv (p : K[X]) :
    degree (p * C (leadingCoeff p)⁻¹) = degree p 
goal: (p * Polynomial.C p.leadingCoeff⁻¹).degree = p.degree

full_name: Polynomial.natDegree_mul_leadingCoeff_self_inv
code: theorem natDegree_mul_leadingCoeff_self_inv (p : K[X]) :
    natDegree (p * C (leadingCoeff p)⁻¹) = natDegree p 
goal: (p * Polynomial.C p.leadingCoeff⁻¹).natDegree = p.natDegree

full_name: Polynomial.degree_add_degree_leadingCoeff_inv
code: @[simp] lemma degree_add_degree_leadingCoeff_inv (p : K[X]) :
    degree p + degree (C (leadingCoeff p)⁻¹) = degree p 
goal: p.degree + (Polynomial.C p.leadingCoeff⁻¹).degree = p.degree