-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
use libGAP in MatrixGroup.as_permutation_group() #26889
Comments
Commit: |
comment:2
The following example which worked with the former version, is causing a string buffer overflow, right now:
My suggestion to avoid this can be seen from the following diff: diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py
index 2f5241f..4052740 100644
--- a/src/sage/groups/matrix_gps/finitely_generated.py
+++ b/src/sage/groups/matrix_gps/finitely_generated.py
@@ -613,11 +613,13 @@ class FinitelyGeneratedMatrixGroup_gap(MatrixGroup_gap):
iso=self._libgap_().IsomorphismPermGroup()
if algorithm == "smaller":
iso=iso.Image().SmallerDegreePermutationRepresentation()
- PG = PermutationGroup(map(gap, iso.Image().GeneratorsOfGroup()), \
+ PG = PermutationGroup(iso.Image().GeneratorsOfGroup().sage(), \
canonicalize=False) # applying gap() - as PermutationGroup is not libGAP
def permutation_group_map(element):
- return iso.ImageElm(element.gap())._gap_()
+ return PG(iso.ImageElm(element.gap()).sage())
from sage.categories.homset import Hom
self._permutation_group_morphism = Hom(self, PG)(permutation_group_map)
|
Reviewer: Sebastian Oehms |
comment:4
the last 2 commits add this fix, the corresponding Sp(6,3) example, and also trims the code following pyflake plugin bot hints. |
comment:5
Coming back to my last question in comment 15 of #25706: The aim of that question is the following: What does prevent us to move |
comment:6
Replying to @soehms:
I don't know. If you can get something converging towards removing pexpect gap here, it would be great. |
Changed branch from u/dimpase/groups/better_as_permutation to |
comment:8
This tickets were closed as fixed after the Sage 8.5 release. |
comment:9
This is breaking some doctests under python3 in the |
Changed commit from |
comment:10
There aren't any obvious Python 3-isms in this patch so if that's true that really speaks to the fragility of this code; it looks like it needs quite a bit more cleaning up in general. Please open a new ticket. |
comment:11
traceback:
|
Currently, one uses pexpect interface there to convert a libGAP matrix group to strings, feed it to GAP's pexpect interface, etc.
This ticket will streamline this. One still will need one conversion to pexpect GAP, at the end, to feed it to PermutationGroup().
Component: group theory
Author: Dima Pasechnik
Branch:
7dd5fa6
Reviewer: Sebastian Oehms
Issue created by migration from https://trac.sagemath.org/ticket/26889
The text was updated successfully, but these errors were encountered: