-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
Unable to compute discriminant of a multivariate polynomial over the symbolic ring #39350
Comments
SR is not commutative (it's not actually even a ring), so perhaps we should just raise an meaningful exception, instead of trying to compute the discriminant of such a polynomial. However, it does seem like it would be better to give an answer in cases where the discriminant makes sense (and is easy to find). The definition of the discriminant is a certain determinant, divided by the leading coefficient. This means that division is involved in the calculation, so it's not surprising that a nontrivial denominator arises. Theoretically, the denominator can be cleared by simplifying the fraction, but the code is written for polynomials over a ring, not SR, so I wouldn't expect it to call something like There are formulas for the discriminant of low-degree polynomials, but wikipedia says that there are already over 200 terms in the formula for degree 6. So it also may not be worth the trouble to implement these formulas in order to be able to handle small cases. |
@DaveWitteMorris: I do not quite follow why |
Also, discriminant over
|
A demonstration that SR is not commutative:
The last two are not equal, so SR is not commutative. "Discriminant" is a concept from commutative algebra. I am not aware of any definition of discriminant for polynomials over a noncommutative ring. The discriminant needs to be in the base ring of the polynomial ring, but the multivariable routine does the calculations in the fraction field of the base ring. In your example, I think it fails to convert the result back into the base ring because the denominator is not 1. That's why being able to do the division is important. It's not really true that "discriminant over SR for univariate polynomials works fine":
The discriminant of this polynomial does not exist, since the coefficients do not commute. The documentation may not make this clear, but users should be told that serious calculations with polynomials should be done in a polynomial ring, not the symbolic ring. |
@DaveWitteMorris: Thanks for clarifying. I agree that discriminant over |
Steps To Reproduce
We have
but
Expected Behavior
The second example should work similarly to the first one.
Actual Behavior
The produced error looks weird. Why would the simple formula for discriminant care about denominators at first place?
Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: