Skip to content

Commit

Permalink
Fix bug in ValueMolienSeries
Browse files Browse the repository at this point in the history
Fixes #300
  • Loading branch information
fingolfin committed Feb 15, 2018
1 parent 64a2d86 commit 5e22239
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ctblmoli.gi
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ InstallGlobalFunction( MolienSeries, function( arg )
rec( summands := numers,
size := Size( tbl ),
degree := psi[1],
pol := pol,
numer := numer,
denom := denom,
denominfo := denominfo,
Expand Down Expand Up @@ -683,6 +684,9 @@ InstallGlobalFunction( ValueMolienSeries, function( series, i )
series:= MolienSeriesInfo( series );
value:= Sum( series.summands,
s -> CoefficientTaylorSeries( s.numer, s.r, s.k, i ), 0 );
if i+1 <= Length( series.pol ) then
value:=value + series.pol[i+1];
fi;

# There is a factor $\frac{(-1)^{\psi(1)}}{\|G\|}$.
if series.degree mod 2 = 1 then
Expand Down
23 changes: 23 additions & 0 deletions tst/testinstall/ctblmoli.tst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany
##
gap> START_TEST("ctblmoli.tst");

#
gap> G:= AlternatingGroup( 5 );;
gap> psi:= First( Irr( G ), x -> Degree( x ) = 3 );;
gap> molser:= MolienSeries( psi );
Expand All @@ -14,6 +16,8 @@ gap> List( [ 0 .. 20 ], i -> ValueMolienSeries( molser, i ) );
[ 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 4, 0, 4, 1, 5, 1, 6, 1, 7 ]
gap> MolienSeriesWithGivenDenominator( molser, [ 2, 6, 10 ] );
( 1+z^15 ) / ( (1-z^10)*(1-z^6)*(1-z^2) )

#
gap> y:= E(3);; x:= E(3)^2;;
gap> G:= Group(
> [ [ 0, y, 0, 0, 0, 0 ],
Expand All @@ -30,6 +34,25 @@ gap> Size( G );
9720
gap> MolienSeries( NaturalCharacter( G ) );
( 1 ) / ( (1-z^12)*(1-z^9)*(1-z^6)*(1-z^5)*(1-z^3)*(1-z) )

#
# the following test comes from https://github.com/gap-system/gap/issues/300
# this used to give a wrong value for ValueMolienSeries(m,0) of 26/27 instead
# of the correct value 1
#
gap> g:=SymplecticGroup(6,3);;
gap> h:=Stabilizer(g,Z(3)*[1,0,0,0,0,0]);;
gap> t:=CharacterTable(h);;
gap> chi:=Irr(t)[7];;
gap> chi[1];
9
gap> m:=MolienSeries(t,chi);;
gap> List( [ 0 .. 20 ], i -> ValueMolienSeries( m, i ) );
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0 ]
gap> List( [ 0,3 .. 48 ], i -> ValueMolienSeries( m, i ) );
[ 1, 0, 0, 0, 2, 0, 5, 0, 13, 3, 33, 15, 87, 58, 203, 178, 472 ]

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

#############################################################################
Expand Down

0 comments on commit 5e22239

Please sign in to comment.