File: Mathlib/Algebra/Polynomial/RingDivision.lean

full_name: Polynomial.natDegree_pos_of_aeval_root
code: theorem natDegree_pos_of_aeval_root [Algebra R S] {p : R[X]} (hp : p ≠ 0) {z : S}
    (hz : aeval z p = 0) (inj : ∀ x : R, algebraMap R S x = 0 → x = 0) : 0 < p.natDegree 
goal: 0 < p.natDegree

full_name: Polynomial.degree_pos_of_aeval_root
code: theorem degree_pos_of_aeval_root [Algebra R S] {p : R[X]} (hp : p ≠ 0) {z : S} (hz : aeval z p = 0)
    (inj : ∀ x : R, algebraMap R S x = 0 → x = 0) : 0 < p.degree 
goal: 0 < p.degree

full_name: Polynomial.modByMonic_eq_of_dvd_sub
code: theorem modByMonic_eq_of_dvd_sub (hq : q.Monic) {p₁ p₂ : R[X]} (h : q ∣ p₁ - p₂) :
    p₁ %ₘ q = p₂ %ₘ q 
goal: p₁ %ₘ q = p₂ %ₘ q

full_name: Polynomial.add_modByMonic
code: theorem add_modByMonic (p₁ p₂ : R[X]) : (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q 
goal: (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q

full_name: Polynomial.smul_modByMonic
code: theorem smul_modByMonic (c : R) (p : R[X]) : c • p %ₘ q = c • (p %ₘ q) 
goal: c • p %ₘ q = c • (p %ₘ q)

full_name: Polynomial.modByMonicHom_apply
code: /-- `_ %ₘ q` as an `R`-linear map. -/
@[simps]
def modByMonicHom (q : R[X]) : R[X] →ₗ[R] R[X] 
goal: q.modByMonicHom p = p %ₘ q

full_name: Polynomial.modByMonicHom
code: /-- `_ %ₘ q` as an `R`-linear map. -/
@[simps]
def modByMonicHom (q : R[X]) : R[X] →ₗ[R] R[X] 
goal: R[X] →ₗ[R] R[X]

full_name: Polynomial.neg_modByMonic
code: theorem neg_modByMonic (p mod : R[X]) : (-p) %ₘ mod = - (p %ₘ mod) 
goal: -p %ₘ mod = -(p %ₘ mod)

full_name: Polynomial.sub_modByMonic
code: theorem sub_modByMonic (a b mod : R[X]) : (a - b) %ₘ mod = a %ₘ mod - b %ₘ mod 
goal: (a - b) %ₘ mod = a %ₘ mod - b %ₘ mod

full_name: Polynomial.aeval_modByMonic_eq_self_of_root
code: theorem aeval_modByMonic_eq_self_of_root [Algebra R S] {p q : R[X]} (hq : q.Monic) {x : S}
    (hx : aeval x q = 0) : aeval x (p %ₘ q) = aeval x p 
goal: (Polynomial.aeval x) (p %ₘ q) = (Polynomial.aeval x) p

full_name: Polynomial.instNoZeroDivisors
code: instance : NoZeroDivisors R[X] 
goal: NoZeroDivisors R[X]

full_name: Polynomial.natDegree_mul
code: theorem natDegree_mul (hp : p ≠ 0) (hq : q ≠ 0) : (p*q).natDegree = p.natDegree + q.natDegree 
goal: (p * q).natDegree = p.natDegree + q.natDegree

full_name: Polynomial.trailingDegree_mul
code: theorem trailingDegree_mul : (p * q).trailingDegree = p.trailingDegree + q.trailingDegree 
goal: (p * q).trailingDegree = p.trailingDegree + q.trailingDegree

full_name: Polynomial.natDegree_pow
code: @[simp]
theorem natDegree_pow (p : R[X]) (n : ℕ) : natDegree (p ^ n) = n * natDegree p 
goal: (p ^ n).natDegree = n * p.natDegree

full_name: Polynomial.degree_le_mul_left
code: theorem degree_le_mul_left (p : R[X]) (hq : q ≠ 0) : degree p ≤ degree (p * q) 
goal: p.degree ≤ (p * q).degree

full_name: Polynomial.natDegree_le_of_dvd
code: theorem natDegree_le_of_dvd {p q : R[X]} (h1 : p ∣ q) (h2 : q ≠ 0) : p.natDegree ≤ q.natDegree 
goal: p.natDegree ≤ q.natDegree

full_name: Polynomial.degree_le_of_dvd
code: theorem degree_le_of_dvd {p q : R[X]} (h1 : p ∣ q) (h2 : q ≠ 0) : degree p ≤ degree q 
goal: p.degree ≤ q.degree

full_name: Polynomial.eq_zero_of_dvd_of_degree_lt
code: theorem eq_zero_of_dvd_of_degree_lt {p q : R[X]} (h₁ : p ∣ q) (h₂ : degree q < degree p) :
    q = 0 
goal: q = 0

full_name: Polynomial.eq_zero_of_dvd_of_natDegree_lt
code: theorem eq_zero_of_dvd_of_natDegree_lt {p q : R[X]} (h₁ : p ∣ q) (h₂ : natDegree q < natDegree p) :
    q = 0 
goal: q = 0

full_name: Polynomial.not_dvd_of_degree_lt
code: theorem not_dvd_of_degree_lt {p q : R[X]} (h0 : q ≠ 0) (hl : q.degree < p.degree) : ¬p ∣ q 
goal: ¬p ∣ q

full_name: Polynomial.not_dvd_of_natDegree_lt
code: theorem not_dvd_of_natDegree_lt {p q : R[X]} (h0 : q ≠ 0) (hl : q.natDegree < p.natDegree) :
    ¬p ∣ q 
goal: ¬p ∣ q

full_name: Polynomial.natDegree_sub_eq_of_prod_eq
code: /-- This lemma is useful for working with the `intDegree` of a rational function. -/
theorem natDegree_sub_eq_of_prod_eq {p₁ p₂ q₁ q₂ : R[X]} (hp₁ : p₁ ≠ 0) (hq₁ : q₁ ≠ 0)
    (hp₂ : p₂ ≠ 0) (hq₂ : q₂ ≠ 0) (h_eq : p₁ * q₂ = p₂ * q₁) :
    (p₁.natDegree : ℤ) - q₁.natDegree = (p₂.natDegree : ℤ) - q₂.natDegree 
goal: ↑p₁.natDegree - ↑q₁.natDegree = ↑p₂.natDegree - ↑q₂.natDegree

full_name: Polynomial.natDegree_eq_zero_of_isUnit
code: theorem natDegree_eq_zero_of_isUnit (h : IsUnit p) : natDegree p = 0 
goal: p.natDegree = 0

full_name: Polynomial.degree_eq_zero_of_isUnit
code: theorem degree_eq_zero_of_isUnit [Nontrivial R] (h : IsUnit p) : degree p = 0 
goal: p.degree = 0

full_name: Polynomial.degree_coe_units
code: @[simp]
theorem degree_coe_units [Nontrivial R] (u : R[X]ˣ) : degree (u : R[X]) = 0 
goal: (↑u).degree = 0

full_name: Polynomial.isUnit_iff
code: /-- Characterization of a unit of a polynomial ring over an integral domain `R`.
See `Polynomial.isUnit_iff_coeff_isUnit_isNilpotent` when `R` is a commutative ring. -/
theorem isUnit_iff : IsUnit p ↔ ∃ r : R, IsUnit r ∧ C r = p 
goal: IsUnit p ↔ ∃ r, IsUnit r ∧ Polynomial.C r = p

full_name: Polynomial.not_isUnit_of_degree_pos
code: theorem not_isUnit_of_degree_pos (p : R[X])
    (hpl : 0 < p.degree) : ¬ IsUnit p 
goal: ¬IsUnit p

full_name: Polynomial.not_isUnit_of_natDegree_pos
code: theorem not_isUnit_of_natDegree_pos (p : R[X])
    (hpl : 0 < p.natDegree) : ¬ IsUnit p 
goal: ¬IsUnit p

full_name: Polynomial.irreducible_of_monic
code: theorem irreducible_of_monic (hp : p.Monic) (hp1 : p ≠ 1) :
    Irreducible p ↔ ∀ f g : R[X], f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1 
goal: Irreducible p ↔ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1

full_name: Polynomial.Monic.irreducible_iff_natDegree
code: theorem Monic.irreducible_iff_natDegree (hp : p.Monic) :
    Irreducible p ↔
      p ≠ 1 ∧ ∀ f g : R[X], f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0 
goal: Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0

full_name: Polynomial.Monic.irreducible_iff_natDegree'
code: theorem Monic.irreducible_iff_natDegree' (hp : p.Monic) : Irreducible p ↔ p ≠ 1 ∧
    ∀ f g : R[X], f.Monic → g.Monic → f * g = p → g.natDegree ∉ Ioc 0 (p.natDegree / 2) 
goal: Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → g.natDegree ∉ Finset.Ioc 0 (p.natDegree / 2)

full_name: Polynomial.Monic.irreducible_iff_lt_natDegree_lt
code: /-- Alternate phrasing of `Polynomial.Monic.irreducible_iff_natDegree'` where we only have to check
one divisor at a time. -/
theorem Monic.irreducible_iff_lt_natDegree_lt {p : R[X]} (hp : p.Monic) (hp1 : p ≠ 1) :
    Irreducible p ↔ ∀ q, Monic q → natDegree q ∈ Finset.Ioc 0 (natDegree p / 2) → ¬ q ∣ p 
goal: Irreducible p ↔ ∀ (q : R[X]), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p

full_name: Polynomial.Monic.not_irreducible_iff_exists_add_mul_eq_coeff
code: theorem Monic.not_irreducible_iff_exists_add_mul_eq_coeff (hm : p.Monic) (hnd : p.natDegree = 2) :
    ¬Irreducible p ↔ ∃ c₁ c₂, p.coeff 0 = c₁ * c₂ ∧ p.coeff 1 = c₁ + c₂ 
goal: ¬Irreducible p ↔ ∃ c₁ c₂, p.coeff 0 = c₁ * c₂ ∧ p.coeff 1 = c₁ + c₂

full_name: Polynomial.root_mul
code: theorem root_mul : IsRoot (p * q) a ↔ IsRoot p a ∨ IsRoot q a 
goal: (p * q).IsRoot a ↔ p.IsRoot a ∨ q.IsRoot a

full_name: Polynomial.root_or_root_of_root_mul
code: theorem root_or_root_of_root_mul (h : IsRoot (p * q) a) : IsRoot p a ∨ IsRoot q a 
goal: p.IsRoot a ∨ q.IsRoot a

full_name: Polynomial.instIsDomain
code: instance : IsDomain R[X] 
goal: IsDomain R[X]

full_name: Polynomial.Monic.C_dvd_iff_isUnit
code: theorem Monic.C_dvd_iff_isUnit {a : R} : C a ∣ p ↔ IsUnit a 
goal: Polynomial.C a ∣ p ↔ IsUnit a

full_name: Polynomial.Monic.natDegree_pos
code: theorem Monic.natDegree_pos : 0 < natDegree p ↔ p ≠ 1 
goal: 0 < p.natDegree ↔ p ≠ 1

full_name: Polynomial.Monic.degree_pos
code: theorem Monic.degree_pos : 0 < degree p ↔ p ≠ 1 
goal: 0 < p.degree ↔ p ≠ 1

full_name: Polynomial.Monic.degree_pos_of_not_isUnit
code: theorem Monic.degree_pos_of_not_isUnit (hu : ¬IsUnit p) : 0 < degree p 
goal: 0 < p.degree

full_name: Polynomial.Monic.natDegree_pos_of_not_isUnit
code: theorem Monic.natDegree_pos_of_not_isUnit (hu : ¬IsUnit p) : 0 < natDegree p 
goal: 0 < p.natDegree

full_name: Polynomial.degree_pos_of_not_isUnit_of_dvd_monic
code: theorem degree_pos_of_not_isUnit_of_dvd_monic (ha : ¬IsUnit a) (hap : a ∣ p) : 0 < degree a 
goal: 0 < a.degree

full_name: Polynomial.natDegree_pos_of_not_isUnit_of_dvd_monic
code: theorem natDegree_pos_of_not_isUnit_of_dvd_monic (ha : ¬IsUnit a) (hap : a ∣ p) : 0 < natDegree a 
goal: 0 < a.natDegree

full_name: Polynomial.eq_zero_of_mul_eq_zero_of_smul
code: theorem eq_zero_of_mul_eq_zero_of_smul (P : R[X]) (h : ∀ r : R, r • P = 0 → r = 0) :
    ∀ (Q : R[X]), P * Q = 0 → Q = 0 
goal: P * Q = 0 → Q = 0

full_name: Polynomial.nmem_nonZeroDivisors_iff
code: /-- *McCoy theorem*: a polynomial `P : R[X]` is a zerodivisor if and only if there is `a : R`
such that `a ≠ 0` and `a • P = 0`. -/
theorem nmem_nonZeroDivisors_iff {P : R[X]} : P ∉ R[X]⁰ ↔ ∃ a : R, a ≠ 0 ∧ a • P = 0 
goal: P ∉ nonZeroDivisors R[X] ↔ ∃ a, a ≠ 0 ∧ a • P = 0

full_name: Polynomial.mem_nonZeroDivisors_iff
code: protected lemma mem_nonZeroDivisors_iff {P : R[X]} : P ∈ R[X]⁰ ↔ ∀ a : R, a • P = 0 → a = 0 
goal: P ∈ nonZeroDivisors R[X] ↔ ∀ (a : R), a • P = 0 → a = 0

full_name: Polynomial.le_rootMultiplicity_iff
code: /-- The multiplicity of `a` as root of a nonzero polynomial `p` is at least `n` iff
  `(X - a) ^ n` divides `p`. -/
theorem le_rootMultiplicity_iff {p : R[X]} (p0 : p ≠ 0) {a : R} {n : ℕ} :
    n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p 
goal: n ≤ Polynomial.rootMultiplicity a p ↔ (Polynomial.X - Polynomial.C a) ^ n ∣ p

full_name: Polynomial.rootMultiplicity_le_iff
code: theorem rootMultiplicity_le_iff {p : R[X]} (p0 : p ≠ 0) (a : R) (n : ℕ) :
    rootMultiplicity a p ≤ n ↔ ¬(X - C a) ^ (n + 1) ∣ p 
goal: Polynomial.rootMultiplicity a p ≤ n ↔ ¬(Polynomial.X - Polynomial.C a) ^ (n + 1) ∣ p

full_name: Polynomial.pow_rootMultiplicity_not_dvd
code: theorem pow_rootMultiplicity_not_dvd {p : R[X]} (p0 : p ≠ 0) (a : R) :
    ¬(X - C a) ^ (rootMultiplicity a p + 1) ∣ p 
goal: ¬(Polynomial.X - Polynomial.C a) ^ (Polynomial.rootMultiplicity a p + 1) ∣ p

full_name: Polynomial.X_sub_C_pow_dvd_iff
code: theorem X_sub_C_pow_dvd_iff {p : R[X]} {t : R} {n : ℕ} :
    (X - C t) ^ n ∣ p ↔ X ^ n ∣ p.comp (X + C t) 
goal: (Polynomial.X - Polynomial.C t) ^ n ∣ p ↔ Polynomial.X ^ n ∣ p.comp (Polynomial.X + Polynomial.C t)

full_name: Polynomial.comp_X_add_C_eq_zero_iff
code: theorem comp_X_add_C_eq_zero_iff {p : R[X]} (t : R) :
    p.comp (X + C t) = 0 ↔ p = 0 
goal: p.comp (Polynomial.X + Polynomial.C t) = 0 ↔ p = 0

full_name: Polynomial.comp_X_add_C_ne_zero_iff
code: theorem comp_X_add_C_ne_zero_iff {p : R[X]} (t : R) :
    p.comp (X + C t) ≠ 0 ↔ p ≠ 0 
goal: p.comp (Polynomial.X + Polynomial.C t) ≠ 0 ↔ p ≠ 0

full_name: Polynomial.rootMultiplicity_eq_rootMultiplicity
code: theorem rootMultiplicity_eq_rootMultiplicity {p : R[X]} {t : R} :
    p.rootMultiplicity t = (p.comp (X + C t)).rootMultiplicity 0 
goal: Polynomial.rootMultiplicity t p = Polynomial.rootMultiplicity 0 (p.comp (Polynomial.X + Polynomial.C t))

full_name: Polynomial.rootMultiplicity_eq_natTrailingDegree'
code: theorem rootMultiplicity_eq_natTrailingDegree' {p : R[X]} :
    p.rootMultiplicity 0 = p.natTrailingDegree 
goal: Polynomial.rootMultiplicity 0 p = p.natTrailingDegree

full_name: Polynomial.rootMultiplicity_eq_natTrailingDegree
code: theorem rootMultiplicity_eq_natTrailingDegree {p : R[X]} {t : R} :
    p.rootMultiplicity t = (p.comp (X + C t)).natTrailingDegree 
goal: Polynomial.rootMultiplicity t p = (p.comp (Polynomial.X + Polynomial.C t)).natTrailingDegree

full_name: Polynomial.eval_divByMonic_eq_trailingCoeff_comp
code: theorem eval_divByMonic_eq_trailingCoeff_comp {p : R[X]} {t : R} :
    (p /ₘ (X - C t) ^ p.rootMultiplicity t).eval t = (p.comp (X + C t)).trailingCoeff 
goal: Polynomial.eval t (p /ₘ (Polynomial.X - Polynomial.C t) ^ Polynomial.rootMultiplicity t p) =
  (p.comp (Polynomial.X + Polynomial.C t)).trailingCoeff

full_name: Polynomial.Monic.mem_nonZeroDivisors
code: theorem Monic.mem_nonZeroDivisors {p : R[X]} (h : p.Monic) : p ∈ R[X]⁰ 
goal: p ∈ nonZeroDivisors R[X]

full_name: Polynomial.mem_nonZeroDivisors_of_leadingCoeff
code: theorem mem_nonZeroDivisors_of_leadingCoeff {p : R[X]} (h : p.leadingCoeff ∈ R⁰) : p ∈ R[X]⁰ 
goal: p ∈ nonZeroDivisors R[X]

full_name: Polynomial.rootMultiplicity_mul_X_sub_C_pow
code: theorem rootMultiplicity_mul_X_sub_C_pow {p : R[X]} {a : R} {n : ℕ} (h : p ≠ 0) :
    (p * (X - C a) ^ n).rootMultiplicity a = p.rootMultiplicity a + n 
goal: Polynomial.rootMultiplicity a (p * (Polynomial.X - Polynomial.C a) ^ n) = Polynomial.rootMultiplicity a p + n

full_name: Polynomial.rootMultiplicity_X_sub_C_pow
code: /-- The multiplicity of `a` as root of `(X - a) ^ n` is `n`. -/
theorem rootMultiplicity_X_sub_C_pow [Nontrivial R] (a : R) (n : ℕ) :
    rootMultiplicity a ((X - C a) ^ n) = n 
goal: Polynomial.rootMultiplicity a ((Polynomial.X - Polynomial.C a) ^ n) = n

full_name: Polynomial.rootMultiplicity_X_sub_C_self
code: theorem rootMultiplicity_X_sub_C_self [Nontrivial R] {x : R} :
    rootMultiplicity x (X - C x) = 1 
goal: Polynomial.rootMultiplicity x (Polynomial.X - Polynomial.C x) = 1

full_name: Polynomial.rootMultiplicity_X_sub_C
code: theorem rootMultiplicity_X_sub_C [Nontrivial R] [DecidableEq R] {x y : R} :
    rootMultiplicity x (X - C y) = if x = y then 1 else 0 
goal: Polynomial.rootMultiplicity x (Polynomial.X - Polynomial.C y) = if x = y then 1 else 0

full_name: Polynomial.rootMultiplicity_add
code: /-- The multiplicity of `p + q` is at least the minimum of the multiplicities. -/
theorem rootMultiplicity_add {p q : R[X]} (a : R) (hzero : p + q ≠ 0) :
    min (rootMultiplicity a p) (rootMultiplicity a q) ≤ rootMultiplicity a (p + q) 
goal: min (Polynomial.rootMultiplicity a p) (Polynomial.rootMultiplicity a q) ≤ Polynomial.rootMultiplicity a (p + q)

full_name: Polynomial.le_rootMultiplicity_mul
code: theorem le_rootMultiplicity_mul {p q : R[X]} (x : R) (hpq : p * q ≠ 0) :
    rootMultiplicity x p + rootMultiplicity x q ≤ rootMultiplicity x (p * q) 
goal: Polynomial.rootMultiplicity x p + Polynomial.rootMultiplicity x q ≤ Polynomial.rootMultiplicity x (p * q)

full_name: Polynomial.rootMultiplicity_mul'
code: theorem rootMultiplicity_mul' {p q : R[X]} {x : R}
    (hpq : (p /ₘ (X - C x) ^ p.rootMultiplicity x).eval x *
      (q /ₘ (X - C x) ^ q.rootMultiplicity x).eval x ≠ 0) :
    rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q 
goal: Polynomial.rootMultiplicity x (p * q) = Polynomial.rootMultiplicity x p + Polynomial.rootMultiplicity x q

full_name: Polynomial.natDegree_coe_units
code: @[simp]
theorem natDegree_coe_units (u : R[X]ˣ) : natDegree (u : R[X]) = 0 
goal: (↑u).natDegree = 0

full_name: Polynomial.coeff_coe_units_zero_ne_zero
code: theorem coeff_coe_units_zero_ne_zero (u : R[X]ˣ) : coeff (u : R[X]) 0 ≠ 0 
goal: (↑u).coeff 0 ≠ 0

full_name: Polynomial.degree_eq_degree_of_associated
code: theorem degree_eq_degree_of_associated (h : Associated p q) : degree p = degree q 
goal: p.degree = q.degree

full_name: Polynomial.degree_eq_one_of_irreducible_of_root
code: theorem degree_eq_one_of_irreducible_of_root (hi : Irreducible p) {x : R} (hx : IsRoot p x) :
    degree p = 1 
goal: p.degree = 1

full_name: Polynomial.leadingCoeff_divByMonic_of_monic
code: /-- Division by a monic polynomial doesn't change the leading coefficient. -/
theorem leadingCoeff_divByMonic_of_monic {R : Type u} [CommRing R] {p q : R[X]} (hmonic : q.Monic)
    (hdegree : q.degree ≤ p.degree) : (p /ₘ q).leadingCoeff = p.leadingCoeff 
goal: (p /ₘ q).leadingCoeff = p.leadingCoeff

full_name: Polynomial.leadingCoeff_divByMonic_X_sub_C
code: theorem leadingCoeff_divByMonic_X_sub_C (p : R[X]) (hp : degree p ≠ 0) (a : R) :
    leadingCoeff (p /ₘ (X - C a)) = leadingCoeff p 
goal: (p /ₘ (Polynomial.X - Polynomial.C a)).leadingCoeff = p.leadingCoeff

full_name: Polynomial.eq_of_dvd_of_natDegree_le_of_leadingCoeff
code: theorem eq_of_dvd_of_natDegree_le_of_leadingCoeff {p q : R[X]} (hpq : p ∣ q)
    (h₁ : q.natDegree ≤ p.natDegree) (h₂ : p.leadingCoeff = q.leadingCoeff) :
    p = q 
goal: p = q

full_name: Polynomial.associated_of_dvd_of_natDegree_le_of_leadingCoeff
code: theorem associated_of_dvd_of_natDegree_le_of_leadingCoeff {p q : R[X]} (hpq : p ∣ q)
    (h₁ : q.natDegree ≤ p.natDegree) (h₂ : q.leadingCoeff ∣ p.leadingCoeff) :
    Associated p q 
goal: Associated p q

full_name: Polynomial.associated_of_dvd_of_natDegree_le
code: theorem associated_of_dvd_of_natDegree_le {K} [Field K] {p q : K[X]} (hpq : p ∣ q) (hq : q ≠ 0)
    (h₁ : q.natDegree ≤ p.natDegree) : Associated p q 
goal: Associated p q

full_name: Polynomial.associated_of_dvd_of_degree_eq
code: theorem associated_of_dvd_of_degree_eq {K} [Field K] {p q : K[X]} (hpq : p ∣ q)
    (h₁ : p.degree = q.degree) : Associated p q 
goal: Associated p q

full_name: Polynomial.eq_leadingCoeff_mul_of_monic_of_dvd_of_natDegree_le
code: theorem eq_leadingCoeff_mul_of_monic_of_dvd_of_natDegree_le {R} [CommRing R] {p q : R[X]}
    (hp : p.Monic) (hdiv : p ∣ q) (hdeg : q.natDegree ≤ p.natDegree) :
    q = C q.leadingCoeff * p 
goal: q = Polynomial.C q.leadingCoeff * p

full_name: Polynomial.eq_of_monic_of_dvd_of_natDegree_le
code: theorem eq_of_monic_of_dvd_of_natDegree_le {R} [CommRing R] {p q : R[X]} (hp : p.Monic)
    (hq : q.Monic) (hdiv : p ∣ q) (hdeg : q.natDegree ≤ p.natDegree) : q = p 
goal: q = p

full_name: Polynomial.prime_X_sub_C
code: theorem prime_X_sub_C (r : R) : Prime (X - C r) 
goal: Prime (Polynomial.X - Polynomial.C r)

full_name: Polynomial.prime_X
code: theorem prime_X : Prime (X : R[X]) 
goal: Prime Polynomial.X

full_name: Polynomial.Monic.prime_of_degree_eq_one
code: theorem Monic.prime_of_degree_eq_one (hp1 : degree p = 1) (hm : Monic p) : Prime p 
goal: Prime p

full_name: Polynomial.irreducible_X_sub_C
code: theorem irreducible_X_sub_C (r : R) : Irreducible (X - C r) 
goal: Irreducible (Polynomial.X - Polynomial.C r)

full_name: Polynomial.irreducible_X
code: theorem irreducible_X : Irreducible (X : R[X]) 
goal: Irreducible Polynomial.X

full_name: Polynomial.Monic.irreducible_of_degree_eq_one
code: theorem Monic.irreducible_of_degree_eq_one (hp1 : degree p = 1) (hm : Monic p) : Irreducible p 
goal: Irreducible p

full_name: Polynomial.natDegree_multiset_prod_X_sub_C_eq_card
code: @[simp]
theorem natDegree_multiset_prod_X_sub_C_eq_card (s : Multiset R) :
    (s.map fun a => X - C a).prod.natDegree = Multiset.card s 
goal: (Multiset.map (fun a => Polynomial.X - Polynomial.C a) s).prod.natDegree = Multiset.card s

full_name: Polynomial.Monic.comp
code: theorem Monic.comp (hp : p.Monic) (hq : q.Monic) (h : q.natDegree ≠ 0) : (p.comp q).Monic 
goal: (p.comp q).Monic

full_name: Polynomial.Monic.comp_X_add_C
code: theorem Monic.comp_X_add_C (hp : p.Monic) (r : R) : (p.comp (X + C r)).Monic 
goal: (p.comp (Polynomial.X + Polynomial.C r)).Monic

full_name: Polynomial.Monic.comp_X_sub_C
code: theorem Monic.comp_X_sub_C (hp : p.Monic) (r : R) : (p.comp (X - C r)).Monic 
goal: (p.comp (Polynomial.X - Polynomial.C r)).Monic

full_name: Polynomial.units_coeff_zero_smul
code: theorem units_coeff_zero_smul (c : R[X]ˣ) (p : R[X]) : (c : R[X]).coeff 0 • p = c * p 
goal: (↑c).coeff 0 • p = ↑c * p

full_name: Polynomial.comp_eq_zero_iff
code: theorem comp_eq_zero_iff : p.comp q = 0 ↔ p = 0 ∨ p.eval (q.coeff 0) = 0 ∧ q = C (q.coeff 0) 
goal: p.comp q = 0 ↔ p = 0 ∨ Polynomial.eval (q.coeff 0) p = 0 ∧ q = Polynomial.C (q.coeff 0)

full_name: Polynomial.aeval_ne_zero_of_isCoprime
code: lemma aeval_ne_zero_of_isCoprime [CommSemiring R] [Nontrivial S] [Semiring S] [Algebra R S]
    {p q : R[X]} (h : IsCoprime p q) (s : S) : aeval s p ≠ 0 ∨ aeval s q ≠ 0 
goal: (Polynomial.aeval s) p ≠ 0 ∨ (Polynomial.aeval s) q ≠ 0

full_name: Polynomial.isCoprime_X_sub_C_of_isUnit_sub
code: theorem isCoprime_X_sub_C_of_isUnit_sub {R} [CommRing R] {a b : R} (h : IsUnit (a - b)) :
    IsCoprime (X - C a) (X - C b) 
goal: IsCoprime (Polynomial.X - Polynomial.C a) (Polynomial.X - Polynomial.C b)

full_name: Polynomial.pairwise_coprime_X_sub_C
code: theorem pairwise_coprime_X_sub_C {K} [Field K] {I : Type v} {s : I → K} (H : Function.Injective s) :
    Pairwise (IsCoprime on fun i : I => X - C (s i)) 
goal: Pairwise (IsCoprime on fun i => Polynomial.X - Polynomial.C (s i))

full_name: Polynomial.rootMultiplicity_mul
code: theorem rootMultiplicity_mul {p q : R[X]} {x : R} (hpq : p * q ≠ 0) :
    rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q 
goal: Polynomial.rootMultiplicity x (p * q) = Polynomial.rootMultiplicity x p + Polynomial.rootMultiplicity x q

full_name: Polynomial.exists_multiset_roots
code: theorem exists_multiset_roots [DecidableEq R] :
    ∀ {p : R[X]} (_ : p ≠ 0), ∃ s : Multiset R,
      (Multiset.card s : WithBot ℕ) ≤ degree p ∧ ∀ a, s.count a = rootMultiplicity a p
  
goal: p ≠ 0 → ∃ s, ↑(Multiset.card s) ≤ p.degree ∧ ∀ (a : R), Multiset.count a s = Polynomial.rootMultiplicity a p

full_name: Polynomial.isUnit_of_isUnit_leadingCoeff_of_isUnit_map
code: theorem isUnit_of_isUnit_leadingCoeff_of_isUnit_map {f : R[X]} (hf : IsUnit f.leadingCoeff)
    (H : IsUnit (map φ f)) : IsUnit f 
goal: IsUnit f

full_name: Polynomial.Monic.irreducible_of_irreducible_map
code: /-- A polynomial over an integral domain `R` is irreducible if it is monic and
  irreducible after mapping into an integral domain `S`.

A special case of this lemma is that a polynomial over `ℤ` is irreducible if
  it is monic and irreducible over `ℤ/pℤ` for some prime `p`.
-/
theorem Monic.irreducible_of_irreducible_map (f : R[X]) (h_mon : Monic f)
    (h_irr : Irreducible (Polynomial.map φ f)) : Irreducible f 
goal: Irreducible f