CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Path: gap4r8 / doc / ref / chap18.txt
Views: 418346
1
2
18 Cyclotomic Numbers
3
4
GAP admits computations in abelian extension fields of the rational number
5
field ℚ, that is fields with abelian Galois group over ℚ. These fields are
6
subfields of cyclotomic fields ℚ(e_n) where e_n = exp(2 π i/n) is a
7
primitive complex n-th root of unity. The elements of these fields are
8
called cyclotomics.
9
10
Information concerning operations for domains of cyclotomics, for example
11
certain integral bases of fields of cyclotomics, can be found in Chapter 60.
12
For more general operations that take a field extension as a –possibly
13
optional– argument, e.g., Trace (58.3-5) or Coefficients (61.6-3), see
14
Chapter 58.
15
16
17
18.1 Operations for Cyclotomics
18
19
18.1-1 E
20
21
E( n )  operation
22
23
E returns the primitive n-th root of unity e_n = exp(2π i/n). Cyclotomics
24
are usually entered as sums of roots of unity, with rational coefficients,
25
and irrational cyclotomics are displayed in such a way. (For special
26
cyclotomics, see 18.4.)
27
28
 Example 
29
gap> E(9); E(9)^3; E(6); E(12) / 3;
30
-E(9)^4-E(9)^7
31
E(3)
32
-E(3)^2
33
-1/3*E(12)^7
34

35
36
A particular basis is used to express cyclotomics, see 60.3; note that E(9)
37
is not a basis element, as the above example shows.
38
39
18.1-2 Cyclotomics
40
41
Cyclotomics global variable
42
43
is the domain of all cyclotomics.
44
45
 Example 
46
gap> E(9) in Cyclotomics; 37 in Cyclotomics; true in Cyclotomics;
47
true
48
true
49
false
50

51
52
As the cyclotomics are field elements, the usual arithmetic operators +, -,
53
* and / (and ^ to take powers by integers) are applicable. Note that ^ does
54
not denote the conjugation of group elements, so it is not possible to
55
explicitly construct groups of cyclotomics. (However, it is possible to
56
compute the inverse and the multiplicative order of a nonzero cyclotomic.)
57
Also, taking the k-th power of a root of unity z defines a Galois
58
automorphism if and only if k is coprime to the conductor (see Conductor
59
(18.1-7)) of z.
60
61
 Example 
62
gap> E(5) + E(3); (E(5) + E(5)^4) ^ 2; E(5) / E(3); E(5) * E(3);
63
-E(15)^2-2*E(15)^8-E(15)^11-E(15)^13-E(15)^14
64
-2*E(5)-E(5)^2-E(5)^3-2*E(5)^4
65
E(15)^13
66
E(15)^8
67
gap> Order( E(5) ); Order( 1+E(5) );
68
5
69
infinity
70

71
72
18.1-3 IsCyclotomic
73
74
IsCyclotomic( obj )  Category
75
IsCyc( obj )  Category
76
77
Every object in the family CyclotomicsFamily lies in the category
78
IsCyclotomic. This covers integers, rationals, proper cyclotomics, the
79
object infinity (18.2-1), and unknowns (see Chapter 74). All these objects
80
except infinity (18.2-1) and unknowns lie also in the category IsCyc,
81
infinity (18.2-1) lies in (and can be detected from) the category IsInfinity
82
(18.2-1), and unknowns lie in IsUnknown (74.1-3).
83
84
 Example 
85
gap> IsCyclotomic(0); IsCyclotomic(1/2*E(3)); IsCyclotomic( infinity );
86
true
87
true
88
true
89
gap> IsCyc(0); IsCyc(1/2*E(3)); IsCyc( infinity );
90
true
91
true
92
false
93

94
95
18.1-4 IsIntegralCyclotomic
96
97
IsIntegralCyclotomic( obj )  property
98
99
A cyclotomic is called integral or a cyclotomic integer if all coefficients
100
of its minimal polynomial over the rationals are integers. Since the
101
underlying basis of the external representation of cyclotomics is an
102
integral basis (see 60.3), the subring of cyclotomic integers in a
103
cyclotomic field is formed by those cyclotomics for which the external
104
representation is a list of integers. For example, square roots of integers
105
are cyclotomic integers (see 18.4), any root of unity is a cyclotomic
106
integer, character values are always cyclotomic integers, but all rationals
107
which are not integers are not cyclotomic integers.
108
109
 Example 
110
gap> r:= ER( 5 ); # The square root of 5 ...
111
E(5)-E(5)^2-E(5)^3+E(5)^4
112
gap> IsIntegralCyclotomic( r ); # ... is a cyclotomic integer.
113
true
114
gap> r2:= 1/2 * r; # This is not a cyclotomic integer, ...
115
1/2*E(5)-1/2*E(5)^2-1/2*E(5)^3+1/2*E(5)^4
116
gap> IsIntegralCyclotomic( r2 );
117
false
118
gap> r3:= 1/2 * r - 1/2; # ... but this is one.
119
E(5)+E(5)^4
120
gap> IsIntegralCyclotomic( r3 );
121
true
122

123
124
18.1-5 Int
125
126
Int( cyc )  method
127
128
The operation Int can be used to find a cyclotomic integer near to an
129
arbitrary cyclotomic, by applying Int (14.2-3) to the coefficients.
130
131
 Example 
132
gap> Int( E(5)+1/2*E(5)^2 ); Int( 2/3*E(7)-3/2*E(4) );
133
E(5)
134
-E(4)
135

136
137
18.1-6 String
138
139
String( cyc )  method
140
141
The operation String returns for a cyclotomic cyc a string corresponding to
142
the way the cyclotomic is printed by ViewObj (6.3-5) and PrintObj (6.3-5).
143
144
 Example 
145
gap> String( E(5)+1/2*E(5)^2 ); String( 17/3 );
146
"E(5)+1/2*E(5)^2"
147
"17/3"
148

149
150
18.1-7 Conductor
151
152
Conductor( cyc )  attribute
153
Conductor( C )  attribute
154
155
For an element cyc of a cyclotomic field, Conductor returns the smallest
156
integer n such that cyc is contained in the n-th cyclotomic field. For a
157
collection C of cyclotomics (for example a dense list of cyclotomics or a
158
field of cyclotomics), Conductor returns the smallest integer n such that
159
all elements of C are contained in the n-th cyclotomic field.
160
161
 Example 
162
gap> Conductor( 0 ); Conductor( E(10) ); Conductor( E(12) );
163
1
164
5
165
12
166

167
168
18.1-8 AbsoluteValue
169
170
AbsoluteValue( cyc )  attribute
171
172
returns the absolute value of a cyclotomic number cyc. At the moment only
173
methods for rational numbers exist.
174
175
 Example 
176
gap> AbsoluteValue(-3);
177
3
178

179
180
18.1-9 RoundCyc
181
182
RoundCyc( cyc )  operation
183
184
is a cyclotomic integer z (see IsIntegralCyclotomic (18.1-4)) near to the
185
cyclotomic cyc in the following sense: Let c be the i-th coefficient in the
186
external representation (see CoeffsCyc (18.1-10)) of cyc. Then the i-th
187
coefficient in the external representation of z is Int( c + 1/2 ) or Int( c
188
- 1/2 ), depending on whether c is nonnegative or negative, respectively.
189
190
Expressed in terms of the Zumbroich basis (see 60.3), rounding the
191
coefficients of cyc w.r.t. this basis to the nearest integer yields the
192
coefficients of z.
193
194
 Example 
195
gap> RoundCyc( E(5)+1/2*E(5)^2 ); RoundCyc( 2/3*E(7)+3/2*E(4) );
196
E(5)+E(5)^2
197
-2*E(28)^3+E(28)^4-2*E(28)^11-2*E(28)^15-2*E(28)^19-2*E(28)^23
198
 -2*E(28)^27
199

200
201
18.1-10 CoeffsCyc
202
203
CoeffsCyc( cyc, N )  function
204
205
Let cyc be a cyclotomic with conductor n (see Conductor (18.1-7)). If N is
206
not a multiple of n then CoeffsCyc returns fail because cyc cannot be
207
expressed in terms of N-th roots of unity. Otherwise CoeffsCyc returns a
208
list of length N with entry at position j equal to the coefficient of exp(2
209
π i (j-1)/N) if this root belongs to the N-th Zumbroich basis (see 60.3),
210
and equal to zero otherwise. So we have cyc = CoeffsCyc( cyc, N ) * List(
211
[1..N], j -> E(N)^(j-1) ).
212
213
 Example 
