-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Corrected word_problem parsing and added algorithm option #39820
base: develop
Are you sure you want to change the base?
Corrected word_problem parsing and added algorithm option #39820
Conversation
Hello, @dimpase @fchapoton Can you please review this, and give feedback about the fix. |
there is a CI error: |
45a52de
to
63cb1ec
Compare
made the necessary changes, |
It looks like some CI checks are failing in unrelated files (linear_code.py, polynomial_element.pyx) with timeouts/cysignal errors, and there's also a Docker image pull error. These seem unrelated to the changes in permgroup_element.pyx, as local tests for that file pass? |
63cb1ec
to
dbd9c9f
Compare
made the change |
Why are some tests failing? Have I done any mistake in the implementation? |
This replaces the fragile string parsing in PermutationGroupElement.word_problem with a stable method using GAP's syllable functions (NumberSyllables, GeneratorSyllable, ExponentSyllable). This resolves parsing errors involving parentheses and generator name conflicts (e.g., x10 vs x1). Introduces an 'algorithm' parameter: - 'syllable' (Now default): Returns 1-based generator indices when as_list=True. - 'legacy': Old implementation, preserved for testing but deprecated due to known bugs. Returns generator strings when as_list=True. Updated docstrings and examples accordingly. Fixes sagemath#36419 Related: sagemath#28556
dbd9c9f
to
9eb3f7b
Compare
@fchapoton @dimpase, any further suggestions for revisions? |
docs don't build - please fix |
This replaces the fragile string parsing in PermutationGroupElement.word_problem with a stable method using GAP's syllable functions (NumberSyllables, GeneratorSyllable, ExponentSyllable). This resolves parsing errors involving parentheses and generator name conflicts (e.g., x10 vs x1).
Introduces an 'algorithm' parameter:
Updated docstrings and examples accordingly.
Fixes #36419
Also #37042 is taken care of
Related: #28556
📝 Checklist
⌛ Dependencies