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
GCD for univariate polynomials over fraction fields #23909
Comments
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
This change breaks many gcd computations that now work. For example
When Moreover, the result of |
Changed branch from u/mfrancis/fraction_field_univariate to u/mfrancis/fraction_field_univariatepoly |
comment:5
Made the changes : 1. Corrected it for Z, finite fields ( fields defined as Z mod p call the previous implementation, the usual Euclidean algorithm), and the returned gcd is the same ring as the input polynomials. New commits:
|
comment:7
The documentation is badly misformatted. See http://doc.sagemath.org/html/en/developer/coding_basics.html#documentation-strings And this is completely unreadable:
|
Changed author from MARIA FRANCIS to Maria Francis, Marc Mezzarobba |
comment:8
Hi Maria, As it turns out, most of the necessary work had already been done in the implementation of (Sorry that it took me so incredibly long to have a stab at this as promised!) New commits:
|
Changed branch from u/mfrancis/fraction_field_univariatepoly to u/mmezzarobba/23909-gcd_over_fraction_fields |
comment:9
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Dependencies: #25233 |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:17
See also #25318 for an additional improvement. |
comment:18
As far as I can tell, the last two patchbot failures are not related to this ticket—i.e. the tests still pass with sage-8.3.beta3. |
comment:20
Looks good to me, except the docstring. Could you add a short description? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
Replying to @bgrenet:
Done, thanks for your commment! |
comment:24
Reviewer name is missing |
Reviewer: Bruno Grenet |
Changed branch from u/mmezzarobba/23909-gcd_over_fraction_fields to |
Some of the sagemath packages we use requires us to compute the GCD of univariate polynomials whose coefficient ring is the fraction field of multivariate polynomials over integral domains like Z, e.g: polynomials in the ring Frac(Z[x,y])[z].
Right now in Sagemath if we run the following example, the regular Euclidean algorithm implemented in rings.py for computing gcd is called. It is very slow and the implementation hangs for degrees >4.
Example :
sage: A.<x,y>=ZZ[]
sage: B= Frac(A)
sage: C. = B[]
sage: p = C.random_element(6)
sage: q = C.random_element(6)
sage: gcd(p,q)
Hangs!
Reason for the function to hang : It repeatedly has to call the multiplication function which calls the gcd function in multi_polynomial_libsingular.pyx and therefore is slow.
Proposed Change: Add a new function _gcd_univariate_polynomial() inside the class, class FractionField_generic(ring.Field). It can be found in /src/sage/rings/fraction_field.py.
Depends on #25233
CC: @mezzarobba
Component: algebra
Keywords: gcd, univariate polynomials, fraction fields as coefficients
Author: Maria Francis, Marc Mezzarobba
Branch/Commit:
2bf9251
Reviewer: Bruno Grenet
Issue created by migration from https://trac.sagemath.org/ticket/23909
The text was updated successfully, but these errors were encountered: