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
some elliptic curve functions over number fields fail over relative fields #14472
Comments
comment:1
Note: after changing ZK.degree() to ZK.absolute_degree() on line 651 of |
comment:2
Replying to @JohnCremona:
Follow-up: the old code for _reduce_model() was flawed, as follows: to reduce a1,a2,a3 modulo 2,3,2 respectively, it attempted to reduce their coordinates as given by list(a1), etc. Firstly this fails for relative extensions, but it is also misguided since there is no reason why the list() coordinates should be integral. I have changed this to work with the coordinates with respect to an integral basis, which is good for relative extensions. Only one small problem: the doctest on line 860 which used to return (as a minimal model over Q(a) where a=sqrt(5))
but now gives
which does not look so nice. Note that the integral basis here is [1/2a + 1/2, a] and that with respect to this basis 1 has coordinates (2,-1) while -3/2a - 1/2 has coordinates (-1,-1) so (counterintuitively) 1 is not reduced mod 2 but -(3a+1)/2 is! Note that the integral basis computed does depend on the polynomial used to generate the field:
|
Applies to 5.9.beta5 |
comment:3
Attachment: trac_14472-elliptic_curves.patch.gz |
Author: John Cremona |
comment:4
All the examples seem to be quadratic number fields, is this intentional? I don't know why Sage returns the basis of
As for reducing an element modulo an ideal (which is what you do here), you could use PARI's |
comment:5
Replying to @jdemeyer:
No, probably just laziness.
Well spotted. The integral_basis method calls maximal_order which does call _pari_integral_basis, but then applies some Order constructor to the generators (order.absolute_order_from_module_generators) which is where this non-canonical ( to my mind) basis comes from. If that is to be chaned for quadratic fields then that would be a separate ticket, and would surely have a lot of doctest output consequences.
Sure, but here we are only reducing modulo (2) or (3) so it seemed easier to do it manually. |
Reviewer: Jeroen Demeyer |
comment:6
I made a new patch using PARI's |
This comment has been minimized.
This comment has been minimized.
comment:8
Replying to @jdemeyer: |
comment:9
Replying to @JohnCremona:
Sorry, I don't understand what you mean. Can you say more precisely what is wrong? |
comment:10
Sorry, I think I misunderstood the output of nfeltdiveuc. I see now that it gives the quotient, not the remainder, and that is correct. So it is good. I am testing -- so why does it need work? Also, I am getting an warning that line 9821 in sage.libs.pari.gen.pyx is unreachable code. Does tat need looking into? |
comment:12
Attachment: trac_14472-elliptic_curves_jd.patch.gz Replying to @JohnCremona:
That has nothing to do with this ticket, but I fixed it anyway. |
comment:13
John, do you want to formally review my patch? I give positive review to the parts which were copied from your initial patch. |
Changed reviewer from Jeroen Demeyer to Jeroen Demeyer, John Cremona |
Changed author from John Cremona to John Cremona, Jeroen Demeyer |
comment:14
I give positive review to the parts which Jeroen added, hance we have an overall positive review. |
Merged: sage-5.10.beta1 |
This was reported by Alejandro Argaez:
The error is that the degree() function is called on the ring of integers of a relative number field.
In fixing this bug (which should be easy) it would be a good idea to add relative examples to as many functions as possible in
ell_numberfield.py
apply attachment: trac_14472-elliptic_curves_jd.patch
CC: alejandroargaez@hotmail.com
Component: elliptic curves
Keywords: elliptic curve relative number field
Author: John Cremona, Jeroen Demeyer
Reviewer: Jeroen Demeyer, John Cremona
Merged: sage-5.10.beta1
Issue created by migration from https://trac.sagemath.org/ticket/14472
The text was updated successfully, but these errors were encountered: