Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5e1854624d3bc613bdd0dd13d1ef9ac7 > files > 160

gap-system-4.4.12-5mdv2010.0.i586.rpm

<html><head><title>[ref] 18 Cyclotomic Numbers</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href="../index.htm">Top</a>] [<a href = "chapters.htm">Up</a>] [<a href ="CHAP017.htm">Previous</a>] [<a href ="CHAP019.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<h1>18 Cyclotomic Numbers</h1><p>
<P>
<H3>Sections</H3>
<oL>
<li> <A HREF="CHAP018.htm#SECT001">Operations for Cyclotomics</a>
<li> <A HREF="CHAP018.htm#SECT002">Infinity</a>
<li> <A HREF="CHAP018.htm#SECT003">Comparisons of Cyclotomics</a>
<li> <A HREF="CHAP018.htm#SECT004">ATLAS Irrationalities</a>
<li> <A HREF="CHAP018.htm#SECT005">Galois Conjugacy of Cyclotomics</a>
<li> <A HREF="CHAP018.htm#SECT006">Internally Represented Cyclotomics</a>
</ol><p>
<p>
<a name = "I0"></a>

<a name = "I0"></a>
<a name = "I1"></a>

<a name = "I2"></a>

<font face="Gill Sans,Helvetica,Arial">GAP</font> admits computations in abelian extension fields of the rational
number field <b>Q</b>, that is fields with abelian Galois group over <b>Q</b>.
These fields are subfields of <strong>cyclotomic fields</strong> <b>Q</b>(<i>e</i><sub><i>n</i></sub>)
where <i>e</i><sub><i>n</i></sub> = <i>e</i><sup>2&#960;<i>i</i>/<i>n</i></sup> is a primitive complex <i>n</i>-th root of unity.
The elements of these fields are called <strong>cyclotomics</strong>.
<p>
Information concerning operations for domains of cyclotomics,
for example certain integral bases of fields of cyclotomics,
can be found in Chapter&nbsp;<a href="CHAP058.htm">Abelian Number Fields</a>.
For more general operations that take a field extension as a
---possibly optional--- argument, e.g., <code>Trace</code> or <code>Coefficients</code>,
see Chapter&nbsp;<a href="CHAP056.htm">Fields and Division Rings</a>.
<p>
<p>
<h2><a name="SECT001">18.1 Operations for Cyclotomics</a></h2>
<p><p>
<a name = "I3"></a>

<a name = "SSEC001.1"></a>
<li><code>E( </code><var>n</var><code> ) F</code>
<p>
<code>E</code> returns the primitive <var>n</var>-th root of unity <i>e</i><sub><i>n</i></sub> = <i>e</i><sup>2&#960;<i>i</i>/<i>n</i></sup>.
Cyclotomics are usually entered as sums of roots of unity,
with rational coefficients,
and irrational cyclotomics are displayed in the same way.
(For special cyclotomics, see&nbsp;<a href="CHAP018.htm#SECT004">ATLAS irrationalities</a>.)
<p>
<pre>
gap&gt; E(9); E(9)^3; E(6); E(12) / 3;
-E(9)^4-E(9)^7
E(3)
-E(3)^2
-1/3*E(12)^7
</pre>
A particular basis is used to express cyclotomics,
see&nbsp;<a href="CHAP058.htm#SECT003">Integral Bases of Abelian Number Fields</a>;
note that <code>E(9)</code> is <strong>not</strong> a basis element,
as the above example shows.
<p>
<a name = "SSEC001.2"></a>
<li><code>Cyclotomics V</code>
<p>
is the domain of all cyclotomics.
<p>
<pre>
gap&gt; E(9) in Cyclotomics; 37 in Cyclotomics; true in Cyclotomics;
true
true
false
</pre>
<p>
As the cyclotomics are field elements the usual arithmetic operators
<code>+</code>,<code>-</code>,<code>*</code> and <code>/</code> (and <code>^</code> to take powers by integers) are applicable.
Note that <code>^</code> does <strong>not</strong> denote the conjugation of group elements,
so it is <strong>not</strong> possible to explicitly construct groups of cyclotomics.
(However, it is possible to compute the inverse and the multiplicative
order of a nonzero cyclotomic.)
Also, taking the <i>k</i>-th power of a root of unity <i>z</i> defines a Galois
automorphism if and only if <i>k</i> is coprime to the conductor of <i>z</i>.
<p>
<pre>
gap&gt; E(5) + E(3); (E(5) + E(5)^4) ^ 2; E(5) / E(3); E(5) * E(3);
-E(15)^2-2*E(15)^8-E(15)^11-E(15)^13-E(15)^14
-2*E(5)-E(5)^2-E(5)^3-2*E(5)^4
E(15)^13
E(15)^8
gap&gt; Order( E(5) ); Order( 1+E(5) );
5
infinity
</pre>
<p>
<a name = "SSEC001.3"></a>
<li><code>IsCyclotomic( </code><var>obj</var><code> ) C</code>
<a name = "SSEC001.3"></a>
<li><code>IsCyc( </code><var>obj</var><code> ) C</code>
<p>
Every object in the family <code>CyclotomicsFamily</code> lies in the category
<code>IsCyclotomic</code>.
This covers integers, rationals, proper cyclotomics, the object
<code>infinity</code> (see&nbsp;<a href="CHAP018.htm#SSEC002.1">Infinity</a>), and unknowns (see Chapter&nbsp;<a href="CHAP019.htm">Unknowns</a>).
All these objects except <code>infinity</code> and unknowns lie also in the category
<code>IsCyc</code>,
<code>infinity</code> lies in (and can be detected from) the category <code>IsInfinity</code>,
and unknowns lie in <code>IsUnknown</code>.
<p>
<pre>
gap&gt; IsCyclotomic(0); IsCyclotomic(1/2*E(3)); IsCyclotomic( infinity );
true
true
true
gap&gt; IsCyc(0); IsCyc(1/2*E(3)); IsCyc( infinity );
true
true
false
</pre>
<p>
<a name = "SSEC001.4"></a>
<li><code>IsIntegralCyclotomic( </code><var>obj</var><code> ) P</code>
<p>
A cyclotomic is called <strong>integral</strong> or a <strong>cyclotomic integer</strong> if all
coefficients of its minimal polynomial over the rationals are integers.
Since the underlying basis of the external representation of cyclotomics
is an integral basis (see&nbsp;<a href="CHAP058.htm#SECT003">Integral Bases of Abelian Number Fields</a>),
the subring of cyclotomic integers in a cyclotomic field is formed
by those cyclotomics for which the external representation is a list of
integers.
For example, square roots of integers are cyclotomic integers
(see&nbsp;<a href="CHAP018.htm#SECT004">ATLAS irrationalities</a>), any root of unity is a cyclotomic integer,
character values are always cyclotomic integers,
but all rationals which are not integers are not cyclotomic integers.
<p>
<pre>
gap&gt; r:= ER( 5 );                # The square root of 5 is a cyclotomic integer.
E(5)-E(5)^2-E(5)^3+E(5)^4
gap&gt; IsIntegralCyclotomic( r );  # It has integral coefficients.
true
gap&gt; r2:= 1/2 * r;               # This is not a cyclotomic integer, ...
1/2*E(5)-1/2*E(5)^2-1/2*E(5)^3+1/2*E(5)^4
gap&gt; IsIntegralCyclotomic( r2 );
false
gap&gt; r3:= 1/2 * r - 1/2;         # ... but this is one.
E(5)+E(5)^4
gap&gt; IsIntegralCyclotomic( r3 );
true
</pre>
<p>
<a name = "I4"></a>

The operation <code>Int</code>
can be used to find a cyclotomic integer near to an arbitrary cyclotomic.
For rationals, <code>Int</code> returns the largest integer smaller or equal to the
argument.
<pre>
gap&gt; Int( E(5)+1/2*E(5)^2 ); Int( 2/3*E(7)+3/2*E(4) );
E(5)
E(4)
</pre>
<p>
<a name = "I5"></a>

The operation <code>String</code>
returns for a cyclotomic a string corresponding to the way
the cyclotomic is printed by <code>ViewObj</code> and <code>PrintObj</code>.
<pre>
gap&gt; String( E(5)+1/2*E(5)^2 ); String( 17/3 );
"E(5)+1/2*E(5)^2"
"17/3"
</pre>
<p>
<a name = "SSEC001.5"></a>
<li><code>Conductor( </code><var>cyc</var><code> ) A</code>
<li><code>Conductor( </code><var>C</var><code> ) A</code>
<p>
For an element <var>cyc</var> of a cyclotomic field, <code>Conductor</code> returns the
smallest integer <i>n</i> such that <var>cyc</var> is contained in the <i>n</i>-th
cyclotomic field.
For a collection <var>C</var> of cyclotomics (for example a dense list of
cyclotomics or a field of cyclotomics), <code>Conductor</code> returns the
smallest integer <i>n</i> such that all elements of <var>C</var> are contained in the
<i>n</i>-th cyclotomic field.
<p>
<pre>
gap&gt; Conductor( 0 ); Conductor( E(10) ); Conductor( E(12) );
1
5
12
</pre>
<p>
<a name = "SSEC001.6"></a>
<li><code>AbsoluteValue( </code><var>cyc</var><code> ) A</code>
<p>
returns the absolute value of a cyclotomic number <var>cyc</var>.
At the moment only methods for rational numbers exist.
<p>
<pre>
gap&gt; AbsoluteValue(-3);
3
</pre>
<p>
<a name = "SSEC001.7"></a>
<li><code>RoundCyc( </code><var>cyc</var><code> ) O</code>
<p>
is a cyclotomic integer <i>z</i> (see <a href="CHAP018.htm#SSEC001.4">IsIntegralCyclotomic</a>) near to the
cyclotomic <var>cyc</var> in the sense that the <i>i</i>-th coefficient in the external
representation (see&nbsp;<a href="CHAP018.htm#SSEC001.8">CoeffsCyc</a>) of <i>z</i> is <code>Int( c+1/2 )</code> where <code>c</code> is
the <i>i</i>-th coefficient in the external representation of <var>cyc</var>.
Expressed in terms of the Zumbroich basis (see&nbsp;<a href="CHAP058.htm#SECT003">Integral Bases of Abelian Number Fields</a>), the coefficients of <var>cyc</var> w.r.t.&nbsp;this basis are
rounded.
<p>
<pre>
gap&gt; RoundCyc( E(5)+1/2*E(5)^2 ); RoundCyc( 2/3*E(7)+3/2*E(4) );
E(5)+E(5)^2
-2*E(28)^3+E(28)^4-2*E(28)^11-2*E(28)^15-2*E(28)^19-2*E(28)^23-2*E(28)^27
</pre>
<p>
<a name = "SSEC001.8"></a>
<li><code>CoeffsCyc( </code><var>cyc</var><code>, </code><var>N</var><code> ) F</code>
<p>
Let <var>cyc</var> be a cyclotomic with conductor <i>n</i>.
If <var>N</var> is not a multiple of <i>n</i> then <code>CoeffsCyc</code> returns <code>fail</code> because
<var>cyc</var> cannot be expressed in terms of <var>N</var>-th roots of unity.
Otherwise <code>CoeffsCyc</code> returns a list of length <var>N</var> with entry at position
<i>j</i> equal to the coefficient of <i>e</i><sup>2 &#960;<i>i</i> (<i>j</i>&#8722;1)/<i>N</i> </sup> if this root
belongs to the <var>N</var>-th Zumbroich basis (see&nbsp;<a href="CHAP058.htm#SECT003">Integral Bases of Abelian Number Fields</a>),
and equal to zero otherwise.
So we have                                        
<code></code><var>cyc</var><code> = CoeffsCyc(</code><var>cyc</var><code>,</code><var>N</var><code>) * List( [1..</code><var>N</var><code>], j -&gt; E(</code><var>N</var><code>)^(j-1) )</code>.
<p>
<a name = "I6"></a>

<pre>
gap&gt; cyc:= E(5)+E(5)^2;
E(5)+E(5)^2
gap&gt; CoeffsCyc( cyc, 5 );  CoeffsCyc( cyc, 15 );  CoeffsCyc( cyc, 7 );
[ 0, 1, 1, 0, 0 ]
[ 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0 ]
fail
</pre>
<p>
<a name = "SSEC001.9"></a>
<li><code>DenominatorCyc( </code><var>cyc</var><code> ) F</code>
<p>
For a cyclotomic number <var>cyc</var> (see&nbsp;<a href="CHAP018.htm#SSEC001.3">IsCyclotomic</a>),
this function returns the smallest positive integer <var>n</var> such that
<code></code><var>n</var><code> * </code><var>cyc</var><code></code> is a cyclotomic integer (see&nbsp;<a href="CHAP018.htm#SSEC001.4">IsIntegralCyclotomic</a>).
For rational numbers <var>cyc</var>, the result is the same as that of
<code>DenominatorRat</code> (see&nbsp;<a href="CHAP016.htm#SSEC001.5">DenominatorRat</a>).
<p>
<a name = "SSEC001.10"></a>
<li><code>ExtRepOfObj( </code><var>cyc</var><code> )</code>
<pre>
gap&gt; ExtRepOfObj( E(5) ); CoeffsCyc( E(5), 15 );
[ 0, 1, 0, 0, 0 ]
[ 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0 ]
gap&gt; CoeffsCyc( 1+E(3), 9 ); CoeffsCyc( E(5), 7 );
[ 0, 0, 0, 0, 0, 0, -1, 0, 0 ]
fail
</pre>
<p>
<a name = "SSEC001.11"></a>
<li><code>DescriptionOfRootOfUnity( </code><var>root</var><code> ) F</code>
<p>
<a name = "I7"></a>

Given a cyclotomic <var>root</var> that is known to be a root of unity
(this is <strong>not</strong> checked),
<code>DescriptionOfRootOfUnity</code> returns a list [ <i>n</i>, <i>e</i> ] of coprime
positive integers such that <i>root</i>  = <tt>E</tt>(<i>n</i>)<sup><i>e</i></sup> holds.
<p>
<pre>
gap&gt; E(9);  DescriptionOfRootOfUnity( E(9) );
-E(9)^4-E(9)^7
[ 9, 1 ]
gap&gt; DescriptionOfRootOfUnity( -E(3) );
[ 6, 5 ]
</pre>
<p>
<a name = "SSEC001.12"></a>
<li><code>IsGaussInt( </code><var>x</var><code> ) F</code>
<p>
<code>IsGaussInt</code> returns <code>true</code> if the object <var>x</var> is a Gaussian integer
(see&nbsp;<a href="CHAP058.htm#SSEC005.1">GaussianIntegers</a>) and <code>false</code> otherwise.
Gaussian integers are of the form <code></code><var>a</var><code> + </code><var>b</var><code>*E(4)</code>,
where <var>a</var> and <var>b</var> are integers.
<p>
<a name = "SSEC001.13"></a>
<li><code>IsGaussRat( </code><var>x</var><code> ) F</code>
<p>
<code>IsGaussRat</code> returns <code>true</code> if the object <var>x</var> is a Gaussian rational
(see&nbsp;<a href="CHAP058.htm#SSEC001.3">GaussianRationals</a>) and <code>false</code> otherwise.
Gaussian rationals are of the form <code></code><var>a</var><code> + </code><var>b</var><code>*E(4)</code>,
where <var>a</var> and <var>b</var> are rationals.
<p>
<a name = "I8"></a>

<code>DefaultField</code> (see&nbsp;<a href="CHAP056.htm#SSEC001.4">DefaultField</a>)
for cyclotomics is defined to return the smallest <strong>cyclotomic</strong> field
containing the given elements.
<p>
<pre>
gap&gt; Field( E(5)+E(5)^4 );  DefaultField( E(5)+E(5)^4 );
NF(5,[ 1, 4 ])
CF(5)
</pre>
<p>
<p>
<h2><a name="SECT002">18.2 Infinity</a></h2>
<p><p>
<a name = "SSEC002.1"></a>
<li><code>IsInfinity( </code><var>obj</var><code> ) C</code>
<a name = "SSEC002.1"></a>
<li><code>infinity V</code>
<p>
<code>infinity</code> is a special <font face="Gill Sans,Helvetica,Arial">GAP</font> object that lies in <code>CyclotomicsFamily</code>.
It is larger than all other objects in this family.
<code>infinity</code> is mainly used as return value of operations such as <code>Size</code>
and <code>Dimension</code> for infinite and infinite dimensional domains,
respectively.
<p>
Note that <strong>no</strong> arithmetic operations are provided for <code>infinity</code>,
in particular there is no problem to define what <code>0 * infinity</code> or
<code>infinity - infinity</code> means.
<p>
Often it is useful to distinguish <code>infinity</code> from ``proper''
cyclotomics.
For that, <code>infinity</code> lies in the category <code>IsInfinity</code> but not in
<code>IsCyc</code>, and the other cyclotomics lie in the category <code>IsCyc</code> but not
in <code>IsInfinity</code>.
<p>
<pre>
gap&gt; s:= Size( Rationals );
infinity
gap&gt; s = infinity; IsCyclotomic( s ); IsCyc( s ); IsInfinity( s );
true
true
false
true
gap&gt; s in Rationals; s &gt; 17;
false
true
gap&gt; Set( [ s, 2, s, E(17), s, 19 ] );
[ 2, 19, E(17), infinity ]
</pre>
<p>
<p>
<h2><a name="SECT003">18.3 Comparisons of Cyclotomics</a></h2>
<p><p>
<a name = "I9"></a>

To compare  cyclotomics, the operators <code>&lt;</code>, <code>&lt;=</code>, <code>=</code>, <code>&gt;=</code>, <code>&gt;</code> and
<code>&lt;&gt;</code> can  be used, the result will be  <code>true</code> if the first operand is
smaller, smaller or equal, equal, larger or equal, larger, or unequal,
respectively, and <code>false</code> otherwise.
<p>
Cyclotomics are ordered as follows:
The relation between rationals is the natural one,
rationals are smaller than irrational cyclotomics,
and <code>infinity</code> is the largest cyclotomic.
For two irrational cyclotomics with different conductors,
the one with smaller conductor is regarded as smaller.
Two irrational cyclotomics with same conductor are compared via their
external representation.
<p>
For comparisons of cyclotomics and other <font face="Gill Sans,Helvetica,Arial">GAP</font> objects,
see Section&nbsp;<a href="CHAP004.htm#SECT011">Comparisons</a>.
<p>
<pre>
gap&gt; E(5) &lt; E(6);      # the latter value has conductor 3
false
gap&gt; E(3) &lt; E(3)^2;    # both have conductor 3, compare the ext. repr.
false
gap&gt; 3 &lt; E(3); E(5) &lt; E(7);
true
true
</pre>
<p>
<p>
<h2><a name="SECT004">18.4 ATLAS Irrationalities</a></h2>
<p><p>
<a name = "I10"></a>

<a name = "I11"></a>

<a name = "I11"></a>
<a name = "I12"></a>

<a name = "I13"></a>

<a name = "I13"></a>
<a name = "I14"></a>

<a name = "I15"></a>

<a name = "I15"></a>
<a name = "I16"></a>

<a name = "I17"></a>

<a name = "SSEC004.1"></a>
<li><code>EB( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.1"></a>
<li><code>EC( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.1"></a>
<li><code>ED( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.1"></a>
<li><code>EE( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.1"></a>
<li><code>EF( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.1"></a>
<li><code>EG( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.1"></a>
<li><code>EH( </code><var>n</var><code> ) F</code>
<p>
For <i>N</i> a positive integer, let <i>z</i> = <tt>E</tt><tt>(</tt><i>N</i> <tt>)</tt> = exp(2 &#960;<i>i</i>/<i>N</i>).
The following so-called <strong>atomic irrationalities</strong>
(see Chapter&nbsp;7, Section&nbsp;10 of&nbsp;<a href="biblio.htm#CCN85"><cite>CCN85</cite></a>) can be entered using functions.
(Note that the values are not necessary irrational.)
<p>
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap"><table border="0" align="left" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EB</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>b</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>2<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>2</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>N</i>  &#8801; 1  mod  2</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EC</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>c</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>3<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>3</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>N</i>  &#8801; 1  mod  3</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>ED</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>d</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>4<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>4</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>N</i>  &#8801; 1  mod  4</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EE</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>e</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>5<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>5</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>N</i>  &#8801; 1  mod  5</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EF</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>f</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>6<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>6</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>N</i>  &#8801; 1  mod  6</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EG</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>g</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>7<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>7</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>N</i>  &#8801; 1  mod  7</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EH</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>h</i><sub><i>N</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>8<br /></td><td nowrap="nowrap" align="center"></td><td nowrap="nowrap" align="center"><small><i>N</i>&#8722;1</small><!--sup--><br /><font size="+3">&#8721;<br /></font><small><i>j</i>=1</small>&nbsp;<br /></td><td nowrap="nowrap" align="center"><i>z</i><sup><i>j</i><sup>8</sup></sup>,</td></tr></table></td><td nowrap="nowrap" align="center"><table><tr><td nowrap="nowrap" align="center" colspan="1"><i>N</i>  &#8801; 1  mod  8</td></tr></table></td></tr></table></td><td nowrap="nowrap"> </td></tr></table></td></tr></table>
<p>
(Note that in <i>c</i><sub><i>N</i></sub>, &#8230;, <i>h</i><sub><i>N</i></sub>, <var>N</var> must be a prime.)
<p>
<a name = "I18"></a>

<a name = "I18"></a>
<a name = "I19"></a>

<a name = "SSEC004.2"></a>
<li><code>EI( </code><var>n</var><code> ) F</code>
<a name = "SSEC004.2"></a>
<li><code>ER( </code><var>n</var><code> ) F</code>
<p>
For a rational number <var>N</var>, <code>ER</code> returns the square root &#8730;{<i>N</i> }
of <var>N</var>, and <code>EI</code> returns &#8730;{&#8722;<i>N</i> }.
By the chosen embedding of cyclotomic fields into the complex numbers,
<code>ER</code> returns the positive square root if <var>N</var> is positive,
and if <var>N</var> is negative then <code>ER(</code><var>N</var><code>) = EI(-</code><var>N</var><code>)</code>.
In any case, <code>EI(</code><var>N</var><code>) = E(4) * ER(</code><var>N</var><code>)</code>.
<p>
<code>ER</code> is installed as method for the operation <code>Sqrt</code> (see&nbsp;<a href="CHAP030.htm#SSEC012.5">Sqrt</a>) for
rational argument.
<p>
From a theorem of Gauss we know that
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> <i>b</i><sub><i>N</i></sub> = </td><td align="left" class="cl">&#63729;<br />&#63732;<br />&#63732;<br />&#63730;<br />&#63732;<br />&#63732;<br />&#63731; </td><td nowrap="nowrap"><table border="0" align="left" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>2<br /></td><td nowrap="nowrap" align="center">(&#8722;1+&#8730;<i>N</i>) </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><span class="roman">if</span> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>N</i>  &#8801; 1 </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"> mod  4</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap" align="center">1<div class="hrcomp"><hr noshade="noshade" size="1"/></div>2<br /></td><td nowrap="nowrap" align="center">(&#8722;1+<i>i</i> &#8730;<i>N</i>) </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><span class="roman">if</span> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>N</i>  &#8801; &#8722;1 </td></tr></table></td><td nowrap="nowrap" align="center"><table><tr><td nowrap="nowrap" align="center" colspan="1"> mod  4</td></tr></table></td></tr></table></td><td nowrap="nowrap">  </td></tr></table></td></tr></table>
So &#8730;<i>N</i> can be computed from <i>b</i><sub><i>N</i></sub> (see&nbsp;<a href="CHAP018.htm#SSEC004.1">EB</a>).
<p>
<a name = "I20"></a>

<a name = "I20"></a>
<a name = "I21"></a>

<a name = "I22"></a>

<a name = "I22"></a>
<a name = "I23"></a>

<a name = "I24"></a>

<a name = "I24"></a>
<a name = "I25"></a>

<a name = "I26"></a>

<a name = "SSEC004.3"></a>
<li><code>EY( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.3"></a>
<li><code>EX( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.3"></a>
<li><code>EW( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.3"></a>
<li><code>EV( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.3"></a>
<li><code>EU( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.3"></a>
<li><code>ET( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.3"></a>
<li><code>ES( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<p>
For given <var>N</var>, let <i>n</i><sub><i>k</i></sub> = <i>n</i><sub><i>k</i></sub>(<i>N</i>) be the first integer with
multiplicative order exactly <var>k</var> modulo <var>N</var>,
chosen in the order of preference
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> 1, &#8722;1, 2, &#8722;2, 3, &#8722;3, 4, &#8722;4, &#8230;. </td></tr></table></td></tr></table>
<p>
We define
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap"><table border="0" align="left" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EY</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>y</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>2</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EX</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>x</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>3</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EW</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>w</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup>+<i>z</i><sup><i>n</i><sup>3</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>4</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EV</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>v</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup>+<i>z</i><sup><i>n</i><sup>3</sup></sup>+<i>z</i><sup><i>n</i><sup>4</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>5</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EU</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>u</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup>+ &#8230;+<i>z</i><sup><i>n</i><sup>5</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>6</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>ET</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>t</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup>+ &#8230;+<i>z</i><sup><i>n</i><sup>6</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>7</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>ES</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>s</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>+<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup>+ &#8230;+<i>z</i><sup><i>n</i><sup>7</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table><tr><td nowrap="nowrap" align="center" colspan="1">(<i>n</i>=<i>n</i><sub>8</sub>)</td></tr></table></td></tr></table></td><td nowrap="nowrap"> </td></tr></table></td></tr></table>
<p>
<a name = "I27"></a>

<a name = "I27"></a>
<a name = "I28"></a>

<a name = "I29"></a>

<a name = "I29"></a>
<a name = "I30"></a>

<a name = "SSEC004.4"></a>
<li><code>EM( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.4"></a>
<li><code>EL( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.4"></a>
<li><code>EK( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<a name = "SSEC004.4"></a>
<li><code>EJ( </code><var>n</var><code>[, </code><var>d</var><code>] ) F</code>
<p>
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap"><table border="0" align="left" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EM</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>m</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>&#8722;<i>z</i><sup><i>n</i></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>2</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EL</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>l</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>&#8722;<i>z</i><sup><i>n</i></sup>+<i>z</i><sup><i>n</i><sup>2</sup></sup>&#8722;<i>z</i><sup><i>n</i><sup>3</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>4</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EK</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>k</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>&#8722;<i>z</i><sup><i>n</i></sup>+ &#8230;&#8722;<i>z</i><sup><i>n</i><sup>5</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">(<i>n</i>=<i>n</i><sub>6</sub>)</td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EJ</tt><tt>(</tt><i>N</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>j</i><sub><i>n</i></sub> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> = </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><i>z</i>&#8722;<i>z</i><sup><i>n</i></sup>+ &#8230;&#8722;<i>z</i><sup><i>n</i><sup>7</sup></sup> </td></tr></table></td><td nowrap="nowrap" align="center"><table><tr><td nowrap="nowrap" align="center" colspan="1">(<i>n</i>=<i>n</i><sub>8</sub>)</td></tr></table></td></tr></table></td><td nowrap="nowrap"> </td></tr></table></td></tr></table>
<p>
<a name = "I31"></a>

<a name = "SSEC004.5"></a>
<li><code>NK( </code><var>n</var><code>, </code><var>k</var><code>, </code><var>d</var><code> ) F</code>
<p>
Let <i>n</i><sub><i>k</i></sub><sup>(<i>d</i>)</sup> = <i>n</i><sub><i>k</i></sub><sup>(<i>d</i>)</sup>(<i>N</i>) be the <i>d</i>+1-th integer with
multiplicative order exactly <var>k</var> modulo <var>N</var>, chosen in the order of
preference defined above; we write
<i>n</i><sub><i>k</i></sub>=<i>n</i><sub><i>k</i></sub><sup>(0)</sup>,<i>n</i><sub><i>k</i></sub><sup>&#8242;</sup>=<i>n</i><sub><i>k</i></sub><sup>(1)</sup>, <i>n</i><sub><i>k</i></sub><sup>&#8242;&#8242;</sup> = <i>n</i><sub><i>k</i></sub><sup>(2)</sup>
and so on.
These values can be computed as <code>NK(</code><var>N</var><code>,</code><var>k</var><code>,</code><var>d</var><code>)</code> = <i>n</i><sub><i>k</i></sub><sup>(<i>d</i>)</sup>(<i>N</i>);
if there is no integer with the required multiplicative order,
<code>NK</code> returns <code>fail</code>.
<p>
The algebraic numbers
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> <i>y</i><sub><i>N</i></sub><sup>&#8242;</sup>=<i>y</i><sub><i>N</i></sub><sup>(1)</sup>,<i>y</i><sub><i>N</i></sub><sup>&#8242;&#8242;</sup>=<i>y</i><sub><i>N</i></sub><sup>(2)</sup>,&#8230;, <i>x</i><sub><i>N</i></sub><sup>&#8242;</sup>,<i>x</i><sub><i>N</i></sub><sup>&#8242;&#8242;</sup>,&#8230;,<i>j</i><sub><i>N</i></sub><sup>&#8242;</sup>,<i>j</i><sub><i>N</i></sub><sup>&#8242;&#8242;</sup>,&#8230;</td></tr></table></td></tr></table>
are obtained on replacing <i>n</i><sub><i>k</i></sub> in the above
definitions by <i>n</i><sub><i>k</i></sub><sup>&#8242;</sup>,<i>n</i><sub><i>k</i></sub><sup>&#8242;&#8242;</sup>,&#8230;;
they can be entered as
<p>
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap"><table border="0" align="left" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EY</tt><tt>(</tt><i>N</i> <tt>,</tt><i>d</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>y</i><sub><i>N</i></sub><sup>(<i>d</i>)</sup></td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EX</tt><tt>(</tt><i>N</i> <tt>,</tt><i>d</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"><i>x</i><sub><i>N</i></sub><sup>(<i>d</i>)</sup></td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">:</td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left"></td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>EJ</tt><tt>(</tt><i>N</i> <tt>,</tt><i>d</i> <tt>)</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center">=</td></tr></table></td><td nowrap="nowrap" align="center"><table><tr><td nowrap="nowrap" align="center" colspan="1"><i>j</i><sub><i>n</i></sub><sup>(<i>d</i>)</sup></td></tr></table></td></tr></table></td><td nowrap="nowrap"> </td></tr></table></td></tr></table>
<p>
<a name = "SSEC004.6"></a>
<li><code>AtlasIrrationality( </code><var>irratname</var><code> ) F</code>
<p>
Let <var>irratname</var> be a string that describes an irrational value as
described in Chapter&nbsp;6, Section&nbsp;10 of&nbsp;<a href="biblio.htm#CCN85"><cite>CCN85</cite></a>, that is,
a linear combination of the atomic irrationalities introduced above.
(The following definition is mainly copied from&nbsp;<a href="biblio.htm#CCN85"><cite>CCN85</cite></a>.)
If <i>q</i><sub><i>N</i></sub> is such a value (e.g. <i>y</i><sub>24</sub><sup>&#8242;&#8242;</sup>) then linear
combinations of algebraic conjugates of <i>q</i><sub><i>N</i></sub> are abbreviated as in the
following examples:
<p>
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> </td><td nowrap="nowrap"><table border="0" align="left" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>2</tt><tt>qN</tt><tt>+</tt><tt>3</tt><tt>&amp;</tt><tt>5</tt>&#8722;<tt>4</tt><tt>&amp;</tt><tt>7</tt><tt>+</tt><tt>&amp;</tt><tt>9</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><span class="roman">means</span> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">2 <i>q</i><sub><i>N</i></sub> + 3 <i>q</i><sub><i>N</i></sub><sup>&#8727;5</sup> &#8722; 4 <i>q</i><sub><i>N</i></sub><sup>&#8727;7</sup> + <i>q</i><sub><i>N</i></sub><sup>&#8727;9</sup> </td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>4</tt><tt>qN</tt><tt>&amp;</tt><tt>3</tt><tt>&amp;</tt><tt>5</tt><tt>&amp;</tt><tt>7</tt>&#8722;<tt>3</tt><tt>&amp;</tt><tt>4</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><span class="roman">means</span> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="left">4 (<i>q</i><sub><i>N</i></sub> + <i>q</i><sub><i>N</i></sub><sup>&#8727;3</sup> + <i>q</i><sub><i>N</i></sub><sup>&#8727;5</sup> + <i>q</i><sub><i>N</i></sub><sup>&#8727;7</sup>) &#8722; 3 <i>q</i><sub><i>N</i></sub><sup>&#8727;11</sup> </td></tr></table></td></tr> <tr><td nowrap="nowrap" align="center" colspan="1"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"> <tt>4</tt><tt>qN</tt><tt>*</tt><tt>3</tt><tt>&amp;</tt><tt>5</tt><tt>+</tt><tt>&amp;</tt><tt>7</tt> </td></tr></table></td><td nowrap="nowrap" align="center"><table border="0" cellspacing="0" cellpadding="2"><tr><td nowrap="nowrap" align="center"><span class="roman">means</span> </td></tr></table></td><td nowrap="nowrap" align="center"><table><tr><td nowrap="nowrap" align="center" colspan="1">4 (<i>q</i><sub><i>N</i></sub><sup>&#8727;3</sup> + <i>q</i><sub><i>N</i></sub><sup>&#8727;5</sup>) + <i>q</i><sub><i>N</i></sub><sup>&#8727;7</sup> </td></tr></table></td></tr></table></td><td nowrap="nowrap"> </td></tr></table></td></tr></table>
<p>
To explain the ``ampersand'' syntax in general we remark that ``&amp;k''
is interpreted as <i>q</i><sub><i>N</i></sub><sup>&#8727;<i>k</i></sup>, where <i>q</i><sub><i>N</i></sub> is the most recently named
atomic irrationality, and that the scope of any premultiplying
coefficient is broken by a + or &#8722; sign, but not by &amp; or &#8727;<i>k</i>.
The algebraic conjugations indicated by the ampersands apply directly to
the <strong>atomic</strong> irrationality <i>q</i><sub><i>N</i></sub>, even when, as in the last example,
<i>q</i><sub><i>N</i></sub> first appears with another conjugacy &#8727;<i>k</i>.
<p>
<pre>
gap&gt; EW(16,3); EW(17,2); ER(3); EI(3); EY(5); EB(9);
0
E(17)+E(17)^4+E(17)^13+E(17)^16
-E(12)^7+E(12)^11
E(3)-E(3)^2
E(5)+E(5)^4
1
gap&gt; AtlasIrrationality( "b7*3" );
E(7)^3+E(7)^5+E(7)^6
gap&gt; AtlasIrrationality( "y'''24" );
E(24)-E(24)^19
gap&gt; AtlasIrrationality( "-3y'''24*13&amp;5" );
3*E(8)-3*E(8)^3
gap&gt; AtlasIrrationality( "3y'''24*13-2&amp;5" );
-3*E(24)-2*E(24)^11+2*E(24)^17+3*E(24)^19
gap&gt; AtlasIrrationality( "3y'''24*13-&amp;5" );
-3*E(24)-E(24)^11+E(24)^17+3*E(24)^19
gap&gt; AtlasIrrationality( "3y'''24*13-4&amp;5&amp;7" );
-7*E(24)-4*E(24)^11+4*E(24)^17+7*E(24)^19
gap&gt; AtlasIrrationality( "3y'''24&amp;7" );
6*E(24)-6*E(24)^19
</pre>
<p>
<p>
<h2><a name="SECT005">18.5 Galois Conjugacy of Cyclotomics</a></h2>
<p><p>
<a name = "SSEC005.1"></a>
<li><code>GaloisCyc( </code><var>cyc</var><code>, </code><var>k</var><code> ) O</code>
<li><code>GaloisCyc( </code><var>list</var><code>, </code><var>k</var><code> ) O</code>
<p>
For a cyclotomic <var>cyc</var> and an integer <var>k</var>,
<code>GaloisCyc</code> returns the cyclotomic obtained by raising the roots of unity
in the Zumbroich basis representation of <var>cyc</var> to the <var>k</var>-th power.
If <var>k</var> is coprime to the integer <i>n</i>,
<code>GaloisCyc( ., </code><var>k</var><code> )</code> acts as a Galois automorphism of the <i>n</i>-th
cyclotomic field (see&nbsp;<a href="CHAP058.htm#SECT004">Galois Groups of Abelian Number Fields</a>);
to get the Galois automorphisms themselves,
use <code>GaloisGroup</code> (see&nbsp;<a href="CHAP056.htm#SSEC003.1">GaloisGroup!of field</a>).
<p>
The <strong>complex conjugate</strong> of <var>cyc</var> is <code>GaloisCyc( </code><var>cyc</var><code>, -1 )</code>,
which can also be computed using <code>ComplexConjugate</code>
(see&nbsp;<a href="CHAP018.htm#SSEC005.2">ComplexConjugate</a>).
<p>
For a list or matrix <var>list</var> of cyclotomics, <code>GaloisCyc</code> returns the list
obtained by applying <code>GaloisCyc</code> to the entries of <var>list</var>.
<p>
<a name = "SSEC005.2"></a>
<li><code>ComplexConjugate( </code><var>z</var><code> ) A</code>
<a name = "SSEC005.2"></a>
<li><code>RealPart( </code><var>z</var><code> ) A</code>
<a name = "SSEC005.2"></a>
<li><code>ImaginaryPart( </code><var>z</var><code> ) A</code>
<p>
For a cyclotomic number <var>z</var>, <code>ComplexConjugate</code> returns
<code>GaloisCyc( </code><var>z</var><code>, -1 )</code>, see&nbsp;<a href="CHAP018.htm#SSEC005.1">GaloisCyc</a>.
For a quaternion <i>z</i>  = <i>c</i><sub>1</sub> <i>e</i> + <i>c</i><sub>2</sub> <i>i</i> + <i>c</i><sub>3</sub> <i>j</i> + <i>c</i><sub>4</sub> <i>k</i>,
<code>ComplexConjugate</code> returns <i>c</i><sub>1</sub> <i>e</i> &#8722; <i>c</i><sub>2</sub> <i>i</i> &#8722; <i>c</i><sub>3</sub> <i>j</i> &#8722; <i>c</i><sub>4</sub> <i>k</i>,
see&nbsp;<a href="CHAP060.htm#SSEC007.8">IsQuaternion</a>.
<p>
When <code>ComplexConjugate</code> is called with a list then the result is the list
of return values of <code>ComplexConjugate</code> for the list entries in the
corresponding positions.
<p>
When <code>ComplexConjugate</code> is defined for an object <var>z</var> then <code>RealPart</code>
and <code>ImaginaryPart</code> return (<i>z</i>  + <tt>ComplexConjugate</tt><tt>(</tt> <i>z</i>  <tt>)</tt>) / 2 and
(<i>z</i>  &#8722; <tt>ComplexConjugate</tt><tt>(</tt> <i>z</i>  <tt>)</tt>) / 2 <i>i</i>, respectively,
where <i>i</i> denotes the corresponding imaginary unit.
<p>
<pre>
gap&gt; GaloisCyc( E(5) + E(5)^4, 2 );
E(5)^2+E(5)^3
gap&gt; GaloisCyc( E(5), -1 );           # the complex conjugate
E(5)^4
gap&gt; GaloisCyc( E(5) + E(5)^4, -1 );  # this value is real
E(5)+E(5)^4
gap&gt; GaloisCyc( E(15) + E(15)^4, 3 );
E(5)+E(5)^4
gap&gt; ComplexConjugate( E(7) );
E(7)^6
</pre>
<p>
<a name = "SSEC005.3"></a>
<li><code>StarCyc( </code><var>cyc</var><code> ) F</code>
<p>
If the cyclotomic <var>cyc</var> is an irrational element of a quadratic
extension of the rationals then <code>StarCyc</code> returns the unique Galois
conjugate of <var>cyc</var> that is different from <var>cyc</var>,
otherwise <code>fail</code> is returned.
In the first case, the return value is often called <i>cyc</i> &#8727;
(see&nbsp;<a href="CHAP069.htm#SECT011">Printing Character Tables</a>).
<p>
<pre>
gap&gt; StarCyc( EB(5) ); StarCyc( E(5) );
E(5)^2+E(5)^3
fail
</pre>
<p>
<a name = "SSEC005.4"></a>
<li><code>Quadratic( </code><var>cyc</var><code> ) F</code>
<p>
Let <var>cyc</var> be a cyclotomic integer that lies in a quadratic extension
field of the rationals.
Then we have <i>cyc</i>  = (<i>a</i> + <i>b</i> &#8730;<i>n</i>) / <i>d</i> for integers <i>a</i>, <i>b</i>, <i>n</i>,
<i>d</i>, such that <i>d</i> is either 1 or 2.
In this case, <code>Quadratic</code> returns a record with the components <code>a</code>, <code>b</code>,
<code>root</code>, <code>d</code>, <code>ATLAS</code>, and <code>display</code>;
the values of the first four are <i>a</i>, <i>b</i>, <i>n</i>, and <i>d</i>,
the <code>ATLAS</code> value is a (not necessarily shortest) representation of <var>cyc</var>
in terms of the <font face="Gill Sans,Helvetica,Arial">ATLAS</font> irrationalities <i>b</i><sub>&#124;<i>n</i>&#124;</sub>, <i>i</i><sub>&#124;<i>n</i>&#124;</sub>, <i>r</i><sub>&#124;<i>n</i>&#124;</sub>,
and the <code>display</code> value is a string that expresses <var>cyc</var> in
<font face="Gill Sans,Helvetica,Arial">GAP</font> notation, corresponding to the value of the <code>ATLAS</code> component.
<p>
If <var>cyc</var> is not a cyclotomic integer or does not lie in a quadratic
extension field of the rationals then <code>fail</code> is returned.
<p>
If the denominator <i>d</i> is 2 then necessarily <i>n</i> is congruent to 1
modulo 4, and <i>r</i><sub><i>n</i></sub>, <i>i</i><sub><i>n</i></sub> are not possible;
we have <code></code><var>cyc</var><code> = x + y * EB( root )</code> with <code>y = b</code>, <code>x = ( a + b ) / 2</code>.
<p>
If <i>d</i> = 1, we have the possibilities
<i>i</i><sub>&#124;<i>n</i>&#124;</sub> for <i>n</i>  &lt;  &#8722;1, <i>a</i> + <i>b</i> * <i>i</i> for <i>n</i> = &#8722;1, <i>a</i> + <i>b</i> * <i>r</i><sub><i>n</i></sub>
for <i>n</i>  &gt;  0. Furthermore if <i>n</i> is congruent to 1 modulo 4, also
<i>cyc</i>  = (<i>a</i>+<i>b</i>) + 2 * <i>b</i> * <i>b</i><sub>&#124;<i>n</i>&#124;</sub> is possible; the shortest string
of these is taken as the value for the component <code>ATLAS</code>.
<p>
<pre>
gap&gt; Quadratic( EB(5) ); Quadratic( EB(27) );
rec( a := -1, b := 1, root := 5, d := 2, ATLAS := "b5", 
  display := "(-1+ER(5))/2" )
rec( a := -1, b := 3, root := -3, d := 2, ATLAS := "1+3b3", 
  display := "(-1+3*ER(-3))/2" )
gap&gt; Quadratic(0); Quadratic( E(5) );
rec( a := 0, b := 0, root := 1, d := 1, ATLAS := "0", display := "0" )
fail
</pre>
<p>
<a name = "SSEC005.5"></a>
<li><code>GaloisMat( </code><var>mat</var><code> ) A</code>
<p>
Let <var>mat</var> be a matrix of cyclotomics.
<code>GaloisMat</code> calculates the complete orbits under the operation of
the Galois group of the (irrational) entries of <var>mat</var>,
and the permutations of rows corresponding to the generators of the
Galois group.
<p>
If some rows of <var>mat</var> are identical, only the first one is considered
for the permutations, and a warning will be printed.
<p>
<code>GaloisMat</code> returns a record with the components <code>mat</code>, <code>galoisfams</code>,
and <code>generators</code>.
<p>
<p>
<dl compact>
<dt><code>mat</code>:<dd> 
   a list with initial segment being the rows of <var>mat</var>
   (<strong>not</strong> shallow copies of these rows);
   the list consists of full orbits under the action of the Galois
   group of the entries of <var>mat</var> defined above.
   The last rows in the list are those not contained in <var>mat</var> but
   must be added in order to complete the orbits;
   so if the orbits were already complete, <var>mat</var> and <code>mat</code> have
   identical rows.
<p>
<dt><code>galoisfams</code>:<dd>
   a list that has the same length as the <code>mat</code> component,
   its entries are either 1, 0, -1, or lists.
   <code>galoisfams[i]  = 1</code> means that <code>mat[i]</code> consists of rationals,
   i.e. <code>[ mat[i] ]</code> forms an orbit;
   <code>galoisfams[i] = -1</code> means that <code>mat[i]</code> contains unknowns
   (see Chapter&nbsp;<a href="CHAP019.htm">Unknowns</a>);
   in this case <code>[ mat[i] ]</code> is regarded as an orbit, too,
   even if <code>mat[i]</code> contains irrational entries;
   if <tt>galoisfams</tt><tt>[</tt><tt>i</tt><tt>]</tt> = [ <i>l</i><sub>1</sub>, <i>l</i><sub>2</sub> ] is a list then
   <code>mat[i]</code> is the first element of its orbit in <code>mat</code>,
   <i>l</i><sub>1</sub> is the list of positions of rows that form the orbit,
   and <i>l</i><sub>2</sub> is the list of corresponding Galois automorphisms
   (as exponents, not as functions),
   so we have <tt>mat</tt>[ <i>l</i><sub>1</sub>[<i>j</i>] ][<i>k</i>] = <tt>GaloisCyc</tt>( <tt>mat</tt>[<i>i</i>][<i>k</i>], <i>l</i><sub>2</sub>[<i>j</i>] );
   <code>galoisfams[i] = 0</code> means that <code>mat[i]</code> is an element of a
   nontrivial orbit but not the first element of it.
<p>
<dt><code>generators</code>:<dd>
   a list of permutations generating the permutation group
   corresponding to the action of the Galois group on the rows of
   <code>mat</code>.
</dl>
<p>
In the following example we temporarily increase the line length limit from
its default value 80 to 84 in order to get a nicer output format.
<p>
<pre>
gap&gt; SizeScreen([ 84, ]);;
gap&gt; GaloisMat( [ [ E(3), E(4) ] ] );
rec( 
  mat := [ [ E(3), E(4) ], [ E(3), -E(4) ], [ E(3)^2, E(4) ], [ E(3)^2, -E(4) ] ],
  galoisfams := [ [ [ 1, 2, 3, 4 ], [ 1, 7, 5, 11 ] ], 0, 0, 0 ], 
  generators := [ (1,2)(3,4), (1,3)(2,4) ] )
gap&gt; SizeScreen([ 80, ]);;
gap&gt; GaloisMat( [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ] ] );
rec( mat := [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ], 
  galoisfams := [ 1, [ [ 2, 3 ], [ 1, 2 ] ], 0 ], generators := [ (2,3) ] )
</pre>
<p>
<a name = "SSEC005.6"></a>
<li><code>RationalizedMat( </code><var>mat</var><code> ) A</code>
<p>
returns the list of rationalized rows of <var>mat</var>,
which must be a matrix of cyclotomics.
This is the set of sums over orbits under the action of the Galois group
of the entries of <var>mat</var> (see <a href="CHAP018.htm#SSEC005.5">GaloisMat</a>),
so the operation may be viewed as a kind of trace on the rows.
<p>
Note that no two rows of <var>mat</var> should be equal.
<p>
<pre>
gap&gt; mat:= [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ];;
gap&gt; RationalizedMat( mat );
[ [ 1, 1, 1 ], [ 2, -1, -1 ] ]
</pre>
<p>
<p>
<h2><a name="SECT006">18.6 Internally Represented Cyclotomics</a></h2>
<p><p>
The implementation of an <strong>internally represented cyclotomic</strong> is based on
a list of length equal to its conductor.
This means that the internal representation of a cyclotomic does <strong>not</strong>
refer to the smallest number field but the smallest <strong>cyclotomic</strong> field
containing it.
The reason for this is the wish to reflect the natural embedding of two
cyclotomic fields into a larger one that contains both.
With such embeddings, it is easy to construct the sum or the product
of two arbitrary cyclotomics (in possibly different fields) as an element
of a cyclotomic field.
<p>
The disadvantage of this approach is that the arithmetical operations
are quite expensive, so the use of internally represented cyclotomics
is not recommended for doing arithmetics over number fields, such as
calculations with matrices of cyclotomics.
But internally represented cyclotomics are good enough for dealing
with irrationalities in character tables (see chapter&nbsp;<a href="CHAP069.htm">Character Tables</a>).
<p>
For the representation of cyclotomics one has to recall that the
<i>n</i>-th cyclotomic field <b>Q</b>(<i>e</i><sub><i>n</i></sub>) is a vector space of dimension
&#981;(<i>n</i>) over the rationals where &#981; denotes Euler's
phi-function (see&nbsp;<a href="CHAP015.htm#SSEC001.2">Phi</a>).
<p>
A special integral basis of cyclotomic fields is chosen that allows one to
easily convert arbitrary sums of roots of unity into the
basis, as well as to convert  a cyclotomic represented w.r.t.&nbsp;the basis
into the smallest possible cyclotomic field.
This basis is accessible in <font face="Gill Sans,Helvetica,Arial">GAP</font>,
see&nbsp;<a href="CHAP058.htm#SECT003">Integral Bases of Abelian Number Fields</a> for more information and
references.
<p>
Note that the set of all <i>n</i>-th roots of unity is linearly dependent
for <i>n</i>  &gt;  1, so multiplication is <strong>not</strong> the multiplication of the group
ring <b>Q</b>&#9001;<i>e</i><sub><i>n</i></sub> &#9002;;
given a <b>Q</b>-basis of <b>Q</b>(<i>e</i><sub><i>n</i></sub>) the result of the multiplication
(computed as multiplication of polynomials in <i>e</i><sub><i>n</i></sub>,
using (<i>e</i><sub><i>n</i></sub>)<sup><i>n</i></sup> = 1) will be converted to the basis.
<p>
<pre>
gap&gt; E(5) * E(5)^2; ( E(5) + E(5)^4 ) * E(5)^2;
E(5)^3
E(5)+E(5)^3
gap&gt; ( E(5) + E(5)^4 ) * E(5);
-E(5)-E(5)^3-E(5)^4
</pre>
<p>
An internally represented cyclotomic is always represented in the smallest
cyclotomic field it is contained in.
The internal coefficients list coincides with the external representation
returned by <code>ExtRepOfObj</code>.
<p>
Since the conductor of internally represented cyclotomics must be
in the filter <code>IsSmallIntRep</code>, the biggest possible (though not very
useful) conductor is 2<sup>28</sup>&#8722;1.
So the maximal cyclotomic field implemented in <font face="Gill Sans,Helvetica,Arial">GAP</font> is not really
the field <b>Q</b><sup><i>ab</i></sup>.
<p>
<pre>
gap&gt; IsSmallIntRep( 2^28-1 );
true
gap&gt; IsSmallIntRep( 2^28 );
false
</pre>
<p>
It should be emphasized that one disadvantage of representing a cyclotomic in
the smallest <strong>cyclotomic</strong> field (and not in the smallest field) is that
arithmetic operations in a fixed small extension field of the rational
number field are comparatively expensive.
For example, take a prime integer <i>p</i> and suppose that we want to work with
a matrix group over the field <b>Q</b>(&#8730;<i>p</i>).
Then each matrix entry could be described by two rational coefficients,
whereas the representation in the smallest cyclotomic field requires
<i>p</i>&#8722;1 rational coefficients for each entry.
So it is worth thinking about using elements in a field constructed with
<code>AlgebraicExtension</code> (see&nbsp;<a href="CHAP065.htm#SSEC001.1">AlgebraicExtension</a>) when natural embeddings
of cyclotomic fields are not needed.
<p>
<p>
[<a href="../index.htm">Top</a>] [<a href = "chapters.htm">Up</a>] [<a href ="CHAP017.htm">Previous</a>] [<a href ="CHAP019.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<P>
<font face="Gill Sans,Helvetica,Arial">GAP 4 manual<br>December 2008
</font></body></html>