Skip to content

Commit

Permalink
Fix corner case in modified Todd-Coxeter when relator is trivial
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Pfeiffer committed Feb 20, 2019
1 parent 08109a0 commit ce0ad33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/sgpres.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,7 @@ local m,offset,rels,ri,ccr,i,r,ct,A,a,w,n,DATA,p,ds,dr,
fi;
offset:=m+1;
rels:=ShallowCopy(freerels);
rels:=Filtered(freerels, x -> Length(x) > 0);
SortBy(rels,Length);
ri:=Union(rels,List(rels,x->x^-1));
ri:=List(ri,LetterRepAssocWord);
Expand Down
5 changes: 5 additions & 0 deletions tst/testbugfix/2019-02-19-cornercase-mtc.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gap> F := FreeGroup(1);;
gap> rels := [F.1^2, One(F)];;
gap> G := F / rels;;
gap> Order(G);
2

0 comments on commit ce0ad33

Please sign in to comment.