The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.Polynomial.FieldDivision

117 declarations. Mathlib docs · Source

Theory of univariate polynomials

This file starts looking like the ring theory of $R[X]$

theorem Polynomial.rootMultiplicity_sub_one_le_derivative_rootMultiplicity_of_ne_zero E1 #

∀ {R : Type u} [inst : CommRing R] (p : Polynomial R) (t : R),
  Polynomial.derivative p ≠ 0 →
    Polynomial.rootMultiplicity t p - 1 ≤ Polynomial.rootMultiplicity t (Polynomial.derivative p)

theorem Polynomial.derivative_rootMultiplicity_of_root_of_mem_nonZeroDivisors E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R},
  p.IsRoot t →
    ↑(Polynomial.rootMultiplicity t p) ∈ nonZeroDivisors R →
      Polynomial.rootMultiplicity t (Polynomial.derivative p) = Polynomial.rootMultiplicity t p - 1

theorem Polynomial.isRoot_iterate_derivative_of_lt_rootMultiplicity E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R} {n : ℕ},
  n < Polynomial.rootMultiplicity t p → ((⇑Polynomial.derivative)^[n] p).IsRoot t

theorem Polynomial.eval_iterate_derivative_rootMultiplicity E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R},
  Polynomial.eval t ((⇑Polynomial.derivative)^[Polynomial.rootMultiplicity t p] p) =
    (Polynomial.rootMultiplicity t p).factorial •
      Polynomial.eval t (p /ₘ (Polynomial.X - Polynomial.C t) ^ Polynomial.rootMultiplicity t p)

theorem Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R} {n : ℕ},
  p ≠ 0 →
    (∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t) →
      ↑n.factorial ∈ nonZeroDivisors R → n < Polynomial.rootMultiplicity t p

theorem Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors' E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R} {n : ℕ},
  p ≠ 0 →
    (∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t) →
      (∀ m ≤ n, m ≠ 0 → ↑m ∈ nonZeroDivisors R) → n < Polynomial.rootMultiplicity t p

theorem Polynomial.lt_rootMultiplicity_iff_isRoot_iterate_derivative_of_mem_nonZeroDivisors E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R} {n : ℕ},
  p ≠ 0 →
    ↑n.factorial ∈ nonZeroDivisors R →
      (n < Polynomial.rootMultiplicity t p ↔ ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t)

theorem Polynomial.lt_rootMultiplicity_iff_isRoot_iterate_derivative_of_mem_nonZeroDivisors' E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R} {n : ℕ},
  p ≠ 0 →
    (∀ m ≤ n, m ≠ 0 → ↑m ∈ nonZeroDivisors R) →
      (n < Polynomial.rootMultiplicity t p ↔ ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t)

theorem Polynomial.one_lt_rootMultiplicity_iff_isRoot_iterate_derivative E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R},
  p ≠ 0 → (1 < Polynomial.rootMultiplicity t p ↔ ∀ m ≤ 1, ((⇑Polynomial.derivative)^[m] p).IsRoot t)

theorem Polynomial.one_lt_rootMultiplicity_iff_isRoot E1 #

∀ {R : Type u} [inst : CommRing R] {p : Polynomial R} {t : R},
  p ≠ 0 → (1 < Polynomial.rootMultiplicity t p ↔ p.IsRoot t ∧ (Polynomial.derivative p).IsRoot t)

theorem Polynomial.one_lt_rootMultiplicity_iff_isRoot_gcd E1 #

∀ {R : Type u} [inst : CommRing R] [inst_1 : GCDMonoid (Polynomial R)] {p : Polynomial R} {t : R},
  p ≠ 0 → (1 < Polynomial.rootMultiplicity t p ↔ (gcd p (Polynomial.derivative p)).IsRoot t)

theorem Polynomial.derivative_rootMultiplicity_of_root E1 #

