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
there is a serious bug in the documentation or code for is_surjective for Galois representations attached to elliptic curves #11271
Comments
comment:1
A relevant email from another David:
|
comment:2
That was pretty illegible. Let me try again: "Professor Stein, In relation to your recently-opened ticket about Sage's elliptic curve galois representation code (#11271): not only is is_surjective's docstring wrong, but non_surjective()'s docstring is also wrong. It says the function can be inconclusive at 2, but in fact it calls is_surjective(), which is always right at 2 and 3 since it determines the size of the Galois group of the p-division polynomial. Probably someone wrote that before the special cases for 2 and 3 in is_surjective() had been implemented. I don't yet have a trac account to report this, or I would've just opened a ticket. (I've requested an account.) But since you opened the ticket, I thought you might like to know of this bug as well. Also, regarding the other ticket (implementing the algorithm in Zywina's paper): I've already written code that takes care of some (easy) cases in the paper, and is pretty fast compared to the existing is_surjective. (Specifically, just checking for surjectivity mod 8, 9 by first checking mod 2, 4, 3 in appropriate cases with a view to determining whether a curve is a Serre curve.) If you haven't already written it, I can clean it up and send it to you. I'm also willing to help further. -David Pathakjee " |
comment:3
Not long after writing that, I was able to get a trac account and reported this as #11276. Replying to @williamstein:
|
Branch: u/wuthrich/ticket/11271 |
Author: Chris Wuthrich |
Commit: |
comment:6
Finally !! I corrected this. So I decided to change the code. It now returns True False or None, depending if the algorithm can prove that it is surjective, can prove that it is not or if it is indecisive. I think this is more useful than the previous version. Of course, I also altered the documentation to make sure the issue with 2 and 3 is correctly stated. As discussed above. After this ticket a natural step would be to implement Zywina's bounds and criterions in his paper. I have tried so and that is documented on the ticket #12270 and should not concern this ticket any more. The ticket #11276 should be closed as a duplicate. New commits:
|
comment:7
Reviewer's comments (not only on the proposed changes, sorry):
I don't know how to make a data field read-only, so I think the way to do this is to return copy(E) in the function elliptic_curve().
Of course it is not clear what the output should be here. We could follow the LMFDB route (see http://www.lmfdb.org/EllipticCurve/Q/27.a3) and only list the primes up to 37, with proper documentation of course. Otherwise we could try to be too clever and return (in that example) [3, Mod(1,3)]. More comments to follow -- I don't trust trac not to lose all thet I have written so far... |
comment:8
[Continued]
Otherwise, i.e. all that you actually did for this ticket, fine. So if I make this "needs work" please don't be angry! |
comment:9
I am certainly not angry, but thankful for your work. I don't understand 4). Being reducible for the Galois module E[p] is equivalent to E having an isogeny defined over Q and so the answer is ok in all cases, including cm and including 27a. Did you get confused with non_surjective. There is should return [0] as documented.
I'd proof-read the documentation as well as I can. |
comment:10
OK.
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Replying to @categorie:
Sorry, just a stupid mistake on my part.
OK, good.
I don't know of a rule, but one has to be careful. Similarly, elliptic curves used to cache their a-invariants as a list and return them which meant that they could be changed; to avoid that the invariants are cached as a tuple which is immutable. But here it is the curve itself which is being cached. I also realise that the same problem exists with, for example, the period lattice of an elliptic curve. Sometimes people use a double underscore attribute name (e.g. We may need to consult experts on this.
OK, it is fairly harmless but if #11270 is stalled then perhaps it is worth changing here. Later: no need, it is harmless.
OK, thanks -- sorry I was lazy and did not give line numbers. New commits:
|
comment:13
I did not see your new changes until after posting my comments. I expect to be happy with them and will just check... |
comment:14
...done. I am happy with the last commit which addresses the points I made (at least, the valid ones). Good! |
Reviewer: John Cremona |
comment:16
If you plan to continue working on Galois representations, please be aware that I am working on #11905 (which also touches that code and conflicts with this patch). |
* develop: (95 commits) Trac sagemath#14858: more robust type checks for arith.py Updated Sage version to 6.1.beta3 Trac sagemath#11271: making the curve inaccessible + documentation Trac sagemath#11271: Corrections to is_surjective in Galois representations over Q. sage-sdist: copy upstream tarballs using sage-spkg Fixed docbuild. Removed removed file from doc. Fix wrong NOTE block. Where possible, remove optional - database_stein_watkins Stein-Watkins database: reviewer patch buid/deps : added a dependency of freetype on libpng in order to work around a build-time race condition. Replace bytes_to_long/long_to_bytes by ord/chr. Revert "Filter pycrypto warning about insecure modular exponentiaiton." first version of the git-trac package Filter pycrypto warning about insecure modular exponentiaiton. Update PyCrypto to version 2.6.1. Let PyCrypto build on FreeBSD. trac sagemath#15435: WeylGroup and CoxeterGroup to groups.<tab> trac sagemath#15369: Alias groups.misc.AdditiveCyclic to IntegerModRing Fix for comparison of padics. ...
David Zywina pointed out to me that the docstring for the Sage function clearly states: "Return True if the mod-p representation is surjective onto Aut(E[p])=GL2(Fp). False if it is not, or None if we were unable to determine whether it is or not."
So according to the docstring, if the functions returns either True or False, then it returns the right answer. The documentations suggests that if the function returns None (which is completely different than True/False in Python), then you have to re-call it with a bigger parameter. That said, I just looked through the actual source code, and this simply isn't true at all!
That "return False" at the end should be "return None" according to the docstring. So this is a serious bug in the Sage documentation or in the function. The options for a fix are:
Probably the function as is can never ever prove non-surjectivity, except in various special cases. It should be changed to a better one that can prove non-surjectivity maybe following [1], or at least using division polynomials (since p<=37 anyways).
Change the lying docstring a lot to agree with the code. NOTE: One should probably also change the docstring for the deprecated "E.is_surjective()" which is also misleading.
[1] http://www.math.upenn.edu/~zywina/papers/EffectiveModl.pdf
I could imagine doing 2 above quickly, then opening another ticket for 1, or even having 1 as part of #11270 later.
I'm marking this as "critical" since it is a major misleading mathematical bug, and it is functionality that gets used as a hypothesis for computational papers a lot (though in practice always in the direction that is safe, but who knows?).
See also: #11270
Component: elliptic curves
Author: Chris Wuthrich
Branch/Commit: u/wuthrich/ticket/11271 @
4c57ec0
Reviewer: John Cremona
Issue created by migration from https://trac.sagemath.org/ticket/11271
The text was updated successfully, but these errors were encountered: