polylib::splitfield
-- the
splitting field of a polynomialGiven p in K[X],
polylib::splitfield
(p)
returns a simple field
extension F of K and some elements alpha1,
...,alphan of F, such that product(X-alphai,
i=1..n) is an associate of p, and such that
F is the smallest extension of K containing all
of the alphai.
polylib::splitfield(p)
p |
- | univariate polynomial over a field or univariate polynomial expression |
polylib::splitfield
returns a list of two operands: the
first one is the splitting field of the polynomial, i.e. a Dom::AlgebraicExtension
of the coefficient ring; the second one is a list of all roots of the
polynomial in the splitting field, each root followed by its
multiplicity.
p
need not be irreducible.genident
and is therefore different
in every call of polylib::splitfield
, even if the same
polynomial is passed.p
.polylib::splitfield
does not terminate.We adjoin sqrt(-1) to the rationals:
>> polylib::splitfield(x^2+1)
2 [Dom::AlgebraicExtension(Dom::Rational, X1 + 1 = 0, X1), [X1, 1, -X1, 1]]
A call to polylib::splitfield
becomes more
interesting for polynomials for of degree at least 3:
>> polylib::splitfield(x^3-2)
-- | 6 | Dom::AlgebraicExtension(Dom::Rational, X4 + 108 = 0, X4), -- -- 4 4 4 -- -- | X4 X4 X4 X4 X4 | | | -- - ---, 1, ---, 1, - -- - ---, 1 | | -- 2 36 18 2 36 -- --
In this example, we work over the field of univariate rational functions (the quotient field of the univariate polynomials) over the rationals:
>> R:=Dom::DistributedPolynomial([x], Dom::Rational): F:=Dom::Fraction(R): f:=poly(y^3-x,[y],F): polylib::splitfield(f)
-- | | Dom::AlgebraicExtension(Dom::Fraction( -- Dom::DistributedPolynomial([x], Dom::Rational, LexOrder)), -- 4 4 4 2 6 | X6 X6 X6 X6 X6 27 x + X6 = 0, X6), | -- - ----, 1, ---, 1, - -- - ----, -- 2 18 x 9 x 2 18 x -- -- | | 1 | | -- --