∀ {R : Type u} [inst : CommRing R] [NoZeroDivisors R] [CharZero R] {p : Polynomial R} {t : R},
  p.IsRoot t → Polynomial.rootMultiplicity t (Polynomial.derivative p) = Polynomial.rootMultiplicity t p - 1

theorem Polynomial.rootMultiplicity_sub_one_le_derivative_rootMultiplicity E1 #

∀ {R : Type u} [inst : CommRing R] [NoZeroDivisors R] [CharZero R] (p : Polynomial R) (t : R),
  Polynomial.rootMultiplicity t p - 1 ≤ Polynomial.rootMultiplicity t (Polynomial.derivative p)

theorem Polynomial.lt_rootMultiplicity_of_isRoot_iterate_derivative E1 #

∀ {R : Type u} [inst : CommRing R] [NoZeroDivisors R] [CharZero R] {p : Polynomial R} {t : R} {n : ℕ},
  p ≠ 0 → (∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t) → n < Polynomial.rootMultiplicity t p

theorem Polynomial.lt_rootMultiplicity_iff_isRoot_iterate_derivative E1 #

∀ {R : Type u} [inst : CommRing R] [NoZeroDivisors R] [CharZero R] {p : Polynomial R} {t : R} {n : ℕ},
  p ≠ 0 → (n < Polynomial.rootMultiplicity t p ↔ ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t)

theorem Polynomial.isRoot_of_isRoot_of_dvd_derivative_mul E1 #

∀ {R : Type u} [inst : CommRing R] [NoZeroDivisors R] [CharZero R] {f g : Polynomial R},
  f ≠ 0 → f ∣ Polynomial.derivative f * g → ∀ {a : R}, f.IsRoot a → g.IsRoot a

A sufficient condition for the set of roots of a nonzero polynomial f to be a subset of the set of roots of g is that f divides f.derivative * g. Over an algebraically closed field of characteristic zero, this is also a necessary condition. See isRoot_of_isRoot_iff_dvd_derivative_mul

instance Polynomial.instNormalizationMonoid E0 #

{R : Type u} → [inst : CommRing R] → [NoZeroDivisors R] → [NormalizationMonoid R] → NormalizationMonoid (Polynomial R)

instance Polynomial.instStrongNormalizationMonoid E0 #

{R : Type u} →
  [inst : CommRing R] → [NoZeroDivisors R] → [StrongNormalizationMonoid R] → StrongNormalizationMonoid (Polynomial R)

theorem Polynomial.coe_normUnit E0 #

∀ {R : Type u} [inst : CommRing R] [inst_1 : NoZeroDivisors R] [inst_2 : NormalizationMonoid R] {p : Polynomial R},
  ↑(normUnit p) = Polynomial.C ↑(normUnit p.leadingCoeff)

theorem Polynomial.leadingCoeff_normalize E0 #

∀ {R : Type u} [inst : CommRing R] [inst_1 : NoZeroDivisors R] [inst_2 : NormalizationMonoid R] (p : Polynomial R),
  (normalize p).leadingCoeff = normalize p.leadingCoeff

theorem Polynomial.Monic.normalize_eq_self E1 #

∀ {R : Type u} [inst : CommRing R] [inst_1 : NoZeroDivisors R] [inst_2 : NormalizationMonoid R] {p : Polynomial R},
  p.Monic → normalize p = p

theorem Polynomial.roots_normalize E1 #

∀ {R : Type u_1} [inst : CommRing R] [inst_1 : IsDomain R] [inst_2 : NormalizationMonoid R] {p : Polynomial R},
  (normalize p).roots = p.roots

theorem Polynomial.normUnit_X E1 #

∀ {R : Type u} [inst : CommRing R] [inst_1 : NoZeroDivisors R] [inst_2 : NormalizationMonoid R],
  normUnit Polynomial.X = 1

theorem Polynomial.X_eq_normalize E1 #

