-
-
Notifications
You must be signed in to change notification settings - Fork 697
Prevent order mismatch in words function #41197
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
base: develop
Are you sure you want to change the base?
Conversation
Updated error handling for morphism composition to provide clearer messages regarding codomain and domain compatibility.
Refactor composition validation logic in morphism.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
src/sage/combinat/words/morphism.py:893
- This method raises ValueError - should raise an ArithmeticError or return NotImplemented instead.
This method raises ValueError - should raise an ArithmeticError or return NotImplemented instead.
This method raises ValueError - should raise an ArithmeticError or return NotImplemented instead.
def __mul__(self, other):
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Clarify error message for morphism order mismatch.
Updated error messages to provide clearer feedback when the codomain alphabet is not included in the domain alphabet with the correct ordering.
|
We should put the _is_alphabet_included_with_order logic in this or the alphabet file? |
Updated error handling for morphism composition to provide clearer messages regarding codomain and domain compatibility.
Fix #40391
I think it may be strict in mathematical definition. But it is useful to prevent order mismatch. to get some error results in this issue.
And for
Words("ab"), we thinkb>a, forWords("ba"), we thinka>b, so they are different order in sage's words system.We prevent words order mismatch behavior to output some mathematical incorrect output
📝 Checklist
⌛ Dependencies