diff --git a/lib/ghomfp.gi b/lib/ghomfp.gi index 62c50556d1..8c71b51eb1 100644 --- a/lib/ghomfp.gi +++ b/lib/ghomfp.gi @@ -858,17 +858,17 @@ local aug,w,p,pres,f,fam,G; w:=FamilyObj(u)!.wholeGroup; aug:=NEWTC_CosetEnumerator(FreeGeneratorsOfFpGroup(w), RelatorsOfFpGroup(w), - List(GeneratorsOfGroup(u),UnderlyingElement), + List(gens,UnderlyingElement), true); - pres:=NEWTC_PresentationMTC(aug,1,"%"); + pres:=NEWTC_PresentationMTC(aug,1,nam); if Length(GeneratorsOfPresentation(pres))>Length(gens) then aug:=NEWTC_CosetEnumerator(FreeGeneratorsOfFpGroup(w), RelatorsOfFpGroup(w), - List(GeneratorsOfGroup(u),UnderlyingElement), + List(gens,UnderlyingElement), true,false); - pres:=NEWTC_PresentationMTC(aug,0,"%"); + pres:=NEWTC_PresentationMTC(aug,0,nam); fi; Assert(0,Length(GeneratorsOfPresentation(pres))=Length(gens)); diff --git a/lib/sgpres.gi b/lib/sgpres.gi index 2866fc8976..22f93b5ae3 100644 --- a/lib/sgpres.gi +++ b/lib/sgpres.gi @@ -2731,7 +2731,7 @@ local c,offset,f,b,r,i,j; r:=Length(w); f:=alpha;i:=1; b:=alpha;j:=r; - while true do + while i<=j do # forward scan while i<=r and c[w[i]+offset][f]<>0 do f:=c[w[i]+offset][f]; @@ -2750,12 +2750,14 @@ local c,offset,f,b,r,i,j; j:=j-1; od; if j0 do if DATA.useAddition then @@ -2817,6 +2819,7 @@ local c,offset,f,b,r,i,j,fp,bp; DATA.aug[-w[i]+offset][b]:=WordProductLetterRep(-Reversed(bp),fp); fi; Add(DATA.deductions,[f,w[i]]); + return; else NEWTC_Define(DATA,f,w[i]); fi; @@ -2966,6 +2969,7 @@ local m,offset,rels,ri,ccr,i,r,ct,A,a,w,n,DATA,p,ds,dr, NEWTC_ScanAndFill(DATA,1,DATA.subgword[w]); fi; od; + NEWTC_ProcessDeductions(DATA); # words we want to trace early (as they might reduce the number of @@ -3383,6 +3387,8 @@ local DATA,rels,i,j,w,f,r,s,fam,new,ri,a,offset,p,rset,re,start,stack,pres, CompletionBar(InfoFpGroup,2,"Coset Loop: ",i/DATA.n); for w in DATA.rels do r:=NEWTC_Rewrite(DATA,i,w); + MakeCanonical(r); + # reduce with others for j in rels do r:=NEWTC_ReplacedStringCyclic(r,j); @@ -3488,7 +3494,7 @@ local DATA,rels,i,j,w,f,r,s,fam,new,ri,a,offset,p,rset,re,start,stack,pres, TzSearch(pres); TzEliminate(pres,i); od; - Assert(1,Length(GeneratorsOfPresentation)=subnum); + Assert(1,Length(GeneratorsOfPresentation(pres))=subnum); fi; r:=List(GeneratorsOfPresentation(pres){ diff --git a/tst/teststandard/bugfix.tst b/tst/teststandard/bugfix.tst index 57f32692ba..ddc6472025 100644 --- a/tst/teststandard/bugfix.tst +++ b/tst/teststandard/bugfix.tst @@ -3135,6 +3135,17 @@ gap> rels:=[x_1^2+x_2,x_1*x_2+x_3,x_1*x_3+x_4, x_1*x_4+x_1,x_2^2+x_4, gap> Size(r1/Ideal(r1,rels)); 32 +# 2016/8/18 (AH) +gap> src := FreeGroup(3);; +gap> src := src / [src.3*src.1];; +gap> SetReducedMultiplication(src); +gap> f1:=src.1;;f2:=src.2;;f3:=src.3;; +gap> gens := [ f1, f2, f2^-1*f3*f2 ];; +gap> fp := IsomorphismFpGroupByGeneratorsNC(src,gens,"F");; +gap> dst := Image(fp);;wrd:=RelatorsOfFpGroup(dst)[1];; +gap> m:=MappedWord(wrd,GeneratorsOfGroup(FreeGroupOfFpGroup(dst)),gens); + + ############################################################################# gap> STOP_TEST( "bugfix.tst", 831990000);