214
gap> cyc:= E(5)+E(5)^2;
215
E(5)+E(5)^2
216
gap> CoeffsCyc( cyc, 5 ); CoeffsCyc( cyc, 15 ); CoeffsCyc( cyc, 7 );
217
[ 0, 1, 1, 0, 0 ]
218
[ 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0 ]
219
fail
220

221
222
18.1-11 DenominatorCyc
223
224
DenominatorCyc( cyc )  function
225
226
For a cyclotomic number cyc (see IsCyclotomic (18.1-3)), this function
227
returns the smallest positive integer n such that n * cyc is a cyclotomic
228
integer (see IsIntegralCyclotomic (18.1-4)). For rational numbers cyc, the
229
result is the same as that of DenominatorRat (17.2-5).
230
231
18.1-12 ExtRepOfObj
232
233
ExtRepOfObj( cyc )  method
234
235
The external representation of a cyclotomic cyc with conductor n (see
236
Conductor (18.1-7) is the list returned by CoeffsCyc (18.1-10), called with
237
cyc and n.
238
239
 Example 
240
gap> ExtRepOfObj( E(5) ); CoeffsCyc( E(5), 5 );
241
[ 0, 1, 0, 0, 0 ]
242
[ 0, 1, 0, 0, 0 ]
243
gap> CoeffsCyc( E(5), 15 );
244
[ 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0 ]
245

246
247
18.1-13 DescriptionOfRootOfUnity
248
249
DescriptionOfRootOfUnity( root )  function
250
251
Given a cyclotomic root that is known to be a root of unity (this is not
252
checked), DescriptionOfRootOfUnity returns a list [ n, e ] of coprime
253
positive integers such that root = E(n)^e holds.
254
255
 Example 
256
gap> E(9); DescriptionOfRootOfUnity( E(9) );
257
-E(9)^4-E(9)^7
258
[ 9, 1 ]
259
gap> DescriptionOfRootOfUnity( -E(3) );
260
[ 6, 5 ]
261

262
263
18.1-14 IsGaussInt
264
265
IsGaussInt( x )  function
266
267
IsGaussInt returns true if the object x is a Gaussian integer
268
(see GaussianIntegers (60.5-1)), and false otherwise. Gaussian integers are
269
of the form a + b*E(4), where a and b are integers.
270
271
18.1-15 IsGaussRat
272
273
IsGaussRat( x )  function
274
275
IsGaussRat returns true if the object x is a Gaussian rational
276
(see GaussianRationals (60.1-3)), and false otherwise. Gaussian rationals
277
are of the form a + b*E(4), where a and b are rationals.
278
279
18.1-16 DefaultField
280
281
DefaultField( list )  function
282
283
DefaultField for cyclotomics is defined to return the smallest cyclotomic
284
field containing the given elements.
285
286
Note that Field (58.1-3) returns the smallest field containing all given
287
elements, which need not be a cyclotomic field. In both cases, the fields
288
represent vector spaces over the rationals (see 60.3).
289
290
 Example 
291
gap> Field( E(5)+E(5)^4 ); DefaultField( E(5)+E(5)^4 );
292
NF(5,[ 1, 4 ])
293
CF(5)
294

295
296
297
18.2 Infinity and negative Infinity
298
299
18.2-1 IsInfinity
300
301
IsInfinity( obj )  Category
302
IsNegInfinity( obj )  Category
303
infinity global variable
304
-infinity global variable
305
306
infinity and -infinity are special GAP objects that lie in
307
CyclotomicsFamily. They are larger or smaller than all other objects in this
308
family respectively. infinity is mainly used as return value of operations
309
such as Size (30.4-6) and Dimension (57.3-3) for infinite and infinite
310
dimensional domains, respectively.
311
312
Some arithmetic operations are provided for convenience when using infinity
313
and -infinity as top and bottom element respectively.
314
315
 Example 
316
gap> -infinity + 1;
317
-infinity
318
gap> infinity + infinity;
319
infinity
320

321
322
Often it is useful to distinguish infinity from proper cyclotomics. For
323
that, infinity lies in the category IsInfinity but not in IsCyc (18.1-3),
324
and the other cyclotomics lie in the category IsCyc (18.1-3) but not in
325
IsInfinity.
326
327
 Example 
328
gap> s:= Size( Rationals );
329
infinity
330
gap> s = infinity; IsCyclotomic( s ); IsCyc( s ); IsInfinity( s );
331
true
332
true
333
false
334
true
335
gap> s in Rationals; s > 17;
336
false
337
true
338
gap> Set( [ s, 2, s, E(17), s, 19 ] );
339
[ 2, 19, E(17), infinity ]
340

341
342
343
18.3 Comparisons of Cyclotomics
344
345
To compare cyclotomics, the operators <, <=, =, >=, >, and <> can be used,
346
the result will be true if the first operand is smaller, smaller or equal,
347
equal, larger or equal, larger, or unequal, respectively, and false
348
otherwise.
349
350
Cyclotomics are ordered as follows: The relation between rationals is the
351
natural one, rationals are smaller than irrational cyclotomics, and infinity
352
(18.2-1) is the largest cyclotomic. For two irrational cyclotomics with
353
different conductors (see Conductor (18.1-7)), the one with smaller
354
conductor is regarded as smaller. Two irrational cyclotomics with same
355
conductor are compared via their external representation (see ExtRepOfObj
356
(18.1-12)).
357
358
For comparisons of cyclotomics and other GAP objects, see Section 4.12.
359
360
 Example 
361
gap> E(5) < E(6); # the latter value has conductor 3
362
false
363
gap> E(3) < E(3)^2; # both have conductor 3, compare the ext. repr.
364
false
365
gap> 3 < E(3); E(5) < E(7);
366
true
367
true
368

369
370
371
18.4 ATLAS Irrationalities
372
373
374
18.4-1 EB, EC, ..., EH
375
376
EB( N )  function
377
EC( N )  function
378
ED( N )  function
379
EE( N )  function
380
EF( N )  function
381
EG( N )  function
382
EH( N )  function
383
384
For a positive integer N, let z = E(N) = exp(2 π i/N). The following
385
so-called atomic irrationalities (see [CCN+85, Chapter 7, Section 10]) can
386
be entered using functions. (Note that the values are not necessary
387
irrational.)
388
389
EB(N) = b_N = ( ∑_{j = 1}^{N-1} z^{j^2} ) / 2 , N ≡ 1 mod 2
390
EC(N) = c_N = ( ∑_{j = 1}^{N-1} z^{j^3} ) / 3 , N ≡ 1 mod 3
391
ED(N) = d_N = ( ∑_{j = 1}^{N-1} z^{j^4} ) / 4 , N ≡ 1 mod 4
392
EE(N) = e_N = ( ∑_{j = 1}^{N-1} z^{j^5} ) / 5 , N ≡ 1 mod 5
393
EF(N) = f_N = ( ∑_{j = 1}^{N-1} z^{j^6} ) / 6 , N ≡ 1 mod 6
394
EG(N) = g_N = ( ∑_{j = 1}^{N-1} z^{j^7} ) / 7 , N ≡ 1 mod 7
395
EH(N) = h_N = ( ∑_{j = 1}^{N-1} z^{j^8} ) / 8 , N ≡ 1 mod 8
396
397
(Note that in EC(N), ..., EH(N), N must be a prime.)
398
399
 Example 
400
gap> EB(5); EB(9);
401
E(5)+E(5)^4
402
1
403

404
405
406
18.4-2 EI and ER
407
408
EI( N )  function
409
ER( N )  function
410
411
For a rational number N, ER returns the square root sqrt{N} of N, and EI
412
returns sqrt{-N}. By the chosen embedding of cyclotomic fields into the
413
complex numbers, ER returns the positive square root if N is positive, and
414
if N is negative then ER(N) = EI(-N) holds. In any case, EI(N) = E(4) *
415
ER(N).
416
417
ER is installed as method for the operation Sqrt (31.12-5), for rational
418
argument.
419
420
From a theorem of Gauss we know that b_N =
421
422
(-1 + sqrt{N}) / 2 if N ≡ 1 mod 4
423
(-1 + i sqrt{N}) / 2 if N ≡ -1 mod 4
424
425
So sqrt{N} can be computed from b_N, see EB (18.4-1).
426
427
 Example 
428
gap> ER(3); EI(3);
429
-E(12)^7+E(12)^11
430
E(3)-E(3)^2
431

432
433
434
18.4-3 EY, EX, ..., ES
435
436
EY( N[, d] )  function
437
EX( N[, d] )  function
438
EW( N[, d] )  function
439
EV( N[, d] )  function
440
EU( N[, d] )  function
441
ET( N[, d] )  function
442
ES( N[, d] )  function
443
444
For the given integer N > 2, let N_k denote the first integer with
445
multiplicative order exactly k modulo N, chosen in the order of preference
446
447
448
1, -1, 2, -2, 3, -3, 4, -4, ... .
449
450
We define (with z = exp(2 π i/N))
451
452
EY(N) = y_N = z + z^n (n = N_2)
453
EX(N) = x_N = z + z^n + z^{n^2} (n = N_3)
454
EW(N) = w_N = z + z^n + z^{n^2} + z^{n^3} (n = N_4)
455
EV(N) = v_N = z + z^n + z^{n^2} + z^{n^3} + z^{n^4} (n = N_5)
456
EU(N) = u_N = z + z^n + z^{n^2} + ... + z^{n^5} (n = N_6)
457
ET(N) = t_N = z + z^n + z^{n^2} + ... + z^{n^6} (n = N_7)
458
ES(N) = s_N = z + z^n + z^{n^2} + ... + z^{n^7} (n = N_8)
459
460
For the two-argument versions of the functions, see Section NK (18.4-5).
461
462
 Example 
463
gap> EY(5);
464
E(5)+E(5)^4
465
gap> EW(16,3); EW(17,2);
466
0
467
E(17)+E(17)^4+E(17)^13+E(17)^16
468

469
470
471
18.4-4 EM, EL, ..., EJ
472
473
EM( N[, d] )  function
474
EL( N[, d] )  function
475
EK( N[, d] )  function
476
EJ( N[, d] )  function
477
478
Let N be an integer, N > 2. We define (with z = exp(2 π i/N))
479
480
EM(N) = m_N = z - z^n (n = N_2)
481
EL(N) = l_N = z - z^n + z^{n^2} - z^{n^3} (n = N_4)
482
EK(N) = k_N = z - z^n + ... - z^{n^5} (n = N_6)
483
EJ(N) = j_N = z - z^n + ... - z^{n^7} (n = N_8)
484
485
For the two-argument versions of the functions, see Section NK (18.4-5).
486
487
18.4-5 NK
488
489
NK( N, k, d )  function
490
491
Let N_k^(d) be the (d+1)-th integer with multiplicative order exactly k
492
modulo N, chosen in the order of preference defined in Section 18.4-3; NK
493
returns N_k^(d); if there is no integer with the required multiplicative
494
order, NK returns fail.
495
496
We write N_k = N_k^(0), N_k^' = N_k^(1), N_k^'' = N_k^(2) and so on.
497
498
The algebraic numbers
499
500
501
y_N^' = y_N^(1), y_N^'' = y_N^(2), ..., x_N^', x_N^'', ..., j_N^', j_N^'', ...
502
503
are obtained on replacing N_k in the definitions in the sections 18.4-3 and
504
18.4-4 by N_k^', N_k^'', ...; they can be entered as
505
506
EY(N,d) = y_N^(d)
507
EX(N,d) = x_N^(d)
508
...
509
EJ(N,d) = j_N^(d)
510
511
18.4-6 AtlasIrrationality
512
513
AtlasIrrationality( irratname )  function
514
515
Let irratname be a string that describes an irrational value as a linear
516
combination in terms of the atomic irrationalities introduced in the
517
sections 18.4-1, 18.4-2, 18.4-3, 18.4-4. These irrational values are defined
518
in [CCN+85, Chapter 6, Section 10], and the following description is mainly
519
copied from there. If q_N is such a value (e.g. y_24^'') then linear
520
combinations of algebraic conjugates of q_N are abbreviated as in the
521
following examples:
522
523
2qN+3&5-4&7+&9 means 2 q_N + 3 q_N^{*5} - 4 q_N^{*7} + q_N^{*9}
524
4qN&3&5&7-3&4 means 4 (q_N + q_N^{*3} + q_N^{*5} + q_N^{*7}) - 3 q_N^{*11}
525
4qN*3&5+&7 means 4 (q_N^{*3} + q_N^{*5}) + q_N^{*7}
526
527
To explain the ampersand syntax in general we remark that &k is interpreted
528
as q_N^{*k}, where q_N is the most recently named atomic irrationality, and
529
that the scope of any premultiplying coefficient is broken by a + or - sign,
530
but not by & or *k. The algebraic conjugations indicated by the ampersands
531
apply directly to the atomic irrationality q_N, even when, as in the last
532
example, q_N first appears with another conjugacy *k.
533
534
 Example 
535
gap> AtlasIrrationality( "b7*3" );
536
E(7)^3+E(7)^5+E(7)^6
537
gap> AtlasIrrationality( "y'''24" );
538
E(24)-E(24)^19
539
gap> AtlasIrrationality( "-3y'''24*13&5" );
540
3*E(8)-3*E(8)^3
541
gap> AtlasIrrationality( "3y'''24*13-2&5" );
542
-3*E(24)-2*E(24)^11+2*E(24)^17+3*E(24)^19
543
gap> AtlasIrrationality( "3y'''24*13-&5" );
544
-3*E(24)-E(24)^11+E(24)^17+3*E(24)^19
545
gap> AtlasIrrationality( "3y'''24*13-4&5&7" );
546
-7*E(24)-4*E(24)^11+4*E(24)^17+7*E(24)^19
547
gap> AtlasIrrationality( "3y'''24&7" );
548
6*E(24)-6*E(24)^19
549

550
551
552
18.5 Galois Conjugacy of Cyclotomics
553
554
18.5-1 GaloisCyc
555
556
GaloisCyc( cyc, k )  operation
557
GaloisCyc( list, k )  operation
558
559
For a cyclotomic cyc and an integer k, GaloisCyc returns the cyclotomic
560
obtained by raising the roots of unity in the Zumbroich basis representation
561
of cyc to the k-th power. If k is coprime to the integer n, GaloisCyc( ., k
562
) acts as a Galois automorphism of the n-th cyclotomic field (see 60.4); to
563
get the Galois automorphisms themselves, use GaloisGroup (58.3-1).
564
565
The complex conjugate of cyc is GaloisCyc( cyc, -1 ), which can also be
566
computed using ComplexConjugate (18.5-2).
567
568
For a list or matrix list of cyclotomics, GaloisCyc returns the list
569
obtained by applying GaloisCyc to the entries of list.
570
571
18.5-2 ComplexConjugate
572
573
ComplexConjugate( z )  attribute
574
RealPart( z )  attribute
575
ImaginaryPart( z )  attribute
576
577
For a cyclotomic number z, ComplexConjugate returns GaloisCyc( z, -1 ),
578
see GaloisCyc (18.5-1). For a quaternion z = c_1 e + c_2 i + c_3 j + c_4 k,
579
ComplexConjugate returns c_1 e - c_2 i - c_3 j - c_4 k, see IsQuaternion
580
(62.8-8).
581
582
When ComplexConjugate is called with a list then the result is the list of
583
return values of ComplexConjugate for the list entries in the corresponding
584
positions.
585
586
When ComplexConjugate is defined for an object z then RealPart and
587
ImaginaryPart return (z + ComplexConjugate( z )) / 2 and (z -
588
ComplexConjugate( z )) / 2 i, respectively, where i denotes the
589
corresponding imaginary unit.
590
591
 Example 
592
gap> GaloisCyc( E(5) + E(5)^4, 2 );
593
E(5)^2+E(5)^3
594
gap> GaloisCyc( E(5), -1 ); # the complex conjugate
595
E(5)^4
596
gap> GaloisCyc( E(5) + E(5)^4, -1 ); # this value is real
597
E(5)+E(5)^4
598
gap> GaloisCyc( E(15) + E(15)^4, 3 );
599
E(5)+E(5)^4
600
gap> ComplexConjugate( E(7) );
601
E(7)^6
602

603
604
18.5-3 StarCyc
605
606
StarCyc( cyc )  function
607
608
If the cyclotomic cyc is an irrational element of a quadratic extension of
609
the rationals then StarCyc returns the unique Galois conjugate of cyc that
610
is different from cyc, otherwise fail is returned. In the first case, the
611
return value is often called cyc* (see 71.13).
612
613
 Example 
614
gap> StarCyc( EB(5) ); StarCyc( E(5) );
615
E(5)^2+E(5)^3
616
fail
617

618
619
18.5-4 Quadratic
620
621
Quadratic( cyc )  function
622
623
Let cyc be a cyclotomic integer that lies in a quadratic extension field of
624
the rationals. Then we have cyc= (a + b sqrt{n}) / d, for integers a, b, n,
625
d, such that d is either 1 or 2. In this case, Quadratic returns a record
626
with the components a, b, root, d, ATLAS, and display; the values of the
627
first four are a, b, n, and d, the ATLAS value is a (not necessarily
628
shortest) representation of cyc in terms of the Atlas irrationalities
629
b_{|n|}, i_{|n|}, r_{|n|}, and the display value is a string that expresses
630
cyc in GAP notation, corresponding to the value of the ATLAS component.
631
632
If cyc is not a cyclotomic integer or does not lie in a quadratic extension
633
field of the rationals then fail is returned.
634
635
If the denominator d is 2 then necessarily n is congruent to 1 modulo 4, and
636
r_n, i_n are not possible; we have cyc = x + y * EB( root ) with y = b, x =
637
( a + b ) / 2.
638
639
If d = 1, we have the possibilities i_{|n|} for n < -1, a + b * i for n =
640
-1, a + b * r_n for n > 0. Furthermore if n is congruent to 1 modulo 4, also
641
cyc = (a+b) + 2 * b * b_{|n|} is possible; the shortest string of these is
642
taken as the value for the component ATLAS.
643
644
 Example 
645
gap> Quadratic( EB(5) ); Quadratic( EB(27) );
646
rec( ATLAS := "b5", a := -1, b := 1, d := 2, 
647
 display := "(-1+Sqrt(5))/2", root := 5 )
648
rec( ATLAS := "1+3b3", a := -1, b := 3, d := 2, 
649
 display := "(-1+3*Sqrt(-3))/2", root := -3 )
650
gap> Quadratic(0); Quadratic( E(5) );
651
rec( ATLAS := "0", a := 0, b := 0, d := 1, display := "0", root := 1 )
652
fail
653

654
655
18.5-5 GaloisMat
656
657
GaloisMat( mat )  attribute
658
659
Let mat be a matrix of cyclotomics. GaloisMat calculates the complete orbits
660
under the operation of the Galois group of the (irrational) entries of mat,
661
and the permutations of rows corresponding to the generators of the Galois
662
group.
663
664
If some rows of mat are identical, only the first one is considered for the
665
permutations, and a warning will be printed.
666
667
GaloisMat returns a record with the components mat, galoisfams, and
668
generators.
669
670
mat
671
a list with initial segment being the rows of mat (not shallow copies
672
of these rows); the list consists of full orbits under the action of
673
the Galois group of the entries of mat defined above. The last rows in
674
the list are those not contained in mat but must be added in order to
675
complete the orbits; so if the orbits were already complete, mat and
676
mat have identical rows.
677
678
galoisfams
679
a list that has the same length as the mat component, its entries are
680
either 1, 0, -1, or lists.
681
682
galoisfams[i] = 1
683
means that mat[i] consists of rationals, i.e., [ mat[i] ] forms
684
an orbit;
685
686
galoisfams[i] = -1
687
means that mat[i] contains unknowns (see Chapter 74); in this
688
case [ mat[i] ] is regarded as an orbit, too, even if mat[i]
689
contains irrational entries;
690
691
galoisfams[i] = [ l_1, l_2 ]
692
(a list) means that mat[i] is the first element of its orbit in
693
mat, l_1 is the list of positions of rows that form the orbit,
694
and l_2 is the list of corresponding Galois automorphisms (as
695
exponents, not as functions); so we have mat[ l_1[j] ][k] =
696
GaloisCyc( mat[i][k], l_2[j] );
697
698
galoisfams[i] = 0
699
means that mat[i] is an element of a nontrivial orbit but not
700
the first element of it.
701
702
generators
703
a list of permutations generating the permutation group corresponding
704
to the action of the Galois group on the rows of mat.
705
706
 Example 
707
gap> GaloisMat( [ [ E(3), E(4) ] ] );
708
rec( galoisfams := [ [ [ 1, 2, 3, 4 ], [ 1, 7, 5, 11 ] ], 0, 0, 0 ], 
709
 generators := [ (1,2)(3,4), (1,3)(2,4) ], 
710
 mat := [ [ E(3), E(4) ], [ E(3), -E(4) ], [ E(3)^2, E(4) ], 
711
 [ E(3)^2, -E(4) ] ] )
712
gap> GaloisMat( [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ] ] );
713
rec( galoisfams := [ 1, [ [ 2, 3 ], [ 1, 2 ] ], 0 ], 
714
 generators := [ (2,3) ], 
715
 mat := [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ] )