∀ {R : Type u} [inst : CommRing R] [inst_1 : NoZeroDivisors R] [inst_2 : NormalizationMonoid R],
  Polynomial.X = normalize Polynomial.X

theorem Polynomial.degree_pos_of_ne_zero_of_nonunit E1 #

∀ {R : Type u} [inst : DivisionRing R] {p : Polynomial R}, p ≠ 0 → ¬IsUnit p → 0 < p.degree

theorem Polynomial.map_eq_zero E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] {p : Polynomial R}
  (f : R →+* S), Polynomial.map f p = 0 ↔ p = 0

theorem Polynomial.map_ne_zero E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] {p : Polynomial R}
  {f : R →+* S}, p ≠ 0 → Polynomial.map f p ≠ 0

theorem Polynomial.degree_map E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] (p : Polynomial R)
  (f : R →+* S), (Polynomial.map f p).degree = p.degree

theorem Polynomial.natDegree_map E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] {p : Polynomial R}
  (f : R →+* S), (Polynomial.map f p).natDegree = p.natDegree

theorem Polynomial.leadingCoeff_map E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] {p : Polynomial R}
  (f : R →+* S), (Polynomial.map f p).leadingCoeff = f p.leadingCoeff

theorem Polynomial.nextCoeff_map_eq E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] (p : Polynomial R)
  (f : R →+* S), (Polynomial.map f p).nextCoeff = f p.nextCoeff

theorem Polynomial.monic_map_iff E0 #

∀ {R : Type u} {S : Type v} [inst : Ring R] [IsSimpleRing R] [inst_2 : Semiring S] [Nontrivial S] {f : R →+* S}
  {p : Polynomial R}, (Polynomial.map f p).Monic ↔ p.Monic

theorem Polynomial.isUnit_iff_degree_eq_zero E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, IsUnit p ↔ p.degree = 0

def Polynomial.div E1 #

{R : Type u} → [inst : Field R] → Polynomial R → Polynomial R → Polynomial R

Division of polynomials. See Polynomial.divByMonic for more details.

def Polynomial.mod E1 #

{R : Type u} → [inst : Field R] → Polynomial R → Polynomial R → Polynomial R

Remainder of polynomial division. See Polynomial.modByMonic for more details.

instance Polynomial.instDiv E0 #

{R : Type u} → [inst : Field R] → Div (Polynomial R)

instance Polynomial.instMod E0 #

{R : Type u} → [inst : Field R] → Mod (Polynomial R)

theorem Polynomial.div_def E0 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R},
  p / q = Polynomial.C q.leadingCoeff⁻¹ * (p /ₘ (q * Polynomial.C q.leadingCoeff⁻¹))

theorem Polynomial.mod_def E0 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R}, p % q = p %ₘ (q * Polynomial.C q.leadingCoeff⁻¹)

theorem Polynomial.neg_mod E1 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R}, -p % q = -(p % q)

theorem Polynomial.modByMonic_eq_mod E1 #

∀ {R : Type u} [inst : Field R] {q : Polynomial R} (p : Polynomial R), q.Monic → p %ₘ q = p % q

theorem Polynomial.divByMonic_eq_div E1 #

∀ {R : Type u} [inst : Field R] {q : Polynomial R} (p : Polynomial R), q.Monic → p /ₘ q = p / q

theorem Polynomial.mod_X_sub_C_eq_C_eval E3 #

∀ {R : Type u} [inst : Field R] (p : Polynomial R) (a : R),
  p % (Polynomial.X - Polynomial.C a) = Polynomial.C (Polynomial.eval a p)

theorem Polynomial.mul_div_eq_iff_isRoot E1 #

∀ {R : Type u} {a : R} [inst : Field R] {p : Polynomial R},
  (Polynomial.X - Polynomial.C a) * (p / (Polynomial.X - Polynomial.C a)) = p ↔ p.IsRoot a

theorem Polynomial.IsRoot.mul_div_eq E0 #

∀ {R : Type u} {a : R} [inst : Field R] {p : Polynomial R},
  p.IsRoot a → (Polynomial.X - Polynomial.C a) * (p / (Polynomial.X - Polynomial.C a)) = p

Alias of the reverse direction of Polynomial.mul_div_eq_iff_isRoot.

instance Polynomial.instEuclideanDomain E3 #

{R : Type u} → [inst : Field R] → EuclideanDomain (Polynomial R)

theorem Polynomial.mod_eq_self_iff E0 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R}, q ≠ 0 → (p % q = p ↔ p.degree < q.degree)

theorem Polynomial.div_eq_zero_iff E0 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R}, q ≠ 0 → (p / q = 0 ↔ p.degree < q.degree)

theorem Polynomial.degree_add_div E1 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R}, q ≠ 0 → q.degree ≤ p.degree → q.degree + (p / q).degree = p.degree

theorem Polynomial.degree_div_le E1 #

∀ {R : Type u} [inst : Field R] (p q : Polynomial R), (p / q).degree ≤ p.degree

theorem Polynomial.degree_div_lt E1 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R}, p ≠ 0 → 0 < q.degree → (p / q).degree < p.degree

theorem Polynomial.isUnit_map E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] {p : Polynomial R} [inst_1 : Field k] (f : R →+* k),
  IsUnit (Polynomial.map f p) ↔ IsUnit p

theorem Polynomial.map_div E0 #

∀ {R : Type u} {k : Type y} [inst : Field R] {p q : Polynomial R} [inst_1 : Field k] (f : R →+* k),
  Polynomial.map f (p / q) = Polynomial.map f p / Polynomial.map f q

theorem Polynomial.map_mod E0 #

∀ {R : Type u} {k : Type y} [inst : Field R] {p q : Polynomial R} [inst_1 : Field k] (f : R →+* k),
  Polynomial.map f (p % q) = Polynomial.map f p % Polynomial.map f q

theorem Polynomial.natDegree_mod_lt E1 #

∀ {k : Type y} [inst : Field k] (p : Polynomial k) {q : Polynomial k}, q.natDegree ≠ 0 → (p % q).natDegree < q.natDegree

theorem Polynomial.degree_mod_lt E1 #

∀ {R : Type u} [inst : Field R] (p : Polynomial R) {q : Polynomial R}, q ≠ 0 → (p % q).degree < q.degree

theorem Polynomial.add_mod E1 #

∀ {R : Type u} [inst : Field R] (p₁ p₂ q : Polynomial R), (p₁ + p₂) % q = p₁ % q + p₂ % q

theorem Polynomial.sub_mod E1 #

∀ {R : Type u} [inst : Field R] (p₁ p₂ q : Polynomial R), (p₁ - p₂) % q = p₁ % q - p₂ % q

theorem Polynomial.mul_mod E1 #

∀ {R : Type u} [inst : Field R] (p₁ p₂ q : Polynomial R), p₁ * p₂ % q = p₁ % q * (p₂ % q) % q

theorem Polynomial.add_div E1 #

∀ {R : Type u} [inst : Field R] (p₁ p₂ q : Polynomial R), (p₁ + p₂) / q = p₁ / q + p₂ / q

theorem Polynomial.mul_add_mod_of_degree_lt E1 #

∀ {R : Type u} [inst : Field R] {d q r : Polynomial R}, r.degree < q.degree → (d * q + r) % q = r

theorem Polynomial.mul_add_div_of_degree_lt E1 #

∀ {R : Type u} [inst : Field R] {d q r : Polynomial R}, r.degree < q.degree → (d * q + r) / q = d

theorem Polynomial.eval_mod_eq_self_of_root E1 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R} {x : R},
  Polynomial.eval x q = 0 → Polynomial.eval x (p % q) = Polynomial.eval x p

