Theory of univariate polynomials #
This file starts looking like the ring theory of $ R[X] $
This lemma is useful for working with the int_degree
of a rational function.
The multiplicity of a
as root of (X - a) ^ n
is n
.
If (X - a) ^ n
divides a polynomial p
then the multiplicity of a
as root of p
is at
least n
.
The multiplicity of p + q
is at least the minimum of the multiplicities.
nth_roots n a
noncomputably returns the solutions to x ^ n = a
Equations
- polynomial.nth_roots n a = (polynomial.X ^ n - ⇑polynomial.C a).roots
The multiset nth_roots ↑n (1 : R)
as a finset.
Equations
The set of distinct roots of p
in E
.
If you have a non-separable polynomial, use polynomial.roots
for the multiset
where multiple roots have the appropriate multiplicity.
Equations
- p.root_set S = ↑((polynomial.map (algebra_map T S) p).roots.to_finset)
Equations
- p.root_set_fintype S = finset_coe.fintype (polynomial.map (algebra_map T S) p).roots.to_finset
Division by a monic polynomial doesn't change the leading coefficient.
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
.