| 1 | <html><head><title>[Radiroot] 2 Functionality of the Package</title></head> |
| 2 | <body text="#000000" bgcolor="#ffffff"> |
| 3 | [<a href = "chapters.htm">Up</a>] [<a href ="CHAP001.htm">Previous</a>] [<a href ="CHAP003.htm">Next</a>] [<a href = "theindex.htm">Index</a>] |
| 4 | <h1>2 Functionality of the Package</h1><p> |
| 5 | <P> |
| 6 | <H3>Sections</H3> |
| 7 | <oL> |
| 8 | <li> <A HREF="CHAP002.htm#SECT001">Methods for Rational Polynomials</a> |
| 9 | <li> <A HREF="CHAP002.htm#SECT002">Solving a Polynomial by Radicals</a> |
| 10 | </ol><p> |
| 11 | <p> |
| 12 | <p> |
| 13 | <h2><a name="SECT001">2.1 Methods for Rational Polynomials</a></h2> |
| 14 | <p><p> |
| 15 | <a name = "SSEC001.1"></a> |
| 16 | <li><code>IsSeparablePolynomial( </code><var>f</var><code> )</code> |
| 17 | <p> |
| 18 | returns <code>true</code> if the rational polynomial <var>f</var> has simple roots only |
| 19 | and <code>false</code> otherwise. |
| 20 | <p> |
| 21 | <a name = "SSEC001.2"></a> |
| 22 | <li><code>IsSolvable( </code><var>f</var><code> )</code> |
| 23 | <a name = "SSEC001.2"></a> |
| 24 | <li><code>IsSolvablePolynomial( </code><var>f</var><code> )</code> |
| 25 | <p> |
| 26 | returns <code>true</code> if the rational polynomial <var>f</var> has a solvable Galois group and |
| 27 | <code>false</code> otherwise. It signals an error if there exists an irreducible factor |
| 28 | with degree greater than 15. |
| 29 | <p> |
| 30 | <a name = "SSEC001.3"></a> |
| 31 | <li><code>SplittingField( </code><var>f</var><code> )</code> |
| 32 | <a name = "SSEC001.3"></a> |
| 33 | <li><code>IsomorphicMatrixField( </code><var>F</var><code> )</code> |
| 34 | <a name = "SSEC001.3"></a> |
| 35 | <li><code>RootsAsMatrices( </code><var>f</var><code> )</code> |
| 36 | <a name = "SSEC001.3"></a> |
| 37 | <li><code>IsomorphismMatrixField( </code><var>F</var><code> )</code> |
| 38 | <p> |
| 39 | For a normed, rational polynomial <var>f</var>, <code>SplittingField(</code><var>f</var><code>)</code> returns the |
| 40 | smallest algebraic extension field <var>L</var> of the rationals containing all |
| 41 | roots of <var>f</var>. The field is constructed with <code>FieldByPolynomial</code> (see |
| 42 | Creation of number fields in <font face="Gill Sans,Helvetica,Arial">Alnuth</font>). The primitive element of <var>L</var> is |
| 43 | denoted by <code>a</code>. A matrix field <var>K</var> isomorphic to <var>L</var> is known after |
| 44 | the computation and can be accessed using <code>IsomorphicMatrixField(</code><var>L</var><code></code>. |
| 45 | The matrices, one for each distinct root of <var>f</var>, in the list produced |
| 46 | by <code>RootsOfMatrices(</code><var>f</var><code>)</code> lie in <var>K</var>. <code>IsomorphismMatrixField( </code><var>L</var><code> )</code> |
| 47 | returns an isomorphism of <var>L</var> onto <var>K</var>. |
| 48 | <p> |
| 49 | <pre> |
| 50 | gap> x := Indeterminate( Rationals, "x" );; |
| 51 | gap> f := UnivariatePolynomial( Rationals, [1,3,4,1] ); |
| 52 | x^3+4*x^2+3*x+1 |
| 53 | gap> L := SplittingField( f ); |
| 54 | <algebraic extension over the Rationals of degree 6> |
| 55 | gap> y := Indeterminate( L, "y" );; |
| 56 | gap> FactorsPolynomialAlgExt( L, f ); |
| 57 | [ y+(-3/94*a^4-24/47*a^3-253/94*a^2-535/94*a-168/47), |
| 58 | y+(-3/94*a^4-24/47*a^3-253/94*a^2-441/94*a+20/47), |
| 59 | y+(3/47*a^4+48/47*a^3+253/47*a^2+488/47*a+336/47) ] |
| 60 | gap> IsomorphicMatrixField( L ); |
| 61 | <rational matrix field of degree 6> |
| 62 | gap> Display(RootsAsMatrices(f)[1]); |
| 63 | [ [ 0, 1, 0, 0, 0, 0 ], |
| 64 | [ 0, 0, 1, 0, 0, 0 ], |
| 65 | [ -1, -3, -4, 0, 0, 0 ], |
| 66 | [ 0, 0, 0, 0, 1, 0 ], |
| 67 | [ 0, 0, 0, 0, 0, 1 ], |
| 68 | [ 0, 0, 0, -1, -3, -4 ] ] |
| 69 | gap> MinimalPolynomial( Rationals, RootsAsMatrices(f)[1]); |
| 70 | x^3+4*x^2+3*x+1 |
| 71 | gap> iso := IsomorphismMatrixField( L ); |
| 72 | MappingByFunction( <algebraic extension over the Rationals of degree |
| 73 | 6>, <rational matrix field of degree |
| 74 | 6>, function( x ) ... end, function( mat ) ... end ) |
| 75 | gap> PreImages( iso, RootsAsMatrices( f ) ); |
| 76 | [ -3/47*a^4-48/47*a^3-253/47*a^2-488/47*a-336/47, |
| 77 | 3/94*a^4+24/47*a^3+253/94*a^2+441/94*a-20/47, |
| 78 | 3/94*a^4+24/47*a^3+253/94*a^2+535/94*a+168/47 ] |
| 79 | </pre> |
| 80 | To factorise a polynomial over its splitting field one has to use |
| 81 | <code>FactorsPolynomialAlgExt</code> (see <font face="Gill Sans,Helvetica,Arial">Alnuth</font>) instead of <code>Factors</code>. |
| 82 | <p> |
| 83 | <a name = "SSEC001.4"></a> |
| 84 | <li><code>GaloisGroupOnRoots( </code><var>f</var><code> )</code> |
| 85 | <p> |
| 86 | calculates the Galois group <var>G</var> of the rational polynomial <var>f</var>, which |
| 87 | has to be separable, as a permutation group with respect to the |
| 88 | ordering of the roots of <var>f</var> given as matrices by <code>RootsAsMatrices</code>. |
| 89 | <p> |
| 90 | <pre> |
| 91 | gap> GaloisGroupOnRoots(f); |
| 92 | Group([ (2,3), (1,2) ]) |
| 93 | </pre> |
| 94 | <p> |
| 95 | If you only want to get the Galois group abstractly, and if <i>f</i> is |
| 96 | irreducible of degree at most 15, it is often better to use the |
| 97 | function <code>GaloisType</code> (see Chapter <a href="../../../doc/ref/chap66.html#X7F45E9E47EA2C18B">Polynomials over the Rationals</a> in the <font face="Gill Sans,Helvetica,Arial">GAP</font> reference manual). |
| 98 | <p> |
| 99 | <p> |
| 100 | <h2><a name="SECT002">2.2 Solving a Polynomial by Radicals</a></h2> |
| 101 | <p><p> |
| 102 | <a name = "SSEC002.1"></a> |
| 103 | <li><code>RootsOfPolynomialAsRadicals( </code><var>f</var><code> [, </code><var>mode</var><code> [, </code><var>file</var><code> ] ] )</code> |
| 104 | <p> |
| 105 | computes a solution by radicals for the irreducible, rational polynomial <var>f</var> |
| 106 | up to degree 15 if the Galois group of <var>f</var> is |
| 107 | solvable, and returns <code>fail</code> otherwise. If it succeeds and <var>mode</var> is |
| 108 | not <code>off</code>, the function returns the path to a file containing the |
| 109 | description of the roots of <var>f</var> and generators of cyclic radical |
| 110 | extensions to produce its splitting field. |
| 111 | <p> |
| 112 | The user has several options to specify what happens with the results |
| 113 | of the computation. Therefore the optional second argument <var>mode</var>, a |
| 114 | string, can be set to one of the following values: |
| 115 | <p> |
| 116 | <pre> |
| 117 | "dvi" |
| 118 | </pre> |
| 119 | Provided <code>latex</code> and the dvi viewer <code>xdvi</code> are available, this option |
| 120 | will display the irreducible radical expression for the roots and |
| 121 | cyclic extension generators in a new window. The package uses this |
| 122 | option as the default. |
| 123 | <p> |
| 124 | <pre> |
| 125 | "latex" |
| 126 | </pre> |
| 127 | A LaTeX file is generated which contains the encoding for the |
| 128 | expression by radicals. This gives the user the opportunity to adjust |
| 129 | the layout of the individual example before displaying the expression. |
| 130 | <p> |
| 131 | <pre> |
| 132 | "maple" |
| 133 | </pre> |
| 134 | The generated file can be read into Maple <a href="biblio.htm#Maple10"><cite>Maple10</cite></a> which makes a root |
| 135 | of <var>f</var> available as variable <code>a</code>. |
| 136 | <p> |
| 137 | <pre> |
| 138 | "off" |
| 139 | </pre> |
| 140 | In this mode the function does not actually compute a radical |
| 141 | expression but is only called for its side effects. Namely, the |
| 142 | attributes <code>SplittingField</code>, <code>RootsAsMatrices</code> and |
| 143 | <code>GaloisGroupOnRoots</code> are known for <var>f</var> afterwards. This is slightly |
| 144 | more effective than calling the corresponding operations one by one. |
| 145 | <p> |
| 146 | With the optional third argument <var>file</var> the user can specify a |
| 147 | file name under which the description files will be stored in the |
| 148 | directory from which <font face="Gill Sans,Helvetica,Arial">GAP</font> was called. Depending on the option for |
| 149 | <var>mode</var> an extension like <code>.tex</code> might be added automatically. |
| 150 | If <var>file</var> is not given, the function places description files in a new |
| 151 | directory <code>/tmp/tmp.</code><var>string</var> with names such as <code>Nst</code> and <code>Nst.tex</code>; |
| 152 | the temporary directory is removed at the end of the <font face="Gill Sans,Helvetica,Arial">GAP</font> |
| 153 | session. |
| 154 | <p> |
| 155 | The computation may take a very long time and can get unfeasible if the |
| 156 | degree of <var>f</var> is greater than 7. |
| 157 | <pre> |
| 158 | </pre> |
| 159 | <p> |
| 160 | <li><code>RootsOfPolynomialAsRadicalsNC( </code><var>f</var><code> [, </code><var>mode</var><code> [, </code><var>file</var><code> ] ] )</code> |
| 161 | <p> |
| 162 | does essentially the same as <code>RootsOfPolynomialAsRadicals</code> except |
| 163 | that it runs no test on the input before starting the actual |
| 164 | computation. Therefore it can be used for polynomials with arbitrary |
| 165 | degree, but it may run for a very long time until a |
| 166 | non-solvable polynomial is recognized as such. |
| 167 | <p> |
| 168 | Detailed examples for these two functions can be found in the next section. |
| 169 | <p> |
| 170 | <p> |
| 171 | [<a href = "chapters.htm">Up</a>] [<a href ="CHAP001.htm">Previous</a>] [<a href ="CHAP003.htm">Next</a>] [<a href = "theindex.htm">Index</a>] |
| 172 | <P> |
| 173 | <address>Radiroot manual<br>March 2022 |
| 174 | </address></body></html> |