theorem Polynomial.gcd_map E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] {p q : Polynomial R} [inst_1 : Field k] [inst_2 : DecidableEq R]
  [inst_3 : DecidableEq k] (f : R →+* k),
  EuclideanDomain.gcd (Polynomial.map f p) (Polynomial.map f q) = Polynomial.map f (EuclideanDomain.gcd p q)

theorem Polynomial.eval₂_gcd_eq_zero E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] [inst_1 : CommSemiring k] [inst_2 : DecidableEq R] {ϕ : R →+* k}
  {f g : Polynomial R} {α : k},
  Polynomial.eval₂ ϕ α f = 0 → Polynomial.eval₂ ϕ α g = 0 → Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0

theorem Polynomial.eval_gcd_eq_zero E1 #

∀ {R : Type u} [inst : Field R] [inst_1 : DecidableEq R] {f g : Polynomial R} {α : R},
  Polynomial.eval α f = 0 → Polynomial.eval α g = 0 → Polynomial.eval α (EuclideanDomain.gcd f g) = 0

theorem Polynomial.root_left_of_root_gcd E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] [inst_1 : CommSemiring k] [inst_2 : DecidableEq R] {ϕ : R →+* k}
  {f g : Polynomial R} {α : k}, Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0 → Polynomial.eval₂ ϕ α f = 0

theorem Polynomial.root_right_of_root_gcd E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] [inst_1 : CommSemiring k] [inst_2 : DecidableEq R] {ϕ : R →+* k}
  {f g : Polynomial R} {α : k}, Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0 → Polynomial.eval₂ ϕ α g = 0

theorem Polynomial.root_gcd_iff_root_left_right E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] [inst_1 : CommSemiring k] [inst_2 : DecidableEq R] {ϕ : R →+* k}
  {f g : Polynomial R} {α : k},
  Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0 ↔ Polynomial.eval₂ ϕ α f = 0 ∧ Polynomial.eval₂ ϕ α g = 0

theorem Polynomial.isRoot_gcd_iff_isRoot_left_right E1 #

∀ {R : Type u} [inst : Field R] [inst_1 : DecidableEq R] {f g : Polynomial R} {α : R},
  (EuclideanDomain.gcd f g).IsRoot α ↔ f.IsRoot α ∧ g.IsRoot α

theorem Polynomial.isCoprime_map E1 #

∀ {R : Type u} {k : Type y} [inst : Field R] {p q : Polynomial R} [inst_1 : Field k] (f : R →+* k),
  IsCoprime (Polynomial.map f p) (Polynomial.map f q) ↔ IsCoprime p q

theorem Polynomial.mem_roots_map E0 #

∀ {R : Type u} {k : Type y} [inst : Field R] {p : Polynomial R} [inst_1 : CommRing k] [inst_2 : IsDomain k]
  {f : R →+* k} {x : k}, p ≠ 0 → (x ∈ (Polynomial.map f p).roots ↔ Polynomial.eval₂ f x p = 0)

theorem Polynomial.rootSet_monomial E1 #

∀ {R : Type u} {S : Type v} [inst : Field R] [inst_1 : CommRing S] [inst_2 : IsDomain S] [inst_3 : Algebra R S] {n : ℕ},
  n ≠ 0 → ∀ {a : R}, a ≠ 0 → ((Polynomial.monomial n) a).rootSet S = {0}

theorem Polynomial.rootSet_C_mul_X_pow E1 #

∀ {R : Type u} {S : Type v} [inst : Field R] [inst_1 : CommRing S] [inst_2 : IsDomain S] [inst_3 : Algebra R S] {n : ℕ},
  n ≠ 0 → ∀ {a : R}, a ≠ 0 → (Polynomial.C a * Polynomial.X ^ n).rootSet S = {0}

theorem Polynomial.rootSet_X_pow E1 #

