-
Notifications
You must be signed in to change notification settings - Fork 129
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
Comparison of polynomials from different rings throws inconsistently #4107
Comparison of polynomials from different rings throws inconsistently #4107
Comments
Some background: In the cases with an error printed, the types of both arguments are equal, but the parents are not. |
Let's discuss the possible fix in Nemocas/AbstractAlgebra.jl#1800 in triage. |
It seems that there are cases where we would want an error rather than false when the parents are not |
arguably, always throwing an error might be preferable. |
In my personal experience (which of course may differ from what others experience) is that if I compare two polynomials from different rings, then this is always a user error (i.e., mine). In that situation a helpful error message that suggests what's wrong for me is preferable to getting a result that may confuse me (i.e. think of That said, perhaps people have concrete examples in mind were it is helpful to be allowed to compared polynomials with different parents directly. In that case it'd be great to learn about them here. |
Describe the bug
When comparing polynomials from different rings I get inconsistent behaviour. Sometimes I just get
false
and sometimes an error.To Reproduce
Expected behavior
We have many places where we first compare the "surrounding space" before comparing the actual objects. So I would expect an error to get thrown. E.g. try
Additional context
Maybe this needs a styleguide entry, I actually did not look it up.
The text was updated successfully, but these errors were encountered: