Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit non-characters from PermChars results #1867

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions lib/ctblpope.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ end );
#############################################################################
##
#F PermCandidatesFaithful( <tbl>, <chars>, <norm\_subgrp>, <nonfaithful>,
#F <lower>, <upper>, <torso> )'
#F <lower>, <upper>, <torso>[, <all>] )
##
# `PermCandidatesFaithful'\\
# ` ( tbl, chars, norm\_subgrp, nonfaithful, lower, upper, torso )'
Expand Down Expand Up @@ -1815,9 +1815,10 @@ end );
# `evaluate', but for `erase' it is global (realized as `[ rest ]').
##
InstallGlobalFunction( PermCandidatesFaithful,
function( tbl, chars, norm_subgrp, nonfaithful, upper, lower, torso )

local tbl_classes, # attribute of `tbl'
function( tbl, chars, norm_subgrp, nonfaithful, upper, lower, torso,
arg... )
local ratirr,
tbl_classes, # attribute of `tbl'
tbl_size, # attribute of `tbl'
tbl_orders, # attribute of `tbl'
tbl_centralizers, # attribute of `tbl'
Expand All @@ -1831,6 +1832,15 @@ InstallGlobalFunction( PermCandidatesFaithful,
min_class, evaluate, step, first, descendclass, oldrows, newmatrix,
row;

chars:= List( chars, ValuesOfClassFunction );
if Length( arg ) = 1 and arg[1] = true then
# The given list contains all rational irreducible characters.
ratirr:= chars;
else
# The given list is not known to be complete.
ratirr:= RationalizedMat( List( Irr( tbl ), ValuesOfClassFunction ) );
fi;

#
# step 1: Try to improve the input data
#
Expand Down Expand Up @@ -2109,7 +2119,7 @@ InstallGlobalFunction( PermCandidatesFaithful,
local cand;
cand:= List( [ 1 .. Length( gencharacter ) ],
i -> gencharacter[i] * tbl_classes[i] );
return ForAll( chars, chi -> 0 <= cand * chi );
return ForAll( ratirr, chi -> 0 <= cand * chi );
end;
#
# and a bigger function:
Expand Down Expand Up @@ -2469,7 +2479,8 @@ InstallGlobalFunction( PermChars, function( arg )
lower:= 0;
fi;
return PermCandidatesFaithful( tbl, chars, arec.normalsubgroup,
arec.nonfaithful, upper, lower, arec.torso);
arec.nonfaithful, upper, lower, arec.torso,
not "chars" in names );

elif "torso" in names then

Expand Down
61 changes: 61 additions & 0 deletions tst/testextra/ctblpope.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#############################################################################
##
#W ctblpope.tst GAP tests Thomas Breuer
##
#Y Copyright (C) 2017
##
## excluded from 'testinstall.g' as it takes considerable time
##

gap> START_TEST( "ctblpope.tst" );

##
gap> m:= CharacterTable( "M" );;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before calling CharacterTable( "M" );;, please put the line

gap> LoadPackage("ctbllib", false);;

This will ensure that the Character Table Library is loaded for the test, otherwise make testandard will fail when no packages are loaded with this being the first of a number of diffs:

########> Diff in /circa/scratch/gap-jenkins/workspace/GAP-pull-request-quickt\
est/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/standard/label/kovacs/GAP-pull-reque\
st-snapshot/tst/testextra/ctblpope.tst:13
# Input is:
m:= CharacterTable( "M" );;
# Expected output:
# But found:
Error, sorry, the GAP Character Table Library is not loaded,
call `LoadPackage( "CTblLib" )' if you want to use it
########

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. A better idea would be indeed to run the test only when IsPackageMarkedForLoading("ctbllib",""); returns true. This will not enforce loading the package when GAP is started with -r -A options.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. along the lines

gap> if IsPackageMarkedForLoading("ctbllib","") then
... do calculations
... if Length(cand)<>1 then
>   Print( "Error in calculation of ...\n" );
> fi; fi;

gap> torso:= [ 512372707698741056749515292734375, 405589064025344574375,
> 29628786742129575, 658201521662685, 215448838605, 0, 121971774375,
> 28098354375, 335229607, 108472455, 164587500, 4921875,,,,,, 0,
> 437325, 0,,,,,,, 6561, 6561, 177100, 7660, 6875, 315, 275, 0,,,, 0,,
> ,,,, 0, 0, 0, 3885, 525, 0,,,, 0,,,, 28, 81, 189, 9, 9, 9, 0, 540,
> 300, 175, 20, 15, 7,, 0, 0, 0, 0, 0, 0, 0,,,,, 0,,,,, 0, 0, 0, 0,
> 0, 0, 77, 45, 13, 0, 0,,,,, 0,,,,,,, 0, 0, 4, 0, 0, 9, 9, 3, 1, 0,
> 0, 0, 0, 0, 0, 4, 1, 1, 0,, 0, 0, 0, 0, 0,, 0, 0, 0, 0, 0, 0,, 0,,
> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,,,,,, 0,,, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0,, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0 ];;
gap> lower:= [ 512372707698741056749515292734375, 102893356234868574375,
> 2045161610873834, 47672538696202, 3040608610, 0, 8009187743,
> 783427000, 7075556, 2277590, 11945867, 18679, 52124902, 49314,
> 451068, 32739, 1790, 0, 7469, 0, 789, 3826, 827, 176, 212, 63, 133,
> 25, 3540, 131, 27, 2, 2, 0, 1032, 131, 444, 0, 38, 9, 4, 3, 3, 0,
> 0, 0, 19, 6, 0, 20, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, 4, 2, 1,
> 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0,
> 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0,
> 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
> 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];;
gap> rat:= RationalizedMat( Irr( m ) );;
gap> constit:= rat{ [ 1, 2, 4, 5, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18,
> 19, 20, 21, 22, 23, 24, 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 ] };;
gap> cand:= PermChars( m, rec( torso:= torso, chars:= constit,
> lower:= lower, normalsubgroup:= [ 1 .. NrConjugacyClasses( m ) ],
> nonfaithful:= TrivialCharacter( m ) ) );;
gap> Length( cand );
1

##
gap> STOP_TEST( "ctblpope.tst", 1 );

#############################################################################
##
#E