∀ {R : Type u} {S : Type v} [inst : Field R] [inst_1 : CommRing S] [inst_2 : IsDomain S] [inst_3 : Algebra R S] {n : ℕ},
  n ≠ 0 → (Polynomial.X ^ n).rootSet S = {0}

theorem Polynomial.rootSet_prod E1 #

∀ {R : Type u} {S : Type v} [inst : Field R] [inst_1 : CommRing S] [inst_2 : IsDomain S] [inst_3 : Algebra R S]
  {ι : Type u_1} (f : ι → Polynomial R) (s : Finset ι), s.prod f ≠ 0 → (s.prod f).rootSet S = ⋃ i ∈ s, (f i).rootSet S

theorem Polynomial.roots_C_mul_X_sub_C E1 #

∀ {R : Type u} {a : R} [inst : Field R] (b : R),
  a ≠ 0 → (Polynomial.C a * Polynomial.X - Polynomial.C b).roots = {a⁻¹ * b}

theorem Polynomial.roots_C_mul_X_add_C E1 #

∀ {R : Type u} {a : R} [inst : Field R] (b : R),
  a ≠ 0 → (Polynomial.C a * Polynomial.X + Polynomial.C b).roots = {-(a⁻¹ * b)}

theorem Polynomial.roots_degree_eq_one E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, p.degree = 1 → p.roots = {-((p.coeff 1)⁻¹ * p.coeff 0)}

theorem Polynomial.exists_root_of_degree_eq_one E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, p.degree = 1 → ∃ x, p.IsRoot x

theorem Polynomial.exists_root_of_natDegree_eq_one E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, p.natDegree = 1 → ∃ x, p.IsRoot x

theorem Polynomial.coeff_inv_units E1 #

∀ {R : Type u} [inst : Field R] (u : (Polynomial R)ˣ) (n : ℕ), ((↑u).coeff n)⁻¹ = (↑u⁻¹).coeff n

theorem Polynomial.monic_normalize E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R} [inst_1 : DecidableEq R], p ≠ 0 → (normalize p).Monic

theorem Polynomial.normalize_eq_self_iff_monic E1 #

∀ {R : Type u} [inst : Field R] [inst_1 : DecidableEq R] {p : Polynomial R}, p ≠ 0 → (normalize p = p ↔ p.Monic)

theorem Polynomial.leadingCoeff_div E1 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R},
  q.degree ≤ p.degree → (p / q).leadingCoeff = p.leadingCoeff / q.leadingCoeff

theorem Polynomial.div_C_mul E1 #

∀ {R : Type u} {a : R} [inst : Field R] {p q : Polynomial R}, p / (Polynomial.C a * q) = Polynomial.C a⁻¹ * (p / q)

theorem Polynomial.div_C E1 #

∀ {R : Type u} {a : R} [inst : Field R] {p : Polynomial R}, p / Polynomial.C a = p * Polynomial.C a⁻¹

theorem Polynomial.C_div E1 #

∀ {R : Type u} {a b : R} [inst : Field R], Polynomial.C (a / b) = Polynomial.C a / Polynomial.C b

theorem Polynomial.C_mul_dvd E1 #

∀ {R : Type u} {a : R} [inst : Field R] {p q : Polynomial R}, a ≠ 0 → (Polynomial.C a * p ∣ q ↔ p ∣ q)

theorem Polynomial.dvd_C_mul E1 #

∀ {R : Type u} {a : R} [inst : Field R] {p q : Polynomial R}, a ≠ 0 → (p ∣ Polynomial.C a * q ↔ p ∣ q)

theorem Polynomial.coe_normUnit_of_ne_zero E0 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R} [inst_1 : DecidableEq R],
  p ≠ 0 → ↑(normUnit p) = Polynomial.C p.leadingCoeff⁻¹

theorem Polynomial.leadingCoeff_mul_normalize E1 #

∀ {R : Type u} [inst : Field R] [inst_1 : DecidableEq R] (p : Polynomial R),
  Polynomial.C p.leadingCoeff * normalize p = p

