/usr/share/gap/doc/ref/chap53.html is in gap-doc 4r7p5-2.
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 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | <?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 53: Transformations</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="chap53" 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="chap52.html">[Previous Chapter]</a> <a href="chap54.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap53_mj.html">[MathJax on]</a></p>
<p><a id="X860026B880BCB2A5" name="X860026B880BCB2A5"></a></p>
<div class="ChapSects"><a href="chap53.html#X860026B880BCB2A5">53 <span class="Heading">Transformations</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X7CF9291C7CC42340">53.1 <span class="Heading">The family and categories of transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7B6259467974FB70">53.1-1 IsTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7A6747CE85F2E6EA">53.1-2 IsTransformationCollection</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7E58AFA1832FF064">53.1-3 TransformationFamily</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X80F3086F87E93DF8">53.2 <span class="Heading">Creating transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X86ADBDE57A20E323">53.2-1 Transformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8040642687531E7F">53.2-2 Transformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7E82EBD68455EE4A">53.2-3 TransformationByImageAndKernel</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X85D1071484CE004C">53.2-4 Idempotent</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7C2A3FC9782F2099">53.2-5 TransformationOp</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7D6FCC417DE86CD1">53.2-6 TransformationNumber</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8475448F87E8CB8A">53.2-7 <span class="Heading">RandomTransformation</span></a>
</span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8268A58685BEFD6F">53.2-8 IdentityTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7F1E4B5184210D2B">53.2-9 ConstantTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X7F81A18B813C9DF0">53.3 <span class="Heading">Changing the representation of a transformation</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7C5360B2799943F3">53.3-1 AsTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X846A6F6B7B715188">53.3-2 RestrictedTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8708AE247F5B129B">53.3-3 PermutationOfImage</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X812CEC008609A8A2">53.4 <span class="Heading">Operators for transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X83DBA2A18719EFA8">53.4-1 PermLeftQuoTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8275DFAA8270BB59">53.4-2 IsInjectiveListTrans</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X834A313B7DAF06D5">53.4-3 ComponentTransformationInt</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X82F5DEEC837B60A3">53.4-4 PreImagesOfTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X86DE4F7A7C535820">53.5 <span class="Heading">Attributes for transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X78A209C87CF0E32B">53.5-1 DegreeOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7AEC9E6687B3505A">53.5-2 ImageListOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X839A6D6082A21D1F">53.5-3 ImageSetOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X818EBB167C7EA37B">53.5-4 RankOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X844F00F982D5BD3C">53.5-5 MovedPoints</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7FA6A4B57FDA003D">53.5-6 NrMovedPoints</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X86C0DDDC7881273A">53.5-7 SmallestMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8383A7727AC97724">53.5-8 LargestMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7CCFE27E83676572">53.5-9 SmallestImageOfMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7E7172567C3A3E63">53.5-10 LargestImageOfMovedPoint</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8083794579274E87">53.5-11 FlatKernelOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X80FCB5048789CF75">53.5-12 KernelOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X860306EB7FAAD2D4">53.5-13 InverseOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7BB9DB6E8558356D">53.5-14 Inverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X863216CB7AF88BED">53.5-15 IndexPeriodOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X85FE9F20810BCC70">53.5-16 SmallestIdempotentPower</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X858E944481F6B591">53.5-17 ComponentsOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X8640AE1C79201470">53.5-18 NrComponentsOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X784650B583CEAF7D">53.5-19 ComponentRepsOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7EAA15557D55D93B">53.5-20 CyclesOfTransformation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X786EB02A829260DB">53.5-21 CycleTransformationInt</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X845869E0815A6AA6">53.5-22 LeftOne</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7F19C9C77F9F8981">53.5-23 TrimTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X810D23017A5527B7">53.6 <span class="Heading">Displaying transformations</span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap53.html#X7B51CE257B814B09">53.7 <span class="Heading">Semigroups of transformations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7EAF835D7FE4026F">53.7-1 IsTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7EA699C687952544">53.7-2 DegreeOfTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X7D2B0685815B4053">53.7-3 FullTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X85C58E1E818C838C">53.7-4 IsFullTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X78F29C817CF6827F">53.7-5 IsomorphismTransformationSemigroup</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap53.html#X820ECE00846E480F">53.7-6 AntiIsomorphismTransformationSemigroup</a></span>
</div></div>
</div>
<h3>53 <span class="Heading">Transformations</span></h3>
<p>This chapter describes the functions in <strong class="pkg">GAP</strong> for transformations.</p>
<p>A <em>transformation</em> in <strong class="pkg">GAP</strong> is simply a function from the positive integers to the positive integers. Transformations are to semigroup theory what permutations are to group theory, in the sense that every semigroup can be realised as a semigroup of transformations. In <strong class="pkg">GAP</strong> transformation semigroups are always finite, and so only finite semigroups can be realised in this way.</p>
<p>A transformation in <strong class="pkg">GAP</strong> acts on the positive integers (up to some architecture dependent limit) on the right. The image of a point <code class="code">i</code> under a transformation <code class="code">f</code> is expressed as <code class="code">i^f</code> in <strong class="pkg">GAP</strong>. This action is also implemented by the function <code class="func">OnPoints</code> (<a href="chap41.html#X7FE417DD837987B4"><span class="RefLink">41.2-1</span></a>). If <code class="code">i^f</code> is different from <code class="code">i</code>, then <code class="code">i</code> is <em>moved</em> by <em>f</em> and otherwise it is <em>fixed</em> by <code class="code">f</code>. Transformations in <strong class="pkg">GAP</strong> are created using the operations described in Section <a href="chap53.html#X80F3086F87E93DF8"><span class="RefLink">53.2</span></a>.</p>
<p>The <em>degree</em> of a transformation <code class="code">f</code> is usually defined as the largest positive integer where <code class="code">f</code> is defined. In previous versions of <strong class="pkg">GAP</strong>, transformations were only defined on positive integers less than their degree, it was only possible to multiply transformations of equal degree, and a transformation did not act on any point exceeding its degree. Starting with version 4.7 of <strong class="pkg">GAP</strong>, transformations behave more like permutations, in that they fix unspecified points and it is possible to multiply arbitrary transformations; see Chapter <a href="chap42.html#X80F808307A2D5AB8"><span class="RefLink">42</span></a>. The definition of the degree of a transformation <code class="code">f</code> in the current version of <strong class="pkg">GAP</strong> is the largest value <code class="code">n</code> such that <code class="code">n^f<>n</code> or <code class="code">i^f=n</code> for some <code class="code">i<>n</code>. Equivalently, the degree of a transformation is the least value <code class="code">n</code> such that <code class="code">[n+1,n+2,...]</code> is fixed pointwise by <code class="code">f</code>.</p>
<p>The transformations of a given degree belong to the full transformation semigroup of that degree; see <code class="func">FullTransformationSemigroup</code> (<a href="chap53.html#X7D2B0685815B4053"><span class="RefLink">53.7-3</span></a>). Transformation semigroups are hence subsemigroups of the full transformation semigroup.</p>
<p>It is possible to use transformations in <strong class="pkg">GAP</strong> without reference to the degree, much as it is possible to use permutations in this way. However, for backwards compatibility, and because it is sometimes useful, it is possible to access the degree of a transformation using <code class="func">DegreeOfTransformation</code> (<a href="chap53.html#X78A209C87CF0E32B"><span class="RefLink">53.5-1</span></a>). Certain attributes of transformations are also calculated with respect to the degree, such as the rank, image set, or kernel (these values can also be calculated with respect to any positive integer). So, it is possible to ignore the degree of a transformation if you prefer to think of transformations as acting on the positive integers in a similar way to permutations. For example, this approach is used in the <strong class="pkg">FR</strong> package. It is also possible to think of transformations as only acting on the positive integers not exceeding their degree. For example, this was the approach formerly used in <strong class="pkg">GAP</strong> and it is also useful in the <strong class="pkg">Semigroups</strong> package.</p>
<p>Transformations are displayed, by default, using the list <code class="code">[1^f..n^f]</code> where <code class="code">n</code> is the degree of <code class="code">f</code>. This behaviour differs from versions of <strong class="pkg">GAP</strong> earlier than 4.7. See Section <a href="chap53.html#X810D23017A5527B7"><span class="RefLink">53.6</span></a> for more information.</p>
<p>The <em>rank</em> of a transformation on the positive integers up to <code class="code">n</code> is the number of distinct points in <code class="code">[1^f..n^f]</code>. The <em>kernel</em> of a transformation <code class="code">f</code> on <code class="code">[1..n]</code> is the equivalence relation on <code class="code">[1..n]</code> consisting of those <code class="code">(i, j)</code> such that <code class="code">i^f = j^f</code>. The kernel of a transformation is represented in two ways: as a partition of <code class="code">[1..n]</code> or as the image list of a transformation <code class="code">g</code> such that the kernel of <code class="code">g</code> on <code class="code">[1..n]</code> equals the kernel of <code class="code">f</code> and <code class="code">j^g=i</code> for all <code class="code">j</code> in <code class="code">i</code>th class. The latter is referred to as the flat kernel of <code class="code">f</code>. For any given transformation and value <code class="code">n</code>, there is a unique transformation with this property.</p>
<p>A <em>functional digraph</em> is a directed graph where every vertex has out-degree <span class="SimpleMath">1</span>. A transformation <var class="Arg">f</var> can be thought of as a functional digraph with vertices the positive integers and edges from <code class="code">i</code> to <code class="code">i^f</code> for every <code class="code">i</code>. A <em>component</em> of a transformation is defined as a component and a <em>cycle</em> is just a cycle (or strongly connected component) of the corresponding functional digraph. More specifically, <code class="code">i</code> and <code class="code">j</code> are in the same component if and only if there are <span class="SimpleMath">i=v_0, v_1, ..., v_n=j</span> such that either <span class="SimpleMath">v_k+1=v_k^f</span> or <span class="SimpleMath">v_k=v_k+1^f</span> for all <span class="SimpleMath">k</span>. A <em>cycle</em> of a transformation is defined as a cycle (or strongly connected component) of the corresponding functional digraph. More specifically, <code class="code">i</code> belongs to a cycle of <var class="Arg">f</var> if there are <span class="SimpleMath">i=v_0, v_1, ..., v_n=i</span> such that either <span class="SimpleMath">v_k+1=v_k^f</span> or <span class="SimpleMath">v_k=v_k+1^f</span> for all <span class="SimpleMath">k</span>.</p>
<p>Internally, <strong class="pkg">GAP</strong> stores a transformation <code class="code">f</code> as a list consisting of the images <code class="code">i^f</code> of the points in <code class="code">i</code> less than some value, which is at least the degree of <code class="code">f</code> and which is determined at the time of creation. When the degree of a transformation <code class="code">f</code> is at most 65536, the images of points under <code class="code">f</code> are stored as 16-bit integers, the kernel and image set are subobjects of <code class="code">f</code> which are plain lists of <strong class="pkg">GAP</strong> integers. When the degree of <code class="code">f</code> is greater than 65536, the images of points under <code class="code">f</code> are stored as 32-bit integers; the kernel and image set are stored in the same way as before. A transformation belongs to <code class="code">IsTrans2Rep</code> if it is stored using 16-bit integers and to <code class="code">IsTrans4Rep</code> if it is stored using 32-bit integers.</p>
<p><a id="X7CF9291C7CC42340" name="X7CF9291C7CC42340"></a></p>
<h4>53.1 <span class="Heading">The family and categories of transformations</span></h4>
<p><a id="X7B6259467974FB70" name="X7B6259467974FB70"></a></p>
<h5>53.1-1 IsTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTransformation</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Every transformation in <strong class="pkg">GAP</strong> belongs to the category <code class="code">IsTransformation</code>. Basic operations for transformations are <code class="func">ImageListOfTransformation</code> (<a href="chap53.html#X7AEC9E6687B3505A"><span class="RefLink">53.5-2</span></a>), <code class="func">ImageSetOfTransformation</code> (<a href="chap53.html#X839A6D6082A21D1F"><span class="RefLink">53.5-3</span></a>), <code class="func">KernelOfTransformation</code> (<a href="chap53.html#X80FCB5048789CF75"><span class="RefLink">53.5-12</span></a>), <code class="func">FlatKernelOfTransformation</code> (<a href="chap53.html#X8083794579274E87"><span class="RefLink">53.5-11</span></a>), <code class="func">RankOfTransformation</code> (<a href="chap53.html#X818EBB167C7EA37B"><span class="RefLink">53.5-4</span></a>), <code class="func">DegreeOfTransformation</code> (<a href="chap53.html#X78A209C87CF0E32B"><span class="RefLink">53.5-1</span></a>), multiplication of two transformations via <code class="keyw">*</code>, and exponentiation with the first argument a positive integer <code class="code">i</code> and second argument a transformation <code class="code">f</code> where the result is the image <code class="code">i^f</code> of the point <code class="code">i</code> under <code class="code">f</code>.</p>
<p><a id="X7A6747CE85F2E6EA" name="X7A6747CE85F2E6EA"></a></p>
<h5>53.1-2 IsTransformationCollection</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTransformationCollection</code>( <var class="Arg">obj</var> )</td><td class="tdright">( category )</td></tr></table></div>
<p>Every collection of transformations belongs to the category <code class="code">IsTransformationCollection</code>. For example, transformation semigroups belong to <code class="code">IsTransformationCollection</code>.</p>
<p><a id="X7E58AFA1832FF064" name="X7E58AFA1832FF064"></a></p>
<h5>53.1-3 TransformationFamily</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationFamily</code></td><td class="tdright">( family )</td></tr></table></div>
<p>The family of all transformations is <code class="code">TransformationFamily</code>.</p>
<p><a id="X80F3086F87E93DF8" name="X80F3086F87E93DF8"></a></p>
<h4>53.2 <span class="Heading">Creating transformations</span></h4>
<p>There are several ways of creating transformations in <strong class="pkg">GAP</strong>, which are described in this section.</p>
<p><a id="X86ADBDE57A20E323" name="X86ADBDE57A20E323"></a></p>
<h5>53.2-1 Transformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Transformation</code>( <var class="Arg">list</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">‣ Transformation</code>( <var class="Arg">list</var>, <var class="Arg">func</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">‣ TransformationList</code>( <var class="Arg">list</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>
<p><code class="code">TransformationList</code> returns the transformation <code class="code">f</code> such that <code class="code">i^<var class="Arg">f</var>=<var class="Arg">list</var>[i]</code> if <code class="code">i</code> is between <code class="code">1</code> and the length of <var class="Arg">list</var> and <code class="code">i^<var class="Arg">f</var>=i</code> if <code class="code">i</code> is larger than the length of <var class="Arg">list</var>. <code class="code">TransformationList</code> will return <code class="keyw">fail</code> if <var class="Arg">list</var> is not dense, if <var class="Arg">list</var> contains an element which is not a positive integer, or if <var class="Arg">list</var> contains an integer not in <code class="code">[1..Length(<var class="Arg">list</var>)]</code>.</p>
<p>This is the analogue in the context of transformations of <code class="func">PermList</code> (<a href="chap42.html#X78D611D17EA6E3BC"><span class="RefLink">42.5-2</span></a>). <code class="code">Transformation</code> is a synonym of <code class="code">TransformationList</code> when the argument is a list.</p>
<p>When the arguments are a list of positive integers <var class="Arg">list</var> and a function <var class="Arg">func</var>, <code class="code">Transformation</code> returns the transformation <code class="code">f</code> such that <code class="code"><var class="Arg">list</var>[i]^f=<var class="Arg">func</var>(<var class="Arg">list</var>[i])</code> if <code class="code">i</code> is in the range <code class="code">[1..Length(<var class="Arg">list</var>)]</code> and <code class="code">f</code> fixes all other points.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference("NotationForTransformations", "input");</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 11, 10, 2, 11, 4, 4, 7, 6, 9, 10, 1, 11 ] );</span>
Transformation( [ 11, 10, 2, 11, 4, 4, 7, 6, 9, 10, 1, 11 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=TransformationList( [ 2, 3, 3, 1 ] );</span>
Transformation( [ 2, 3, 3, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference("NotationForTransformations", "fr");</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation([10, 11], x-> x^2);</span>
<transformation: 1,2,3,4,5,6,7,8,9,100,121>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference("NotationForTransformations", "input");</span></pre></div>
<p><a id="X8040642687531E7F" name="X8040642687531E7F"></a></p>
<h5>53.2-2 Transformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Transformation</code>( <var class="Arg">src</var>, <var class="Arg">dst</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">‣ TransformationListList</code>( <var class="Arg">src</var>, <var class="Arg">dst</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>
<p>If <var class="Arg">src</var> and <var class="Arg">dst</var> are lists of positive integers of the same length, such that <var class="Arg">src</var> contains no element twice, then <code class="code">TransformationListList(<var class="Arg">src</var>, <var class="Arg">dst</var>)</code> returns a transformation <code class="code">f</code> such that <code class="code">src[i]^<var class="Arg">f</var>= dst[i]</code>. The transformation <var class="Arg">f</var> fixes all points larger than the maximum of the entries in <var class="Arg">src</var> and <var class="Arg">dst</var>.</p>
<p>This is the analogue in the context of transformations of <code class="func">MappingPermListList</code> (<a href="chap42.html#X8087DCC780B9656A"><span class="RefLink">42.5-3</span></a>). <code class="code">Transformation</code> is a synonym of <code class="code">TransformationListList</code> when its arguments are two lists of positive integers.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Transformation( [ 10, 11 ],[ 11, 12 ] );</span>
Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 12 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationListList( [ 1, 2, 3 ], [ 4, 5, 6 ] );</span>
Transformation( [ 4, 5, 6, 4, 5, 6 ] )</pre></div>
<p><a id="X7E82EBD68455EE4A" name="X7E82EBD68455EE4A"></a></p>
<h5>53.2-3 TransformationByImageAndKernel</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationByImageAndKernel</code>( <var class="Arg">im</var>, <var class="Arg">ker</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>
<p><code class="code">Transformation</code> returns the transformation <code class="code">f</code> <code class="code">i^f=<var class="Arg">im</var>[<var class="Arg">ker</var>[i]]</code> for <code class="code">i</code> in the range <code class="code">[1..Length(<var class="Arg">ker</var>)]</code>. This transformation has flat kernel equal to <var class="Arg">ker</var> and image set equal to <code class="code">Set(<var class="Arg">im</var>)</code>.</p>
<p>The argument <var class="Arg">im</var> should be a duplicate free list of positive integers and <var class="Arg">ker</var> should be the flat kernel of a transformation with rank equal to the length of <var class="Arg">im</var>. If the arguments do not fulfil these conditions, then <code class="keyw">fail</code> is returned.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationByImageAndKernel([ 8, 1, 3, 4 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[ 1, 2, 3, 1, 2, 1, 2, 4 ]);</span>
Transformation( [ 8, 1, 3, 8, 1, 8, 1, 4 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationByImageAndKernel([ 1, 3, 8, 4 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[ 1, 2, 3, 1, 2, 1, 2, 4 ]);</span>
Transformation( [ 1, 3, 8, 1, 3, 1, 3, 4 ] )</pre></div>
<p><a id="X85D1071484CE004C" name="X85D1071484CE004C"></a></p>
<h5>53.2-4 Idempotent</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Idempotent</code>( <var class="Arg">im</var>, <var class="Arg">ker</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>
<p><code class="code">Idempotent</code> returns the idempotent transformation with image set <var class="Arg">im</var> and flat kernel <var class="Arg">ker</var> if such a transformation exists and <code class="keyw">fail</code> if it does not.</p>
<p>More specifically, a transformation is returned when the argument <var class="Arg">im</var> is a set of positive integers and <var class="Arg">ker</var> is the flat kernel of a transformation with rank equal to the length of <var class="Arg">im</var> and where <var class="Arg">im</var> has one element in every class of the kernel corresponding to <var class="Arg">ker</var>.</p>
<p>Note that this is function does not always return the same transformation as <code class="code">TransformationByImageAndKernel</code> with the same arguments.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Idempotent([ 2, 4, 6, 7, 8, 10, 11 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[ 1, 2, 1, 3, 3, 4, 5, 1, 6, 6, 7, 5 ] );</span>
Transformation( [ 8, 2, 8, 4, 4, 6, 7, 8, 10, 10, 11, 7 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationByImageAndKernel([ 2, 4, 6, 7, 8, 10, 11 ],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[ 1, 2, 1, 3, 3, 4, 5, 1, 6, 6, 7, 5 ] );</span>
Transformation( [ 2, 4, 2, 6, 6, 7, 8, 2, 10, 10, 11, 8 ] )</pre></div>
<p><a id="X7C2A3FC9782F2099" name="X7C2A3FC9782F2099"></a></p>
<h5>53.2-5 TransformationOp</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationOp</code>( <var class="Arg">obj</var>, <var class="Arg">list</var>[, <var class="Arg">func</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">‣ TransformationOpNC</code>( <var class="Arg">obj</var>, <var class="Arg">list</var>[, <var class="Arg">func</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: A transformation or <code class="keyw">fail</code>.</p>
<p><code class="code">TransformationOp</code> returns the transformation that corresponds to the action of the object <var class="Arg">obj</var> on the domain or list <var class="Arg">list</var> via the function <var class="Arg">func</var>. If the optional third argument <var class="Arg">func</var> is not specified, then the action <code class="func">OnPoints</code> (<a href="chap41.html#X7FE417DD837987B4"><span class="RefLink">41.2-1</span></a>) is used by default. Note that the returned transformation refers to the positions in <var class="Arg">list</var> even if <var class="Arg">list</var> itself consists of integers.</p>
<p>This function is the analogue in the context of transformations of <code class="func">Permutation</code> (<a href="../../doc/ref/chap41.html#X7807A33381DCAB26"><span class="RefLink">Reference: Permutation</span></a>).</p>
<p>If <var class="Arg">obj</var> does not map elements of <var class="Arg">list</var> into <var class="Arg">list</var>, then <code class="keyw">fail</code> is returned.</p>
<p><code class="code">TransformationOpNC</code> does not check that <var class="Arg">obj</var> maps elements of <var class="Arg">list</var> to elements of <var class="Arg">list</var> or that a transformation is defined by the action of <var class="Arg">obj</var> on <var class="Arg">list</var> via <var class="Arg">func</var>. This function should be used only with caution, and in situations where it is guaranteed that the arguments have the required properties.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 10, 2, 3, 10, 5, 10, 7, 2, 5, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp(f, [ 2, 3 ] );</span>
IdentityTransformation
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp(f, [ 1, 2, 3 ] );</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=SemigroupByMultiplicationTable( [ [ 1, 1, 1 ], [ 1, 1, 1 ], </span>
<span class="GAPprompt">></span> <span class="GAPinput">[ 1, 1, 2 ] ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp(Elements(S)[1], S, OnRight);</span>
Transformation( [ 1, 1, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationOp(Elements(S)[3], S, OnRight);</span>
Transformation( [ 1, 1, 2 ] )</pre></div>
<p><a id="X7D6FCC417DE86CD1" name="X7D6FCC417DE86CD1"></a></p>
<h5>53.2-6 TransformationNumber</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TransformationNumber</code>( <var class="Arg">m</var>, <var class="Arg">n</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">‣ NumberTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation or a number.</p>
<p>These functions implement a bijection from the transformations with degree at most <var class="Arg">n</var> to the numbers <code class="code">[1..<var class="Arg">n</var>^<var class="Arg">n</var>]</code>.</p>
<p>More precisely, if <var class="Arg">m</var> and <var class="Arg">n</var> are positive integers such that <var class="Arg">m</var> is at most <code class="code"><var class="Arg">n</var>^<var class="Arg">n</var></code>, then <code class="code">TransformationNumber</code> returns the <var class="Arg">m</var>th transformation with degree at most <var class="Arg">n</var>.</p>
<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a positive integer, which is greater than or equal to the degree of <var class="Arg">f</var>, then <code class="code">NumberTransformation</code> returns the number in <code class="code">[1..<var class="Arg">n</var>^<var class="Arg">n</var>]</code> that corresponds to <var class="Arg">f</var>. If the optional second argument <var class="Arg">n</var> is not specified, then the degree of <var class="Arg">f</var> is used by default.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 3, 3, 5, 3, 3 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NumberTransformation(f, 5);</span>
1613
<span class="GAPprompt">gap></span> <span class="GAPinput">NumberTransformation(f, 10);</span>
2242256790
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationNumber(2242256790, 10);</span>
Transformation( [ 3, 3, 5, 3, 3 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">TransformationNumber(1613, 5); </span>
Transformation( [ 3, 3, 5, 3, 3 ] )</pre></div>
<p><a id="X8475448F87E8CB8A" name="X8475448F87E8CB8A"></a></p>
<h5>53.2-7 <span class="Heading">RandomTransformation</span></h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RandomTransformation</code>( <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A random transformation.</p>
<p>If <var class="Arg">n</var> is a positive integer, then <code class="code">RandomTransformation</code> returns a random transformation with degree at most <var class="Arg">n</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">RandomTransformation(6); </span>
Transformation( [ 2, 1, 2, 1, 1, 2 ] )</pre></div>
<p><a id="X8268A58685BEFD6F" name="X8268A58685BEFD6F"></a></p>
<h5>53.2-8 IdentityTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IdentityTransformation</code></td><td class="tdright">( global variable )</td></tr></table></div>
<p>Returns: The identity transformation.</p>
<p>Returns the identity transformation, which has degree <code class="code">0</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=IdentityTransformation;</span>
IdentityTransformation</pre></div>
<p><a id="X7F1E4B5184210D2B" name="X7F1E4B5184210D2B"></a></p>
<h5>53.2-9 ConstantTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ConstantTransformation</code>( <var class="Arg">m</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>
<p>This function returns a constant transformation <code class="code">f</code> such that <code class="code">i^f=<var class="Arg">n</var></code> for all <code class="code">i</code> less than or equal to <var class="Arg">m</var>, when <var class="Arg">n</var> and <var class="Arg">m</var> are positive integers.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">ConstantTransformation(5, 1);</span>
Transformation( [ 1, 1, 1, 1, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">ConstantTransformation(6, 4);</span>
Transformation( [ 4, 4, 4, 4, 4, 4 ] )</pre></div>
<p><a id="X7F81A18B813C9DF0" name="X7F81A18B813C9DF0"></a></p>
<h4>53.3 <span class="Heading">Changing the representation of a transformation</span></h4>
<p>It is possible that a transformation in <strong class="pkg">GAP</strong> can be represented as another type of object, or that another type of <strong class="pkg">GAP</strong> object can be represented as a transformation.</p>
<p>The operations <code class="func">AsPermutation</code> (<a href="chap42.html#X8353AB8987E35DF3"><span class="RefLink">42.5-5</span></a>) and <code class="func">AsPartialPerm</code> (<a href="chap54.html#X87EC67747B260E98"><span class="RefLink">54.4-2</span></a>) can be used to convert transformations into permutations or partial permutations, where appropriate. In this section we describe functions for converting other types of objects into transformations.</p>
<p><a id="X7C5360B2799943F3" name="X7C5360B2799943F3"></a></p>
<h5>53.3-1 AsTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AsTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>
<p><code class="code">AsTransformation</code> returns the permutation, transformation, partial permutation or binary relation <var class="Arg">f</var> as a transformation.</p>
<dl>
<dt><strong class="Mark">for permutations</strong></dt>
<dd><p>If <var class="Arg">f</var> is a permutation and <var class="Arg">n</var> is a non-negative integer, then <code class="code">AsTransformation(<var class="Arg">f</var>, <var class="Arg">n</var>)</code> returns the transformation <code class="code">g</code> such that <code class="code">i^g=i^f</code> for all <code class="code">i</code> in the range <code class="code">[1..<var class="Arg">n</var>]</code>.</p>
<p>If no non-negative integer <var class="Arg">n</var> is specified, then the largest moved point of <var class="Arg">f</var> is used as the value for <var class="Arg">n</var>; see <code class="func">LargestMovedPoint</code> (<a href="chap42.html#X84AA603987C94AC0"><span class="RefLink">42.3-2</span></a>).</p>
</dd>
<dt><strong class="Mark">for transformations</strong></dt>
<dd><p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a non-negative integer less than the degree of <var class="Arg">f</var> such that <var class="Arg">f</var> is a transformation of <code class="code">[1..<var class="Arg">n</var>]</code>, then <code class="code">AsTransformation</code> returns the restriction of <var class="Arg">f</var> to <code class="code">[1..<var class="Arg">n</var>]</code>.</p>
<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is not specified or equals a is greater than or equal to the degree of <var class="Arg">f</var>, then <var class="Arg">f</var> is returned.</p>
</dd>
<dt><strong class="Mark">for partial permutations</strong></dt>
<dd><p>A partial permutation <var class="Arg">f</var> can be converted into a transformation <code class="code">g</code> as follows. The degree <code class="code">m</code> of <code class="code">g</code> is equal to the maximum of <var class="Arg">n</var>, the largest moved point of <var class="Arg">f</var> plus <code class="code">1</code>, and the largest image of a moved point plus <code class="code">1</code>. The transformation <code class="code">g</code> agrees with <var class="Arg">f</var> on the domain of <var class="Arg">f</var> and maps the points in <code class="code">[1..m]</code>, which are not in the domain of <var class="Arg">f</var> to <code class="code">n</code>, i.e. <code class="code">i^g=i^<var class="Arg">f</var></code> for all <code class="code">i</code> in the domain of <var class="Arg">f</var>, <code class="code">i^g=n</code> for all <code class="code">i</code> in <code class="code">[1..n]</code>, and <code class="code">i^g=i</code> for all <code class="code">i</code> greater than <var class="Arg">n</var>. <code class="code">AsTransformation(<var class="Arg">f</var>)</code> returns the transformation <code class="code">g</code> defined in the previous sentences.</p>
<p>If the optional argument <var class="Arg">n</var> is not present, then the default value of the maximum of the largest moved point and the largest image of a moved point of <var class="Arg">f</var> plus <code class="code">1</code> is used.</p>
</dd>
<dt><strong class="Mark">for binary relations</strong></dt>
<dd><p>In the case that <var class="Arg">f</var> is a binary relation, which defines a transformation, then <code class="code">AsTransformation</code> returns that transformation.</p>
</dd>
</dl>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 3, 5, 3, 4, 1, 2 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation(f, 5);</span>
Transformation( [ 3, 5, 3, 4, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation(f, 10);</span>
Transformation( [ 3, 5, 3, 4, 1, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation((1, 3)(2, 4));</span>
Transformation( [ 3, 4, 1, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation((1, 3)(2, 4), 10);</span>
Transformation( [ 3, 4, 1, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=PartialPerm( [ 1, 2, 3, 4, 5, 6 ], [ 6, 7, 1, 4, 3, 2 ] );</span>
[5,3,1,6,2,7](4)
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation(f, 11);</span>
Transformation( [ 6, 7, 1, 4, 3, 2, 11, 11, 11, 11, 11 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsPartialPerm(last, DomainOfPartialPerm(f));</span>
[5,3,1,6,2,7](4)
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation(f, 14);</span>
Transformation( [ 6, 7, 1, 4, 3, 2, 14, 14, 14, 14, 14, 14, 14, 14 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsPartialPerm(last, DomainOfPartialPerm(f));</span>
[5,3,1,6,2,7](4)
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation(f);</span>
Transformation( [ 6, 7, 1, 4, 3, 2, 8, 8 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">AsTransformation(Transformation( [ 1, 1, 2 ] ), 0);</span>
IdentityTransformation</pre></div>
<p><a id="X846A6F6B7B715188" name="X846A6F6B7B715188"></a></p>
<h5>53.3-2 RestrictedTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RestrictedTransformation</code>( <var class="Arg">f</var>, <var class="Arg">list</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">‣ RestrictedTransformationNC</code>( <var class="Arg">f</var>, <var class="Arg">list</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>
<p><code class="code">RestrictedTransformation</code> returns the new transformation <code class="code">g</code> such that <code class="code">i^g=i^<var class="Arg">f</var></code> for all <code class="code">i</code> in <var class="Arg">list</var> and such that <code class="code">i^g=i</code> for all <code class="code">i</code> not in <var class="Arg">list</var>.</p>
<p><code class="code">RestrictedTransformation</code> checks that <var class="Arg">list</var> is a duplicate free dense list consisting of positive integers, whereas <code class="code">RestrictedTransformationNC</code> performs no checks.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2, 10, 5, 9, 10, 9, 6, 3, 8, 4, 6, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">RestrictedTransformation(f, [ 1, 2, 3, 10, 11, 12 ] );</span>
Transformation( [ 2, 10, 5, 4, 5, 6, 7, 8, 9, 4, 6, 5 ] )</pre></div>
<p><a id="X8708AE247F5B129B" name="X8708AE247F5B129B"></a></p>
<h5>53.3-3 PermutationOfImage</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermutationOfImage</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A permutation or <code class="keyw">fail</code>.</p>
<p>If the transformation <var class="Arg">f</var> is a permutation of the points in its image, then <code class="code">PermutationOfImage</code> returns this permutation. If <var class="Arg">f</var> does not permute its image, then <code class="keyw">fail</code> is returned.</p>
<p>If <var class="Arg">f</var> happens to be a permutation, then <code class="code">PermutationOfImage</code> with argument <var class="Arg">f</var> returns the same value as <code class="code">AsPermutation</code> with argument <var class="Arg">f</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 5, 8, 3, 5, 8, 6, 2, 2, 7, 8 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PermutationOfImage(f);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 8, 2, 10, 2, 4, 4, 7, 6, 9, 10 ] );; </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PermutationOfImage(f);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 1, 3, 6, 6, 2, 10, 2, 3, 10, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PermutationOfImage(f);</span>
(2,3,6,10,5)
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 5, 2, 8, 4, 1, 8, 10, 3, 5, 7 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PermutationOfImage(f);</span>
(1,5)(3,8)(7,10)</pre></div>
<p><a id="X812CEC008609A8A2" name="X812CEC008609A8A2"></a></p>
<h4>53.4 <span class="Heading">Operators for transformations</span></h4>
<dl>
<dt><strong class="Mark"><code class="code"><var class="Arg">i</var> ^ <var class="Arg">f</var></code></strong></dt>
<dd><p>returns the image of the positive integer <var class="Arg">i</var> under the transformation <var class="Arg">f</var>.</p>
</dd>
<dt><strong class="Mark"><code class="code"><var class="Arg">f</var> ^ <var class="Arg">g</var></code></strong></dt>
<dd><p>returns <code class="code"><var class="Arg">g</var>^-1*<var class="Arg">f</var>*<var class="Arg">g</var></code> when <var class="Arg">f</var> is a transformation and <var class="Arg">g</var> is a permutation <code class="func">\^</code> (<a href="../../doc/ref/chap4.html#X7B66C8707B5DE10A"><span class="RefLink">Reference: ^</span></a>). This operation requires essentially the same number of steps as multiplying a transformation by a permutation, which is approximately one third of the number required to first invert <var class="Arg">g</var>, take the produce with <var class="Arg">f</var>, and then the product with <var class="Arg">g</var>.</p>
</dd>
<dt><strong class="Mark"><code class="code"><var class="Arg">f</var> * <var class="Arg">g</var></code></strong></dt>
<dd><p>returns the composition of <var class="Arg">f</var> and <var class="Arg">g</var> when <var class="Arg">f</var> and <var class="Arg">g</var> are transformations or permutations. The product of a permutation and a transformation is returned as a transformation.</p>
</dd>
<dt><strong class="Mark"><code class="code"><var class="Arg">f</var> / <var class="Arg">g</var></code></strong></dt>
<dd><p>returns <code class="code"><var class="Arg">f</var>*<var class="Arg">g</var>^-1</code> when <var class="Arg">f</var> is a transformation and <var class="Arg">g</var> is a permutation. This operation requires essentially the same number of steps as multiplying a transformation by a permutation, which is approximately half the number required to first invert <var class="Arg">g</var> and then take the produce with <var class="Arg">f</var>.</p>
</dd>
<dt><strong class="Mark"><code class="code">LQUO(<var class="Arg">g</var>, <var class="Arg">f</var>)</code></strong></dt>
<dd><p>returns <code class="code"><var class="Arg">g</var>^-1*<var class="Arg">f</var></code> when <var class="Arg">f</var> is a transformation and <var class="Arg">g</var> is a permutation. This operation uses essentially the same number of steps as multiplying a transformation by a permutation, which is approximately half the number required to first invert <var class="Arg">g</var> and then take the produce with <var class="Arg">f</var>.</p>
</dd>
<dt><strong class="Mark"><code class="code"><var class="Arg">f</var> < <var class="Arg">g</var></code></strong></dt>
<dd><p>returns <code class="keyw">true</code> if the image list of <var class="Arg">f</var> is lexicographically less than the image list of <var class="Arg">g</var> and <code class="keyw">false</code> if it is not.</p>
</dd>
<dt><strong class="Mark"><code class="code"><var class="Arg">f</var> = <var class="Arg">g</var></code></strong></dt>
<dd><p>returns <code class="keyw">true</code> if the transformation <var class="Arg">f</var> equals the transformation <var class="Arg">g</var> and returns <code class="keyw">false</code> if it does not.</p>
</dd>
</dl>
<p><a id="X83DBA2A18719EFA8" name="X83DBA2A18719EFA8"></a></p>
<h5>53.4-1 PermLeftQuoTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PermLeftQuoTransformation</code>( <var class="Arg">f</var>, <var class="Arg">g</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">‣ PermLeftQuoTransformationNC</code>( <var class="Arg">f</var>, <var class="Arg">g</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A permutation.</p>
<p>Returns the permutation on the image set of <var class="Arg">f</var> induced by <code class="code"><var class="Arg">f</var>^-1*<var class="Arg">g</var></code> when the transformations <var class="Arg">f</var> and <var class="Arg">g</var> have equal kernel and image set.</p>
<p><code class="code">PermLeftQuoTransformation</code> verifies that <var class="Arg">f</var> and <var class="Arg">g</var> have equal kernels and image sets, and returns an error if they do not. <code class="code">PermLeftQuoTransformationNC</code> does no checks.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 5, 6, 7, 1, 4, 3, 2, 7 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:=Transformation( [ 5, 7, 1, 6, 4, 3, 2, 1 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PermLeftQuoTransformation(f, g);</span>
(1,6,7)
<span class="GAPprompt">gap></span> <span class="GAPinput">PermLeftQuoTransformation(g, f);</span>
(1,7,6)</pre></div>
<p><a id="X8275DFAA8270BB59" name="X8275DFAA8270BB59"></a></p>
<h5>53.4-2 IsInjectiveListTrans</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsInjectiveListTrans</code>( <var class="Arg">obj</var>, <var class="Arg">list</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code>.</p>
<p>The argument <var class="Arg">obj</var> should be a transformation or the list of images of a transformation and <var class="Arg">list</var> should be a list of positive integers. <code class="code">IsInjectiveListTrans</code> checks if <var class="Arg">obj</var> is injective on <var class="Arg">list</var>.</p>
<p>More precisely, if <var class="Arg">obj</var> is a transformation, then we define <code class="code">f:=<var class="Arg">obj</var></code> and if <var class="Arg">obj</var> is the image list of a transformation we define <code class="code">f:=Transformation(<var class="Arg">obj</var>)</code>. <code class="code">IsInjectiveListTrans</code> returns <code class="keyw">true</code> if <code class="code">f</code> is injective on <var class="Arg">list</var> and <code class="keyw">false</code> if it is not. If <var class="Arg">list</var> is not duplicate free, then <code class="keyw">false</code> is returned.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 1, 5 ], f );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 5, 1 ], f );</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 5, 1, 5, 1, 1, ], f );</span>
false
<span class="GAPprompt">gap></span> <span class="GAPinput">IsInjectiveListTrans( [ 5, 1, 2, 3 ], [ 1, 2, 3, 4, 5 ] );</span>
true</pre></div>
<p><a id="X834A313B7DAF06D5" name="X834A313B7DAF06D5"></a></p>
<h5>53.4-3 ComponentTransformationInt</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ComponentTransformationInt</code>( <var class="Arg">f</var>, <var class="Arg">n</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A list of positive integers.</p>
<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a positive integer, then <code class="code">ComponentTransformationInt</code> returns those elements <code class="code">i</code> such that <code class="code"><var class="Arg">n</var>^<var class="Arg">f</var>^j=i</code> for some positive integer <code class="code">j</code>, i.e. the elements of the component of <var class="Arg">f</var> containing <var class="Arg">n</var> that can be obtained by applying powers of <var class="Arg">f</var> to <var class="Arg">n</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 2, 8, 4, 7, 5, 8, 3, 5, 8 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentTransformationInt(f, 1);</span>
[ 1, 6, 5, 7, 8, 3 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentTransformationInt(f, 12);</span>
[ 12 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentTransformationInt(f, 5); </span>
[ 5, 7, 8, 3 ]</pre></div>
<p><a id="X82F5DEEC837B60A3" name="X82F5DEEC837B60A3"></a></p>
<h5>53.4-4 PreImagesOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PreImagesOfTransformation</code>( <var class="Arg">f</var>, <var class="Arg">n</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A set of positive integers.</p>
<p>Returns the preimages of the positive integer <var class="Arg">n</var> under the transformation <var class="Arg">f</var>, i.e. the positive integers <code class="code">i</code> such that <code class="code">i^<var class="Arg">f</var>=n</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesOfTransformation(f, 1);</span>
[ 8, 9 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesOfTransformation(f, 3);</span>
[ ]
<span class="GAPprompt">gap></span> <span class="GAPinput">PreImagesOfTransformation(f, 100);</span>
[ 100 ]</pre></div>
<p><a id="X86DE4F7A7C535820" name="X86DE4F7A7C535820"></a></p>
<h4>53.5 <span class="Heading">Attributes for transformations</span></h4>
<p>In this section we describe the functions available in <strong class="pkg">GAP</strong> for finding various properties and attributes of transformations.</p>
<p><a id="X78A209C87CF0E32B" name="X78A209C87CF0E32B"></a></p>
<h5>53.5-1 DegreeOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DegreeOfTransformation</code>( <var class="Arg">f</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">‣ DegreeOfTransformationCollection</code>( <var class="Arg">coll</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A positive integer.</p>
<p>The <em>degree</em> of a transformation <var class="Arg">f</var> is the largest value such that <code class="code">n^<var class="Arg">f</var><>n</code> or <code class="code">i^<var class="Arg">f</var>=n</code> for some <code class="code">i<>n</code>. Equivalently, the degree of a transformation is the least value <code class="code">n</code> such that <code class="code">[n+1,n+2,...]</code> is fixed pointwise by <var class="Arg">f</var>. The degree a collection of transformations <var class="Arg">coll</var> is the maximum degree of any transformation in <var class="Arg">coll</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformation(IdentityTransformation);</span>
0
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformationCollection([ Transformation( [ 1, 3, 4, 1 ] ), </span>
<span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 3, 1, 1, 3, 4 ]), Transformation( [ 2, 4, 1, 2 ] ) ]);</span>
5</pre></div>
<p><a id="X7AEC9E6687B3505A" name="X7AEC9E6687B3505A"></a></p>
<h5>53.5-2 ImageListOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImageListOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</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">‣ ListTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: The list of images of a transformation.</p>
<p>Returns the list of images of <code class="code">[1..<var class="Arg">n</var>]</code> under the transformation <var class="Arg">f</var>, which is <code class="code">[1^<var class="Arg">f</var>..<var class="Arg">n</var>^<var class="Arg">f</var>]</code>. If the optional second argument <var class="Arg">n</var> is not present, then the degree of <var class="Arg">f</var> is used by default.</p>
<p>This is the analogue for transformations of <code class="func">ListPerm</code> (<a href="chap42.html#X7A9DCFD986958C1E"><span class="RefLink">42.5-1</span></a>) for permutations.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2 ,3, 4, 2, 4 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ImageListOfTransformation(f);</span>
[ 2, 3, 4, 2, 4 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ImageListOfTransformation(f, 10);</span>
[ 2, 3, 4, 2, 4, 6, 7, 8, 9, 10 ]</pre></div>
<p><a id="X839A6D6082A21D1F" name="X839A6D6082A21D1F"></a></p>
<h5>53.5-3 ImageSetOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ImageSetOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The set of images of the transformation.</p>
<p>Returns the set of points in the list of images of <code class="code">[1..<var class="Arg">n</var>]</code> under <var class="Arg">f</var>, i.e. the sorted list of images with duplicates removed. If the optional second argument <var class="Arg">n</var> is not given, then the degree of <var class="Arg">f</var> is used.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 5, 6, 7, 1, 4, 3, 2, 7 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ImageSetOfTransformation(f);</span>
[ 1, 2, 3, 4, 5, 6, 7 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">ImageSetOfTransformation(f, 10);</span>
[ 1, 2, 3, 4, 5, 6, 7, 9, 10 ]</pre></div>
<p><a id="X818EBB167C7EA37B" name="X818EBB167C7EA37B"></a></p>
<h5>53.5-4 RankOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RankOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</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">‣ RankOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">list</var>] )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The rank of a transformation.</p>
<p>When the arguments are a transformation <var class="Arg">f</var> and a positive integer <var class="Arg">n</var>, <code class="code">RankOfTransformation</code> returns the size of the set of images of the transformation <var class="Arg">f</var> in the range <code class="code">[1..<var class="Arg">n</var>]</code>. If the optional second argument <var class="Arg">n</var> is not specified, then the degree of <var class="Arg">f</var> is used.</p>
<p>When the arguments are a transformation <var class="Arg">f</var> and a list <var class="Arg">list</var> of positive integers, this function returns the size of the set of images of the transformation <var class="Arg">f</var> on <var class="Arg">list</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 8, 5, 8, 2, 2, 8, 4, 7, 3, 1 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">ImageSetOfTransformation(f);</span>
[ 1, 2, 3, 4, 5, 7, 8 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">RankOfTransformation(f);</span>
7
<span class="GAPprompt">gap></span> <span class="GAPinput">RankOfTransformation(f, 100); </span>
97
<span class="GAPprompt">gap></span> <span class="GAPinput">RankOfTransformation(f, [ 2, 5, 8 ] );</span>
3</pre></div>
<p><a id="X844F00F982D5BD3C" name="X844F00F982D5BD3C"></a></p>
<h5>53.5-5 MovedPoints</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ MovedPoints</code>( <var class="Arg">f</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">‣ MovedPoints</code>( <var class="Arg">coll</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A set of positive integers.</p>
<p>When the argument is a transformation, <code class="code">MovedPoints</code> returns the set of positive integers <code class="code">i</code> such that <code class="code">i^<var class="Arg">f</var><>i</code>. <code class="code">MovedPoints</code> returns the set of points moved by some element of the collection of transformations <var class="Arg">coll</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 10, 1, 4, 6, 5, 1, 2, 3, 3 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">MovedPoints(f); </span>
[ 1, 2, 3, 5, 6, 7, 8, 9, 10 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=IdentityTransformation; </span>
IdentityTransformation
<span class="GAPprompt">gap></span> <span class="GAPinput">MovedPoints(f);</span>
[ ]</pre></div>
<p><a id="X7FA6A4B57FDA003D" name="X7FA6A4B57FDA003D"></a></p>
<h5>53.5-6 NrMovedPoints</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NrMovedPoints</code>( <var class="Arg">f</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">‣ NrMovedPoints</code>( <var class="Arg">coll</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A positive integer.</p>
<p>When the argument is a transformation,<code class="code">NrMovedPoints</code> returns the number of positive integers <code class="code">i</code> such that <code class="code">i^<var class="Arg">f</var><>i</code>. <code class="code">MovedPoints</code> returns the number of points which are moved by at least one element of the collection of transformations <var class="Arg">coll</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 7, 1, 4, 3, 2, 7, 7, 6, 6, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">NrMovedPoints(f);</span>
9
<span class="GAPprompt">gap></span> <span class="GAPinput">NrMovedPoints(IdentityTransformation);</span>
0</pre></div>
<p><a id="X86C0DDDC7881273A" name="X86C0DDDC7881273A"></a></p>
<h5>53.5-7 SmallestMovedPoint</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SmallestMovedPoint</code>( <var class="Arg">f</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">‣ SmallestMovedPoint</code>( <var class="Arg">coll</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A positive integer or <code class="keyw">infinity</code>.</p>
<p><code class="code">SmallestMovedPoint</code> returns the smallest positive integer <code class="code">i</code> such that <code class="code">i^<var class="Arg">f</var><>i</code> if such an <code class="code">i</code> exists. If <var class="Arg">f</var> is the identity transformation, then <code class="keyw">infinity</code> is returned.</p>
<p>If the argument is a collection of transformations <var class="Arg">coll</var>, then the smallest point which is moved by at least one element of <var class="Arg">coll</var> is returned, if such a point exists. If <var class="Arg">coll</var> only contains identity transformations, then <code class="code">SmallestMovedPoint</code> returns <code class="keyw">infinity</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=FullTransformationSemigroup(5); </span>
<full transformation semigroup on 5 pts>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestMovedPoint(S); </span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(IdentityTransformation);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestMovedPoint(S);</span>
infinity
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 1, 2, 3, 6, 6, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestMovedPoint(f);</span>
4</pre></div>
<p><a id="X8383A7727AC97724" name="X8383A7727AC97724"></a></p>
<h5>53.5-8 LargestMovedPoint</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LargestMovedPoint</code>( <var class="Arg">f</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">‣ LargestMovedPoint</code>( <var class="Arg">coll</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A positive integer.</p>
<p><code class="code">LargestMovedPoint</code> returns the largest positive integers <code class="code">i</code> such that <code class="code">i^<var class="Arg">f</var><>i</code> if such an <code class="code">i</code> exists. If <var class="Arg">f</var> is the identity transformation, then <code class="code">0</code> is returned.</p>
<p>If the argument is a collection of transformations <var class="Arg">coll</var>, then the largest point which is moved by at least one element of <var class="Arg">coll</var> is returned, if such a point exists. If <var class="Arg">coll</var> only contains identity transformations, then <code class="code">LargestMovedPoint</code> returns <code class="code">0</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=FullTransformationSemigroup(5); </span>
<full transformation semigroup on 5 pts>
<span class="GAPprompt">gap></span> <span class="GAPinput">LargestMovedPoint(S);</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(IdentityTransformation);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LargestMovedPoint(S);</span>
0
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 1, 2, 3, 6, 6, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LargestMovedPoint(f); </span>
5</pre></div>
<p><a id="X7CCFE27E83676572" name="X7CCFE27E83676572"></a></p>
<h5>53.5-9 SmallestImageOfMovedPoint</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SmallestImageOfMovedPoint</code>( <var class="Arg">f</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">‣ SmallestImageOfMovedPoint</code>( <var class="Arg">coll</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A positive integer or <code class="keyw">infinity</code>.</p>
<p><code class="code">SmallestImageOfMovedPoint</code> returns the smallest positive integer <code class="code">i^<var class="Arg">f</var></code> such that <code class="code">i^<var class="Arg">f</var><>i</code> if such an <code class="code">i</code> exists. If <var class="Arg">f</var> is the identity transformation, then <code class="keyw">infinity</code> is returned.</p>
<p>If the argument is a collection of transformations <var class="Arg">coll</var>, then the smallest integer which is the image a point moved by at least one element of <var class="Arg">coll</var> is returned, if such a point exists. If <var class="Arg">coll</var> only contains identity transformations, then <code class="code">SmallestImageOfMovedPoint</code> returns <code class="keyw">infinity</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=FullTransformationSemigroup(5); </span>
<full transformation semigroup on 5 pts>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestImageOfMovedPoint(S); </span>
1
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(IdentityTransformation);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestImageOfMovedPoint(S);</span>
infinity
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 1, 2, 3, 6, 6, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestImageOfMovedPoint(f);</span>
6</pre></div>
<p><a id="X7E7172567C3A3E63" name="X7E7172567C3A3E63"></a></p>
<h5>53.5-10 LargestImageOfMovedPoint</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LargestImageOfMovedPoint</code>( <var class="Arg">f</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">‣ LargestImageOfMovedPoint</code>( <var class="Arg">coll</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A positive integer.</p>
<p><code class="code">LargestImageOfMovedPoint</code> returns the largest positive integer <code class="code">i^<var class="Arg">f</var></code> such that <code class="code">i^<var class="Arg">f</var><>i</code> if such an <code class="code">i</code> exists. If <var class="Arg">f</var> is the identity transformation, then <code class="code">0</code> is returned.</p>
<p>If the argument is a collection of transformations <var class="Arg">coll</var>, then the largest integer which is the image a point moved by at least one element of <var class="Arg">coll</var> is returned, if such a point exists. If <var class="Arg">coll</var> only contains identity transformations, then <code class="code">LargestImageOfMovedPoint</code> returns <code class="code">0</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=FullTransformationSemigroup(5); </span>
<full transformation semigroup on 5 pts>
<span class="GAPprompt">gap></span> <span class="GAPinput">LargestImageOfMovedPoint(S);</span>
5
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(IdentityTransformation);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LargestImageOfMovedPoint(S);</span>
0
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 1, 2, 3, 6, 6, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">LargestImageOfMovedPoint(f); </span>
6</pre></div>
<p><a id="X8083794579274E87" name="X8083794579274E87"></a></p>
<h5>53.5-11 FlatKernelOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FlatKernelOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: The flat kernel of a transformation.</p>
<p>If the kernel classes of the transformation <var class="Arg">f</var> on <code class="code">[1..<var class="Arg">n</var>]</code> are <span class="SimpleMath">K_1, dots, K_r</span>, then <code class="code">FlatKernelOfTransformation</code> returns a list <code class="code">L</code> such that <code class="code">L[i]=j</code> for all <code class="code">i</code> in <span class="SimpleMath">K_j</span>. For a given transformation and positive integer <var class="Arg">n</var>, there is a unique such list.</p>
<p>If the optional second argument <var class="Arg">n</var> is not present, then the degree of <var class="Arg">f</var> is used by defualt.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 10, 3, 7, 10, 1, 5, 9, 2, 6, 10 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">FlatKernelOfTransformation(f);</span>
[ 1, 2, 3, 1, 4, 5, 6, 7, 8, 1 ]</pre></div>
<p><a id="X80FCB5048789CF75" name="X80FCB5048789CF75"></a></p>
<h5>53.5-12 KernelOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ KernelOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>, <var class="Arg">bool</var>] )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: The kernel of a transformation.</p>
<p>When the arguments are a transformation <var class="Arg">f</var>, a positive integer <var class="Arg">n</var>, and <code class="keyw">true</code>, <code class="code">KernelOfTransformation</code> returns the kernel of the transformation <var class="Arg">f</var> on <code class="code">[1..<var class="Arg">n</var>]</code> as a set of sets of positive integers. If the argument <var class="Arg">bool</var> is <code class="keyw">false</code>, then only the non-singleton classes are returned.</p>
<p>The second and third arguments are optional, the default values are the degree of <var class="Arg">f</var> and <code class="keyw">true</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 11, 1, 12, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">KernelOfTransformation(f);</span>
[ [ 1, 4 ], [ 2, 5 ], [ 3 ], [ 6, 7 ], [ 8, 10 ], [ 9 ], [ 11 ],
[ 12 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">KernelOfTransformation(f, 5);</span>
[ [ 1, 4 ], [ 2, 5 ], [ 3 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">KernelOfTransformation(f, 5, false);</span>
[ [ 1, 4 ], [ 2, 5 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">KernelOfTransformation(f, 15);</span>
[ [ 1, 4 ], [ 2, 5 ], [ 3 ], [ 6, 7 ], [ 8, 10 ], [ 9 ], [ 11 ],
[ 12 ], [ 13 ], [ 14 ], [ 15 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">KernelOfTransformation(f, false); </span>
[ [ 1, 4 ], [ 2, 5 ], [ 6, 7 ], [ 8, 10 ] ]</pre></div>
<p><a id="X860306EB7FAAD2D4" name="X860306EB7FAAD2D4"></a></p>
<h5>53.5-13 InverseOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InverseOfTransformation</code>( <var class="Arg">f</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A transformation.</p>
<p><code class="code">InverseOfTransformation</code> returns a semigroup inverse of the transformation <var class="Arg">f</var> in the full transformation semigroup. An <em>inverse</em> of <var class="Arg">f</var> is any transformation <code class="code">g</code> such that <code class="code"><var class="Arg">f</var>*g*<var class="Arg">f</var>=<var class="Arg">f</var></code> and <code class="code">g*<var class="Arg">f</var>*g=g</code>. Every transformation has at least one inverse in a full transformation semigroup.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:=InverseOfTransformation(f);</span>
Transformation( [ 8, 1, 1, 1, 10, 2, 3, 1, 6, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">f*g*f;</span>
Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">g*f*g;</span>
Transformation( [ 8, 1, 1, 1, 10, 2, 3, 1, 6, 1 ] )</pre></div>
<p><a id="X7BB9DB6E8558356D" name="X7BB9DB6E8558356D"></a></p>
<h5>53.5-14 Inverse</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Inverse</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A transformation.</p>
<p>If the transformation <var class="Arg">f</var> is a bijection, then <code class="code">Inverse</code> or <code class="code"><var class="Arg">f</var>^-1</code> returns the inverse of <var class="Arg">f</var>. If <var class="Arg">f</var> is not a bijection, then <code class="keyw">fail</code> is returned.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Transformation( [ 3, 8, 12, 1, 11, 9, 9, 4, 10, 5, 10, 6 ] )^-1;</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">Transformation( [ 2, 3, 1 ] )^-1;</span>
Transformation( [ 3, 1, 2 ] )</pre></div>
<p><a id="X863216CB7AF88BED" name="X863216CB7AF88BED"></a></p>
<h5>53.5-15 IndexPeriodOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IndexPeriodOfTransformation</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A pair of positive integers.</p>
<p>Returns the least positive integers <code class="code">m</code> and <code class="code">r</code> such that <code class="code"><var class="Arg">f</var>^(m+r)=<var class="Arg">f</var>^m</code>, which are known as the <em>index</em> and <em>period</em> of the transformation <var class="Arg">f</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 3, 4, 4, 6, 1, 3, 3, 7, 1 ] );; </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IndexPeriodOfTransformation(f); </span>
[ 2, 3 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">f^2=f^5; </span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IndexPeriodOfTransformation(IdentityTransformation);</span>
[ 1, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IndexPeriodOfTransformation(Transformation([1,2,1]));</span>
[ 1, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IndexPeriodOfTransformation(Transformation([1,2,3]));</span>
[ 1, 1 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">IndexPeriodOfTransformation(Transformation([1,3,2]));</span>
[ 1, 2 ]</pre></div>
<p><a id="X85FE9F20810BCC70" name="X85FE9F20810BCC70"></a></p>
<h5>53.5-16 SmallestIdempotentPower</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ SmallestIdempotentPower</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A positive integer.</p>
<p>This function returns the least positive integer <code class="code">n</code> such that the transformation <code class="code"><var class="Arg">f</var>^n</code> is an idempotent. The smallest idempotent power of <var class="Arg">f</var> is the least multiple of the period of <var class="Arg">f</var> that is greater than or equal to the index of <var class="Arg">f</var>; see <code class="func">IndexPeriodOfTransformation</code> (<a href="chap53.html#X863216CB7AF88BED"><span class="RefLink">53.5-15</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 7, 4, 1, 7, 4, 6, 1, 3, 4 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestIdempotentPower(f);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 6, 6, 2, 7, 1, 5, 3, 10, 6 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">SmallestIdempotentPower(f);</span>
2</pre></div>
<p><a id="X858E944481F6B591" name="X858E944481F6B591"></a></p>
<h5>53.5-17 ComponentsOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ComponentsOfTransformation</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A list of lists of positive integers.</p>
<p><code class="code">ComponentsOfTransformation</code> returns a list of the components of the transformation <var class="Arg">f</var>. Each component is a subset of <code class="code">[1..DegreeOfTransformation(f)]</code>, and the union of the components is <code class="code">[1..DegreeOfTransformation(f)]</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] );</span>
Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentsOfTransformation(f); </span>
[ [ 1, 4, 6, 9 ], [ 2, 3, 5, 7, 10, 11, 12 ], [ 8 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=AsTransformation((1,8,2,4,11,5,10)(3,7)(9,12));</span>
Transformation( [ 8, 4, 7, 11, 10, 6, 3, 2, 12, 1, 5, 9 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentsOfTransformation(f); </span>
[ [ 1, 2, 4, 5, 8, 10, 11 ], [ 3, 7 ], [ 6 ], [ 9, 12 ] ]</pre></div>
<p><a id="X8640AE1C79201470" name="X8640AE1C79201470"></a></p>
<h5>53.5-18 NrComponentsOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ NrComponentsOfTransformation</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A positive integer.</p>
<p><code class="code">NrComponentsOfTransformation</code> returns the number of components of the transformation <var class="Arg">f</var> on the range <code class="code">[1..DegreeOfTransformation(<var class="Arg">f</var>)]</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] );</span>
Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">NrComponentsOfTransformation(f);</span>
3
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=AsTransformation((1,8,2,4,11,5,10)(3,7)(9,12));</span>
Transformation( [ 8, 4, 7, 11, 10, 6, 3, 2, 12, 1, 5, 9 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">NrComponentsOfTransformation(f);</span>
4</pre></div>
<p><a id="X784650B583CEAF7D" name="X784650B583CEAF7D"></a></p>
<h5>53.5-19 ComponentRepsOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ComponentRepsOfTransformation</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A list of lists of positive integers.</p>
<p><code class="code">ComponentRepsOfTransformation</code> returns the representatives, in the following sense, of the components of the transformation <var class="Arg">f</var>. For every <code class="code">i</code> in <code class="code">[1..DegreeOfTransformation(f)]</code> there exists a representative <code class="code">j</code> and a positive integer <code class="code">k</code> such that <code class="code">i^(<var class="Arg">f</var>^k)=j</code>. The representatives returned by <code class="code">ComponentRepsOfTransformation</code> are partitioned according to the component they belong to. <code class="code">ComponentRepsOfTransformation</code> returns the least number of representatives.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] );</span>
Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentRepsOfTransformation(f);</span>
[ [ 3, 10 ], [ 9 ], [ 8 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=AsTransformation((1,8,2,4,11,5,10)(3,7)(9,12));</span>
Transformation( [ 8, 4, 7, 11, 10, 6, 3, 2, 12, 1, 5, 9 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">ComponentRepsOfTransformation(f);</span>
[ [ 1 ], [ 3 ], [ 6 ], [ 9 ] ]</pre></div>
<p><a id="X7EAA15557D55D93B" name="X7EAA15557D55D93B"></a></p>
<h5>53.5-20 CyclesOfTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CyclesOfTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">list</var>] )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A list of lists of positive integers.</p>
<p>When the arguments of this function are a transformation<var class="Arg">f</var> and a list <var class="Arg">list</var>, it returns a list of the cycles of the components of <var class="Arg">f</var> containing any element of <var class="Arg">list</var>.</p>
<p>If the optional second argument is not present, then the range <code class="code">[1..DegreeOfTransformation(<var class="Arg">f</var>)]</code> is used as the default value for <var class="Arg">list</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] );</span>
Transformation( [ 6, 12, 11, 1, 7, 6, 2, 8, 4, 7, 5, 12 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">CyclesOfTransformation(f); </span>
[ [ 6 ], [ 12 ], [ 8 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CyclesOfTransformation(f, [ 1, 2, 4 ] ); </span>
[ [ 6 ], [ 12 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CyclesOfTransformation(f, [ 1 .. 17 ]);</span>
[ [ 6 ], [ 12 ], [ 8 ], [ 13 ], [ 14 ], [ 15 ], [ 16 ], [ 17 ] ]</pre></div>
<p><a id="X786EB02A829260DB" name="X786EB02A829260DB"></a></p>
<h5>53.5-21 CycleTransformationInt</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ CycleTransformationInt</code>( <var class="Arg">f</var>, <var class="Arg">n</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A list of positive integers.</p>
<p>If <var class="Arg">f</var> is a transformation and <var class="Arg">n</var> is a positive integer, then <code class="code">CycleTransformationInt</code> returns the cycle of the component of <var class="Arg">f</var> containing <var class="Arg">n</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 6, 2, 8, 4, 7, 5, 8, 3, 5, 8 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">CycleTransformationInt(f, 1);</span>
[ 8, 3 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CycleTransformationInt(f, 12);</span>
[ 12 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">CycleTransformationInt(f, 5); </span>
[ 8, 3 ]</pre></div>
<p><a id="X845869E0815A6AA6" name="X845869E0815A6AA6"></a></p>
<h5>53.5-22 LeftOne</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ LeftOne</code>( <var class="Arg">f</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">‣ RightOne</code>( <var class="Arg">f</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A transformation.</p>
<p><code class="code">LeftOne</code> returns an idempotent transformation <code class="code">e</code> such that the kernel (with respect to the degree of <var class="Arg">f</var>) of <code class="code">e</code> equals the kernel of the transformation <var class="Arg">f</var> and <code class="code">e*<var class="Arg">f</var>=f</code>.</p>
<p><code class="code">RightOne</code> returns an idempotent transformation <code class="code">e</code> such that the image set (with respect to the degree of <var class="Arg">f</var>) of <code class="code">e</code> equals the image set of <var class="Arg">f</var> and <code class="code"><var class="Arg">f</var>*e=f</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 11, 10, 2, 11, 4, 4, 7, 6, 9, 10, 1, 11 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">e:=RightOne(f);</span>
Transformation( [ 1, 2, 2, 4, 4, 6, 7, 7, 9, 10, 11, 11 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdempotent(e);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">f*e=f;</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">e:=LeftOne(f);</span>
Transformation( [ 1, 2, 3, 1, 5, 5, 7, 8, 9, 2, 11, 1 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">e*f=f; </span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsIdempotent(e);</span>
true</pre></div>
<p><a id="X7F19C9C77F9F8981" name="X7F19C9C77F9F8981"></a></p>
<h5>53.5-23 TrimTransformation</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ TrimTransformation</code>( <var class="Arg">f</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: Nothing.</p>
<p>It can happen that the internal representation of a transformation uses more memory than necessary. For example, this can happen when composing transformations where it is possible that the resulting transformation <var class="Arg">f</var> has belongs to <code class="code">IsTrans4Rep</code> and has its images stored as 32-bit integers, while none of its moved points exceeds 65536. The purpose of <code class="code">TrimTransformation</code> is to change the internal representation of such an <var class="Arg">f</var> to remove the trailing fixed points.</p>
<p>If the optional second argument <var class="Arg">n</var> is provided, then the internal representation of <var class="Arg">f</var> is reduced to the images of the first <var class="Arg">n</var> positive integers. Please note that it must be the case that <code class="code">i^<var class="Arg">f</var><=n</code> for all <code class="code">i</code> in the range <code class="code">[1..<var class="Arg">n</var>]</code> otherwise the resulting object will not define a transformation.</p>
<p>If the optional second argument is not included, then the degree of <var class="Arg">f</var> is used by default.</p>
<p>The transformation <var class="Arg">f</var> is changed in-place, and nothing is returned by this function.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 1 .. 2^16 ], x-> x+1 );</span>
<transformation on 65537 pts with rank 65536>
<span class="GAPprompt">gap></span> <span class="GAPinput">g:=Transformation( [ 1 .. 2^16+1 ], function(x)</span>
<span class="GAPprompt">></span> <span class="GAPinput">if x=1 or x=65537 then return x; else return x-1; fi; end);</span>
<transformation on 65536 pts with rank 65535>
<span class="GAPprompt">gap></span> <span class="GAPinput">h:=g*f;</span>
Transformation( [ 2, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformation(h); IsTrans4Rep(h); MemoryUsage(h);</span>
65537
true
262188
<span class="GAPprompt">gap></span> <span class="GAPinput">TrimTransformation(h); h;</span>
Transformation( [ 2, 2 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformation(h); IsTrans4Rep(h); MemoryUsage(h);</span>
2
false
44</pre></div>
<p><a id="X810D23017A5527B7" name="X810D23017A5527B7"></a></p>
<h4>53.6 <span class="Heading">Displaying transformations</span></h4>
<p>It is possible to change the way that <strong class="pkg">GAP</strong> displays transformations using the user preferences <code class="code">TransformationDisplayLimit</code> and <code class="code">NotationForTransformations</code>; see Section <code class="func">UserPreference</code> (<a href="chap3.html#X7B0AD104839B6C3C"><span class="RefLink">3.2-3</span></a>) for more information about user preferences.</p>
<p>If <code class="code">f</code> is a transformation where degree <code class="code">n</code> exceeds the value of the user preference <code class="code">TransformationDisplayLimit</code>, then <code class="code">f</code> is displayed as:</p>
<div class="example"><pre><transformation on n pts with rank r></pre></div>
<p>where <code class="code">r</code> is the rank of <code class="code">f</code> relative to <code class="code">n</code>. The idea is to abbreviate the display of transformations defined on many points. The default value for the <code class="code">TransformationDisplayLimit</code> is <code class="code">100</code>.</p>
<p>If the degree of <code class="code">f</code> does not exceed the value of <code class="code">TransformationDisplayLimit</code>, then how <code class="code">f</code> is displayed depends on the value of the user preference <code class="code">NotationForTransformations</code>.</p>
<p>There are two possible values for <code class="code">NotationForTransformations</code>:</p>
<dl>
<dt><strong class="Mark">input</strong></dt>
<dd><p>With this option a transformation <var class="Arg">f</var> is displayed in as: <code class="code">Transformation(ImageListOfTransformation(<var class="Arg">f</var>, n)</code> where <code class="code">n</code> is the degree of <var class="Arg">f</var>. The only exception is the identity transformation, which is displayed as: <code class="code">IdentityTransformation</code>.</p>
</dd>
<dt><strong class="Mark">fr</strong></dt>
<dd><p>With this option a transformation <var class="Arg">f</var> is displayed in as: <code class="code"><transformation: ImageListOfTransformation(<var class="Arg">f</var>, n)></code> where <code class="code">n</code> is the largest moved point of <var class="Arg">f</var>. The only exception is the identity transformation, which is displayed as: <code class="code"><identity transformation></code>.</p>
</dd>
</dl>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference("TransformationDisplayLimit", 12);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation([ 3, 8, 12, 1, 11, 9, 9, 4, 10, 5, 10, 6 ]);</span>
<transformation on 12 pts with rank 10>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference("TransformationDisplayLimit", 100);</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f;</span>
Transformation( [ 3, 8, 12, 1, 11, 9, 9, 4, 10, 5, 10, 6 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">SetUserPreference("NotationForTransformations", "fr");</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">f;</span>
<transformation: 3,8,12,1,11,9,9,4,10,5,10,6></pre></div>
<p><a id="X7B51CE257B814B09" name="X7B51CE257B814B09"></a></p>
<h4>53.7 <span class="Heading">Semigroups of transformations</span></h4>
<p>As mentioned at the start of the chapter, every semigroup is isomorphic to a semigroup of transformations, and in this section we describe the functions in <strong class="pkg">GAP</strong> specific to transformation semigroups. For more information about semigroups in general see Chapter <a href="chap51.html#X8665D8737FDD5B10"><span class="RefLink">51</span></a>.</p>
<p>The <strong class="pkg">Semigroups</strong> package contains many additional functions and methods for computing with semigroups of transformations. In particular, <strong class="pkg">Semigroups</strong> contains more efficient methods than those available in the <strong class="pkg">GAP</strong> library (and in many cases more efficient than any other software) for creating semigroups of transformations, calculating their Green"s classes, size, elements, group of units, minimal ideal, small generating sets, testing membership, finding the inverses of a regular element, factorizing elements over the generators, and more. Since a transformation semigroup is also a transformation collection, there are special methods for <code class="func">MovedPoints</code> (<a href="chap53.html#X844F00F982D5BD3C"><span class="RefLink">53.5-5</span></a>), <code class="func">NrMovedPoints</code> (<a href="chap53.html#X7FA6A4B57FDA003D"><span class="RefLink">53.5-6</span></a>), <code class="func">LargestMovedPoint</code> (<a href="chap53.html#X8383A7727AC97724"><span class="RefLink">53.5-8</span></a>), <code class="func">SmallestMovedPoint</code> (<a href="chap53.html#X86C0DDDC7881273A"><span class="RefLink">53.5-7</span></a>), <code class="func">LargestImageOfMovedPoint</code> (<a href="chap53.html#X7E7172567C3A3E63"><span class="RefLink">53.5-10</span></a>), and <code class="func">SmallestImageOfMovedPoint</code> (<a href="chap53.html#X7CCFE27E83676572"><span class="RefLink">53.5-9</span></a>), when applied to a transformation semigroup.</p>
<p><a id="X7EAF835D7FE4026F" name="X7EAF835D7FE4026F"></a></p>
<h5>53.7-1 IsTransformationSemigroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsTransformationSemigroup</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">‣ IsTransformationMonoid</code>( <var class="Arg">obj</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code>.</p>
<p>A <em>transformation semigroup</em> is simply a semigroup consisting of transformations. An object <var class="Arg">obj</var> is a transformation semigroup in <strong class="pkg">GAP</strong> if it satisfies <code class="func">IsSemigroup</code> (<a href="chap51.html#X7B412E5B8543E9B7"><span class="RefLink">51.1-1</span></a>) and <code class="func">IsTransformationCollection</code> (<a href="chap53.html#X7A6747CE85F2E6EA"><span class="RefLink">53.1-2</span></a>).</p>
<p>A <em>transformation monoid</em> is a monoid consisting of transformations. An object <var class="Arg">obj</var> is a transformation monoid in <strong class="pkg">GAP</strong> if it satisfies <code class="func">IsMonoid</code> (<a href="chap51.html#X861C523483C6248C"><span class="RefLink">51.2-1</span></a>) and <code class="func">IsTransformationCollection</code> (<a href="chap53.html#X7A6747CE85F2E6EA"><span class="RefLink">53.1-2</span></a>).</p>
<p>Note that it is possible for a transformation semigroup to have a multiplicative neutral element (i.e. an identity element) but not to satisfy <code class="code">IsTransformationMonoid</code>. For example,</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f:=Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(f, One(f));</span>
<commutative transformation monoid on 10 pts with 1 generator>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonoid(S);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">IsTransformationMonoid(S);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup( Transformation( [ 3, 8, 1, 4, 5, 6, 7, 1, 10, 10 ] ), </span>
<span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 10 ] ) );</span>
<transformation semigroup on 10 pts with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">One(S);</span>
fail
<span class="GAPprompt">gap></span> <span class="GAPinput">MultiplicativeNeutralElement(S);</span>
Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 10 ] )
<span class="GAPprompt">gap></span> <span class="GAPinput">IsMonoid(S);</span>
false</pre></div>
<p>In this example <code class="code">S</code> cannot be converted into a monoid using <code class="func">AsMonoid</code> (<a href="chap51.html#X7B22038F832B9C0F"><span class="RefLink">51.2-5</span></a>) since the <code class="func">One</code> (<a href="chap31.html#X8046262384895B2A"><span class="RefLink">31.10-2</span></a>) of any element in <code class="code">S</code> differs from the multiplicative neutral element.</p>
<p>For more details see <code class="func">IsMagmaWithOne</code> (<a href="chap35.html#X86071DE7835F1C7C"><span class="RefLink">35.1-2</span></a>).</p>
<p><a id="X7EA699C687952544" name="X7EA699C687952544"></a></p>
<h5>53.7-2 DegreeOfTransformationSemigroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DegreeOfTransformationSemigroup</code>( <var class="Arg">S</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: A non-negative integer.</p>
<p>The <em>degree</em> of a transformation semigroup <var class="Arg">S</var> is just the maximum of the degrees of the elements of <var class="Arg">S</var>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(Transformation( [ 3, 8, 1, 4, 5, 6, 7, 1, 10, 10, 11 ] ),</span>
<span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 11 ] ) );</span>
<transformation semigroup on 10 pts with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">DegreeOfTransformationSemigroup(S);</span>
10</pre></div>
<p><a id="X7D2B0685815B4053" name="X7D2B0685815B4053"></a></p>
<h5>53.7-3 FullTransformationSemigroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FullTransformationSemigroup</code>( <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ FullTransformationMonoid</code>( <var class="Arg">n</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: The full transformation semigroup of degree <var class="Arg">n</var>.</p>
<p>If <var class="Arg">n</var> is a positive integer, then <code class="code">FullTransformationSemigroup</code> returns the monoid consisting of all transformations with degree at most <var class="Arg">n</var>, called the <em>full transformation semigroup</em>.</p>
<p>The full transformation semigroup is regular, has <code class="code"><var class="Arg">n</var>^<var class="Arg">n</var></code> elements, and is generated by any set containing transformations that generate the symmetric group on <var class="Arg">n</var> points and any transformation of rank <code class="code"><var class="Arg">n</var>-1</code>.</p>
<p><code class="code">FulTransformationMonoid</code> is a synonym for <code class="code">FullTransformationSemigroup</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">FullTransformationSemigroup(1234); </span>
<full transformation semigroup on 1234 pts></pre></div>
<p><a id="X85C58E1E818C838C" name="X85C58E1E818C838C"></a></p>
<h5>53.7-4 IsFullTransformationSemigroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsFullTransformationSemigroup</code>( <var class="Arg">S</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">‣ IsFullTransformationMonoid</code>( <var class="Arg">S</var> )</td><td class="tdright">( property )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">false</code>.</p>
<p>If the transformation semigroup <var class="Arg">S</var> of degree <code class="code">n</code> contains every transformation of degree at most <code class="code">n</code>, then <code class="code">IsFullTransformationSemigroup</code> return <code class="keyw">true</code> and otherwise it returns <code class="keyw">false</code>.</p>
<p><code class="code">IsFullTransformationMonoid</code> is a synonym of <code class="code">IsFullTransformationSemigroup</code>. It is common in the literature for the full transformation monoid to be referred to as the full transformation semigroup.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(AsTransformation((1,3,4,2), 5), AsTransformation((1,3,5), 5),</span>
<span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 1, 1, 2, 3, 4 ] ));</span>
<transformation semigroup on 5 pts with 3 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFullTransformationSemigroup(S);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">S;</span>
<full transformation semigroup on 5 pts>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFullTransformationMonoid(S);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=FullTransformationSemigroup(5);; </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsFullTransformationSemigroup(S);</span>
true</pre></div>
<p><a id="X78F29C817CF6827F" name="X78F29C817CF6827F"></a></p>
<h5>53.7-5 IsomorphismTransformationSemigroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsomorphismTransformationSemigroup</code>( <var class="Arg">S</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">‣ IsomorphismTransformationMonoid</code>( <var class="Arg">S</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: An isomorphism to a transformation semigroup or monoid.</p>
<p>Returns an isomorphism from the finite semigroup <var class="Arg">S</var> to a transformation semigroup. For most types of objects in <strong class="pkg">GAP</strong> the degree of this transformation semigroup will be equal to the size of <var class="Arg">S</var> plus <code class="code">1</code>.</p>
<p>Let <code class="code"><var class="Arg">S</var>^1</code> denote the monoid obtained from <var class="Arg">S</var> by adjoining an identity element. Then <var class="Arg">S</var> acts faithfully on <code class="code"><var class="Arg">S</var>^1</code> by right multiplication, i.e. every element of <var class="Arg">S</var> describes a transformation on <code class="code">1,..,|S|+1</code>. The isomorphism from <var class="Arg">S</var> to the transformation semigroup described in this way is called the <em>right regular representation</em> of <var class="Arg">S</var>. In most cases, <code class="code">IsomorphismTransformationSemigroup</code> will return the right regular representation of <var class="Arg">S</var>.</p>
<p>As exceptions, if <var class="Arg">S</var> is a permutation group or a partial perm semigroup, then the elements of <var class="Arg">S</var> act naturally and faithfully by transformations on the values from <code class="code">1</code> to the largest moved point of <var class="Arg">S</var>.</p>
<p>If <var class="Arg">S</var> is a finitely presented semigroup, then the Todd-Coxeter approach will be attempted.</p>
<p><code class="code">IsomorphismTransformationMonoid</code> differs from <code class="code">IsomorphismTransformationSemigroup</code> only in that its range is a transformation monoid, and not only a semigroup, when the semigroup <var class="Arg">S</var> is a monoid.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">gens:= [ [ [ Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0 ] ], </span>
<span class="GAPprompt">></span> <span class="GAPinput"> [ [ Z(3), Z(3)^0 ], [ Z(3), 0*Z(3) ] ], </span>
<span class="GAPprompt">></span> <span class="GAPinput"> [ [ Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3) ] ] ];;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup(gens);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(S);</span>
81
<span class="GAPprompt">gap></span> <span class="GAPinput">IsomorphismTransformationSemigroup(S);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=SymmetricInverseSemigroup(4);</span>
<symmetric inverse semigroup on 4 pts>
<span class="GAPprompt">gap></span> <span class="GAPinput">IsomorphismTransformationMonoid(S);</span>
MappingByFunction( <symmetric inverse semigroup on 4 pts>,
<transformation monoid on 5 pts with 4 generators>
, function( x ) ... end, <Operation "AsPartialPerm"> )
<span class="GAPprompt">gap></span> <span class="GAPinput">G:=Group((1,2,3));</span>
Group([ (1,2,3) ])
<span class="GAPprompt">gap></span> <span class="GAPinput">IsomorphismTransformationMonoid(G);</span>
MappingByFunction( Group([ (1,2,3) ]), <commutative transformation
monoid on 3 pts with 1 generator>
, function( x ) ... end, function( x ) ... end )</pre></div>
<p><a id="X820ECE00846E480F" name="X820ECE00846E480F"></a></p>
<h5>53.7-6 AntiIsomorphismTransformationSemigroup</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AntiIsomorphismTransformationSemigroup</code>( <var class="Arg">S</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: An anti-isomorphism.</p>
<p>If <var class="Arg">S</var> is a semigroup, then <code class="code">AntiIsomorphismTransformationSemigroup</code> returns an anti-isomorphism from <var class="Arg">S</var> to a transformation semigroup. At present, the degree of the resulting transformation semigroup equals the size of <var class="Arg">S</var> plus <span class="SimpleMath">1</span>, and, consequently, this function is of limited use.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">S:=Semigroup( Transformation( [ 5, 5, 1, 1, 3 ] ), </span>
<span class="GAPprompt">></span> <span class="GAPinput">Transformation( [ 2, 4, 1, 5, 5 ] ) );</span>
<transformation semigroup on 5 pts with 2 generators>
<span class="GAPprompt">gap></span> <span class="GAPinput">Size(S);</span>
172
<span class="GAPprompt">gap></span> <span class="GAPinput">AntiIsomorphismTransformationSemigroup(S);</span>
MappingByFunction( <transformation semigroup of size 172,
on 5 pts with 2 generators>, <transformation semigroup
on 173 pts with 2 generators>
, function( x ) ... end, function( x ) ... end )</pre></div>
<div class="chlinkprevnextbot"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap52.html">[Previous Chapter]</a> <a href="chap54.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>
|