Skip to content

Commit 777665d

Browse files
authored
fix IsomorphismPermGroup for trivial f. p. (sub)group (#6170)
1 parent d34622d commit 777665d

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

lib/grpfp.gi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4017,7 +4017,7 @@ local mappow, G, max, p, gens, rels, comb, i, l, m, H, HH, t, sz,
40174017
max:=CosetTableDefaultMaxLimit;
40184018
fi;
40194019

4020-
# handle free and trivial group
4020+
# handle trivial free group
40214021
if 0 = Length( FreeGeneratorsOfFpGroup( G )) then
40224022
p:=GroupHomomorphismByImagesNC(G,GroupByGenerators([],()),[],[]);
40234023
SetIsomorphismPermGroup(G,p);
@@ -4056,12 +4056,16 @@ local mappow, G, max, p, gens, rels, comb, i, l, m, H, HH, t, sz,
40564056
fi;
40574057
SetSize(G,sz);
40584058
fi;
4059-
if Size(G)=infinity then
4059+
sz:= Size(G);
4060+
if sz = infinity then
40604061
return fail;
4062+
elif sz = 1 then
4063+
# handle trivial group
4064+
p:= GroupHomomorphismByImagesNC( G, GroupByGenerators( [], () ), [], [] );
4065+
SetIsomorphismPermGroup( G, p );
4066+
return p;
40614067
fi;
40624068

4063-
sz:=Size(G);
4064-
40654069
if sz*10>max then
40664070
max:=sz*10;
40674071
fi;

tst/testinstall/grpfp.tst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#@local a,b,c2,e,f,g,iter,l,s,F,rels,sub,iso,G,hom,m
1+
#@local a,b,c2,e,f,g,iter,l,s,F,rels,sub,iso,G,hom,m,H
22
gap> START_TEST("grpfp.tst");
33
gap> f:= FreeGroup( "a", "b" );; a := f.1;; b := f.2;;
44
gap> c2:= f / [ a*b*a^-2*b*a/b, (b^-1*a^3*b^-1*a^-3)^2*a ];;
@@ -177,5 +177,14 @@ gap> ReducedForm(F,UnderlyingElement(
177177
> Product(GeneratorsOfMonoid(m){[1,3..19]})));
178178
b2*b4*w1*b1*b6*b8*b9
179179

180+
#
181+
gap> F:= FreeGroup( 1 );;
182+
gap> G:= F / [ F.1 ];;
183+
gap> H:= Subgroup( G, [ G.1 ] );;
184+
gap> IsomorphismPermGroup( G ) <> fail;
185+
true
186+
gap> IsomorphismPermGroup( H ) <> fail;
187+
true
188+
180189
#
181190
gap> STOP_TEST( "grpfp.tst" );

0 commit comments

Comments
 (0)