theorem Polynomial.map_dvd_map' E0 #

∀ {R : Type u} {k : Type y} [inst : Field R] [inst_1 : Field k] (f : R →+* k) {x y : Polynomial R},
  Polynomial.map f x ∣ Polynomial.map f y ↔ x ∣ y

theorem Polynomial.degree_normalize E0 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R} [inst_1 : DecidableEq R], (normalize p).degree = p.degree

theorem Polynomial.natDegree_normalize E0 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R} [inst_1 : DecidableEq R], (normalize p).natDegree = p.natDegree

theorem Polynomial.prime_of_degree_eq_one E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, p.degree = 1 → Prime p

theorem Polynomial.irreducible_of_degree_eq_one E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, p.degree = 1 → Irreducible p

theorem Polynomial.not_irreducible_C E1 #

∀ {R : Type u} [inst : Field R] (x : R), ¬Irreducible (Polynomial.C x)

theorem Polynomial.degree_pos_of_irreducible E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R}, Irreducible p → 0 < p.degree

theorem Polynomial.X_sub_C_mul_divByMonic_eq_sub_modByMonic E1 #

∀ {K : Type u_1} [inst : Ring K] (f : Polynomial K) (a : K),
  (Polynomial.X - Polynomial.C a) * (f /ₘ (Polynomial.X - Polynomial.C a)) = f - f %ₘ (Polynomial.X - Polynomial.C a)

theorem Polynomial.divByMonic_add_X_sub_C_mul_derivative_divByMonic_eq_derivative E1 #

∀ {K : Type u_1} [inst : CommRing K] (f : Polynomial K) (a : K),
  f /ₘ (Polynomial.X - Polynomial.C a) +
      (Polynomial.X - Polynomial.C a) * Polynomial.derivative (f /ₘ (Polynomial.X - Polynomial.C a)) =
    Polynomial.derivative f

theorem Polynomial.X_sub_C_dvd_derivative_of_X_sub_C_dvd_divByMonic E1 #

∀ {K : Type u_1} [inst : Field K] (f : Polynomial K) {a : K},
  Polynomial.X - Polynomial.C a ∣ f /ₘ (Polynomial.X - Polynomial.C a) →
    Polynomial.X - Polynomial.C a ∣ Polynomial.derivative f

theorem Polynomial.isCoprime_of_is_root_of_eval_derivative_ne_zero E1 #

∀ {K : Type u_1} [inst : Field K] (f : Polynomial K) (a : K),
  Polynomial.eval a (Polynomial.derivative f) ≠ 0 →
    IsCoprime (Polynomial.X - Polynomial.C a) (f /ₘ (Polynomial.X - Polynomial.C a))

If f is a polynomial over a field, and a : K satisfies f' a ≠ 0, then f / (X - a) is coprime with X - a. Note that we do not assume f a = 0, because f / (X - a) = (f - f a) / (X - a).

theorem Polynomial.irreducible_iff_degree_lt E1 #

∀ {R : Type u} [inst : Field R] (p : Polynomial R),
  p ≠ 0 → ¬IsUnit p → (Irreducible p ↔ ∀ (q : Polynomial R), q.degree ≤ ↑(p.natDegree / 2) → q ∣ p → IsUnit q)

To check a polynomial over a field is irreducible, it suffices to check only for divisors that have smaller degree.

See also: Polynomial.Monic.irreducible_iff_natDegree.

theorem Polynomial.irreducible_iff_lt_natDegree_lt E1 #

∀ {R : Type u} [inst : Field R] {p : Polynomial R},
  p ≠ 0 →
    ¬IsUnit p → (Irreducible p ↔ ∀ (q : Polynomial R), q.Monic → q.natDegree ∈ Finset.Ioc 0 (p.natDegree / 2) → ¬q ∣ p)

