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
PARI and Singular can't handle all polynomial resultants #15061
Comments
comment:2
There's something wrong with the patch because of some whitespace issues. I'll fix this soon. |
comment:4
I noticed that this problem is also solved by #15601, which implements conversion to PARI for power series with infinite precision by converting them to polynomials. There are probably other base rings that cannot be converted to PARI, so using |
comment:6
My changes from #16014 comment:2 make |
comment:7
Replying to @pjbruin:
Does this help, even though it's singular here and not pari? |
comment:8
Replying to @gagern:
This example still fails with the patch applied. There seems to be a different problem here, namely that the class of that polynomial inherits from |
comment:9
Replying to @pjbruin:
|
comment:10
Replying to @gagern:
That commit only changed the order of the superclasses; the inheritance was there before.
I agree that it is strange for polynomials over arbitrary fields to inherit from that class. An alternative would be to "manually" prescribe this inheritance for polynomials over fields that support conversion to Singular, but that doesn't sound very attractive. Another alternative would be to move |
comment:11
Replying to @pjbruin:
Thanks, I missed that fact.
I see how the constructor of PolynomialRing_field checks for singular support and sets the
Sounds good. As a first step, we could change Polynomial_singular_repr to check |
comment:12
I think I have found a solution that will solve most of these problems. In this branch:
|
Author: Robert Harron, Peter Bruin |
Commit: |
Branch: u/pbruin/15061-resultant |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
Judging from the timestamps, your system clock is wrong. Apart from that, I like the code, from what I can tell at first glance. Thanks! Will pull and run tests soon. |
comment:15
Replying to @gagern:
I know, but it is a system that I am not the administrator of.
OK, thanks! |
comment:16
All tests in |
comment:17
Replying to @gagern:
You can probably judge yourself if you have done the things suggested in "Reviewing Patches" in the developer guide. (Note in particular that you are supposed to run all doctests; things can really break in unexpected places.) |
comment:18
Replying to @pjbruin:
I wonder whether the docs for
Did so, and found #16285 in the process. But that's reproducible without your change, so not your fault. Shouldn't running the testsuite be handled by patchbot? Or hasn't that been migrated to the git workflow yet? |
Reviewer: Martin von Gagern |
comment:19
Replying to @gagern:
It has, but not enough people are running patchbots, and I think there are also some glitches that sometimes prevent it from doing its job. |
Changed branch from u/pbruin/15061-resultant to |
Consider the following:
In particular, sage is incapable of computing the discriminant of this quadratic polynomial! I'll shortly post a patch that catches this error and uses the sylvester matrix instead.
Component: algebra
Keywords: pari, resultant, sylvester matrix
Author: Robert Harron, Peter Bruin
Branch/Commit:
51523b1
Reviewer: Martin von Gagern
Issue created by migration from https://trac.sagemath.org/ticket/15061
The text was updated successfully, but these errors were encountered: