/usr/share/gap/pkg/AtlasRep/gap/mindeg.gi is in gap-atlasrep 1.5.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | #############################################################################
##
#W mindeg.gi GAP 4 package AtlasRep Thomas Breuer
##
#Y Copyright (C) 2007, Lehrstuhl D für Mathematik, RWTH Aachen, Germany
##
## This file contains declarations for dealing with information about
## permutation and matrix representations of minimal degree
## for selected groups.
##
#############################################################################
##
#F MinimalPermutationRepresentationInfo( <grpname>, <mode> )
##
if IsPackageMarkedForLoading( "ctbllib", "" ) then
InstallGlobalFunction( MinimalPermutationRepresentationInfo,
function( grpname, mode )
local result, addvalue, parse, ordtbl, identifier, value, s, cand, maxes,
indices, perms, corefreepos, cand1, other, minpos, cand2min, tom,
faith, mincand, minsubmindeg, subname, subtbl, pi, submindeg, fus,
n, N, l;
# Initialize the result values.
result:= rec( value:= "unknown",
source:= [] );
addvalue:= function( val, src )
if result.value = "unknown" then
result.value:= val;
elif result.value <> val then
Error( "inconsistent minimal degrees" );
fi;
AddSet( result.source, src );
end;
# `"A<n>"' and `"A<n>.2"' yield <n>.
parse:= ParseForwards( grpname, [ "A", IsDigitChar ] );
if parse <> fail then
parse:= Int( parse[2] );
if parse < 3 then
addvalue( 1, "computed (alternating group)" );
else
addvalue( Int( parse ), "computed (alternating group)" );
fi;
if mode = "one" then
return result;
fi;
fi;
parse:= ParseForwards( grpname, [ "A", IsDigitChar, ".2" ] );
if parse <> fail then
parse:= Int( parse[2] );
if parse < 2 then
Error( grpname, " makes no sense" );
else
addvalue( Int( parse ), "computed (symmetric group)" );
fi;
if mode = "one" then
return result;
fi;
fi;
# `"L2(<q>)"' yields $<q>+1$ if $<q> \not\in \{ 2, 3, 5, 7, 9, 11 \}$.
parse:= ParseForwards( grpname, [ "L2(", IsDigitChar, ")" ] );
if parse <> fail then
parse:= Int( parse[2] );
if parse in [ 2, 3, 5, 7, 11 ] then
addvalue( parse, "computed (PSL(2,q))" );
elif parse = 9 then
addvalue( 6, "computed (PSL(2,q))" );
else
addvalue( parse + 1, "computed (PSL(2,q))" );
fi;
if mode = "one" then
return result;
fi;
fi;
# Use information from the character table from the library.
ordtbl:= CharacterTable( grpname );
if IsCharacterTable( ordtbl ) then
if HasConstructionInfoCharacterTable( ordtbl )
and IsList( ConstructionInfoCharacterTable( ordtbl ) )
and ConstructionInfoCharacterTable( ordtbl )[1]
= "ConstructPermuted"
and Length( ConstructionInfoCharacterTable( ordtbl )[2] ) = 1 then
# Delegate to another table for which more information is available.
identifier:= ConstructionInfoCharacterTable( ordtbl )[2][1];
value:= MinimalRepresentationInfo( identifier, NrMovedPoints );
if value <> fail then
addvalue( value.value, Concatenation( "computed (char. table of ",
identifier, ")" ) );
if mode = "one" then
return result;
fi;
fi;
else
# If the first maximal subgroup is known and core-free
# then take its index. (This happens for simple tables.)
# (Here we need not assume that the permutation representation of
# minimal degree is transitive.)
s:= CharacterTable( Concatenation( Identifier( ordtbl ), "M1" ) );
if s <> fail and
Length( ClassPositionsOfKernel( TrivialCharacter( s )^ordtbl ) )
= 1 then
addvalue( Size( ordtbl ) / Size( s ), "computed (char. table)" );
if mode = "one" then
return result;
fi;
fi;
# If all tables of maximal subgroups are available then inspect them.
if HasMaxes( ordtbl ) then
maxes:= List( Maxes( ordtbl ), CharacterTable );
indices:= List( maxes, s -> Size( ordtbl ) / Size( s ) );
if IsSimpleCharacterTable( ordtbl ) then
# just a shortcut ...
addvalue( Minimum( indices ), "computed (char. table)" );
if mode = "one" then
return result;
fi;
fi;
perms:= List( maxes, s -> TrivialCharacter( s ) ^ ordtbl );
corefreepos:= Filtered( [ 1 .. Length( perms ) ],
i -> Length( ClassPositionsOfKernel( perms[i] ) ) = 1 );
# If the maximal subgroups of largest order are core-free
# then we are done.
if not IsEmpty( corefreepos ) then
cand1:= Minimum( indices{ corefreepos } );
if Minimum( indices ) = cand1 then
addvalue( cand1, "computed (char. table)" );
if mode = "one" then
return result;
fi;
fi;
fi;
# If the group has a unique minimal normal subgroup
# (so the minimal permutation representation is transitive)
# that is simple and maximal
# then all candidate subgroups in this normal subgroup
# are admissible also inside this subgroup;
# so the candidate indices for point stabilizers inside this
# normal subgroup are minimal degree times index.
other:= Difference( [ 1 .. Length( maxes ) ], corefreepos );
if Length( other ) = 1
and IsSimpleCharacterTable( maxes[ other[1] ] ) then
minpos:= ClassPositionsOfMinimalNormalSubgroups( ordtbl );
if Length( minpos ) = 1 and
ClassPositionsOfKernel( TrivialCharacter( maxes[ other[1] ]
)^ordtbl ) = minpos[1] then
cand2min:= MinimalRepresentationInfo(
Identifier( maxes[ other[1] ] ), NrMovedPoints );
if IsRecord( cand2min ) then
addvalue( Minimum( cand1,
indices[ other[1] ] * cand2min.value ),
"computed (char. table)" );
if mode = "one" then
return result;
fi;
fi;
fi;
fi;
fi;
fi;
# If the table of marks is known and the minimal permutation
# representation is transitive then we can compute directly.
if HasFusionToTom( ordtbl ) and
Length( ClassPositionsOfMinimalNormalSubgroups( ordtbl ) ) = 1 then
tom:= TableOfMarks( ordtbl );
if tom <> fail then
if IsSimpleCharacterTable( ordtbl ) then
maxes:= MaximalSubgroupsTom( tom );
addvalue( Minimum( maxes[2] ), "computed (table of marks)" );
if mode = "one" then
return result;
fi;
else
faith:= Filtered( PermCharsTom( ordtbl, tom ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
addvalue( Minimum( List( faith, x -> x[1] ) ),
"computed (table of marks)" );
if mode = "one" then
return result;
fi;
fi;
fi;
fi;
# If we have a subgroup with known minimal degree $n$
# and a core-free subgroup of index $n$,
# then $n$ is the minimal degree of $G$.
mincand:= infinity;
minsubmindeg:= Maximum( Set( Factors( Size( ordtbl ) ) ) );
for subname in NamesOfFusionSources( ordtbl ) do
subtbl:= CharacterTable( subname );
if subtbl <> fail and IsOrdinaryTable( subtbl ) and
Length( ClassPositionsOfKernel( GetFusionMap( subtbl, ordtbl ) ) )
= 1 then
pi:= TrivialCharacter( subtbl ) ^ ordtbl;
if Length( ClassPositionsOfKernel( pi ) ) = 1 then
if pi[1] < mincand then
mincand:= pi[1];
fi;
fi;
submindeg:= MinimalRepresentationInfo( subname, NrMovedPoints );
if submindeg <> fail and minsubmindeg < submindeg.value then
minsubmindeg:= submindeg.value;
fi;
if mincand = minsubmindeg then
addvalue( minsubmindeg, "computed (subgroup tables)" );
if mode = "one" then
return result;
fi;
fi;
fi;
od;
# If we have a subgroup with known minimal degree $n$
# and a faithful permutation representation of degree $n$ for $G$
# then $n$ is the minimal degree of $G$.
if OneAtlasGeneratingSetInfo( grpname, NrMovedPoints, minsubmindeg )
<> fail then
addvalue( minsubmindeg,
"computed (subgroup tables, known repres.)" );
if mode = "one" then
return result;
fi;
fi;
# If the factor group of $G$ modulo its unique minimal normal subgroup
# $N$ is simple and has minimal degree $n$,
# and if we know a subgroup $U$ of index $n |N|$ that intersects $N$
# trivially then the minimal degree is $n |N|$.
minpos:= ClassPositionsOfMinimalNormalSubgroups( ordtbl );
if Length( minpos ) = 1 then
fus:= First( ComputedClassFusions( ordtbl ),
r -> ClassPositionsOfKernel( r.map ) = minpos[1] );
if fus <> fail then
n:= MinimalRepresentationInfo( fus.name, NrMovedPoints );
if n <> fail then
N:= Sum( SizesConjugacyClasses( ordtbl ){ minpos[1] } );
for subname in NamesOfFusionSources( ordtbl ) do
subtbl:= CharacterTable( subname );
if subtbl <> fail and IsOrdinaryTable( subtbl ) and
Size( ordtbl ) = Size( subtbl ) * n.value then
fus:= GetFusionMap( subtbl, ordtbl );
if Length( ClassPositionsOfKernel( fus ) ) = 1 then
for l in ClassPositionsOfDirectProductDecompositions(
subtbl ) do
if ForAny( l,
x -> Sum( SizesConjugacyClasses( subtbl ){ x } )
= Size( subtbl ) / N
and Intersection( fus{ x }, minpos[1] )
= [ 1 ] ) then
addvalue( N * n.value, "computed (factor table)" );
if mode = "one" then
return result;
fi;
fi;
od;
fi;
fi;
od;
fi;
fi;
fi;
fi;
return result;
end );
fi;
#############################################################################
##
#F MinimalRepresentationInfo( <grpname>, NrMovedPoints[, <mode>] )
#F MinimalRepresentationInfo( <grpname>, Characteristic, <p>[, <mode>] )
#F MinimalRepresentationInfo( <grpname>, Size, <q>[, <mode>] )
##
InstallGlobalFunction( MinimalRepresentationInfo, function( arg )
local grpname, info, conditions, known, result, mode, p, ordtbl, minpos,
faith, Norder, modtbl, min, q, pos, cont;
if Length( arg ) = 0 then
Error( "usage: ",
"MinimalRepresentationInfo( <grpname>[, <conditions>] )" );
fi;
grpname:= arg[1];
if not IsString( grpname ) then
return fail;
fi;
if IsBound( MinimalRepresentationInfoData.( grpname ) ) then
info:= MinimalRepresentationInfoData.( grpname );
else
info:= fail;
fi;
conditions:= arg{ [ 2 .. Length( arg ) ] };
known:= fail;
result:= fail;
mode:= "cache";
if not IsEmpty( conditions ) and
IsString( conditions[ Length( conditions ) ] ) then
mode:= conditions[ Length( conditions ) ];
Unbind( conditions[ Length( conditions ) ] );
fi;
if conditions = [ NrMovedPoints ] then
# MinimalRepresentationInfo( <grpname>, NrMovedPoints )
if info <> fail and IsBound( info.NrMovedPoints ) then
known:= info.NrMovedPoints;
fi;
if mode = "lookup" or ( mode = "cache" and known <> fail ) then
return known;
fi;
if IsBound( GAPInfo.PackagesLoaded.ctbllib ) then
# This works only if the package `CTblLib' is available.
if mode = "recompute" then
result:= MinimalPermutationRepresentationInfo( grpname, "all" );
elif known = fail then
result:= MinimalPermutationRepresentationInfo( grpname, "one" );
fi;
fi;
if result = fail or IsEmpty( result.source ) then
# We cannot compute the value, take the stored value.
result:= known;
else
# Store the computed value, and compare it with the known one.
SetMinimalRepresentationInfo( grpname, "NrMovedPoints",
result.value, result.source );
fi;
elif Length( conditions ) = 2 and conditions[1] = Characteristic then
# MinimalRepresentationInfo( <grpname>, Characteristic, <p> )
p:= conditions[2];
if info <> fail and IsBound( info.Characteristic )
and IsBound( info.Characteristic.( p ) ) then
known:= info.Characteristic.( p );
fi;
if mode = "lookup" or ( mode = "cache" and known <> fail ) then
return known;
fi;
if known = fail or mode = "recompute" then
# For groups with a unique minimal normal subgroup
# whose order is not a power of the characteristic,
# a faithful matrix representation of minimal degree is irreducible.
# (Consider a faithful reducible representation $\rho$ in block
# diagonal form.
# If the restriction to the minimal normal subgroup $N$ is trivial
# on the two factors then the restriction of $\rho$ to $N$ is a group
# of triangular matrices, i.e., a $p$-group.)
ordtbl:= CharacterTable( grpname );
if ordtbl <> fail then
minpos:= ClassPositionsOfMinimalNormalSubgroups( ordtbl );
if Length( minpos ) = 1 then
if p = 0 or Size( ordtbl ) mod p <> 0 then
# Consider the ordinary character table.
# Take the smallest degree of a faithful irreducible character.
faith:= Filtered( Irr( ordtbl ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
result:= rec( value:= Minimum( List( faith, x -> x[1] ) ),
source:= [ "computed (char. table)" ] );
elif IsPrimeInt( p ) then
Norder:= Sum( SizesConjugacyClasses( ordtbl ){ minpos[1] } );
if not ( IsPrimePowerInt( Norder ) and Norder mod p = 0 ) then
# Consider the Brauer table.
modtbl:= ordtbl mod p;
if modtbl <> fail then
faith:= Filtered( Irr( modtbl ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
result:= rec( value:= Minimum( List( faith, x -> x[1] ) ),
source:= [ "computed (char. table)" ] );
fi;
fi;
fi;
else
# If the minimal nontrivial irreducible representation is
# faithful then this irreducible is minimal.
if p = 0 or Size( ordtbl ) mod p <> 0 then
faith:= Filtered( Irr( ordtbl ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
if not IsEmpty( faith ) then
min:= Minimum( List( faith, x -> x[1] ) );
if ForAll( Irr( ordtbl ),
x -> x[1] >= min or Set( x ) = [ 1 ] ) then
result:= rec( value:= min,
source:= [ "computed (char. table)" ] );
fi;
fi;
elif IsPrimeInt( p ) then
minpos:= List( ClassPositionsOfNormalSubgroups( ordtbl ),
x -> Sum( SizesConjugacyClasses( ordtbl ){ x } ) );
if not ForAny( minpos,
x -> IsPrimePowerInt( x ) and x mod p = 0 ) then
# Consider the Brauer table.
modtbl:= ordtbl mod p;
if modtbl <> fail then
faith:= Filtered( Irr( modtbl ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
if not IsEmpty( faith ) then
min:= Minimum( List( faith, x -> x[1] ) );
if ForAll( Irr( modtbl ),
x -> x[1] >= min or Set( x ) = [ 1 ] ) then
result:= rec( value:= min,
source:= [ "computed (char. table)" ] );
fi;
fi;
fi;
fi;
fi;
fi;
fi;
fi;
if result = fail then
# We cannot compute the value, take the stored value.
result:= known;
else
SetMinimalRepresentationInfo( grpname, [ "Characteristic", p ],
result.value, result.source );
fi;
elif Length( conditions ) = 2 and conditions[1] = Size then
# MinimalRepresentationInfo( <grpname>, Size, <q> )
q:= conditions[2];
p:= SmallestRootInt( q );
if info <> fail and IsBound( info.CharacteristicAndSize )
and IsBound( info.CharacteristicAndSize.( p ) ) then
info:= info.CharacteristicAndSize.( p );
pos:= Position( info.sizes, q );
if pos <> fail then
known:= rec( value:= info.dimensions[ pos ],
source:= info.sources[ pos ] );
elif info.complete.value then
cont:= Filtered( [ 1 .. Length( info.sizes ) ],
i -> LogInt( q, p ) mod LogInt( info.sizes[i], p ) = 0 );
known:= rec( value:= Minimum( info.dimensions{ cont } ),
source:= [ "computed (stored data)" ] );
fi;
fi;
if mode = "lookup" or ( mode = "cache" and known <> fail ) then
return known;
fi;
if known = fail or mode = "recompute" then
# For groups with a unique minimal normal subgroup
# whose order is not a power of the characteristic,
# a faithful matrix representation of minimal degree is irreducible
# (over a given field).
ordtbl:= CharacterTable( grpname );
if IsPosInt( q ) and IsPrimePowerInt( q ) and ordtbl <> fail then
minpos:= ClassPositionsOfMinimalNormalSubgroups( ordtbl );
if Length( minpos ) = 1 then
if Size( ordtbl ) mod p <> 0 then
# Consider the ordinary character table.
# Take the smallest degree of a faithful irreducible character,
# over the given field.
faith:= Filtered( Irr( ordtbl ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
faith:= RealizableBrauerCharacters( faith, q );
result:= rec( value:= Minimum( List( faith, x -> x[1] ) ),
source:= [ "computed (char. table)" ] );
else
Norder:= Sum( SizesConjugacyClasses( ordtbl ){ minpos[1] } );
if not ( IsPrimePowerInt( Norder ) and Norder mod p = 0 ) then
# Consider the Brauer table.
modtbl:= ordtbl mod p;
if modtbl <> fail then
faith:= Filtered( Irr( modtbl ),
x -> Length( ClassPositionsOfKernel( x ) ) = 1 );
faith:= RealizableBrauerCharacters( faith, q );
if faith <> fail then
result:= rec( value:= Minimum( List( faith, x -> x[1] ) ),
source:= [ "computed (char. table)" ] );
fi;
fi;
fi;
fi;
fi;
fi;
fi;
if result = fail then
# We cannot compute the value, take the stored value.
result:= known;
else
SetMinimalRepresentationInfo( grpname, [ "Size", q ],
result.value, result.source );
fi;
fi;
return result;
end );
#############################################################################
##
#F SetMinimalRepresentationInfo( <grpname>, <op>, <value>, <source> )
##
InstallGlobalFunction( SetMinimalRepresentationInfo,
function( grpname, op, value, source )
local compare, info, p, q, pos;
compare:= function( value, source, valuestored, sourcestored, type )
if value <> valuestored then
Print( "#E ", type, ": incompatible minimum for `",
grpname, "'\n" );
return false;
fi;
UniteSet( sourcestored, source );
return true;
end;
if IsString( source ) then
source:= [ source ];
fi;
if not IsBound( MinimalRepresentationInfoData.( grpname ) ) then
MinimalRepresentationInfoData.( grpname ):= rec();
fi;
info:= MinimalRepresentationInfoData.( grpname );
if op = "NrMovedPoints" then
if IsBound( info.NrMovedPoints ) then
info:= info.NrMovedPoints;
return compare( value, source,
info.value, info.source, "NrMovedPoints" );
else
info.NrMovedPoints:= rec( value:= value, source:= source );
return true;
fi;
elif IsList( op ) and Length( op ) = 2
and op[1] = "Characteristic"
and ( op[2] = 0 or IsPrimeInt( op[2] ) ) then
if not IsBound( info.Characteristic ) then
info.Characteristic:= rec();
fi;
info:= info.Characteristic;
p:= String( op[2] );
if IsBound( info.( p ) ) then
info:= info.( p );
return compare( value, source,
info.value, info.source, "Characteristic" );
else
info.( p ):= rec( value:= value, source:= source );
return true;
fi;
elif IsList( op ) and Length( op ) = 3
and op[1] = "Characteristic"
and IsPrimeInt( op[2] )
and op[3] = "complete" then
if not IsBound( info.CharacteristicAndSize ) then
info.CharacteristicAndSize:= rec();
fi;
info:= info.CharacteristicAndSize;
p:= String( op[2] );
if not IsBound( info.( p ) ) then
info.( p ):= rec( sizes:= [], dimensions:= [], sources:= [] );
fi;
info.( p ).complete:= rec( value:= value, source:= source );
return true;
elif IsList( op ) and Length( op ) = 2
and op[1] = "Size"
and IsInt( op[2] ) and IsPrimePowerInt( op[2] ) then
#T change IsPrimePowerInt to include an IsInt test!
if not IsBound( info.CharacteristicAndSize ) then
info.CharacteristicAndSize:= rec();
fi;
info:= info.CharacteristicAndSize;
q:= op[2];
p:= String( SmallestRootInt( q ) );
if not IsBound( info.( p ) ) then
info.( p ):= rec( sizes:= [], dimensions:= [], sources:= [],
complete:= rec( value:= false, source:= "" ) );
fi;
info:= info.( p );
pos:= Position( info.sizes, q );
if pos <> fail then
# Compare the stored and the computed value.
return compare( value, source,
info.dimensions[ pos ], info.sources[ pos ], "Size" );
elif ForAll( [ 1 .. Length( info.sizes ) ],
i -> not ( q = info.sizes[i] ^ LogInt( q, info.sizes[i] )
and info.dimensions[i] = value ) ) then
Add( info.sizes, q );
Add( info.dimensions, value );
Add( info.sources, source );
return true;
fi;
else
Error( "do not known how to store this info: <value>, <source>" );
fi;
end );
#############################################################################
##
#F ComputedMinimalRepresentationInfo()
##
InstallGlobalFunction( ComputedMinimalRepresentationInfo, function()
local oldvalue, info, grpname, ordtbl, size, p, modtbl, sizes, q, r,
entry, newvalue, diff, comp, char;
# Save the stored list.
oldvalue:= MinimalRepresentationInfoData;
MakeReadWriteGlobal( "MinimalRepresentationInfoData" );
MinimalRepresentationInfoData:= rec();
# Add non-computed data.
for entry in Filtered( oldvalue.datalist,
e -> e[4]{ [ 1 .. 4 ] } <> "comp" ) do
SetMinimalRepresentationInfo( entry[1], entry[2], entry[3],
[ entry[4] ] );
od;
# Recompute the data.
for info in AtlasOfGroupRepresentationsInfo.GAPnames do
grpname:= info[1];
MinimalRepresentationInfo( grpname, NrMovedPoints, "recompute" );
ordtbl:= CharacterTable( grpname );
MinimalRepresentationInfo( grpname, Characteristic, 0, "recompute" );
if IsBound( info[3].size ) then
size:= info[3].size;
for p in Set( Factors( size ) ) do
MinimalRepresentationInfo( grpname, Characteristic, p,
"recompute" );
if ordtbl <> fail then
modtbl:= ordtbl mod p;
if modtbl <> fail then
sizes:= Set( List( Irr( modtbl ),
phi -> SizeOfFieldOfDefinition( phi, p ) ) );
#T is this a reasonable approach?
for q in Filtered( sizes, IsInt ) do
MinimalRepresentationInfo( grpname, Size, q, "recompute" );
od;
if IsBound( MinimalRepresentationInfoData.( grpname ) ) then
r:= MinimalRepresentationInfoData.( grpname );
if IsBound( r.CharacteristicAndSize ) then
r:= r.CharacteristicAndSize;
if not fail in sizes then
#T can one not do better?
SetMinimalRepresentationInfo( grpname,
[ "Characteristic", p, "complete" ], true,
[ "computed (char. table)" ] );
fi;
fi;
fi;
fi;
fi;
od;
fi;
od;
# Print information about differences.
newvalue:= MinimalRepresentationInfoData;
newvalue.datalist:= oldvalue.datalist;
diff:= Difference( RecNames( oldvalue ), RecNames( newvalue ) );
if not IsEmpty( diff ) then
Print( "#E missing min. repr. components:\n", diff, "\n" );
fi;
diff:= Intersection( Difference( RecNames( newvalue ),
RecNames( oldvalue ) ),
List( AtlasOfGroupRepresentationsInfo.GAPnames,
x -> x[1] ) );
if not IsEmpty( diff ) then
Print( "#I new min. repr. components:\n", diff, "\n" );
fi;
for comp in Intersection( RecNames( newvalue ), RecNames( oldvalue ) ) do
if oldvalue.( comp ) <> newvalue.( comp ) then
Print( "#I min. repr. differences for ", comp, "\n" );
if IsBound( oldvalue.( comp ).NrMovedPoints ) and
IsBound( newvalue.( comp ).NrMovedPoints ) and
oldvalue.( comp ).NrMovedPoints.source
<> newvalue.( comp ).NrMovedPoints.source then
Print( "#I (different `source' components for NrMovedPoints:\n",
"#I ", oldvalue.( comp ).NrMovedPoints.source, "\n",
"#I -> ", newvalue.( comp ).NrMovedPoints.source, ")\n" );
fi;
if IsBound( oldvalue.( comp ).Characteristic ) and
IsBound( newvalue.( comp ).Characteristic ) then
for char in Intersection(
RecNames( oldvalue.( comp ).Characteristic ),
RecNames( newvalue.( comp ).Characteristic ) ) do
if oldvalue.( comp ).Characteristic.( char ).source
<> newvalue.( comp ).Characteristic.( char ).source then
Print( "#I (different `source' components for characteristic ",
char, ":\n",
"#I ", oldvalue.( comp ).Characteristic.( char ).source,
"\n#I -> ",
newvalue.( comp ).Characteristic.( char ).source,
")\n" );
fi;
od;
fi;
fi;
od;
# Reinstall the old value.
MinimalRepresentationInfoData:= oldvalue;
MakeReadOnlyGlobal( "MinimalRepresentationInfoData" );
# Return the new value.
return newvalue;
end );
#############################################################################
##
#F StringOfMinimalRepresentationInfoData( <record> )
##
InstallGlobalFunction( StringOfMinimalRepresentationInfoData,
function( record )
local lines, grpname, info, src, infoc, p, i, result, line;
lines:= [];
for grpname in Intersection( RecNames( record ),
List( AtlasOfGroupRepresentationsInfo.GAPnames,
x -> x[1] ) ) do
info:= record.( grpname );
if IsBound( info.NrMovedPoints ) then
for src in info.NrMovedPoints.source do
Add( lines, [ src{ [ 1 .. 4 ] } = "comp",
Concatenation(
"[\"", grpname,
"\",\"NrMovedPoints\",",
String( info.NrMovedPoints.value ),
",\"", src, "\"],\n" ) ] );
od;
fi;
if IsBound( info.Characteristic ) then
infoc:= info.Characteristic;
for p in List( Set( List( RecNames( infoc ), Int ) ), String ) do
for src in infoc.( p ).source do
Add( lines, [ src{ [ 1 .. 4 ] } = "comp",
Concatenation(
"[\"", grpname,
"\",[\"Characteristic\",", String( p ), "],",
String( infoc.( p ).value ),
",\"", src, "\"],\n" ) ] );
od;
od;
fi;
if IsBound( info.CharacteristicAndSize ) then
infoc:= info.CharacteristicAndSize;
for p in List( Set( List( RecNames( infoc ), Int ) ), String ) do
for i in [ 1 .. Length( infoc.( p ).sizes ) ] do
for src in infoc.( p ).sources[i] do
Add( lines, [ src{ [ 1 .. 4 ] } = "comp",
Concatenation(
"[\"", grpname,
"\",[\"Size\",", String( infoc.( p ).sizes[i] ),
"],", String( infoc.( p ).dimensions[i] ),
",\"", src, "\"],\n" ) ] );
od;
od;
if infoc.( p ).complete.value then
for src in infoc.( p ).complete.source do
Add( lines, [ src{ [ 1 .. 4 ] } = "comp",
Concatenation(
"[\"", grpname,
"\",[\"Characteristic\",", String( p ),
",\"complete\"],true,\"",
src, "\"],\n" ) ] );
od;
fi;
od;
fi;
od;
result:= "\nMinimalRepresentationInfoData.datalist:= [\n";
Append( result, "# non-computed values\n" );
for line in List( Filtered( lines, l -> not l[1] ), l -> l[2] ) do
Append( result, line );
od;
Append( result, "\n" );
Append( result, "# computed values\n" );
for line in List( Filtered( lines, l -> l[1] ), l -> l[2] ) do
Append( result, line );
od;
Append( result, "];;\n\n" );
Append( result,
"for entry in MinimalRepresentationInfoData.datalist do\n" );
Append( result,
" CallFuncList( SetMinimalRepresentationInfo, entry );\n" );
Append( result, "od;\n" );
return result;
end );
#############################################################################
##
#E
|