Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing of certain words in free groups (if subexpressions occur as powers iteratedly then nonsense could be displayed, but the data internally was correct) #3847

Merged
merged 2 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/wordrep.gi
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ local a,n,t,
or (IsInt(PRINTWORDPOWERS) and Length(l)<PRINTWORDPOWERS)) and
ValueOption("printnopowers")<>true then
if Length(l)>0 and n=infinity then
n:=2*(AbsInt(Maximum(l))+1);
n:=2*(Maximum(List(l,AbsInt))+1);
fi;
a:=FindSubstringPowers(l,n);
a:=FindSubstringPowers(l,n+Length(tseed)); # tseed numbers are used already
else
a:=[l,[]];
fi;
Expand Down
4 changes: 4 additions & 0 deletions tst/testbugfix/2020-01-13-wordprint.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Assoc. word printing, #3845
gap> f:=FreeGroup("x","y");;x:=f.1;;y:=f.2;;
gap> y^4*(y^2*(y*x)^2)^2*y^-7*x*y^16;
y^4*(y^2*(y*x)^2)^2*y^-7*x*y^16