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

Reject invalid arguments for SolvableQuotient and EpimorphismSolvableQuotient #5682

Merged
merged 1 commit into from
Mar 27, 2024
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: 4 additions & 4 deletions lib/grppcfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,9 @@ local G, epi, tup, lift, i, found, fac, j, p, iso;
fi;
Info(InfoSQ,1,"found quotient of size ", Size(G));
od;
fi;

# if <primes> is a list of primes, we have to use try and error
if IsList( primes ) and IsInt( primes[1] ) then
elif IsList( primes ) and IsInt( primes[1] ) then
found := true;
i := 1;
while found and i <= Length( primes ) do
Expand All @@ -832,10 +831,9 @@ local G, epi, tup, lift, i, found, fac, j, p, iso;
fi;
Info(InfoSQ,1,"found quotient of size ", Size(G));
od;
fi;

# if <primes> is an integer it is size we want
if IsInt(primes) then
elif IsInt(primes) then
if not IsInt(primes/Size(G)) then
i:=Lcm(primes,Size(G));
Info(InfoWarning,1,"Added extra factor ",i/primes,
Expand Down Expand Up @@ -866,6 +864,8 @@ local G, epi, tup, lift, i, found, fac, j, p, iso;
Info(InfoSQ,1,"found quotient of size ", Size(G));
od;
od;
else
Error("<primes> must be either an integer, a list of integers, or a list of integer lists");
fi;

# this is the result - should be G only with set epimorphism
Expand Down
33 changes: 33 additions & 0 deletions tst/testinstall/opers/SolvableQuotient.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
gap> START_TEST("SolvableQuotient.tst");

#
gap> f := FreeGroup( "a", "b", "c", "d" );;
gap> fp := f / [ f.1^2, f.2^2, f.3^2, f.4^2, f.1*f.2*f.1*f.2*f.1*f.2,
> f.2*f.3*f.2*f.3*f.2*f.3*f.2*f.3, f.3*f.4*f.3*f.4*f.3*f.4,
> f.1^-1*f.3^-1*f.1*f.3, f.1^-1*f.4^-1*f.1*f.4,
> f.2^-1*f.4^-1*f.2*f.4 ];;
gap> hom:=EpimorphismSolvableQuotient(fp,300);Size(Image(hom));
[ a, b, c, d ] -> [ f1*f2, f1*f2, f2*f3, f2 ]
12
gap> hom:=EpimorphismSolvableQuotient(fp,[2,3]);Size(Image(hom));
[ a, b, c, d ] -> [ f1*f2*f4, f1*f2*f6*f8, f2*f3, f2 ]
1152
gap> EpimorphismSolvableQuotient(fp,fail);
Error, <primes> must be either an integer, a list of integers, or a list of in\
teger lists

#
gap> SolvableQuotient(fp,300);
rec( image := <pc group of size 12 with 3 generators>,
imgs := [ f1*f2, f1*f2, f2*f3, f2 ], source := <fp group on the generators
[ a, b, c, d ]> )
gap> SolvableQuotient(fp,[2,3]);
rec( image := <pc group of size 1152 with 9 generators>,
imgs := [ f1*f2*f4, f1*f2*f6*f8, f2*f3, f2 ],
source := <fp group on the generators [ a, b, c, d ]> )
gap> SolvableQuotient(fp,fail);
Error, <primes> must be either an integer, a list of integers, or a list of in\
teger lists

#
gap> STOP_TEST("SolvableQuotient.tst", 10000);
Loading