Repository navigation
Use libgap for permutation-group socles - #43008
Merged
Merged
Conversation
|
Documentation preview for this PR (built with commit 88dfcba; changes) is ready! 🎉 |
dimpase
force-pushed
the
fix/libgap-socle-crisp
branch
from
October 18, 2026 15:57
6c69bd6 to
88dfcba
Compare
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Oct 18, 2026
sagemathgh-43008: Use libgap for permutation-group socles `PermutationGroup_generic.socle()` still computes through the pexpect GAP interface. Use the existing libgap group instead, preserving the ambient group and its domain. This is another step toward sagemath#26902. A direct replacement exposes [CRISP issue 16](bh11/crisp#16): with CRISP 1.4.11 loaded, taking the socle twice for `SymmetricGroup(4)` fails with a missing `EANormalSeriesByPcgs` method. The old interface masks this by reconstructing the group. Compute and cache `IsElementaryAbelian()` before calling `Socle()`, allowing GAP's elementary-abelian method to handle the resulting Klein four-group. The code comment links the upstream issue. The existing repeated-socle example covers that failure when CRISP is loaded. Additional doctests forbid the old `_gap_()` conversion and check nonstandard domains, the ambient group, normality, repeated socles, and the trivial group. The displayed generator order changes to the order returned by libgap. Validation on macOS with GAP 4.16.1 and CRISP 1.4.11: - All 1,044 doctests in `permgroup.py` pass with `--serial --long --optional=sage,gap_package_hap`. - Separate probes check socle orders, normality, ambient groups, domains, and two repeated socles for 17 groups, with CRISP loaded and pexpect GAP startup disabled. All pass with this change. Omitting the property call reproduces the upstream error for S4, A4, and S4 on a nonstandard domain; the original implementation fails the no-pexpect check. - Ruff passes with both repository CI configurations; `git diff --check` passes. Local tests load the edited Python module over the installed Sage native libraries; CI will validate the full source build. ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies None. URL: sagemath#43008 Reported by: Dima Pasechnik Reviewer(s):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PermutationGroup_generic.socle()still computes through the pexpect GAP interface. Use the existing libgap group instead, preserving the ambient group and its domain. This is another step toward #26902.A direct replacement exposes CRISP issue 16: with CRISP 1.4.11 loaded, taking the socle twice for
SymmetricGroup(4)fails with a missingEANormalSeriesByPcgsmethod. The old interface masks this by reconstructing the group. Compute and cacheIsElementaryAbelian()before callingSocle(), allowing GAP's elementary-abelian method to handle the resulting Klein four-group. The code comment links the upstream issue.The existing repeated-socle example covers that failure when CRISP is loaded. Additional doctests forbid the old
_gap_()conversion and check nonstandard domains, the ambient group, normality, repeated socles, and the trivial group. The displayed generator order changes to the order returned by libgap.Validation on macOS with GAP 4.16.1 and CRISP 1.4.11:
permgroup.pypass with--serial --long --optional=sage,gap_package_hap.git diff --checkpasses.Local tests load the edited Python module over the installed Sage native libraries; CI will validate the full source build.
📝 Checklist
⌛ Dependencies
None.