Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 5 additions & 3 deletions lib/ctblmoli.gi
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ InstallGlobalFunction( MolienSeries, function( arg )
chi, # character of `tbl', optional third argument
numers, # list of numerators of sum of polynomial quotients
denoms, # list of denominators of sum of polynomial quotients
R,
x, # indeterminate
tblclasses, # class lengths of `tbl'
orders, # representative orders of `tbl'
Expand Down Expand Up @@ -279,7 +280,8 @@ InstallGlobalFunction( MolienSeries, function( arg )
# `pol' is an additive polynomial.
numers:= [];
denoms:= [];
x:= Indeterminate( Rationals );
R:= UnivariatePolynomialRing(Rationals);
x:= R.1;
pol:= Zero( x );

tblclasses:= SizesConjugacyClasses( tbl );
Expand Down Expand Up @@ -361,7 +363,7 @@ InstallGlobalFunction( MolienSeries, function( arg )
# Split the summand into two summands, with denominators
# the special factor `f' resp. the remaining factors `F'.
f:= ( x ^ special[1] - 1 ) ^ special[2];
repr:= GcdRepresentation( F, f );
repr:= GcdRepresentation( R, F, f );

# Reduce the numerators if possible.
num:= numer * repr[1];
Expand Down Expand Up @@ -413,7 +415,7 @@ InstallGlobalFunction( MolienSeries, function( arg )
# $\prod_{j>i} f_j$ is stored in `F', and $f_i$ is in `f'.

# at first position $r_i$, at second position $q_i$
repr:= GcdRepresentation( F, f );
repr:= GcdRepresentation( R, F, f );

# The numerator $p_i$.
p:= q * repr[1];
Expand Down
11 changes: 11 additions & 0 deletions tst/testinstall/ctblmoli.tst
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,16 @@ true
gap> ser = ser2;
true

#
# MolienSeries used to hang when given an non-character as input
# now an error is raised
#
gap> G:=Group((1,2,3,4,5,6,7),(5,6,7));;
gap> MolienSeries(NaturalCharacter(G));
( 1-z^3+z^6-z^9+z^12-z^15+z^18 ) / ( (1-z^7)*(1-z^5)*(1-z^4)*(1-z^3)^2*(1-z^2)\
*(1-z) )
gap> MolienSeries(-NaturalCharacter(G));
Error, <ns> must be a subset of <R>

#
gap> STOP_TEST("ctblmoli.tst");
Loading