716

717
718
18.5-6 RationalizedMat
719
720
RationalizedMat( mat )  attribute
721
722
returns the list of rationalized rows of mat, which must be a matrix of
723
cyclotomics. This is the set of sums over orbits under the action of the
724
Galois group of the entries of mat (see GaloisMat (18.5-5)), so the
725
operation may be viewed as a kind of trace on the rows.
726
727
Note that no two rows of mat should be equal.
728
729
 Example 
730
gap> mat:= [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ];;
731
gap> RationalizedMat( mat );
732
[ [ 1, 1, 1 ], [ 2, -1, -1 ] ]
733

734
735
736
18.6 Internally Represented Cyclotomics
737
738
The implementation of an internally represented cyclotomic is based on a
739
list of length equal to its conductor. This means that the internal
740
representation of a cyclotomic does not refer to the smallest number field
741
but the smallest cyclotomic field containing it. The reason for this is the
742
wish to reflect the natural embedding of two cyclotomic fields into a larger
743
one that contains both. With such embeddings, it is easy to construct the
744
sum or the product of two arbitrary cyclotomics (in possibly different
745
fields) as an element of a cyclotomic field.
746
747
The disadvantage of this approach is that the arithmetical operations are
748
quite expensive, so the use of internally represented cyclotomics is not
749
recommended for doing arithmetics over number fields, such as calculations
750
with matrices of cyclotomics. But internally represented cyclotomics are
751
good enough for dealing with irrationalities in character tables (see
752
chapter 71).
753
754
For the representation of cyclotomics one has to recall that the n-th
755
cyclotomic field ℚ(e_n) is a vector space of dimension φ(n) over the
756
rationals where φ denotes Euler's phi-function (see Phi (15.2-2)).
757
758
A special integral basis of cyclotomic fields is chosen that allows one to
759
easily convert arbitrary sums of roots of unity into the basis, as well as
760
to convert a cyclotomic represented w.r.t. the basis into the smallest
761
possible cyclotomic field. This basis is accessible in GAP, see 60.3 for
762
more information and references.
763
764
Note that the set of all n-th roots of unity is linearly dependent for n >
765
1, so multiplication is not the multiplication of the group ring ℚ⟨ e_n ⟩;
766
given a ℚ-basis of ℚ(e_n) the result of the multiplication (computed as
767
multiplication of polynomials in e_n, using (e_n)^n = 1) will be converted
768
to the basis.
769
770
 Example 
