Theory of univariate polynomials #
We prove basic results about univariate polynomials.
theorem
Polynomial.natDegree_pos_of_aeval_root
{R : Type u}
{S : Type v}
[CommRing R]
[Semiring S]
[Algebra R S]
{p : Polynomial R}
(hp : p ≠ 0)
{z : S}
(hz : (Polynomial.aeval z) p = 0)
(inj : ∀ (x : R), (algebraMap R S) x = 0 → x = 0)
:
0 < p.natDegree
theorem
Polynomial.degree_pos_of_aeval_root
{R : Type u}
{S : Type v}
[CommRing R]
[Semiring S]
[Algebra R S]
{p : Polynomial R}
(hp : p ≠ 0)
{z : S}
(hz : (Polynomial.aeval z) p = 0)
(inj : ∀ (x : R), (algebraMap R S) x = 0 → x = 0)
:
0 < p.degree
theorem
Polynomial.smul_modByMonic
{R : Type u}
[CommRing R]
{q : Polynomial R}
(c : R)
(p : Polynomial R)
:
@[simp]
theorem
Polynomial.modByMonicHom_apply
{R : Type u}
[CommRing R]
(q : Polynomial R)
(p : Polynomial R)
:
def
Polynomial.modByMonicHom
{R : Type u}
[CommRing R]
(q : Polynomial R)
:
Polynomial R →ₗ[R] Polynomial R
_ %ₘ q
as an R
-linear map.
Equations
- q.modByMonicHom = { toFun := fun (p : Polynomial R) => p %ₘ q, map_add' := ⋯, map_smul' := ⋯ }
Instances For
theorem
Polynomial.aeval_modByMonic_eq_self_of_root
{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
[Algebra R S]
{p : Polynomial R}
{q : Polynomial R}
(hq : q.Monic)
{x : S}
(hx : (Polynomial.aeval x) q = 0)
:
(Polynomial.aeval x) (p %ₘ q) = (Polynomial.aeval x) p
theorem
Polynomial.trailingDegree_mul
{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p : Polynomial R}
{q : Polynomial R}
:
theorem
Polynomial.rootMultiplicity_eq_rootMultiplicity
{R : Type u}
[CommRing R]
{p : Polynomial R}
{t : R}
:
Polynomial.rootMultiplicity t p = Polynomial.rootMultiplicity 0 (p.comp (Polynomial.X + Polynomial.C t))
theorem
Polynomial.rootMultiplicity_eq_natTrailingDegree
{R : Type u}
[CommRing R]
{p : Polynomial R}
{t : R}
:
Polynomial.rootMultiplicity t p = (p.comp (Polynomial.X + Polynomial.C t)).natTrailingDegree
See Polynomial.rootMultiplicity_eq_natTrailingDegree'
for the special case of t = 0
.
theorem
Polynomial.Monic.mem_nonZeroDivisors
{R : Type u}
[CommRing R]
{p : Polynomial R}
(h : p.Monic)
:
p ∈ nonZeroDivisors (Polynomial R)
theorem
Polynomial.mem_nonZeroDivisors_of_leadingCoeff
{R : Type u}
[CommRing R]
{p : Polynomial R}
(h : p.leadingCoeff ∈ nonZeroDivisors R)
:
p ∈ nonZeroDivisors (Polynomial R)
theorem
Polynomial.rootMultiplicity_mul_X_sub_C_pow
{R : Type u}
[CommRing R]
{p : Polynomial R}
{a : R}
{n : ℕ}
(h : p ≠ 0)
:
Polynomial.rootMultiplicity a (p * (Polynomial.X - Polynomial.C a) ^ n) = Polynomial.rootMultiplicity a p + n
theorem
Polynomial.rootMultiplicity_X_sub_C_pow
{R : Type u}
[CommRing R]
[Nontrivial R]
(a : R)
(n : ℕ)
:
Polynomial.rootMultiplicity a ((Polynomial.X - Polynomial.C a) ^ n) = n
The multiplicity of a
as root of (X - a) ^ n
is n
.
theorem
Polynomial.rootMultiplicity_X_sub_C_self
{R : Type u}
[CommRing R]
[Nontrivial R]
{x : R}
:
Polynomial.rootMultiplicity x (Polynomial.X - Polynomial.C x) = 1
theorem
Polynomial.rootMultiplicity_X_sub_C
{R : Type u}
[CommRing R]
[Nontrivial R]
[DecidableEq R]
{x : R}
{y : R}
:
Polynomial.rootMultiplicity x (Polynomial.X - Polynomial.C y) = if x = y then 1 else 0
theorem
Polynomial.rootMultiplicity_mul'
{R : Type u}
[CommRing R]
{p : Polynomial R}
{q : Polynomial R}
{x : R}
(hpq : Polynomial.eval x (p /ₘ (Polynomial.X - Polynomial.C x) ^ Polynomial.rootMultiplicity x p) * Polynomial.eval x (q /ₘ (Polynomial.X - Polynomial.C x) ^ Polynomial.rootMultiplicity x q) ≠ 0)
:
Polynomial.rootMultiplicity x (p * q) = Polynomial.rootMultiplicity x p + Polynomial.rootMultiplicity x q
theorem
Polynomial.Monic.neg_one_pow_natDegree_mul_comp_neg_X
{R : Type u}
[CommRing R]
{p : Polynomial R}
(hp : p.Monic)
:
theorem
Polynomial.degree_eq_degree_of_associated
{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
{q : Polynomial R}
(h : Associated p q)
:
p.degree = q.degree
theorem
Polynomial.Monic.prime_of_degree_eq_one
{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
(hp1 : p.degree = 1)
(hm : p.Monic)
:
Prime p
theorem
Polynomial.irreducible_X_sub_C
{R : Type u}
[CommRing R]
[IsDomain R]
(r : R)
:
Irreducible (Polynomial.X - Polynomial.C r)
theorem
Polynomial.Monic.irreducible_of_degree_eq_one
{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
(hp1 : p.degree = 1)
(hm : p.Monic)
:
theorem
Polynomial.aeval_ne_zero_of_isCoprime
{S : Type v}
{R : Type u_1}
[CommSemiring R]
[Nontrivial S]
[Semiring S]
[Algebra R S]
{p : Polynomial R}
{q : Polynomial R}
(h : IsCoprime p q)
(s : S)
:
(Polynomial.aeval s) p ≠ 0 ∨ (Polynomial.aeval s) q ≠ 0
theorem
Polynomial.pairwise_coprime_X_sub_C
{K : Type u_1}
[Field K]
{I : Type v}
{s : I → K}
(H : Function.Injective s)
:
theorem
Polynomial.rootMultiplicity_mul
{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
{q : Polynomial R}
{x : R}
(hpq : p * q ≠ 0)
:
Polynomial.rootMultiplicity x (p * q) = Polynomial.rootMultiplicity x p + Polynomial.rootMultiplicity x q
@[irreducible]
theorem
Polynomial.exists_multiset_roots
{R : Type u}
[CommRing R]
[IsDomain R]
[DecidableEq R]
{p : Polynomial R}
:
p ≠ 0 →
∃ (s : Multiset R), ↑(Multiset.card s) ≤ p.degree ∧ ∀ (a : R), Multiset.count a s = Polynomial.rootMultiplicity a p