Skip to content

Commit

Permalink
FIX: MTX will do better work in deleting superfluous generators.
Browse files Browse the repository at this point in the history
This resolves #4406
  • Loading branch information
hulpke committed Apr 16, 2021
1 parent b435ff1 commit 9ade12b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/ghomfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ local aug,w,p,pres,f,fam,G,trace;

pres:=NEWTC_PresentationMTC(aug,0,nam);
fi;
Assert(0,Length(GeneratorsOfPresentation(pres))=Length(gens));
# check that we have the exat generators as we want and no rearrangement
# or so happened.
Assert(0,Length(GeneratorsOfPresentation(pres))=Length(gens)
and pres!.primarywords=[1..Length(gens)]);

# new free group
f:=FpGroupPresentation(pres);
Expand Down
6 changes: 5 additions & 1 deletion lib/sgpres.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3585,12 +3585,16 @@ local DATA,rels,i,j,w,f,r,s,fam,new,ri,a,offset,p,rset,re,start,stack,pres,
od;
r:=AssocWordByLetterRep(fam,Concatenation(r,[-i]));
AddRelator(pres,r);
TzSearch(pres);
#TzSearch(pres); Do *not* search, as this might kill the relator we
#just added.
TzEliminate(pres,i);
od;
Assert(1,Length(GeneratorsOfPresentation(pres))=subnum);

fi;
r:=List(GeneratorsOfPresentation(pres){[1..subnum]},
x->LetterRepAssocWord(x)[1]);
pres!.primarywords:=r;
r:=List(GeneratorsOfPresentation(pres){
[subnum+1..Length(GeneratorsOfPresentation(pres))]},
x->LetterRepAssocWord(x)[1]);
Expand Down

0 comments on commit 9ade12b

Please sign in to comment.