GAP (RadiRoot) - Chapter 2: Functionality of the Package

Goto Chapter: Top 1 2 3 4 Bib Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

2 Functionality of the Package
2.1 Methods for Rational Polynomials
2.1-1 IsSeparablePolynomial
2.1-2 IsSolvable
2.1-3 SplittingField
2.1-4 GaloisGroupOnRoots
2.2 Solving a Polynomial by Radicals
2.2-1 RootsOfPolynomialAsRadicals
2.2-2 RootsOfPolynomialAsRadicalsNC
2.3 Examples

### 2 Functionality of the Package

This chapter describes the methods available in the Radiroot package.

#### 2.1 Methods for Rational Polynomials

##### 2.1-1 IsSeparablePolynomial

`‣ IsSeparablePolynomial`( f ) | ( property )

returns `true` if the rational polynomial f has simple roots only and `false` otherwise.

##### 2.1-2 IsSolvable

`‣ IsSolvable`( f ) | ( operation )

`‣ IsSolvablePolynomial`( f ) | ( property )

returns `true` if the rational polynomial f has a solvable Galois group and `false` otherwise. It signals an error if there exists an irreducible factor with degree greater than 15.

##### 2.1-3 SplittingField

`‣ SplittingField`( f ) | ( attribute )

`‣ IsomorphicMatrixField`( F ) | ( function )

`‣ RootsAsMatrices`( f ) | ( attribute )

`‣ IsomorphismMatrixField`( F ) | ( attribute )

For a normed, rational polynomial f, `SplittingField(f)` returns the smallest algebraic extension field L of the rationals containing all roots of f. The field is constructed with `FieldByPolynomial` (see Creation of number fields in Alnuth). The primitive element of L is denoted by `a`. A matrix field K isomorphic to L is known after the computation and can be accessed using `IsomorphicMatrixField(L`. The matrices, one for each distinct root of f, in the list produced by `RootsOfMatrices(f)` lie in K. `IsomorphismMatrixField( L )` returns an isomorphism of L onto K.

    gap> x := Indeterminate( Rationals, "x" );;
    gap> f := UnivariatePolynomial( Rationals, [1,3,4,1] );
    x^3+4*x^2+3*x+1
    gap> L := SplittingField( f );
    <algebraic extension over the Rationals of degree 6>
    gap> y := Indeterminate( L, "y" );;
    gap> FactorsPolynomialAlgExt( L, f );
    [ y+(-3/94*a^4-24/47*a^3-253/94*a^2-535/94*a-168/47),
      y+(-3/94*a^4-24/47*a^3-253/94*a^2-441/94*a+20/47),
      y+(3/47*a^4+48/47*a^3+253/47*a^2+488/47*a+336/47) ]
    gap> IsomorphicMatrixField( L );
    <rational matrix field of degree 6>
    gap> Display(RootsAsMatrices(f)[1]);
    [ [   0,   1,   0,   0,   0,   0 ],
      [   0,   0,   1,   0,   0,   0 ],
      [  -1,  -3,  -4,   0,   0,   0 ],
      [   0,   0,   0,   0,   1,   0 ],
      [   0,   0,   0,   0,   0,   1 ],
      [   0,   0,   0,  -1,  -3,  -4 ] ]
    gap> MinimalPolynomial( Rationals, RootsAsMatrices(f)[1]);
    x^3+4*x^2+3*x+1
    gap> iso := IsomorphismMatrixField( L );
    MappingByFunction( <algebraic extension over the Rationals of degree
    6>, <rational matrix field of degree
    6>, function( x ) ... end, function( mat ) ... end )
    gap> PreImages( iso, RootsAsMatrices( f ) );
    [ -3/47*a^4-48/47*a^3-253/47*a^2-488/47*a-336/47,
      3/94*a^4+24/47*a^3+253/94*a^2+441/94*a-20/47,
      3/94*a^4+24/47*a^3+253/94*a^2+535/94*a+168/47 ]

To factorise a polynomial over its splitting field one has to use `FactorsPolynomialAlgExt` (see Alnuth) instead of `Factors`.

##### 2.1-4 GaloisGroupOnRoots

`‣ GaloisGroupOnRoots`( f ) | ( attribute )

calculates the Galois group G of the rational polynomial f, which has to be separable, as a permutation group with respect to the ordering of the roots of f given as matrices by `RootsAsMatrices`.

    gap> GaloisGroupOnRoots(f);
    Group([ (2,3), (1,2) ])

If you only want to get the Galois group abstractly, and if \(f\) is irreducible of degree at most 15, it is often better to use the function `GaloisType` (see Chapter Reference: Polynomials over the Rationals in the GAP reference manual).

#### 2.2 Solving a Polynomial by Radicals

##### 2.2-1 RootsOfPolynomialAsRadicals

`‣ RootsOfPolynomialAsRadicals`( f[, mode[, file]] ) | ( function )

computes a solution by radicals for the irreducible, rational polynomial f up to degree 15 if the Galois group of f is solvable, and returns `fail` otherwise. If it succeeds and mode is not `off`, the function returns the path to a file containing the description of the roots of f and generators of cyclic radical extensions to produce its splitting field.

The user has several options to specify what happens with the results of the computation. Therefore the optional second argument mode, a string, can be set to one of the following values:

    "dvi"

Provided `latex` and the dvi viewer `xdvi` are available, this option will display the irreducible radical expression for the roots and cyclic extension generators in a new window. The package uses this option as the default.

    "latex"

A LaTeX file is generated which contains the encoding for the expression by radicals. This gives the user the opportunity to adjust the layout of the individual example before displaying the expression.

    "maple"

The generated file can be read into Maple [MGH+05] which makes a root of f available as variable `a`.

    "off"

In this mode the function does not actually compute a radical expression but is only called for its side effects. Namely, the attributes `SplittingField`, `RootsAsMatrices` and `GaloisGroupOnRoots` are known for f afterwards. This is slightly more effective than calling the corresponding operations one by one.

With the optional third argument file the user can specify a file name under which the description files will be stored in the directory from which GAP was called. Depending on the option for mode an extension like `.tex` might be added automatically. If file is not given, the function places description files in a new directory `/tmp/tmp.`string with names such as `Nst` and `Nst.tex`; the temporary directory is removed at the end of the GAP session.

The computation may take a very long time and can get unfeasible if the degree of f is greater than 7.

##### 2.2-2 RootsOfPolynomialAsRadicalsNC

`‣ RootsOfPolynomialAsRadicalsNC`( f[, mode[, file]] ) | ( function )

does essentially the same as `RootsOfPolynomialAsRadicals` except that it runs no test on the input before starting the actual computation. Therefore it can be used for polynomials with arbitrary degree, but it may run for a very long time until a non-solvable polynomial is recognized as such.

Detailed examples for these two functions can be found in the next section.

#### 2.3 Examples

The function `RootsOfPolynomialAsRadicals` does not generate output inside GAP. Depending on the chosen mode, various kinds of files can be created. As an example the polynomial from the introduction will be considered.

    gap> g := UnivariatePolynomial( Rationals, [1,1,-1,-1,1] );
    x^4-x^3-x^2+x+1
    gap> RootsOfPolynomialAsRadicals(g);
    "/tmp/tmp.8zkw5B/Nst.tex"

will cause a dvi file to appear in a new window:

An expression by radicals for the roots of the polynomial \(x^{4}-x^{3}-x^{2} + x + 1\) with the \(n\)-th root of unity \(\zeta_n\) and

\(\omega_1 = \sqrt{ - 3}\),

\(\omega_2 = \sqrt{\frac{7}{2} - \frac{1}{2}\omega_1}\),

\(\omega_3 = \sqrt{\frac{7}{2} + \frac{1}{2}\omega_1}\),

is:

\(\frac{1}{4} - \frac{1}{4}\omega_1 + \frac{1}{2}\omega_2\)

If one wants to work with the roots, it might be helpful to use Maple [MGH+05], in which an expression like \(2^{(1/2)}\) is valid.

    gap> RootsOfPolynomialAsRadicals(g, "maple");
    "/tmp/tmp.k9aTCz/Nst"

will create a file with the following content:

    w1 := (-3)^(1/2);
    w2 := ((7/2) + (-1/2)*w1)^(1/2);
    w3 := ((7/2) + (1/2)*w1)^(1/2);

    a := (1/4) + (1/4)*w1 + (1/2)*w3;

After those computations several attributes are known for the polynomial in GAP.

    gap> g := UnivariatePolynomial( Rationals, [1,1,-1,-1,1] );;
    gap> RootsOfPolynomialAsRadicalsNC( g, "off" );
    gap> SplittingField( g );
    <algebraic extension over the Rationals of degree 8>
    gap> GaloisGroupOnRoots( g );
    Group([ (2,4), (1,2)(3,4) ])

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 Bib Ind

generated by GAPDoc2HTML