The areas / V09. Commutative algebra I: ideals, polynomials, factorization
Mathlib.RingTheory.Polynomial.RationalRoot
9 declarations and 1 deprecated aliases. Mathlib docs · Source
Rational root theorem and integral root theorem
This file contains the rational root theorem and integral root theorem.
The rational root theorem (num_dvd_of_is_root and den_dvd_of_is_root)
for a unique factorization domain A
with localization S, states that the roots of p : A[X] in A's
field of fractions are of the form x / y with x y : A, x ∣ p.coeff 0 and
y ∣ p.leadingCoeff.
The corollary is the integral root theorem isInteger_of_is_root_of_monic:
if p is monic, its roots must be integers.
Finally, we use this to show unique factorization domains are integrally closed.
References
- https://en.wikipedia.org/wiki/Rational_root_theorem
theorem scaleRoots_aeval_eq_zero_of_aeval_mk'_eq_zero E1 #
∀ {A : Type u_1} {S : Type u_3} [inst : CommRing A] [inst_1 : CommRing S] {M : Submonoid A} [inst_2 : Algebra A S]
[inst_3 : IsLocalization M S] {p : Polynomial A} {r : A} {s : ↥M},
(Polynomial.aeval (IsLocalization.mk' S r s)) p = 0 → (Polynomial.aeval ((algebraMap A S) r)) (p.scaleRoots ↑s) = 0
theorem num_isRoot_scaleRoots_of_aeval_eq_zero E1 #
∀ {A : Type u_1} {K : Type u_2} [inst : CommRing A] [inst_1 : Field K] [inst_2 : Algebra A K]
[inst_3 : IsFractionRing A K] [inst_4 : IsDomain A] [inst_5 : UniqueFactorizationMonoid A] {p : Polynomial A} {x : K},
(Polynomial.aeval x) p = 0 → (p.scaleRoots ↑(IsFractionRing.den A x)).IsRoot (IsFractionRing.num A x)
theorem num_dvd_of_is_root E3 #
∀ {A : Type u_1} {K : Type u_2} [inst : CommRing A] [inst_1 : IsDomain A] [inst_2 : UniqueFactorizationMonoid A]
[inst_3 : Field K] [inst_4 : Algebra A K] [inst_5 : IsFractionRing A K] {p : Polynomial A} {r : K},
(Polynomial.aeval r) p = 0 → IsFractionRing.num A r ∣ p.coeff 0
Rational root theorem part 1:
if r : f.codomain is a root of a polynomial over the ufd A,
then the numerator of r divides the constant coefficient
theorem den_dvd_of_is_root E3 #
∀ {A : Type u_1} {K : Type u_2} [inst : CommRing A] [inst_1 : IsDomain A] [inst_2 : UniqueFactorizationMonoid A]
[inst_3 : Field K] [inst_4 : Algebra A K] [inst_5 : IsFractionRing A K] {p : Polynomial A} {r : K},
(Polynomial.aeval r) p = 0 → ↑(IsFractionRing.den A r) ∣ p.leadingCoeff
Rational root theorem part 2:
if r : f.codomain is a root of a polynomial over the ufd A,
then the denominator of r divides the leading coefficient
theorem isInteger_of_is_root_of_monic E3 #
∀ {A : Type u_1} {K : Type u_2} [inst : CommRing A] [IsDomain A] [UniqueFactorizationMonoid A] [inst_3 : Field K]
[inst_4 : Algebra A K] [IsFractionRing A K] {p : Polynomial A},
p.Monic → ∀ {r : K}, (Polynomial.aeval r) p = 0 → IsLocalization.IsInteger A r
Integral root theorem:
if r : f.codomain is a root of a monic polynomial over the ufd A,
then r is an integer
theorem exists_integer_of_is_root_of_monic E1 #
∀ {A : Type u_1} {K : Type u_2} [inst : CommRing A] [IsDomain A] [UniqueFactorizationMonoid A] [inst_3 : Field K]
[inst_4 : Algebra A K] [IsFractionRing A K] {p : Polynomial A},
p.Monic → ∀ {r : K}, (Polynomial.aeval r) p = 0 → ∃ r', r = (algebraMap A K) r' ∧ r' ∣ p.coeff 0
theorem UniqueFactorizationMonoid.integer_of_integral E1 #
∀ {A : Type u_1} {K : Type u_2} [inst : CommRing A] [IsDomain A] [UniqueFactorizationMonoid A] [inst_3 : Field K]
[inst_4 : Algebra A K] [IsFractionRing A K] {x : K}, IsIntegral A x → IsLocalization.IsInteger A x
instance UniqueFactorizationMonoid.instIsIntegrallyClosed E0 #
∀ {A : Type u_1} [inst : CommRing A] [IsDomain A] [UniqueFactorizationMonoid A], IsIntegrallyClosed A
theorem IsIntegral.mem_range_ratCast_iff E0 #
∀ {α : Type u_1} [inst : DivisionRing α] [CharZero α] {x : α},
IsIntegral ℤ x → (x ∈ Set.range Rat.cast ↔ x ∈ Set.range Int.cast)
Deprecated aliases
| Name | New name | Since |
|---|---|---|
IsIntegral.exists_int_iff_exists_rat | IsIntegral.mem_range_ratCast_iff | 2026-07-17 |