From 82296906a423053b287179ea26ba2cfb4cb3adad Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Fri, 8 Nov 2019 14:30:09 +0100 Subject: [PATCH] fixed ConstituentsOfCharacter for Brauer character - The variant of `ConstituentsOfCharacter` with only argument a Brauer character was wrong, it regarded the character as an ordinary character. (This bug has been reported by Gabriel Navarro.) - Also the case of a virtual Brauer character was not handled correctly. The two bugs are now fixed, some tests for the variants of arguments are available, and the documentation states which cases are admissible: ordinary or modular characters, ordinary of modular virtual characters. Also, the documentation --- lib/ctblfuns.gd | 9 +++++++-- lib/ctblfuns.gi | 24 ++++++++++++----------- tst/teststandard/ctblfuns.tst | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 13 deletions(-) create mode 100644 tst/teststandard/ctblfuns.tst diff --git a/lib/ctblfuns.gd b/lib/ctblfuns.gd index 935b9d03c4..4172408478 100644 --- a/lib/ctblfuns.gd +++ b/lib/ctblfuns.gd @@ -1393,8 +1393,13 @@ DeclareAttribute( "ClassPositionsOfCentre", IsHomogeneousList ); ## ## ## -## is the set of irreducible characters that occur in the decomposition of -## the (virtual) character chi with nonzero coefficient. +## Let chi be an ordinary or modular (virtual) character. +## If an ordinary or modular character table tbl is given then +## chi may also be a list of character values. +##

+## returns +## the set of those irreducible characters that occur in the decomposition +## of chi with nonzero coefficient. ##

## nat:= NaturalCharacter( S4 ); diff --git a/lib/ctblfuns.gi b/lib/ctblfuns.gi index 2bbf451971..59c432aac1 100644 --- a/lib/ctblfuns.gi +++ b/lib/ctblfuns.gi @@ -1832,11 +1832,10 @@ InstallMethod( ConstituentsOfCharacter, chi -> ConstituentsOfCharacter( UnderlyingCharacterTable( chi ), chi ) ); InstallMethod( ConstituentsOfCharacter, - "for a character", - [ IsClassFunction and IsCharacter ], - function( chi ) - local tbl, # underlying table of `chi' - irr, # irreducible characters of `tbl' + "for an ordinary table, and a character", + [ IsOrdinaryTable, IsClassFunction and IsCharacter ], + function( tbl, chi ) + local irr, # irreducible characters of `tbl' values, # character values deg, # degree of `chi' const, # list of constituents, result @@ -1881,7 +1880,7 @@ InstallMethod( ConstituentsOfCharacter, scpr:= ScalarProduct( tbl, chi, i ); if scpr <> 0 then Add( const, i ); - proper:= proper and IsInt( scpr ) and ( 0 < scpr ); + proper:= proper and IsPosInt( scpr ); fi; od; @@ -1897,15 +1896,18 @@ InstallMethod( ConstituentsOfCharacter, "for a Brauer table, and a homogeneous list", [ IsBrauerTable, IsHomogeneousList ], function( tbl, chi ) - local irr, # irreducible characters of `tbl' - dec; + local irr, intA, intB, dec; irr:= Irr( tbl ); - dec:= Decomposition( irr, [ chi ], "nonnegative" )[1]; + intA:= IntegralizedMat( irr ); + intB:= IntegralizedMat( [ chi ], intA.inforec ); + dec:= SolutionIntMat( intA.mat, intB.mat[1] ); if dec = fail then - TryNextMethod(); + Error( " is not a virtual character of " ); fi; - return irr{ Filtered( [ 1 .. Length( dec ) ], i -> dec[i] <> 0 ) }; + + return SortedList( irr{ Filtered( [ 1 .. Length( dec ) ], + i -> dec[i] <> 0 ) } ); end ); diff --git a/tst/teststandard/ctblfuns.tst b/tst/teststandard/ctblfuns.tst new file mode 100644 index 0000000000..c49c45bad4 --- /dev/null +++ b/tst/teststandard/ctblfuns.tst @@ -0,0 +1,37 @@ +#@local ordtbl, modtbl, irr, chi, const, ibr, phi +gap> START_TEST( "ctblfuns.tst" ); + +# +gap> ordtbl:= CharacterTable( GL(2,3) );; +gap> modtbl:= ordtbl mod 2;; +gap> irr:= Irr( ordtbl );; +gap> chi:= irr[5] * irr[5];; +gap> const:= ConstituentsOfCharacter( chi );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1, 1, 1, 1, -1, -1, -1 ], [ 3, 0, 3, 0, -1, -1, -1, 1 ] ] +gap> const:= ConstituentsOfCharacter( -chi );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1, 1, 1, 1, -1, -1, -1 ], [ 3, 0, 3, 0, -1, -1, -1, 1 ] ] +gap> const:= ConstituentsOfCharacter( ordtbl, chi );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1, 1, 1, 1, -1, -1, -1 ], [ 3, 0, 3, 0, -1, -1, -1, 1 ] ] +gap> const:= ConstituentsOfCharacter( ordtbl, ValuesOfClassFunction( chi ) );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1, 1, 1, 1, -1, -1, -1 ], [ 3, 0, 3, 0, -1, -1, -1, 1 ] ] +gap> ibr:= Irr( modtbl );; +gap> phi:= ibr[2] * ibr[2];; +gap> const:= ConstituentsOfCharacter( phi );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1 ], [ 2, -1 ] ] +gap> const:= ConstituentsOfCharacter( -phi );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1 ], [ 2, -1 ] ] +gap> const:= ConstituentsOfCharacter( modtbl, phi );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1 ], [ 2, -1 ] ] +gap> const:= ConstituentsOfCharacter( modtbl, ValuesOfClassFunction( phi ) );; +gap> List( const, ValuesOfClassFunction ); +[ [ 1, 1 ], [ 2, -1 ] ] + +# +gap> STOP_TEST( "ctblfuns.tst" );