/usr/share/gap/doc/ref/chap31.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 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 | <?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 31: Domains and their Elements</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="chap31" 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="chap30.html">[Previous Chapter]</a> <a href="chap32.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap31_mj.html">[MathJax on]</a></p>
<p><a id="X7E651AC287AFDCC1" name="X7E651AC287AFDCC1"></a></p>
<div class="ChapSects"><a href="chap31.html#X7E651AC287AFDCC1">31 <span class="Heading">Domains and their Elements</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X859C7AB97B34F55F">31.1 <span class="Heading">Operational Structure of Domains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X84FA03F87A17B059">31.2 <span class="Heading">Equality and Comparison of Domains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X82039A218274826F">31.3 <span class="Heading">Constructing Domains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7EA77DE17DD8A231">31.4 <span class="Heading">Changing the Structure</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X860FCCBE7A41412F">31.5 <span class="Heading">Changing the Representation</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7D72F11B82F4A036">31.6 <span class="Heading">Domain Categories</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7CBDD36E7B7BE286">31.7 <span class="Heading">Parents</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7BC856CC7F116BB0">31.7-1 Parent</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7B58FDEF80338DD6">31.8 <span class="Heading">Constructing Subdomains</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X86D579707B112970">31.9 <span class="Heading">Operations for Domains</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X86B4AC017FAF4D12">31.9-1 IsGeneralizedDomain</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7E353DD1838AB223">31.9-2 GeneratorsOfDomain</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X826A21287FD3ACC0">31.9-3 Domain</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7C2B0C1280237CB0">31.10 <span class="Heading">Attributes and Properties of Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X81278E53800BF64D">31.10-1 Characteristic</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8046262384895B2A">31.10-2 OneImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8040AC7A79FFC442">31.10-3 ZeroImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X86DEB543824C40EB">31.10-4 MultiplicativeZeroOp</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X814D78347858EC13">31.10-5 IsOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X82BDA47282F9BBA7">31.10-6 IsZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7CB5896082D29173">31.10-7 IsIdempotent</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78EE524E83624057">31.10-8 InverseImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84BB723C81D55D63">31.10-9 AdditiveInverseImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84F59A2687C62763">31.10-10 Order</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7B3BC7BA7BB2646D">31.11 <span class="Heading">Comparison Operations for Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7EF67D047F03CA6F">31.11-1 <span class="Heading">\= and \<</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7EFE013B8634D214">31.11-2 CanEasilyCompareElements</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7A2914307963E370">31.12 <span class="Heading">Arithmetic Operations for Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8481C9B97B214C23">31.12-1 <span class="Heading">\+, \*, \/, \^, \mod</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7A37082878DB3930">31.12-2 LeftQuotient</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X80761843831B468E">31.12-3 Comm</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X86A62A937A42B82E">31.12-4 LieBracket</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7E8F1FB87C229BB0">31.12-5 Sqrt</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X80A2D8A7874B268B">31.13 <span class="Heading">Relations Between Domains</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7C03098C838ADE40">31.13-1 UseSubsetRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78039B628262BFA8">31.13-2 UseFactorRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X839BE6467E8474D9">31.13-3 UseIsomorphismRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X863C35007C7AA914">31.13-4 InstallSubsetMaintenance</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7BB7EE5078EF6F47">31.13-5 InstallFactorMaintenance</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X79F97F0F78D89186">31.13-6 InstallIsomorphismMaintenance</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7B97A0307EA161E5">31.14 <span class="Heading">Useful Categories of Elements</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7FBD4F65861C2DF2">31.14-1 IsExtAElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7F346AA47AEC39AB">31.14-2 IsNearAdditiveElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78D042B486E1D7F7">31.14-3 IsAdditiveElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7CE2353F836F6E0A">31.14-4 IsNearAdditiveElementWithZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X87F3552A789C572D">31.14-5 IsAdditiveElementWithZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84B0929982B51CB4">31.14-6 IsNearAdditiveElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7C0E4AE883947778">31.14-7 IsAdditiveElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X860D1E387DD5CCCF">31.14-8 IsExtLElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X809E0C097E480AF1">31.14-9 IsExtRElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X797D3B2A7A2B2F53">31.14-10 IsMultiplicativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X82BC294F7D388AE8">31.14-11 IsMultiplicativeElementWithOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8703BFC2841BBD63">31.14-12 IsMultiplicativeElementWithZero</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7FDB14E57814FA3B">31.14-13 IsMultiplicativeElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X802F34F280B29DF4">31.14-14 IsVector</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X799AEDE180C31276">31.14-15 IsNearRingElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X84BF40CA86C07361">31.14-16 IsRingElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7C724689784EEF3D">31.14-17 IsNearRingElementWithOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X875B67208017608E">31.14-18 IsRingElementWithOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X80CD04ED85B6B2F9">31.14-19 IsNearRingElementWithInverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8113834E84FD0435">31.14-20 IsRingElementWithInverse</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap31.html#X7ABEF00C870789D2">31.15 <span class="Heading">Useful Categories for all Elements of a Family</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7979AFAA80FF795A">31.15-1 IsAssociativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X78A286418205CE44">31.15-2 IsAdditivelyCommutativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X8137FA8D86714AC0">31.15-3 IsCommutativeElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X810D2E5E832594AA">31.15-4 IsFiniteOrderElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X796957D0805A0221">31.15-5 IsJacobianElement</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap31.html#X7844399D7847AB24">31.15-6 IsZeroSquaredElement</a></span>
</div></div>
</div>
<h3>31 <span class="Heading">Domains and their Elements</span></h3>
<p><em>Domain</em> is <strong class="pkg">GAP</strong>'s name for structured sets. The ring of Gaussian integers <span class="SimpleMath">ℤ[sqrt{-1}]</span> is an example of a domain, the group <span class="SimpleMath">D_12</span> of symmetries of a regular hexahedron is another.</p>
<p>The <strong class="pkg">GAP</strong> library predefines some domains. For example the ring of Gaussian integers is predefined as <code class="func">GaussianIntegers</code> (<a href="chap60.html#X80BD5EAB879F096E"><span class="RefLink">60.5-1</span></a>) (see <a href="chap60.html#X85E9E90D7FE877CC"><span class="RefLink">60.5</span></a>) and the field of rationals is predefined as <code class="func">Rationals</code> (<a href="chap17.html#X7B6029D18570C08A"><span class="RefLink">17.1-1</span></a>) (see <a href="chap17.html#X87003045878E74DF"><span class="RefLink">17</span></a>). Most domains are constructed by functions, which are called <em>domain constructors</em> (see <a href="chap31.html#X82039A218274826F"><span class="RefLink">31.3</span></a>). For example the group <span class="SimpleMath">D_12</span> is constructed by the construction <code class="code">Group( (1,2,3,4,5,6), (2,6)(3,5) )</code> (see <code class="func">Group</code> (<a href="chap39.html#X7D8E473384DE9CD4"><span class="RefLink">39.2-1</span></a>)) and the finite field with 16 elements is constructed by <code class="code">GaloisField( 16 )</code> (see <code class="func">GaloisField</code> (<a href="chap59.html#X8592DBB086A8A9BE"><span class="RefLink">59.3-2</span></a>)).</p>
<p>The first place where you need domains in <strong class="pkg">GAP</strong> is the obvious one. Sometimes you simply want to deal with a domain. For example if you want to compute the size of the group <span class="SimpleMath">D_12</span>, you had better be able to represent this group in a way that the <code class="func">Size</code> (<a href="chap30.html#X858ADA3B7A684421"><span class="RefLink">30.4-6</span></a>) function can understand.</p>
<p>The second place where you need domains in <strong class="pkg">GAP</strong> is when you want to be able to specify that an operation or computation takes place in a certain domain. For example suppose you want to factor 10 in the ring of Gaussian integers. Saying <code class="code">Factors( 10 )</code> will not do, because this will return the factorization <code class="code">[ 2, 5 ]</code> in the ring of integers. To allow operations and computations to happen in a specific domain, <code class="func">Factors</code> (<a href="chap56.html#X82D6EDC685D12AE2"><span class="RefLink">56.5-9</span></a>), and many other functions as well, accept this domain as optional first argument. Thus <code class="code">Factors( GaussianIntegers, 10 )</code> yields the desired result <code class="code">[ 1+E(4), 1-E(4), 2+E(4), 2-E(4) ]</code>. (The imaginary unit <span class="SimpleMath">sqrt{-1}</span> is written as <code class="code">E(4)</code> in <strong class="pkg">GAP</strong>, see <code class="func">E</code> (<a href="chap18.html#X8631458886314588"><span class="RefLink">18.1-1</span></a>).)</p>
<p>An introduction to the most important facts about domains is given in Chapter <a href="../../doc/tut/chap7.html#X7BAF69417BB925F6"><span class="RefLink">Tutorial: Domains</span></a>.</p>
<p>There are only few <em>operations</em> especially for domains (see <a href="chap31.html#X86D579707B112970"><span class="RefLink">31.9</span></a>), operations such as <code class="func">Intersection</code> (<a href="chap30.html#X851069107CACF98E"><span class="RefLink">30.5-2</span></a>) and <code class="func">Random</code> (<a href="chap30.html#X7FF906E57D6936F8"><span class="RefLink">30.7-1</span></a>) are defined for the more general situation of collections (see Chapter <a href="chap30.html#X8050A8037984E5B6"><span class="RefLink">30</span></a>).</p>
<p><a id="X859C7AB97B34F55F" name="X859C7AB97B34F55F"></a></p>
<h4>31.1 <span class="Heading">Operational Structure of Domains</span></h4>
<p>Domains have an <em>operational structure</em>, that is, a collection of operations under which the domain is closed. For example, a group is closed under multiplication, taking the zeroth power of elements, and taking inverses of elements. The operational structure may be empty, examples of domains without additional structure are the underlying relations of general mappings (see <a href="chap32.html#X7E5A430D7F838F1C"><span class="RefLink">32.3</span></a>).</p>
<p>The operations under which a domain is closed are a subset of the operations that the elements of a domain admit. It is possible that the elements admit more operations. For example, matrices can be multiplied and added. But addition plays no role in a group of matrices, and multiplication plays no role in a vector space of matrices. In particular, a matrix group is not closed under addition.</p>
<p>Note that the elements of a domain exist independently of this domain, usually they existed already before the domain was created. So it makes sense to say that a domain is <em>generated</em> by some elements with respect to certain operations.</p>
<p>Of course, different sets of operations yield different notions of generation. For example, the group generated by some matrices is different from the ring generated by these matrices, and these two will in general be different from the vector space generated by the same matrices, over a suitable field.</p>
<p>The other way round, the same set of elements may be obtained by generation w.r.t. different notions of generation. For example, one can get the group generated by two elements <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span> also as the monoid generated by the elements <span class="SimpleMath">g</span>, <span class="SimpleMath">g^{-1}</span>, <span class="SimpleMath">h</span>, <span class="SimpleMath">h^{-1}</span>; if both <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span> have finite order then of course the group generated by <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span> coincides with the monoid generated by <span class="SimpleMath">g</span> and <span class="SimpleMath">h</span>.</p>
<p>Additionally to the operational structure, a domain can have properties. For example, the multiplication of a group is associative, and the multiplication in a field is commutative.</p>
<p>Note that associativity and commutativity depend on the set of elements for which one considers the multiplication, i.e., it depends on the domain. For example, the multiplication in a full matrix ring over a field is not commutative, whereas its restriction to the set of diagonal matrices is commutative.</p>
<p>One important difference between the operational structure and the properties of a domain is that the operational structure is fixed when the domain is constructed, whereas properties can be discovered later. For example, take a domain whose operational structure is given by closure under multiplication. If it is discovered that the inverses of all its elements also do (by chance) lie in this domain, being closed under taking inverses is <em>not</em> added to the operational structure. But a domain with operational structure of multiplication, taking the identity, and taking inverses will be treated as a group as soon as the multiplication is found out to be associative for this domain.</p>
<p>The operational structures available in <strong class="pkg">GAP</strong> form a hierarchy, which is explicitly formulated in terms of domain categories, see <a href="chap31.html#X7D72F11B82F4A036"><span class="RefLink">31.6</span></a>.</p>
<p><a id="X84FA03F87A17B059" name="X84FA03F87A17B059"></a></p>
<h4>31.2 <span class="Heading">Equality and Comparison of Domains</span></h4>
<p><em>Equality</em> and <em>comparison</em> of domains are defined as follows.</p>
<p>Two domains are considered <em>equal</em> if and only if the sets of their elements as computed by <code class="func">AsSSortedList</code> (<a href="chap30.html#X856D927378C33548"><span class="RefLink">30.3-10</span></a>)) are equal. Thus, in general <code class="code">=</code> behaves as if each domain operand were replaced by its set of elements. Except that <code class="code">=</code> will also sometimes, but not always, work for infinite domains, for which of course <strong class="pkg">GAP</strong> cannot compute the set of elements. Note that this implies that domains with different algebraic structure may well be equal. As a special case of this, either operand of <code class="code">=</code> may also be a proper set (see <a href="chap21.html#X80ABC25582343910"><span class="RefLink">21.19</span></a>), i.e., a sorted list without holes or duplicates (see <code class="func">AsSSortedList</code> (<a href="chap30.html#X856D927378C33548"><span class="RefLink">30.3-10</span></a>)), and <code class="code">=</code> will return <code class="keyw">true</code> if and only if this proper set is equal to the set of elements of the argument that is a domain.</p>
<p><em>No</em> general <em>ordering</em> of arbitrary domains via <code class="code"><</code> is defined in <strong class="pkg">GAP</strong> 4. This is because a well-defined <code class="code"><</code> for domains or, more general, for collections, would have to be compatible with <code class="code">=</code> and would need to be transitive and antisymmetric in order to be used to form ordered sets. In particular, <code class="code"><</code> would have to be independent of the algebraic structure of its arguments because this holds for <code class="code">=</code>, and thus there would be hardly a situation where one could implement an efficient comparison method. (Note that in the case that two domains are comparable with <code class="code"><</code>, the result is in general <em>not</em> compatible with the set theoretical subset relation, which can be decided with <code class="func">IsSubset</code> (<a href="chap30.html#X79CA175481F8105F"><span class="RefLink">30.5-1</span></a>).)</p>
<p><a id="X82039A218274826F" name="X82039A218274826F"></a></p>
<h4>31.3 <span class="Heading">Constructing Domains</span></h4>
<p>For several operational structures (see <a href="chap31.html#X859C7AB97B34F55F"><span class="RefLink">31.1</span></a>), <strong class="pkg">GAP</strong> provides functions to construct domains with this structure (note that such functions do not exist for all operational structures). For example, <code class="func">Group</code> (<a href="chap39.html#X7D8E473384DE9CD4"><span class="RefLink">39.2-1</span></a>) returns groups, <code class="func">VectorSpace</code> (<a href="chap61.html#X805413157CE9BECF"><span class="RefLink">61.2-1</span></a>) returns vector spaces etc.:</p>
<p><code class="code"><var class="Arg">Struct</var>( <var class="Arg">arg1</var>, <var class="Arg">arg2</var>, ... )</code></p>
<p>The syntax of these functions may vary, dependent on the structure in question. Usually a domain is constructed as the closure of some elements under the given operations, that is, the domain is given by its <em>generators</em>. For example, a group can be constructed from a list of generating permutations or matrices or whatever is admissible as group elements, and a vector space over a given field <span class="SimpleMath">F</span> can be constructed from <span class="SimpleMath">F</span> and a list of appropriate vectors.</p>
<p>The idea of generation and generators in <strong class="pkg">GAP</strong> is that the domain returned by a function such as <code class="code">Group</code>, <code class="code">Algebra</code>, or <code class="code">FreeLeftModule</code> <em>contains</em> the given generators. This implies that the generators of a group must know how they are multiplied and inverted, the generators of a module must know how they are added and how scalar multiplication works, and so on. Thus one cannot use for example permutations as generators of a vector space.</p>
<p>The function <var class="Arg">Struct</var> first checks whether the arguments admit the construction of a domain with the desired structure. This is done by calling the operation</p>
<p><code class="code">IsGeneratorsOf<var class="Arg">Struct</var>( [<var class="Arg">info</var>, ]<var class="Arg">gens</var> )</code></p>
<p>where <var class="Arg">arglist</var> is the list of given generators and <var class="Arg">info</var> an argument of <var class="Arg">Struct</var>, for example the field of scalars in the case that a vector space shall be constructed. If the check failed then <var class="Arg">Struct</var> returns <code class="keyw">fail</code>, otherwise it returns the result of <code class="code"><var class="Arg">Struct</var>ByGenerators</code> (see below). (So if one wants to omit the check then one should call <code class="code"><var class="Arg">Struct</var>ByGenerators</code> directly.)</p>
<p><code class="code">GeneratorsOf<var class="Arg">Struct</var>( <var class="Arg">D</var>)</code></p>
<p>For a domain <var class="Arg">D</var> with operational structure corresponding to <var class="Arg">Struct</var>, the attribute <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> returns a list of corresponding generators of <var class="Arg">D</var>. If these generators were not yet stored in <var class="Arg">D</var> then <var class="Arg">D</var> must know <em>some</em> generators if <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> shall have a chance to compute the desired result; for example, monoid generators of a group can be computed from known group generators (and vice versa). Note that several notions of generation may be meaningful for a given domain, so it makes no sense to ask for "the generators of a domain". Further note that the generators may depend on other information about <var class="Arg">D</var>. For example the generators of a vector space depend on the underlying field of scalars; the vector space generators of a vector space over the field with four elements need not generate the same vector space when this is viewed as a space over the field with two elements.</p>
<p><code class="code"><var class="Arg">Struct</var>ByGenerators( [<var class="Arg">info</var>, ]<var class="Arg">gens</var> )</code></p>
<p>Domain construction from generators <var class="Arg">gens</var> is implemented by operations <code class="code"><var class="Arg">Struct</var>ByGenerators</code>, which are called by the simple functions <var class="Arg">Struct</var>; methods can be installed only for the operations. Note that additional information <var class="Arg">info</var> may be necessary to construct the domain; for example, a vector space needs the underlying field of scalars in addition to the list of vector space generators. The <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> value of the returned domain need <em>not</em> be equal to <var class="Arg">gens</var>. But if a domain <var class="Arg">D</var> is printed as <code class="code"><var class="Arg">Struct</var>([<var class="Arg">a</var>, <var class="Arg">b</var>, ...])</code> and if there is an attribute <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> then the list <code class="code">GeneratorsOf<var class="Arg">Struct</var>( <var class="Arg">D</var> )</code> is guaranteed to be equal to <code class="code">[ <var class="Arg">a</var>, <var class="Arg">b</var>, ... ]</code>.</p>
<p><code class="code"><var class="Arg">Struct</var>WithGenerators( [<var class="Arg">info</var>, ]<var class="Arg">gens</var> )</code></p>
<p>The only difference between <code class="code"><var class="Arg">Struct</var>ByGenerators</code> and <code class="code"><var class="Arg">Struct</var>WithGenerators</code> is that the latter guarantees that the <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> value of the result is equal to the given generators <var class="Arg">gens</var>.</p>
<p><code class="code">Closure<var class="Arg">Struct</var>( <var class="Arg">D</var>, <var class="Arg">obj</var> )</code></p>
<p>For constructing a domain as the closure of a given domain with an element or another domain, one can use the operation <code class="code">Closure<var class="Arg">Struct</var></code>. It returns the smallest domain with operational structure corresponding to <var class="Arg">Struct</var> that contains <var class="Arg">D</var> as a subset and <var class="Arg">obj</var> as an element.</p>
<p><a id="X7EA77DE17DD8A231" name="X7EA77DE17DD8A231"></a></p>
<h4>31.4 <span class="Heading">Changing the Structure</span></h4>
<p>The same set of elements can have different operational structures. For example, it may happen that a monoid <span class="SimpleMath">M</span> does in fact contain the inverses of all of its elements; if <span class="SimpleMath">M</span> has not been constructed as a group (see <a href="chap31.html#X7D72F11B82F4A036"><span class="RefLink">31.6</span></a>) then it is reasonable to ask for the group that is equal to <span class="SimpleMath">M</span>.</p>
<p><code class="code">As<var class="Arg">Struct</var>( [<var class="Arg">info</var>, ]<var class="Arg">D</var> )</code></p>
<p>If <var class="Arg">D</var> is a domain that is closed under the operational structure given by <var class="Arg">Struct</var> then <code class="code">As<var class="Arg">Struct</var></code> returns a domain <var class="Arg">E</var> that consists of the same elements (that is, <code class="code"><var class="Arg">D</var> = <var class="Arg">E</var></code>) and that has this operational structure (that is, <code class="code">Is<var class="Arg">Struct</var>( <var class="Arg">E</var> )</code> is <code class="keyw">true</code>); if <var class="Arg">D</var> is not closed under the structure given by <var class="Arg">Struct</var> then <code class="code">As<var class="Arg">Struct</var></code> returns <code class="keyw">fail</code>.</p>
<p>If additional information besides generators are necessary to define <var class="Arg">D</var> then the argument <var class="Arg">info</var> describes the value of this information for the desired domain. For example, if we want to view <var class="Arg">D</var> as a vector space over the field with two elements then we may call <code class="code">AsVectorSpace( GF(2), <var class="Arg">D</var> )</code>; this allows us to change the underlying field of scalars, for example if <var class="Arg">D</var> is a vector space over the field with four elements. Again, if <var class="Arg">D</var> is not equal to a domain with the desired structure and additional information then <code class="keyw">fail</code> is returned.</p>
<p>In the case that no additional information <var class="Arg">info</var> is related to the structure given by <var class="Arg">Struct</var>, the operation <code class="code">As<var class="Arg">Struct</var></code> is in fact an attribute (see <a href="chap13.html#X7C701DBF7BAE649A"><span class="RefLink">13.5</span></a>).</p>
<p>See the index of the <strong class="pkg">GAP</strong> Reference Manual for an overview of the available <code class="code">As<var class="Arg">Struct</var></code> functions.</p>
<p><a id="X860FCCBE7A41412F" name="X860FCCBE7A41412F"></a></p>
<h4>31.5 <span class="Heading">Changing the Representation</span></h4>
<p>Often it is useful to answer questions about a domain via computations in a different but isomorphic domain. In the sense that this approach keeps the structure and changes the underlying set of elements, it can be viewed as a counterpart of keeping the set of elements and changing its structure (see <a href="chap31.html#X7EA77DE17DD8A231"><span class="RefLink">31.4</span></a>).</p>
<p>One reason for doing so can be that computations with the elements in the given domain are not very efficient. For example, if one is given a solvable matrix group (see Chapter <a href="chap44.html#X7CF51CB48610A07D"><span class="RefLink">44</span></a>) then one can compute an isomorphism to a polycyclicly presented group <span class="SimpleMath">G</span>, say (see Chapter <a href="chap45.html#X86007B0083F60470"><span class="RefLink">45</span></a>); the multiplication of two matrices –which is essentially determined by the dimension of the matrices– is much more expensive than the multiplication of two elements in <span class="SimpleMath">G</span> –which is essentially determined by the composition length of <span class="SimpleMath">G</span>.</p>
<p><code class="code">Isomorphism<var class="Arg">Rep</var><var class="Arg">Struct</var>( <var class="Arg">D</var> )</code></p>
<p>If <var class="Arg">D</var> is a domain that is closed under the operational structure given by <var class="Arg">Struct</var> then <code class="code">Isomorphism<var class="Arg">Rep</var><var class="Arg">Struct</var></code> returns a mapping <var class="Arg">hom</var> from <var class="Arg">D</var> to a domain <span class="SimpleMath">E</span> having structure given by <var class="Arg">Struct</var>, such that <var class="Arg">hom</var> respects the structure <var class="Arg">Struct</var> and <var class="Arg">Rep</var> describes the representation of the elements in <span class="SimpleMath">E</span>. If no domain <span class="SimpleMath">E</span> with the required properties exists then <code class="keyw">fail</code> is returned.</p>
<p>For example, <code class="func">IsomorphismPermGroup</code> (<a href="chap43.html#X80B7B1C783AA1567"><span class="RefLink">43.3-1</span></a>) takes a group as its argument and returns a group homomorphism (see <a href="chap40.html#X83702FC27B3C3098"><span class="RefLink">40</span></a>) onto an isomorphic permutation group (see Chapter <a href="chap43.html#X85ED46007CED6191"><span class="RefLink">43</span></a>) provided the original group is finite; for infinite groups, <code class="func">IsomorphismPermGroup</code> (<a href="chap43.html#X80B7B1C783AA1567"><span class="RefLink">43.3-1</span></a>) returns <code class="keyw">fail</code>. Similarly, <code class="func">IsomorphismPcGroup</code> (<a href="chap46.html#X873CEB137BA1CD6E"><span class="RefLink">46.5-2</span></a>) returns a group homomorphism from its argument to a polycyclicly presented group (see <a href="chap46.html#X7EAD57C97EBF7E67"><span class="RefLink">46</span></a>) if the argument is polycyclic, and <code class="keyw">fail</code> otherwise.</p>
<p>See the index of the <strong class="pkg">GAP</strong> Reference Manual for an overview of the available <code class="code">Isomorphism<var class="Arg">Rep</var><var class="Arg">Struct</var></code> functions.</p>
<p><a id="X7D72F11B82F4A036" name="X7D72F11B82F4A036"></a></p>
<h4>31.6 <span class="Heading">Domain Categories</span></h4>
<p>As mentioned in <a href="chap31.html#X859C7AB97B34F55F"><span class="RefLink">31.1</span></a>, the operational structure of a domain is fixed when the domain is constructed. For example, if <var class="Arg">D</var> was constructed by <code class="func">Monoid</code> (<a href="chap52.html#X7F95328B7C7E49EA"><span class="RefLink">52.1-2</span></a>) then <var class="Arg">D</var> is in general not regarded as a group in <strong class="pkg">GAP</strong>, even if <var class="Arg">D</var> is in fact closed under taking inverses. In this case, <code class="func">IsGroup</code> (<a href="chap39.html#X7939B3177BBD61E4"><span class="RefLink">39.2-7</span></a>) returns <code class="keyw">false</code> for <var class="Arg">D</var>. The operational structure determines which operations are applicable for a domain, so for example <code class="func">SylowSubgroup</code> (<a href="chap39.html#X7AA351308787544C"><span class="RefLink">39.13-1</span></a>) is not defined for <var class="Arg">D</var> and therefore will signal an error.</p>
<p><code class="code">Is<var class="Arg">Struct</var>( <var class="Arg">D</var> )</code></p>
<p>The functions <code class="code">Is<var class="Arg">Struct</var></code> implement the tests whether a domain <var class="Arg">D</var> has the respective operational structure (upon construction). <code class="code">Is<var class="Arg">Struct</var></code> is a filter (see <a href="chap13.html#X7E8202627B421DB1"><span class="RefLink">13</span></a>) that involves certain categories (see <a href="chap13.html#X7CC6903E78F24167"><span class="RefLink">13.3</span></a>) and usually also certain properties (see <a href="chap13.html#X871597447BB998A1"><span class="RefLink">13.7</span></a>). For example, <code class="func">IsGroup</code> (<a href="chap39.html#X7939B3177BBD61E4"><span class="RefLink">39.2-7</span></a>) is equivalent to <code class="code">IsMagmaWithInverses and IsAssociative</code>, the first being a category and the second being a property.</p>
<p>Implications between domain categories describe the hierarchy of operational structures available in <strong class="pkg">GAP</strong>. Here are some typical examples.</p>
<ul>
<li><p><code class="func">IsDomain</code> (<a href="chap31.html#X86B4AC017FAF4D12"><span class="RefLink">31.9-1</span></a>) is implied by each domain category,</p>
</li>
<li><p><code class="func">IsMagma</code> (<a href="chap35.html#X87D3F38B7EAB13FA"><span class="RefLink">35.1-1</span></a>) is implied by each category that describes the closure under multiplication <code class="code">*</code>,</p>
</li>
<li><p><code class="func">IsAdditiveMagma</code> (<a href="chap55.html#X8565FD0C847BAA3A"><span class="RefLink">55.1-4</span></a>) is implied by each category that describes the closure under addition <code class="code">+</code>,</p>
</li>
<li><p><code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>) implies <code class="func">IsMagma</code> (<a href="chap35.html#X87D3F38B7EAB13FA"><span class="RefLink">35.1-1</span></a>); a <em>magma-with-one</em> is a magma such that each element (and thus also the magma itself) can be asked for its zeroth power,</p>
</li>
<li><p><code class="func">IsMagmaWithInverses</code> (<a href="chap35.html#X82CBFF648574B830"><span class="RefLink">35.1-4</span></a>) implies <code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>); a <em>magma-with-inverses</em> is a magma such that each element can be asked for its inverse; important special cases are <em>groups</em>, which in addition are associative,</p>
</li>
<li><p>a <em>ring</em> is a magma that is also an additive group,</p>
</li>
<li><p>a <em>ring-with-one</em> is a ring that is also a magma-with-one,</p>
</li>
<li><p>a <em>division ring</em> is a ring-with-one that is also closed under taking inverses of nonzero elements,</p>
</li>
<li><p>a <em>field</em> is a commutative division ring.</p>
</li>
</ul>
<p>Each operational structure <var class="Arg">Struct</var> has associated with it a domain category <code class="code">Is<var class="Arg">Struct</var></code>, and operations <code class="code"><var class="Arg">Struct</var>ByGenerators</code> for constructing a domain from generators, <code class="code">GeneratorsOf<var class="Arg">Struct</var></code> for storing and accessing generators w.r.t. this structure, <code class="code">Closure<var class="Arg">Struct</var></code> for forming the closure, and <code class="code">As<var class="Arg">Struct</var></code> for getting a domain with the desired structure from one with weaker operational structure and for testing whether a given domain can be regarded as a domain with <var class="Arg">Struct</var>.</p>
<p>The functions applicable to domains with the various structures are described in the corresponding chapters of the Reference Manual. For example, functions for rings, fields, groups, and vector spaces are described in Chapters <a href="chap56.html#X81897F6082CACB59"><span class="RefLink">56</span></a>, <a href="chap58.html#X80A8E676814A19FD"><span class="RefLink">58</span></a>, <a href="chap39.html#X8716635F7951801B"><span class="RefLink">39</span></a>, and <a href="chap61.html#X7DAD6700787EC845"><span class="RefLink">61</span></a>, respectively. More general functions for arbitrary collections can be found in Chapter <a href="chap30.html#X8050A8037984E5B6"><span class="RefLink">30</span></a>.</p>
<p><a id="X7CBDD36E7B7BE286" name="X7CBDD36E7B7BE286"></a></p>
<h4>31.7 <span class="Heading">Parents</span></h4>
<p><a id="X7BC856CC7F116BB0" name="X7BC856CC7F116BB0"></a></p>
<h5>31.7-1 Parent</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Parent</code>( <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">‣ SetParent</code>( <var class="Arg">D</var>, <var class="Arg">P</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">‣ HasParent</code>( <var class="Arg">D</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>It is possible to assign to a domain <var class="Arg">D</var> one other domain <var class="Arg">P</var> containing <var class="Arg">D</var> as a subset, in order to exploit this subset relation between <var class="Arg">D</var> and <var class="Arg">P</var>. Note that <var class="Arg">P</var> need not have the same operational structure as <var class="Arg">D</var>, for example <var class="Arg">P</var> may be a magma and <var class="Arg">D</var> a field.</p>
<p>The assignment is done by calling <code class="func">SetParent</code>, and <var class="Arg">P</var> is called the <em>parent</em> of <var class="Arg">D</var>. If <var class="Arg">D</var> has already a parent, calls to <code class="func">SetParent</code> will be ignored.</p>
<p>If <var class="Arg">D</var> has a parent <var class="Arg">P</var> –this can be checked with <code class="func">HasParent</code>– then <var class="Arg">P</var> can be used to gain information about <var class="Arg">D</var>. First, the call of <code class="func">SetParent</code> causes <code class="func">UseSubsetRelation</code> (<a href="chap31.html#X7C03098C838ADE40"><span class="RefLink">31.13-1</span></a>) to be called. Second, for a domain <var class="Arg">D</var> with parent, information relative to the parent can be stored in <var class="Arg">D</var>; for example, there is an attribute <code class="code">NormalizerInParent</code> for storing <code class="code">Normalizer( <var class="Arg">P</var>, <var class="Arg">D</var> )</code> in the case that <var class="Arg">D</var> is a group. (More about such parent dependent attributes can be found in <a href="chap85.html#X78D4D0FF780C8A85"><span class="RefLink">85.2</span></a>.) Note that because of this relative information, one cannot change the parent; that is, one can set the parent only once, subsequent calls to <code class="func">SetParent</code> for the same domain <var class="Arg">D</var> are ignored. Further note that contrary to <code class="func">UseSubsetRelation</code> (<a href="chap31.html#X7C03098C838ADE40"><span class="RefLink">31.13-1</span></a>), also knowledge about the parent <var class="Arg">P</var> might be used that is discovered after the <code class="func">SetParent</code> call.</p>
<p>A stored parent can be accessed using <code class="func">Parent</code>. If <var class="Arg">D</var> has no parent then <code class="func">Parent</code> returns <var class="Arg">D</var> itself, and <code class="func">HasParent</code> will return <code class="keyw">false</code> also after a call to <code class="func">Parent</code>. So <code class="func">Parent</code> is <em>not</em> an attribute, the underlying attribute to store the parent is <code class="code">ParentAttr</code>.</p>
<p>Certain functions that return domains with parent already set, for example <code class="func">Subgroup</code> (<a href="chap39.html#X7C82AA387A42DCA0"><span class="RefLink">39.3-1</span></a>), are described in Section <a href="chap31.html#X7B58FDEF80338DD6"><span class="RefLink">31.8</span></a>. Whenever a function has this property, the <strong class="pkg">GAP</strong> Reference Manual states this explicitly. Note that these functions <em>do not guarantee</em> a certain parent, for example <code class="func">DerivedSubgroup</code> (<a href="chap39.html#X7CC17CF179ED7EF2"><span class="RefLink">39.12-3</span></a>) for a perfect group <span class="SimpleMath">G</span> may return <span class="SimpleMath">G</span> itself, and if <span class="SimpleMath">G</span> had already a parent then this is not replaced by <span class="SimpleMath">G</span>. As a rule of thumb, <strong class="pkg">GAP</strong> avoids to set a domain as its own parent, which is consistent with the behaviour of <code class="func">Parent</code>, at least until a parent is set explicitly with <code class="func">SetParent</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:= Group( (1,2,3), (1,2) );; h:= Group( (1,2) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">HasParent( g ); HasParent( h );</span>
false
false
<span class="GAPprompt">gap></span> <span class="GAPinput">SetParent( h, g );</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Parent( g ); Parent( h );</span>
Group([ (1,2,3), (1,2) ])
Group([ (1,2,3), (1,2) ])
<span class="GAPprompt">gap></span> <span class="GAPinput">HasParent( g ); HasParent( h );</span>
false
true
</pre></div>
<p><a id="X7B58FDEF80338DD6" name="X7B58FDEF80338DD6"></a></p>
<h4>31.8 <span class="Heading">Constructing Subdomains</span></h4>
<p>For many domains <var class="Arg">D</var>, there are functions that construct certain subsets <var class="Arg">S</var> of <var class="Arg">D</var> as domains with parent (see <a href="chap31.html#X7CBDD36E7B7BE286"><span class="RefLink">31.7</span></a>) already set to <var class="Arg">D</var>. For example, if <var class="Arg">G</var> is a group that contains the elements in the list <var class="Arg">gens</var> then <code class="code">Subgroup( <var class="Arg">G</var>, <var class="Arg">gens</var> )</code> returns a group <var class="Arg">S</var> that is generated by the elements in <var class="Arg">gens</var> and with <code class="code">Parent( <var class="Arg">S</var> ) = <var class="Arg">G</var></code>.</p>
<p><code class="code">Sub<var class="Arg">struct</var>( <var class="Arg">D</var>, <var class="Arg">gens</var> )</code></p>
<p>More general, if <var class="Arg">D</var> is a domain whose algebraic structure is given by the function <var class="Arg">Struct</var> (for example <code class="code">Group</code>, <code class="code">Algebra</code>, <code class="code">Field</code>) then the function <code class="code">Sub<var class="Arg">struct</var></code> (for example <code class="code">Subgroup</code>, <code class="code">Subalgebra</code>, <code class="code">Subfield</code>) returns domains with structure <var class="Arg">Struct</var> and parent set to the first argument.</p>
<p><code class="code">Sub<var class="Arg">struct</var>NC( <var class="Arg">D</var>, <var class="Arg">gens</var> )</code></p>
<p>Each function <code class="code">Sub<var class="Arg">struct</var></code> checks that the <var class="Arg">Struct</var> generated by <var class="Arg">gens</var> is in fact a subset of <var class="Arg">D</var>. If one wants to omit this check then one can call <code class="code">Sub<var class="Arg">struct</var>NC</code> instead; the suffix <code class="code">NC</code> stands for "no check".</p>
<p><code class="code">AsSub<var class="Arg">struct</var>( <var class="Arg">D</var>, <var class="Arg">S</var> )</code></p>
<p>first constructs <code class="code">As<var class="Arg">Struct</var>( [<var class="Arg">info</var>, ]<var class="Arg">S</var> )</code>, where <var class="Arg">info</var> depends on <var class="Arg">D</var> and <var class="Arg">S</var>, and then sets the parent (see <a href="chap31.html#X7CBDD36E7B7BE286"><span class="RefLink">31.7</span></a>) of this new domain to <var class="Arg">D</var>.</p>
<p><code class="code">IsSub<var class="Arg">struct</var>( <var class="Arg">D</var>, <var class="Arg">S</var> )</code></p>
<p>There is no real need for functions that check whether a domain <var class="Arg">S</var> is a <code class="code">Sub<var class="Arg">struct</var></code> of a domain <var class="Arg">D</var>, since this is equivalent to the checks whether <var class="Arg">S</var> is a <var class="Arg">Struct</var> and <var class="Arg">S</var> is a subset of <var class="Arg">D</var>. Note that in many cases, only the subset relation is what one really wants to check, and that appropriate methods for the operation <code class="func">IsSubset</code> (<a href="chap30.html#X79CA175481F8105F"><span class="RefLink">30.5-1</span></a>) are available for many special situations, such as the test whether a group is contained in another group, where only generators need to be checked.</p>
<p>If a function <code class="code">IsSub<var class="Arg">struct</var></code> is available in <strong class="pkg">GAP</strong> then it is implemented as first a call to <code class="code">Is<var class="Arg">Struct</var></code> for the second argument and then a call to <code class="func">IsSubset</code> (<a href="chap30.html#X79CA175481F8105F"><span class="RefLink">30.5-1</span></a>) for the two arguments.</p>
<p><a id="X86D579707B112970" name="X86D579707B112970"></a></p>
<h4>31.9 <span class="Heading">Operations for Domains</span></h4>
<p>For the meaning of the attributes <code class="func">Characteristic</code> (<a href="chap31.html#X81278E53800BF64D"><span class="RefLink">31.10-1</span></a>), <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>), <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>) in the case of a domain argument, see <a href="chap31.html#X7C2B0C1280237CB0"><span class="RefLink">31.10</span></a>.</p>
<p><a id="X86B4AC017FAF4D12" name="X86B4AC017FAF4D12"></a></p>
<h5>31.9-1 IsGeneralizedDomain</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsGeneralizedDomain</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">‣ IsDomain</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>For some purposes, it is useful to deal with objects that are similar to domains but that are not collections in the sense of <strong class="pkg">GAP</strong> because their elements may lie in different families; such objects are called <em>generalized domains</em>. An instance of generalized domains are "operation domains", for example any <span class="SimpleMath">G</span>-set for a permutation group <span class="SimpleMath">G</span> consisting of some union of points, sets of points, sets of sets of points etc., under a suitable action.</p>
<p><code class="func">IsDomain</code> is a synonym for <code class="code">IsGeneralizedDomain and IsCollection</code>.</p>
<p><a id="X7E353DD1838AB223" name="X7E353DD1838AB223"></a></p>
<h5>31.9-2 GeneratorsOfDomain</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ GeneratorsOfDomain</code>( <var class="Arg">D</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>For a domain <var class="Arg">D</var>, <code class="func">GeneratorsOfDomain</code> returns a list containing all elements of <var class="Arg">D</var>, perhaps with repetitions. Note that if the domain <var class="Arg">D</var> shall be generated by a list of some elements w.r.t. the empty operational structure (see <a href="chap31.html#X859C7AB97B34F55F"><span class="RefLink">31.1</span></a>), the only possible choice of elements is to take all elements of <var class="Arg">D</var>. See <a href="chap31.html#X82039A218274826F"><span class="RefLink">31.3</span></a> and <a href="chap31.html#X7EA77DE17DD8A231"><span class="RefLink">31.4</span></a> for concepts of other notions of generation.</p>
<p>For many domains that have <em>natural generators by construction</em> (for example, the natural generators of a free group of rank two are the two generators stored as value of the attribute <code class="func">GeneratorsOfGroup</code> (<a href="chap39.html#X79C44528864044C5"><span class="RefLink">39.2-4</span></a>), and the natural generators of a free associative algebra are those generators stored as value of the attribute <code class="func">GeneratorsOfAlgebra</code> (<a href="chap62.html#X83B055F37EBF2438"><span class="RefLink">62.9-1</span></a>)), each <em>natural</em> generator can be accessed using the <code class="code">.</code> operator. For a domain <var class="Arg">D</var>, <code class="code"><var class="Arg">D</var>.i</code> returns the <span class="SimpleMath">i</span>-th generator if <span class="SimpleMath">i</span> is a positive integer, and if <code class="code">name</code> is the name of a generator of <var class="Arg">D</var> then <code class="code"><var class="Arg">D</var>.name</code> returns this generator.</p>
<p><a id="X826A21287FD3ACC0" name="X826A21287FD3ACC0"></a></p>
<h5>31.9-3 Domain</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Domain</code>( [<var class="Arg">Fam</var>, ]<var class="Arg">generators</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">‣ DomainByGenerators</code>( <var class="Arg">Fam</var>, <var class="Arg">generators</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">Domain</code> returns the domain consisting of the elements in the homogeneous list <var class="Arg">generators</var>. If <var class="Arg">generators</var> is empty then a family <var class="Arg">Fam</var> must be entered as the first argument, and the returned (empty) domain lies in the collections family of <var class="Arg">Fam</var>.</p>
<p><code class="func">DomainByGenerators</code> is the operation called by <code class="func">Domain</code>.</p>
<p><a id="X7C2B0C1280237CB0" name="X7C2B0C1280237CB0"></a></p>
<h4>31.10 <span class="Heading">Attributes and Properties of Elements</span></h4>
<p>The following attributes and properties for elements and domains correspond to the operational structure.</p>
<p><a id="X81278E53800BF64D" name="X81278E53800BF64D"></a></p>
<h5>31.10-1 Characteristic</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Characteristic</code>( <var class="Arg">obj</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p><code class="func">Characteristic</code> returns the <em>characteristic</em> of <var class="Arg">obj</var>.</p>
<p>If <var class="Arg">obj</var> is a family, all of whose elements lie in <code class="func">IsAdditiveElementWithZero</code> (<a href="chap31.html#X87F3552A789C572D"><span class="RefLink">31.14-5</span></a>) then its characteristic is the least positive integer <span class="SimpleMath">n</span>, if any, such that <code class="code">IsZero(n*x)</code> is <code class="keyw">true</code> for all <code class="code">x</code> in the family <var class="Arg">obj</var>, otherwise it is <span class="SimpleMath">0</span>.</p>
<p>If <var class="Arg">obj</var> is a collections family of a family <span class="SimpleMath">g</span> which has a characteristic, then the characteristic of <var class="Arg">obj</var> is the same as the characteristic of <span class="SimpleMath">g</span>.</p>
<p>For other families <var class="Arg">obj</var> the characteristic is not defined and <code class="keyw">fail</code> will be returned.</p>
<p>For any object <var class="Arg">obj</var> which is in the filter <code class="func">IsAdditiveElementWithZero</code> (<a href="chap31.html#X87F3552A789C572D"><span class="RefLink">31.14-5</span></a>) or in the filter <code class="func">IsAdditiveMagmaWithZero</code> (<a href="chap55.html#X785B41A67D791783"><span class="RefLink">55.1-5</span></a>) the characteristic of <var class="Arg">obj</var> is the same as the characteristic of its family if that is defined and undefined otherwise.</p>
<p>For all other objects <var class="Arg">obj</var> the characteristic is undefined and may return <code class="keyw">fail</code> or a "no method found" error.</p>
<p><a id="X8046262384895B2A" name="X8046262384895B2A"></a></p>
<h5>31.10-2 OneImmutable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ OneImmutable</code>( <var class="Arg">obj</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">‣ OneAttr</code>( <var class="Arg">obj</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">‣ One</code>( <var class="Arg">obj</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">‣ Identity</code>( <var class="Arg">obj</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">‣ OneMutable</code>( <var class="Arg">obj</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">‣ OneOp</code>( <var class="Arg">obj</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">‣ OneSameMutability</code>( <var class="Arg">obj</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">‣ OneSM</code>( <var class="Arg">obj</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">OneImmutable</code>, <code class="func">OneMutable</code>, and <code class="func">OneSameMutability</code> return the multiplicative neutral element of the multiplicative element <var class="Arg">obj</var>.</p>
<p>They differ only w.r.t. the mutability of the result. <code class="func">OneImmutable</code> is an attribute and hence returns an immutable result. <code class="func">OneMutable</code> is guaranteed to return a new <em>mutable</em> object whenever a mutable version of the required element exists in <strong class="pkg">GAP</strong> (see <code class="func">IsCopyable</code> (<a href="chap12.html#X811EFD727EBD1ADC"><span class="RefLink">12.6-1</span></a>)). <code class="func">OneSameMutability</code> returns a result that is mutable if <var class="Arg">obj</var> is mutable and if a mutable version of the required element exists in <strong class="pkg">GAP</strong>; for lists, it returns a result of the same immutability level as the argument. For instance, if the argument is a mutable matrix with immutable rows, it returns a similar object.</p>
<p>If <var class="Arg">obj</var> is a multiplicative element then <code class="code">OneSameMutability( <var class="Arg">obj</var> )</code> is equivalent to <code class="code"><var class="Arg">obj</var>^0</code>.</p>
<p><code class="func">OneAttr</code>, <code class="func">One</code> and <code class="func">Identity</code> are synonyms of <code class="code">OneImmutable</code>. <code class="func">OneSM</code> is a synonym of <code class="func">OneSameMutability</code>. <code class="func">OneOp</code> is a synonym of <code class="func">OneMutable</code>.</p>
<p>If <var class="Arg">obj</var> is a domain or a family then <code class="func">One</code> is defined as the identity element of all elements in <var class="Arg">obj</var>, provided that all these elements have the same identity. For example, the family of all cyclotomics has the identity element <code class="code">1</code>, but a collections family (see <code class="func">CollectionsFamily</code> (<a href="chap30.html#X84E5A67E87D8DD66"><span class="RefLink">30.2-1</span></a>)) may contain matrices of all dimensions and then it cannot have a unique identity element. Note that <code class="func">One</code> is applicable to a domain only if it is a magma-with-one (see <code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>)); use <code class="func">MultiplicativeNeutralElement</code> (<a href="chap35.html#X7EE2EA5F7EB7FEC2"><span class="RefLink">35.4-10</span></a>) otherwise.</p>
<p>The identity of an object need not be distinct from its zero, so for example a ring consisting of a single element can be regarded as a ring-with-one (see <a href="chap56.html#X81897F6082CACB59"><span class="RefLink">56</span></a>). This is particularly useful in the case of finitely presented algebras, where any factor of a free algebra-with-one is again an algebra-with-one, no matter whether or not it is a zero algebra.</p>
<p>The default method of <code class="func">One</code> for multiplicative elements calls <code class="func">OneMutable</code> (note that methods for <code class="func">OneMutable</code> must <em>not</em> delegate to <code class="func">One</code>); so other methods to compute identity elements need to be installed only for <code class="func">OneOp</code> and (in the case of copyable objects) <code class="func">OneSameMutability</code>.</p>
<p>For domains, <code class="func">One</code> may call <code class="func">Representative</code> (<a href="chap30.html#X865507568182424E"><span class="RefLink">30.4-7</span></a>), but <code class="func">Representative</code> (<a href="chap30.html#X865507568182424E"><span class="RefLink">30.4-7</span></a>) is allowed to fetch the identity of a domain <var class="Arg">D</var> only if <code class="code">HasOne( <var class="Arg">D</var> )</code> is <code class="keyw">true</code>.</p>
<p><a id="X8040AC7A79FFC442" name="X8040AC7A79FFC442"></a></p>
<h5>31.10-3 ZeroImmutable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ZeroImmutable</code>( <var class="Arg">obj</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">‣ ZeroAttr</code>( <var class="Arg">obj</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">‣ Zero</code>( <var class="Arg">obj</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">‣ ZeroMutable</code>( <var class="Arg">obj</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">‣ ZeroOp</code>( <var class="Arg">obj</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">‣ ZeroSameMutability</code>( <var class="Arg">obj</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">‣ ZeroSM</code>( <var class="Arg">obj</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">ZeroImmutable</code>, <code class="func">ZeroMutable</code>, and <code class="func">ZeroSameMutability</code> all return the additive neutral element of the additive element <var class="Arg">obj</var>.</p>
<p>They differ only w.r.t. the mutability of the result. <code class="func">ZeroImmutable</code> is an attribute and hence returns an immutable result. <code class="func">ZeroMutable</code> is guaranteed to return a new <em>mutable</em> object whenever a mutable version of the required element exists in <strong class="pkg">GAP</strong> (see <code class="func">IsCopyable</code> (<a href="chap12.html#X811EFD727EBD1ADC"><span class="RefLink">12.6-1</span></a>)). <code class="func">ZeroSameMutability</code> returns a result that is mutable if <var class="Arg">obj</var> is mutable and if a mutable version of the required element exists in <strong class="pkg">GAP</strong>; for lists, it returns a result of the same immutability level as the argument. For instance, if the argument is a mutable matrix with immutable rows, it returns a similar object.</p>
<p><code class="code">ZeroSameMutability( <var class="Arg">obj</var> )</code> is equivalent to <code class="code">0 * <var class="Arg">obj</var></code>.</p>
<p><code class="func">ZeroAttr</code> and <code class="func">Zero</code> are synonyms of <code class="func">ZeroImmutable</code>. <code class="func">ZeroSM</code> is a synonym of <code class="func">ZeroSameMutability</code>. <code class="func">ZeroOp</code> is a synonym of <code class="func">ZeroMutable</code>.</p>
<p>If <var class="Arg">obj</var> is a domain or a family then <code class="func">Zero</code> is defined as the zero element of all elements in <var class="Arg">obj</var>, provided that all these elements have the same zero. For example, the family of all cyclotomics has the zero element <code class="code">0</code>, but a collections family (see <code class="func">CollectionsFamily</code> (<a href="chap30.html#X84E5A67E87D8DD66"><span class="RefLink">30.2-1</span></a>)) may contain matrices of all dimensions and then it cannot have a unique zero element. Note that <code class="func">Zero</code> is applicable to a domain only if it is an additive magma-with-zero (see <code class="func">IsAdditiveMagmaWithZero</code> (<a href="chap55.html#X785B41A67D791783"><span class="RefLink">55.1-5</span></a>)); use <code class="func">AdditiveNeutralElement</code> (<a href="chap55.html#X851EA2E67F0C9A75"><span class="RefLink">55.3-5</span></a>) otherwise.</p>
<p>The default method of <code class="func">Zero</code> for additive elements calls <code class="func">ZeroMutable</code> (note that methods for <code class="func">ZeroMutable</code> must <em>not</em> delegate to <code class="func">Zero</code>); so other methods to compute zero elements need to be installed only for <code class="func">ZeroMutable</code> and (in the case of copyable objects) <code class="func">ZeroSameMutability</code>.</p>
<p>For domains, <code class="func">Zero</code> may call <code class="func">Representative</code> (<a href="chap30.html#X865507568182424E"><span class="RefLink">30.4-7</span></a>), but <code class="func">Representative</code> (<a href="chap30.html#X865507568182424E"><span class="RefLink">30.4-7</span></a>) is allowed to fetch the zero of a domain <var class="Arg">D</var> only if <code class="code">HasZero( <var class="Arg">D</var> )</code> is <code class="keyw">true</code>.</p>
<p><a id="X86DEB543824C40EB" name="X86DEB543824C40EB"></a></p>
<h5>31.10-4 MultiplicativeZeroOp</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MultiplicativeZeroOp</code>( <var class="Arg">elt</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>for an element <var class="Arg">elt</var> in the category <code class="func">IsMultiplicativeElementWithZero</code> (<a href="chap31.html#X8703BFC2841BBD63"><span class="RefLink">31.14-12</span></a>), returns the element <span class="SimpleMath">z</span> in the family <span class="SimpleMath">F</span> of <var class="Arg">elt</var> with the property that <span class="SimpleMath">z * m = z = m * z</span> holds for all <span class="SimpleMath">m ∈ F</span>, if such an element is known.</p>
<p>Families of elements in the category <code class="func">IsMultiplicativeElementWithZero</code> (<a href="chap31.html#X8703BFC2841BBD63"><span class="RefLink">31.14-12</span></a>) often arise from adjoining a new zero to an existing magma. See <code class="func">InjectionZeroMagma</code> (<a href="chap35.html#X8620878D7FD98823"><span class="RefLink">35.2-12</span></a>) for details.</p>
<p><a id="X814D78347858EC13" name="X814D78347858EC13"></a></p>
<h5>31.10-5 IsOne</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsOne</code>( <var class="Arg">elm</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if <code class="code"><var class="Arg">elm</var> = One( <var class="Arg">elm</var> )</code>, and <code class="keyw">false</code> otherwise.</p>
<p><a id="X82BDA47282F9BBA7" name="X82BDA47282F9BBA7"></a></p>
<h5>31.10-6 IsZero</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsZero</code>( <var class="Arg">elm</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>is <code class="keyw">true</code> if <code class="code"><var class="Arg">elm</var> = Zero( <var class="Arg">elm</var> )</code>, and <code class="keyw">false</code> otherwise.</p>
<p><a id="X7CB5896082D29173" name="X7CB5896082D29173"></a></p>
<h5>31.10-7 IsIdempotent</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsIdempotent</code>( <var class="Arg">elt</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>returns <code class="keyw">true</code> iff <var class="Arg">elt</var> is its own square. (Even if <code class="func">IsZero</code> (<a href="chap31.html#X82BDA47282F9BBA7"><span class="RefLink">31.10-6</span></a>) returns <code class="keyw">true</code> for <var class="Arg">elt</var>.)</p>
<p><a id="X78EE524E83624057" name="X78EE524E83624057"></a></p>
<h5>31.10-8 InverseImmutable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InverseImmutable</code>( <var class="Arg">elm</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">‣ InverseAttr</code>( <var class="Arg">elm</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">‣ Inverse</code>( <var class="Arg">elm</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">‣ InverseMutable</code>( <var class="Arg">elm</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">‣ InverseOp</code>( <var class="Arg">elm</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">‣ InverseSameMutability</code>( <var class="Arg">elm</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">‣ InverseSM</code>( <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">InverseImmutable</code>, <code class="func">InverseMutable</code>, and <code class="func">InverseSameMutability</code> all return the multiplicative inverse of an element <var class="Arg">elm</var>, that is, an element <var class="Arg">inv</var> such that <code class="code"><var class="Arg">elm</var> * <var class="Arg">inv</var> = <var class="Arg">inv</var> * <var class="Arg">elm</var> = One( <var class="Arg">elm</var> )</code> holds; if <var class="Arg">elm</var> is not invertible then <code class="keyw">fail</code> (see <a href="chap20.html#X85E648AA8414F303"><span class="RefLink">20.2</span></a>) is returned.</p>
<p>Note that the above definition implies that a (general) mapping is invertible in the sense of <code class="func">Inverse</code> only if its source equals its range (see <a href="chap32.html#X7D6F78587C00CDD0"><span class="RefLink">32.14</span></a>). For a bijective mapping <span class="SimpleMath">f</span> whose source and range differ, <code class="func">InverseGeneralMapping</code> (<a href="chap32.html#X865FC25A87D36F3D"><span class="RefLink">32.2-3</span></a>) can be used to construct a mapping <span class="SimpleMath">g</span> with the property that <span class="SimpleMath">f</span> <code class="code">*</code> <span class="SimpleMath">g</span> is the identity mapping on the source of <span class="SimpleMath">f</span> and <span class="SimpleMath">g</span> <code class="code">*</code> <span class="SimpleMath">f</span> is the identity mapping on the range of <span class="SimpleMath">f</span>.</p>
<p>The operations differ only w.r.t. the mutability of the result. <code class="func">InverseImmutable</code> is an attribute and hence returns an immutable result. <code class="func">InverseMutable</code> is guaranteed to return a new <em>mutable</em> object whenever a mutable version of the required element exists in <strong class="pkg">GAP</strong>. <code class="func">InverseSameMutability</code> returns a result that is mutable if <var class="Arg">elm</var> is mutable and if a mutable version of the required element exists in <strong class="pkg">GAP</strong>; for lists, it returns a result of the same immutability level as the argument. For instance, if the argument is a mutable matrix with immutable rows, it returns a similar object.</p>
<p><code class="code">InverseSameMutability( <var class="Arg">elm</var> )</code> is equivalent to <code class="code"><var class="Arg">elm</var>^-1</code>.</p>
<p><code class="func">InverseAttr</code> and <code class="func">Inverse</code> are synonyms of <code class="func">InverseImmutable</code>. <code class="func">InverseSM</code> is a synonym of <code class="func">InverseSameMutability</code>. <code class="func">InverseOp</code> is a synonym of <code class="func">InverseMutable</code>.</p>
<p>The default method of <code class="func">InverseImmutable</code> calls <code class="func">InverseMutable</code> (note that methods for <code class="func">InverseMutable</code> must <em>not</em> delegate to <code class="func">InverseImmutable</code>); other methods to compute inverses need to be installed only for <code class="func">InverseMutable</code> and (in the case of copyable objects) <code class="func">InverseSameMutability</code>.</p>
<p><a id="X84BB723C81D55D63" name="X84BB723C81D55D63"></a></p>
<h5>31.10-9 AdditiveInverseImmutable</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AdditiveInverseImmutable</code>( <var class="Arg">elm</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">‣ AdditiveInverseAttr</code>( <var class="Arg">elm</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">‣ AdditiveInverse</code>( <var class="Arg">elm</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">‣ AdditiveInverseMutable</code>( <var class="Arg">elm</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">‣ AdditiveInverseOp</code>( <var class="Arg">elm</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">‣ AdditiveInverseSameMutability</code>( <var class="Arg">elm</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">‣ AdditiveInverseSM</code>( <var class="Arg">elm</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">AdditiveInverseImmutable</code>, <code class="func">AdditiveInverseMutable</code>, and <code class="func">AdditiveInverseSameMutability</code> all return the additive inverse of <var class="Arg">elm</var>.</p>
<p>They differ only w.r.t. the mutability of the result. <code class="func">AdditiveInverseImmutable</code> is an attribute and hence returns an immutable result. <code class="func">AdditiveInverseMutable</code> is guaranteed to return a new <em>mutable</em> object whenever a mutable version of the required element exists in <strong class="pkg">GAP</strong> (see <code class="func">IsCopyable</code> (<a href="chap12.html#X811EFD727EBD1ADC"><span class="RefLink">12.6-1</span></a>)). <code class="func">AdditiveInverseSameMutability</code> returns a result that is mutable if <var class="Arg">elm</var> is mutable and if a mutable version of the required element exists in <strong class="pkg">GAP</strong>; for lists, it returns a result of the same immutability level as the argument. For instance, if the argument is a mutable matrix with immutable rows, it returns a similar object.</p>
<p><code class="code">AdditiveInverseSameMutability( <var class="Arg">elm</var> )</code> is equivalent to <code class="code">-<var class="Arg">elm</var></code>.</p>
<p><code class="func">AdditiveInverseAttr</code> and <code class="func">AdditiveInverse</code> are synonyms of <code class="func">AdditiveInverseImmutable</code>. <code class="func">AdditiveInverseSM</code> is a synonym of <code class="func">AdditiveInverseSameMutability</code>. <code class="func">AdditiveInverseOp</code> is a synonym of <code class="func">AdditiveInverseMutable</code>.</p>
<p>The default method of <code class="func">AdditiveInverse</code> calls <code class="func">AdditiveInverseMutable</code> (note that methods for <code class="func">AdditiveInverseMutable</code> must <em>not</em> delegate to <code class="func">AdditiveInverse</code>); so other methods to compute additive inverses need to be installed only for <code class="func">AdditiveInverseMutable</code> and (in the case of copyable objects) <code class="func">AdditiveInverseSameMutability</code>.</p>
<p><a id="X84F59A2687C62763" name="X84F59A2687C62763"></a></p>
<h5>31.10-10 Order</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Order</code>( <var class="Arg">elm</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>is the multiplicative order of <var class="Arg">elm</var>. This is the smallest positive integer <span class="SimpleMath">n</span> such that <var class="Arg">elm</var> <code class="code">^</code> <span class="SimpleMath">n</span> <code class="code">= One( <var class="Arg">elm</var> )</code> if such an integer exists. If the order is infinite, <code class="func">Order</code> may return the value <code class="func">infinity</code> (<a href="chap18.html#X8511B8DF83324C27"><span class="RefLink">18.2-1</span></a>), but it also might run into an infinite loop trying to test the order.</p>
<p><a id="X7B3BC7BA7BB2646D" name="X7B3BC7BA7BB2646D"></a></p>
<h4>31.11 <span class="Heading">Comparison Operations for Elements</span></h4>
<p>Binary comparison operations have been introduced already in <a href="chap4.html#X7A274A1F8553B7E6"><span class="RefLink">4.12</span></a>. The underlying operations for which methods can be installed are the following.</p>
<p><a id="X7EF67D047F03CA6F" name="X7EF67D047F03CA6F"></a></p>
<h5>31.11-1 <span class="Heading">\= and \<</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \=</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</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">‣ \<</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Note that the comparisons via <code class="code"><></code>, <code class="code"><=</code>, <code class="code">></code>, and <code class="code">>=</code> are delegated to the operations <code class="func">\=</code> and <code class="func">\<</code>.</p>
<p>In general, objects in <em>different</em> families cannot be compared with <code class="func">\<</code>. For the reason and for exceptions from this rule, see <a href="chap4.html#X7A274A1F8553B7E6"><span class="RefLink">4.12</span></a>.</p>
<p><a id="X7EFE013B8634D214" name="X7EFE013B8634D214"></a></p>
<h5>31.11-2 CanEasilyCompareElements</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CanEasilyCompareElements</code>( <var class="Arg">obj</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CanEasilyCompareElementsFamily</code>( <var class="Arg">fam</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">‣ CanEasilySortElements</code>( <var class="Arg">obj</var> )</td><td class="tdright">( property )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CanEasilySortElementsFamily</code>( <var class="Arg">fam</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>For some objects a "normal form" is hard to compute and thus equality of elements of a domain might be expensive to test. Therefore <strong class="pkg">GAP</strong> provides a (slightly technical) property with which an algorithm can test whether an efficient equality test is available for elements of a certain kind.</p>
<p><code class="func">CanEasilyCompareElements</code> indicates whether the elements in the family <var class="Arg">fam</var> of <var class="Arg">obj</var> can be easily compared with <code class="func">\=</code> (<a href="chap31.html#X7EF67D047F03CA6F"><span class="RefLink">31.11-1</span></a>).</p>
<p>The default method for this property is to ask the family of <var class="Arg">obj</var>, the default method for the family is to return <code class="keyw">false</code>.</p>
<p>The ability to compare elements may depend on the successful computation of certain information. (For example for finitely presented groups it might depend on the knowledge of a faithful permutation representation.) This information might change over time and thus it might not be a good idea to store a value <code class="keyw">false</code> too early in a family. Instead the function <code class="func">CanEasilyCompareElementsFamily</code> should be called for the family of <var class="Arg">obj</var> which returns <code class="keyw">false</code> if the value of <code class="func">CanEasilyCompareElements</code> is not known for the family without computing it. (This is in fact what the above mentioned family dispatch does.)</p>
<p>If a family knows ab initio that it can compare elements this property should be set as implied filter <em>and</em> filter for the family (the 3rd and 4th argument of <code class="func">NewFamily</code> (<a href="chap79.html#X7FB4123E7E22137D"><span class="RefLink">79.6-1</span></a>) respectively). This guarantees that code which directly asks the family gets a right answer.</p>
<p>The property <code class="func">CanEasilySortElements</code> and the function <code class="func">CanEasilySortElementsFamily</code> behave exactly in the same way, except that they indicate that objects can be compared via <code class="func">\<</code> (<a href="chap31.html#X7EF67D047F03CA6F"><span class="RefLink">31.11-1</span></a>). This property implies <code class="func">CanEasilyCompareElements</code>, as the ordering must be total.</p>
<p><a id="X7A2914307963E370" name="X7A2914307963E370"></a></p>
<h4>31.12 <span class="Heading">Arithmetic Operations for Elements</span></h4>
<p><em>Binary</em> arithmetic operations have been introduced already in <a href="chap4.html#X7B66C8707B5DE10A"><span class="RefLink">4.13</span></a>. The underlying operations for which methods can be installed are the following.</p>
<p><a id="X8481C9B97B214C23" name="X8481C9B97B214C23"></a></p>
<h5>31.12-1 <span class="Heading">\+, \*, \/, \^, \mod</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ \+</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</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">‣ \*</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</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">‣ \/</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</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">‣ \^</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</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">‣ \mod</code>( <var class="Arg">left-expr</var>, <var class="Arg">right-expr</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>For details about special methods for <code class="func">\*</code>, <code class="func">\/</code>, <code class="func">\^</code> and <code class="func">\mod</code>, consult the appropriate index entries for them.</p>
<p><a id="X7A37082878DB3930" name="X7A37082878DB3930"></a></p>
<h5>31.12-2 LeftQuotient</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LeftQuotient</code>( <var class="Arg">elm1</var>, <var class="Arg">elm2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns the product <code class="code"><var class="Arg">elm1</var>^(-1) * <var class="Arg">elm2</var></code>. For some types of objects (for example permutations) this product can be evaluated more efficiently than by first inverting <var class="Arg">elm1</var> and then forming the product with <var class="Arg">elm2</var>.</p>
<p><a id="X80761843831B468E" name="X80761843831B468E"></a></p>
<h5>31.12-3 Comm</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Comm</code>( <var class="Arg">elm1</var>, <var class="Arg">elm2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns the <em>commutator</em> of <var class="Arg">elm1</var> and <var class="Arg">elm2</var>. The commutator is defined as the product <span class="SimpleMath"><var class="Arg">elm1</var>^{-1} * <var class="Arg">elm2</var>^{-1} * <var class="Arg">elm1</var> * <var class="Arg">elm2</var></span>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">a:= (1,3)(4,6);; b:= (1,6,5,4,3,2);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Comm( a, b );</span>
(1,5,3)(2,6,4)
<span class="GAPprompt">gap></span> <span class="GAPinput">LeftQuotient( a, b );</span>
(1,2)(3,6)(4,5)
</pre></div>
<p><a id="X86A62A937A42B82E" name="X86A62A937A42B82E"></a></p>
<h5>31.12-4 LieBracket</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LieBracket</code>( <var class="Arg">elm1</var>, <var class="Arg">elm2</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>returns the element <code class="code"><var class="Arg">elm1</var> * <var class="Arg">elm2</var> - <var class="Arg">elm2</var> * <var class="Arg">elm1</var></code>.</p>
<p>The addition <code class="func">\+</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) is assumed to be associative but <em>not</em> assumed to be commutative (see <code class="func">IsAdditivelyCommutative</code> (<a href="chap55.html#X82D471327A9CA960"><span class="RefLink">55.3-1</span></a>)). The multiplication <code class="func">\*</code> (<a href="chap31.html#X8481C9B97B214C23"><span class="RefLink">31.12-1</span></a>) is <em>not</em> assumed to be commutative or associative (see <code class="func">IsCommutative</code> (<a href="chap35.html#X830A4A4C795FBC2D"><span class="RefLink">35.4-9</span></a>), <code class="func">IsAssociative</code> (<a href="chap35.html#X7C83B5A47FD18FB7"><span class="RefLink">35.4-7</span></a>)).</p>
<p><a id="X7E8F1FB87C229BB0" name="X7E8F1FB87C229BB0"></a></p>
<h5>31.12-5 Sqrt</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Sqrt</code>( <var class="Arg">obj</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><code class="func">Sqrt</code> returns a square root of <var class="Arg">obj</var>, that is, an object <span class="SimpleMath">x</span> with the property that <span class="SimpleMath">x ⋅ x = <var class="Arg">obj</var></span> holds. If such an <span class="SimpleMath">x</span> is not unique then the choice of <span class="SimpleMath">x</span> depends on the type of <var class="Arg">obj</var>. For example, <code class="func">ER</code> (<a href="chap18.html#X813CF4327C4B4D29"><span class="RefLink">18.4-2</span></a>) is the <code class="func">Sqrt</code> method for rationals (see <code class="func">IsRat</code> (<a href="chap17.html#X7ED018F5794935F7"><span class="RefLink">17.2-1</span></a>)).</p>
<p><a id="X80A2D8A7874B268B" name="X80A2D8A7874B268B"></a></p>
<h4>31.13 <span class="Heading">Relations Between Domains</span></h4>
<p>Domains are often constructed relative to other domains. The probably most usual case is to form a <em>subset</em> of a domain, for example the intersection (see <code class="func">Intersection</code> (<a href="chap30.html#X851069107CACF98E"><span class="RefLink">30.5-2</span></a>)) of two domains, or a Sylow subgroup of a given group (see <code class="func">SylowSubgroup</code> (<a href="chap39.html#X7AA351308787544C"><span class="RefLink">39.13-1</span></a>)).</p>
<p>In such a situation, the new domain can gain knowledge by exploiting that several attributes are maintained under taking subsets. For example, the intersection of an arbitrary domain with a finite domain is clearly finite, a Sylow subgroup of an abelian group is abelian, too, and so on.</p>
<p>Since usually the new domain has access to the knowledge of the old domain(s) only when it is created (see <a href="chap31.html#X7B58FDEF80338DD6"><span class="RefLink">31.8</span></a> for the exception), this is the right moment to take advantage of the subset relation, using <code class="func">UseSubsetRelation</code> (<a href="chap31.html#X7C03098C838ADE40"><span class="RefLink">31.13-1</span></a>).</p>
<p>Analogous relations occur when a <em>factor structure</em> is created from a domain and a subset (see <code class="func">UseFactorRelation</code> (<a href="chap31.html#X78039B628262BFA8"><span class="RefLink">31.13-2</span></a>)), and when a domain <em>isomorphic</em> to a given one is created (see <code class="func">UseIsomorphismRelation</code> (<a href="chap31.html#X839BE6467E8474D9"><span class="RefLink">31.13-3</span></a>)).</p>
<p>The functions <code class="func">InstallSubsetMaintenance</code> (<a href="chap31.html#X863C35007C7AA914"><span class="RefLink">31.13-4</span></a>), <code class="func">InstallIsomorphismMaintenance</code> (<a href="chap31.html#X79F97F0F78D89186"><span class="RefLink">31.13-6</span></a>), and <code class="func">InstallFactorMaintenance</code> (<a href="chap31.html#X7BB7EE5078EF6F47"><span class="RefLink">31.13-5</span></a>) are used to tell <strong class="pkg">GAP</strong> under what conditions an attribute is maintained under taking subsets, or forming factor structures or isomorphic domains. This is used only when a new attribute is created, see <a href="chap79.html#X7A38E7E87CCCEDD1"><span class="RefLink">79.3</span></a>. For the attributes already available, such as <code class="func">IsFinite</code> (<a href="chap30.html#X808A4061809A6E67"><span class="RefLink">30.4-2</span></a>) and <code class="func">IsCommutative</code> (<a href="chap35.html#X830A4A4C795FBC2D"><span class="RefLink">35.4-9</span></a>), the maintenances are already notified.</p>
<p><a id="X7C03098C838ADE40" name="X7C03098C838ADE40"></a></p>
<h5>31.13-1 UseSubsetRelation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UseSubsetRelation</code>( <var class="Arg">super</var>, <var class="Arg">sub</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Methods for this operation transfer possibly useful information from the domain <var class="Arg">super</var> to its subset <var class="Arg">sub</var>, and vice versa.</p>
<p><code class="func">UseSubsetRelation</code> is designed to be called automatically whenever substructures of domains are constructed. So the methods must be <em>cheap</em>, and the requirements should be as sharp as possible!</p>
<p>To achieve that <em>all</em> applicable methods are executed, all methods for this operation except the default method must end with <code class="code">TryNextMethod()</code>. This default method deals with the information that is available by the calls of <code class="func">InstallSubsetMaintenance</code> (<a href="chap31.html#X863C35007C7AA914"><span class="RefLink">31.13-4</span></a>) in the <strong class="pkg">GAP</strong> library.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:= Group( (1,2), (3,4), (5,6) );; h:= Group( (1,2), (3,4) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsAbelian( g ); HasIsAbelian( h );</span>
true
false
<span class="GAPprompt">gap></span> <span class="GAPinput">UseSubsetRelation( g, h );; HasIsAbelian( h ); IsAbelian( h );</span>
true
true
</pre></div>
<p><a id="X78039B628262BFA8" name="X78039B628262BFA8"></a></p>
<h5>31.13-2 UseFactorRelation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UseFactorRelation</code>( <var class="Arg">numer</var>, <var class="Arg">denom</var>, <var class="Arg">factor</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Methods for this operation transfer possibly useful information from the domain <var class="Arg">numer</var> or its subset <var class="Arg">denom</var> to the domain <var class="Arg">factor</var> that is isomorphic to the factor of <var class="Arg">numer</var> by <var class="Arg">denom</var>, and vice versa. <var class="Arg">denom</var> may be <code class="keyw">fail</code>, for example if <var class="Arg">factor</var> is just known to be a factor of <var class="Arg">numer</var> but <var class="Arg">denom</var> is not available as a <strong class="pkg">GAP</strong> object; in this case those factor relations are used that are installed without special requirements for <var class="Arg">denom</var>.</p>
<p><code class="func">UseFactorRelation</code> is designed to be called automatically whenever factor structures of domains are constructed. So the methods must be <em>cheap</em>, and the requirements should be as sharp as possible!</p>
<p>To achieve that <em>all</em> applicable methods are executed, all methods for this operation except the default method must end with a call to <code class="func">TryNextMethod</code> (<a href="chap78.html#X7EED949B83046A7F"><span class="RefLink">78.4-1</span></a>). This default method deals with the information that is available by the calls of <code class="func">InstallFactorMaintenance</code> (<a href="chap31.html#X7BB7EE5078EF6F47"><span class="RefLink">31.13-5</span></a>) in the <strong class="pkg">GAP</strong> library.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:= Group( (1,2,3,4), (1,2) );; h:= Group( (1,2,3), (1,2) );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsSolvableGroup( g ); HasIsSolvableGroup( h );</span>
true
false
<span class="GAPprompt">gap></span> <span class="GAPinput">UseFactorRelation(g, Subgroup( g, [ (1,2)(3,4), (1,3)(2,4) ] ), h);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">HasIsSolvableGroup( h ); IsSolvableGroup( h );</span>
true
true
</pre></div>
<p><a id="X839BE6467E8474D9" name="X839BE6467E8474D9"></a></p>
<h5>31.13-3 UseIsomorphismRelation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UseIsomorphismRelation</code>( <var class="Arg">old</var>, <var class="Arg">new</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Methods for this operation transfer possibly useful information from the domain <var class="Arg">old</var> to the isomorphic domain <var class="Arg">new</var>.</p>
<p><code class="func">UseIsomorphismRelation</code> is designed to be called automatically whenever isomorphic structures of domains are constructed. So the methods must be <em>cheap</em>, and the requirements should be as sharp as possible!</p>
<p>To achieve that <em>all</em> applicable methods are executed, all methods for this operation except the default method must end with a call to <code class="func">TryNextMethod</code> (<a href="chap78.html#X7EED949B83046A7F"><span class="RefLink">78.4-1</span></a>). This default method deals with the information that is available by the calls of <code class="func">InstallIsomorphismMaintenance</code> (<a href="chap31.html#X79F97F0F78D89186"><span class="RefLink">31.13-6</span></a>) in the <strong class="pkg">GAP</strong> library.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:= Group( (1,2) );; h:= Group( [ [ -1 ] ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Size( g ); HasSize( h );</span>
2
false
<span class="GAPprompt">gap></span> <span class="GAPinput">UseIsomorphismRelation( g, h );; HasSize( h ); Size( h );</span>
true
2
</pre></div>
<p><a id="X863C35007C7AA914" name="X863C35007C7AA914"></a></p>
<h5>31.13-4 InstallSubsetMaintenance</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InstallSubsetMaintenance</code>( <var class="Arg">opr</var>, <var class="Arg">super_req</var>, <var class="Arg">sub_req</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><var class="Arg">opr</var> must be a property or an attribute. The call of <code class="func">InstallSubsetMaintenance</code> has the effect that for a domain <span class="SimpleMath">D</span> in the filter <var class="Arg">super_req</var>, and a domain <span class="SimpleMath">S</span> in the filter <var class="Arg">sub_req</var>, the call <code class="code">UseSubsetRelation</code><span class="SimpleMath">( D, S )</span> (see <code class="func">UseSubsetRelation</code> (<a href="chap31.html#X7C03098C838ADE40"><span class="RefLink">31.13-1</span></a>)) sets a known value of <var class="Arg">opr</var> for <span class="SimpleMath">D</span> as value of <var class="Arg">opr</var> also for <span class="SimpleMath">S</span>. A typical example for which <code class="func">InstallSubsetMaintenance</code> is applied is given by <var class="Arg">opr</var> <code class="code">= IsFinite</code>, <var class="Arg">super_req</var> <code class="code">= IsCollection and IsFinite</code>, and <var class="Arg">sub_req</var> <code class="code">= IsCollection</code>.</p>
<p>If <var class="Arg">opr</var> is a property and the filter <var class="Arg">super_req</var> lies in the filter <var class="Arg">opr</var> then we can use also the following inverse implication. If <span class="SimpleMath">D</span> is in the filter whose intersection with <var class="Arg">opr</var> is <var class="Arg">super_req</var> and if <span class="SimpleMath">S</span> is in the filter <var class="Arg">sub_req</var>, <span class="SimpleMath">S</span> is a subset of <span class="SimpleMath">D</span>, and the value of <var class="Arg">opr</var> for <span class="SimpleMath">S</span> is <code class="keyw">false</code> then the value of <var class="Arg">opr</var> for <span class="SimpleMath">D</span> is also <code class="keyw">false</code>.</p>
<p><a id="X7BB7EE5078EF6F47" name="X7BB7EE5078EF6F47"></a></p>
<h5>31.13-5 InstallFactorMaintenance</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InstallFactorMaintenance</code>( <var class="Arg">opr</var>, <var class="Arg">numer_req</var>, <var class="Arg">denom_req</var>, <var class="Arg">factor_req</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><var class="Arg">opr</var> must be a property or an attribute. The call of <code class="func">InstallFactorMaintenance</code> has the effect that for collections <span class="SimpleMath">N</span>, <span class="SimpleMath">D</span>, <span class="SimpleMath">F</span> in the filters <var class="Arg">numer_req</var>, <var class="Arg">denom_req</var>, and <var class="Arg">factor_req</var>, respectively, the call <code class="code">UseFactorRelation</code><span class="SimpleMath">( N, D, F )</span> (see <code class="func">UseFactorRelation</code> (<a href="chap31.html#X78039B628262BFA8"><span class="RefLink">31.13-2</span></a>)) sets a known value of <var class="Arg">opr</var> for <span class="SimpleMath">N</span> as value of <var class="Arg">opr</var> also for <span class="SimpleMath">F</span>. A typical example for which <code class="func">InstallFactorMaintenance</code> is applied is given by <var class="Arg">opr</var> <code class="code">= IsFinite</code>, <var class="Arg">numer_req</var> <code class="code">= IsCollection and IsFinite</code>, <var class="Arg">denom_req</var> <code class="code">= IsCollection</code>, and <var class="Arg">factor_req</var> <code class="code">= IsCollection</code>.</p>
<p>For the other direction, if <var class="Arg">numer_req</var> involves the filter <var class="Arg">opr</var> then a known <code class="keyw">false</code> value of <var class="Arg">opr</var> for <span class="SimpleMath">F</span> implies a <code class="keyw">false</code> value for <span class="SimpleMath">D</span> provided that <span class="SimpleMath">D</span> lies in the filter obtained from <var class="Arg">numer_req</var> by removing <var class="Arg">opr</var>.</p>
<p>Note that an implication of a factor relation holds in particular for the case of isomorphisms. So one need <em>not</em> install an isomorphism maintained method when a factor maintained method is already installed. For example, <code class="func">UseIsomorphismRelation</code> (<a href="chap31.html#X839BE6467E8474D9"><span class="RefLink">31.13-3</span></a>) will transfer a known <code class="func">IsFinite</code> (<a href="chap30.html#X808A4061809A6E67"><span class="RefLink">30.4-2</span></a>) value because of the installed factor maintained method.</p>
<p><a id="X79F97F0F78D89186" name="X79F97F0F78D89186"></a></p>
<h5>31.13-6 InstallIsomorphismMaintenance</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InstallIsomorphismMaintenance</code>( <var class="Arg">opr</var>, <var class="Arg">old_req</var>, <var class="Arg">new_req</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><var class="Arg">opr</var> must be a property or an attribute. The call of <code class="func">InstallIsomorphismMaintenance</code> has the effect that for a domain <span class="SimpleMath">D</span> in the filter <var class="Arg">old_req</var>, and a domain <span class="SimpleMath">E</span> in the filter <var class="Arg">new_req</var>, the call <code class="code">UseIsomorphismRelation</code><span class="SimpleMath">( D, E )</span> (see <code class="func">UseIsomorphismRelation</code> (<a href="chap31.html#X839BE6467E8474D9"><span class="RefLink">31.13-3</span></a>)) sets a known value of <var class="Arg">opr</var> for <span class="SimpleMath">D</span> as value of <var class="Arg">opr</var> also for <span class="SimpleMath">E</span>. A typical example for which <code class="func">InstallIsomorphismMaintenance</code> is applied is given by <var class="Arg">opr</var> <code class="code">= Size</code>, <var class="Arg">old_req</var> <code class="code">= IsCollection</code>, and <var class="Arg">new_req</var> <code class="code">= IsCollection</code>.</p>
<p><a id="X7B97A0307EA161E5" name="X7B97A0307EA161E5"></a></p>
<h4>31.14 <span class="Heading">Useful Categories of Elements</span></h4>
<p>This section and the following one are rather technical, and may be interesting only for those <strong class="pkg">GAP</strong> users who want to implement new kinds of elements.</p>
<p>It deals with certain categories of elements that are useful mainly for the design of elements, from the viewpoint that one wants to form certain domains of these elements. For example, a domain closed under multiplication <code class="code">*</code> (a so-called magma, see Chapter <a href="chap35.html#X873E502F7D21C39C"><span class="RefLink">35</span></a>) makes sense only if its elements can be multiplied, and the latter is indicated by the category <code class="func">IsMultiplicativeElement</code> (<a href="chap31.html#X797D3B2A7A2B2F53"><span class="RefLink">31.14-10</span></a>) for each element. Again note that the underlying idea is that a domain is regarded as <em>generated</em> by given elements, and that these elements carry information about the desired domain. For general information on categories and their hierarchies, see <a href="chap13.html#X7CC6903E78F24167"><span class="RefLink">13.3</span></a>.</p>
<p>More special categories of this kind are described in the contexts where they arise, they are <code class="func">IsRowVector</code> (<a href="chap23.html#X7DFB22A07836A7A9"><span class="RefLink">23.1-1</span></a>), <code class="func">IsMatrix</code> (<a href="chap24.html#X7E1AE46B862B185F"><span class="RefLink">24.2-1</span></a>), <code class="func">IsOrdinaryMatrix</code> (<a href="chap24.html#X7CF42B8A845BC6A9"><span class="RefLink">24.2-2</span></a>), and <code class="func">IsLieMatrix</code> (<a href="chap24.html#X86EC33E17DD12D0E"><span class="RefLink">24.2-3</span></a>).</p>
<p><a id="X7FBD4F65861C2DF2" name="X7FBD4F65861C2DF2"></a></p>
<h5>31.14-1 IsExtAElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsExtAElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>external additive element</em> is an object that can be added via <code class="code">+</code> with other elements (not necessarily in the same family, see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>).</p>
<p><a id="X7F346AA47AEC39AB" name="X7F346AA47AEC39AB"></a></p>
<h5>31.14-2 IsNearAdditiveElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNearAdditiveElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>near-additive element</em> is an object that can be added via <code class="code">+</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>); this addition is not necessarily commutative.</p>
<p><a id="X78D042B486E1D7F7" name="X78D042B486E1D7F7"></a></p>
<h5>31.14-3 IsAdditiveElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAdditiveElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>additive element</em> is an object that can be added via <code class="code">+</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>); this addition is commutative.</p>
<p><a id="X7CE2353F836F6E0A" name="X7CE2353F836F6E0A"></a></p>
<h5>31.14-4 IsNearAdditiveElementWithZero</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNearAdditiveElementWithZero</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>near-additive element-with-zero</em> is an object that can be added via <code class="code">+</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>), and that is an admissible argument for the operation <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>); this addition is not necessarily commutative.</p>
<p><a id="X87F3552A789C572D" name="X87F3552A789C572D"></a></p>
<h5>31.14-5 IsAdditiveElementWithZero</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAdditiveElementWithZero</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>additive element-with-zero</em> is an object that can be added via <code class="code">+</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>), and that is an admissible argument for the operation <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>); this addition is commutative.</p>
<p><a id="X84B0929982B51CB4" name="X84B0929982B51CB4"></a></p>
<h5>31.14-6 IsNearAdditiveElementWithInverse</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNearAdditiveElementWithInverse</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>near-additive element-with-inverse</em> is an object that can be added via <code class="code">+</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>), and that is an admissible argument for the operations <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>) and <code class="func">AdditiveInverse</code> (<a href="chap31.html#X84BB723C81D55D63"><span class="RefLink">31.10-9</span></a>); this addition is not necessarily commutative.</p>
<p><a id="X7C0E4AE883947778" name="X7C0E4AE883947778"></a></p>
<h5>31.14-7 IsAdditiveElementWithInverse</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAdditiveElementWithInverse</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>additive element-with-inverse</em> is an object that can be added via <code class="code">+</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>), and that is an admissible argument for the operations <code class="func">Zero</code> (<a href="chap31.html#X8040AC7A79FFC442"><span class="RefLink">31.10-3</span></a>) and <code class="func">AdditiveInverse</code> (<a href="chap31.html#X84BB723C81D55D63"><span class="RefLink">31.10-9</span></a>); this addition is commutative.</p>
<p><a id="X860D1E387DD5CCCF" name="X860D1E387DD5CCCF"></a></p>
<h5>31.14-8 IsExtLElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsExtLElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>external left element</em> is an object that can be multiplied from the left, via <code class="code">*</code>, with other elements (not necessarily in the same family, see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>).</p>
<p><a id="X809E0C097E480AF1" name="X809E0C097E480AF1"></a></p>
<h5>31.14-9 IsExtRElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsExtRElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An <em>external right element</em> is an object that can be multiplied from the right, via <code class="code">*</code>, with other elements (not necessarily in the same family, see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>).</p>
<p><a id="X797D3B2A7A2B2F53" name="X797D3B2A7A2B2F53"></a></p>
<h5>31.14-10 IsMultiplicativeElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMultiplicativeElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>multiplicative element</em> is an object that can be multiplied via <code class="code">*</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>).</p>
<p><a id="X82BC294F7D388AE8" name="X82BC294F7D388AE8"></a></p>
<h5>31.14-11 IsMultiplicativeElementWithOne</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMultiplicativeElementWithOne</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>multiplicative element-with-one</em> is an object that can be multiplied via <code class="code">*</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>), and that is an admissible argument for the operation <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>).</p>
<p><a id="X8703BFC2841BBD63" name="X8703BFC2841BBD63"></a></p>
<h5>31.14-12 IsMultiplicativeElementWithZero</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMultiplicativeElementWithZero</code>( <var class="Arg">elt</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Elements in a family which can be the operands of the <code class="code">*</code> and the operation MultiplicativeZero.</p>
<p><a id="X7FDB14E57814FA3B" name="X7FDB14E57814FA3B"></a></p>
<h5>31.14-13 IsMultiplicativeElementWithInverse</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMultiplicativeElementWithInverse</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>multiplicative element-with-inverse</em> is an object that can be multiplied via <code class="code">*</code> with elements in its family (see <a href="chap13.html#X846063757EC05986"><span class="RefLink">13.1</span></a>), and that is an admissible argument for the operations <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) and <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>). (Note the word "admissible": an object in this category does not necessarily have an inverse, <code class="func">Inverse</code> (<a href="chap31.html#X78EE524E83624057"><span class="RefLink">31.10-8</span></a>) may return <code class="keyw">fail</code>.)</p>
<p><a id="X802F34F280B29DF4" name="X802F34F280B29DF4"></a></p>
<h5>31.14-14 IsVector</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsVector</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>A <em>vector</em> is an additive-element-with-inverse that can be multiplied from the left and right with other objects (not necessarily of the same type). Examples are cyclotomics, finite field elements, and of course row vectors (see below).</p>
<p>Note that not all lists of ring elements are regarded as vectors, for example lists of matrices are not vectors. This is because although the category <code class="func">IsAdditiveElementWithInverse</code> (<a href="chap31.html#X7C0E4AE883947778"><span class="RefLink">31.14-7</span></a>) is implied by the meet of its collections category and <code class="func">IsList</code> (<a href="chap21.html#X7C4CC4EA8299701E"><span class="RefLink">21.1-1</span></a>), the family of a list entry may not imply <code class="func">IsAdditiveElementWithInverse</code> (<a href="chap31.html#X7C0E4AE883947778"><span class="RefLink">31.14-7</span></a>) for all its elements.</p>
<p><a id="X799AEDE180C31276" name="X799AEDE180C31276"></a></p>
<h5>31.14-15 IsNearRingElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNearRingElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsNearRingElement</code> is just a synonym for the meet of <code class="func">IsNearAdditiveElementWithInverse</code> (<a href="chap31.html#X84B0929982B51CB4"><span class="RefLink">31.14-6</span></a>) and <code class="func">IsMultiplicativeElement</code> (<a href="chap31.html#X797D3B2A7A2B2F53"><span class="RefLink">31.14-10</span></a>).</p>
<p><a id="X84BF40CA86C07361" name="X84BF40CA86C07361"></a></p>
<h5>31.14-16 IsRingElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingElement</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsRingElement</code> is just a synonym for the meet of <code class="func">IsAdditiveElementWithInverse</code> (<a href="chap31.html#X7C0E4AE883947778"><span class="RefLink">31.14-7</span></a>) and <code class="func">IsMultiplicativeElement</code> (<a href="chap31.html#X797D3B2A7A2B2F53"><span class="RefLink">31.14-10</span></a>).</p>
<p><a id="X7C724689784EEF3D" name="X7C724689784EEF3D"></a></p>
<h5>31.14-17 IsNearRingElementWithOne</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNearRingElementWithOne</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsNearRingElementWithOne</code> is just a synonym for the meet of <code class="func">IsNearAdditiveElementWithInverse</code> (<a href="chap31.html#X84B0929982B51CB4"><span class="RefLink">31.14-6</span></a>) and <code class="func">IsMultiplicativeElementWithOne</code> (<a href="chap31.html#X82BC294F7D388AE8"><span class="RefLink">31.14-11</span></a>).</p>
<p><a id="X875B67208017608E" name="X875B67208017608E"></a></p>
<h5>31.14-18 IsRingElementWithOne</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingElementWithOne</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsRingElementWithOne</code> is just a synonym for the meet of <code class="func">IsAdditiveElementWithInverse</code> (<a href="chap31.html#X7C0E4AE883947778"><span class="RefLink">31.14-7</span></a>) and <code class="func">IsMultiplicativeElementWithOne</code> (<a href="chap31.html#X82BC294F7D388AE8"><span class="RefLink">31.14-11</span></a>).</p>
<p><a id="X80CD04ED85B6B2F9" name="X80CD04ED85B6B2F9"></a></p>
<h5>31.14-19 IsNearRingElementWithInverse</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsNearRingElementWithInverse</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsNearRingElementWithInverse</code> is just a synonym for the meet of <code class="func">IsNearAdditiveElementWithInverse</code> (<a href="chap31.html#X84B0929982B51CB4"><span class="RefLink">31.14-6</span></a>) and <code class="func">IsMultiplicativeElementWithInverse</code> (<a href="chap31.html#X7FDB14E57814FA3B"><span class="RefLink">31.14-13</span></a>).</p>
<p><a id="X8113834E84FD0435" name="X8113834E84FD0435"></a></p>
<h5>31.14-20 IsRingElementWithInverse</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsRingElementWithInverse</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">‣ IsScalar</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p><code class="func">IsRingElementWithInverse</code> and <code class="func">IsScalar</code> are just synonyms for the meet of <code class="func">IsAdditiveElementWithInverse</code> (<a href="chap31.html#X7C0E4AE883947778"><span class="RefLink">31.14-7</span></a>) and <code class="func">IsMultiplicativeElementWithInverse</code> (<a href="chap31.html#X7FDB14E57814FA3B"><span class="RefLink">31.14-13</span></a>).</p>
<p><a id="X7ABEF00C870789D2" name="X7ABEF00C870789D2"></a></p>
<h4>31.15 <span class="Heading">Useful Categories for all Elements of a Family</span></h4>
<p>The following categories of elements are to be understood mainly as categories for all objects in a family, they are usually used as third argument of <code class="code">NewFamily</code> (see <a href="chap79.html#X8401A9367E8CAA37"><span class="RefLink">79.6</span></a>). The purpose of each of the following categories is then to guarantee that each collection of its elements automatically lies in its collections category (see <code class="func">CategoryCollections</code> (<a href="chap30.html#X78C38017804B2EA7"><span class="RefLink">30.2-4</span></a>)).</p>
<p>For example, the multiplication of permutations is associative, and it is stored in the family of permutations that each permutation lies in <code class="func">IsAssociativeElement</code> (<a href="chap31.html#X7979AFAA80FF795A"><span class="RefLink">31.15-1</span></a>). As a consequence, each magma consisting of permutations (more precisely: each collection that lies in the family <code class="code">CollectionsFamily( PermutationsFamily )</code>, see <code class="func">CollectionsFamily</code> (<a href="chap30.html#X84E5A67E87D8DD66"><span class="RefLink">30.2-1</span></a>)) automatically lies in <code class="code">CategoryCollections( IsAssociativeElement )</code>. A magma in this category is always known to be associative, via a logical implication (see <a href="chap78.html#X7FB5016E83DB4349"><span class="RefLink">78.7</span></a>).</p>
<p>Similarly, if a family knows that all its elements are in the categories <code class="func">IsJacobianElement</code> (<a href="chap31.html#X796957D0805A0221"><span class="RefLink">31.15-5</span></a>) and <code class="func">IsZeroSquaredElement</code> (<a href="chap31.html#X7844399D7847AB24"><span class="RefLink">31.15-6</span></a>), then each algebra of these elements is automatically known to be a Lie algebra (see Chapter <a href="chap62.html#X7DDBF6F47A2E021C"><span class="RefLink">62</span></a>).</p>
<p><a id="X7979AFAA80FF795A" name="X7979AFAA80FF795A"></a></p>
<h5>31.15-1 IsAssociativeElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAssociativeElement</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">‣ IsAssociativeElementCollection</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">‣ IsAssociativeElementCollColl</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An element <var class="Arg">obj</var> in the category <code class="func">IsAssociativeElement</code> knows that the multiplication of any elements in the family of <var class="Arg">obj</var> is associative. For example, all permutations lie in this category, as well as those ordinary matrices (see <code class="func">IsOrdinaryMatrix</code> (<a href="chap24.html#X7CF42B8A845BC6A9"><span class="RefLink">24.2-2</span></a>)) whose entries are also in <code class="func">IsAssociativeElement</code>.</p>
<p><a id="X78A286418205CE44" name="X78A286418205CE44"></a></p>
<h5>31.15-2 IsAdditivelyCommutativeElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsAdditivelyCommutativeElement</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">‣ IsAdditivelyCommutativeElementCollection</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">‣ IsAdditivelyCommutativeElementCollColl</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">‣ IsAdditivelyCommutativeElementFamily</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An element <var class="Arg">obj</var> in the category <code class="func">IsAdditivelyCommutativeElement</code> knows that the addition of any elements in the family of <var class="Arg">obj</var> is commutative. For example, each finite field element and each rational number lies in this category.</p>
<p><a id="X8137FA8D86714AC0" name="X8137FA8D86714AC0"></a></p>
<h5>31.15-3 IsCommutativeElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCommutativeElement</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">‣ IsCommutativeElementCollection</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">‣ IsCommutativeElementCollColl</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An element <var class="Arg">obj</var> in the category <code class="func">IsCommutativeElement</code> knows that the multiplication of any elements in the family of <var class="Arg">obj</var> is commutative. For example, each finite field element and each rational number lies in this category.</p>
<p><a id="X810D2E5E832594AA" name="X810D2E5E832594AA"></a></p>
<h5>31.15-4 IsFiniteOrderElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsFiniteOrderElement</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">‣ IsFiniteOrderElementCollection</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">‣ IsFiniteOrderElementCollColl</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An element <var class="Arg">obj</var> in the category <code class="func">IsFiniteOrderElement</code> knows that it has finite multiplicative order. For example, each finite field element and each permutation lies in this category. However the value may be <code class="keyw">false</code> even if <var class="Arg">obj</var> has finite order, but if this was not known when <var class="Arg">obj</var> was constructed.</p>
<p>Although it is legal to set this filter for any object with finite order, this is really useful only in the case that all elements of a family are known to have finite order.</p>
<p><a id="X796957D0805A0221" name="X796957D0805A0221"></a></p>
<h5>31.15-5 IsJacobianElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsJacobianElement</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">‣ IsJacobianElementCollection</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">‣ IsJacobianElementCollColl</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">‣ IsRestrictedJacobianElement</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">‣ IsRestrictedJacobianElementCollection</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">‣ IsRestrictedJacobianElementCollColl</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An element <var class="Arg">obj</var> in the category <code class="func">IsJacobianElement</code> knows that the multiplication of any elements in the family <span class="SimpleMath">F</span> of <var class="Arg">obj</var> satisfies the Jacobi identity, that is, <span class="SimpleMath">x * y * z + z * x * y + y * z * x</span> is zero for all <span class="SimpleMath">x</span>, <span class="SimpleMath">y</span>, <span class="SimpleMath">z</span> in <span class="SimpleMath">F</span>.</p>
<p>For example, each Lie matrix (see <code class="func">IsLieMatrix</code> (<a href="chap24.html#X86EC33E17DD12D0E"><span class="RefLink">24.2-3</span></a>)) lies in this category.</p>
<p><a id="X7844399D7847AB24" name="X7844399D7847AB24"></a></p>
<h5>31.15-6 IsZeroSquaredElement</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsZeroSquaredElement</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">‣ IsZeroSquaredElementCollection</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">‣ IsZeroSquaredElementCollColl</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>An element <var class="Arg">obj</var> in the category <code class="func">IsZeroSquaredElement</code> knows that <code class="code"><var class="Arg">obj</var>^2 = Zero( <var class="Arg">obj</var> )</code>. For example, each Lie matrix (see <code class="func">IsLieMatrix</code> (<a href="chap24.html#X86EC33E17DD12D0E"><span class="RefLink">24.2-3</span></a>)) lies in this category.</p>
<p>Although it is legal to set this filter for any zero squared object, this is really useful only in the case that all elements of a family are known to have square zero.</p>
<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap30.html">[Previous Chapter]</a> <a href="chap32.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>
|