To check a polynomial p over a field is irreducible, it suffices to check there are no divisors of degree 0 < d ≤ degree p / 2.

See also: Polynomial.Monic.irreducible_iff_natDegree'.

theorem Polynomial.leadingCoeff_mul_prod_normalizedFactors E1 #

∀ {R : Type u} [inst : Field R] [inst_1 : DecidableEq R] (p : Polynomial R),
  Polynomial.C p.leadingCoeff * (UniqueFactorizationMonoid.normalizedFactors p).prod = p

The normalized factors of a polynomial over a field times its leading coefficient give the polynomial.

theorem Polynomial.mem_normalizedFactors_iff E0 #

∀ {R : Type u} [inst : Field R] {p q : Polynomial R} [inst_1 : DecidableEq R],
  q ≠ 0 → (p ∈ UniqueFactorizationMonoid.normalizedFactors q ↔ Irreducible p ∧ p.Monic ∧ p ∣ q)

theorem Polynomial.sum_natDegree_normalizedFactors E1 #

∀ {R : Type u} [inst : Field R] [inst_1 : DecidableEq R] (p : Polynomial R),
  (Multiset.map Polynomial.natDegree (UniqueFactorizationMonoid.normalizedFactors p)).sum = p.natDegree

theorem Polynomial.exists_monic_irreducible_factor E1 #

∀ {R : Type u} [inst : Field R] (p : Polynomial R), ¬IsUnit p → ∃ q, q.Monic ∧ Irreducible q ∧ q ∣ p

A polynomial over a field which is not a unit must have a monic irreducible factor. See also WfDvdMonoid.exists_irreducible_factor.

theorem Polynomial.exists_odd_natDegree_monic_irreducible_factor E1 #

∀ {R : Type u} [inst : Field R] (p : Polynomial R),
  Odd p.natDegree → ∃ q, Odd q.natDegree ∧ q.Monic ∧ Irreducible q ∧ q ∣ p

theorem Polynomial.exists_root_of_odd_natDegree_irreducible_imp_natDegree_eq_one E1 #

∀ {R : Type u} [inst : Field R],
  (∀ {q : Polynomial R}, q.Monic → Odd q.natDegree → Irreducible q → q.natDegree = 1) →
    ∀ (p : Polynomial R), Odd p.natDegree → ∃ x, p.IsRoot x

theorem Polynomial.map_normalize E0 #

∀ {R : Type u} {S : Type v} [inst : Field R] (p : Polynomial R) [inst_1 : DecidableEq R] [inst_2 : Field S]
  [inst_3 : DecidableEq S] (f : R →+* S), Polynomial.map f (normalize p) = normalize (Polynomial.map f p)

theorem Polynomial.monic_mapAlg_iff E0 #

∀ {R : Type u} {S : Type v} [inst : Field R] [inst_1 : Semiring S] [Nontrivial S] [inst_3 : Algebra R S]
  {p : Polynomial R}, ((Polynomial.mapAlg R S) p).Monic ↔ p.Monic

theorem Polynomial.mod_eq_of_dvd_sub E1 #

∀ {R : Type u} [inst : Field R] {p₁ p₂ q : Polynomial R}, q ∣ p₁ - p₂ → p₁ % q = p₂ % q

theorem Polynomial.mul_mod_mul_left E1 #

∀ {R : Type u} [inst : Field R] {p₁ p₂ q : Polynomial R}, q * p₁ % (q * p₂) = q * (p₁ % p₂)

theorem Irreducible.natDegree_pos E1 #

∀ {F : Type u_1} [inst : DivisionSemiring F] {f : Polynomial F}, Irreducible f → 0 < f.natDegree

An irreducible polynomial over a field must have positive degree.

theorem Irreducible.degree_pos E1 #

∀ {F : Type u_1} [inst : DivisionSemiring F] {f : Polynomial F}, Irreducible f → 0 < f.degree

An irreducible polynomial over a field must have positive degree.