771
gap> E(5) * E(5)^2; ( E(5) + E(5)^4 ) * E(5)^2;
772
E(5)^3
773
E(5)+E(5)^3
774
gap> ( E(5) + E(5)^4 ) * E(5);
775
-E(5)-E(5)^3-E(5)^4
776

777
778
An internally represented cyclotomic is always represented in the smallest
779
cyclotomic field it is contained in. The internal coefficients list
780
coincides with the external representation returned by ExtRepOfObj
781
(18.1-12).
782
783
To avoid calculations becoming unintentionally very long, or consuming very
784
large amounts of memory, there is a limit on the conductor of internally
785
represented cyclotomics, by default set to one million. This can be raised
786
(although not lowered) using SetCyclotomicsLimit (18.6-1) and accessed using
787
GetCyclotomicsLimit (18.6-1). The maximum value of the limit is 2^28-1 on 32
788
bit systems, and 2^32 on 64 bit systems. So the maximal cyclotomic field
789
implemented in GAP is not really the field ℚ^ab.
790
791
It should be emphasized that one disadvantage of representing a cyclotomic
792
in the smallest cyclotomic field (and not in the smallest field) is that
793
arithmetic operations in a fixed small extension field of the rational
794
number field are comparatively expensive. For example, take a prime integer
795
p and suppose that we want to work with a matrix group over the field
796
ℚ(sqrt{p}). Then each matrix entry could be described by two rational
797
coefficients, whereas the representation in the smallest cyclotomic field
798
requires p-1 rational coefficients for each entry. So it is worth thinking
799
about using elements in a field constructed with AlgebraicExtension (67.1-1)
800
when natural embeddings of cyclotomic fields are not needed.
801
802
18.6-1 SetCyclotomicsLimit
803
804
SetCyclotomicsLimit( newlimit )  function
805
GetCyclotomicsLimit( )  function
806
807
GetCyclotomicsLimit returns the current limit on conductors of internally
808
represented cyclotomic numbers
809
810
SetCyclotomicsLimit can be called to increase the limit on conductors of
811
internally represented cyclotomic numbers. Note that computing in large
812
cyclotomic fields using this representation can be both slow and
813
memory-consuming, and that other approaches may be better for some problems.
814
See 18.6.
815
816
817