-
-
Notifications
You must be signed in to change notification settings - Fork 594
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. |
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? |
dbd9c9f
to
9eb3f7b
Compare
@fchapoton @dimpase, any further suggestions for revisions? |
docs don't build - please fix |
9eb3f7b
to
336fe68
Compare
@dimpase fixed that |
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
336fe68
to
c4e7619
Compare
@dimpase in the failing doctest, the sequences are different but they are effectively representing the same group element, should i change the doctest? |
Which one, can you point its location in the Sage file? E.g. if the output is |
okay, just wanted to confirm any other feedback, or does it look good? |
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