/usr/share/gap/lib/ctblsymm.gi is in gap-libs 4r8p8-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 | #############################################################################
##
#W ctblsymm.gi GAP library Götz Pfeiffer
#W Felix Noeske
##
##
#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 the functions needed for a direct computation of
## the character values of wreath products of a group $G$ with $S_n$,
## the symmetric group on n points.
##
#############################################################################
##
#F BetaSet( <alpha> ) . . . . . . . . . . . . . . . . . . . . . . beta set.
##
InstallGlobalFunction( BetaSet,
alpha -> Reversed( alpha ) + [ 0 .. Length( alpha ) - 1 ] );
#############################################################################
##
#F CentralizerWreath( <sub_cen>, <ptuple> ) . . . . centralizer in G wr Sn.
##
InstallGlobalFunction( CentralizerWreath, function(sub_cen, ptuple)
local p, i, j, k, last, res;
res:= 1;
for i in [1..Length(ptuple)] do
last:= 0; k:= 1;
for p in ptuple[i] do
res:= res * sub_cen[i] * p;
if p = last then
k:= k+1;
res:= res * k;
else
k:= 1;
fi;
last:= p;
od;
od;
return res;
end );
#############################################################################
##
#F PowerWreath( <sub_pm>, <ptuple>, <p> ) . . . . . . powermap in G wr Sn.
##
InstallGlobalFunction( PowerWreath, function(sub_pm, ptuple, p)
local power, k, i, j;
power:= List(ptuple, x-> []);
for i in [1..Length(ptuple)] do
for k in ptuple[i] do
if k mod p = 0 then
for j in [1..p] do
Add(power[i], k/p);
od;
else
Add(power[sub_pm[i]], k);
fi;
od;
od;
for k in power do
Sort(k, function(a,b) return a>b; end);
od;
return power;
end );
#############################################################################
##
#F InductionScheme( <n> ) . . . . . . . . . . . . . . . . removal of hooks.
##
InstallGlobalFunction( InductionScheme, function(n)
local scheme, pm, i, beta, hooks;
pm:= [];
scheme:= [];
# how to encode all hooks.
hooks:= function(beta, m)
local i, j, l, gamma, hks, sign;
hks:= [];
for i in [1..m] do
hks[i]:= [];
od;
for i in beta do
sign:= 1;
for j in [1..i] do
if i-j in beta then
sign:= -sign;
else
if j = m then
Add(hks[m], sign);
else
gamma:= Difference(beta, [i]);
AddSet(gamma, i-j);
# remove leading zeros.
if i = j then
l:= 0;
while gamma[l+1] = l do
l:= l+1;
od;
gamma:= gamma{[l+1..Length(gamma)]} - l;
fi;
Add(hks[j], sign * Position(pm[m-j], gamma));
fi;
fi;
od;
od;
return hks;
end;
# collect hook encodings.
for i in [1..n] do
pm[i]:= List(Partitions(i), BetaSet);
scheme[i]:= [];
for beta in pm[i] do
Add(scheme[i], hooks(beta, i));
od;
od;
return scheme;
end );
#############################################################################
##
#F MatCharsWreathSymmetric( <tbl>, <n> ) . . . character matrix of G wr Sn.
##
InstallGlobalFunction( MatCharsWreathSymmetric, function( tbl, n)
local tbl_irreducibles,
i, j, k, m, r, s, t, pm, res, col, scheme, np, charCol, hooks,
pts, partitions;
r:= NrConjugacyClasses( tbl );
tbl_irreducibles:= List( Irr( tbl ), ValuesOfClassFunction );
# encode partition tuples by positions of partitions.
partitions:= List([1..n], Partitions);
pts:= [];
for i in [1..n] do
pts[i]:= PartitionTuples(i, r);
for j in [1..Length(pts[i])] do
np:= [[], []];
for t in pts[i][j] do
s:= Sum( t, 0 );
Add(np[1], s);
if s = 0 then
Add(np[2], 1);
else
Add(np[2], Position( partitions[s], t, 0 ));
fi;
od;
pts[i][j]:= np;
od;
od;
scheme:= InductionScheme(n);
# how to encode a hook.
hooks:= function(np, n)
local res, i, k, l, ni, pi, sign;
res:= [];
for i in [1..r] do
res[i]:= List([1..n], x-> []);
od;
for i in [1..r] do
ni:= np[1][i]; pi:= np[2][i];
for k in [1..ni] do
for l in scheme[ni][pi][k] do
np[1][i]:= ni-k;
if l < 0 then
np[2][i]:= -l;
sign:= -1;
else
np[2][i]:= l;
sign:= 1;
fi;
if k = n then
Add(res[i][k], sign);
else
Add(res[i][k], sign * Position(pts[n-k], np));
fi;
od;
od;
np[1][i]:= ni; np[2][i]:= pi;
od;
return res;
end;
# collect hook encodings.
res:= [];
Info( InfoCharacterTable, 2, "Scheme:" );
for i in [1..n] do
Info( InfoCharacterTable, 2, i );
res[i]:= [];
for np in pts[i] do
Add(res[i], hooks(np, i));
od;
od;
scheme:= res;
# how to construct a new column.
charCol:= function(n, t, k, p)
local i, j, col, pi, val;
col:= [];
for pi in scheme[n] do
val:= 0;
for j in [1..r] do
for i in pi[j][k] do
if i < 0 then
val:= val - tbl_irreducibles[j][p] * t[-i];
else
val:= val + tbl_irreducibles[j][p] * t[i];
fi;
od;
od;
Add(col, val);
od;
return col;
end;
# construct the columns.
pm:= List([1..n-1], x->[]);
Info( InfoCharacterTable, 2, "Cycles:" );
for m in [1..QuoInt(n,2)] do
# the $m$-cycle in all possible places
Info( InfoCharacterTable, 2, m );
for i in [1..r] do
s:= [1..n]*0+1;
s[m]:= i;
Add(pm[m], rec(col:= charCol(m, [1], m, i), pos:= s));
od;
# add the $m$-cycle to everything you know
for k in [m+1..n-m] do
for t in pm[k-m] do
for i in [t.pos[m]..r] do
s:= ShallowCopy(t.pos);
s[m]:= i;
Add(pm[k], rec(col:= charCol(k, t.col, m, i), pos:= s));
od;
od;
od;
od;
# collect and transpose.
np:= Length(scheme[n]);
res:= List([1..np], x-> []);
Info( InfoCharacterTable, 2, "Tables:" );
for k in [1..n-1] do
Info( InfoCharacterTable, 2, k );
for t in pm[n-k] do
for i in [t.pos[k]..r] do
col:= charCol(n, t.col, k, i);
for j in [1..np] do
Add(res[j], col[j]);
od;
od;
od;
od;
for i in [1..r] do
col:= charCol(n, [1], n, i);
for j in [1..np] do
Add(res[j], col[j]);
od;
od;
return res;
end );
#############################################################################
##
#F CharValueSymmetric( <n>, <beta>, <pi> ) . . . . . character value in S_n.
##
InstallGlobalFunction( CharValueSymmetric, function(n, beta, pi)
local i, j, k, o, gamma, rho, val, sign;
# get length of longest cycle.
k:= pi[1];
# determine offset.
o:= 0;
while beta[o+1] = o do
o:= o+1;
od;
# degree case.
if k = 1 then
# find all beads.
val:= 1;
for i in [o+1..Length(beta)] do
val:= val * (beta[i] - o);
# find other free places.
for j in [o+1..beta[i]-1] do
if not j in beta then
val:= val * (beta[i]-j);
fi;
od;
od;
return Factorial(n)/val;
fi;
# almost trivial case.
if k = n then
if n + o in beta then
return (-1)^(Size(beta)+o+1);
else
return 0;
fi;
fi;
rho:= pi{[2..Length(pi)]};
val:= 0;
# loop over the beta set.
for i in beta do
if i >= k+o and not i-k in beta then
# compute the leg parity.
sign:= 1;
for j in [i-k+1..i-1] do
if j in beta then
sign:= -sign;
fi;
od;
# compute new beta set.
gamma:= Difference(beta, [i]);
AddSet(gamma, i-k);
# enter recursion.
val:= val + sign * CharValueSymmetric(n-k, gamma, rho);
fi;
od;
# return the result.
return val;
end );
#############################################################################
##
#V CharTableSymmetric . . . . generic character table of symmetric groups.
##
## Note that this record is accessed in the `Irr' method for natural
## symmetric groups.
##
InstallValue( CharTableSymmetric, Immutable( rec(
isGenericTable:=
true,
identifier:=
"Symmetric",
size:=
Factorial,
specializedname:=
( n -> Concatenation( "Sym(", String(n), ")" ) ),
text:=
"generic character table for symmetric groups",
classparam:=
[ Partitions ],
charparam:=
[ Partitions ],
centralizers:=
[ function(n, pi)
local k, last, p, res;
res:= 1; last:= 0; k:= 1;
for p in pi do
res:= res * p;
if p = last then
k:= k+1;
res:= res * k;
else
k:= 1;
fi;
last:= p;
od;
return res;
end ],
orders:=
[ function(n, lbl) return Lcm(lbl); end ],
powermap:=
[ function(n,k,pow) return [1,PowerPartition(k,pow)]; end ],
irreducibles:=
[ [ function(n, alpha, pi)
return CharValueSymmetric(n, BetaSet(alpha), pi);
end ] ],
matrix:=
function(n)
local scheme, beta, pm, i, m, k, t, col, np, res, charCol;
scheme:= InductionScheme(n);
# how to construct a new column.
charCol:= function(m, t, k)
local i, col, pi, val;
col:= [];
for pi in scheme[m] do
val:= 0;
for i in pi[k] do
if i < 0 then
val:= val - t[-i];
else
val:= val + t[i];
fi;
od;
Add(col, val);
od;
return col;
end;
# construct the columns.
pm:= List([1..n-1], x-> []);
for m in [1..QuoInt(n,2)] do
Add(pm[m], charCol(m, [1], m));
for k in [m+1..n-m] do
for t in pm[k-m] do
Add(pm[k], charCol(k, t, m));
od;
od;
od;
# collect and transpose.
np:= Length(scheme[n]);
res:= List([1..np], x-> []);
for k in [1..n-1] do
for t in pm[n-k] do
col:= charCol(n, t, k);
for i in [1..np] do
Add(res[i], col[i]);
od;
od;
od;
col:= charCol(n, [1], n);
for i in [1..np] do
Add(res[i], col[i]);
od;
return res;
end,
domain:=
IsPosInt
) ) );
#############################################################################
##
#V CharTableAlternating . . generic character table of alternating groups.
##
InstallValue( CharTableAlternating, Immutable( rec(
isGenericTable:=
true,
identifier:=
"Alternating",
size:=
( n -> Factorial(n)/2 ),
specializedname:=
( n -> Concatenation( "Alt(", String(n), ")" ) ),
text:=
"generic character table for alternating groups",
classparam:=
[ function(n)
local labels, pi, pdodd;
pdodd:= function(pi)
local i;
if pi[1] mod 2 = 0 then
return false;
fi;
for i in [2..Length(pi)] do
if pi[i] = pi[i-1] or pi[i] mod 2 = 0 then
return false;
fi;
od;
return true;
end;
labels:= [];
for pi in Partitions(n) do
if SignPartition(pi) = 1 then
if pdodd(pi) then
Add(labels, [pi, '+']);
Add(labels, [pi, '-']);
else
Add(labels, pi);
fi;
fi;
od;
return labels;
end ],
charparam:=
[ function(n)
local alpha, labels;
labels:= [];
for alpha in Partitions(n) do
if alpha = AssociatedPartition(alpha) then
Add(labels, [alpha, '+']);
Add(labels, [alpha, '-']);
elif alpha < AssociatedPartition(alpha) then
Add(labels, alpha);
fi;
od;
return labels;
end ],
centralizers:=
[ function(n, lbl)
local cen;
if Length(lbl) = 2 and not IsInt(lbl[2]) then
return CharTableSymmetric!.centralizers[1](n, lbl[1]);
else
return CharTableSymmetric!.centralizers[1](n, lbl)/2;
fi;
end ],
orders:=
[ function(n, lbl)
if Length(lbl) = 2 and not IsInt(lbl[2]) then
lbl:= lbl[1];
fi;
return Lcm(lbl);
end ],
powermap:=
[ function(n, lbl, prime)
local val, prod;
# split case.
if Length(lbl) = 2 and not IsInt(lbl[2]) then
prod:= Product( lbl[1], 1 );
# coprime case needs complicated check.
if prod mod prime <> 0 then
val:= EB(prod);
if val+1 = -GaloisCyc(val, prime) then
if lbl[2] = '+' then
return [1, [lbl[1], '-']];
else
return [1, [lbl[1], '+']];
fi;
else
return [1, lbl];
fi;
else
return [1, PowerPartition(lbl[1], prime)];
fi;
fi;
# ordinary case.
return [1, PowerPartition(lbl, prime)];
end ],
irreducibles:=
[ [ function(n, alpha, pi)
local val;
if Length(alpha) = 2 and not IsInt(alpha[2]) then
if Length(pi) = 2 and not IsInt(pi[2]) then
val:= CharTableSymmetric!.irreducibles[1][1](n,
alpha[1], pi[1]);
if val in [-1, 1] then
if alpha[2] = pi[2] then
val:= -val * EB( Product( pi[1], 1 ) );
else
val:= val * (1 + EB( Product( pi[1], 1 ) ));
fi;
else
val:= val/2;
fi;
else
val:= CharTableSymmetric!.irreducibles[1][1](n,
alpha[1], pi)/2;
fi;
else
if Length(pi) = 2 and not IsInt(pi[2]) then
val:= CharTableSymmetric!.irreducibles[1][1](n,
alpha, pi[1]);
else
val:= CharTableSymmetric!.irreducibles[1][1](n,
alpha, pi);
fi;
fi;
return val;
end ] ],
wholetable := function( gtab, n )
local pars, classparam, charparam, centralizers, orders, fus,
classpars, charparsnr, nrpars, i, pi, ord, cen, ass, symvals,
matrix, nrchars, char, j, val, pow, p, prod;
pars:= GPartitions( n );
classparam:= [];
charparam:= [];
centralizers:= [];
orders:= [];
fus:= [];
classpars:= [];
charparsnr:= [];
nrpars:= Length( pars );
# class parameters, cent. orders, element orders, char. parameters
for i in [ 1 .. nrpars ] do
pi:= pars[i];
if SignPartition( pi ) = 1 then
ord:= Lcm( pi );
cen:= CharTableSymmetric.centralizers[1]( n, pi );
if Length( Set( pi ) ) = Length( pi )
and ForAll( pi, IsOddInt ) then
Add( classparam, [pi, '+'] );
Add( classparam, [pi, '-'] );
Add( centralizers, cen );
Add( centralizers, cen );
Add( orders, ord );
Add( fus, i );
else
Add( classparam, pi );
Add( classpars, i );
Add( centralizers, cen / 2 );
fi;
Add( orders, ord );
Add( fus, i );
fi;
ass:= AssociatedPartition( pi );
if pi = ass then
Add( charparam, [pi, '+'] );
Add( charparam, [pi, '-'] );
Add( charparsnr,i );
Add( charparsnr,i );
elif pi < ass then
Add( charparam, pi );
Add( charparsnr, i );
fi;
od;
# irreducibles
symvals:= CharTableSymmetric.matrix( n );
matrix:= [];
nrchars:= Length( charparam );
for i in [ 1 .. nrchars ] do
char:= [];
for j in [ 1 .. nrchars ] do
if Length( charparam[i] ) = 2
and not IsInt( charparam[i][2] ) then
if Length( classparam[j] ) = 2
and not IsInt( classparam[j][2] ) then
val:= symvals[ charparsnr[i] ][ fus[j] ];
if val in [ -1, 1 ] then
if charparam[i][2] = classparam[j][2] then
val:= -val * EB( Product( classparam[j][1], 1 ) );
else
val:= val * ( 1 + EB( Product( classparam[j][1], 1 ) ) );
fi;
else
val:= val / 2;
fi;
else
val:= symvals[ charparsnr[i] ][ fus[j] ] / 2;
fi;
else
val:= symvals[ charparsnr[i] ][ fus[j] ];
fi;
Add( char, val );
od;
Add( matrix, char );
od;
# power maps
pow:= [];
for p in Filtered( [ 2 .. n ], IsPrimeInt ) do
pow[p]:= [ 1 .. nrchars ];
for i in [ 1 .. nrchars ] do
if Length( classparam[i] ) = 2
and not IsInt( classparam[i][2] ) then
prod:= Product( classparam[i][1] );
if prod mod p <> 0 then
val:= EB( prod );
if val+1 = -GaloisCyc(val, p) then
if classparam[i][2] = '+' then
pow[p][i]:= i+1;
else
pow[p][i]:= i-1;
fi;
else
pow[p][i]:= i;
fi;
else
pow[p][i]:= Position( classparam,
PowerPartition( classparam[i][1], p ) );
fi;
else
pow[p][i]:= Position( classparam,
PowerPartition( classparam[i], p ) );
fi;
od;
od;
return rec( Identifier:= Concatenation( "Alt(", String( n ), ")" ),
InfoText :=
"computed using generic character table for alternating groups",
UnderlyingCharacteristic:= 0,
ClassParameters:= List( classparam, pi -> [ 1, pi ] ),
CharacterParameters:= List( charparam, pi -> [ 1, pi ] ),
Size:= Factorial( n ) / 2,
NrConjugacyClasses:= nrchars,
SizesCentralizers:= centralizers,
ComputedPowerMaps:= pow,
OrdersClassRepresentatives:= orders,
Irr:= matrix,
ComputedClassFusions:= [ rec(
name := Concatenation( "Sym(", String( n ), ")" ),
map := fus ) ] );
end,
domain:=
( n -> IsInt(n) and n > 1 )
) ) );
#############################################################################
##
#F CharValueWeylB( <n>, <beta>, <pi> ) . . . . . character value in 2 wr Sn.
##
InstallGlobalFunction( CharValueWeylB, function(n, beta, pi)
local i, j, k, lb, o, s, t, gamma, rho, sign, val;
# termination condition.
if n = 0 then
return 1;
fi;
# negative cycles first.
if pi[2] <> [] then
t:= 2;
else
t:= 1;
fi;
# get length of longest cycle.
k:= pi[t][1];
# construct rho.
rho:= ShallowCopy(pi);
rho[t]:= pi[t]{[2..Length(pi[t])]};
val:= 0;
# loop over the beta sets.
for s in [1, 2] do
# determine offset.
o:= 0;
lb:= Length(beta[s]);
while o < lb and beta[s][o+1] = o do
o:= o+1;
od;
for i in beta[s] do
if i >= k+o and not i-k in beta[s] then
# compute the leg parity.
sign:= 1;
for j in [i-k+1..i-1] do
if j in beta[s] then
sign:= -sign;
fi;
od;
# consider character table of C2.
if s = 2 and t = 2 then
sign:= -sign;
fi;
# construct new beta set.
gamma:= List(beta, ShallowCopy);
SubtractSet(gamma[s], [i]);
AddSet(gamma[s], i-k);
# enter recursion.
val:= val + sign * CharValueWeylB(n-k, gamma, rho);
fi;
od;
od;
# return the result.
return val;
end );
#############################################################################
##
#V CharTableWeylB . . . . generic character table of Weyl groups of type B.
##
InstallValue( CharTableWeylB, Immutable( rec(
isGenericTable:=
true,
identifier:=
"WeylB",
size:=
( n -> 2^n * Factorial(n) ),
specializedname:=
( n -> Concatenation( "W(B", String(n), ")" ) ),
text:=
"generic character table for Weyl groups of type B",
classparam:=
[ ( n -> PartitionTuples(n, 2) ) ],
charparam:=
[ ( n -> PartitionTuples(n, 2) ) ],
centralizers:=
[ function(n, lbl) return CentralizerWreath([2, 2], lbl); end ],
orders:=
[ function(n, lbl)
local ord;
ord:= 1;
if lbl[1] <> [] then
ord:= Lcm(lbl[1]);
fi;
if lbl[2] <> [] then
ord:= Lcm(ord, 2 * Lcm(lbl[2]));
fi;
return ord;
end ],
powermap:=
[ function(n, lbl, pow)
if pow = 2 then
return [1, PowerWreath([1, 1], lbl, 2)];
else
return [1, PowerWreath([1, 2], lbl, pow)];
fi;
end ],
irreducibles:=
[ [ function(n, alpha, pi)
return CharValueWeylB(n,
[BetaSet(alpha[1]), BetaSet(alpha[2])], pi);
end ] ],
matrix:=
n -> MatCharsWreathSymmetric( CharacterTable( "Cyclic", 2 ), n),
domain:=
IsPosInt
) ) );
#############################################################################
##
#V CharTableWeylD . . . . generic character table of Weyl groups of type D.
##
InstallValue( CharTableWeylD, rec(
isGenericTable:=
true,
identifier:=
"WeylD",
size:=
( n -> 2^(n-1) * Factorial(n) ),
specializedname:=
( n -> Concatenation( "W(D", String(n), ")" ) ),
text:=
"generic character table for Weyl groups of type D",
classparam:=
[ function(n)
local labels, pi;
labels:= [];
for pi in PartitionTuples(n, 2) do
if Length(pi[2]) mod 2 = 0 then
if pi[2] = [] and ForAll(pi[1], x-> x mod 2 = 0) then
Add(labels, [pi[1], '+']);
Add(labels, [pi[1], '-']);
else
Add(labels, pi);
fi;
fi;
od;
return labels;
end ],
charparam:=
[ function(n)
local alpha, labels;
labels:= [];
for alpha in PartitionTuples(n, 2) do
if alpha[1] = alpha[2] then
Add(labels, [alpha[1], '+']);
Add(labels, [alpha[1], '-']);
elif alpha[1] < alpha[2] then
Add(labels, alpha);
fi;
od;
return labels;
end ],
centralizers:=
[ function(n, lbl)
if not IsList(lbl[2]) then
return CentralizerWreath([2,2], [lbl[1], []]);
else
return CentralizerWreath([2,2], lbl) / 2;
fi;
end ],
orders:=
[ function(n, lbl)
local ord;
ord:= 1;
if lbl[1] <> [] then
ord:= Lcm(lbl[1]);
fi;
if lbl[2] <> [] and IsList(lbl[2]) then
ord:= Lcm(ord, 2*Lcm(lbl[2]));
fi;
return ord;
end ],
powermap:=
[ function(n, lbl, pow)
local power;
if not IsList(lbl[2]) then
power:= PowerPartition(lbl[1], pow);
if ForAll(power, x-> x mod 2 = 0) then
return [1, [power, lbl[2]]]; # keep the sign.
else
return [1, [power, []]];
fi;
else
if pow = 2 then
return [1, PowerWreath([1, 1], lbl, 2)];
else
return [1, PowerWreath([1, 2], lbl, pow)];
fi;
fi;
end ],
irreducibles:=
[ [ function(n, alpha, pi)
local delta, val;
if not IsList(alpha[2]) then
delta:= [alpha[1], alpha[1]];
if not IsList(pi[2]) then
val:= CharTableWeylB!.irreducibles[1][1](n,
delta, [pi[1], []])/2;
if alpha[2] = pi[2] then
val:= val + 2^(Length(pi[1])-1) *
CharTableSymmetric!.irreducibles[1][1](n/2,
alpha[1], pi[1]/2);
else
val:= val - 2^(Length(pi[1])-1) *
CharTableSymmetric!.irreducibles[1][1](n/2,
alpha[1], pi[1]/2);
fi;
else
val:= CharTableWeylB!.irreducibles[1][1](n, delta, pi)/2;
fi;
else
if not IsList(pi[2]) then
val:= CharTableWeylB!.irreducibles[1][1](n,
alpha, [pi[1], []]);
else
val:= CharTableWeylB!.irreducibles[1][1](n, alpha, pi);
fi;
fi;
return val;
end ] ],
domain:=
( n -> IsInt(n) and n > 1 )
) );
CharTableWeylD.matrix := function(n)
local matB, matA, paramA, paramB, clp, chp, res, ctb, cta, val;
matB := CharTableWeylB!.matrix(n);
if n mod 2 = 0 then
matA := CharTableSymmetric!.matrix(n/2);
paramA := Partitions(n/2);
fi;
paramB := PartitionTuples(n, 2);
clp := CharTableWeylD!.classparam[1](n);
chp := CharTableWeylD!.charparam[1](n);
res := NullMat(Length(chp), Length(clp));
ctb := function(alpha, pi)
return matB[Position(paramB, alpha)][Position(paramB, pi)];
end;
cta := function(alpha, pi)
return matA[Position(paramA, alpha)][Position(paramA, pi)];
end;
val := function(alpha, pi)
local delta, val;
if not IsList(alpha[2]) then
delta := [alpha[1], alpha[1]];
if not IsList(pi[2]) then
val := ctb(delta, [pi[1], []])/2;
if alpha[2] = pi[2] then
val := val + 2^(Length(pi[1])-1) * cta(alpha[1], pi[1]/2);
else
val := val - 2^(Length(pi[1])-1) * cta(alpha[1], pi[1]/2);
fi;
else
val := ctb(delta, pi)/2;
fi;
else
if not IsList(pi[2]) then
val := ctb(alpha, [pi[1], []]);
else
val := ctb(alpha, pi);
fi;
fi;
return val;
end;
return List(chp, alpha-> List(clp, pi-> val(alpha, pi)));
end;
MakeImmutable(CharTableWeylD);
#############################################################################
##
#F CharValueWreathSymmetric( <sub>, <n>, <beta>, <pi> ) . .
#F . . . . character value in G wr Sn.
##
InstallGlobalFunction( CharValueWreathSymmetric, function(sub, n, beta, pi)
local i, j, k, lb, o, s, t, r, gamma, rho, sign, val, subirreds;
# termination condition.
if n = 0 then
return 1;
fi;
r:= Length(pi);
# negative cycles first.
t:= r;
while pi[t] = [] do
t:= t-1;
od;
# get length of longest cycle.
k:= pi[t][1];
# construct rho.
rho:= ShallowCopy(pi);
rho[t]:= pi[t]{[2..Length(pi[t])]};
val:= 0;
subirreds:= List( Irr( sub ), ValuesOfClassFunction );
# loop over the beta sets.
for s in [1..r] do
# determine offset.
o:= 0;
lb:= Length(beta[s]);
while o < lb and beta[s][o+1] = o do
o:= o+1;
od;
for i in beta[s] do
if i >= k+o and not i-k in beta[s] then
# compute the leg parity.
sign:= 1;
for j in [i-k+1..i-1] do
if j in beta[s] then
sign:= -sign;
fi;
od;
# consider character table <sub>.
sign:= subirreds[s][t] * sign;
# construct new beta set.
gamma:= ShallowCopy(beta);
SubtractSet(gamma[s], [i]);
AddSet(gamma[s], i-k);
# enter recursion.
val:= val + sign*CharValueWreathSymmetric(sub, n-k, gamma, rho);
fi;
od;
od;
# return the result.
return val;
end );
#############################################################################
##
#F CharacterTableWreathSymmetric( <sub>, <n> ) . . char. table of G wr Sn.
##
InstallGlobalFunction( CharacterTableWreathSymmetric, function( sub, n )
local i, j, # loop variables
tbl, # character table, result
ident, # identifier of 'tbl'
nccs, # no. of classes of 'sub'
nccl, # no. of classes of 'tbl'
parts, # partitions parametrizing classes and characters
subcentralizers, # centralizer orders of 'sub'
suborders, # representative orders of 'sub'
orders, # representative orders of 'tbl'
powermap, # power maps of 'tbl'
prime, # loop over prime divisors of the size of 'tbl'
spm; # one power map of 'sub'
if not IsOrdinaryTable( sub ) then
Error( "<sub> must be an ordinary character table" );
fi;
# Make a record, and set the values of `Size', `Identifier', \ldots
ident:= Concatenation( Identifier( sub ), "wrS", String(n) );
ConvertToStringRep( ident );
tbl:= rec( UnderlyingCharacteristic := 0,
Size := Size( sub )^n * Factorial( n ),
Identifier := ident );
# \ldots, `ClassParameters', \ldots
nccs:= NrConjugacyClasses( sub );
parts:= Immutable( PartitionTuples(n, nccs) );
nccl:= Length(parts);
tbl.ClassParameters:= parts;
# \ldots, `OrdersClassRepresentatives', \ldots
subcentralizers:= SizesCentralizers( sub );
suborders:= OrdersClassRepresentatives( sub );
orders:= [];
for i in [1..nccl] do
orders[i]:= 1;
for j in [1..nccs] do
if parts[i][j] <> [] then
orders[i]:= Lcm(orders[i], suborders[j]*Lcm(parts[i][j]));
fi;
od;
od;
tbl.OrdersClassRepresentatives:= orders;
# \ldots, `SizesCentralizers', `CharacterParameters', \ldots
tbl.SizesCentralizers:= List( parts,
p -> CentralizerWreath( subcentralizers, p ) );
tbl.CharacterParameters:= parts;
# \ldots, `ComputedPowerMaps', \ldots
tbl.ComputedPowerMaps:= [];
powermap:= tbl.ComputedPowerMaps;
for prime in Set( Factors( tbl.Size ) ) do
spm:= PowerMap( sub, prime );
powermap[prime]:= List( [ 1 .. nccl ],
i -> Position(parts, PowerWreath(spm, parts[i], prime)) );
od;
# \ldots and `Irr'.
tbl.Irr:= MatCharsWreathSymmetric( sub, n );
# Return the table.
ConvertToLibraryCharacterTableNC( tbl );
return tbl;
end );
#############################################################################
##
#M Irr( <Sn> )
##
## Use `CharTableSymmetric' (see above) for computing the irreducibles;
## use the class parameters (partitions) in order to make the table
## compatible with the conjugacy classes of <Sn>.
##
## Note that we do *not* call `CharacterTable( "Symmetric", <n> )' directly
## because the character table library may be not installed.
##
InstallMethod( Irr,
"ordinary characters for natural symmetric group",
[ IsNaturalSymmetricGroup, IsZeroCyc ],
function( G, zero )
local gentbl, dom, deg, cG, cp, perm, i, irr, pow, fun, p;
gentbl:= CharTableSymmetric;
dom:= MovedPoints( G );
deg:= Length( dom );
if deg = 0 then
dom:= [ 1 ];
deg:= 1;
fi;
cG:= CharacterTable( G );
# Compute the correspondence of classes.
cp:= gentbl.classparam[1]( deg );
perm:= [];
for i in ConjugacyClasses( G ) do
i:= List( Orbits( SubgroupNC( G, [ Representative(i) ] ), dom ),
Length );
Sort( i );
Add( perm, Position( cp, Reversed( i ) ) );
od;
# Compute the irreducibles.
irr:= List( gentbl.matrix( deg ), i -> Character( cG, i{ perm } ) );
MakeImmutable( irr );
SetIrr( cG, irr );
# Store the class and character parameters.
cp:= List( cp{ perm }, x -> [ 1, x ] );
MakeImmutable( cp );
SetClassParameters( cG, cp );
SetCharacterParameters( cG, cp );
# Compute and store the power maps.
pow:= ComputedPowerMaps( cG );
fun:= gentbl.powermap[1];
for p in Set( Factors( Size( G ) ) ) do
if not IsBound( pow[p] ) then
pow[p]:= List( cp, x -> Position( cp, fun( deg, x[2], p ) ) );
fi;
od;
# Compute and store centralizer orders and representative orders.
if not HasSizesCentralizers( cG ) then
SetSizesCentralizers( cG,
List( cp, x -> gentbl.centralizers[1]( deg, x[2] ) ) );
fi;
if not HasOrdersClassRepresentatives( cG ) then
SetOrdersClassRepresentatives( cG,
List( cp, x -> gentbl.orders[1]( deg, x[2] ) ) );
fi;
SetInfoText( cG, Concatenation( "computed using ", gentbl.text ) );
# Return the irreducibles.
return irr;
end );
#############################################################################
##
#F DescendingListWithElementRemoved( <list>, <el> )
##
## For a list <list> whose elements are descending and an element <el> of
## <list>, `DescendingListWithElementRemoved' returns the descending list
## obtained by removing <el>.
##
BindGlobal( "DescendingListWithElementRemoved", function( list, el )
local pos, res;
pos:= PositionSorted( list, el, function( a, b ) return \<( b, a ); end );
res:= list{ [ 1 .. pos-1 ] };
Append( res, list{ [ pos+1 .. Length( list ) ] } );
return res;
end );
#############################################################################
##
#F MorrisRecursion( <lambda>, <pi> )
##
## For a bar partition <lambda> of $n$, for some positive integer $n$,
## and an odd parts partition <pi> of the same $n$ and different from
## <lambda>, `MorrisRecursion' returns the value of the spin character
## indexed by <lambda> on the class indexed by <pi>.
## If the class of <pi> splits in the double cover of the symmetric group of
## degree $n$ then the returned value is attained on the class containing
## the Schur standard lift of <pi>.
##
DeclareGlobalFunction( "MorrisRecursion" );
InstallGlobalFunction( MorrisRecursion, function( lambda, pi )
local n, sigma, e, k, P, i, j, rho, val, GT, sign, m, gamma, l;
n:= Sum( lambda );
sigma:= QuoInt( n - Length( lambda ), 2 );
e:= sigma mod 2;
# base case
if pi = [] then
return 1;
fi;
# get largest part
k:= pi[1];
# degree case
if k = 1 then
# calc degree
P:= 2^sigma * Factorial( n );
for i in [ 1 .. Length( lambda ) ] do
for j in [ i+1 .. Length( lambda ) ] do
P:= ( lambda[i] - lambda[j] ) / ( lambda[i] + lambda[j] ) * P;
od;
P:= P / Factorial( lambda[i] );
od;
return P;
fi;
rho:= pi{ [ 2 .. Length( pi ) ] };
val:= 0;
GT:= function( a, b ) return LT( b, a ); end;
for i in lambda do
if i >= k and not i-k in lambda then
# leg parity
sign:= 1;
for j in [ i-k+1 .. i-1 ] do
if j in lambda then
sign:= -sign;
fi;
od;
# 2 power
m:= 1;
if i > k then
if IsEvenInt( n - Length( lambda ) ) then
m:= 2;
fi;
fi;
# compute new lambda
gamma:= DescendingListWithElementRemoved( lambda, i );
if i > k then
Add( gamma, i-k );
Sort( gamma, GT );
fi;
val:= val + sign * m * MorrisRecursion( gamma, rho );
fi;
#I_- removal
if i <= (k - 1) / 2 and k - i in lambda then
# calc. leg parity by pos. of smaller bead plus no. of beads
# between conj. beads
sign:= (-1)^i;
for l in [ i+1 .. k-1-i ] do
if l in lambda then
sign:= -sign;
fi;
od;
# 2 power
m:= 1;
if IsEvenInt( n - Length( lambda ) ) then
m:= 2;
fi;
# compute new lambda
gamma:= DescendingListWithElementRemoved( lambda, i );
gamma:= DescendingListWithElementRemoved( gamma, k-i );
# enter recursion
val:= val + sign * m * MorrisRecursion( gamma, rho );
fi;
od;
# return the result
return val;
end );
#############################################################################
##
#F CharValueDoubleCoverSymmetric( <n>, <lambda>, <pi> )
##
## For a bar partition <lambda> and a partition <pi> of the positive integer
## <n>, `CharValueDoubleCoverSymmetric' returns the value of the spin
## character of the standard Schur double cover of the symmetric group of
## degree <n> that is indexed by <lambda>, on the class that is indexed by
## <pi>.
##
BindGlobal( "CharValueDoubleCoverSymmetric", function( n, lambda, pi )
if IsEvenInt( n - Length( pi ) ) then # pi is even
if not ForAll( pi, IsOddInt ) then # pi is not in O(n)
return 0;
else # pi is in O(n)
return MorrisRecursion( lambda, pi );
fi;
else # pi is odd
if Length( Set( pi ) ) <> Length( pi ) then
return 0;
else # pi is bar partition
if IsEvenInt( n - Length( lambda ) ) or lambda <> pi then
return 0;
else # exceptional case
return E(4)^( ( n - Length( lambda ) + 1 ) / 2 )
* ER( Product( lambda ) / 2 );
fi;
fi;
fi;
end );
##########################################################################
##
#F BarPartitions( <n> )
##
## For a non-negative integer <n>, `BarPartitions' returns the list of all
## bar partitions of <n>.
##
BindGlobal( "BarPartitions", function( n )
local B, j, k, l, p;
B:= List( [ 1 .. n-2 ], x -> [] );
for k in [ 1 .. QuoInt( n-1, 2 ) ] do
j:= n-k-1;
while j >= k+1 do
for p in B[ j-k ] do
l:= [ n-j ];
Append( l, p );
l[2]:= k;
Add( B[j], l );
od;
j:= j - 1;
od;
Add( B[k], [ n-k, k ] );
od;
l:= Concatenation( B{ [ n-2, n-3 .. 1 ] } );
Add( l, [ n ] );
return l;
end );
###########################################################################
##
#F SpinInductionScheme( <n> )
##
## For a non-negative integer <n>, `SpinInductionScheme' returns the spin
## induction scheme for <n>.
## The entry at position $[m][i][k]$ is the list of positions (with mult.)
## of all bar partitions of $m-k$ that are obtained by removing a $k$ bar
## from the $i$-th bar partition of $m$.
##
BindGlobal( "SpinInductionScheme", function( n )
local GT, bpm, scheme, bars, i, lambda;
GT:= function( a, b ) return LT( b, a ); end;
bpm:= []; # bar partitions of m
scheme:= [];
bars:= function( lambda )
local m, brs, i, z, sign, max, j, gamma, l;
m:= Sum( lambda );
brs:= []; # init bar list, for every possible bar length a list
for i in [ 1 .. m ] do
brs[i]:= [];
od;
z:= 1;
if ( m - Length( lambda ) ) mod 2 = 0 then
z:= 2;
fi;
for i in lambda do
sign:= 1;
for j in [ 1 .. i ] do
if i-j in lambda then
sign:= -sign;
elif j mod 2 = 1 then
if j = m then
if i <> j then
Add( brs[m], [ 1, sign * z ] );
else
Add( brs[m], [ 1, sign ] ); # case I_0, no 2
fi;
else
gamma:= DescendingListWithElementRemoved( lambda, i );
if i <> j then
Add( gamma, i-j );
Sort( gamma, GT );
Add( brs[j], [ Position( bpm[m-j], gamma ), sign*z ] );
else
# case I_0, no 2
Add( brs[j], [ Position( bpm[m-j], gamma ), sign ] );
fi;
fi;
fi;
od;
od;
#I- removal
max:= m;
if max mod 2 = 0 then
max:= max-1;
fi;
for j in [ 3, 5 .. max ] do #j-bar removal from partition lambda
for i in [ 1 .. (j-1)/2 ] do
if i in lambda and j-i in lambda then
if j = m then
sign:= (-1)^i;
Add( brs[m], [ 1, sign*z ] );
else
# calc leg parity by pos. of smaller bead plus no. of beads
# between conj. beads
sign:= (-1)^i;
for l in [ i+1 .. j-1-i ] do
if l in lambda then
sign:= -sign;
fi;
od;
gamma:= DescendingListWithElementRemoved( lambda, i );
gamma:= DescendingListWithElementRemoved( gamma, j-i );
Add( brs[j], [ Position( bpm[ m-j ], gamma ), sign * z ] );
fi;
fi;
od;
od;
return brs;
end;
for i in [ 1 .. n ] do
bpm[i]:= BarPartitions( i );
scheme[i]:= [];
for lambda in bpm[i] do
Add( scheme[i], bars( lambda ) );
od;
od;
return scheme;
end );
########################################################################
##
#F OddSpinVals( <n> )
##
## For a non-negative integer <n>, `OddSpinVals' returns a matrix that
## contains the values of the spin characters of the standard double cover
## of the symmetric group of degree <n>,
## where it is assumed that the columns are indexed by odd part partitions.
##
BindGlobal( "OddSpinVals", function( n )
local scheme, charCol, pm, m, k, t, np, res, col, i, max;
scheme:= SpinInductionScheme( n );
charCol:= function( m, t, k) # t column of the char. table of S_{m-k}
local i, col, pi, val;
col:= [];
for pi in scheme[m] do
val:= 0;
for i in pi[k] do
val:= val + i[2] * t[ i[1] ];
od;
Add( col, val );
od;
return col;
end;
pm:= List( [ 1 .. n-1 ], x -> [] );
max:= QuoInt( n, 2 );
if max mod 2 = 0 then
max:= max - 1;
fi;
for m in [ 1, 3 .. max ] do # only odd parts can be removed
Add( pm[m], charCol( m, [1], m ) );
for k in [ m+1 .. n-m ] do
for t in pm[ k-m ] do
Add( pm[k], charCol( k, t, m ) );
od;
od;
od;
np:= Length( scheme[n] );
res:= List( [ 1 .. np ], x -> [] );
for k in [ 1 .. n-1 ] do
if k mod 2 = 1 then
for t in pm[ n-k ] do
col:= charCol( n, t, k );
for i in [ 1 .. np ] do
Add( res[i], col[i] );
od;
od;
fi;
od;
col:= charCol( n, [1], n );
for i in [ 1 .. np ] do
Add( res[i], col[i] );
od;
return res;
end );
######################################################################
##
#F MatrixSpinCharsSn( <n> )
##
## For a non-negative integer <n>, `MatrixSpinCharsSn' returns the matrix
## of spin characters of the standard Schur double cover of the symmetric
## group of degree <n>.
##
BindGlobal( "MatrixSpinCharsSn", function( n )
local matrix, pars, bars, oddvals, i, char, achar, counter, pi;
matrix:= [];
pars:= GPartitions( n );
bars:= BarPartitions( n );
oddvals:= OddSpinVals( n );
for i in [ 1 .. Length( bars ) ] do
char:= [];
achar:= [];
counter:= 1;
for pi in pars do
if ForAll( pi, IsOddInt ) then
Add( char, oddvals[i][ counter ] );
Add( char, -oddvals[i][ counter ] );
Add( achar, oddvals[i][ counter ] );
Add( achar, -oddvals[i][ counter ] );
counter:= counter+1;
elif IsOddInt( n - Length( bars[i] ) ) and bars[i] = pi then
Add( char, E(4)^( ( n - Length( bars[i] ) + 1 ) / 2 )
* ER( Product( bars[i] ) / 2 ) );
Add( char, -char[ Length( char ) ] );
Add( achar, char[ Length( char ) ] );
Add( achar, -achar[ Length( achar ) ] );
else
Add( char, 0 );
Add( achar, 0 );
if Length( Set( pi ) ) = Length( pi )
and IsOddInt( n-Length(pi) ) then
Add( char, 0 );
Add( achar,0 );
fi;
fi;
od;
Add( matrix, char );
if IsOddInt( n-Length(bars[i]) ) then
Add( matrix, achar );
fi;
od;
return matrix;
end );
################################################################################
##
#F OrderOfSchurLift( <pi> )
##
## For a partition <pi>, `OrderOfSchurLift' returns the order of the Schur
## standard lift of an element of cycle type <pi> in a symmetric group
## to the standard double cover.
##
BindGlobal( "OrderOfSchurLift", function( pi )
local ord, evencount, z, i;
ord:= Lcm( pi );
evencount:= 0;
z:= 1;
for i in pi do
if i mod 2 = 1 then
if QuoInt( i^2-1, 8 ) mod 2 = 1 and QuoInt( ord, i ) mod 2 = 1 then
z:= -z;
fi;
else
evencount:= evencount + 1;
if ( QuoInt( i, 2 ) mod 4 = 1 or QuoInt( i, 2 ) mod 4 = 2 ) and
QuoInt( ord, i ) mod 2 = 1 then
z:= -z;
fi;
fi;
od;
if ( evencount mod 4 = 2 or evencount mod 4 = 3 ) and
QuoInt( ord, 2 ) mod 2 = 1 then
z:= -z;
fi;
if z = -1 then
return 2*ord;
else
return ord;
fi;
end );
###########################################################################
##
#V CharTableDoubleCoverSymmetric
##
InstallValue( CharTableDoubleCoverSymmetric, rec(
isGenericTable:=
true,
identifier:=
"DoubleCoverSymmetric",
size:=
( n -> 2 * Factorial( n ) ),
specializedname:=
( n -> Concatenation( "2.Sym(", String(n), ")" ) ),
text:=
"generic character table for a double cover of symmetric groups",
wholetable:=
function( gtab, n )
local parts, nrparts, dist, distmin, odd, clpar, chpar,
fus, ord, cen, i, p, m, o, c, nrch, nrcl, invfus,
chars, pow, j, irr;
parts:= GPartitions( n );
nrparts:= Length( parts );
dist:= []; # BarPartitions
distmin:= []; # odd BarPartitions
odd:= []; # OddPartPartitions
clpar:= []; # ClassParameters
chpar:= []; # CharacterParameters
fus:= [];
ord:= []; # OrdersClassRepresentatives
cen:= []; # SizesCentralizer
for i in [ 1 .. nrparts ] do
p:= parts[i];
m:= Length( p );
Add( clpar, [ 1, p ] );
Add( fus, i );
o:= OrderOfSchurLift( p );
Add( ord, o );
c:= CharTableSymmetric.centralizers[1]( n, p );
if ForAll( p, IsOddInt ) then # class splits
Add( odd, i );
Add( clpar, [ 2, p ] );
Add( fus, i );
if IsOddInt( o ) then
Add( ord, 2 * o );
else
Add( ord, o / 2 );
fi;
c:= 2 * c;
Add( cen, c );
fi;
if Length( Set( p ) ) = Length( p ) then
Add( dist, i );
Add( chpar, p );
if IsOddInt( n-m ) then # class splits
Add( distmin, i );
Add( chpar, p );
Add( clpar, [ 2, p ] );
Add( fus, i );
Add( ord, o );
c:= 2 * c;
Add( cen, c );
fi;
fi;
Add( cen, c );
od;
# spin characters
nrch:= Length( chpar );
nrcl:= Length( clpar );
invfus:= InverseMap( fus );
chars:= MatrixSpinCharsSn( n );
# power maps
pow:= [];
for p in Filtered( [ 2 .. n ], IsPrimeInt ) do
pow[p]:= [ 1 .. nrcl ] ;
for i in [1 .. nrcl ] do
j:= invfus[ Position( parts,
PowerPartition( parts[ fus[i] ], p ) ) ];
if IsInt( j ) then
pow[p][i]:= j;
else
o:= ord[i];
if ( o mod p = 0 ) then
o:= o / p;
fi;
if ord[j[1]] <> o then
pow[p][i]:= j[2];
elif ord[j[2]] <> o then
pow[p][i]:= j[1];
else
c:= Position( chpar, parts[ fus[i] ] );
if GaloisCyc( chars[c][i], p ) = chars[c][ j[1] ] then
pow[p][i]:= j[1];
else
pow[p][i]:= j[2];
fi;
fi;
fi;
od;
od;
# Make the character parameters unique.
for i in [ 2 .. Length( chpar ) ] do
if chpar[i] = chpar[i-1] then
chpar[i-1] := [ chpar[i], '+' ];
chpar[i] := [ chpar[i], '-' ];
fi;
od;
# the spin character table record
return rec( Identifier := Concatenation( "2.Sym(", String(n), ")" ),
UnderlyingCharacteristic:= 0,
ClassParameters:= clpar,
CharacterParameters:= Concatenation(
List( parts, x -> [ 1, x ] ),
List( chpar, x -> [ 2, x ] ) ),
Size:= 2 * Factorial( n ),
NrConjugacyClasses:= nrcl,
SizesCentralizers:= cen,
ComputedPowerMaps:= pow,
OrdersClassRepresentatives:= ord,
ComputedClassFusions:=
[ rec( name:= Concatenation("Sym(",String(n),")"),
map:= fus ) ],
Irr:= Concatenation( CharTableSymmetric.matrix( n )
{ [ 1 .. nrparts ] }{ fus }, chars ) );
end,
domain:= IsPosInt ) );
#############################################################################
##
#V CharTableDoubleCoverAlternating
##
InstallValue( CharTableDoubleCoverAlternating, rec(
isGenericTable:=
true,
identifier:=
"DoubleCoverAlternating",
size:=
Factorial,
specializedname:=
( n -> Concatenation( "2.Alt(", String(n), ")" ) ),
text:=
"generic character table for the double cover of alternating groups",
matrix:=
function( n )
local matrix, pars, bars, oddvals, evenpars, i, char1, char2,
counter, pi, delta, alpha, beta;
matrix:= [];
pars:= GPartitions( n );
bars:= BarPartitions( n );
oddvals:= OddSpinVals( n );
evenpars:= Filtered( pars, pi -> IsEvenInt( n - Length( pi ) ) );
for i in [ 1 .. Length( bars ) ] do
char1:= [];
char2:= [];
counter:=1;
for pi in evenpars do
if IsEvenInt( n - Length( bars[i] ) ) then # 2 conj characters
delta:=0;
if ForAll( pi, IsOddInt ) then
if bars[i] = pi then
delta:= E(4)^( QuoInt( n - Length( pi ), 2 ) mod 4 )
* ER( Product( pi ) );
fi;
alpha:= ( oddvals[i][counter] + delta ) / 2;
beta:= ( oddvals[i][counter] - delta ) / 2;
if Length( Set( pi ) ) = Length( pi ) then
Add( char1, alpha ); Add( char2, beta );
Add( char1, - alpha ); Add( char2, - beta );
Add( char1, beta ); Add( char2, alpha );
Add( char1, - beta ); Add( char2, - alpha );
else
Add( char1, oddvals[i][counter] / 2 );
Add( char2, oddvals[i][counter] / 2 );
Add( char1, -oddvals[i][counter] / 2 );
Add( char2, -oddvals[i][counter] / 2 );
fi;
counter:= counter + 1;
elif Length( Set( pi ) ) = Length( pi ) then
if bars[i] = pi then
delta:= E(4)^( QuoInt( n - Length( pi ), 2 ) mod 4 )
* ER( Product( pi ) );
fi;
Add( char1, delta / 2 );
Add( char1, - delta / 2 );
Add( char2, - delta / 2 );
Add( char2, delta / 2 );
else
Add( char1, 0 );
Add( char2, 0 );
fi;
else #one restricted character
if ForAll( pi, IsOddInt ) then ##Odd
if Length( Set( pi ) ) = Length( pi ) then
Add( char1, oddvals[i][counter] );
Add( char1, -oddvals[i][counter] );
Add( char1, oddvals[i][counter] );
Add( char1, -oddvals[i][counter] );
counter:= counter+1;
else
Add( char1, oddvals[i][counter] );
Add( char1, -oddvals[i][counter] );
counter:= counter+1;
fi;
elif Length( Set( pi ) ) = Length( pi ) then ## D+ w/o O
Add( char1, 0 );
Add( char1, 0 );
else
Add( char1, 0 );
fi;
fi;
od;
Add( matrix, char1 );
if IsEvenInt( n - Length( bars[i] ) ) then
Add( matrix, char2 );
fi;
od;
return matrix;
end,
wholetable:=
function( gtab, n )
local parts, nrparts, exp, distpos, dist, odd, clpar,
chpar, fus0, fus1, fus2, ord, cen, altclpar,
symclpar, i, p, m, mm, o, c, j, nrch, nrcl,
invfus0, nullrow, chars, lambda, compl, val, primes,
pow, k, nr, tbl, irr, altpar, par;
parts:= Partitions( n );
nrparts:= Length( parts );
distpos:= [];
dist:= [];
odd:= [];
clpar:= [];
chpar:= [];
fus0:= [];
fus1:= [];
fus2:= [];
ord:= [];
cen:= [];
altclpar:= [];
symclpar:= [];
for i in [ 1 .. nrparts ] do
p:= parts[i];
m:= Length( p );
o:= OrderOfSchurLift( p );
c:= CharTableSymmetric.centralizers[1]( n, p );
if IsOddInt( n-m ) then # - type, odd partition
Add( symclpar, p );
if Length( Set( p ) ) = Length( p ) then # distinct
Add( dist, i );
Add( symclpar, p );
Add( chpar, p );
fi;
else # + type, even partition
Add( altclpar, p );
Add( symclpar, p );
Add( clpar, p );
Add( fus0, i );
Add( fus1, Length( altclpar ) );
Add( fus2, Length( symclpar ) );
Add( ord,o);
if ForAll( p, IsOddInt ) then
Add( odd, i );
Add( symclpar, p );
Add( clpar, p );
Add( fus0, i );
Add( fus1, Length( altclpar ) );
Add( fus2, Length( symclpar ) );
if IsOddInt( o ) then
Add( ord, 2 * o );
else
Add( ord, o / 2 );
fi;
fi;
if Length( Set( p ) ) = Length( p ) then # distpos
Add( dist, i );
Add( distpos, i );
Add( chpar, p );
Add( chpar, p );
if ForAll( p, IsOddInt ) then # distpos + odd
Add( altclpar, p );
Add( clpar, p );
Add( fus0, i );
Add( fus1, Length( altclpar ) );
Add( fus2, Length( symclpar )-1 );
Add( ord, o );
Add( clpar, p );
Add( fus0, i );
Add( fus1, Length( altclpar ) );
Add( fus2, Length( symclpar ) );
if IsOddInt( o ) then
Add( ord, 2 * o );
else
Add( ord, o / 2 );
fi;
c:= 2 * c;
Add( cen, c );
Add( cen, c );
Add( cen, c );
else # distpos - odd
Add( clpar, p );
Add( fus0, i );
Add( fus1, Length( altclpar ) );
Add( fus2, Length( symclpar ) );
Add( ord, o );
Add( cen, c );
fi;
else # pos - distpos
if ForAll( p, IsOddInt ) then # odd - distpos
Add( cen, c );
else # pos - (distpos + odd)
c:= QuoInt( c, 2 );
fi;
fi;
Add( cen, c );
fi;
od;
# spin characters
nrch:= Length( chpar );
nrcl:= Length( clpar );
invfus0:= InverseMap( fus0 );
chars:= CharTableDoubleCoverAlternating.matrix( n );
# power maps
pow:= [];
for p in Filtered( [ 2 .. n ], IsPrimeInt ) do
pow[p]:= [ 1 .. nrcl ];
for i in [ 1 .. nrcl ] do
j:= Position( parts, PowerPartition( parts[ fus0[i] ], p ) );
k:= invfus0[j];
if IsInt( k ) then
pow[p][i]:= k;
else
o:= ord[i];
if ( o mod p = 0 ) then
o:= o / p;
fi;
if j in odd then
if j in distpos then
if ord[ k[1] ] <> o then
k:= k{ [ 2, 4 ] };
else
k:= k{ [ 1, 3 ] };
fi;
c:= Position( chpar, parts[ fus0[i] ] );
val:= GaloisCyc( chars[c][i], p );
if IsCycInt( ( val-chars[c][ k[1] ] ) / p ) then
pow[p][i]:= k[1];
else
pow[p][i]:= k[2];
fi;
else
if ord[ k[1] ] <> o then
pow[p][i]:= k[2];
else
pow[p][i]:= k[1];
fi;
fi;
else
c:= Position( chpar, parts[ fus0[i] ] );
if GaloisCyc( chars[c][i], p ) = chars[c][ k[1] ] then
pow[p][i]:= k[1];
else
pow[p][i]:= k[2];
fi;
fi;
fi;
od;
od;
# add the characters of Alt_n
tbl:= CharTableAlternating.wholetable( CharTableAlternating, n );
# Make the class and character parameters unique.
clpar:= tbl.ClassParameters{ fus1 };
for i in [ 2 .. Length( clpar ) ] do
if fus1[i] = fus1[i-1] then
clpar[i]:= ShallowCopy( clpar[i] );
clpar[i][1]:= 2;
fi;
od;
for i in [ 2 .. Length( chpar ) ] do
if chpar[i] = chpar[i-1] then
chpar[i-1] := [ chpar[i], '+' ];
chpar[i] := [ chpar[i], '-' ];
fi;
od;
# the spin character table record
return rec( Identifier:= Concatenation( "2.Alt(", String( n ), ")" ),
UnderlyingCharacteristic:= 0,
ClassParameters:= clpar,
CharacterParameters:= Concatenation(
tbl.CharacterParameters,
List( chpar, pi -> [ 2, pi ] ) ),
Size:= Factorial( n ),
NrConjugacyClasses:= nrcl,
SizesCentralizers:= cen,
ComputedPowerMaps:= pow,
OrdersClassRepresentatives:= ord,
ComputedClassFusions:=
[ rec( name:= Concatenation( "Alt(", String( n ),
")" ),
map:= fus1 ),
rec( name:= Concatenation( "2.Sym(", String( n ),
")" ),
map:= fus2 ) ],
Irr:= Concatenation( tbl.Irr{
[ 1 .. Length( tbl.Irr ) ] }{ fus1 }, chars ) );
end,
domain:= IsPosInt ) );
#############################################################################
##
#E
|