gap-system / gap

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
https://www.gap-system.org
GNU General Public License v2.0
815 stars 161 forks source link

fix a mutability inconsistency of `ExtRepOfObj` values of objects in `IsLetterAssocWordRep` #5802

Closed ThomasBreuer closed 2 months ago

ThomasBreuer commented 2 months ago

Up to now, we get

gap> f:= FreeGroup(IsLetterWordsFamily,4);;
gap> IsMutable(ExtRepOfObj(f.1));
true
gap> IsMutable(ExtRepOfObj(f.1));
false

The point is that an immutable version of the result gets cached after the first call, and this cached version is used in the second call. With the proposed change, also the first result is already immutable.

fingolfin commented 2 months ago

This promptly broke the test suites in semigroups (ping @james-d-mitchell) and groupoids (ping @cdwensley). At least that is how I interpret the test failures for groupoids and semigroups.

james-d-mitchell commented 2 months ago

@fingolfin interesting, this should be easy enough to fix, will try to do it today.

cdwensley commented 2 months ago

@fingolfin: groupoids fixed - version 1.76 released