/usr/share/gap/lib/ctblgrp.gi is in gap-libs 4r6p5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 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 | #############################################################################
##
#W ctblgrp.gi GAP library Alexander Hulpke
##
#Y Copyright (C) 1993, 1997
#Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
#Y Copyright (C) 2002 The GAP Group
##
## This file contains the implementation of the Dixon-Schneider algorithm
##
#############################################################################
##
#V USECTPGROUP . . . . . . . . . . indicates,whether CharTablePGroup should
## always be called
USECTPGROUP := false;
#############################################################################
##
#V DXLARGEGROUPORDER
##
## If a group is small,we may use enumerations of the elements to speed up
## the computations. The criterion is the size, compared to the global
## variable DXLARGEGROUPORDER.
##
if not IsBound(DXLARGEGROUPORDER) then
DXLARGEGROUPORDER:=10000;
fi;
InstallGlobalFunction( IsDxLargeGroup, G -> Size(G) > DXLARGEGROUPORDER );
#############################################################################
##
#F ClassComparison(<c>,<d>) . . . . . . . . . . . . compare classes c and d
##
## comparison is based first on the size of the class and afterwards on the
## order of the representatives. Thus the 1-Class is in the first position,
## as required. Since sorting is primary by the class sizes,smaller
## classes are in earlier positions,making the active columns those to
## smaller classes,reducing the work for calculating class matrices!
## Additionally galois conjugated classes are together,thus increasing the
## chance,that with one columns of them active to be several acitive,
## reducing computation time !
##
InstallGlobalFunction( ClassComparison, function(c,d)
if Size(c)=Size(d) then
return Order(Representative(c))<Order(Representative(d));
else
return Size(c)<Size(d);
fi;
end );
#############################################################################
##
#M DixonRecord(<G>) . . . . . . . . . . generic
##
InstallMethod(DixonRecord,"generic",true,[IsGroup],0,
function(G)
local D,C,cl,pl;
D:=rec(
group:=G,# workgroup
deg:=Size(G),
size:=Size(G),
yetmats:=[],
modulars:=[]
);
# Do not leave the computation of power maps to 'CharacterTable',
# since here we are in a better situation (use inverse map,use
# class identification,use the fact that all power maps for primes
# up to the maximal element order are computed).
C:=CharacterTable(G);
# Store the conjugacy classes compatibly with other information
# about the character table.
D.classes:= ConjugacyClasses( C );
cl:=ShallowCopy(D.classes);
D.classreps:=List(cl,Representative);
D.klanz:=Length(cl);
D.classrange:=[1..D.klanz];
Info(InfoCharacterTable,1,D.klanz," classes");
# compute the permutation we apply to the classes
pl:=[1..D.klanz];
SortParallel(cl,pl,ClassComparison);
D.perm:=PermList(pl);
D.permlist:=pl;
D.currentInverseClassNo:=0;
D.characterTable:=C;
D.classiz:=SizesConjugacyClasses(C);
D.centralizers:=SizesCentralizers(C);
D.orders:=OrdersClassRepresentatives(C);
IsAbelian(G); # force computation
DxPreparation(G,D);
return D;
end);
# #############################################################################
# ##
# #F DxPowerClass(<D>,<cl>,<pow>) . . . . . . . . . . . . . evaluate powermap
# ##
# DxPowerClass := function(D,nu,power)
# local p,primes,cl;
# cl:=nu;
# power:=power mod D.characterTable.orders[cl];
# if power=0 then
# return 1;
# elif power=1 then
# return cl;
# else
# primes:=Factors(power);
# for p in primes do
# if not IsBound(D.characterTable.powermap[p]) then
# return D.ClassElement(D,
# Representative(D.classes[nu])^power);
# else
# cl:=D.characterTable.powermap[p][cl];
# fi;
# od;
# return cl;
# fi;
# end;
#############################################################################
##
#F DxCalcAllPowerMaps(<D>) . . . . . . . calculate power maps for char.table
##
DxCalcAllPowerMaps := function(D)
local p,primes,i,cl,spr,j,allpowermaps,pm,ex;
# compute the inverse classes
p:=[1];
for i in [2..D.klanz] do
p[i]:=D.ClassElement(D,D.classreps[i]^-1);
od;
SetInverseClasses(D.characterTable,p);
D.inversemap:=p;
allpowermaps:=ComputedPowerMaps(D.characterTable);
allpowermaps[1]:=D.classrange;
D.powermap:=allpowermaps;
# get all primes smaller than the largest element order
primes:=[];
p:=2;
pm:=Maximum(D.orders);
while p<=pm do
Add(primes,p);
p:=NextPrimeInt(p);
od;
for p in primes do
allpowermaps[p]:=List(D.classrange,i->ShallowCopy(D.classrange));
allpowermaps[p][1]:=1;
#allpowermaps[p]:=InitPowerMap(D.characterTable,p);
od;
for p in primes do
#T ConsiderSmallerPowermaps?
# eventuell,bei kleinen Gruppen kostet das aber zu viel. Hier ist es
# vermutlich sinnvoller erst von Hand anzufangen.
spr:=Filtered(primes,i->i<p);
pm:=allpowermaps[p];
# First try to compute cheap images.
for i in D.classrange do
if IsList(pm[i]) and Length(pm[i])=1 then
pm[i]:=pm[i][1];
fi;
if not IsInt(pm[i]) then
cl:=i;
ex:=p mod D.orders[i];
if ex=0 then
pm[i]:=1;
else
if ex>D.orders[i]/2 then
# can we get it cheaper via the inverse
ex:=AbsInt(D.orders[i]-ex);
cl:=D.inversemap[i];
fi;
if ex<p or (ex=p and IsInt(pm[cl])) then
# compose the ex-th power
j:=Factors(ex);
while Length(j)>0 do
cl:=allpowermaps[j[1]][cl];
j:=j{[2..Length(j)]};
od;
pm[i]:=cl;
fi;
fi;
fi;
od;
# Do the hard computations.
for i in Reversed(D.classrange) do
if not IsInt(pm[i]) then
pm[i]:=D.ClassElement(D,D.classreps[i]^(p mod D.orders[i]));
#T TestConsistencyMaps (local improvement!) after each calculation?
# note following powers: (x^a)^b=(x^b)^a
for j in spr do
cl:=allpowermaps[j][i];
if not IsInt(pm[cl]) then
pm[cl]:=allpowermaps[j][pm[i]];
fi;
od;
fi;
od;
od;
end;
#############################################################################
##
#F DxCalcPrimeClasses(<D>)
##
## Compute primary classes of the group $G$,that is,every class of $G$
## is the power of one of these classes.
## 'DxCalcPrimeClasses(<D>)' returns a list,each entry being a list whose
## $i$-th entry is the $i$-th power of a primary class.
##
## It is assumed that the power maps for all primes up to the maximal
## representative order of $G$ are known.
##
DxCalcPrimeClasses := function(D)
local primeClasses,
classes,
i,
j,
class,
p;
primeClasses:=[];
classes:=[1..D.klanz];
for i in Reversed(classes) do
primeClasses[i]:=[];
if IsBound(classes[i]) then
class:=i;
j:=1;
while 1<class do
if class<>i then
Unbind(classes[class]);
fi;
primeClasses[i][j]:=class;
j:=j+1;
class:=i;
for p in Factors(j) do
class:=D.powermap[p][class];
od;
od;
fi;
od;
D.primeClasses:=[];
for i in classes do
Add(D.primeClasses,primeClasses[i]);
od;
D.primeClasses[1]:=[1];
end;
#############################################################################
##
#F DxNiceBasis(v,space)
##
DxIsInSpace := function(v,r)
if not IsBound(r.space) then
r.space:=VectorSpace(Field(r.base[1]),r.base);
fi;
return v in r.space;
end;
#############################################################################
##
#F DxNiceBasis(D,space) . . . . . . . . . . . . . nice basis of space record
##
DxNiceBasis := function(d,r)
local b;
if not IsBound(r.niceBasis) then
b:=List(r.base,i->i{d.permlist}); # copied and permuted according to order
TriangulizeMat(b);
b:=List(b,i->Permuted(i,d.perm)); # permuted back
r.niceBasis:=Immutable(b);
fi;
Assert(1,Length(r.niceBasis)=Length(r.base));
return r.niceBasis;
end;
#############################################################################
##
#F DxActiveCols(D,<space|base>) . . . . . . active columns of space or base
##
DxActiveCols := function(D,raum)
local base,activeCols,j,n,l;
activeCols:=[];
if IsRecord(raum) then
n:=Zero(D.field);
if IsBound(raum.activeCols) then
return raum.activeCols;
fi;
base:=DxNiceBasis(D,raum);
else
n:=Zero(D.field);
base:=DxNiceBasis(D,rec(base:=raum));
fi;
l:=1;
# find columns in order as given in pl as active
for j in [1..Length(base)] do
while base[j][D.permlist[l]]=n do
l:=l+1;
od;
Add(activeCols,D.permlist[l]);
od;
if IsRecord(raum) then
raum.activeCols:=activeCols;
fi;
return activeCols;
end;
#############################################################################
##
#F DxRegisterModularChar(<D>,<c>) . . . . . note newly found irreducible
#F character modulo prime
##
DxRegisterModularChar := function(D,c)
local d,p;
# it may happen,that an irreducible character will be registered twice:
# 2-dim space,1 Orbit,combinatoric split. Avoid this!
if not(c in D.modulars) then
Add(D.modulars,c);
d:=Int(c[1]);
D.deg:=D.deg-d^2;
D.num:=D.num-1;
p:=1;
while p<=Length(D.degreePool) do
if D.degreePool[p][1]=d then
D.degreePool[p][2]:=D.degreePool[p][2]-1;
# filter still possible character degrees:
p:=1;
d:=1;
# determinate smallest possible degree (nonlinear)
while p<=Length(D.degreePool) and d=1 do
if D.degreePool[p][2]>1 then
d:=D.degreePool[p][1];
fi;
p:=p+1;
od;
# degreeBound
d:=RootInt(D.deg-(D.num-1)*d);
D.degreePool:=Filtered(D.degreePool,i->i[2]>0 and i[1]<=d);
p:=Length(D.degreePool)+1;
fi;
p:=p+1;
od;
fi;
end;
#############################################################################
##
#F DxIncludeIrreducibles(<D>,<new>,[<newmod>]) . . . . handle (newly?) found
#F irreducibles
##
## This routine will do all handling,whenever characters have been found
## by other means,than the Dixon/Schneider algorithm. First the routine
## checks,which characters are not new (this allows one to include huge bulks
## of irreducibles got by tensoring). Then the characters are closed under
## images of the CharacterMorphisms. Afterwards the character spaces are
## stripped of the new characters,the characters are included as
## irreducibles and possible degrees etc. are corrected. If the modular
## images of the irreducibles are known, they may be given in newmod.
##
InstallGlobalFunction( DxIncludeIrreducibles, function(arg)
local i,pcomp,m,r,D,neue,tm,news,opt;
D:=arg[1];
opt:=ValueOption("noproject");
# force computation of all images under $\cal T$. We will need this
# (among others),to be sure,that we can keep the stabilizers
neue:=arg[2];
if Length(neue) = 0 then return; fi;
if IsBound(D.characterMorphisms) then
tm:=D.characterMorphisms;
news:=Union(List(neue,i->Orbit(tm,i,D.asCharacterMorphism)));
if Length(news)>Length(neue) then
Info(InfoCharacterTable,1,"new Characters by character morphisms found");
fi;
neue:=news;
fi;
neue:=Difference(neue,D.irreducibles);
D.irreducibles:=Concatenation(D.irreducibles,neue);
if Length(arg)=3 then
m:=Difference(arg[3],D.modulars);
if IsBound(D.characterMorphisms) then
m:=Union(List(m,i->Orbit(tm,i,D.asCharacterMorphism)));
fi;
else
m:=List(neue,i->List(i,D.modularMap));
fi;
for i in m do
DxRegisterModularChar(D,i);
od;
if opt<>true then
pcomp:=NullspaceMat(D.projectionMat*TransposedMat(D.modulars));
for i in [1..Length(D.raeume)] do
r:=D.raeume[i];
if r.dim = Length(r.base[1]) then
# trivial case: Intersection with full space in the beginning
r:=rec(base:=pcomp);
else
r:=rec(base:=SumIntersectionMat(pcomp,r.base)[2]);
fi;
r.dim:=Length(r.base);
# note stabilizer
if IsBound(D.raeume[i].stabilizer) then
r.stabilizer:=D.raeume[i].stabilizer;
fi;
if r.dim>0 then
DxActiveCols(D,r);
fi;
D.raeume[i]:=r;
od;
fi;
D.raeume:=Filtered(D.raeume,i->i.dim>0);
end );
#############################################################################
##
#F DxLinearCharacters(<D>) . . . . calculate characters of G of degree 1
##
## These characters are computed as characters of G/G'. This can be done
## easily by using the fact,that an abelian group is direct product of
## cyclic groups. Thus we get the characters as "direct products" of the
## characters of cyclic groups,which can be easily computed. They are
## lifted afterwards back to G.
##
DxLinearCharacters := function(D)
local H,T,c,a,e,f,i,j,k,l,m,p,ch,el,ur,s,hom,gens,onc,G;
G:=D.group;
onc:=List([1..D.klanz],i->1);
D.trivialCharacter:=onc;
H:=DerivedSubgroup(G);
hom:=NaturalHomomorphismByNormalSubgroup(G,H);
H:=Image(hom,G);
e:=ShallowCopy(AsList(H));
s:=Length(e); # Size(H)
if s=1 then # perfekter Fall
D.tensorMorphisms:=rec(a:=[],
c:=[],
els:=[[[],onc]]);
return [onc];
else
a:=Reversed(AbelianInvariants(H));
gens:=[];
T:=Subgroup(H,gens);
for i in a do
# was: m:=First(e,el->Order(el)=i);
m:=First(e,
el->Order(el)=i and ForAll([2..Order(el)-1],i->el^i in e));
T:=ClosureGroup(T,m);
e:=Difference(e,AsList(T));
Add(gens,m);
od;
e:=AsList(H);
f:=List(e,i->[]);
for i in [1..D.klanz] do # create classimages
Add(f[Position(e,Image(hom,D.classreps[i]))],i);
od;
m:=Length(a);
c:=List([1..m],i->[]);
i:=m;
# run through all Elements of H by trying every combination of the
# generators
p:=List([1..m],i->0);
while i>0 do
el:=One(H); # Element berechnen
for j in [1..m] do
el:=el*gens[j]^p[j];
od;
ur:=f[Position(e,el)];
for j in [1..m] do # all character values for this element
ch:=E(a[j])^p[j];
for l in ur do
c[j][l]:=ch;
od;
od;
while (i>0) and (p[i]=a[i]-1) do
p[i]:=0;
i:=i-1;
od;
if i>0 then
p[i]:=p[i]+1;
i:=m;
fi;
od;
ch:=[];
i:=m;
p:=List([1..m],i->0);
while i>0 do
# construct tensor product systematically
el:=ShallowCopy(onc);
for j in [1..m] do
for k in [1..D.klanz] do
el[k]:=el[k]*c[j][k]^p[j];
od;
od;
Add(ch,[ShallowCopy(p),el]);
while (i>0) and (p[i]=a[i]-1) do
p[i]:=0;
i:=i-1;
od;
if i>0 then
p[i]:=p[i]+1;
i:=m;
fi;
od;
D.tensorMorphisms:=rec(a:=a,
c:=c,
els:=ch);
ch:=List(ch,i->i[2]);
return ch;
fi;
end;
#############################################################################
##
#F DxLiftCharacter(<D>,<modChi>) . recalculate character in characteristic 0
##
DxLiftCharacter := function(D,modular)
local modularchi,chi,zeta,degree,sum,M,l,s,n,j,polynom,chipolynom,
family,prime;
prime:=D.prime;
modularchi:=List(modular,Int);
degree:=modularchi[1];
chi:=[degree];
for family in D.primeClasses do
# we need to compute the polynomial only for prime classes. Powers are
# obtained by simpy inserting powers in this polynomial
j:=family[1];
l:=Order(D.classreps[j]);
zeta:=E(l);
polynom:=[degree,modularchi[j]];
for n in [2..l-1] do
s:=family[n];
polynom[n+1]:=modularchi[s];
od;
chipolynom:=[];
s:=0;
sum:=degree;
while sum>0 do
M:=DxModularValuePol(polynom,
PowerModInt(D.z,-s*Exponent(D.group)/l,prime),
#PowerModInt(D.z,-s*D.irrexp/l,prime),
prime)/l mod prime;
Add(chipolynom,M);
sum:=sum-M;
s:=s+1;
od;
for n in [1..l-1] do
s:=family[n];
if not IsBound(chi[s]) then
chi[s]:=ValuePol(chipolynom,zeta^n);
fi;
od;
od;
return chi;
end;
#############################################################################
##
#F SplitCharacters(<D>,<list>) split characters according to the spaces
#F this function can be applied to ordinary characters. It splits them
#F according to the character spaces yet known. This can be used
#F interactively to utilize partially computed spaces
##
InstallGlobalFunction( SplitCharacters, function(D,l)
local ml,nu,ret,r,p,v,alo,ofs,orb,i,j,inv,b;
b:=Filtered(l,i->(i[1]>1) and (i[1]<D.prime/2));
l:=Difference(l,b);
ml:=List(b,i->List(i,D.modularMap));
nu:=List(D.classrange,i->Zero(D.field));
ret:=[];
b:=ShallowCopy(D.modulars);
alo:=Length(b);
ofs:=[];
for r in D.raeume do
# recreate all images
orb:=Orbit(D.characterMorphisms,r,
function(raum,el)
local img;
img:=D.asCharacterMorphism(raum.base[1],el);
img:=First(D.raeume,
function(i)
local c;
c:=Concatenation(List(i.base,ShallowCopy),[ShallowCopy(img)]);
return RankMat(c)=Length(i.base);
end);
if img=fail then
img:=rec(base:=List(raum.base,i->D.asCharacterMorphism(i,el)),
dim:=raum.dim);
fi;
return img;
end);
for i in orb do
if not IsMutable(i) then
i:=ShallowCopy(i);
fi;
b:=Concatenation(b,DxNiceBasis(D,i));
Add(ofs,[alo+1..Length(b)]);
alo:=Length(b);
od;
od;
inv:=b^(-1);
for i in ml do
v:=i*inv;
for r in [1..Length(D.raeume)] do
p:=ShallowCopy(nu);
for j in ofs[r] do
p[j]:=v[j];
od;
p:=p*b;
if p<>nu then
AddSet(ret,DxLiftCharacter(D,p));
fi;
od;
od;
return Union(ret,l);
end );
#############################################################################
##
#F DxEigenbase(<mat>,<field>) . . . . . components of Eigenvects resp. base
##
DxEigenbase := function(M,f)
local dim,i,k,eigenvalues,base,minpol,bases;
k:=Length(M);
minpol:=MinimalPolynomial(f,M);
Assert(2,IsDuplicateFree(RootsOfUPol(minpol)));
eigenvalues:=Set(RootsOfUPol(minpol));
dim:=0;
bases:=[];
for i in eigenvalues do
base:=NullspaceMat(M-i*M^0);
if base=[] then
Error("This can`t happen: Wrong Eigenvalue ???");
else
#TriangulizeMat(base);
dim:=dim+Length(base);
Add(bases,base);
fi;
od;
if dim<>Length(M) then
Error("Failed to calculate eigenspaces.");
fi;
Assert(3, ForAll([1..Length(bases)],j->bases[j]*M = bases[j]*eigenvalues[j]));
return rec(base:=bases,
values:=eigenvalues);
end;
#############################################################################
##
#F SplitStep(<D>,<bestMat>) . . . . . . calculate matrix bestMat as far as
#F needed and split spaces
##
InstallGlobalFunction(SplitStep,function(D,bestMat)
local raeume,base,M,bestMatCol,bestMatSplit,i,j,k,N,row,col,Row,o,dim,
newRaeume,raum,ra,f,activeCols,eigenbase,eigen,v,vo;
if not bestMat in D.matrices then
Error("matrix <bestMat> not indicated for splitting");
fi;
if D.classiz[bestMat]>10^6 then
Info(InfoWarning,1,"computing class matrix for class of size >10^6");
fi;
k:=D.klanz;
f:=D.field;
o:=D.one;
raeume:=D.raeume;
if ForAny(raeume,i->i.dim>1) then
bestMatCol:=D.requiredCols[bestMat];
bestMatSplit:=D.splitBases[bestMat];
M:= NullMat( k, k, 0 );
Info(InfoCharacterTable,1,"Matrix ",bestMat,",Representative of Order ",
Order(D.classreps[bestMat]),
",Centralizer: ",D.centralizers[bestMat]);
Add(D.yetmats,bestMat);
for col in bestMatCol do
Info(InfoCharacterTable,2,"Computing column ",col,":");
D.ClassMatrixColumn(D,M,bestMat,col);
od;
M:=M*o;
# note,that we will have calculated yet one!
D.maycent:=true;
newRaeume:=[];
SubtractSet(D.matrices,[bestMat]);
for i in bestMatSplit do
raum:=raeume[i];
base:=DxNiceBasis(D,raum);
dim:=raum.dim;
# cut out the 'active part' for computation of an eigenbase
activeCols:=DxActiveCols(D,raum);
N:= NullMat( dim, dim, o );
for row in [1..dim] do
Row:=base[row]*M;
for col in [1..dim] do
N[row][col]:=Row[activeCols[col]];
od;
od;
eigen:=DxEigenbase(N,f);
# Base umrechnen
eigenbase:=List(eigen.base,i->List(i,j->j*base));
#eigenvalues:=List(eigen.values,i->i/D.classiz[bestMat]);
Assert(1,Length(eigenbase)>1);
#if Length(eigenbase)=1 then
# Error("#W This should not happen !");
# Add(newRaeume,raum);
#else
ra:=List(eigenbase,i->rec(base:=i,dim:=Length(i)));
# throw away Galois-images
for i in [1..Length(ra)] do
if IsBound(ra[i]) then
vo:=Orbit(raum.stabilizer,ra[i].base[1],
D.asCharacterMorphism);
for v in vo do
for j in [i+1..Length(ra)] do
if IsBound(ra[j])
# ahulpke, 11-jan-00: If we map into a larger space, the
# extra dimension of the larger space might somehow get
# lost. Therefore we can't be that tricky as the following
# argument supposes.
# In characteristic p the split may be
# not as well,as in characteristic 0. In this
# case,we may find a smaller image in another space.
# As character morphisms are a group we will also
# have the inverse image of the complement, we can
# throw away the space without doing harm!
# the only ugly disadvantage is,that we will have to
# do some more inclusion tests.
and ra[i].dim=ra[j].dim
and DxIsInSpace(v,ra[j]) then
Unbind(ra[j]);
fi;
od;
od;
fi;
od;
for i in ra do
# force computation of base
i.dim:=Length(i.base);
DxNiceBasis(D,i);
if IsBound(raum.stabilizer) then
i.approxStab:=raum.stabilizer;
fi;
Add(newRaeume,i);
od;
od;
# add the ones that did not split
for i in [1..Length(raeume)] do
if not i in bestMatSplit then
Add(newRaeume,raeume[i]);
fi;
od;
raeume:=newRaeume;
fi;
for i in [1..Length(raeume)] do
if raeume[i].dim>1 then
DxActiveCols(D,raeume[i]);
fi;
od;
Info(InfoCharacterTable,1,"Dimensions: ",List(raeume,i->i.dim));
D.raeume:=raeume;
return true;
end);
#############################################################################
##
#F CharacterMorphismOrbits(<D>,<space>) . . stabilizer and invariantspace
##
CharacterMorphismOrbits := function(D,space)
local a,b,s,o,gen,b1;
if not IsBound(space.stabilizer) then
if IsBound(space.approxStab) then
a:=space.approxStab;
else
a:=D.characterMorphisms;
fi;
space.stabilizer:=Stabilizer(a,VectorSpace(D.field,space.base),
D.asCharacterMorphism);
fi;
if not IsBound(space.invariantbase) then
o:=D.one;
s:=space.stabilizer;
b:=DxNiceBasis(D,space);
a:=DxActiveCols(D,space);
# calculate invariant space as intersection of E.S to E.V. 1
for gen in GeneratorsOfGroup(s) do
if Length(b)>0 then
b1:=NullspaceMat(List(b,i->D.asCharacterMorphism(i,gen){a})
-IdentityMat(Length(b),o));
if Length(b1)=0 then
b:=[];
else
b:=b1*b;
fi;
fi;
#T cheaper!
b:=rec(base:=b,dim:=Length(b));
a:=DxActiveCols(D,b);
b:=DxNiceBasis(D,b);
od;
space.invariantbase:=b;
fi;
return rec(invariantbase:=space.invariantbase,
number:=Length(space.invariantbase),
stabilizer:=space.stabilizer);
end;
#############################################################################
##
#F DxModProduct(<D>,<vector1>,<vector2>) . . . product of two characters mod p
##
DxModProduct := function(D,v1,v2)
local prod,i;
prod:=0*D.one;
for i in [1..D.klanz] do
prod:=prod+ (D.classiz[i] mod D.prime)*v1[i]
*v2[D.inversemap[i]];
od;
prod:=prod/(D.size mod D.prime);
return prod;
end;
#############################################################################
##
#F DxFrobSchurInd(<D>,<char>) . . . . . . modular Frobenius-Schur indicator
##
DxFrobSchurInd := function(D,char)
local FSInd,classes,l,ll,L,family;
FSInd:=char[1];
classes:=[2..D.klanz];
for family in D.primeClasses do
L:=Length(family)+1;
for l in [1..L-1] do
if family[l] in classes then
ll:=2*l mod L;
if ll=0 then
FSInd:=FSInd+(D.classiz[family[l]] mod D.prime)
*char[1];
else
FSInd:=FSInd+(D.classiz[family[l]] mod D.prime)
*char[family[ll]];
fi;
SubtractSet(classes,[family[l]]);
fi;
od;
od;
return FSInd/(D.size mod D.prime);
end;
#############################################################################
##
#F SplitTwoSpace(<D>,<raum>) . . . split two-dim space by combinatoric means
##
## If the room is 2-dimensional,this is ment to be the standard split.
## Otherwise,the two-dim invariant space of raum is to be split
##
SplitTwoSpace := function(D,raum)
local v1,v2,v1v1,v1v2,v2v1,v2v2,degrees,d1,d2,deg2,prime,o,f,d,degrees2,
lift,root,p,q,n,char,char1,char2,a1,a2,i,NotFailed,k,l,m,test,ol,
di,rp,mdeg2,mult,str;
mult:=Index(D.characterMorphisms,CharacterMorphismOrbits(D,raum).stabilizer);
f:=raum.dim=2; # space or invariant space split indicator flag
prime:=D.prime;
rp:=Int(prime/2);
o:=D.one;
if f then
v1:=DxNiceBasis(D,raum);
v2:=v1[2];
v1:=v1[1];
ol:=[1];
else
Info(InfoCharacterTable,1,"Attempt:",raum.dim);
v1:=raum.invariantbase[1];
v2:=raum.invariantbase[2];
ol:=Filtered(DivisorsInt(Size(raum.stabilizer)),i->i<raum.dim/2+1);
fi;
v1v1:=DxModProduct(D,v1,v1);
v1v2:=DxModProduct(D,v1,v2);
v2v1:=DxModProduct(D,v2,v1);
v2v2:=DxModProduct(D,v2,v2);
char:=[];
char2:=[];
NotFailed:=not IsZero(v2v2);
di:=1;
while di<=Length(ol) and NotFailed do
d:=ol[di];
degrees:=DxDegreeCandidates(D,d*mult);
if f then
degrees2:=degrees;
else
degrees2:=DxDegreeCandidates(D,(raum.dim-d)*mult);
fi;
mdeg2:=List(degrees2,i->i mod prime);
i:=1;
while i<=Length(degrees) and NotFailed do
lift:=true;
d1:=degrees[i];
if d1*d>rp then
lift:=false;
fi;
p:=(v2v1+v1v2)/v2v2;
q:=(v1v1-o/(d*(d1^2) mod D.prime))/v2v2;
for root in SquareRoots(D.field,(p/2)^2-q) do
a1:=(-p/2+root);
n:=v1v2+a1*v2v2;
if (n=0*o) then
# proceeding would force a division by zero
NotFailed:=false;
else
a2:=-(v1v1+a1*v2v1)/n;
n:=v1v1+a2*(v1v2+v2v1)+a2^2*v2v2;
if n<>0*o then
deg2:=List(SquareRoots(D.field,o/(raum.dim-d)/n),Int);
for d2 in deg2 do
if d2 in mdeg2 then
if not d2 in degrees2 or d2*(raum.dim-d)>rp then
# degree is too big for lifting
lift:=false;
fi;
char1:=[d*d1*(v1+a1*v2),(raum.dim-d)*d2*(v1+a2*v2)];
if Length(char)>0 and
(char[1].base[1]=char1[2]) and
(char[2].base[1]=char1[1]) then
test:=false;
else
test:=true;
fi;
l:=1;
while (l<3) and test do
if f then
n:=1;
elif l=1 then
n:=d;
else
n:=raum.dim-d;
fi;
if not DxFrobSchurInd(D,char1[l]) in o*[-n..n]
then test:=false;
fi;
m:=DxLiftCharacter(D,char1[l]);
char2[l]:=m;
if test and lift then
for k in [2..Length(m)] do
if IsInt(m[k]) and AbsInt(m[k])>m[1] then
test:=false;
fi;
od;
if test and not IsInt(Sum(m)) then
test:=false;
fi;
fi;
l:=l+1;
od;
if test then
if Length(char)>0 then
NotFailed:=false;
else
char:=[rec(base:=[char1[1]],
char:=[char2[1]],
d:=d),
rec(base:=[char1[2]],
char:=[char2[2]],
d:=raum.dim-d)];
fi;
fi;
fi;
od;
fi;
fi;
od;
i:=i+1;
od;
di:=di+1;
od;
if f then
str:="Two-dim";
else
str:="Two orbit";
fi;
if NotFailed then
Info(InfoCharacterTable,1,str," space split");
return char;
else
Info(InfoCharacterTable,1,str," split failed");
raum.twofail:=true;
return [];
fi;
end;
#############################################################################
##
#F CombinatoricSplit(<D>) . . . . . . . . . split two-dimensional spaces
##
CombinatoricSplit := function(D)
local i,newRaeume,raum,neuer,j,ch,irrs,mods,incirrs,incmods,nb,rt,neuc;
newRaeume:=[];
incirrs:=[];
incmods:=[];
for i in [1..Length(D.raeume)] do
raum:=D.raeume[i];
if raum.dim=2 and not IsBound(raum.twofail) then
neuer:=SplitTwoSpace(D,raum);
else
neuer:=[];
if raum.dim=2 then
# next attempt might work due to fewer degrees
Unbind(raum.twofail);
fi;
fi;
if Length(neuer)=2 then
rt:=Difference(RightTransversal(D.characterMorphisms,
CharacterMorphismOrbits(D,raum).stabilizer),
[One(D.characterMorphisms)]);
mods:=[];
irrs:=[];
for j in [1,2] do
Info(InfoCharacterTable,2,"lifting character no.",
Length(D.irreducibles)+Length(incirrs));
if IsBound(neuer[j].char) then
ch:=neuer[j].char[1];
else
ch:=DxLiftCharacter(D,neuer[j].base[1]);
fi;
if not ch in D.irreducibles then
Add(mods,neuer[j].base[1]);
Add(incmods,neuer[j].base[1]);
Add(irrs,ch);
Add(incirrs,ch);
fi;
od;
for j in rt do
Info(InfoCharacterTable,1,"TwoDimSpace image");
nb:=D.asCharacterMorphism(raum.base[1],j);
neuc:=List(irrs,i->D.asCharacterMorphism(i,j));
if not ForAny([i+1..Length(D.raeume)],i->nb in D.raeume[i].space) then
incirrs:=Union(incirrs,neuc);
incmods:=Union(incmods,List(mods,i->D.asCharacterMorphism(i,j)));
else
Error("#W strange spaces due to inclusion of irreducibles!\n");
Add(D.irreducibles,neuc[1]);
Add(D.irreducibles,neuc[2]);
fi;
od;
else
Add(newRaeume,raum);
fi;
od;
D.raeume:=newRaeume;
if Length(incirrs)>0 then
DxIncludeIrreducibles(D,incirrs,incmods:noproject);
fi;
end;
#############################################################################
##
#F OrbitSplit(<D>) . . . . . . . . . . . . . . try to split two-orbit-spaces
##
InstallGlobalFunction( OrbitSplit, function(D)
local i,s,ni,nm;
ni:=[];
nm:=[];
for i in D.raeume do
if i.dim=3 and not IsBound(i.twofail) and
CharacterMorphismOrbits(D,i).number=2 then
s:=SplitTwoSpace(D,i);
if Length(s)=2 and s[1].d=1 then
# character extracted
Add(ni,s[1].char[1]);
Add(nm,s[1].base[1]);
fi;
fi;
od;
if ni<>[] then
DxIncludeIrreducibles(D,ni,nm);
fi;
CombinatoricSplit(D);
end );
#############################################################################
##
#F DxModularValuePol(<f>,<x>,<p>) . evaluate polynomial at a point,mod p
##
## 'DxModularValuePol' returns the value of the polynomial<f>at<x>,
## regarding the result modulo p.<x>must be an integer number.
##
## 'DxModularValuePol' uses Horners rule to evaluate the polynom.
##
InstallGlobalFunction( DxModularValuePol, function (f,x,p)
local value,i;
value := 0;
i := Length(f);
while i>0 do
value := (value * x + f[i]) mod p;
i := i-1;
od;
return value;
end );
#############################################################################
##
#F ModularCharacterDegree(<D>,<chi>) . . . . . . . . . degree of normalized
#F character modulo p
##
ModularCharacterDegree := function(D,chi)
local j,j1,d,sum,prime;
prime:=D.prime;
sum:=0*D.one;
for j in [1..D.klanz] do
j1:=D.inversemap[j];
sum:=sum+chi[j]*chi[j1]*(D.classiz[j] mod prime);
od;
d:=RootMod(D.size/Int(sum) mod prime,prime);
# take correct (smaller) root
if 2*d>prime then
d:=prime-d;
fi;
return d;
end;
#############################################################################
##
#F DxDegreeCandidates(<D>,[<anz>]) . Potential degrees for anz characters of
#F same degree,if num characters of total degree deg are yet to be found
##
InstallGlobalFunction( DxDegreeCandidates, function(arg)
local D,anz,degrees,i,r;
D:=arg[1];
if Length(arg)>1 then
anz:=arg[2];
degrees:=[];
if Length(D.degreePool)=0 then
return [];
fi;
r:=RootInt(Int((D.deg-(D.num-anz)*D.degreePool[1][1]^2)/anz));
i:=1;
while i<=Length(D.degreePool) and D.degreePool[i][1]<=r do
if D.degreePool[i][2]>anz then
Add(degrees,D.degreePool[i][1]);
fi;
i:=i+1;
od;
return degrees;
else
return List(D.degreePool,i->i[1]);
fi;
end );
#############################################################################
##
#F DxSplitDegree(<D>,<space>,<r>) estimate number of parts when splitting
## space with matrix number r,according to charactermorphisms
##
InstallGlobalFunction( DxSplitDegree, function(D,space,r)
local a,b,s,o,fix,k,l,i,j,gorb,v,w,
base;
# is perfect split guaranteed ?
if IsBound(space.split) then
return space.split;
fi;
o:=D.one;
a:=CharacterMorphismOrbits(D,space);
if a.number=space.dim then
return 2; #worst possible split
fi;
if a.number=1 and IsPrime(space.dim) then
# spaces of prime dimension with one orbit must split perfectly
space.split:=space.dim;
return space.dim;
fi;
# both cases,but MultiOrbit is not as effective
s:=a.stabilizer;
b:=a.invariantbase;
gorb:=D.galoisOrbits[r];
fix:=Length(gorb)=1;
if not fix then
# Galois group acts trivial ? (seen if constant values on
# rational class)
i:=1;
fix:=true;
base:=DxNiceBasis(D,space);
while fix and i<=Length(base) do
v:=base[i];
w:=v[r];
for j in gorb do
if v[j]<>w then
fix:=false;
fi;
od;
i:=i+1;
od;
fi;
if fix then
#l:=List(s.generators,i->i.tens[r]);
l:=List(GeneratorsOfGroup(s),i->D.asCharacterMorphism(1,i).tens[r]);
v:=[o];
for i in v do
for j in l do
w:=i*j;
if not w in v then
Add(v,w);
fi;
od;
od;
return Length(v); #Length(Set(List(AsList(s),i->i.tens[r])));
else
# nonfix
# v is an element from the space with non-galois-fix parts.
l:=Maximum(List(TransposedMat(List(Orbit(s,v,D.asCharacterMorphism),
i->i{D.galoisOrbits[r]})),i->Length(Set(i))));
if a.number=1 then
# One orbit: number of resultant spaces must be a divisor of the dimension
k:=DivisorsInt(space.dim);
while l<space.dim and not l in k do
l:=l+1;
od;
fi;
return l;
fi;
end );
#############################################################################
##
#F DxGaloisOrbits(<D>,<f>) . orbits of Stab_Gal(f) when acting on the classes
##
DxGaloisOrbits := function(D,f)
local i,k,l,u,ga,galOp,p;
k:=D.klanz;
if not IsBound(D.galOp[f]) then
galOp:=D.galOp;
if f in MovedPoints(D.galMorphisms) then
ga:=Stabilizer(D.galMorphisms,f);
else
ga:=D.galMorphisms;
fi;
p:=true;
i:=1;
while p and i<=Length(galOp) do
if IsBound(galOp[i]) and
galOp[i].group=ga then
galOp[f]:=galOp[i];
p:=false;
else
i:=i+1;
fi;
od;
if p then
galOp[f]:=rec(group:=ga);
l:=List([1..k],i->Set(Orbit(ga,i)));
galOp[f].orbits:=l;
u:=List(Filtered(Collected(
List(Set(List(l,i->i[1])),j->D.rids[j])),n->n[2]=1),t->t[1]);
galOp[f].uniqueIdentifications:=u;
galOp[f].identifees:=Filtered([1..k],i->D.rids[i] in u);
fi;
fi;
return D.galOp[f];
end;
#############################################################################
##
#F BestSplittingMatrix(<D>) . number of the matrix,that will yield the best
#F split
##
## This routine calculates also all required columns etc. and stores the
## result in D
##
InstallGlobalFunction( BestSplittingMatrix, function(D)
local n,i,val,b,requiredCols,splitBases,wert,nu,r,rs,rc,bn,bw,split,
orb,os,lim,ksl;
nu:=Zero(D.field);
requiredCols:=[];
splitBases:=[];
wert:=[];
os:=ForAll(D.raeume,i->i.dim<20); #only small spaces left?
if Length(D.raeume)=0 then
Error("nothing left to split!");
fi;
lim:=ValueOption("maxclasslen");
if lim=fail then
lim:=infinity;
fi;
ksl:=1;
repeat
for n in D.matrices do
requiredCols[n]:=[];
splitBases[n]:=[];
wert[n]:=0;
# only take classes small enough
if D.classiz[n]<=lim and
# dont start with central classes in small groups!
(D.classiz[n]>ksl or IsBound(D.maycent)) then
for i in [1..Length(D.raeume)] do
r:=D.raeume[i];
if IsBound(r.splits) then
rs:=r.splits;
else
rs:=[];
r.splits:=rs;
fi;
if r.dim>1 then
if IsBound(rs[n]) then
split:=rs[n].split;
val:=rs[n].val;
else
b:=DxNiceBasis(D,r);
split:=ForAny(b{[2..r.dim]},i->i[n]<>nu);
if split then
if r.dim<4 then
# very small spaces will split nearly perfect
val:=8;
else
bn:=DxSplitDegree(D,r,n);
if os then
if IsPerfectGroup(D.group) then
# G is perfect,no linear characters
# we can't predict much about the splitting
val:=Maximum(1,9-r.dim/bn);
else
val:=bn*Maximum(1,9-r.dim/bn);
fi;
else
val:=bn;
fi;
fi;
# note the images,which split as well
val:=val*Index(D.characterMorphisms,
CharacterMorphismOrbits(D,r).stabilizer);
else
val:=0;
fi;
rs[n]:=rec(split:=split,val:=val);
fi;
if split then
wert[n]:=wert[n]+val;
Add(splitBases[n],i);
requiredCols[n]:=Union(requiredCols[n],
D.raeume[i].activeCols);
fi;
fi;
od;
if Length(splitBases[n])>0 then
# can we use Galois-Conjugation
orb:=DxGaloisOrbits(D,n);
rc:=[];
for i in requiredCols[n] do
rc:=Union(rc,[orb.orbits[i][1]]);
od;
wert[n]:=wert[n]*D.centralizers[n] # *G/|K|
/(Length(rc)); # We count -mistakening - also the first
# column,that is availiable for free. Its "costs" are ment to
# compensate for the splitting process.
fi;
fi;
od;
for r in D.raeume do
if IsBound(r.splits) and Number(r.splits)=1 then
# is room split by only ONE matrix?(then we need this sooner or later)
# simulate: n:=PositionProperty(r.splits,IsBound);
n:=1;
while not IsBound(r.splits[n]) do
n:=n+1;
od;
wert[n]:=wert[n]*10; #arbitrary increase of value
fi;
od;
bn:=fail;
bw:=0;
# run through them in pl sequence
for n in Filtered(D.permlist,i->i in D.matrices) do
Info(InfoCharacterTable,3,n,":",Int(wert[n]));
if wert[n]>bw then
bn:=n;
bw:=wert[n];
fi;
od;
ksl:=ksl-1;
until bn<>fail or ksl<0;
if bn<>fail then
D.requiredCols:=requiredCols;
D.splitBases:=splitBases;
fi;
return bn;
end );
#############################################################################
##
#F AsCharacterMorphismFunction(<pcgs>,<gals>,<tensormorphisms>) operation
#F function for operation of charactermorphisms
##
AsCharacterMorphismFunction := function(pcgs,gals,tme)
local i,j,k,x,g,c,lg,gens;
lg:=Length(gals);
return function(p,e)
x:=ExponentsOfPcElement(pcgs,e);
g:=();
for i in [1..lg] do
g:=g*gals[i]^x[i];
od;
x:=x{[lg+1..Length(x)]};
i:=1;
while tme[i][1]<>x do
i:=i+1;
od;
x:=tme[i][3];
if IsInt(p) then # integer works only as indicator: return galois and
# tensor part
return rec(gal:=g,
tens:=x);
elif IsList(p) and not IsList(p[1]) then
if not IsFFE(p[1]) then
# operation on characteristic 0 characters;
x:=tme[i][2];
fi;
c:=[];
for i in [1..Length(p)] do
c[i]:=p[i/g]*x[i];
od;
return c;
elif IsVectorSpace(p) then # Space
gens:=BasisVectors(Basis(p));
c:=List(gens,i ->[]);
for i in [1..Length(gens[1])] do
j:=i/g;
for k in [1..Length(gens)] do
c[k][i]:=gens[k][j] * x[i];
od;
od;
return VectorSpace(LeftActingDomain(p),gens);
else
Error("action not defined");
fi;
end;
end;
#############################################################################
##
#F CharacterMorphismGroup(<D>) . . . . create group of character morphisms
##
## The group is stored in .characterMorphisms. It is an AgGroup,
## according to the decomposition K=tens:gal as semidirect product. The
## group acts as linear mappings that permute characters via the operation
## .asCharacterMorphism.
##
CharacterMorphismGroup := function(D)
local tm,tme,piso,gpcgs,gals,ord,l,l2,f,fgens,rws,hom,pow,pos,i,j,k,gen,
cof,comm;
tm:=D.tensorMorphisms;
tme:=tm.els;
piso:=IsomorphismPcGroup(D.galMorphisms);
k:=Image(piso,D.galMorphisms);
# Temporary workaround, 7/30/07, AH. It seems that permuting classes does
# not easily transfer to mod p.
k:=Image(piso,TrivialSubgroup(D.galMorphisms));
gpcgs:=Pcgs(k);
gals:=List(gpcgs,i->PreImagesRepresentative(piso,i));
ord:=List(gpcgs,i->RelativeOrderOfPcElement(gpcgs,i));
l:=Length(gpcgs);
# add tensor relative orders
tm.ro:=[];
tm.re:=[];
for i in tm.a do
f:=Factors(i);
Add(tm.ro,f[1]);
Add(tm.re,Length(f));
od;
l2:=Length(ord)-l;
f:=FreeGroup(IsSyllableWordsFamily,Length(ord));
fgens:=GeneratorsOfGroup(f);
rws:=SingleCollector(f,ord);
# pseudo-Homomorphism to map in free group
hom:= GroupGeneralMappingByImagesNC( k, f, gpcgs, fgens{[1..l]} );
# translate the gal-Relations:
for i in [1..l] do
SetPower( rws, i, ObjByExponents( rws,
Concatenation(
ExponentsOfPcElement( gpcgs, gpcgs[i]^ord[i] ),
[1..l2] * 0 ) ) );
for j in [i+1..l] do
SetConjugate( rws, j, i, ObjByExponents( rws,
Concatenation(
ExponentsOfPcElement( gpcgs, gpcgs[j]^gpcgs[i] ),
[1..l2] * 0 ) ) );
od;
od;
# correct the first and add last tme entries
for i in tme do
for j in [1..Length(i[1])] do
cof:=CoefficientsQadic(i[1][j],tm.ro[j]);
while Length(cof)<tm.re[j] do
Add(cof,0);
od;
i[1][j]:=cof;
od;
i[1]:=Concatenation(i[1]);
Add(i,List(i[2],D.modularMap));
od;
pow:=1;
pos:=0;
for i in [l+1..Length(ord)] do
# get generator
if pow=1 then
# new position, new generator
pos:=pos+1;
gen:=tm.c[pos];
pow:=tm.a[pos];
else
# power generator of last step
gen:=List(gen,j->j^ord[i-1]);
fi;
# add the necessary tensor power relations
if pow>ord[i] then
SetPower(rws,i,fgens[i+1]);
fi;
pow:=pow/ord[i];
# add commutator relations between galois and tensor
for j in [1..l] do
# compute commutator Comm(tens[i],gal[j])
#comm:=Permuted(gen,gals[j]);
#for k in [1..Length(comm)] do
# comm[k]:=gen[k]^-1*comm[k];
#od;
comm:=[];
for k in [1..Length(comm)] do
comm[k]:=gen[k]^-1*gen[k/gals[j]];
od;
# find decomposition
k:=PositionProperty(tme,i->i[2]=comm);
cof:=tme[k][1];
comm:=One(f);
for k in [1..Length(cof)] do
comm:=comm*fgens[l+k]^cof[k];
od;
SetCommutator(rws,i,j,comm);
od;
od;
tm:=GroupByRwsNC(rws);
D.characterMorphisms:=tm;
D.asCharacterMorphism:=AsCharacterMorphismFunction(HomePcgs(tm),
gals,tme);
D.tensorMorphisms:=tme;
return tm;
end;
#############################################################################
##
#F ClassElementLargeGroup(D,<el>[,<possible>]) ident. class of el in D.group
##
## First,the (hopefully) cheap identification is used,to filter the
## possible classes. If still not unique,a hard conjugacy test is applied
##
ClassElementLargeGroup := function(arg)
local D,el,possible,i,id;
D:=arg[1];
el:=arg[2];
id:=D.identification(D,el);
possible:=Filtered([1..D.klanz],i->D.ids[i]=id);
if Length(arg)>2 then
possible:=Intersection(possible,arg[3]);
fi;
i:=1;
while i<Length(possible) do
if el in D.classes[possible[i]] then
return possible[i];
else
i:=i+1;
fi;
od;
return possible[i];
end;
#############################################################################
##
#F ClassElementSmallGroup(<D>,<el>[,<poss>]) identify class of el in D.group
##
## Since we have stored the complete classmap,this is done by simply
## looking the class number up in this list.
##
ClassElementSmallGroup := function(arg)
local D;
D:=arg[1];
return D.classMap[Position(D.enum,arg[2])];
end;
#############################################################################
##
#F DoubleCentralizerOrbit(<D>,<c1>,<c2>)
##
## Let g_i be the representative of Class i.
## Compute orbits of C(g_2) on (g_1^(-1))^G. Since we want to evaluate
## x^(-1)*z for x\in Cl(g_1),and we only need the class of the result,we
## may conjugate with z-centralizing elements and still obtain the same
## results! The orbits are calculated either by simple orbit algorithms or
## whenever they might become bigger using double cosets of the
## centralizers.
##
DoubleCentralizerOrbit := function(D,c1,c2)
local often,trans,e,neu,i,inv,cent,l,s,s1,x;
inv:=D.inversemap[c1];
s1:=D.classiz[c1];
# criteria for using simple orbit part: only for small groups,note that
# computing ascending chains can be very expensive.
if s1<500 or
(not (HasStabilizerOfExternalSet(D.classes[inv])
and Tester(ComputedAscendingChains)(Centralizer(D.classes[inv])))
and s1<1000)
then
if D.currentInverseClassNo<>c1 then
D.currentInverseClassNo:=c1;
# compute (x^(-1))^G
D.currentInverseClass:=Orbit(D.group,D.classreps[inv]);
fi;
trans:=[];
cent:=Centralizer(D.classes[c2]);
for e in D.currentInverseClass do
neu:=true;
i:=1;
while neu and (i<=Length(trans)) do
if e in trans[i] then neu:=false;
fi;
i:=i+1;
od;
if neu then
Add(trans,Orbit(cent,e));
fi;
od;
often:=List(trans,i->Length(i));
return [List(trans,i->i[1]),often];
else
Info(InfoCharacterTable,2,"using DoubleCosets;");
cent:=Centralizer(D.classes[inv]);
l:=DoubleCosetRepsAndSizes(D.group,cent,Centralizer(D.classes[c2]));
s1:=Size(cent);
e:=[];
s:=[];
x:=D.classreps[inv];
for i in l do
Add(e,x^i[1]);
Add(s,i[2]/s1);
od;
return [e,s];
fi;
end;
#############################################################################
##
#F StandardClassMatrixColumn(<D>,<mat>,<r>,<t>) . calculate the t-th column
#F of the r-th class matrix and store it in the appropriate column of M
##
StandardClassMatrixColumn := function(D,M,r,t)
local c,gt,s,z,i,T,w,e,j,p,orb;
if t=1 then
M[D.inversemap[r]][t]:=D.classiz[r];
else
orb:=DxGaloisOrbits(D,r);
z:=D.classreps[t];
c:=orb.orbits[t][1];
if c<>t then
p:=RepresentativeAction(Stabilizer(orb.group,r),c,t);
if p<>fail then
# was the first column of the galois class active?
if ForAny(M,i->i[c]>0) then
for i in D.classrange do
M[i^p][t]:=M[i][c];
od;
Info(InfoCharacterTable,2,"by GaloisImage");
return;
fi;
fi;
fi;
T:=DoubleCentralizerOrbit(D,r,t);
Info(InfoCharacterTable,2,Length(T[1])," instead of ",D.classiz[r]);
if IsDxLargeGroup(D.group) then
# if r and t are unique,the conjugation test can be weak (i.e. up to
# galois automorphisms)
w:=Length(orb.orbits[t])=1 and Length(orb.orbits[r])=1;
for i in [1..Length(T[1])] do
e:=T[1][i]*z;
Unbind(T[1][i]);
if w then
c:=D.rationalidentification(D,e);
if c in orb.uniqueIdentifications then
s:=orb.orbits[
First([1..D.klanz],j->D.rids[j]=c)][1];
else
s:=D.ClassElement(D,e);
fi;
else # only strong test possible
s:=D.ClassElement(D,e);
fi;
M[s][t]:=M[s][t]+T[2][i];
od;
if w then # weak discrimination possible ?
gt:=Set(Filtered(orb.orbits,i->Length(i)>1));
for i in gt do
if i[1] in orb.identifees then
# were these classes detected weakly ?
e:=M[i[1]][t];
if e>0 then
Info(InfoCharacterTable,2,"GaloisIdentification ",i,": ",e);
fi;
for j in i do
M[j][t]:=e/Length(i);
od;
fi;
od;
fi;
else # Small Group
for i in [1..Length(T[1])] do
s:=D.ClassElement(D,T[1][i] * z);
Unbind(T[1][i]);
M[s][t]:=M[s][t]+T[2][i];
od;
fi;
fi;
end;
#############################################################################
##
#F IdentificationGenericGroup(<D>,<el>) . . class invariants for el in G
##
IdentificationGenericGroup := function(D,el)
return Order(el);
end;
#############################################################################
##
#F DxAbelianPreparation(<G>) . . specific initialisation for abelian groups
##
InstallMethod(DxPreparation,"abelian",true,[IsGroup and IsAbelian,IsRecord],0,
function(G,D)
local i,cl;
D.identification:=function(a,b) return b; end;
D.rationalidentification:=D.identification;
D.ClassMatrixColumn:=StandardClassMatrixColumn;
cl:=D.classes;
D.ids:=[];
for i in D.classrange do
D.ids[i]:=D.identification(D,D.classreps[i]);
od;
D.rids:=D.ids;
D.ClassElement:=ClassElementLargeGroup;
return D;
end);
#############################################################################
##
#M DxPreparation(<G>,<D>)
##
InstallMethod(DxPreparation,"generic",true,[IsGroup,IsRecord],0,
function(G,D)
local i,j,enum,cl;
D.identification:=IdentificationGenericGroup;
D.rationalidentification:=IdentificationGenericGroup;
D.ClassMatrixColumn:=StandardClassMatrixColumn;
cl:=D.classes;
D.ids:=[];
for i in D.classrange do
D.ids[i]:=D.identification(D,D.classreps[i]);
od;
D.rids:=D.ids;
if IsDxLargeGroup(G) then
D.ClassElement:=ClassElementLargeGroup;
else
D.ClassElement:=ClassElementSmallGroup;
enum:=Enumerator(G);
D.enum:=enum;
D.classMap:=List([1..Size(G)],i->D.klanz);
for j in [1..D.klanz-1] do
for i in Orbit(G,Representative(cl[j])) do
D.classMap[Position(D.enum,i)]:=j;
od;
od;
fi;
return D;
end);
#############################################################################
##
## CharacterDegreePool(G) . . possible character degrees,using thm. of Ito
##
CharacterDegreePool := function(G)
local k,r,s;
r:=RootInt(Size(G));
#if Size(G)>10^6 and not IsSolvableGroup(G) then
# s:=Filtered(NormalSubgroups(G),IsAbelian);
# s:=Lcm(List(s,i->Index(G,i)));
#else
s:=Size(G);
#fi;
k:=Length(ConjugacyClasses(G));
return List(Filtered(DivisorsInt(s),i->i<=r),i->[i,k]);
end;
#############################################################################
##
## ClassNumbersElements(<G>,<l>) . . class numbers in G for elements in l
##
ClassNumbersElements := function(G,l)
local D;
D:=DixonRecord(G);
return List(l,i->D.ClassElement(D,i));
end;
#############################################################################
##
#F DxGeneratePrimeCyclotomic(<e>,<r>) . . . . . . . . . ring homomorphisms
##
## $\Q(\varepsilon_e)\to\F_p$. r is e-th root in F_p.
##
DxGeneratePrimeCyclotomic := function(e,r) # exponent,Primitive Root
return function(a)
local l,n,w,s,i,o;
l:=COEFFS_CYC(a);
n:=Length(l);
o:=r^0;
w:=0*o;
s:=r^(e/n); # calculate corresponding power of modular root of unity
for i in [1..n] do
if i=1 then
w:=w+l[i]*o;
else
w:=w+s^(i-1)*l[i];
fi;
od;
return w;
end;
end;
#############################################################################
##
#F DixonInit(<G>) . . . . . . . . . . initialize Dixon-Schneider algorithm
##
##
InstallGlobalFunction( DixonInit, function(arg)
local G, # group
D, # Dixon record,result
k,z,exp,prime,M,m,f,r,ga,i,fk;
G:=arg[1];
# Force computation of the size of the group.
Size(G);
D:=DixonRecord(G);
k:=D.klanz;
DxCalcAllPowerMaps(D);
DxCalcPrimeClasses(D);
# estimate the irrationality of the table
exp:=Exponent(G);
z:=RootInt(Size(G));
prime:=12*exp+1;
fk:=ValueOption("prime");
if not IsPosInt(fk) or fk<5*k then
fk:=5*k;
fi;
while prime<Maximum(100,fk) do
prime:=prime+exp;
od;
# try to calculate approximate degrees
D.degreePool:=CharacterDegreePool(G);
z:=2*Maximum(List(D.degreePool,i->i[1]));
# throw away (unneeded) linear degrees!
D.degreePool:=Filtered(D.degreePool,i->i[1]>1 and i[1]<=z/2);
while prime<z do
prime:=prime+exp;
od;
while not IsPrimeInt(prime) do
prime:=prime+exp;
od;
f:=GF(prime);
Info(InfoCharacterTable,1,"choosing prime ",prime);
z:=PowerModInt(PrimitiveRootMod(prime),(prime-1)/exp,prime);
D.modularMap:=DxGeneratePrimeCyclotomic(exp,z* One(f));
D.num:=D.klanz;
D.prime:=prime;
D.field:=f;
D.one:=One(f);
D.z:=z;
r:=rec(base:=Immutable( IdentityMat(k,D.one) ),dim:=k);
D.raeume:=[r];
# Galois group operating on the columns
ga:= GroupByGenerators( Set( List( Flat( GeneratorsPrimeResidues(
Exponent(G)).generators),
i->PermList(List([1..k],j->PowerMap(D.characterTable,i,j))))),());
D.galMorphisms:=ga;
D.galoisOrbits:=List([1..k],i->Set(Orbit(ga,i)));
D.matrices:=Difference(Set(List(D.galoisOrbits,i->i[1])),[1]);
D.galOp:=[];
D.irreducibles:=[];
M:= IdentityMat(k);
for i in [1..k] do
M[i][i]:=D.classiz[i] mod prime;
od;
D.projectionMat:=M*(D.one/(Size(G) mod prime));
#if (USECTPGROUP or Size(G)<2000 or k*10>=Size(G))
# and IsBound(G.isAgGroup) and G.isAgGroup
# then # Anfangscharaktere ausrechnen
#
# m:=CharTablePGroup(G,"meckere nicht").irreducibles;
# if Length(m)<k then
#
# C.irreducibles:=[];
# IncludeIrreducibles(D,m);
#
# else
#
# # The irreducibles are complete.
# C.irreducibles:=m;
# D.raeume:=[];
#
# fi;
# else
DxIncludeIrreducibles(D,DxLinearCharacters(D));
# fi;
if Length(D.raeume)>0 then
# indicate Stabilizer of the whole orbit,simultaneously compute
# CharacterMorphisms.
D.raeume[1].stabilizer:=CharacterMorphismGroup(D);
m:=First(D.classes,i->Size(i)>1);
if Size(m)>8 then
D.maycent:=true;
fi;
fi;
return D;
end );
#############################################################################
##
#F DixonSplit(<D>) . . calculate matrix,split spaces and obtain characters
##
InstallGlobalFunction( DixonSplit, function(D)
local r,i,j,ch,ra,bsm,
gens;
bsm:=BestSplittingMatrix(D);
if bsm<>fail then
SplitStep(D,bsm);
fi;
for i in [1..Length(D.raeume)] do
r:=D.raeume[i];
if r.dim=1 then
Info(InfoCharacterTable,2,"lifting character no.",
Length(D.irreducibles)+1);
if IsBound(r.char) then
ch:=r.char[1];
else
gens:=r.base[1];
gens:=gens/gens[1];
gens:=gens * ModularCharacterDegree(D,gens);
for j in Orbit(D.characterMorphisms,
gens,D.asCharacterMorphism) do
DxRegisterModularChar(D,j);
od;
ch:=DxLiftCharacter(D,gens);
fi;
for j in Orbit(D.characterMorphisms,ch,D.asCharacterMorphism) do
Add(D.irreducibles,j);
od;
Unbind(D.raeume[i]);
fi;
od;
# Throw away lifted spaces
ra:=[];
for i in D.raeume do
Add(ra,i);
od;
D.raeume:=ra;
CombinatoricSplit(D);
return bsm;
end );
#############################################################################
##
#F DixontinI(<D>) . . . . . . . . . . . . . . . . reverse initialisation
##
## Return everything modified by the Dixon-Algorithm to its former status.
## the old group is returned,character table is sorted according to its
## classes
##
InstallGlobalFunction( DixontinI, function(D)
local C,u,irr;
if IsBound(D.shorttests) then
Info(InfoCharacterTable,2,D.shorttests," shortened conjugation tests");
fi;
Info(InfoCharacterTable,1,"Total:",Length(D.yetmats)," matrices,",
D.yetmats);
C:=D.characterTable;
irr:=List(D.irreducibles,i->Character(C,i));
# Sort the characters by degrees.
irr:=SortedCharacters(C,irr);
SetInfoText(C,"origin: Dixon's Algorithm");
# Throw away not any longer used components of the Dixon record.
for u in Difference(RecNames(D),
["ClassElement","centmulCandidates","centmulMults","characterTable",
"classMap","facs","fingerprintCandidates",
"group","identification","ids","iscentral","klanz","name","operations",
"replist","shorttests","uniques"])
do
Unbind(D.(u));
od;
return irr;
end );
#############################################################################
##
#M IrrDixonSchneider( <G>[, <options>] ) . . . . irr. chars. of finite group
##
## Compute the irreducible characters of <G>,
## using the Dixon/Schneider method.
##
InstallMethod( IrrDixonSchneider,
"Dixon/Schneider",
true,
[ IsGroup ], 0,
G -> IrrDixonSchneider( G, rec() ) );
InstallMethod( IrrDixonSchneider,
"Dixon/Schneider",
true,
[ IsGroup, IsRecord ], 0,
function( G, opt )
local k,C,D,dsp;
D:=DixonInit(G,opt);
k:=D.klanz;
C:=D.characterTable;
# iterierte Schleife
dsp:=true;
while k>Length(D.irreducibles) and dsp<>fail do
dsp:=DixonSplit(D);
OrbitSplit(D);
od;
C:=DixontinI(D);
# SetIrr(OrdinaryCharacterTable(G),C);
# (if `IrrDixonSchneider' is called explicitly,
# we want to ignore the attribute)
return C;
end );
#############################################################################
##
#M Irr( <G>, 0 ) call Dixon-Schneider-algorithm
##
InstallMethod( Irr,
"Dixon/Schneider",
[ IsGroup, IsZeroCyc ],
function( G, zero )
local irr;
irr:= IrrDixonSchneider( G );
SetIrr( OrdinaryCharacterTable( G ), irr );
return irr;
end );
#############################################################################
##
#M Irr( <G> ) . . via niceomorphism
##
## We have to be careful about the ordering of conjugacy classes in the
## character tables of <G> and of its nice object.
##
InstallMethod( Irr,
"via niceomorphism",
[ IsGroup and IsHandledByNiceMonomorphism, IsZeroCyc ],
function( G, zero )
local tbl, ccl, nice, cclnice, monom, imgs, bijection, i, j, irr;
# Compute the conjugacy classes of the two tables.
tbl:= CharacterTable( G );
ccl:= ConjugacyClasses( tbl );
nice:= CharacterTable( NiceObject( G ) );
cclnice:= ShallowCopy( ConjugacyClasses( nice ) );
# Compute the identification of classes.
monom:= NiceMonomorphism( G );
imgs:= List( ccl,
c -> ImagesRepresentative( monom, Representative( c ) ) );
bijection:= [];
for i in [ 1 .. Length( ccl ) ] do
for j in [ 1 .. Length( cclnice ) ] do
if IsBound( cclnice[j] ) and imgs[i] in cclnice[j] then
bijection[i]:= j;
Unbind( cclnice[j] );
break;
fi;
od;
od;
Assert( 1, IsCollection( bijection ) and IsEmpty( cclnice ) );
# Compute the values of the irreducibles of the nice object.
irr:= List( Irr( nice ), ValuesOfClassFunction );
# Permute the character values.
irr:= List( irr, x -> x{ bijection } );
# Construct and return the irreducibles.
for i in irr do
MakeImmutable( i );
od;
irr:= List( irr, x -> Character( tbl, x ) );
SetIrr( tbl, irr );
return irr;
end );
# The following code implements a naive version of
# Dixon, John D.
# Constructing representations of finite groups.
# Groups and computation (New Brunswick, NJ, 1991), 105--112,
# DIMACS Ser. Discrete Math. Theoret. Comput. Sci., 11,
# Amer. Math. Soc., Providence, RI, 1993.
BindGlobal("DixonRepGHchi",function(G,H,chi)
local tblG, cg, d, tblH, res, pos, theta, hl, sp, ch, alpha, AF, bw, cnt,
sum, A, x, ra, l, rt, rti, rtl, r, alonin, wert, bx, mats, hom, i;
tblG:=UnderlyingCharacterTable(chi);
if UnderlyingGroup(tblG)<>G then
Error("inconsistent groups");
fi;
cg:=ConjugacyClasses(tblG);
d:=chi[1];
tblH:=CharacterTable(H);
Irr(tblH);
FusionConjugacyClasses(tblH,tblG);
res:=Restricted(chi,tblH);
pos:=1;
theta:=fail;
hl:=Filtered(Irr(tblH),i->i[1]=1);
while theta=fail and pos<=Length(hl) do
sp:=ScalarProduct(res,hl[pos]);
if sp=1 then
theta:=hl[pos];
elif not IsInt(sp) then
Error("wrong restriction!");
else
pos:=pos+1;
fi;
od;
if theta=fail then
return fail; # did not work
fi;
Info(InfoCharacterTable,2,"DixonRepGHchi ",Size(G),",",Size(H),":\n",chi);
ch:=ConjugacyClasses(tblH);
alpha:=function(t)
local ti,s,hi,z,elm,pos;
ti:=t^-1;
s:=0;
for hi in [1..Length(ch)] do
for z in ch[hi] do
elm:=LeftQuotient(z,ti);
pos:=1;
while pos<=Length(cg) and not elm in cg[pos] do
pos:=pos+1;
od;
s:=s+theta[hi]*chi[pos];
od;
od;
return s;
end;
AF:=function(elm)
local elmi,mat,i,j;
elmi:=elm^-1;
mat:=[];
for i in [1..d] do
mat[i]:=[];
for j in [1..d] do
mat[i][j]:=alpha(x[j]*elmi/x[i]);
od;
od;
return mat;
end;
bw:=infinity;
cnt:=0;
sum:=0;
repeat
A:=[];
x:=[];
ra:=0;
l:=0;
rt:=RightTransversal(G,H);
rti:=1;
rtl:=BlistList([1..Length(rt)],[]);
while ra<d do
if SizeBlist(rtl)=Length(rt) then
Error("could not find suitable elements?");
fi;
repeat
rti:=Random([1..Length(rt)]);
until rtl[rti]=false;
rtl[rti]:=true;
r:=rt[rti];
r:=Random(H)*r;
rti:=rti+1;
for i in [1..l] do
A[i][l+1]:=alpha(r/x[i]);
od;
l:=l+1;
x[l]:=r;
A[l]:=[];
for i in [1..l] do
A[l][i]:=alpha(x[i]/r);
od;
if RankMat(A)>ra then
ra:=ra+1;
else
l:=l-1; #overwrite last
fi;
od;
Unbind(rt);
alonin:=AF(One(G))^-1;
wert:=Lcm(List(Flat(alonin),DenominatorCyc));
cnt:=cnt+1;
sum:=sum+wert;
Info(InfoCharacterTable,2,"denominator lcm=",wert,
" average=",Int(sum/cnt));
if wert<bw then
bx:=x;
bw:=wert;
fi;
until bw<Size(G) or cnt>30
# bw*1000<average
or bw*1000*cnt<sum;
x:=bx;
mats:=List(GeneratorsOfGroup(G),i->AF(i)*alonin);
hom:=GroupHomomorphismByImagesNC(G,Group(mats),
GeneratorsOfGroup(G),mats);
SetIsSurjective(hom,true);
return hom;
end);
BindGlobal("DixonRepChi",function(G,chi)
local i,H,r;
# find a suitable H
# try first cyclic
for i in ConjugacyClasses(G) do
if Order(Representative(i))>1 then
H:=Subgroup(G,[Representative(i)]);
r:=DixonRepGHchi(G,H,chi);
if r<>fail then
return r;
fi;
fi;
od;
# now all subgroups
Info(InfoWarning,1,"need to compute subgroup lattice");
for i in ConjugacyClassesSubgroups(G) do
if Size(Representative(i))>1 then
H:=Subgroup(G,GeneratorsOfGroup(Representative(i)));
UseIsomorphismRelation(Representative(i),H);
r:=DixonRepGHchi(G,H,chi);
if r<>fail then
return r;
fi;
fi;
od;
return fail;
end);
InstallGlobalFunction(IrreducibleRepresentationsDixon,function(arg)
local G,chi,reps,r,i,gensp;
G:=arg[1];
if Length(arg)=1 then
chi:=Irr(G);
elif IsClassFunction(arg[2]) and IsCharacter(arg[2]) then
chi:=[arg[2]];
elif IsList(arg[2]) and ForAll(arg[2],IsCharacter) then
chi:=arg[2];
else
Error("second argument must be ordinary character or character list");
fi;
gensp:=fail;
reps:=[];
for i in chi do
Info(InfoCharacterTable,1,"Character ",i);
if i[1]=1 then
# linear
if gensp=fail then
gensp:=List(GeneratorsOfGroup(G),
i->PositionProperty(ConjugacyClasses(G),j->i in j));
fi;
r:=List(i{gensp},i->[[i]]);
r:=GroupHomomorphismByImagesNC(G,Group(r),GeneratorsOfGroup(G),r);
else
r:=DixonRepChi(G,i);
if r=fail then
Info(InfoWarning,1,"Dixon's method does not work for ",chi);
fi;
fi;
Add(reps,r);
od;
if Length(reps)=1 and Length(arg)>1 and (not IsList(arg[2][1]))
and IsCharacter(arg[2]) then
return r;
fi;
return reps;
end);
#############################################################################
##
#M IrreducibleRepresentations( <G> )
##
##
InstallMethod( IrreducibleRepresentations, "Dixon's method",
true, [ IsGroup and IsFinite], 0,IrreducibleRepresentationsDixon);
InstallGlobalFunction(RepresentationsPermutationIrreducibleCharacters,
function(G,chars,reps)
local n, imgs, cl, d, cands, j, t, i;
if Length(chars)<>Length(reps) or
Length(chars)<>Length(ConjugacyClasses(G)) then
Error("inconsistency");
fi;
n:=Length(chars);
imgs:=[];
cl:=ConjugacyClasses(G);
for i in reps do
d:=Length(One(Range(i)));
cands:=Filtered([1..Length(chars)],i->chars[i][1]=d);
j:=2;
while Length(cands)>1 do
if Length(Set(chars{cands}[j]))>1 then
# characters differ on this class
t:=TraceMat(Image(i,Representative(cl[j])));
cands:=Filtered(cands,i->chars[i][j]=t);
fi;
j:=j+1;
od;
if Length(cands)=0 then
Error("No character for particular representation found");
fi;
Add(imgs,cands[1]);
od;
return PermList(imgs);
end);
# the following function is in this file only for dependency reasons.
#############################################################################
##
#F NthRootsInGroup( <G>, <e>, <n> )
##
## Takes the <n>th root of element <e> in <G>. This function returns a
## list of elements <a> of <G> such that $a^n=e$.
##
InstallGlobalFunction(NthRootsInGroup,function(G,elm,n)
local c,cl,k,p,cand,x,rep,conj,i,rc,roots,cen;
# based on an idea by Mathieu Dutour. AH
c:=CharacterTable(G);
cl:=ConjugacyClasses(c);
k:=Length(cl);
p:=PowerMap(c,n);
cand:=Filtered([1..k],i->Order(Representative(cl[i]))=Order(elm));
x:=First(cand,i->elm in cl[i]);
#root classes
rc:=Filtered([1..k],i->p[i]=x);
if Length(rc)=0 then return rc;fi;
roots:=[];
cen:=Centralizer(G,elm);
# now for each root class map rep^n to our element
for i in rc do
rep:=Representative(cl[i]);
conj:=RepresentativeAction(G,rep^n,elm);
# the roots in this class form one orbit under the centralizer of elm
Append(roots,Orbit(cen,rep^conj));
od;
return roots;
end);
#############################################################################
##
#E
|