/usr/share/gap/doc/ref/chap18.html is in gap-doc 4r6p5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (ref) - Chapter 18: Cyclotomic Numbers</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap18" onload="jscontent()">
<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap17.html">[Previous Chapter]</a> <a href="chap19.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap18_mj.html">[MathJax on]</a></p>
<p><a id="X7DFC03C187DE4841" name="X7DFC03C187DE4841"></a></p>
<div class="ChapSects"><a href="chap18.html#X7DFC03C187DE4841">18 <span class="Heading">Cyclotomic Numbers</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap18.html#X79E25C3085AA568F">18.1 <span class="Heading">Operations for Cyclotomics</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X8631458886314588">18.1-1 E</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X863D1E017BC9EB7F">18.1-2 Cyclotomics</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X841C425281A6F775">18.1-3 IsCyclotomic</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X869750DA81EA0E67">18.1-4 IsIntegralCyclotomic</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7DD6B95F79321D23">18.1-5 Int</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7CBA6CB678E2B143">18.1-6 String</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X815D6EC57CBA9827">18.1-7 Conductor</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X81DD58BB81FB3426">18.1-8 AbsoluteValue</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7808ECF37AA9004D">18.1-9 RoundCyc</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7AE2933985BE4C3E">18.1-10 CoeffsCyc</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X803478CA7D2D830F">18.1-11 DenominatorCyc</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X785F2CAB805DE1BE">18.1-12 ExtRepOfObj</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7DDD51B983D5BC44">18.1-13 DescriptionOfRootOfUnity</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X8712419182ECD8DD">18.1-14 IsGaussInt</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7E6CF4947D0A56F7">18.1-15 IsGaussRat</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7FE3D5637B5485D0">18.1-16 DefaultField</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap18.html#X81AACA757DDDEAE0">18.2 <span class="Heading">Infinity</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X8511B8DF83324C27">18.2-1 IsInfinity</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap18.html#X7F66A62384329705">18.3 <span class="Heading">Comparisons of Cyclotomics</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap18.html#X7B242083873DD74F">18.4 <span class="Heading">ATLAS Irrationalities</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X844D62597D9EFE3C">18.4-1 <span class="Heading">EB, EC, <span class="SimpleMath">...</span>, EH</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X813CF4327C4B4D29">18.4-2 <span class="Heading">EI and ER</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X842338F184E63894">18.4-3 <span class="Heading">EY, EX, <span class="SimpleMath">...</span>, ES</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X87CA3CA083D49AC7">18.4-4 <span class="Heading">EM, EL, <span class="SimpleMath">...</span>, EJ</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X844F0EBF849EDEB3">18.4-5 NK</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X812E334E7A869D33">18.4-6 AtlasIrrationality</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap18.html#X79FE34337DF2CD10">18.5 <span class="Heading">Galois Conjugacy of Cyclotomics</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X79EE9097783128C4">18.5-1 GaloisCyc</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7BE001A0811CD599">18.5-2 ComplexConjugate</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7E361C057E97CA66">18.5-3 StarCyc</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X84438F867B0CC299">18.5-4 Quadratic</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7DDDEC3F80543B7D">18.5-5 GaloisMat</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7BB9F5957AA8C082">18.5-6 RationalizedMat</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap18.html#X8557FC2D7ACD6105">18.6 <span class="Heading">Internally Represented Cyclotomics</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap18.html#X7D3028777DE39709">18.6-1 SetCyclotomicsLimit</a></span>
</div></div>
</div>
<h3>18 <span class="Heading">Cyclotomic Numbers</span></h3>
<p><strong class="pkg">GAP</strong> admits computations in abelian extension fields of the rational number field <span class="SimpleMath">ℚ</span>, that is fields with abelian Galois group over <span class="SimpleMath">ℚ</span>. These fields are subfields of <em>cyclotomic fields</em> <span class="SimpleMath">ℚ(e_n)</span> where <span class="SimpleMath">e_n = exp(2 π i/n)</span> is a primitive complex <span class="SimpleMath">n</span>-th root of unity. The elements of these fields are called <em>cyclotomics</em>.</p>
<p>Information concerning operations for domains of cyclotomics, for example certain integral bases of fields of cyclotomics, can be found in Chapter <a href="chap60.html#X80510B5880521FDC"><span class="RefLink">60</span></a>. For more general operations that take a field extension as a –possibly optional– argument, e.g., <code class="func">Trace</code> (<a href="chap58.html#X7DD17EB581200AD6"><span class="RefLink">58.3-5</span></a>) or <code class="func">Coefficients</code> (<a href="chap61.html#X80B32F667BF6AFD8"><span class="RefLink">61.6-3</span></a>), see Chapter <a href="chap58.html#X80A8E676814A19FD"><span class="RefLink">58</span></a>.</p>
<p><a id="X79E25C3085AA568F" name="X79E25C3085AA568F"></a></p>
<h4>18.1 <span class="Heading">Operations for Cyclotomics</span></h4>
<p><a id="X8631458886314588" name="X8631458886314588"></a></p>
<h5>18.1-1 E</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ E</code>( <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">E</code> returns the primitive <var class="Arg">n</var>-th root of unity <span class="SimpleMath">e_n = exp(2π i/n)</span>. Cyclotomics are usually entered as sums of roots of unity, with rational coefficients, and irrational cyclotomics are displayed in such a way. (For special cyclotomics, see <a href="chap18.html#X7B242083873DD74F"><span class="RefLink">18.4</span></a>.)</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">E(9); E(9)^3; E(6); E(12) / 3;</span>
-E(9)^4-E(9)^7
E(3)
-E(3)^2
-1/3*E(12)^7
</pre></div>
<p>A particular basis is used to express cyclotomics, see <a href="chap60.html#X7D2421AC8491D2BE"><span class="RefLink">60.3</span></a>; note that <code class="code">E(9)</code> is <em>not</em> a basis element, as the above example shows.</p>
<p><a id="X863D1E017BC9EB7F" name="X863D1E017BC9EB7F"></a></p>
<h5>18.1-2 Cyclotomics</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Cyclotomics</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>is the domain of all cyclotomics.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">E(9) in Cyclotomics; 37 in Cyclotomics; true in Cyclotomics;</span>
true
true
false
</pre></div>
<p>As the cyclotomics are field elements, the usual arithmetic operators <code class="code">+</code>, <code class="code">-</code>, <code class="code">*</code> and <code class="code">/</code> (and <code class="code">^</code> to take powers by integers) are applicable. Note that <code class="code">^</code> does <em>not</em> denote the conjugation of group elements, so it is <em>not</em> 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 <span class="SimpleMath">k</span>-th power of a root of unity <span class="SimpleMath">z</span> defines a Galois automorphism if and only if <span class="SimpleMath">k</span> is coprime to the conductor (see <code class="func">Conductor</code> (<a href="chap18.html#X815D6EC57CBA9827"><span class="RefLink">18.1-7</span></a>)) of <span class="SimpleMath">z</span>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">E(5) + E(3); (E(5) + E(5)^4) ^ 2; E(5) / E(3); E(5) * E(3);</span>
-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
<span class="GAPprompt">gap></span> <span class="GAPinput">Order( E(5) ); Order( 1+E(5) );</span>
5
infinity
</pre></div>
<p><a id="X841C425281A6F775" name="X841C425281A6F775"></a></p>
<h5>18.1-3 IsCyclotomic</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCyclotomic</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCyc</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Every object in the family <code class="code">CyclotomicsFamily</code> lies in the category <code class="func">IsCyclotomic</code>. This covers integers, rationals, proper cyclotomics, the object <code class="func">infinity</code> (<a href="chap18.html#X8511B8DF83324C27"><span class="RefLink">18.2-1</span></a>), and unknowns (see Chapter <a href="chap74.html#X7C1FAB6280A02CCB"><span class="RefLink">74</span></a>). All these objects except <code class="func">infinity</code> (<a href="chap18.html#X8511B8DF83324C27"><span class="RefLink">18.2-1</span></a>) and unknowns lie also in the category <code class="func">IsCyc</code>, <code class="func">infinity</code> (<a href="chap18.html#X8511B8DF83324C27"><span class="RefLink">18.2-1</span></a>) lies in (and can be detected from) the category <code class="func">IsInfinity</code> (<a href="chap18.html#X8511B8DF83324C27"><span class="RefLink">18.2-1</span></a>), and unknowns lie in <code class="func">IsUnknown</code> (<a href="chap74.html#X828556067E069B6D"><span class="RefLink">74.1-3</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCyclotomic(0); IsCyclotomic(1/2*E(3)); IsCyclotomic( infinity );</span>
true
true
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsCyc(0); IsCyc(1/2*E(3)); IsCyc( infinity );</span>
true
true
false
</pre></div>
<p><a id="X869750DA81EA0E67" name="X869750DA81EA0E67"></a></p>
<h5>18.1-4 IsIntegralCyclotomic</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsIntegralCyclotomic</code>( <var class="Arg">obj</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>A cyclotomic is called <em>integral</em> or a <em>cyclotomic integer</em> 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 <a href="chap60.html#X7D2421AC8491D2BE"><span class="RefLink">60.3</span></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 <a href="chap18.html#X7B242083873DD74F"><span class="RefLink">18.4</span></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>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">r:= ER( 5 ); # The square root of 5 ...</span>
E(5)-E(5)^2-E(5)^3+E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIntegralCyclotomic( r ); # ... is a cyclotomic integer.</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">r2:= 1/2 * r; # This is not a cyclotomic integer, ...</span>
1/2*E(5)-1/2*E(5)^2-1/2*E(5)^3+1/2*E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIntegralCyclotomic( r2 );</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">r3:= 1/2 * r - 1/2; # ... but this is one.</span>
E(5)+E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIntegralCyclotomic( r3 );</span>
true
</pre></div>
<p><a id="X7DD6B95F79321D23" name="X7DD6B95F79321D23"></a></p>
<h5>18.1-5 Int</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Int</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>The operation <code class="func">Int</code> can be used to find a cyclotomic integer near to an arbitrary cyclotomic, by applying <code class="func">Int</code> (<a href="chap14.html#X87CA734380B5F68C"><span class="RefLink">14.2-3</span></a>) to the coefficients.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Int( E(5)+1/2*E(5)^2 ); Int( 2/3*E(7)-3/2*E(4) );</span>
E(5)
-E(4)
</pre></div>
<p><a id="X7CBA6CB678E2B143" name="X7CBA6CB678E2B143"></a></p>
<h5>18.1-6 String</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ String</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>The operation <code class="func">String</code> returns for a cyclotomic <var class="Arg">cyc</var> a string corresponding to the way the cyclotomic is printed by <code class="func">ViewObj</code> (<a href="chap6.html#X815BF22186FD43C9"><span class="RefLink">6.3-5</span></a>) and <code class="func">PrintObj</code> (<a href="chap6.html#X815BF22186FD43C9"><span class="RefLink">6.3-5</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">String( E(5)+1/2*E(5)^2 ); String( 17/3 );</span>
"E(5)+1/2*E(5)^2"
"17/3"
</pre></div>
<p><a id="X815D6EC57CBA9827" name="X815D6EC57CBA9827"></a></p>
<h5>18.1-7 Conductor</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Conductor</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Conductor</code>( <var class="Arg">C</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>For an element <var class="Arg">cyc</var> of a cyclotomic field, <code class="func">Conductor</code> returns the smallest integer <span class="SimpleMath">n</span> such that <var class="Arg">cyc</var> is contained in the <span class="SimpleMath">n</span>-th cyclotomic field. For a collection <var class="Arg">C</var> of cyclotomics (for example a dense list of cyclotomics or a field of cyclotomics), <code class="func">Conductor</code> returns the smallest integer <span class="SimpleMath">n</span> such that all elements of <var class="Arg">C</var> are contained in the <span class="SimpleMath">n</span>-th cyclotomic field.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Conductor( 0 ); Conductor( E(10) ); Conductor( E(12) );</span>
1
5
12
</pre></div>
<p><a id="X81DD58BB81FB3426" name="X81DD58BB81FB3426"></a></p>
<h5>18.1-8 AbsoluteValue</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AbsoluteValue</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns the absolute value of a cyclotomic number <var class="Arg">cyc</var>. At the moment only methods for rational numbers exist.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">AbsoluteValue(-3);</span>
3
</pre></div>
<p><a id="X7808ECF37AA9004D" name="X7808ECF37AA9004D"></a></p>
<h5>18.1-9 RoundCyc</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RoundCyc</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>is a cyclotomic integer <span class="SimpleMath">z</span> (see <code class="func">IsIntegralCyclotomic</code> (<a href="chap18.html#X869750DA81EA0E67"><span class="RefLink">18.1-4</span></a>)) near to the cyclotomic <var class="Arg">cyc</var> in the following sense: Let <code class="code">c</code> be the <span class="SimpleMath">i</span>-th coefficient in the external representation (see <code class="func">CoeffsCyc</code> (<a href="chap18.html#X7AE2933985BE4C3E"><span class="RefLink">18.1-10</span></a>)) of <var class="Arg">cyc</var>. Then the <span class="SimpleMath">i</span>-th coefficient in the external representation of <span class="SimpleMath">z</span> is <code class="code">Int( c + 1/2 )</code> or <code class="code">Int( c - 1/2 )</code>, depending on whether <code class="code">c</code> is nonnegative or negative, respectively.</p>
<p>Expressed in terms of the Zumbroich basis (see <a href="chap60.html#X7D2421AC8491D2BE"><span class="RefLink">60.3</span></a>), rounding the coefficients of <var class="Arg">cyc</var> w.r.t. this basis to the nearest integer yields the coefficients of <span class="SimpleMath">z</span>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RoundCyc( E(5)+1/2*E(5)^2 ); RoundCyc( 2/3*E(7)+3/2*E(4) );</span>
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></div>
<p><a id="X7AE2933985BE4C3E" name="X7AE2933985BE4C3E"></a></p>
<h5>18.1-10 CoeffsCyc</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CoeffsCyc</code>( <var class="Arg">cyc</var>, <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <var class="Arg">cyc</var> be a cyclotomic with conductor <span class="SimpleMath">n</span> (see <code class="func">Conductor</code> (<a href="chap18.html#X815D6EC57CBA9827"><span class="RefLink">18.1-7</span></a>)). If <var class="Arg">N</var> is not a multiple of <span class="SimpleMath">n</span> then <code class="func">CoeffsCyc</code> returns <code class="keyw">fail</code> because <var class="Arg">cyc</var> cannot be expressed in terms of <var class="Arg">N</var>-th roots of unity. Otherwise <code class="func">CoeffsCyc</code> returns a list of length <var class="Arg">N</var> with entry at position <span class="SimpleMath">j</span> equal to the coefficient of <span class="SimpleMath">exp(2 π i (j-1)/<var class="Arg">N</var>)</span> if this root belongs to the <var class="Arg">N</var>-th Zumbroich basis (see <a href="chap60.html#X7D2421AC8491D2BE"><span class="RefLink">60.3</span></a>), and equal to zero otherwise. So we have <var class="Arg">cyc</var> = <code class="code">CoeffsCyc(</code> <var class="Arg">cyc</var>, <var class="Arg">N</var> <code class="code">) * List( [1..</code><var class="Arg">N</var><code class="code">], j -> E(</code><var class="Arg">N</var><code class="code">)^(j-1) )</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">cyc:= E(5)+E(5)^2;</span>
E(5)+E(5)^2
<span class="GAPprompt">gap></span> <span class="GAPinput">CoeffsCyc( cyc, 5 ); CoeffsCyc( cyc, 15 ); CoeffsCyc( cyc, 7 );</span>
[ 0, 1, 1, 0, 0 ]
[ 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0 ]
fail
</pre></div>
<p><a id="X803478CA7D2D830F" name="X803478CA7D2D830F"></a></p>
<h5>18.1-11 DenominatorCyc</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DenominatorCyc</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>For a cyclotomic number <var class="Arg">cyc</var> (see <code class="func">IsCyclotomic</code> (<a href="chap18.html#X841C425281A6F775"><span class="RefLink">18.1-3</span></a>)), this function returns the smallest positive integer <span class="SimpleMath">n</span> such that <span class="SimpleMath">n</span><code class="code"> * </code><var class="Arg">cyc</var> is a cyclotomic integer (see <code class="func">IsIntegralCyclotomic</code> (<a href="chap18.html#X869750DA81EA0E67"><span class="RefLink">18.1-4</span></a>)). For rational numbers <var class="Arg">cyc</var>, the result is the same as that of <code class="func">DenominatorRat</code> (<a href="chap17.html#X81F6B5877A81E727"><span class="RefLink">17.2-5</span></a>).</p>
<p><a id="X785F2CAB805DE1BE" name="X785F2CAB805DE1BE"></a></p>
<h5>18.1-12 ExtRepOfObj</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ExtRepOfObj</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>The external representation of a cyclotomic <var class="Arg">cyc</var> with conductor <span class="SimpleMath">n</span> (see <code class="func">Conductor</code> (<a href="chap18.html#X815D6EC57CBA9827"><span class="RefLink">18.1-7</span></a>) is the list returned by <code class="func">CoeffsCyc</code> (<a href="chap18.html#X7AE2933985BE4C3E"><span class="RefLink">18.1-10</span></a>), called with <var class="Arg">cyc</var> and <span class="SimpleMath">n</span>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ExtRepOfObj( E(5) ); CoeffsCyc( E(5), 5 );</span>
[ 0, 1, 0, 0, 0 ]
[ 0, 1, 0, 0, 0 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CoeffsCyc( E(5), 15 );</span>
[ 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0 ]
</pre></div>
<p><a id="X7DDD51B983D5BC44" name="X7DDD51B983D5BC44"></a></p>
<h5>18.1-13 DescriptionOfRootOfUnity</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DescriptionOfRootOfUnity</code>( <var class="Arg">root</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Given a cyclotomic <var class="Arg">root</var> that is known to be a root of unity (this is <em>not</em> checked), <code class="func">DescriptionOfRootOfUnity</code> returns a list <span class="SimpleMath">[ n, e ]</span> of coprime positive integers such that <var class="Arg">root</var> <span class="SimpleMath">=</span> <code class="code">E</code><span class="SimpleMath">(n)^e</span> holds.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">E(9); DescriptionOfRootOfUnity( E(9) );</span>
-E(9)^4-E(9)^7
[ 9, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">DescriptionOfRootOfUnity( -E(3) );</span>
[ 6, 5 ]
</pre></div>
<p><a id="X8712419182ECD8DD" name="X8712419182ECD8DD"></a></p>
<h5>18.1-14 IsGaussInt</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGaussInt</code>( <var class="Arg">x</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">IsGaussInt</code> returns <code class="keyw">true</code> if the object <var class="Arg">x</var> is a Gaussian integer (see <code class="func">GaussianIntegers</code> (<a href="chap60.html#X80BD5EAB879F096E"><span class="RefLink">60.5-1</span></a>)), and <code class="keyw">false</code> otherwise. Gaussian integers are of the form <span class="SimpleMath">a + b</span><code class="code">*E(4)</code>, where <span class="SimpleMath">a</span> and <span class="SimpleMath">b</span> are integers.</p>
<p><a id="X7E6CF4947D0A56F7" name="X7E6CF4947D0A56F7"></a></p>
<h5>18.1-15 IsGaussRat</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGaussRat</code>( <var class="Arg">x</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">IsGaussRat</code> returns <code class="keyw">true</code> if the object <var class="Arg">x</var> is a Gaussian rational (see <code class="func">GaussianRationals</code> (<a href="chap60.html#X82F53C65802FF551"><span class="RefLink">60.1-3</span></a>)), and <code class="keyw">false</code> otherwise. Gaussian rationals are of the form <span class="SimpleMath">a + b</span><code class="code">*E(4)</code>, where <span class="SimpleMath">a</span> and <span class="SimpleMath">b</span> are rationals.</p>
<p><a id="X7FE3D5637B5485D0" name="X7FE3D5637B5485D0"></a></p>
<h5>18.1-16 DefaultField</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DefaultField</code>( <var class="Arg">list</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">DefaultField</code> for cyclotomics is defined to return the smallest <em>cyclotomic</em> field containing the given elements.</p>
<p>Note that <code class="func">Field</code> (<a href="chap58.html#X871AA7D58263E9AC"><span class="RefLink">58.1-3</span></a>) returns the smallest field containing all given elements, which need not be a cyclotomic field. In both cases, the fields represent vector spaces over the rationals (see <a href="chap60.html#X7D2421AC8491D2BE"><span class="RefLink">60.3</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Field( E(5)+E(5)^4 ); DefaultField( E(5)+E(5)^4 );</span>
NF(5,[ 1, 4 ])
CF(5)
</pre></div>
<p><a id="X81AACA757DDDEAE0" name="X81AACA757DDDEAE0"></a></p>
<h4>18.2 <span class="Heading">Infinity</span></h4>
<p><a id="X8511B8DF83324C27" name="X8511B8DF83324C27"></a></p>
<h5>18.2-1 IsInfinity</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsInfinity</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ infinity</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p><code class="func">infinity</code> is a special <strong class="pkg">GAP</strong> object that lies in <code class="code">CyclotomicsFamily</code>. It is larger than all other objects in this family. <code class="func">infinity</code> is mainly used as return value of operations such as <code class="func">Size</code> (<a href="chap30.html#X858ADA3B7A684421"><span class="RefLink">30.4-6</span></a>) and <code class="func">Dimension</code> (<a href="chap57.html#X7E6926C6850E7C4E"><span class="RefLink">57.3-3</span></a>) for infinite and infinite dimensional domains, respectively.</p>
<p>Note that <em>no</em> arithmetic operations are provided for <code class="func">infinity</code>, in particular there is no problem to define what <code class="code">0 * infinity</code> or <code class="code">infinity - infinity</code> means.</p>
<p>Often it is useful to distinguish <code class="func">infinity</code> from "proper" cyclotomics. For that, <code class="func">infinity</code> lies in the category <code class="func">IsInfinity</code> but not in <code class="func">IsCyc</code> (<a href="chap18.html#X841C425281A6F775"><span class="RefLink">18.1-3</span></a>), and the other cyclotomics lie in the category <code class="func">IsCyc</code> (<a href="chap18.html#X841C425281A6F775"><span class="RefLink">18.1-3</span></a>) but not in <code class="func">IsInfinity</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">s:= Size( Rationals );</span>
infinity
<span class="GAPprompt">gap></span> <span class="GAPinput">s = infinity; IsCyclotomic( s ); IsCyc( s ); IsInfinity( s );</span>
true
true
false
true
<span class="GAPprompt">gap></span> <span class="GAPinput">s in Rationals; s > 17;</span>
false
true
<span class="GAPprompt">gap></span> <span class="GAPinput">Set( [ s, 2, s, E(17), s, 19 ] );</span>
[ 2, 19, E(17), infinity ]
</pre></div>
<p><a id="X7F66A62384329705" name="X7F66A62384329705"></a></p>
<h4>18.3 <span class="Heading">Comparisons of Cyclotomics</span></h4>
<p>To compare cyclotomics, the operators <code class="code"><</code>, <code class="code"><=</code>, <code class="code">=</code>, <code class="code">>=</code>, <code class="code">></code>, and <code class="code"><></code> can be used, the result will be <code class="keyw">true</code> if the first operand is smaller, smaller or equal, equal, larger or equal, larger, or unequal, respectively, and <code class="keyw">false</code> otherwise.</p>
<p>Cyclotomics are ordered as follows: The relation between rationals is the natural one, rationals are smaller than irrational cyclotomics, and <code class="func">infinity</code> (<a href="chap18.html#X8511B8DF83324C27"><span class="RefLink">18.2-1</span></a>) is the largest cyclotomic. For two irrational cyclotomics with different conductors (see <code class="func">Conductor</code> (<a href="chap18.html#X815D6EC57CBA9827"><span class="RefLink">18.1-7</span></a>)), the one with smaller conductor is regarded as smaller. Two irrational cyclotomics with same conductor are compared via their external representation (see <code class="func">ExtRepOfObj</code> (<a href="chap18.html#X785F2CAB805DE1BE"><span class="RefLink">18.1-12</span></a>)).</p>
<p>For comparisons of cyclotomics and other <strong class="pkg">GAP</strong> objects, see Section <a href="chap4.html#X7A274A1F8553B7E6"><span class="RefLink">4.12</span></a>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">E(5) < E(6); # the latter value has conductor 3</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">E(3) < E(3)^2; # both have conductor 3, compare the ext. repr.</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">3 < E(3); E(5) < E(7);</span>
true
true
</pre></div>
<p><a id="X7B242083873DD74F" name="X7B242083873DD74F"></a></p>
<h4>18.4 <span class="Heading">ATLAS Irrationalities</span></h4>
<p><a id="X844D62597D9EFE3C" name="X844D62597D9EFE3C"></a></p>
<h5>18.4-1 <span class="Heading">EB, EC, <span class="SimpleMath">...</span>, EH</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EB</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EC</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ED</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EE</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EF</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EG</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EH</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>For a positive integer <var class="Arg">N</var>, let <span class="SimpleMath">z =</span> <code class="code">E(</code><var class="Arg">N</var><code class="code">)</code> <span class="SimpleMath">= exp(2 π i/<var class="Arg">N</var>)</span>. The following so-called <em>atomic irrationalities</em> (see <a href="chapBib.html#biBCCN85">[CCNPW85, Chapter 7, Section 10]</a>) can be entered using functions. (Note that the values are not necessary irrational.)</p>
<div class="pcenter"><table class="GAPDocTablenoborder">
<tr>
<td class="tdleft"><code class="code">EB(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">b_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^2} ) / 2</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 2</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EC(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">c_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^3} ) / 3</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 3</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">ED(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">d_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^4} ) / 4</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 4</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EE(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">e_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^5} ) / 5</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 5</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EF(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">f_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^6} ) / 6</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 6</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EG(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">g_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^7} ) / 7</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 7</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EH(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">h_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">( ∑_{j = 1}^{<var class="Arg">N</var>-1} z^{j^8} ) / 8</span></td>
<td class="tdcenter">,</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 8</span></td>
</tr>
</table><br /><p> </p><br />
</div>
<p>(Note that in <code class="code">EC(</code><var class="Arg">N</var><code class="code">)</code>, <span class="SimpleMath">...</span>, <code class="code">EH(</code><var class="Arg">N</var><code class="code">)</code>, <var class="Arg">N</var> must be a prime.)</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">EB(5); EB(9);</span>
E(5)+E(5)^4
1
</pre></div>
<p><a id="X813CF4327C4B4D29" name="X813CF4327C4B4D29"></a></p>
<h5>18.4-2 <span class="Heading">EI and ER</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EI</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ER</code>( <var class="Arg">N</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>For a rational number <var class="Arg">N</var>, <code class="func">ER</code> returns the square root <span class="SimpleMath">sqrt{<var class="Arg">N</var>}</span> of <var class="Arg">N</var>, and <code class="func">EI</code> returns <span class="SimpleMath">sqrt{-<var class="Arg">N</var>}</span>. By the chosen embedding of cyclotomic fields into the complex numbers, <code class="func">ER</code> returns the positive square root if <var class="Arg">N</var> is positive, and if <var class="Arg">N</var> is negative then <code class="code">ER(</code><var class="Arg">N</var><code class="code">) = EI(-</code><var class="Arg">N</var><code class="code">)</code> holds. In any case, <code class="code">EI(</code><var class="Arg">N</var><code class="code">) = E(4) * ER(</code><var class="Arg">N</var><code class="code">)</code>.</p>
<p><code class="func">ER</code> is installed as method for the operation <code class="func">Sqrt</code> (<a href="chap31.html#X7E8F1FB87C229BB0"><span class="RefLink">31.12-5</span></a>), for rational argument.</p>
<p>From a theorem of Gauss we know that <span class="SimpleMath">b_<var class="Arg">N</var> =</span></p>
<div class="pcenter"><table class="GAPDocTablenoborder">
<tr>
<td class="tdleft"><span class="SimpleMath">(-1 + sqrt{<var class="Arg">N</var>}) / 2</span></td>
<td class="tdcenter">if</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ 1 mod 4</span></td>
</tr>
<tr>
<td class="tdleft"><span class="SimpleMath">(-1 + i sqrt{<var class="Arg">N</var>}) / 2</span></td>
<td class="tdcenter">if</td>
<td class="tdleft"><span class="SimpleMath"><var class="Arg">N</var> ≡ -1 mod 4</span></td>
</tr>
</table><br /><p> </p><br />
</div>
<p>So <span class="SimpleMath">sqrt{<var class="Arg">N</var>}</span> can be computed from <span class="SimpleMath">b_<var class="Arg">N</var></span>, see <code class="func">EB</code> (<a href="chap18.html#X844D62597D9EFE3C"><span class="RefLink">18.4-1</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ER(3); EI(3);</span>
-E(12)^7+E(12)^11
E(3)-E(3)^2
</pre></div>
<p><a id="X842338F184E63894" name="X842338F184E63894"></a></p>
<h5>18.4-3 <span class="Heading">EY, EX, <span class="SimpleMath">...</span>, ES</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EY</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EX</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EW</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EV</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EU</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ET</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ES</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>For the given integer <var class="Arg">N</var> <span class="SimpleMath">> 2</span>, let <span class="SimpleMath"><var class="Arg">N</var>_k</span> denote the first integer with multiplicative order exactly <span class="SimpleMath">k</span> modulo <var class="Arg">N</var>, chosen in the order of preference</p>
<p class="pcenter">1, -1, 2, -2, 3, -3, 4, -4, ... .</p>
<p>We define (with <span class="SimpleMath">z = exp(2 π i/<var class="Arg">N</var>)</span>)</p>
<div class="pcenter"><table class="GAPDocTablenoborder">
<tr>
<td class="tdleft"><code class="code">EY(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">y_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_2)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EX(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">x_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n + z^{n^2}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_3)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EW</code>(<var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">w_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n + z^{n^2} + z^{n^3}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_4)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EV(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">v_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n + z^{n^2} + z^{n^3} + z^{n^4}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_5)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EU(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">u_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n + z^{n^2} + ... + z^{n^5}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_6)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">ET(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">t_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n + z^{n^2} + ... + z^{n^6}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_7)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">ES(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">s_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z + z^n + z^{n^2} + ... + z^{n^7}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_8)</span></td>
</tr>
</table><br /><p> </p><br />
</div>
<p>For the two-argument versions of the functions, see Section <code class="func">NK</code> (<a href="chap18.html#X844F0EBF849EDEB3"><span class="RefLink">18.4-5</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">EY(5);</span>
E(5)+E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">EW(16,3); EW(17,2);</span>
0
E(17)+E(17)^4+E(17)^13+E(17)^16
</pre></div>
<p><a id="X87CA3CA083D49AC7" name="X87CA3CA083D49AC7"></a></p>
<h5>18.4-4 <span class="Heading">EM, EL, <span class="SimpleMath">...</span>, EJ</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EM</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EL</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EK</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EJ</code>( <var class="Arg">N</var>[, <var class="Arg">d</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <var class="Arg">N</var> be an integer, <var class="Arg">N</var> <span class="SimpleMath">> 2</span>. We define (with <span class="SimpleMath">z = exp(2 π i/<var class="Arg">N</var>)</span>)</p>
<div class="pcenter"><table class="GAPDocTablenoborder">
<tr>
<td class="tdleft"><code class="code">EM(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">m_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z - z^n</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_2)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EL(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">l_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z - z^n + z^{n^2} - z^{n^3}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_4)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EK(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">k_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z - z^n + ... - z^{n^5}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_6)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EJ(</code><var class="Arg">N</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">j_<var class="Arg">N</var></span></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">z - z^n + ... - z^{n^7}</span></td>
<td class="tdleft"><span class="SimpleMath">(n = <var class="Arg">N</var>_8)</span></td>
</tr>
</table><br /><p> </p><br />
</div>
<p>For the two-argument versions of the functions, see Section <code class="func">NK</code> (<a href="chap18.html#X844F0EBF849EDEB3"><span class="RefLink">18.4-5</span></a>).</p>
<p><a id="X844F0EBF849EDEB3" name="X844F0EBF849EDEB3"></a></p>
<h5>18.4-5 NK</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NK</code>( <var class="Arg">N</var>, <var class="Arg">k</var>, <var class="Arg">d</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <span class="SimpleMath"><var class="Arg">N</var>_<var class="Arg">k</var>^(<var class="Arg">d</var>)</span> be the <span class="SimpleMath">(<var class="Arg">d</var>+1)</span>-th integer with multiplicative order exactly <var class="Arg">k</var> modulo <var class="Arg">N</var>, chosen in the order of preference defined in Section <a href="chap18.html#X842338F184E63894"><span class="RefLink">18.4-3</span></a>; <code class="func">NK</code> returns <span class="SimpleMath"><var class="Arg">N</var>_<var class="Arg">k</var>^(<var class="Arg">d</var>)</span>; if there is no integer with the required multiplicative order, <code class="func">NK</code> returns <code class="keyw">fail</code>.</p>
<p>We write <span class="SimpleMath"><var class="Arg">N</var>_<var class="Arg">k</var> = <var class="Arg">N</var>_<var class="Arg">k</var>^(0), <var class="Arg">N</var>_<var class="Arg">k</var>^' = <var class="Arg">N</var>_<var class="Arg">k</var>^(1), <var class="Arg">N</var>_<var class="Arg">k</var>^'' = <var class="Arg">N</var>_<var class="Arg">k</var>^(2)</span> and so on.</p>
<p>The algebraic numbers</p>
<p class="pcenter">y_<var class="Arg">N</var>^' = y_<var class="Arg">N</var>^(1), y_<var class="Arg">N</var>^'' = y_<var class="Arg">N</var>^(2), ..., x_<var class="Arg">N</var>^', x_<var class="Arg">N</var>^'', ..., j_<var class="Arg">N</var>^', j_<var class="Arg">N</var>^'', ...</p>
<p>are obtained on replacing <span class="SimpleMath"><var class="Arg">N</var>_<var class="Arg">k</var></span> in the definitions in the sections <a href="chap18.html#X842338F184E63894"><span class="RefLink">18.4-3</span></a> and <a href="chap18.html#X87CA3CA083D49AC7"><span class="RefLink">18.4-4</span></a> by <span class="SimpleMath"><var class="Arg">N</var>_<var class="Arg">k</var>^', <var class="Arg">N</var>_<var class="Arg">k</var>^'', ...</span>; they can be entered as</p>
<div class="pcenter"><table class="GAPDocTablenoborder">
<tr>
<td class="tdleft"><code class="code">EY(</code><var class="Arg">N</var>,<var class="Arg">d</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">y_<var class="Arg">N</var>^(<var class="Arg">d</var>)</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EX(</code><var class="Arg">N</var>,<var class="Arg">d</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">x_<var class="Arg">N</var>^(<var class="Arg">d</var>)</span></td>
</tr>
<tr>
<td class="tdleft"></td>
<td class="tdcenter"><span class="SimpleMath">...</span></td>
<td class="tdleft"></td>
</tr>
<tr>
<td class="tdleft"><code class="code">EJ(</code><var class="Arg">N</var>,<var class="Arg">d</var><code class="code">)</code></td>
<td class="tdcenter">=</td>
<td class="tdleft"><span class="SimpleMath">j_<var class="Arg">N</var>^(<var class="Arg">d</var>)</span></td>
</tr>
</table><br /><p> </p><br />
</div>
<p><a id="X812E334E7A869D33" name="X812E334E7A869D33"></a></p>
<h5>18.4-6 AtlasIrrationality</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AtlasIrrationality</code>( <var class="Arg">irratname</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <var class="Arg">irratname</var> be a string that describes an irrational value as a linear combination in terms of the atomic irrationalities introduced in the sections <a href="chap18.html#X844D62597D9EFE3C"><span class="RefLink">18.4-1</span></a>, <a href="chap18.html#X813CF4327C4B4D29"><span class="RefLink">18.4-2</span></a>, <a href="chap18.html#X842338F184E63894"><span class="RefLink">18.4-3</span></a>, <a href="chap18.html#X87CA3CA083D49AC7"><span class="RefLink">18.4-4</span></a>. These irrational values are defined in <a href="chapBib.html#biBCCN85">[CCNPW85, Chapter 6, Section 10]</a>, and the following description is mainly copied from there. If <span class="SimpleMath">q_N</span> is such a value (e.g. <span class="SimpleMath">y_24^''</span>) then linear combinations of algebraic conjugates of <span class="SimpleMath">q_N</span> are abbreviated as in the following examples:</p>
<div class="pcenter"><table class="GAPDocTablenoborder">
<tr>
<td class="tdleft"><code class="code">2qN+3&5-4&7+&9</code></td>
<td class="tdcenter">means</td>
<td class="tdleft"><span class="SimpleMath">2 q_N + 3 q_N^{*5} - 4 q_N^{*7} + q_N^{*9}</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">4qN&3&5&7-3&4</code></td>
<td class="tdcenter">means</td>
<td class="tdleft"><span class="SimpleMath">4 (q_N + q_N^{*3} + q_N^{*5} + q_N^{*7}) - 3 q_N^{*11}</span></td>
</tr>
<tr>
<td class="tdleft"><code class="code">4qN*3&5+&7</code></td>
<td class="tdcenter">means</td>
<td class="tdleft"><span class="SimpleMath">4 (q_N^{*3} + q_N^{*5}) + q_N^{*7}</span></td>
</tr>
</table><br /><p> </p><br />
</div>
<p>To explain the "ampersand" syntax in general we remark that "&k" is interpreted as <span class="SimpleMath">q_N^{*k}</span>, where <span class="SimpleMath">q_N</span> is the most recently named atomic irrationality, and that the scope of any premultiplying coefficient is broken by a <span class="SimpleMath">+</span> or <span class="SimpleMath">-</span> sign, but not by <span class="SimpleMath">&</span> or <span class="SimpleMath">*k</span>. The algebraic conjugations indicated by the ampersands apply directly to the <em>atomic</em> irrationality <span class="SimpleMath">q_N</span>, even when, as in the last example, <span class="SimpleMath">q_N</span> first appears with another conjugacy <span class="SimpleMath">*k</span>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "b7*3" );</span>
E(7)^3+E(7)^5+E(7)^6
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "y'''24" );</span>
E(24)-E(24)^19
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "-3y'''24*13&5" );</span>
3*E(8)-3*E(8)^3
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "3y'''24*13-2&5" );</span>
-3*E(24)-2*E(24)^11+2*E(24)^17+3*E(24)^19
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "3y'''24*13-&5" );</span>
-3*E(24)-E(24)^11+E(24)^17+3*E(24)^19
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "3y'''24*13-4&5&7" );</span>
-7*E(24)-4*E(24)^11+4*E(24)^17+7*E(24)^19
<span class="GAPprompt">gap></span> <span class="GAPinput">AtlasIrrationality( "3y'''24&7" );</span>
6*E(24)-6*E(24)^19
</pre></div>
<p><a id="X79FE34337DF2CD10" name="X79FE34337DF2CD10"></a></p>
<h4>18.5 <span class="Heading">Galois Conjugacy of Cyclotomics</span></h4>
<p><a id="X79EE9097783128C4" name="X79EE9097783128C4"></a></p>
<h5>18.5-1 GaloisCyc</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GaloisCyc</code>( <var class="Arg">cyc</var>, <var class="Arg">k</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GaloisCyc</code>( <var class="Arg">list</var>, <var class="Arg">k</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>For a cyclotomic <var class="Arg">cyc</var> and an integer <var class="Arg">k</var>, <code class="func">GaloisCyc</code> returns the cyclotomic obtained by raising the roots of unity in the Zumbroich basis representation of <var class="Arg">cyc</var> to the <var class="Arg">k</var>-th power. If <var class="Arg">k</var> is coprime to the integer <span class="SimpleMath">n</span>, <code class="code">GaloisCyc( ., <var class="Arg">k</var> )</code> acts as a Galois automorphism of the <span class="SimpleMath">n</span>-th cyclotomic field (see <a href="chap60.html#X7E4AB4B17C7BA10C"><span class="RefLink">60.4</span></a>); to get the Galois automorphisms themselves, use <code class="func">GaloisGroup</code> (<a href="chap58.html#X80CAA5BA82F09ED2"><span class="RefLink">58.3-1</span></a>).</p>
<p>The <em>complex conjugate</em> of <var class="Arg">cyc</var> is <code class="code">GaloisCyc( <var class="Arg">cyc</var>, -1 )</code>, which can also be computed using <code class="func">ComplexConjugate</code> (<a href="chap18.html#X7BE001A0811CD599"><span class="RefLink">18.5-2</span></a>).</p>
<p>For a list or matrix <var class="Arg">list</var> of cyclotomics, <code class="func">GaloisCyc</code> returns the list obtained by applying <code class="func">GaloisCyc</code> to the entries of <var class="Arg">list</var>.</p>
<p><a id="X7BE001A0811CD599" name="X7BE001A0811CD599"></a></p>
<h5>18.5-2 ComplexConjugate</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ComplexConjugate</code>( <var class="Arg">z</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RealPart</code>( <var class="Arg">z</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImaginaryPart</code>( <var class="Arg">z</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>For a cyclotomic number <var class="Arg">z</var>, <code class="func">ComplexConjugate</code> returns <code class="code">GaloisCyc( <var class="Arg">z</var>, -1 )</code>, see <code class="func">GaloisCyc</code> (<a href="chap18.html#X79EE9097783128C4"><span class="RefLink">18.5-1</span></a>). For a quaternion <span class="SimpleMath"><var class="Arg">z</var> = c_1 e + c_2 i + c_3 j + c_4 k</span>, <code class="func">ComplexConjugate</code> returns <span class="SimpleMath">c_1 e - c_2 i - c_3 j - c_4 k</span>, see <code class="func">IsQuaternion</code> (<a href="chap62.html#X82B3A9077D0CB453"><span class="RefLink">62.8-8</span></a>).</p>
<p>When <code class="func">ComplexConjugate</code> is called with a list then the result is the list of return values of <code class="func">ComplexConjugate</code> for the list entries in the corresponding positions.</p>
<p>When <code class="func">ComplexConjugate</code> is defined for an object <var class="Arg">z</var> then <code class="func">RealPart</code> and <code class="func">ImaginaryPart</code> return <code class="code">(<var class="Arg">z</var> + ComplexConjugate( <var class="Arg">z</var> )) / 2</code> and <code class="code">(<var class="Arg">z</var> - ComplexConjugate( <var class="Arg">z</var> )) / 2 i</code>, respectively, where <code class="code">i</code> denotes the corresponding imaginary unit.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GaloisCyc( E(5) + E(5)^4, 2 );</span>
E(5)^2+E(5)^3
<span class="GAPprompt">gap></span> <span class="GAPinput">GaloisCyc( E(5), -1 ); # the complex conjugate</span>
E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">GaloisCyc( E(5) + E(5)^4, -1 ); # this value is real</span>
E(5)+E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">GaloisCyc( E(15) + E(15)^4, 3 );</span>
E(5)+E(5)^4
<span class="GAPprompt">gap></span> <span class="GAPinput">ComplexConjugate( E(7) );</span>
E(7)^6
</pre></div>
<p><a id="X7E361C057E97CA66" name="X7E361C057E97CA66"></a></p>
<h5>18.5-3 StarCyc</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ StarCyc</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>If the cyclotomic <var class="Arg">cyc</var> is an irrational element of a quadratic extension of the rationals then <code class="func">StarCyc</code> returns the unique Galois conjugate of <var class="Arg">cyc</var> that is different from <var class="Arg">cyc</var>, otherwise <code class="keyw">fail</code> is returned. In the first case, the return value is often called <var class="Arg">cyc</var><span class="SimpleMath">*</span> (see <a href="chap71.html#X7C1941F17BE9FC21"><span class="RefLink">71.13</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">StarCyc( EB(5) ); StarCyc( E(5) );</span>
E(5)^2+E(5)^3
fail
</pre></div>
<p><a id="X84438F867B0CC299" name="X84438F867B0CC299"></a></p>
<h5>18.5-4 Quadratic</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Quadratic</code>( <var class="Arg">cyc</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Let <var class="Arg">cyc</var> be a cyclotomic integer that lies in a quadratic extension field of the rationals. Then we have <var class="Arg">cyc</var><span class="SimpleMath">= (a + b sqrt{n}) / d</span>, for integers <span class="SimpleMath">a</span>, <span class="SimpleMath">b</span>, <span class="SimpleMath">n</span>, <span class="SimpleMath">d</span>, such that <span class="SimpleMath">d</span> is either <span class="SimpleMath">1</span> or <span class="SimpleMath">2</span>. In this case, <code class="func">Quadratic</code> returns a record with the components <code class="code">a</code>, <code class="code">b</code>, <code class="code">root</code>, <code class="code">d</code>, <code class="code">ATLAS</code>, and <code class="code">display</code>; the values of the first four are <span class="SimpleMath">a</span>, <span class="SimpleMath">b</span>, <span class="SimpleMath">n</span>, and <span class="SimpleMath">d</span>, the <code class="code">ATLAS</code> value is a (not necessarily shortest) representation of <var class="Arg">cyc</var> in terms of the <strong class="pkg">Atlas</strong> irrationalities <span class="SimpleMath">b_{|n|}</span>, <span class="SimpleMath">i_{|n|}</span>, <span class="SimpleMath">r_{|n|}</span>, and the <code class="code">display</code> value is a string that expresses <var class="Arg">cyc</var> in <strong class="pkg">GAP</strong> notation, corresponding to the value of the <code class="code">ATLAS</code> component.</p>
<p>If <var class="Arg">cyc</var> is not a cyclotomic integer or does not lie in a quadratic extension field of the rationals then <code class="keyw">fail</code> is returned.</p>
<p>If the denominator <span class="SimpleMath">d</span> is <span class="SimpleMath">2</span> then necessarily <span class="SimpleMath">n</span> is congruent to <span class="SimpleMath">1</span> modulo <span class="SimpleMath">4</span>, and <span class="SimpleMath">r_n</span>, <span class="SimpleMath">i_n</span> are not possible; we have <code class="code"><var class="Arg">cyc</var> = x + y * EB( root )</code> with <code class="code">y = b</code>, <code class="code">x = ( a + b ) / 2</code>.</p>
<p>If <span class="SimpleMath">d = 1</span>, we have the possibilities <span class="SimpleMath">i_{|n|}</span> for <span class="SimpleMath">n < -1</span>, <span class="SimpleMath">a + b * i</span> for <span class="SimpleMath">n = -1</span>, <span class="SimpleMath">a + b * r_n</span> for <span class="SimpleMath">n > 0</span>. Furthermore if <span class="SimpleMath">n</span> is congruent to <span class="SimpleMath">1</span> modulo <span class="SimpleMath">4</span>, also <var class="Arg">cyc</var> <span class="SimpleMath">= (a+b) + 2 * b * b_{|n|}</span> is possible; the shortest string of these is taken as the value for the component <code class="code">ATLAS</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Quadratic( EB(5) ); Quadratic( EB(27) );</span>
rec( ATLAS := "b5", a := -1, b := 1, d := 2,
display := "(-1+Sqrt(5))/2", root := 5 )
rec( ATLAS := "1+3b3", a := -1, b := 3, d := 2,
display := "(-1+3*Sqrt(-3))/2", root := -3 )
<span class="GAPprompt">gap></span> <span class="GAPinput">Quadratic(0); Quadratic( E(5) );</span>
rec( ATLAS := "0", a := 0, b := 0, d := 1, display := "0", root := 1 )
fail
</pre></div>
<p><a id="X7DDDEC3F80543B7D" name="X7DDDEC3F80543B7D"></a></p>
<h5>18.5-5 GaloisMat</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GaloisMat</code>( <var class="Arg">mat</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Let <var class="Arg">mat</var> be a matrix of cyclotomics. <code class="func">GaloisMat</code> calculates the complete orbits under the operation of the Galois group of the (irrational) entries of <var class="Arg">mat</var>, and the permutations of rows corresponding to the generators of the Galois group.</p>
<p>If some rows of <var class="Arg">mat</var> are identical, only the first one is considered for the permutations, and a warning will be printed.</p>
<p><code class="func">GaloisMat</code> returns a record with the components <code class="code">mat</code>, <code class="code">galoisfams</code>, and <code class="code">generators</code>.</p>
<dl>
<dt><strong class="Mark"><code class="code">mat</code></strong></dt>
<dd><p>a list with initial segment being the rows of <var class="Arg">mat</var> (<em>not</em> shallow copies of these rows); the list consists of full orbits under the action of the Galois group of the entries of <var class="Arg">mat</var> defined above. The last rows in the list are those not contained in <var class="Arg">mat</var> but must be added in order to complete the orbits; so if the orbits were already complete, <var class="Arg">mat</var> and <code class="code">mat</code> have identical rows.</p>
</dd>
<dt><strong class="Mark"><code class="code">galoisfams</code></strong></dt>
<dd><p>a list that has the same length as the <code class="code">mat</code> component, its entries are either 1, 0, -1, or lists.</p>
<dl>
<dt><strong class="Mark"><code class="code">galoisfams[i] = 1</code></strong></dt>
<dd><p>means that <code class="code">mat[i]</code> consists of rationals, i.e., <code class="code">[ mat[i] ]</code> forms an orbit;</p>
</dd>
<dt><strong class="Mark"><code class="code">galoisfams[i] = -1</code></strong></dt>
<dd><p>means that <code class="code">mat[i]</code> contains unknowns (see Chapter <a href="chap74.html#X7C1FAB6280A02CCB"><span class="RefLink">74</span></a>); in this case <code class="code">[ mat[i] ]</code> is regarded as an orbit, too, even if <code class="code">mat[i]</code> contains irrational entries;</p>
</dd>
<dt><strong class="Mark"><code class="code">galoisfams[i] = </code><span class="SimpleMath">[ l_1, l_2 ]</span></strong></dt>
<dd><p>(a list) means that <code class="code">mat[i]</code> is the first element of its orbit in <code class="code">mat</code>, <span class="SimpleMath">l_1</span> is the list of positions of rows that form the orbit, and <span class="SimpleMath">l_2</span> is the list of corresponding Galois automorphisms (as exponents, not as functions); so we have <code class="code">mat</code><span class="SimpleMath">[ l_1[j] ][k] =</span> <code class="code">GaloisCyc( mat</code><span class="SimpleMath">[i][k], l_2[j]</span><code class="code"> )</code>;</p>
</dd>
<dt><strong class="Mark"><code class="code">galoisfams[i] = 0</code></strong></dt>
<dd><p>means that <code class="code">mat[i]</code> is an element of a nontrivial orbit but not the first element of it.</p>
</dd>
</dl>
</dd>
<dt><strong class="Mark"><code class="code">generators</code></strong></dt>
<dd><p>a list of permutations generating the permutation group corresponding to the action of the Galois group on the rows of <code class="code">mat</code>.</p>
</dd>
</dl>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">GaloisMat( [ [ E(3), E(4) ] ] );</span>
rec( galoisfams := [ [ [ 1, 2, 3, 4 ], [ 1, 7, 5, 11 ] ], 0, 0, 0 ],
generators := [ (1,2)(3,4), (1,3)(2,4) ],
mat := [ [ E(3), E(4) ], [ E(3), -E(4) ], [ E(3)^2, E(4) ],
[ E(3)^2, -E(4) ] ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">GaloisMat( [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ] ] );</span>
rec( galoisfams := [ 1, [ [ 2, 3 ], [ 1, 2 ] ], 0 ],
generators := [ (2,3) ],
mat := [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ] )
</pre></div>
<p><a id="X7BB9F5957AA8C082" name="X7BB9F5957AA8C082"></a></p>
<h5>18.5-6 RationalizedMat</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RationalizedMat</code>( <var class="Arg">mat</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>returns the list of rationalized rows of <var class="Arg">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 class="Arg">mat</var> (see <code class="func">GaloisMat</code> (<a href="chap18.html#X7DDDEC3F80543B7D"><span class="RefLink">18.5-5</span></a>)), so the operation may be viewed as a kind of trace on the rows.</p>
<p>Note that no two rows of <var class="Arg">mat</var> should be equal.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">mat:= [ [ 1, 1, 1 ], [ 1, E(3), E(3)^2 ], [ 1, E(3)^2, E(3) ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">RationalizedMat( mat );</span>
[ [ 1, 1, 1 ], [ 2, -1, -1 ] ]
</pre></div>
<p><a id="X8557FC2D7ACD6105" name="X8557FC2D7ACD6105"></a></p>
<h4>18.6 <span class="Heading">Internally Represented Cyclotomics</span></h4>
<p>The implementation of an <em>internally represented cyclotomic</em> is based on a list of length equal to its conductor. This means that the internal representation of a cyclotomic does <em>not</em> refer to the smallest number field but the smallest <em>cyclotomic</em> 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>
<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 <a href="chap71.html#X7B7A9EE881E01C10"><span class="RefLink">71</span></a>).</p>
<p>For the representation of cyclotomics one has to recall that the <span class="SimpleMath">n</span>-th cyclotomic field <span class="SimpleMath">ℚ(e_n)</span> is a vector space of dimension <span class="SimpleMath">φ(n)</span> over the rationals where <span class="SimpleMath">φ</span> denotes Euler's phi-function (see <code class="func">Phi</code> (<a href="chap15.html#X85A0C67982D9057A"><span class="RefLink">15.2-2</span></a>)).</p>
<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. the basis into the smallest possible cyclotomic field. This basis is accessible in <strong class="pkg">GAP</strong>, see <a href="chap60.html#X7D2421AC8491D2BE"><span class="RefLink">60.3</span></a> for more information and references.</p>
<p>Note that the set of all <span class="SimpleMath">n</span>-th roots of unity is linearly dependent for <span class="SimpleMath">n > 1</span>, so multiplication is <em>not</em> the multiplication of the group ring <span class="SimpleMath">ℚ⟨ e_n ⟩</span>; given a <span class="SimpleMath">ℚ</span>-basis of <span class="SimpleMath">ℚ(e_n)</span> the result of the multiplication (computed as multiplication of polynomials in <span class="SimpleMath">e_n</span>, using <span class="SimpleMath">(e_n)^n = 1</span>) will be converted to the basis.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">E(5) * E(5)^2; ( E(5) + E(5)^4 ) * E(5)^2;</span>
E(5)^3
E(5)+E(5)^3
<span class="GAPprompt">gap></span> <span class="GAPinput">( E(5) + E(5)^4 ) * E(5);</span>
-E(5)-E(5)^3-E(5)^4
</pre></div>
<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 class="func">ExtRepOfObj</code> (<a href="chap18.html#X785F2CAB805DE1BE"><span class="RefLink">18.1-12</span></a>).</p>
<p>To avoid calculations becoming unintentionally very long, or consuming very large amounts of memory, there is a limit on the conductor of internally represented cyclotomics, by default set to one million. This can be raised (although not lowered) using <code class="func">SetCyclotomicsLimit</code> (<a href="chap18.html#X7D3028777DE39709"><span class="RefLink">18.6-1</span></a>) and accessed using <code class="func">GetCyclotomicsLimit</code> (<a href="chap18.html#X7D3028777DE39709"><span class="RefLink">18.6-1</span></a>). The maximum value of the limit is <span class="SimpleMath">2^28-1</span> on <span class="SimpleMath">32</span> bit systems, and <span class="SimpleMath">2^32</span> on <span class="SimpleMath">64</span> bit systems. So the maximal cyclotomic field implemented in <strong class="pkg">GAP</strong> is not really the field <span class="SimpleMath">ℚ^ab</span>.</p>
<p>It should be emphasized that one disadvantage of representing a cyclotomic in the smallest <em>cyclotomic</em> 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 <span class="SimpleMath">p</span> and suppose that we want to work with a matrix group over the field <span class="SimpleMath">ℚ(sqrt{p})</span>. Then each matrix entry could be described by two rational coefficients, whereas the representation in the smallest cyclotomic field requires <span class="SimpleMath">p-1</span> rational coefficients for each entry. So it is worth thinking about using elements in a field constructed with <code class="func">AlgebraicExtension</code> (<a href="chap67.html#X7CDA90537D2BAC8A"><span class="RefLink">67.1-1</span></a>) when natural embeddings of cyclotomic fields are not needed.</p>
<p><a id="X7D3028777DE39709" name="X7D3028777DE39709"></a></p>
<h5>18.6-1 SetCyclotomicsLimit</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SetCyclotomicsLimit</code>( <var class="Arg">newlimit</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GetCyclotomicsLimit</code>( )</td><td class="tdright">( function )</td></tr></table></div>
<p><code class="func">GetCyclotomicsLimit</code> returns the current limit on conductors of internally represented cyclotomic numbers</p>
<p><code class="func">SetCyclotomicsLimit</code> can be called to increase the limit on conductors of internally represented cyclotomic numbers. Note that computing in large cyclotomic fields using this representation can be both slow and memory-consuming, and that other approaches may be better for some problems. See <a href="chap18.html#X8557FC2D7ACD6105"><span class="RefLink">18.6</span></a>.</p>
<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap17.html">[Previous Chapter]</a> <a href="chap19.html">[Next Chapter]</a> </div>
<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chap10.html">10</a> <a href="chap11.html">11</a> <a href="chap12.html">12</a> <a href="chap13.html">13</a> <a href="chap14.html">14</a> <a href="chap15.html">15</a> <a href="chap16.html">16</a> <a href="chap17.html">17</a> <a href="chap18.html">18</a> <a href="chap19.html">19</a> <a href="chap20.html">20</a> <a href="chap21.html">21</a> <a href="chap22.html">22</a> <a href="chap23.html">23</a> <a href="chap24.html">24</a> <a href="chap25.html">25</a> <a href="chap26.html">26</a> <a href="chap27.html">27</a> <a href="chap28.html">28</a> <a href="chap29.html">29</a> <a href="chap30.html">30</a> <a href="chap31.html">31</a> <a href="chap32.html">32</a> <a href="chap33.html">33</a> <a href="chap34.html">34</a> <a href="chap35.html">35</a> <a href="chap36.html">36</a> <a href="chap37.html">37</a> <a href="chap38.html">38</a> <a href="chap39.html">39</a> <a href="chap40.html">40</a> <a href="chap41.html">41</a> <a href="chap42.html">42</a> <a href="chap43.html">43</a> <a href="chap44.html">44</a> <a href="chap45.html">45</a> <a href="chap46.html">46</a> <a href="chap47.html">47</a> <a href="chap48.html">48</a> <a href="chap49.html">49</a> <a href="chap50.html">50</a> <a href="chap51.html">51</a> <a href="chap52.html">52</a> <a href="chap53.html">53</a> <a href="chap54.html">54</a> <a href="chap55.html">55</a> <a href="chap56.html">56</a> <a href="chap57.html">57</a> <a href="chap58.html">58</a> <a href="chap59.html">59</a> <a href="chap60.html">60</a> <a href="chap61.html">61</a> <a href="chap62.html">62</a> <a href="chap63.html">63</a> <a href="chap64.html">64</a> <a href="chap65.html">65</a> <a href="chap66.html">66</a> <a href="chap67.html">67</a> <a href="chap68.html">68</a> <a href="chap69.html">69</a> <a href="chap70.html">70</a> <a href="chap71.html">71</a> <a href="chap72.html">72</a> <a href="chap73.html">73</a> <a href="chap74.html">74</a> <a href="chap75.html">75</a> <a href="chap76.html">76</a> <a href="chap77.html">77</a> <a href="chap78.html">78</a> <a href="chap79.html">79</a> <a href="chap80.html">80</a> <a href="chap81.html">81</a> <a href="chap82.html">82</a> <a href="chap83.html">83</a> <a href="chap84.html">84</a> <a href="chap85.html">85</a> <a href="chap86.html">86</a> <a href="chap87.html">87</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>
|