/usr/share/gap/lib/tom.gi is in gap-libs 4r7p9-1.
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 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 | #############################################################################
##
#W tom.gi GAP library Götz Pfeiffer
#W & Thomas Merkwitz
##
##
#Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany
#Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
#Y Copyright (C) 2002 The GAP Group
##
## This file contains methods for tables of marks.
##
## 1. Tables of Marks
## 2. More about Tables of Marks
## 3. Table of Marks Objects in {\GAP}
## 4. Constructing Tables of Marks
## 5. Printing Tables of Marks
## 6. Sorting Tables of Marks
## 7. Technical Details about Tables of Marks
## 8. Attributes of Tables of Marks
## 9. Properties of Tables of Marks
## 10. Other Operations for Tables of Marks
## 11. Accessing Subgroups via Tables of Marks
## 12. The Interface between Tables of Marks and Character Tables
## 13. Generic Construction of Tables of Marks
##
#############################################################################
##
## 4. Constructing Tables of Marks
##
#############################################################################
##
#F GeneratorsListTom( <G>, <classes> ) . . . . . . . . . . create generators
##
## `GeneratorsListTom' lists a set of generators for a representative
## of each conjugacy class of subgroups.
##
BindGlobal( "GeneratorsListTom", function( G, classes )
local sub, gen, res;
# take the generators
sub:= List( classes, x -> GeneratorsOfGroup( Representative( x ) ) );
# form the generators list
gen:= Union( sub );
# compute the positions
res:= List( sub, grp -> List( grp, elm -> Position( gen, elm ) ) );
return [ gen, res ];
end );
#############################################################################
##
#M TableOfMarks( <G> ) . . . . . . . . compute the table of marks of a group
##
InstallMethod( TableOfMarks,
"for a cyclic group",
[ IsGroup and IsCyclic ],
function( G )
local n, c, tom, gens, gen, subs, marks, classNames,
name, i, j, divs, index;
n:= Size( G );
# construct the table of marks without the group
# initialize
divs:= DivisorsInt( n );
c:= Length( divs );
subs:= [];
marks:= [];
classNames:=[];
# Compute generators for each subgroup.
gens:= GeneratorsOfGroup( G );
if 1 < Length( gens ) then
gens:= MinimalGeneratingSet( G );
fi;
if 0 < Length( gens ) then
gen:= gens[1];
else
gen:= One( G );
fi;
gens:= [ List( divs, d -> gen^(n/d) ),
List( [ 1 .. c ], i -> [ i ] ) ];
# construct each subgroup (each divisor)
for i in [ 1 .. c ] do
classNames[i]:= String( divs[i] );
ConvertToStringRep( classNames[i] );
index:= n / divs[i];
subs[i]:= [];
marks[i]:= [];
for j in [1..i] do
if divs[i] mod divs[j] = 0 then
Add( subs[i], j );
Add( marks[i], index );
fi;
od;
od;
# add new components
if HasName( G ) then
name:= Name( G );
else
name:= Concatenation( "C", String( n ) );
fi;
# make the object
tom:= rec( Identifier := name,
SubsTom := subs,
MarksTom := marks,
NormalizersTom := List( [ 1 .. c ], x -> c ),
DerivedSubgroupsTomUnique := List( [ 1 .. c ], x -> 1 ),
UnderlyingGroup := G,
GeneratorsSubgroupsTom := gens );
tom:= ConvertToTableOfMarks( tom );
SetClassNamesTom( tom, classNames );
return tom;
end );
#############################################################################
##
#F TableOfMarksByLattice( <G> )
##
InstallGlobalFunction( TableOfMarksByLattice, function( G )
local marks, # components of the table of marks
subs,
normalizers,
derivedSubgroups,
gens,
tom,
mrks, # marks for one class
ind, # index of <I> in <N>
zuppos, # generators of prime power order
classes, # list of all classes
classesZups, # zuppos blist of classes
I, # representative of a class
Ielms, # elements of <I>
Izups, # zuppos blist of <I>
N, # normalizer of <I>
D, # derived subgroup of <I>,
Delms, # elements of <D>,
Dzups, # zuppos blist of <D>
DG, # derived subgroup of <G>
DGzups, # zuppos blist of <DG>
Jzups, # zuppos of a conjugate of <I>
Kzups, # zuppos of a representative in <classes>
reps, # transversal of <N> in <G>
i,k,l,r; # loop variables
#T Is this necessary at all?
LatticeSubgroups( G );
# compute the lattice,fetch the classes,zuppos,and representatives
classes:= ShallowCopy( ConjugacyClassesSubgroups( G ) );
# sort the classes
Sort(classes,function(a,b) return Size(Representative(a)) <
Size(Representative(b)); end);
classesZups:=[];
# compute a system of generators for the cyclic sgr. of prime power size
zuppos:=Zuppos(G);
# initialize the table of marks
Info(InfoLattice,1,"computing table of marks");
subs:=List([1..Length(classes)],x->[]);
marks:=List([1..Length(classes)],x->[]);
derivedSubgroups:=[];
normalizers:=[];
DG:= DerivedSubgroup( G );
if Size(DG) = Size(G) then # G perfect
derivedSubgroups[Length(classes)]:= Length(classes);
elif Size(DG) = 1 then # G abelian
derivedSubgroups[Length(classes)]:= 1;
else
DGzups:=BlistList(zuppos,AttributeValueNotSet(AsList,DG));
fi;
Unbind(DG);
# loop over all classes
for i in [1..Length(classes)-1] do
# take the subgroup <I>
I:=Representative(classes[i]);
# compute the zuppos blist of <I>
Ielms:=AttributeValueNotSet(AsList,I);
Izups:=BlistList(zuppos,Ielms);
classesZups[i]:=Izups;
# compute the normalizer of <I>
N:=Normalizer(G,I);
ind:=Size(N)/Size(I);
if Size(N)=Size(I) then # <I> selfnormalizing
normalizers[i]:=i;
elif Size(N)=Size(G) then # <I> normal
normalizers[i]:=Length(classes);
else
normalizers[i]:=BlistList(zuppos,
AttributeValueNotSet(AsList,N));
fi;
# compute the derived subgroup
D:= AttributeValueNotSet( DerivedSubgroup, I );
if Size(D) = Size(I) then # <I> perfect
derivedSubgroups[i]:=i;
elif Size(D) = 1 then # <I> abelian
derivedSubgroups[i]:=1;
else
Delms:=AttributeValueNotSet(AsList,D);
Dzups:=BlistList(zuppos,Delms);
fi;
# compute the right transversal (but don't store it)
reps:=RightTransversalOp(G,N);
# set up the marking list
mrks :=ListWithIdenticalEntries(Length(classes),0);
mrks[1]:=Length(reps) * ind;
mrks[i]:=1 * ind;
# loop over the conjugates of <I>
for r in [1..Length(reps)] do
# compute the zuppos blist of the conjugate
if reps[r] = One(G) then
Jzups:=Izups;
else
Jzups:=BlistList(zuppos,OnTuples(Ielms,reps[r]));
if not IsBound(derivedSubgroups[i]) then
Dzups:= BlistList(zuppos,OnTuples(Delms,reps[r]));
fi;
fi;
#look if the conjugate of <I> is the normalizer of a smaller
#class
for k in [2..i-1] do
if normalizers[k]=Jzups then
normalizers[k]:=i;
fi;
od;
# look if it is the derived subgroup of G
if IsBound(DGzups) and DGzups = Jzups then
derivedSubgroups[Length(classes)]:=i;
Unbind(DGzups);
fi;
# loop over all other (smaller classes)
for k in [2..i-1] do
Kzups:=classesZups[k];
#test if the <K> is the derived subgroup of <J>
if not IsBound(derivedSubgroups[i]) and Kzups = Dzups then
derivedSubgroups[i]:=k;
Unbind(Dzups);
fi;
# test if the <K> is a subgroup of <J>
if IsSubsetBlist(Jzups,Kzups) then
mrks[k]:=mrks[k] + ind;
fi;
od;
od;
# compress this line into the table of marks
for k in [1..i] do
if mrks[k] <> 0 then
Add(subs[i],k);
Add(marks[i],mrks[k]);
fi;
od;
Unbind(Ielms);
Unbind(Delms);
Unbind(reps);
Info( InfoLattice, 2,
"testing class ",i,", size = ",Size(I),
", length = ",Size(G) / Size(N),", includes ",
Length(marks[i])," classes");
od;
# Handle the whole group.
Info( InfoLattice,2,"testing class ",Length(classes),", size = ",
Size(G), ", length = ",1,", includes ",
Length(marks[Length(classes)])," classes");
subs[Length(classes)]:=[1..Length(classes)] + 0;
marks[Length(classes)]:=ListWithIdenticalEntries(Length(classes),1);
normalizers[Length(classes)]:=Length(classes);
# Make the object.
tom:= rec( SubsTom := subs,
MarksTom := marks,
NormalizersTom := normalizers,
DerivedSubgroupsTomUnique := derivedSubgroups,
UnderlyingGroup := G,
GeneratorsSubgroupsTom := GeneratorsListTom( G, classes ) );
ConvertToTableOfMarks( tom );
if HasName( G ) then
SetIdentifier( tom, Name( G ) );
fi;
return tom;
end );
InstallMethod( TableOfMarks,
"for a group with lattice",
[ IsGroup and HasLatticeSubgroups ], 10,
TableOfMarksByLattice );
InstallMethod( TableOfMarks,
"for solvable groups (call `LatticeSubgroups' and use the lattice)",
[ IsSolvableGroup ],
TableOfMarksByLattice );
InstallMethod( TableOfMarks,
"cyclic extension method",
[ IsGroup ],
function( G )
local factors, # factorization of <G>'s size
zuppos, # generators of prime power order
ll,
zupposPrime, # corresponding prime
zupposPower, # index of power of generator
nrClasses, # number of classes
classesZups, # zuppos blist of classes
classesExts, # extend-by blist of classes
perfect, # classes of perfect subgroups of <G>
perfectNew, # this class of perfect subgroups is new
perfectZups, # zuppos blist of perfect subgroups
layerb, # begin of previos layer
layere, # end of previous layer
H, # representative of a class
Hzups, # zuppos blist of <H>
Hexts, # extend blist of <H>
I, # new subgroup found
Ielms, # elements of <I>
Izups, # zuppos blist of <I>
N, # normalizer of <I>
Nzups, # zuppos blist of <N>
Jzups, # zuppos of a conjugate of <I>
Kzups, # zuppos of a representative in <classes>
reps, # transversal of <N> in <G>
h,i,k,l,r, # loop variables
tom, # table of marks (result)
marks, # componets of the table of marks
subs, #
normalizers, #
derivedSubgroups, #
groups, #
generators, #
genszups, # mark the generators
zupposmarks, # mark the zuppos used
gr, pos, # used to computed generators for the perfect
# subgroups
mrks, # marks for one class
ind, # index of <I> in <N>
D, # derived subgroup of <I>,
Delms, # elements of <D>,
Dzups, # zuppos blist of <D>
DGzups, # zuppos blist of <DG>
order, list, perm; # used to sort the table of marks
# compute the factorized size of <G>
factors:=Factors(Size(G));
# compute a system of generators for the cyclic sgr. of prime power size
zuppos:=Zuppos(G);
ll:=Length(zuppos);
Info(InfoLattice,1,"<G> has ",Length(zuppos)," zuppos");
# compute the prime corresponding to each zuppo and the index of power
zupposPrime:=[];
zupposPower:=[];
for r in zuppos do
i:=SmallestRootInt(Order(r));
Add(zupposPrime,i);
k:=0;
while k <> false do
k:=k + 1;
if GcdInt(i,k) = 1 then
l:=Position(zuppos,r^(i*k));
if l <> fail then
Add(zupposPower,l);
k:=false;
fi;
fi;
od;
od;
Info(InfoLattice,1,"powers computed");
# get the perfect subgroups
perfect:=RepresentativesPerfectSubgroups(G);
perfect:=Filtered(perfect,i->Size(i)>1 and Size(i)<Size(G));
perfectZups:=[];
perfectNew :=[];
for i in [1..Length(perfect)] do
I:=perfect[i];
perfectZups[i]:=BlistList(zuppos,AttributeValueNotSet(AsList,I));
perfectNew[i]:=true;
od;
Info(InfoLattice,1,"<G> has ",Length(perfect),
" representatives of perfect subgroups");
# initialize the classes list
nrClasses:=1;
classesZups:=[BlistList(zuppos,[One(G)])];
classesExts:=[DifferenceBlist(BlistList(zuppos,zuppos),classesZups[1])];
zupposmarks:=ListWithIdenticalEntries(Length(zuppos),false);
layere:=1;
layerb:=1;
# initialize the table of marks
Info(InfoLattice,1,"computing table of marks");
subs:=[[1]];
marks:=[[Size(G)]];
normalizers:=[fail];
derivedSubgroups:=[1];
genszups:=[[]];
I:= DerivedSubgroup( G );
if Size( I ) = Size( G ) then # G perfect
DGzups:=fail;
elif Size(I) = 1 then # G abelian
DGzups:=1;
else
DGzups:=BlistList(zuppos,AsList(I));
fi;
Unbind(I);
# loop over the layers of group (except the group itself)
for l in [1..Length(factors)-1] do
Info(InfoLattice,1,"doing layer ",l,",",
"previous layer has ",layere-layerb+1," classes");
# extend representatives of the classes of the previous layer
for h in [layerb..layere] do
# get the representative,its zuppos blist and extend-by blist
H:=Subgroup( Parent(G), zuppos{genszups[h]});
Hzups:=classesZups[h];
Hexts:=classesExts[h];
Info(InfoLattice,2,"extending subgroup ",h,", size = ",Size(H));
# loop over the zuppos whose <p>-th power lies in <H>
for i in [1..Length(zuppos)] do
if Hexts[i] and Hzups[zupposPower[i]] then
# make the new subgroup <I>
I:=SubgroupNC(Parent(G),Concatenation(GeneratorsOfGroup(H),
[zuppos[i]]));
SetSize(I,Size(H) * zupposPrime[i]);
# compute the zuppos blist of <I>
Ielms:=AttributeValueNotSet(AsList,I);
Izups:=BlistList(zuppos,Ielms);
# compute the normalizer of <I>
N:= Normalizer(G,I);
ind:=Size(N) / Size(I);
Info( InfoLattice, 2,
"found new class ", nrClasses + 1,
", size = ", Size(I),
", length = ", Size(G) / Size(N) );
# make the new conjugacy class
nrClasses:=nrClasses + 1;
if l < Length(factors) -1 then
classesZups[nrClasses]:=Izups;
fi;
subs[nrClasses]:=[];
marks[nrClasses]:=[];
genszups[nrClasses]:=ShallowCopy(genszups[h]);
Add(genszups[nrClasses],i);
zupposmarks[i]:=true;
#store the extend by blist and initialize the normalizer
if Size(N)=Size(I) then # <I> selfnormalizing
normalizers[nrClasses]:=nrClasses;
if l < Length(factors)-1 then
classesExts[nrClasses]:=
ListWithIdenticalEntries(ll,false);
fi;
elif Size(N)=Size(G) then # <I> normal
normalizers[nrClasses]:=fail;
if l < Length(factors) -1 then
classesExts[nrClasses]:=
DifferenceBlist(BlistList([1..ll],[1..ll]), Izups);
fi;
else
Nzups:=BlistList(zuppos,AttributeValueNotSet(AsList,N));
normalizers[nrClasses]:=ShallowCopy(Nzups);
if l < Length(factors) -1 then
SubtractBlist(Nzups,Izups);
classesExts[nrClasses]:=Nzups;
fi;
fi;
Unbind( Nzups);
# compute the derived subgroup
D:= AttributeValueNotSet( DerivedSubgroup, I );
if Size(D) = Size(I) then # <I> perfect
derivedSubgroups[nrClasses]:=nrClasses;
elif Size(D) = 1 then # <I> abelian
derivedSubgroups[nrClasses]:=1;
else
Delms:=AttributeValueNotSet(AsList,D);
Dzups:=BlistList(zuppos,Delms);
fi;
Unbind(D);
# compute the transversal
reps:=RightTransversalOp(G,N);
# set up the marking list
mrks:=ListWithIdenticalEntries(nrClasses,0);
mrks[nrClasses]:=1 * ind;
# loop over the conjugates of <I>
for r in reps do
# compute the zuppos blist of the conjugate
if r = One(G) then
Jzups:=Izups;
else
Jzups:=BlistList(zuppos,OnTuples(Ielms,r));
if not IsBound(derivedSubgroups[nrClasses]) then
Dzups:=BlistList(zuppos,OnTuples(Delms,r));
fi;
fi;
# look if the conjugate of <I> is the normalizer of
# a smaller class
for k in [2..layere] do
if normalizers[k]=Jzups then
normalizers[k]:=nrClasses;
fi;
od;
# look if it is the derived subgroup of G
if IsList(DGzups) and DGzups = Jzups then
DGzups:=nrClasses;
fi;
# loop over the already found classes
for k in [1..layere] do
Kzups:=classesZups[k];
#test if the <K> is the derived subgroup of <J>
if not IsBound(derivedSubgroups[nrClasses]) and
Kzups = Dzups then
derivedSubgroups[nrClasses]:=k;
Unbind(Dzups);
Unbind(Delms);
fi;
# test if the <K> is a subgroup of <J>
if IsSubsetBlist(Jzups,Kzups) then
mrks[k]:=mrks[k] + ind;
# don't extend <K> by the elements of <J>
if k >= h then
SubtractBlist(classesExts[k],Jzups);
fi;
fi;
od;#for k in [2..layere]
od;#for r in reps
# compress this line into the table of marks
for k in [1..nrClasses] do
if mrks[k] <> 0 then
Add(subs[nrClasses],k);
Add(marks[nrClasses],mrks[k]);
fi;
od;
Info(InfoLattice,2,"testing class ",nrClasses,
" size = ", Size(I),
", length = ",Size(G) / Size(N),", includes ",
Length(marks[nrClasses])," classes");
# now we are done with the new class
Unbind(Ielms);
Unbind(reps);
Unbind(I);
Unbind(N);
Info(InfoLattice,2,"tested inclusions");
fi; # if Hexts[i] and Hzups[zupposPower[i]] then ...
od; # for i in [1..Length(zuppos)] do ...
#remove the stuff we don't need anymore
classesExts[h]:=false;
Unbind(H);
od; # for h in [layerb..layere] do ...
# add the classes of perfect subgroups
for i in [1..Length(perfect)] do
if perfectNew[i]
and IsPerfectGroup(perfect[i])
and Length(Factors(Size(perfect[i]))) = l
then
# make the new subgroup <I>
I:=perfect[i];
# compute the zuppos blist of <I>
Ielms:=AttributeValueNotSet(AsList,I);
Izups:=BlistList(zuppos,Ielms);
# compute the normalizer of <I>
N:= Normalizer(G,I);
ind:=Size(N) / Size(I);
Info(InfoLattice,2,"found new class ",nrClasses+1,
", size = ",Size(I),
" length = ",Size(G) / Size(N));
# make the new conjugacy class
nrClasses:=nrClasses + 1;
if l < Length(factors) -1 then
classesZups[nrClasses]:=Izups;
fi;
subs[nrClasses]:=[];
marks[nrClasses]:=[];
gr:=TrivialSubgroup(G);
genszups[nrClasses]:=[];
k:=0;
while Size(gr) <> Size(I) do
k:=k+1;
if Izups[k] and not zuppos[k] in gr then
gr:=ClosureGroup(gr,zuppos[k]);
Add(genszups[nrClasses],k);
zupposmarks[k]:=true;
fi;
od;
#store the extend by blist and initialize the normalizer
if Size(N)=Size(I) then # <I> selfnormalizing
normalizers[nrClasses]:=nrClasses;
if l < Length(factors)-1 then
classesExts[nrClasses]:=
ListWithIdenticalEntries(ll,false);
fi;
elif Size(N)=Size(G) then # <I> normal
normalizers[nrClasses]:=fail;
if l < Length(factors) -1 then
classesExts[nrClasses]:=
DifferenceBlist(BlistList([1..ll],[1..ll]),Izups);
fi;
else
Nzups:=BlistList(zuppos,AttributeValueNotSet(AsList,N));
normalizers[nrClasses]:=ShallowCopy(Nzups);
if l < Length(factors) -1 then
SubtractBlist(Nzups,Izups);
classesExts[nrClasses]:=Nzups;
fi;
fi;
# compute the derived subgroup
derivedSubgroups[nrClasses]:=nrClasses;
# compute the transversal
reps:=RightTransversalOp(G,N);
# set up the marking list
mrks:=ListWithIdenticalEntries(nrClasses,0);
mrks[1]:=Length(reps) * ind;
mrks[nrClasses]:=1 * ind;
# loop over the conjugates of <I>
for r in reps do
# compute the zuppos blist of the conjugate
if r = One(G) then
Jzups:=Izups;
else
Jzups:=BlistList(zuppos,OnTuples(Ielms,r));
fi;
#look if the conjugate of <I> is the normalizer of a
#smaller class
for k in [2..layere] do
if normalizers[k]=Jzups then
normalizers[k]:=nrClasses;
fi;
od;
# look if it is the derived subgroup of G
if IsList(DGzups) and DGzups = Jzups then
DGzups:=nrClasses;
fi;
# loop over the perfect classes
for k in [i+1..Length(perfect)] do
Kzups:=perfectZups[k];
# throw away classes that appear twice in perfect
if Jzups = Kzups then
perfectNew[k]:=false;
perfectZups[k]:=[];
fi;
od;
# loop over all other (smaller) classes
for k in [2..layere] do
Kzups:=classesZups[k];
# test if the <K> is a subgroup of <J>
if IsSubsetBlist(Jzups,Kzups) then
mrks[k]:=mrks[k] + ind;
fi;
od;
od;
# compress this line into the table of marks
for k in [1..nrClasses] do
if mrks[k] <> 0 then
Add(subs[nrClasses],k);
Add(marks[nrClasses],mrks[k]);
fi;
od;
Info(InfoLattice,2,"testing class ",nrClasses,", size = ",
Size(I),
", length = ",Size(G) / Size(N),", includes ",
Length(marks[nrClasses])," classes");
# now we are done with the new class
Unbind(Ielms);
Unbind(reps);
Unbind(I);
Info(InfoLattice,2,"tested equalities");
# unbind the stuff we dont need any more
perfectZups[i]:=[];
fi;
# if IsPerfectGroup(I) and Length(Factors(Size(I))) = layer ...
od; # for i in [1..Length(perfect)] do
# on to the next layer
layerb:=layere+1;
layere:=nrClasses;
od; # for l in [1..Length(factors)-1] do ...
Unbind(classesZups);
# add the whole group to the list of classes
Info(InfoLattice,1,"doing layer ",Length(factors),",",
" previous layer has ",layere-layerb+1," classes");
if Size(G)>1 then
Info(InfoLattice,2,"found whole group, size = ",Size(G),",",
"length = 1");
nrClasses:=nrClasses + 1;
subs[nrClasses]:=[1..nrClasses] + 0;
marks[nrClasses]:=ListWithIdenticalEntries(nrClasses,1);
if DGzups = fail then
derivedSubgroups[nrClasses]:=nrClasses;
else
derivedSubgroups[nrClasses]:=DGzups;
fi;
normalizers[nrClasses]:=nrClasses;
Info(InfoLattice,2,"testing class ",nrClasses,", size = ",
Size(G), ", length = ",1,", includes ",
Length(marks[nrClasses])," classes");
fi;
# set the normalizer for normal subgroups
for i in [1..nrClasses-1] do
if normalizers[i] = fail then
normalizers[i]:=nrClasses;
fi;
od;
#Sort the table of marks
order:=List(marks,x->Size(G)/x[1]);
list:=[1..nrClasses];
Sort(list, function(a,b) return order[a] < order[b] or(order[a] =
order[b] and order[normalizers[b]] <order[normalizers[a]]); end);
perm:=Sortex(list)^-1;
derivedSubgroups:=List(derivedSubgroups,x->x^perm);
derivedSubgroups:=Permuted(derivedSubgroups, perm);
normalizers:=List(normalizers, x-> x^perm);
normalizers:=Permuted(normalizers, perm);
subs:=List(subs,x-> List(x, y-> y^perm));
subs:=Permuted(subs,perm);
marks:=Permuted(marks, perm);
for i in [1..Length(marks)] do
SortParallel(subs[i], marks[i]);
od;
genszups:=Permuted(genszups, perm);
# compute generators for each subgroup
k:=1;
pos:=[];
for i in [1..Length(zuppos)] do
if zupposmarks[i] then
zupposmarks[i]:=k;
k:=k+1;
Add(pos,i);
fi;
od;
generators:=Concatenation(zuppos{pos},GeneratorsOfGroup(G));
groups:=[];
for i in [1..nrClasses-1] do
groups[i]:=zupposmarks{genszups[i]};
od;
groups[nrClasses]:=[k..k+Length(GeneratorsOfGroup(G))-1 ];
# Make the object.
tom:= rec( SubsTom := subs,
MarksTom := marks,
NormalizersTom := normalizers,
DerivedSubgroupsTomUnique := derivedSubgroups,
UnderlyingGroup := G,
GeneratorsSubgroupsTom := [ generators, groups ] );
ConvertToTableOfMarks( tom );
if HasName( G ) then
SetIdentifier( tom, Name( G ) );
fi;
return tom;
end );
#############################################################################
##
#M TableOfMarks( <mat> ) . . . . . . . . table of marks defined by a matrix
##
InstallMethod( TableOfMarks,
"for a matrix or a lower triangular matrix",
[ IsTable ],
function( mat )
local i, j, val, subs, marks, tom;
# Check the argument.
if not ( ForAll( mat, IsHomogeneousList )
and ForAll( [ 1 .. Length( mat ) ],
i -> Length( mat[i] ) >= i ) ) then
TryNextMethod();
fi;
# Setup `SubsTom' and `MarksTom' values.
subs:= [];
marks:= [];
for i in [ 1 .. Length( mat ) ] do
if mat[i][1] <= 0 then
Info( InfoTom, 1, "first column must have positive entries" );
return fail;
elif mat[i][i] = 0 then
Info( InfoTom, 1, "diagonal entries must be nonzero" );
return fail;
fi;
for j in [ i+1 .. Length( mat[i] ) ] do
if mat[i][j] <> 0 then
Info( InfoTom, 1, "the matrix must be lower triangular" );
return fail;
fi;
od;
subs[i]:= [];
marks[i]:= [];
for j in [ 1 .. i ] do
val:= mat[i][j];
if val < 0 then
Info( InfoTom, 1, "all entries must be nonnegative integers" );
return fail;
elif 0 < val then
Add( subs[i], j );
Add( marks[i], mat[i][j] );
fi;
od;
od;
# Make the object.
tom:= rec( SubsTom := subs,
MarksTom := marks );
ConvertToTableOfMarks( tom );
# Test it.
if not IsInternallyConsistent( tom ) then
return fail;
fi;
# Return it.
return tom;
end );
#############################################################################
##
#F TableOfMarksFromLibrary( <name> )
##
## The `TableOfMarks' method for a string calls `TableOfMarksFromLibrary'.
## If the library of tables of marks is not available then we bind this
## to a dummy function that signals an error.
##
#if not IsBoundGlobal( "TableOfMarksFromLibrary" ) then
# BindGlobal( "TableOfMarksFromLibrary", function( arg )
# Error( "sorry, the GAP Tables Of Marks Library is not installed" );
# end );
#fi;
#############################################################################
##
#M TableOfMarks( <name> ) . . . . . . . . . . library table with given name
##
InstallMethod( TableOfMarks,
"for a string (dispatch to `TableOfMarksFromLibrary')",
[ IsString ],
str -> TableOfMarksFromLibrary( str ) );
#############################################################################
##
#M LatticeSubroups( <G> )
##
## method for a group with table of marks
## method for a cyclic group
##
## LatticeSubgroupsByTom( <G> )
##
InstallGlobalFunction( LatticeSubgroupsByTom, function( G )
local marks, i, lattice, classes, tom;
# Get the classes.
tom:= TableOfMarks( G );
classes:= List( [1..Length(OrdersTom( tom))], x-> ConjugacyClassSubgroups
(G, RepresentativeTom( tom, x)));
marks:=MarksTom(tom);
for i in [1..Length(classes)] do
SetSize(classes[i],marks[i][1]/marks[i][Length(marks[i])]);
od;
# Create the lattice.
lattice:=Objectify(NewType(FamilyObj(classes),IsLatticeSubgroupsRep),
rec());
lattice!.conjugacyClassesSubgroups:=classes;
lattice!.group :=G;
# Return the lattice.
return lattice;
end );
InstallMethod( LatticeSubgroups,
"for a group with table of marks",
[ IsGroup and HasTableOfMarks ], 10,
LatticeSubgroupsByTom );
InstallMethod( LatticeSubgroups,
"for a cyclic group",
[ IsGroup and IsCyclic ],
LatticeSubgroupsByTom );
#############################################################################
##
## 5. Printing Tables of Marks
##
#############################################################################
##
#M ViewObj( <tom> ) . . . . . . . . . . . . . . . . . print a table of marks
##
InstallMethod( ViewObj,
[ IsTableOfMarks ],
function( tom )
Print( "TableOfMarks( " );
if HasIdentifier( tom ) then
Print( "\"", Identifier( tom ), "\"" );
elif HasUnderlyingGroup( tom ) then
ViewObj( UnderlyingGroup( tom ) );
elif HasMarksTom( tom ) then
Print( "<", Length( MarksTom( tom ) ), " classes>" );
else
Print( "<nothing useful known>" );
fi;
Print( " )" );
end );
#############################################################################
##
#M PrintObj( <tom> )
##
InstallMethod( PrintObj,
[ IsTableOfMarks ],
function( tom )
Print( "TableOfMarks( " );
if HasIdentifier( tom ) then
Print( "\"", Identifier( tom ), "\"" );
elif HasUnderlyingGroup( tom ) then
PrintObj( UnderlyingGroup( tom ) );
elif HasMarksTom( tom ) then
Print( "<", Length( MarksTom( tom ) ), " classes>" );
else
Print( "<nothing useful known>" );
fi;
Print( " )" );
end );
#############################################################################
##
#M Display( <tom>[, <options>] ) . . . . . . . . . display a table of marks
##
InstallMethod( Display,
"for a table of marks (add empty options record)",
[ IsTableOfMarks ],
function( tom )
Display( tom, rec() );
end );
InstallOtherMethod( Display,
"for a table of marks and an options record",
[ IsTableOfMarks, IsRecord ],
function( tom, options )
local i, j, k, l, pr1, ll, lk, von, bis, pos, llength, pr, vals, subs,
classes, lc, ci, wt;
# default values.
subs:= SubsTom(tom);
ll:= Length(subs);
classes:= [1..ll];
vals:= MarksTom(tom);
# adjust parameters.
if IsBound(options.classes) and IsList(options.classes) then
classes:= options.classes;
fi;
if IsBound(options.form) then
if options.form = "supergroups" then
vals:= ShallowCopy(vals);
wt:= WeightsTom(tom);
for i in [1..ll] do
vals[i]:= vals[i]/wt[i];
od;
elif options.form = "subgroups" then
vals:= NrSubsTom(tom);
fi;
fi;
llength:= SizeScreen()[1];
von:= 1;
pr1:= LogInt(ll, 10);
# determine column width.
pr:= List([1..ll], x->0);
for i in [1..ll] do
for j in [1..Length(subs[i])] do
pr[subs[i][j]]:= Maximum(pr[subs[i][j]], LogInt(vals[i][j], 10));
od;
od;
lc:= Length(classes);
while von <= lc do
bis:= von;
# how many columns on this page?
lk:= pr1 + 5 + pr[classes[von]];
while bis < lc and lk+2+pr[classes[bis+1]] <= llength do
bis:= bis+1;
lk:= lk+2+pr[classes[bis]];
od;
# loop over rows.
for i in [von..lc] do
ci:= classes[i];
for k in [1 .. pr1-LogInt(ci, 10)] do
Print(" ");
od;
Print(ci, ": ");
# loop over columns.
for j in [von .. Minimum(i, bis)] do
pos:= Position(subs[ci], classes[j]);
if pos <> fail and pos > 0 then
l:= LogInt(vals[ci][pos], 10)-1;
else
l:= -1;
fi;
for k in [1 .. pr[classes[j]] - l] do
Print(" ");
od;
if pos = fail then
Print(".\c");
else
Print(vals[ci][pos], "\c");
fi;
od;
Print("\n");
od;
von:= bis+1;
Print("\n");
od;
end );
#############################################################################
##
## 6. Sorting Tables of Marks
##
#############################################################################
##
#M SortedTom( <tom>, <perm> ) . . . . . . . . . . . . sorted table of marks
##
InstallMethod( SortedTom,
[ IsTableOfMarks, IsPerm ],
function( tom, perm )
local i, components;
components:= rec();
if HasIdentifier( tom ) then
components.Identifier:= Identifier( tom );
fi;
components.SubsTom:= Permuted( List( SubsTom( tom ),
x -> ShallowCopy( OnTuples( x, perm ) ) ),
perm);
components.MarksTom:= Permuted( List( MarksTom( tom ), ShallowCopy ),
perm );
for i in [ 1 .. Length( components.SubsTom ) ] do
SortParallel( components.SubsTom[i], components.MarksTom[i] );
od;
if HasNormalizersTom( tom ) then
components.NormalizersTom:=
Permuted( OnTuples( NormalizersTom( tom ), perm ), perm );
fi;
if HasDerivedSubgroupsTomUnique( tom ) then
components.DerivedSubgroupsTomUnique:=
Permuted( OnTuples( DerivedSubgroupsTomUnique( tom ), perm ),
perm );
fi;
if HasUnderlyingGroup( tom ) then
components.UnderlyingGroup:= UnderlyingGroup( tom );
fi;
if HasStraightLineProgramsTom( tom ) then
components.StraightLineProgramsTom:=
Permuted( StraightLineProgramsTom( tom ), perm );
fi;
if HasGeneratorsSubgroupsTom(tom) then
components.GeneratorsSubgroupsTom:=
[ GeneratorsSubgroupsTom( tom )[1],
Permuted( GeneratorsSubgroupsTom( tom )[2], perm ) ];
fi;
ConvertToTableOfMarks( components );
if HasPermutationTom( tom ) then
SetPermutationTom( components, PermutationTom( tom ) * perm );
else
SetPermutationTom( components, perm );
fi;
return components;
end );
#############################################################################
##
## 7. Technical Details about Tables of Marks
##
#############################################################################
##
#F ConvertToTableOfMarks( <record> )
##
InstallGlobalFunction( ConvertToTableOfMarks, function( record )
local i, names;
names:= RecNames( record );
# Make the object.
Objectify( NewType( TableOfMarksFamily,
IsTableOfMarks and IsAttributeStoringRep ),
record );
# Set the attributes values.
for i in [ 1, 3 .. Length( TableOfMarksComponents )-1 ] do
if TableOfMarksComponents[i] in names then
Setter( TableOfMarksComponents[i+1] )( record,
record!.( TableOfMarksComponents[i] ) );
fi;
od;
return record;
end );
#############################################################################
##
## 8. Attributes of Tables of Marks
##
#############################################################################
##
#M MarksTom( <tom> ) . . . . . . . . . . . . . . . . . . . . . . . the marks
##
InstallMethod( MarksTom,
"for a table of marks with known `NrSubsTom' and `OrdersTom'",
[ IsTableOfMarks and HasNrSubsTom and HasOrdersTom ],
function( tom )
local i, j, ll, order, length, nrSubs, subs, marks, ord;
# get the attributes and initialize
order:=OrdersTom(tom);
subs:=SubsTom(tom);
length:=LengthsTom(tom);
nrSubs:=NrSubsTom(tom);
ll:=Length(order);
ord:=order[ll];
marks:=[[ord]];
# Compute the marks.
for i in [ 2 .. ll ] do
marks[i]:= [ ord / order[i] ];
for j in [ 2 .. Length( subs[i] ) ] do
marks[i][j]:= nrSubs[i][j] * marks[i][1] / length[ subs[i][j] ];
if not IsInt( marks[i][j] ) or marks[i][j] < 0 then
Info( InfoTom, 1,
"orbit length ", i, ", ", j, ": ", marks[i][j] );
fi;
od;
od;
return marks;
end );
#############################################################################
##
#M NrSubsTom( <tom> ) . . . . . . . . . . . . . . . . . numbers of subgroups
##
InstallMethod( NrSubsTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local i, j, nrSubs, subs, marks, length, index;
# initialize
length:= [];
nrSubs:= [];
subs:= SubsTom( tom );
marks:= MarksTom( tom );
# compute the numbers row by row
for i in [ 1 .. Length( subs ) ] do
index:= marks[i][Position(subs[i], 1)];
length[i]:= index / marks[i][Position(subs[i], i)];
nrSubs[i]:= [];
for j in [1..Length(subs[i])] do
nrSubs[i][j]:= marks[i][j] * length[subs[i][j]] / index;
if not IsInt( nrSubs[i][j] ) or nrSubs[i][j] < 0 then
Info( InfoTom, 1,
"orbit length ", i, ", ", j, ": ", nrSubs[i][j] );
fi;
od;
od;
return nrSubs;
end );
#############################################################################
##
#M OrdersTom( <tom> ) . . . . . . . . . . . . . . . . . orders of subgroups
##
InstallMethod( OrdersTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local subs, marks;
subs:= SubsTom( tom );
marks:= MarksTom( tom );
return List( [ 1 .. Length( subs ) ],
i -> marks[1][1] / marks[i][ Position( subs[i], 1 ) ] );
end );
#############################################################################
##
#M LengthsTom( <tom> ) . . . . . . . . . . length of the conjugacy classes
##
InstallMethod( LengthsTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local nrSubs;
nrSubs:= NrSubsTom( tom );
return nrSubs[ Length( nrSubs ) ];
end );
#############################################################################
##
#M ClassTypesTom( <tom> ) . . . . . . . . . . . . . . . types of subgroups
##
InstallMethod( ClassTypesTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local i, j, done, nrsubs, subs, order, type, struct, nrtypes;
nrsubs:= NrSubsTom(tom);
subs:= SubsTom(tom);
order:=OrdersTom(tom);
type:= [];
struct:= [];
nrtypes:= 1;
for i in [1..Length(subs)] do
# determine type
# classify according to the number of subgroups
struct[i]:= [];
for j in [2..Length(subs[i])-1] do
if IsBound(struct[i][type[subs[i][j]]]) then
struct[i][type[subs[i][j]]]:=
struct[i][type[subs[i][j]]] + nrsubs[i][j];
else
struct[i][type[subs[i][j]]]:= nrsubs[i][j];
fi;
od;
# consider the order
for j in [1..i-1] do
if order[j] = order[i] and struct[j] = struct[i] then
type[i]:= type[j];
fi;
od;
if not IsBound(type[i]) then
type[i]:= nrtypes;
nrtypes:= nrtypes+1;
fi;
od;
return type;
end );
#############################################################################
##
#F ClassNamesTom( <tom> ) . . . . . . . . . . . . . . . . . . . class names
##
InstallMethod( ClassNamesTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local i, c, classes, type, name, count, ord, alp, la;
type:= ClassTypesTom(tom);
# form classes.
classes:= List([1..Maximum(type)], x-> rec(elts:= []));
for i in [1..Length(type)] do
Add(classes[type[i]].elts, i);
od;
# determine type.
count:= rec();
for i in [1..Length(classes)] do
ord:= String(OrdersTom(tom)[classes[i].elts[1]]);
if IsBound(count.(ord)) then
count.(ord).nr:= count.(ord).nr + 1;
if count.(ord).nr < 10 then
classes[i].type:=
Concatenation("_", String(count.(ord).nr));
else
classes[i].type:=
Concatenation("_{", String(count.(ord).nr), "}");
fi;
else
count.(ord):= rec(first:= classes[i], nr:= 1);
classes[i].type:= "_1";
fi;
# cyclic?
if Set(NrSubsTom(tom)[classes[i].elts[1]]) = [1]
and IsCyclicTom(tom, classes[i].elts[1]) then
classes[i].order:= ord;
classes[i].type:= "";
else
classes[i].order:= Concatenation("(", ord, ")");
fi;
od;
# omit unique types.
for i in RecNames(count) do
if count.(i).nr = 1 then
count.(i).first.type:= "";
fi;
od;
# construct names.
name:= [];
alp:= ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
la:= Length(alp);
for c in classes do
if Length(c.elts) = 1 then
name[c.elts[1]]:= Concatenation(c.order, c.type);
else
for i in [1..Length(c.elts)] do
if i <= la then
name[c.elts[i]]:= Concatenation(c.order,c.type,alp[i]);
elif i <= la * (la+1) then
name[c.elts[i]]:= Concatenation(c.order, c.type,
alp[QuoInt(i-1, la)], alp[((i-1) mod la) +1]);
else
Error("did not expect more than ", la * (la+1),
"classes of the same type");
fi;
od;
fi;
od;
for c in name do
ConvertToStringRep( c );
od;
return name;
end );
#############################################################################
##
#M FusionsTom( <tom> )
##
InstallMethod( FusionsTom,
"for a table of marks",
[ IsTableOfMarks ],
x -> [] );
#############################################################################
##
#M IdempotentsTom( <tom> ) . . . . . . . . . . . . . . . . . . . idempotents
##
InstallMethod( IdempotentsTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local i, c, classes, p, ext, marks;
marks:= MarksTom( tom );
classes:= [ 1 .. Length( marks ) ];
for p in Set( Factors( marks[1][1] ) ) do
ext:= CyclicExtensionsTom( tom, p );
for c in ext do
for i in c do
classes[i]:= classes[ c[1] ];
od;
od;
od;
for i in [ 1 .. Length( classes ) ] do
classes[i]:= classes[ classes[i] ];
od;
return classes;
end );
#############################################################################
##
#M IdempotentsTomInfo( <tom> ) . . . . . . . . . . . . . . . . . idempotents
##
InstallMethod( IdempotentsTomInfo,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local ext, ll, result, class, idem;
ext:= CyclicExtensionsTom( tom );
ll:= Length( SubsTom( tom ) );
result:= rec( primidems := [],
fixpointvectors := [] );
for class in ext do
idem:= ListWithIdenticalEntries( ll, 0 );
idem{ class }:= List( class, x -> 1 );
Add( result.fixpointvectors, idem );
Add( result.primidems, DecomposedFixedPointVector( tom, idem ) );
od;
return result;
end );
#############################################################################
##
#M MatTom( <tom> ) . . . . . . convert compressed table of marks into matrix
##
InstallMethod( MatTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local i, j, subs, marks, ll, res;
marks:= MarksTom( tom );
subs:= SubsTom( tom );
ll:= [ 1 .. Length( subs ) ];
res:= [];
for i in ll do
res[i]:= ListWithIdenticalEntries( Length( ll ), 0 );
for j in [ 1 .. Length( subs[i] ) ] do
res[i][ subs[i][j] ]:= marks[i][j];
od;
od;
return res;
end );
#############################################################################
##
#M MoebiusTom( <tom> ) . . . . . . . . . . . . . . . . . . Moebius function
##
InstallMethod( MoebiusTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local i, j, mline, nline, ll, mdec, ndec, expec, done, no, comsec,
order, subs, nrsubs, length, der, result;
nrsubs:= NrSubsTom(tom);
subs:= SubsTom(tom);
length:= LengthsTom(tom);
order:=OrdersTom(tom);
mline:= List(subs, x-> 0);
nline:= List(subs, x-> 0);
ll:= Length( subs );
mline[ll]:= 1;
nline[ll]:= 1;
# decompose mline with tom
# decompose nline w.r.t. incidence
mdec:= [];
done:= false;
i:= Length(mline);
while not done do
while i>0 and mline[i] = 0 do
i:= i-1;
od;
if i = 0 then
done:= true;
else
mdec[i]:= mline[i];
for j in [1..Length(subs[i])] do
mline[subs[i][j]]:= mline[subs[i][j]] - mdec[i]*nrsubs[i][j];
od;
mdec[i]:= mdec[i] / length[i];
fi;
od;
ndec:= [];
done:= false;
i:= Length(nline);
while not done do
while i>0 and nline[i] = 0 do
i:= i-1;
od;
if i = 0 then
done:= true;
else
ndec[i]:= nline[i];
for j in subs[i] do
nline[j]:= nline[j] - ndec[i];
od;
fi;
od;
result:= rec( mu := mdec,
nu := ndec );
# Determine intersections with the derived subgroup of the whole group
# if this can be uniquely determined.
der:= DerivedSubgroupTom( tom, ll );
if IsInt( der ) then
expec:= [];
if der <> ll then
comsec:= [];
for i in [ 1 .. ll ] do
# There is only one intersection with normal subgroups.
comsec[i]:= Number( IntersectionsTom( tom, i, der ), x -> x <> 0 );
od;
for i in [ 1 .. Length( ndec ) ] do
if IsBound( ndec[i] ) then
no:= NormalizersTom( tom )[i];
# maybe the normalizer is not unique.
if IsList( no ) then
no:= List( no, x -> order[ comsec[x] ] );
no:= Set( no );
if Size( no ) > 1 then
Info( InfoTom, 2,
"Size of normalizer ", i, " not unique." );
else
no:= no[1];
fi;
else
no:= order[ comsec[ no ] ];
fi;
expec[i]:= ndec[i] * no / order[ comsec[i] ];
fi;
od;
else
# The group is perfect.
for i in [ 1 .. Length( ndec ) ] do
if IsBound( ndec[i] ) then
expec[i]:= ndec[i] * order[ ll ] / order[i] / length[i];
fi;
od;
fi;
result.ex:= expec;
result.hyp:= Filtered( [ 1 .. Length( expec ) ],
function( x )
if IsBound( expec[x] ) then
return ( not IsBound( mdec[x] ) )
or expec[x] <> mdec[x];
else
return IsBound( mdec[x] );
fi;
end );
fi;
return result;
end );
#############################################################################
##
#M WeightsTom( <tom> ) . . . . . . . . . . . . . . . . . . . . . . . weights
##
InstallMethod( WeightsTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local subs, marks;
marks:= MarksTom(tom);
subs:= SubsTom(tom);
return List( [ 1 .. Length( subs ) ],
i -> marks[i][ Position( subs[i], i ) ] );
end );
#############################################################################
##
## 9. Properties of Tables of Marks
##
#############################################################################
##
#M IsAbelianTom( <tom>[, <sub>] )
##
## If the group of <tom> is known then `IsAbelianTom' delegates the task
## to the group.
## Otherwise it is used that a group is abelian if and only if all subgroups
## are normal and the group contains no quaternion group of order $8$.
##
InstallMethod( IsAbelianTom,
"for a table of marks",
[ IsTableOfMarks ],
function( tom )
local marks, subs, nrSubs, order, result, sub, number, sub1;
result:=true;
marks:=MarksTom(tom);
order:=OrdersTom(tom);
subs:=SubsTom(tom);
nrSubs:=NrSubsTom(tom);
# All subgroups must be normal.
for sub in [ 1 .. Length( order ) ] do
if marks[ sub ][1] <> marks[ sub ][ Length( marks[ sub ] ) ] then
return false;
fi;
od;
# Test the subgroups of order $8$.
for sub in [2..Length(order)] do
if order[sub]=8 then
#count the number of subgroups of sub
number:=0;
for sub1 in subs[sub] do
number:=number+nrSubs[sub][Position(subs[sub],sub1)];
od;
#q8 is determined by its number of subgroups
if number=6 then
return false;
fi;
fi;
od;
return result;
end );
InstallMethod( IsAbelianTom,
"for a table of marks and a positive integer",
[ IsTableOfMarks, IsPosInt ], 10,
function( tom, sub )
sub:= DerivedSubgroupTom( tom, sub );
if IsInt( sub ) then
return sub = 1;
elif not 1 in sub then
return false;
else
TryNextMethod();
fi;
end );
InstallMethod( IsAbelianTom,
"for a table of marks with known der. subgroups, and a positive integer",
[ IsTableOfMarks and HasDerivedSubgroupsTomUnique, IsPosInt ], 1000,
function( tom, sub )
return DerivedSubgroupsTomUnique( tom )[ sub ] = 1;
end );
InstallMethod( IsAbelianTom,
"for a table of marks with generators, and a positive integer",
[ IsTableOfMarks and IsTableOfMarksWithGens, IsPosInt ],
function( tom, sub )
return IsAbelian( RepresentativeTom( tom, sub ) );
end );
#############################################################################
##
#M IsCyclicTom( <tom>[, <sub>] ) . . . . check whether a subgroup is cyclic
##
## A subgroup is cyclic if and only if the sum of the corresponding row of
## the inverse table of marks is nonzero (see Kerber, S. 125).
## Thus we only have to decompose the corresponding idempotent.
##
InstallMethod( IsCyclicTom,
"for a table of marks",
[ IsTableOfMarks ],
tom -> IsCyclicTom( tom, Length( SubsTom( tom ) ) ) );
InstallMethod( IsCyclicTom,
"for a table of marks and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local mline;
mline:= 0 * [ 1 .. sub ];
mline[ sub ]:= 1;
# Decompose mline w.r.t. tom, and determine whether the sum is nonzero.
return Sum( DecomposedFixedPointVector( tom, mline ), 0 ) <> 0;
end );
#############################################################################
##
#M IsNilpotentTom( <tom>[, <sub>] )
##
InstallMethod( IsNilpotentTom,
"for a table of marks",
[ IsTableOfMarks ],
tom -> IsNilpotentTom( tom, Length( SubsTom( tom ) ) ) );
InstallMethod( IsNilpotentTom,
"for a table of marks and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local factors, primes, exponents, i, pos;
factors:=Factors(OrdersTom(tom)[sub]);
factors:=Collected(factors);
primes:=List(factors,x->x[1]);
exponents:=List(factors,x->x[2]);
for i in [1..Length(primes)] do
pos:= Position( OrdersTom( tom ){ SubsTom( tom )[ sub ] },
primes[i]^exponents[i] );
if ContainedTom(tom,SubsTom(tom)[sub][pos],sub) > 1 then
return false;
fi;
od;
return true;
end );
#############################################################################
##
#M IsPerfectTom( <tom>[, <sub>] )
##
## A finite group is perfect if and only if it has no normal subgroup of
## prime index.
## This is tested here.
##
## If <tom> knows its underlying group the task is delegated to th group.
##
InstallMethod( IsPerfectTom,
"for a table of marks",
[ IsTableOfMarks ],
tom -> IsPerfectTom( tom, Length( SubsTom( tom ) ) ) );
InstallMethod( IsPerfectTom,
"for a table of marks with known der. subgroups, and a positive integer",
[ IsTableOfMarks and HasDerivedSubgroupsTomUnique, IsPosInt ],
function( tom, sub )
return DerivedSubgroupsTomUnique( tom )[ sub ] = sub;
end );
InstallMethod( IsPerfectTom,
"for a table of marks and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local ext, pos;
ext:=CyclicExtensionsTom(tom);
pos:=PositionProperty(ext,x-> sub in x);
return sub = Minimum(ext[pos]);
end );
#############################################################################
##
#M IsSolvableTom( <tom>[, <sub>] )
##
InstallMethod( IsSolvableTom,
"for a table of marks",
[ IsTableOfMarks ],
tom -> IsSolvableTom( tom, Length( SubsTom( tom ) ) ) );
InstallMethod( IsSolvableTom,
"for a table of marks and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local ext, pos;
ext:= CyclicExtensionsTom( tom );
pos:= PositionProperty( ext, x -> 1 in x );
return sub in ext[ pos ];
end );
#############################################################################
##
## 10. Other Operations for Tables of Marks
##
#############################################################################
##
#M IsInternallyConsistent( <tom> ) . . consistency check for table of marks
##
## The tensor product of two rows of the table of marks decomposes into
## rows of the table of marks with integer coefficients.
##
BindGlobal( "TestRow", function( tom, n )
local i, j, k, a, b, dec, test, marks, subs;
test:= true;
marks:= MarksTom(tom);
subs:= SubsTom(tom);
a:= [];
# decompress the nth line of <tom>
for i in [1..Length(subs[n])] do
a[subs[n][i]]:= marks[n][i];
od;
for i in Reversed([1..n]) do
# build the tensor product with row <i>
b:= [];
for j in [1..Length(subs[i])] do
k:= subs[i][j];
if IsBound(a[k]) then
b[k]:= a[k]*marks[i][j];
fi;
od;
for j in [1..Length(b)] do
if not IsBound(b[j]) then
b[j]:= 0;
fi;
od;
# deompose and test the tensor product
dec:= DecomposedFixedPointVector(tom, b);
if ForAny(Set(dec), x-> not IsInt(x) or (x < 0)) then
Info(InfoTom,2, n, ".", i, " = ", dec);
test:= false;
fi;
od;
return test;
end );
InstallMethod( IsInternallyConsistent,
"for a table of marks, decomposition test",
[ IsTableOfMarks ],
function( tom )
local test, g, i;
test:= true;
# Check that the underlying group has the right order.
if HasUnderlyingGroup( tom ) then
g:= UnderlyingGroup( tom );
if Size( g ) <> Size( Group( GeneratorsOfGroup( g ), One( g ) ) ) then
return false;
fi;
fi;
for i in [ 1 .. Length( SubsTom( tom ) ) ] do
if not TestRow( tom, i ) then
return false;
fi;
od;
return test;
end );
#############################################################################
##
#M DerivedSubgroupTom( <tom>, <sub> )
##
InstallMethod( DerivedSubgroupTom,
"for a table of marks, and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local set, primes, normalsubs, minindex, p, nrsubs, ext, pos, extp,
extps, sub1, sub2, result, i, j, indexsub1, indexsub2, index, int,
notnormal, res, factorel, normsub1, norm, res1, oddord, order,
normext, bool, n, orders, subs, isnormal, grd, der, poss;
# Check whether the derived subgroup has been computed already.
if HasDerivedSubgroupsTomUnique( tom ) then
return DerivedSubgroupsTomUnique( tom )[ sub ];
fi;
# Perhaps this is not the first time one has asked for this value.
poss:= DerivedSubgroupsTomPossible( tom );
if IsBound( poss[ sub ] ) then
return poss[ sub ];
fi;
# First consider the trivial cases.
if IsCyclicTom( tom, sub ) then
result:= 1;
elif IsPerfectTom( tom, sub ) then
result:= sub;
else
# Compute the possibilities.
isnormal:=function(tom,sub1,sub2)
local sub, result, res;
result:=false;
if ContainedTom(tom,sub1,sub2)=1 then
result:=true;
else
if IsInt(NormalizersTom(tom)[sub1]) then
if NormalizersTom(tom)[sub1]=sub2 then
result:=true;
elif sub2 in subs[NormalizersTom(tom)[sub1]] then
result:=0;
fi;
else
for sub in NormalizersTom(tom)[sub1] do
if sub2 in subs[sub] then
result:=0;
fi;
od;
fi;
fi;
return result;
end;
orders:=OrdersTom(tom);
subs:=SubsTom(tom);
# find normal subgroups of prime index
set:=Set(Factors(orders[sub]));
primes:=[];
normalsubs:=[];
minindex:=1;
for p in set do
nrsubs:=0;
ext:=CyclicExtensionsTom(tom,p);
pos:=PositionProperty(ext,x->sub in x);
extp:=Filtered(ext[pos],x->x in subs[sub] and orders[x] =
orders[sub]/p);
extps:=Filtered(ext[pos],x-> x in subs[sub] and orders[x]
= orders[sub]/p^2);
extps:=Filtered(extps,x->isnormal(tom,x,sub) = true);
Append(normalsubs,extps);
for sub1 in extp do
nrsubs:=nrsubs + ContainedTom(tom,sub1,sub);
Add(primes,p);
if Length(Intersection(subs[sub1],extps)) = 0 then
Add(normalsubs,sub1);
fi;
od;
if nrsubs <> 0 then
nrsubs:=Length(Factors(nrsubs*(p-1)+1));
minindex:=minindex*p^nrsubs;
fi;
od;
primes:=Set(primes);
# compute subgroups of sub which are connected by a chain of normal
# extensions or order in primes
ext:=CyclicExtensionsTom(tom,primes);
ext:=ext[PositionProperty(ext,x-> sub in x)];
# consider intersections of two normal subgroups
# for each such intersection the derived subgroup must be
# contained in one of the possible intersections returned by
# `IntersectionsTom'.
# Additionally there must be an chain of
# normal extensions connecting the derived subgroup and the groupext;
result:=Filtered(subs[normalsubs[1]], x-> x in ext);
for i in [1..Length(normalsubs)] do
sub1:=normalsubs[i];
indexsub1:=orders[sub]/orders[sub1];
for j in [i..Length(normalsubs)] do
sub2:=normalsubs[j];
if sub1<>sub2 or(ContainedTom(tom,sub1,sub)<>1 and
IsPrime(indexsub1)) then
indexsub2:=orders[sub]/orders[sub2];
index:=[indexsub1*indexsub2];
if not (IsPrime(indexsub1) or IsPrime(indexsub2) or
indexsub1<>
indexsub2) then
Add(index,Factors(indexsub1)[1]^3);
fi;
int:=IntersectionsTom(tom,sub1,sub2);
int:= Filtered( [ 1 .. Length( int ) ], x -> int[x] <> 0 );
int:=Filtered(int,x->orders[sub]/orders[x] in index);
int:=Filtered(int,x-> x in ext);
int:=List(int,x->subs[x]);
int:=Flat(int);
int:=Filtered(int,x-> x in ext);
result:=Intersection(result,int);
fi;
od;
od;
if IsTableOfMarksWithGens(tom) then
# correct size is known
der:=DerivedSubgroup(RepresentativeTom(tom,sub));
result:=Filtered(result,x->orders[x] = Size(der));
else
# forget all collected subgroups whose index is too small
result:=Filtered(result,x->(orders[sub]/orders[x])
>=minindex);
fi;
# the derived subgroup must be normal
notnormal:=Filtered(subs[sub],x-> isnormal(tom,x,sub)=false);
result:=Difference(result,notnormal);
# sub cannot be abelian if it contains a not-normal subgroup
if IntersectionSet( notnormal, subs[ sub ] ) <> [] then
RemoveSet( result, 1 );
fi;
if Length( result ) = 1 then
result:= result[1];
else
# the factor group cannot contain a not normal member
# if the factor group for one possible solution is cyclic
# it must contain the derived subgroup
res:=[];
for sub1 in Filtered(result,x->ContainedTom(tom,x,sub) = 1) do
#inspecting the factor group if possible
#collect the elements of the factor group that are not normal
factorel:=Filtered(subs[sub], x->sub1 in subs[x]
and x in notnormal);
if Length(factorel) >0 then
Add(res,sub1);
fi;
od;
result:=Difference(result,res);
if Length( result ) = 1 then
result:= result[1];
else
# the derived subgroup must be normal in every normal extension of sub
# and the derived subgroup can't be an involution if any normal
# extension of sub has a cyclic subgroup of odd order 'n' and no
# cyclic subgroup of order '2*n'
norm:=NormalizersTom(tom)[sub];
if IsInt(norm) then
normext:=Filtered(subs[norm],x->sub in subs[x] and
isnormal(tom,sub,x)=true);
res:=Filtered(result,
x->ForAny(normext, y->isnormal(tom,x,y) = false));
result:=Difference(result,res);
if 2 in orders{result} then
bool:=true;
for sub1 in normext do
res:=Filtered(subs[sub1],x->IsCyclicTom(tom,x));
oddord:=2*Filtered(orders{res},IsOddInt);
bool:=bool and ForAll(oddord,x->x in orders{res});
od;
if not bool then
result:=Filtered(result, x-> orders[x] <> 2);
fi;
fi;
else
res:=[];
for sub1 in result do
bool:=true;
for n in norm do
normext:=Filtered(subs[n],x->sub in subs[x] and
isnormal(tom,sub,x) = true);
bool:= bool and ForAny(normext,x->
isnormal(tom,sub1,x) = false);
od;
if bool then
Add(res,sub1);
fi;
od;
result:=Difference(result,res);
fi;
if Length( result ) = 1 then
result:= result[1];
fi;
fi;
fi;
fi;
# Finally, deal with the special case of the whole group.
if sub = Length( SubsTom( tom ) ) and IsList( result ) then
i:= 1;
repeat
i:= i+1;
until IsAbelianTom( FactorGroupTom( tom, result[i] ) );
result:= result[i];
fi;
# Do the rest by hand if possible.
if IsTableOfMarksWithGens( tom ) and IsList( result ) then
der:= DerivedSubgroup( RepresentativeTom( tom, sub ) );
result:= Filtered( result, x -> OrdersTom( tom )[x] = Size( der ) );
for i in [ 1 .. Length( result ) ] do
grd:= RepresentativeTom( tom, result[i] );
if IsConjugate( UnderlyingGroup( tom ), der, grd ) then
result:= result[i];
break;
fi;
od;
fi;
# Store the result.
poss[ sub ]:= result;
# Are all derived subgroups known and uniquely determined?
if IsInt( result )
and IsDenseList( poss )
and Length( poss ) = Length( SubsTom( tom ) )
and ForAll( poss, IsInt ) then
SetDerivedSubgroupsTomUnique( tom, poss );
fi;
return result;
end );
#############################################################################
##
#F DerivedSubgroupsTom( <tom> )
##
InstallGlobalFunction( DerivedSubgroupsTom,
tom -> List( [ 1 .. Length( SubsTom( tom ) ) ],
sub -> DerivedSubgroupTom( tom, sub ) ) );
#############################################################################
##
#M DerivedSubgroupsTomPossible( <tom> )
##
InstallMethod( DerivedSubgroupsTomPossible,
"for a table of marks (initialize with empty list)",
[ IsTableOfMarks ],
tom -> [] );
#############################################################################
##
#M NormalizerTom( <tom>, <sub> ) . . . . . . . . . determine one normalizer
##
InstallMethod( NormalizerTom,
"for a table of marks, and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local nord, subs, order, nrsubs, length, ll, res, i, nn;
# If normalizers are stored already then fetch the value.
if HasNormalizersTom( tom ) then
return NormalizersTom( tom )[ sub ];
fi;
# Get the attributes.
subs:= SubsTom( tom );
order:= OrdersTom( tom );
nrsubs:= NrSubsTom( tom );
length:= LengthsTom( tom );
ll:= Length( order );
# order of normalizer.
nord:= order[ll] / length[ sub ];
# self-normalizing.
if nord = order[ sub ] then
return sub;
fi;
# normal.
if length[ sub ] = 1 then
return ll;
fi;
# Compute candidates of the right order.
res:= [];
for i in [ sub+1 .. ll ] do
if order[i] = nord then
Add( res, i );
fi;
od;
# The normalizer of $U$ must contain $U$.
res:= Filtered( res, x -> sub in subs[x] );
if Length( res ) = 1 then
return res[1];
fi;
# The normalizer of $U$ must contain all subgroups containing $U$
# as a normal subgroup, in particular those where $U$ is of index 2
# and those containing only one conjugate of $U$.
nn:= [];
for i in [ sub+1 .. Maximum( res ) ] do
if sub in subs[i] then
if order[i] = 2 * order[ sub ]
or nrsubs[i][ Position( subs[i], sub ) ] = 1 then
Add( nn, i );
fi;
fi;
od;
res:= Filtered( res, x -> IsSubset( subs[x], nn ) );
# If one of the possible normalizers is abelian then we are done.
if HasDerivedSubgroupsTomUnique( tom ) then
for i in res do
if DerivedSubgroupsTomUnique( tom )[i] = 1 then
return i;
fi;
od;
fi;
if Length( res ) = 1 then
return res[1];
fi;
# If `tom' knows its group then do the rest by hand.
if IsTableOfMarksWithGens( tom ) and IsList( res ) then
nn:= Normalizer( UnderlyingGroup( tom ),
RepresentativeTom( tom, sub ) );
for i in res do
if IsConjugate( UnderlyingGroup( tom ), nn,
RepresentativeTom( tom, i ) ) then
return i;
fi;
od;
else
return res;
fi;
end );
#############################################################################
##
#M NormalizersTom( <tom> ) . . . . . . . . . . . . . . determine normalizer
##
InstallMethod( NormalizersTom,
"all normalizers of a table of marks",
[ IsTableOfMarks ],
function( tom )
local result, subs, order, nrsubs, length, ll, impr, d, der, bool,
NormalizerTom, sub, nn, nn1, sub1, norm;
# Get the attributes.
subs:= SubsTom( tom );
order:= OrdersTom( tom );
nrsubs:= NrSubsTom( tom );
length:= LengthsTom( tom );
ll:= Length( order );
result:= [];
# Loop over the subgroups.
impr:= [];
for sub in [ 1 .. ll ] do
norm:= NormalizerTom( tom, sub );
Add( result, norm );
if IsList( norm ) then
Add( impr, sub );
fi;
od;
# Try to improve the result.
if HasDerivedSubgroupsTomUnique( tom ) then
d:= true;
der:= DerivedSubgroupsTomUnique( tom );
fi;
bool:= true;
while bool do
bool:= false;
for sub in impr do
# the normalizer must contain the normalizer of all sub-
# groups which contain only one conjugate of u
# and the normalizer of all subgroups <v> whose derived subgroup
# is <u>
nn:=[];
for sub1 in [ sub+1 .. ll-1 ] do
if sub in subs[ sub1 ] and IsInt( result[ sub1 ] ) then
if nrsubs[ sub1 ][ Position( subs[ sub1 ], sub ) ] = 1 then
Add( nn, result[ sub1 ] );
elif d and der[ sub1 ] = sub then
Add( nn, result[ sub1 ] );
fi;
fi;
od;
# The normalizer must be contained in the normalizer of all
# those subgroups <v> of <u> for which <u> contains only one
# conjugate of <v>.
nn1:= [];
for sub1 in subs[sub] do
if nrsubs[ sub ][ Position( subs[ sub ], sub1 ) ] = 1
and IsInt( result[ sub1 ] ) then
Add( nn1, result[ sub1 ] );
fi;
od;
# The normalizer must be contained in the normalizer of the
# derived subgroup of <u>.
if d and IsInt( der[ sub ] )
and IsInt( result[ der[ sub ] ] ) then
Add( nn1, result[ der[ sub ] ] );
fi;
norm:= Filtered( result[ sub ],
x -> IsSubset( subs[x], nn )
and ForAll( nn1, y -> x in subs[y] ) );
# If there was an improvement then try it again.
if Length( norm ) < Length( result[ sub ] ) then
bool:= true;
fi;
if Length( norm ) = 1 then
norm:= norm[1];
fi;
result[ sub ]:= norm;
od;
od;
return result;
end );
#############################################################################
##
#M ContainedTom( <tom>, <sub1>, <sub2> )
##
## How many subgroups of class <sub1> lie in one subgroup of class <sub2>?
##
InstallMethod( ContainedTom,
[ IsTableOfMarks, IsPosInt, IsPosInt ],
function( tom, sub1, sub2 )
if sub1 in SubsTom( tom )[ sub2 ] then
return NrSubsTom( tom )[ sub2 ][ Position( SubsTom( tom )[ sub2 ],
sub1 ) ] ;
else
return 0;
fi;
end );
#############################################################################
##
#M ContainingTom( <tom>, <sub1>, <sub2> )
##
## How many subgroups of class <sub2> contain one subgroup of class <sub1>?
##
InstallMethod( ContainingTom,
[ IsTableOfMarks, IsPosInt, IsPosInt ],
function( tom, sub1, sub2 )
if sub1 in SubsTom( tom )[ sub2 ] then
return MarksTom( tom )[ sub2 ][ Position( SubsTom( tom )[ sub2 ],
sub1 ) ] /
MarksTom( tom )[ sub2 ][ Length( MarksTom( tom )[ sub2 ] ) ];
else
return 0;
fi;
end );
#############################################################################
##
#M CyclicExtensionsTom( <tom> )
#M CyclicExtensionsTom( <tom>, <p> )
#M CyclicExtensionsTom( <tom>, <list> )
##
InstallMethod( CyclicExtensionsTom,
"for a table of marks (classes for all prime div. of the group order)",
[ IsTableOfMarks ],
tom -> CyclicExtensionsTom( tom, Set( Factors(MarksTom(tom)[1][1]) ) ) );
InstallMethod( CyclicExtensionsTom,
"for a table of marks, and a prime",
[ IsTableOfMarks, IsPosInt ],
function( tom, p )
return CyclicExtensionsTom( tom, [ p ] );
end );
InstallMethod( CyclicExtensionsTom,
"for a table of marks, and a list (of primes)",
[ IsTableOfMarks, IsList ],
function( tom, list )
local pos, computed, primes, factors, value;
if not ForAll( list, IsPrimeInt ) then
Error( "the second argument must be a list of primes" );
fi;
factors:= Set( Factors( MarksTom( tom )[1][1] ) );
primes:= Filtered( list, x -> x in factors);
if primes = [] then
return List( [ 1 .. Length( MarksTom( tom ) ) ], x -> [ x ] );
fi;
computed:= ComputedCyclicExtensionsTom( tom );
pos:= Position( computed, primes );
if IsInt( pos ) then
return computed[ pos+1 ];
fi;
value:= CyclicExtensionsTomOp( tom, primes );
Add( computed, primes );
Add( computed, value );
return value;
end );
#############################################################################
##
#M ComputedCyclicExtensionsTom( <tom> )
##
InstallMethod( ComputedCyclicExtensionsTom,
[ IsTableOfMarks ],
x -> [] );
#############################################################################
##
#M CyclicExtensionsTomOp( <tom>, <p> )
#M CyclicExtensionsTomOp( <tom>, <list> )
##
InstallMethod( CyclicExtensionsTomOp,
"for one prime",
[ IsTableOfMarks, IsPosInt ],
function( tom, p )
local i, j, h, ll, done, classes, pos, val, marks, subs;
# get the attributes and initialize
marks:= MarksTom( tom );
subs:= SubsTom( tom );
ll:= Length( subs );
pos:= [];
val:= [];
# take marks mod <p> and transpose.
for i in [ 1 .. ll ] do
pos[i]:= [];
val[i]:= [];
for j in [ 1 .. Length( subs[i] ) ] do
h:= marks[i][j] mod p;
if h <> 0 then
Add( pos[ subs[i][j] ], i );
Add( val[ subs[i][j] ], h );
fi;
od;
od;
# form classes
classes:= [];
for i in [ 1 .. ll ] do
j:= 1;
done:= false;
while not done and j < i do
if pos[i] = pos[j] and val[i] = val[j] then
Add( classes[j], i );
done:= true;
fi;
j:= j+1;
od;
if not done then
classes[i]:= [ i ];
fi;
od;
return Set( classes );
end );
InstallMethod( CyclicExtensionsTomOp,
"for a table of marks, and a list (of primes)",
[ IsTableOfMarks, IsList ],
function( tom, primes )
local p, ext, c, i, comp, classes;
if Length( primes ) = 1 then
return CyclicExtensionsTomOp( tom, primes[1] );
fi;
classes:= [ 1 .. Length( SubsTom( tom ) ) ];
for p in primes do
ext:= CyclicExtensionsTom( tom, p );
for c in ext do
for i in c do
classes[i]:= classes[ c[1] ];
od;
od;
od;
for i in [ 1 .. Length( classes ) ] do
classes[i]:= classes[ classes[i] ];
od;
comp:= Set( classes );
ext:= List( comp, x -> Filtered( [ 1 .. Length( classes ) ],
y -> classes[y] = x ) );
return ext;
end );
#############################################################################
##
#M DecomposedFixedPointVector( <tom>, <fix> ) . . . . . . . decompose marks
##
InstallMethod( DecomposedFixedPointVector,
[ IsTableOfMarks, IsList ],
function( tom, fixpointvector )
local fix, i, j, dec, marks, subs, working, oo;
# get the attributes
marks:= MarksTom(tom);
subs:= SubsTom(tom);
oo:= marks[1][1];
fix:=ShallowCopy(fixpointvector);
dec:= ListWithIdenticalEntries(Length(subs),0);
working:= true;
i:= Length(fix);
# here we assume that <tom> is triangular
while working do
while i>0 and fix[i] = 0 do
i:= i-1;
od;
if i = 0 then
working:= false;
else
dec[i]:= fix[i]/marks[i][Length(marks[i])];
for j in [1..Length(subs[i])] do
fix[subs[i][j]]:= fix[subs[i][j]] - dec[i] * marks[i][j];
od;
fi;
od;
# remove trailing zeros
i:=Length(dec);
while i> 0 and dec[i] = 0 do
i:=i-1;
od;
return dec{[1..i]};
end );
#############################################################################
##
#M EulerianFunctionByTom( <tom>, <s> )
#M EulerianFunctionByTom( <tom>, <s>, <sub> )
##
InstallMethod( EulerianFunctionByTom,
[ IsTableOfMarks, IsPosInt ],
function( tom, s )
return EulerianFunctionByTom( tom, s, Length( SubsTom( tom ) ) );
end );
InstallMethod( EulerianFunctionByTom,
[ IsTableOfMarks, IsPosInt, IsPosInt ],
function( tom, s, sub )
local subs, orders, nrSubs, eulerian, i;
orders:=OrdersTom(tom);
subs:=SubsTom(tom);
nrSubs:=NrSubsTom(tom);
eulerian:=[1];
# compute the values of the Eulerian function recursively for each
# subgroup smaller than <sub>
for i in [ 2 .. sub ] do
eulerian[i]:= orders[i]^s - Sum( List( [ 1 .. Length( subs[i] ) -1 ],
x -> nrSubs[i][x] * eulerian[ subs[i][x] ] ) );
od;
return eulerian[ sub ];
end );
#############################################################################
##
#M EulerianFunction( <G>, <s> )
##
InstallMethod( EulerianFunction,
"for a group with table of marks",
[ IsGroup and HasTableOfMarks, IsPosInt ], 10,
function( G, s )
return EulerianFunctionByTom( TableOfMarks( G ), s );
end );
#############################################################################
##
#M EulerianFunction( <G>, <s> )
##
InstallMethod( EulerianFunction,
"for a group, compute table of marks",
[ IsGroup, IsPosInt ],
-RankFilter (IsGroup)-RankFilter (IsPosInt), # rank 0
function( G, s )
if not HasTableOfMarks( G ) then
Info( InfoWarning, 1, "EulerianFunction computes ",
"the table of marks. This may be slow." );
fi;
return EulerianFunctionByTom( TableOfMarks( G ), s );
end );
#############################################################################
##
#M IntersectionsTom( <tom>, <a>, <b> ) . . . . . intersections of subgroups
##
InstallMethod( IntersectionsTom,
[ IsTableOfMarks, IsPosInt, IsPosInt ],
function(tom,a,b)
local i, j, k, h, line, dec, marks, subs;
# get the attributes and initialize
marks:= MarksTom(tom);
subs:= SubsTom(tom);
h:= [];
line:= [];
# decompress row <a>
for i in [1..Length(subs[a])] do
h[subs[a][i]]:= marks[a][i];
od;
# build the tensor product or row <a> and <b>
for j in [1..Length(subs[b])] do
k:= subs[b][j];
if IsBound(h[k]) then
line[k]:= h[k]*marks[b][j];
fi;
od;
for j in [1..Length(line)] do
if not IsBound(line[j]) then
line[j]:= 0;
fi;
od;
# decompose the tensor product
return DecomposedFixedPointVector( tom, line );
end );
#############################################################################
##
#M FactorGroupTom( <tom>, <nor> ) . . . . . . table of marks of factor group
##
InstallMethod( FactorGroupTom,
"for a table of marks, and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, nor )
local marks, subs, sub, pos, pos1, subsf, marksf, facmarks, facsubs,
members, hom, facgens, facpos, facnorms, facgroup, elm, result;
marks:= MarksTom( tom );
subs:= SubsTom( tom );
if marks[ nor ][1] <> marks[ nor ][ Length( marks[nor] ) ] then
Error( "<nor>-th class of subgroups not normal" );
fi;
facsubs:= [];
facmarks:= [];
# Collect the members of the factor group.
members:= [];
for sub in [ nor .. Length( marks ) ] do
if nor in subs[ sub ] then
Add( members, sub );
fi;
od;
# Collect the marks of the factor group from the marks of the group.
for sub in members do
pos:= Position( subs[sub], nor );
subsf:= [1];
marksf:= [ marks[sub][pos] ];
for elm in [ pos+1 .. Length( subs[ sub ] ) ] do
pos1:= Position( members, subs[ sub ][ elm ] );
if IsInt( pos1 ) then
Add( subsf, pos1 );
Add( marksf, marks[ sub ][ elm ] );
fi;
od;
Add( facsubs, subsf );
Add( facmarks, marksf );
od;
# Make the object.
result:= rec( SubsTom := facsubs,
MarksTom := facmarks );
if HasNormalizersTom(tom) then
result.NormalizersTom:= List( NormalizersTom( tom ){ members },
x -> Position( members, x ) );
fi;
if IsTableOfMarksWithGens( tom ) then
hom:= NaturalHomomorphismByNormalSubgroupNC( UnderlyingGroup( tom ),
RepresentativeTom( tom, nor ) );
facgroup:= ImagesSource( hom );
# collect the generators
subs:= List( members,
x -> GeneratorsOfGroup( RepresentativeTom( tom, x ) ) );
subs:= List( subs, x -> List( x, y -> Image( hom, y ) ) );
subs:= List( subs, x -> Filtered( x, y -> y <> One( facgroup ) ) );
facgens:= Union( subs );
# compute the positions
facpos:= [];
for sub in subs do
pos:= [];
for elm in sub do
Add( pos, Position( facgens, elm ) );
od;
Add( facpos, pos );
od;
result.UnderlyingGroup:= facgroup;
SetTableOfMarks( facgroup, result );
result.GeneratorsSubgroupsTom:= [ facgens, facpos ];
fi;
ConvertToTableOfMarks( result );
return result;
end );
#############################################################################
##
#M MaximalSubgroupsTom( <tom> )
#M MaximalSubgroupsTom( <tom>, <sub>)
##
## Note that we assume that the table of marks has lower triangular shape.
##
InstallMethod( MaximalSubgroupsTom,
"for a table of marks",
[ IsTableOfMarks ],
tom -> MaximalSubgroupsTom( tom, Length( SubsTom( tom ) ) ) );
InstallMethod( MaximalSubgroupsTom,
"for a table of marks, and a positive integer",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local subs1, s, max, subs;
subs1:= SubsTom( tom );
subs:= Difference( subs1[ sub ], [ sub ] );
max:= [];
while subs <> [] do
s:= Maximum( subs );
Add( max, Position( subs1[ sub ], s ) );
SubtractSet( subs, subs1[s] );
od;
return [ subs1[ sub ]{ max }, NrSubsTom( tom )[ sub ]{ max } ];
end );
#############################################################################
##
#M MinimalSupergroupsTom( <tom>, <sub>)
##
InstallMethod( MinimalSupergroupsTom,
"for a table of marks",
[ IsTableOfMarks, IsPosInt ],
function( tom, sub )
local subs, i, pos, sups, nrSups;
# trivial case.
subs:=SubsTom(tom);
if sub = Length(subs) then
return [[], []];
fi;
sups:= [];
nrSups:= [];
# here we assume that <tom> is triangular.
for i in [sub+1..Length(subs)] do
pos:= Position(subs[i], sub);
if pos <> fail and Intersection(sups, subs[i]) = [] then
Add(sups, i);
if sub = 1 then
Add(nrSups, LengthsTom(tom)[i]);
else
Add(nrSups, LengthsTom(tom)[i] * NrSubsTom(tom)[i][pos] /
LengthsTom(tom)[sub]);
fi;
fi;
od;
return [ sups, nrSups ];
end );
#############################################################################
##
## 11. Accessing Subgroups via Tables of Marks
##
#############################################################################
##
#M GeneratorsSubgroupsTom( <tom> )
##
InstallMethod( GeneratorsSubgroupsTom,
"default method for a table of marks",
[ IsTableOfMarks ],
function( tom )
local sub, gen, pos;
sub:= List( [ 1 .. Length( OrdersTom( tom ) ) ],
x -> GeneratorsOfGroup( RepresentativeTom( tom, x ) ) );
# Form the generators list.
gen:= Union( sub );
# Compute the positions.
pos:= List( sub, l -> List( l, elm -> Position( gen, elm ) ) );
return [ gen, pos ];
end );
#############################################################################
##
#M RepresentativeTom( <tom>, <sub> )
##
InstallMethod( RepresentativeTom,
"for a table of marks with stored `GeneratorsSubgroupsTom' value",
[ IsTableOfMarks and HasGeneratorsSubgroupsTom, IsPosInt ],
function( tom, sub )
local gens, result;
if sub = Length( OrdersTom( tom ) ) then
return UnderlyingGroup( tom );
fi;
gens:= GeneratorsSubgroupsTom( tom );
result:= SubgroupNC( UnderlyingGroup( tom ), gens[1]{ gens[2][ sub ] } );
SetSize( result, OrdersTom( tom )[ sub ] );
return result;
end );
InstallMethod( RepresentativeTom,
"for a table of marks with stored `StraightLineProgramsTom' value",
[ IsTableOfMarks and HasStraightLineProgramsTom, IsPosInt ],
function( tom, sub )
local gens, subgroup, group;
if sub = Length( OrdersTom( tom ) ) then
return UnderlyingGroup( tom );
fi;
group:= UnderlyingGroup( tom );
gens:= StraightLineProgramsTom( tom )[ sub ];
if IsStraightLineProgram( gens ) then
gens:= ResultOfStraightLineProgram( gens, GeneratorsOfGroup( group ) );
else
gens:= List( gens, x -> ResultOfStraightLineProgram(
x, GeneratorsOfGroup( group ) ) );
fi;
subgroup:= SubgroupNC( group, gens );
SetSize( subgroup, OrdersTom( tom )[ sub ] );
return subgroup;
end );
#############################################################################
##
#M RepresentativeTomByGenerators( <tom>, <sub>, <gens> )
#M RepresentativeTomByGeneratorsNC( <tom>, <sub>, <gens> )
##
InstallMethod( RepresentativeTomByGenerators,
[ IsTableOfMarks and HasStraightLineProgramsTom,
IsPosInt, IsHomogeneousList ],
function( tom, sub, gens )
local gr, iso;
# test <group>
gr:= UnderlyingGroup( tom );
iso:= GroupGeneralMappingByImagesNC( gr, GroupByGenerators( gens ),
GeneratorsOfGroup( gr ), gens );
if not ( IsGroupHomomorphism( iso ) and IsBijective( iso ) ) then
Info( InfoWarning, 1,
"the stored generators and the given ones don't define ",
"an isomorphism" );
return fail;
fi;
return RepresentativeTomByGeneratorsNC( tom, sub, gens );
end );
InstallMethod( RepresentativeTomByGeneratorsNC,
[ IsTableOfMarks and HasStraightLineProgramsTom,
IsPosInt, IsHomogeneousList ],
function( tom, sub, gens )
local prog;
prog:= StraightLineProgramsTom( tom )[ sub ];
if IsList( prog ) then
if IsEmpty( prog ) then
gens:= TrivialSubgroup( UnderlyingGroup( tom ) );
else
gens:= GroupByGenerators( List( prog,
x -> ResultOfStraightLineProgram( x, gens ) ) );
fi;
else
gens:= ResultOfStraightLineProgram( prog, gens );
if IsEmpty( gens ) then
gens:= TrivialSubgroup( UnderlyingGroup( tom ) );
else
gens:= GroupByGenerators( gens );
fi;
fi;
SetSize( gens, OrdersTom( tom )[ sub ] );
return gens;
end );
#############################################################################
##
## 12. The Interface between Tables of Marks and Character Tables
##
#############################################################################
##
#M PossibleFusionsCharTableTom( <tbl>, <tom> ) . . . . . . element fusion
##
InstallMethod( PossibleFusionsCharTableTom,
"for ordinary character table and table of marks",
[ IsOrdinaryTable, IsTableOfMarks ],
function( tbl, tom )
return PossibleFusionsCharTableTom( tbl, tom, rec() );
end );
#############################################################################
##
#M PossibleFusionsCharTableTom( <tbl>, <tom>, <options> ) . element fusion
##
InstallMethod( PossibleFusionsCharTableTom,
"for ordinary character table, table of marks, and record",
[ IsOrdinaryTable, IsTableOfMarks, IsRecord ],
function( tbl, tom, options )
local quick,
approxfus,
fus,
ccl,
G,
orderstbl,
orderstom,
i,
u,
flag,
j, h, hh,
cycstom,
cycstbl,
cycfus,
classes,
len,
ord,
orb,
p,
pow,
subs,
ambig,
ambigim,
uniques,
uniquim,
auttbl,
stab,
clean,
transfer,
descend,
powertbl,
powertom,
invcycfus,
proj,
invcycstom,
parameters,
allfus;
# Evaluate the optional parameters.
quick:= IsBound( options.quick ) and options.quick = true;
if IsBound( options.fusionmap ) then
approxfus:= options.fusionmap;
else
approxfus:= [];
fi;
# If `tbl' stores a group whose table of marks is `tom'
# then use the conjugacy classes of the group.
if HasUnderlyingGroup( tbl ) and HasUnderlyingGroup( tom )
and UnderlyingGroup( tbl ) = UnderlyingGroup( tom )
and TableOfMarks( UnderlyingGroup( tom ) ) = tom then
Info( InfoTom, 1,
"computing fusion <tbl> -> <tom> using the stored group" );
fus:= [];
ccl:= ConjugacyClasses( tbl );
G:= UnderlyingGroup( tom );
orderstom:= OrdersTom( tom );
for i in [ 1 .. Length( ccl ) ] do
u:= Group( Representative( ccl[i] ) );
fus[i]:= First( [ 1 .. Length( orderstom ) ],
j -> orderstom[j] = Size( u ) and
IsCyclicTom( tom, j ) and
IsConjugate( G, u, RepresentativeTom( tom, j ) ) );
if IsBound( approxfus[i] ) and
( ( IsInt( approxfus[i] ) and fus[i] <> approxfus[i] ) or
( IsList( approxfus[i] ) and not ( fus[i] in approxfus[i] ) ) ) then
Info( InfoTom, 1,
"contradiction to prescribed fusion <tbl> -> <tom>" );
return [];
fi;
od;
if HasPermutationTom( tom ) then
fus:= OnTuples( fus, PermutationTom( tom ) );
fi;
return [ fus ];
fi;
# Use necessary conditions.
Info( InfoTom, 1,
"computing fusion(s) <tbl> -> <tom> using nec. conditions" );
# Get orders of elements.
orderstbl:= OrdersClassRepresentatives( tbl );
# Determine cyclic subgroups of the table of marks.
subs:= SubsTom( tom );
cycstom:= Filtered( [ 1 .. Length( subs ) ],
i -> IsCyclicTom( tom, i ) );
# Determine cyclic subgroups of the character table.
# The possible fusions will be determined from this list into the
# table of marks.
# In the end, the possible fusions will be composed with the fusion
# of conjugacy classes into the cyclic subgroups.
cycstbl:= [];
cycfus:= [];
classes:= [ 1 .. NrConjugacyClasses( tbl ) ];
len:= 0;
while not IsEmpty( classes ) do
orb:= ClassOrbit( tbl, classes[1] );
len:= len + 1;
cycstbl[ len ]:= orb;
for i in orb do
cycfus[i]:= len;
od;
SubtractSet( classes, orb );
od;
# First check of compatibility.
if len <> Length( cycstom ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompat. no. of cyc. subgroups" );
return [];
fi;
# Collect candidates for each class.
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: checking element orders" );
orderstbl:= List( cycstbl, orbit -> orderstbl[ orbit[1] ] );
orderstom:= OrdersTom( tom );
fus:= [];
for i in [ 1 .. Length( orderstbl ) ] do
fus[i]:= Filtered( cycstom, j -> orderstbl[i] = orderstom[j] );
if IsEmpty( fus[i] ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompat. element orders",
" at class ", i );
return [];
elif Length( fus[i] ) = 1 then
fus[i]:= fus[i][1];
fi;
od;
# Use `approxfus'.
flag:= MeetMaps( fus, approxfus );
if flag <> true then
Info( InfoTom, 2,
"PossibleFusionsCharTableTom: possible maps incompatible with ",
"<approxfus> at class ", flag );
return [];
fi;
# Maybe the map is already unique.
if quick and IsRowVector( fus ) then
return [ CompositionMaps( fus, cycfus ) ];
fi;
# Check centralizers.
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: checking centr. orders" );
for i in [ 1 .. Length( fus ) ] do
if ( not quick ) or IsList( fus[i] ) then
h:= Length( cycstbl[i] )
* SizesConjugacyClasses( tbl )[ cycstbl[i][1] ]
/ Phi( orderstbl[i] );
if IsList( fus[i] ) then
hh:= Filtered( fus[i], j -> LengthsTom( tom )[j] = h );
elif LengthsTom( tom )[ fus[i] ] = h then
hh:= [ fus[i] ];
else
hh:= [];
fi;
if IsEmpty( hh ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompat. element orders" );
return [];
elif Length( hh ) = 1 then
fus[i]:= hh[1];
else
fus[i]:= hh;
fi;
fi;
od;
# We are looking for a bijection of cyclic subgroups,
# so unique images must not occur in lists of possible images.
# A sort of converse is that an image that occurs only in *one*
# list of possibilities is the unique image from that list.
uniques:= Filtered( [ 1 .. Length( fus ) ], i -> IsInt( fus[i] ) );
uniquim:= SSortedList( fus{ uniques } );
ambig:= Difference( [ 1 .. Length( fus ) ], uniques );
ambigim:= Difference( cycstom, uniquim );
clean:= function( fus, uniques, uniquim, ambig, ambigim )
local newunique, i, diff, numb, pos;
repeat
newunique:= [];
# Remove unique images from lists of possible images.
for i in ambig do
if IsInt( fus[i] ) then
Add( newunique, i );
else
diff:= Difference( fus[i], uniquim );
if IsEmpty( diff ) then
return false;
elif Length( diff ) = 1 then
fus[i]:= diff[1];
AddSet( newunique, i );
AddSet( uniquim, fus[i] );
elif diff <> fus[i] then
fus[i]:= diff;
fi;
fi;
od;
if not IsEmpty( newunique ) then
SubtractSet( ambig, newunique );
UniteSet( uniques, newunique );
UniteSet( uniquim, fus{ newunique } );
SubtractSet( ambigim, fus{ newunique } );
fi;
# Check whether ambiguous images occur only once.
for i in ambigim do
numb:= Number( ambig, j -> IsList( fus[j] ) and i in fus[j] );
if numb = 0 then
return false;
elif numb = 1 then
pos:= First( ambig, j -> IsList( fus[j] ) and i in fus[j] );
fus[ pos ]:= i;
AddSet( newunique, pos );
AddSet( uniquim, i );
fi;
od;
if not IsEmpty( newunique ) then
SubtractSet( ambig, newunique );
UniteSet( uniques, newunique );
UniteSet( uniquim, fus{ newunique } );
SubtractSet( ambigim, fus{ newunique } );
fi;
until IsEmpty( newunique );
return true;
end;
# Maybe the map is already unique.
if not clean( fus, uniques, uniquim, ambig, ambigim ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompatibility in consequences" );
return [];
elif quick and IsEmpty( ambig ) then
return [ CompositionMaps( fus, cycfus ) ];
fi;
# Check power maps against incidence.
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: checking power maps" );
powertbl:= ShallowCopy( ComputedPowerMaps( tbl ) );
powertom:= [];
invcycfus:= InverseMap( cycfus );
for p in [ 2 .. Length( powertbl ) ] do
if IsBound( powertbl[p] ) and IsPrimeInt( p )
and Size( tbl ) mod p = 0 then
# Rewrite the `p'-th power map of `tbl'.
powertbl[p]:= CompositionMaps( cycfus,
CompositionMaps( powertbl[p], invcycfus ) );
# Construct the `p'-th power map of cyclic subgroups of `tom'.
pow:= [];
for i in [ 1 .. Length( cycstom ) ] do
ord:= orderstom[ cycstom[i] ];
if ord mod p = 0 then
h:= ord / p;
hh:= Filtered( subs[ cycstom[i] ], j -> orderstom[j] = h );
Assert( 1, Length( hh ) = 1 );
pow[ cycstom[i] ]:= hh[1];
else
pow[ cycstom[i] ]:= cycstom[i];
fi;
od;
powertom[p]:= pow;
transfer:= TransferDiagram( powertbl[p], fus, pow );
if transfer = fail then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompatible power maps" );
return [];
elif not IsEmpty( transfer.impbetween ) then
# Maybe the map is already unique.
if not clean( fus, uniques, uniquim, ambig, ambigim ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompat. in consequences" );
return [];
elif quick and IsRowVector( fus ) then
return [ CompositionMaps( fus, cycfus ) ];
fi;
fi;
fi;
od;
# Break symmetries where possible with the character table.
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: checking automorphisms of <tbl>" );
auttbl:= Action( AutomorphismsOfTable( tbl ), cycstbl, OnSets );
stab:= auttbl;
for i in ShallowCopy( ambig ) do
if IsList( fus[i] ) then
orb:= Set( Orbit( stab, i ) );
if 1 < Length( orb )
and ForAll( orb, x -> fus[x] = fus[i] )
and ForAll( ambig, x -> ( x in orb )
or IsEmpty( Intersection( fus[x], fus[i] ) ) ) then
fus[i]:= fus[i][1];
stab:= Stabilizer( stab, i );
if not clean( fus, uniques, uniquim, ambig, ambigim ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompat. in consequences" );
return [];
elif IsTrivial( stab ) then
break;
fi;
fi;
fi;
od;
# Maybe the map is already unique.
if quick and IsRowVector( fus ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: ",
"map is unique up to table autom." );
return List( OrbitFusions( auttbl, fus, Group( () ) ),
map -> CompositionMaps( map, cycfus ) );
fi;
# Check power maps again.
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: checking power maps again" );
for p in [ 2 .. Length( powertom ) ] do
if IsBound( powertom[p] ) then
transfer:= TransferDiagram( powertbl[p], fus, powertom[p] );
if transfer = fail then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompatible power maps" );
return [];
elif not IsEmpty( transfer.impbetween ) then
# Maybe the map is already unique.
if not clean( fus, uniques, uniquim, ambig, ambigim ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: incompat. in consequences" );
return [];
elif quick and IsRowVector( fus ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: ",
"map is unique up to table autom." );
return List( OrbitFusions( auttbl, fus, Group( () ) ),
map -> CompositionMaps( map, cycfus ) );
fi;
fi;
fi;
od;
# Start a backtrack search.
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: starting a backtrack search" );
proj:= ProjectionMap( cycfus );
invcycstom:= InverseMap( cycstom );
for i in [ 1 .. Length( powertom ) ] do
if IsBound( powertom[i] ) then
powertom[i]:= CompositionMaps( invcycstom,
CompositionMaps( powertom[i], cycstom ) );
fi;
od;
parameters:= rec(
maxlen:= 10,
contained:= function( tbl, chars, paracharacter )
return List( ContainedPossibleCharacters( tbl, chars,
CompositionMaps( paracharacter, cycfus ) ),
x -> x{ proj } );
end,
minamb:= 1,
maxamb:= infinity,
quick:= quick,
testdec:= function( tbl, subchars, restricted )
return NonnegIntScalarProducts( tbl, subchars,
CompositionMaps( restricted, cycfus ) );
end,
powermaps:= powertom,
subpowermaps:= powertbl );
fus:= FusionsAllowedByRestrictions( tbl, tom, Irr( tbl ),
PermCharsTom( cycstom, tom ),
CompositionMaps( invcycstom, fus ),
parameters );
fus:= List( fus, map -> cycstom{ map{ cycfus } } );
if IsEmpty( fus ) then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: no solution" );
return fus;
fi;
# Apply table automorphisms in order to get all possible fusions.
auttbl:= AutomorphismsOfTable( tbl );
allfus:= Concatenation( List( fus,
ffus -> OrbitFusions( auttbl, ffus, Group( () ) ) ) );
fus:= RepresentativesFusions( auttbl, fus, Group( () ) );
if Length( allfus ) = 1 then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: fusion map is unique" );
elif Length( fus ) = 1 then
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: ",
"fusion map is unique up to table autom." );
else
Info( InfoTom, 1,
"PossibleFusionsCharTableTom: ",
Length( fus ), " orbits under table autom." );
fi;
return allfus;
end );
#############################################################################
##
#M FusionCharTableTom( <tbl>, <tom> ) . . . . . . . . . . . element fusion
##
## The case of a fusion between a library character table
## and a library table of marks is dealt with in a method installed in the
## file `pkg/tomlib/gap/tmadmin.tmi'.
##
InstallMethod( FusionCharTableTom,
"for ordinary character table and table of marks",
[ IsOrdinaryTable, IsTableOfMarks ],
function( tbl, tom )
local fus;
fus:= PossibleFusionsCharTableTom( tbl, tom );
if Length( fus ) = 1 then
return fus[1];
else
Info( InfoTom, 1, "fusion is not unique, possibilities are ", fus );
return fail;
fi;
end );
#############################################################################
##
#M PermCharsTom( <fus>, <tom> ) . . . . . . extract permutation characters
#M PermCharsTom( <tbl>, <tom> ) . . . . . . extract permutation characters
##
InstallMethod( PermCharsTom,
"for explicit fusion map and table of marks",
[ IsList, IsTableOfMarks ],
function( fus, tom )
local pc, i, j, line, marks, subs;
pc:= [];
marks:= MarksTom( tom );
subs:= SubsTom( tom );
# Loop over the classes of subgroups.
for i in [ 1 .. Length( subs ) ] do
# Initialize the permutation character.
line:= List( fus, x -> 0 );
# Extract the values.
for j in [ 1 .. Length( fus ) ] do
if fus[j] in subs[i] then
line[j]:= marks[i][ Position( subs[i], fus[j] ) ];
fi;
od;
pc[i]:= line;
od;
return pc;
end );
InstallMethod( PermCharsTom,
"for character table and table of marks",
[ IsOrdinaryTable, IsTableOfMarks ],
function( tbl, tom )
local fus;
fus:= FusionCharTableTom( tbl, tom );
if fus = fail then
Info( InfoTom, 1,
"the fusion map <fus> map is not uniquely determined!" );
return fail;
fi;
return List( PermCharsTom( fus, tom ), chi -> Character( tbl, chi ) );
end );
#############################################################################
##
## 13. Generic Construction of Tables of Marks
##
#############################################################################
##
#M TableOfMarksCyclic( <n> ) . . . . . . . table of marks of a cyclic group
##
InstallMethod( TableOfMarksCyclic,
"for a positive integer",
[ IsPosInt ],
function( n )
local obj, progs, subs, marks, classNames, derivedSubgroups,
normalizer, i, j, divs, index, group;
# Initialize, \ldots
divs:= DivisorsInt(n);
progs:= [];
subs:= [];
marks:= [];
classNames:=[];
# \ldots construct generators for each subgroup (divisor), \ldots
for i in [ 1 .. Length( divs ) ] do
classNames[i]:= String( divs[i] );
ConvertToStringRep( classNames[i] );
if i = 1 then
progs[i]:= StraightLineProgram( [ [] ] );
else
progs[i]:= StraightLineProgram( [ [ [ 1, n/divs[i] ] ] ] );
fi;
subs[i]:= [];
marks[i]:= [];
index:= n / divs[i];
for j in [ 1 .. i ] do
if divs[i] mod divs[j] = 0 then
Add( subs[i], j );
Add( marks[i], index );
fi;
od;
od;
# \ldots add additional components, \ldots
group:= CyclicGroup( n );
SetSize(group,n);
SetName(group,Concatenation("C",String(n)));
# \ldots and finally create the object and add attribute values.
obj:= rec( Identifier := Name( group ),
SubsTom := subs,
MarksTom := marks,
NormalizersTom := ListWithIdenticalEntries(n,n),
DerivedSubgroupsTomUnique := ListWithIdenticalEntries(n,1),
UnderlyingGroup := group,
StraightLineProgramsTom := progs,
ClassNamesTom := classNames );
ConvertToTableOfMarks( obj );
SetTableOfMarks( group, obj );
# Return the result.
return obj;
end );
#############################################################################
##
#M TableOfMarksDihedral( <m> ) . table of marks of the dihedral group $D_m$
##
InstallMethod( TableOfMarksDihedral,
"for a positive integer",
[ IsPosInt ],
function( m )
local i, j, divs, n, name, marks, subs, type, nrs, pt, d, construct, ord,
tom;
n:= m/2;
if not IsInt(n) then
Error(" <m> must not be odd ");
fi;
divs:= DivisorsInt(m);
construct:= [[
function(i, j)
if divs[i] mod divs[j] = 0 then
Add(subs[nrs[i]], nrs[j]);
Add(marks[nrs[i]], m/divs[i]);
fi;
end,
Ignore,
function(i, j)
if divs[i] mod divs[j] = 0 then
Add(subs[nrs[i]], nrs[j]);
Add(marks[nrs[i]], m/divs[i]);
fi;
end], [
function(i, j)
if divs[i] mod divs[j] = 0 and divs[i] > divs[j] then
Add(subs[nrs[i]], nrs[j]);
Add(marks[nrs[i]], m/divs[i]);
fi;
end,
function(i, j)
if divs[i] mod divs[j] = 0 then
Add(subs[nrs[i]], nrs[j]);
Add(marks[nrs[i]], 1);
fi;
end,
function(i, j)
if divs[i] mod divs[j] = 0 then
Append(subs[nrs[i]], [nrs[j]..nrs[j]+2]);
Append(marks[nrs[i]], [m/divs[i], 1, 1]);
fi;
end], [
function(i, j)
if divs[i] mod (2*divs[j]) = 0 then
Add(subs[nrs[i]], nrs[j]);
Add(subs[nrs[i]+1], nrs[j]);
Add(subs[nrs[i]+2], nrs[j]);
Add(marks[nrs[i]], m/divs[i]);
Add(marks[nrs[i]+1], m/divs[i]);
Add(marks[nrs[i]+2], m/divs[i]);
fi;
end,
Ignore,
function(i, j)
if divs[i] mod (2*divs[j]) = 0 then
Add(subs[nrs[i]], nrs[j]);
Append(subs[nrs[i]+1], [nrs[j], nrs[j]+1]);
Append(subs[nrs[i]+2], [nrs[j], nrs[j]+2]);
Add(marks[nrs[i]], m/divs[i]);
Append(marks[nrs[i]+1], [m/divs[i], 2]);
Append(marks[nrs[i]+2], [m/divs[i], 2]);
elif divs[i] mod divs[j] = 0 then
Add(subs[nrs[i]], nrs[j]);
Add(subs[nrs[i]+1], nrs[j]+1);
Add(subs[nrs[i]+2], nrs[j]+2);
Add(marks[nrs[i]], m/divs[i]);
Add(marks[nrs[i]+1], 2);
Add(marks[nrs[i]+2], 2);
fi;
end ] ];
marks:= [];
subs:= [];
name:= [];
type:= [];
nrs:= []; pt:= 1;
for d in divs do
Add(nrs, pt); pt:= pt+1;
ord:= String(d);
if n mod d = 0 then
if d mod 2 = 0 then
Add(type, 3); pt:= pt+2;
Add(name, ord);
Add(name, Concatenation("D_{", ord, "}a"));
Add(name, Concatenation("D_{", ord, "}b"));
else
Add(type, 1);
Add(name, ord);
fi;
else
Add(type, 2);
Add(name, Concatenation("D_{", ord, "}"));
fi;
od;
for i in [1..Length(divs)] do
subs[nrs[i]]:= [];
marks[nrs[i]]:= [];
if type[i] = 3 then
subs[nrs[i]+1]:= []; subs[nrs[i]+2]:= [];
marks[nrs[i]+1]:= []; marks[nrs[i]+2]:= [];
fi;
for j in [1..i] do
construct[type[i]][type[j]](i, j);
od;
od;
# Make the object.
tom:= rec( Identifier := Concatenation( "dihedral group( ",
String( m ), " )" ),
SubsTom := subs,
MarksTom := marks,
ClassNamesTom := name );
ConvertToTableOfMarks( tom );
return tom;
end );
#############################################################################
##
#M TableOfMarksFrobenius( <p>, <q> ) . . table of marks of Frobenius groups
##
InstallMethod( TableOfMarksFrobenius,
"tom of a Frobenius group",
[ IsPosInt, IsPosInt ],
function( p, q )
local tom, classNames,marks, subs, normalizers,
derivedSubgroups,i, j, n, ind, divs;
if not IsPrimeInt( p ) then
Error( "not yet implemented" );
elif (p-1) mod q <> 0 then
Error( "not Frobenius" );
fi;
classNames:= [];
subs:= [];
marks:= [];
normalizers:= [];
derivedSubgroups:= [];
n:= p*q;
divs:= DivisorsInt( n );
for i in [ 1 .. Length( divs ) ] do
ind:= n / divs[i];
subs[i]:= [ 1 ];
marks[i]:= [ ind ];
if ind mod p = 0 then
# d
classNames[i]:= String( divs[i] );
ConvertToStringRep( classNames[i] );
derivedSubgroups[i]:= 1;
if i = 1 then
normalizers[i]:= Length( divs );
else
normalizers[i]:= Position( divs, q );
fi;
for j in [ 2 .. i ] do
if marks[j][1] mod ind = 0 then
Add( subs[i], j );
Add( marks[i], ind/p );
fi;
od;
else
# p:d
classNames[i]:= Concatenation( String(p), ":", String( divs[i]/p ) );
ConvertToStringRep( classNames[i] );
derivedSubgroups[i]:= Position( divs, p );
normalizers[i]:= Length( divs );
for j in [ 2 .. i ] do
if marks[j][1] mod ind = 0 then
Add( subs[i], j );
Add( marks[i], ind );
fi;
od;
fi;
od;
# Make the object and add attributes.
tom:= rec( Identifier :=
Concatenation( "Frobenius group( ",
String( p ), ", ", String( q ), " )" ),
SubsTom := subs,
MarksTom := marks,
NormalizersTom := normalizers,
DerivedSubgroupsTomUnique := derivedSubgroups,
ClassNamesTom := classNames );
ConvertToTableOfMarks( tom );
return tom;
end );
#############################################################################
##
#E
|