Skip to content

Infinite recursion between ElementaryAbelianSeries and PcgsElementaryAbelianSeries #6508

Description

@fingolfin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions