Needs a GAP started with --bare, or otherwise without SmallGrp: with SmallGrp loaded, IsomorphismGroups shortcuts via IdGroup and never reaches the offending code. That is why this surfaced only while testing packages without the group libraries (gap-system/PackageDistro#1183, #2434).
GAP 4.17dev, 104ccfa9aa, started as gap --bare:
LoadPackage("circle");;
LoadPackage("laguna");;
FG := GroupRing( GF(2), DihedralGroup(8) );;
G := AdjointGroup( AugmentationIdeal( FG ) );;
IsomorphismGroups( G, Units( FG ) );
# Error, recursion depth trap (5000)
PcgsElementaryAbelianSeries and ElementaryAbelianSeries call each other, and neither returns, so neither attribute is ever cached:
reached via
IsomorphismGroups → Morphium → MorRatClasses → RationalClasses
→ Centralizer → CentralizerSolvableGroup → PcgsElementaryAbelianSeries
The group at that point has order 128, is solvable and has CanEasilyComputePcgs, but is neither a pc group nor a permutation group — both of which have PcgsElementaryAbelianSeries methods that avoid the generic one.
I did not manage to reduce this to a package-free example: matrix and automorphism groups, the obvious generic candidates, have CanEasilyComputePcgs = false.
#6503 converts this CentralizerSolvableGroup call site to PcgsElementaryAbelianSeriesInfo, whose method calls PcgsElementaryAbelianSeries — so it inherits the recursion rather than fixing it.
AI disclosure: diagnosed with the help of Claude Code (Claude Opus 5); reviewed by me.
Needs a GAP started with
--bare, or otherwise without SmallGrp: with SmallGrp loaded,IsomorphismGroupsshortcuts viaIdGroupand never reaches the offending code. That is why this surfaced only while testing packages without the group libraries (gap-system/PackageDistro#1183, #2434).GAP 4.17dev,
104ccfa9aa, started asgap --bare:PcgsElementaryAbelianSeriesandElementaryAbelianSeriescall each other, and neither returns, so neither attribute is ever cached:PcgsElementaryAbelianSeries, generic method, lib/pcgs.gi:1697 callsElementaryAbelianSeriesLargeStepsDoEASLS, lib/grp.gi:1492 callsElementaryAbelianSeriesCanEasilyComputePcgsmethod, lib/grppcatr.gi:123 callsPcgsElementaryAbelianSeriesreached via
The group at that point has order 128, is solvable and has
CanEasilyComputePcgs, but is neither a pc group nor a permutation group — both of which havePcgsElementaryAbelianSeriesmethods that avoid the generic one.I did not manage to reduce this to a package-free example: matrix and automorphism groups, the obvious generic candidates, have
CanEasilyComputePcgs = false.#6503 converts this
CentralizerSolvableGroupcall site toPcgsElementaryAbelianSeriesInfo, whose method callsPcgsElementaryAbelianSeries— so it inherits the recursion rather than fixing it.AI disclosure: diagnosed with the help of Claude Code (Claude Opus 5); reviewed by me.