Skip to content

Commit

Permalink
FIX: GQuotients can hang for certain groups with free quotients
Browse files Browse the repository at this point in the history
  • Loading branch information
hulpke committed Dec 17, 2018
1 parent d212ad5 commit 7a4b171
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
26 changes: 17 additions & 9 deletions lib/grpfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -5134,7 +5134,7 @@ InstallMethod(StoredExcludedOrders,"fp group",true,

InstallGlobalFunction(ExcludedOrders,
function(arg)
local f,a,i,j,gens,tstord,excl,p,s;
local f,a,b,i,j,gens,tstord,excl,p,s;
f:=arg[1];
s:=StoredExcludedOrders(f);
gens:=FreeGeneratorsOfFpGroup(f);
Expand Down Expand Up @@ -5170,24 +5170,32 @@ local f,a,i,j,gens,tstord,excl,p,s;
else
p:=PresentationFpGroup(f,0);
AddRelator(p,p!.generators[i]^j);
TzInitGeneratorImages(p);
TzGoGo(p);
if Length(p!.generators)=0 then
AddSet(excl[i],j);
AddSet(s[i][1],j);
else
if i=1 then
a:=[gens[2]];
b:=[gens[2]];
else
a:=[gens[1]];
b:=[gens[1]];
fi;
a:=CosetTableFromGensAndRels(gens,
Concatenation(RelatorsOfFpGroup(f),[gens[i]^j]),a:
Concatenation(RelatorsOfFpGroup(f),[gens[i]^j]),b:
max:=15999,silent);
if IsList(a) and Length(a[1])=1 and
# now we can try the size
Size(FpGroupPresentation(p))=1 then
AddSet(excl[i],j);
AddSet(s[i][1],j);
if IsList(a) and Length(a[1])=1 then
a:=FpGroupPresentation(p);
b:=List(b,x->MappedWord(x,FreeGeneratorsOfFpGroup(f),TzImagesOldGens(p)));
b:=List(b,x->MappedWord(x,p!.generators,GeneratorsOfGroup(a)));
# now we can try the size. Ensure we use the generator we know
a:=NEWTC_CosetEnumerator(FreeGeneratorsOfFpGroup(a),RelatorsOfFpGroup(a),
List(b,UnderlyingElement), true, false : cyclic := true,
limit := 50000 );
if NEWTC_CyclicSubgroupOrder(a)=1 then
AddSet(excl[i],j);
AddSet(s[i][1],j);
fi;
fi;
fi;
fi;
Expand Down
7 changes: 7 additions & 0 deletions tst/testbugfix/2018-12-17-gquotient.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# reported by Giles Gardam. The code for eliminating element orders can run astray if
# a quotent by a generator power is cyclic, but also has cyclic subgroups of infinite
# index.
gap> F := FreeGroup("a", "b", "c");;
gap> G := F/ParseRelators(F,"a2b5a2b2C2,a5c3B2");;
gap> Length(GQuotients(G,AlternatingGroup(5)));
1

0 comments on commit 7a4b171

Please sign in to comment.