-
-
Notifications
You must be signed in to change notification settings - Fork 660
Fix hashing for Weyl algebra elements #38119
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
Conversation
Documentation preview for this PR (built with commit 12162b2; changes) is ready! 🎉 |
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.
The _richcmp_
and __init__
are no longer needed as it will be inherited from IndexedFreeModuleElement
. Please keep the doctests somewhere though.
These methods are also unnecessary but can simply be removed: _add_
, __neg__
, monomial_coefficients
, support
,
Please add a test showing the left and right multiplication of the Weyl algebra by the corresponding polynomial ring generates the correct results. I am slightly worried about the _acted_upon_
versus _lmul_
and _rmul_
not being compatible...
Good points. All done -- except for the doctests, which already exist. |
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.
Okay, thanks. Then let's get this in.
Thank you, Travis! |
sagemathgh-38119: Fix hashing for Weyl algebra elements Weyl algebras elements cannot be hashed or compared, since the element class is too barren. This patch lets the element class inherit from IndexedFreeModuleElement, which fixes this problem automatically. URL: sagemath#38119 Reported by: Darij Grinberg Reviewer(s): Travis Scrimshaw
sagemathgh-38119: Fix hashing for Weyl algebra elements Weyl algebras elements cannot be hashed or compared, since the element class is too barren. This patch lets the element class inherit from IndexedFreeModuleElement, which fixes this problem automatically. URL: sagemath#38119 Reported by: Darij Grinberg Reviewer(s): Travis Scrimshaw
sagemathgh-38119: Fix hashing for Weyl algebra elements Weyl algebras elements cannot be hashed or compared, since the element class is too barren. This patch lets the element class inherit from IndexedFreeModuleElement, which fixes this problem automatically. URL: sagemath#38119 Reported by: Darij Grinberg Reviewer(s): Travis Scrimshaw
Weyl algebras elements cannot be hashed or compared, since the element class is too barren.
This patch lets the element class inherit from IndexedFreeModuleElement, which fixes this problem automatically.