Scaling the roots of a polynomial #
This file defines scaleRoots p s
for a polynomial p
in one variable and a ring element s
to
be the polynomial with root r * s
for each root r
of p
and proves some basic results about it.
scaleRoots p s
is a polynomial with root r * s
for each root r
of p
.
Equations
- Polynomial.scaleRoots p s = Finset.sum (Polynomial.support p) fun (i : ℕ) => (Polynomial.monomial i) (Polynomial.coeff p i * s ^ (Polynomial.natDegree p - i))
Instances For
@[simp]
theorem
Polynomial.coeff_scaleRoots
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
(s : R)
(i : ℕ)
:
Polynomial.coeff (Polynomial.scaleRoots p s) i = Polynomial.coeff p i * s ^ (Polynomial.natDegree p - i)
theorem
Polynomial.coeff_scaleRoots_natDegree
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
(s : R)
:
@[simp]
theorem
Polynomial.zero_scaleRoots
{R : Type u_1}
[Semiring R]
(s : R)
:
Polynomial.scaleRoots 0 s = 0
theorem
Polynomial.scaleRoots_ne_zero
{R : Type u_1}
[Semiring R]
{p : Polynomial R}
(hp : p ≠ 0)
(s : R)
:
Polynomial.scaleRoots p s ≠ 0
theorem
Polynomial.support_scaleRoots_eq
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
{s : R}
(hs : s ∈ nonZeroDivisors R)
:
@[simp]
@[simp]
theorem
Polynomial.map_scaleRoots
{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
(p : Polynomial R)
(x : R)
(f : R →+* S)
(h : f (Polynomial.leadingCoeff p) ≠ 0)
:
Polynomial.map f (Polynomial.scaleRoots p x) = Polynomial.scaleRoots (Polynomial.map f p) (f x)
@[simp]
theorem
Polynomial.scaleRoots_C
{R : Type u_1}
[Semiring R]
(r : R)
(c : R)
:
Polynomial.scaleRoots (Polynomial.C c) r = Polynomial.C c
@[simp]
theorem
Polynomial.scaleRoots_one
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
Polynomial.scaleRoots p 1 = p
@[simp]
theorem
Polynomial.scaleRoots_zero
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
Polynomial.scaleRoots p 0 = Polynomial.leadingCoeff p • Polynomial.X ^ Polynomial.natDegree p
@[simp]
theorem
Polynomial.one_scaleRoots
{R : Type u_1}
[Semiring R]
(r : R)
:
Polynomial.scaleRoots 1 r = 1
theorem
Polynomial.scaleRoots_eval₂_mul_of_commute
{S : Type u_2}
{A : Type u_3}
[Semiring S]
[Semiring A]
{p : Polynomial S}
(f : S →+* A)
(a : A)
(s : S)
(hsa : Commute (f s) a)
(hf : ∀ (s₁ s₂ : S), Commute (f s₁) (f s₂))
:
Polynomial.eval₂ f (f s * a) (Polynomial.scaleRoots p s) = f s ^ Polynomial.natDegree p * Polynomial.eval₂ f a p
theorem
Polynomial.scaleRoots_eval₂_mul
{R : Type u_1}
{S : Type u_2}
[Semiring S]
[CommSemiring R]
{p : Polynomial S}
(f : S →+* R)
(r : R)
(s : S)
:
Polynomial.eval₂ f (f s * r) (Polynomial.scaleRoots p s) = f s ^ Polynomial.natDegree p * Polynomial.eval₂ f r p
theorem
Polynomial.scaleRoots_eval₂_eq_zero
{R : Type u_1}
{S : Type u_2}
[Semiring S]
[CommSemiring R]
{p : Polynomial S}
(f : S →+* R)
{r : R}
{s : S}
(hr : Polynomial.eval₂ f r p = 0)
:
Polynomial.eval₂ f (f s * r) (Polynomial.scaleRoots p s) = 0
theorem
Polynomial.scaleRoots_aeval_eq_zero
{R : Type u_1}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{p : Polynomial R}
{a : A}
{r : R}
(ha : (Polynomial.aeval a) p = 0)
:
(Polynomial.aeval ((algebraMap R A) r * a)) (Polynomial.scaleRoots p r) = 0
theorem
Polynomial.scaleRoots_eval₂_eq_zero_of_eval₂_div_eq_zero
{S : Type u_2}
{K : Type u_4}
[Semiring S]
[Field K]
{p : Polynomial S}
{f : S →+* K}
(hf : Function.Injective ⇑f)
{r : S}
{s : S}
(hr : Polynomial.eval₂ f (f r / f s) p = 0)
(hs : s ∈ nonZeroDivisors S)
:
Polynomial.eval₂ f (f r) (Polynomial.scaleRoots p s) = 0
theorem
Polynomial.scaleRoots_aeval_eq_zero_of_aeval_div_eq_zero
{R : Type u_1}
{K : Type u_4}
[CommSemiring R]
[Field K]
[Algebra R K]
(inj : Function.Injective ⇑(algebraMap R K))
{p : Polynomial R}
{r : R}
{s : R}
(hr : (Polynomial.aeval ((algebraMap R K) r / (algebraMap R K) s)) p = 0)
(hs : s ∈ nonZeroDivisors R)
:
(Polynomial.aeval ((algebraMap R K) r)) (Polynomial.scaleRoots p s) = 0
@[simp]
theorem
Polynomial.scaleRoots_mul
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(r : R)
(s : R)
:
Polynomial.scaleRoots p (r * s) = Polynomial.scaleRoots (Polynomial.scaleRoots p r) s
theorem
Polynomial.mul_scaleRoots
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
(r : R)
:
r ^ (Polynomial.natDegree p + Polynomial.natDegree q - Polynomial.natDegree (p * q)) • Polynomial.scaleRoots (p * q) r = Polynomial.scaleRoots p r * Polynomial.scaleRoots q r
Multiplication and scaleRoots
commute up to a power of r
. The factor disappears if we
assume that the product of the leading coeffs does not vanish. See Polynomial.mul_scaleRoots'
.
theorem
Polynomial.mul_scaleRoots'
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
(r : R)
(h : Polynomial.leadingCoeff p * Polynomial.leadingCoeff q ≠ 0)
:
Polynomial.scaleRoots (p * q) r = Polynomial.scaleRoots p r * Polynomial.scaleRoots q r
theorem
Polynomial.mul_scaleRoots_of_noZeroDivisors
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
(r : R)
[NoZeroDivisors R]
:
Polynomial.scaleRoots (p * q) r = Polynomial.scaleRoots p r * Polynomial.scaleRoots q r
theorem
Polynomial.add_scaleRoots_of_natDegree_eq
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
(r : R)
(h : Polynomial.natDegree p = Polynomial.natDegree q)
:
r ^ (Polynomial.natDegree p - Polynomial.natDegree (p + q)) • Polynomial.scaleRoots (p + q) r = Polynomial.scaleRoots p r + Polynomial.scaleRoots q r
theorem
Polynomial.scaleRoots_dvd'
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
{r : R}
(hr : IsUnit r)
(hpq : p ∣ q)
:
theorem
Polynomial.scaleRoots_dvd
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
{r : R}
[NoZeroDivisors R]
(hpq : p ∣ q)
:
theorem
Dvd.dvd.scaleRoots
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
{r : R}
[NoZeroDivisors R]
(hpq : p ∣ q)
:
Alias of Polynomial.scaleRoots_dvd
.
theorem
Polynomial.scaleRoots_dvd_iff
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
{r : R}
(hr : IsUnit r)
:
Polynomial.scaleRoots p r ∣ Polynomial.scaleRoots q r ↔ p ∣ q
theorem
IsUnit.scaleRoots_dvd_iff
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
{r : R}
(hr : IsUnit r)
:
Polynomial.scaleRoots p r ∣ Polynomial.scaleRoots q r ↔ p ∣ q
Alias of Polynomial.scaleRoots_dvd_iff
.
theorem
Polynomial.isCoprime_scaleRoots
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
(r : R)
(hr : IsUnit r)
(h : IsCoprime p q)
:
IsCoprime (Polynomial.scaleRoots p r) (Polynomial.scaleRoots q r)
theorem
IsCoprime.scaleRoots
{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(q : Polynomial R)
(r : R)
(hr : IsUnit r)
(h : IsCoprime p q)
:
IsCoprime (Polynomial.scaleRoots p r) (Polynomial.scaleRoots q r)
Alias of Polynomial.isCoprime_scaleRoots
.