-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Enhanced handling of elliptic curve twists #5673
Comments
Attachment: twist.patch.gz apply to 3.4.1.alpha0 + #4667 patches |
Attachment: 5673-j-keyword.patch.gz apply after last patch |
Attachment: 5673-j-keyword.2.patch.gz replaces previous (fixes typo) |
comment:1
robertwb, Thanks for your patch (which needs a typo fixing: change 3 to 2 in line 113 or the test does not pass! -- I have attached a fixed patch). I am happy to give your patch a positive review, but did you review mine? |
comment:2
It looks good (and works) for me. |
comment:3
The only suggestion I have is that it might be better to return |
comment:4
Replying to @robertwb:
I did that since I wanted the return type to be the same whatever. But that stopped me doing the right thing in char. 2 when twists are additive (so a twist parameter of 0 means isomorphic). It's the usual thing: ideally I would want to return either (True, param) or False, but that is not allowed in Sage. We could go for a more complicated function which by default just returns True/False, or if an optional parameter "return_parameter" is set to True returns a tuple either (True, param) or (False,). One advantage of the current setup is that if you do not need the parameter you can use the output as if it were a bool with 0 converting to False. I think. |
comment:5
Replying to @JohnCremona:
One could do this, but then it gets really messy to use.
Yes, that will work. Actually, I think the most Pythonic thing to do here would perhaps be to return None, but I think the current behavior is fine as well. |
comment:6
Unfortunately there are a few doctest failures in
One issue here is certainly that make check does not doctest the ReST documentation - see #5702 for the ticket for that problem which I intend to fix before 3.4.1 is done. To test everything run
which is what I use :) Cheers, Michael |
comment:7
I am about to start fixing the rst failures which should not take long. NB the sha_tate failures were there when I posted this, and (via a message to sage-nt) I had hoped that Chris Wuthrich might have helped track that down. I'll have a go myself now anyway. |
Apply after previous: fixes rst doc failures in tutorial etc. |
comment:8
Attachment: trac_5763_rst.patch.gz Patch trac_5763_rst.patch fixes the rst failures. Now for sha_tate.... |
Apply after previous (fixes sha_tate doctest failure) |
comment:9
Attachment: trac_5673_review.patch.gz OK, the problem was that Chris's original minimal_quadratic_twist() function gave back the same curve it it already had minimal conductor, while mine did not, since my function takes the curve with smallest label. But the padic code could not cope with a non-trivial twist of the same conductor! (The bad example was '300b2' for which "my" minimal twist is '300a2' which is its 5-twist.) Solution: if the minimal twist has the same conductor, I just throw it away and use the original curve, as Chris's code used to do. The patch trac_5673_review.patch fixes this. Sorry I made two separate patches to fix the failures -- I was not sure I would succeed with both problems. |
comment:11
Looks good to me. |
comment:12
Merged
in Sage 3.4.1.rc3. Cheers, Michael |
The patch does the following related things:
__quadratic__
twist, not the minimal twist.There is likely to be a necessary change to documentation (pages 38 and 39 of the tutorial) which have not yet been made.
The patch is based on 3.4.1.alpha0 + patches at #4667.
I have tested all files in sage/schemes/elliptic_curves. There are two failures in sha_tate which I do not understand, so I am posting the patch anyway.
CC: @categorie
Component: number theory
Keywords: elliptic curve twist
Issue created by migration from https://trac.sagemath.org/ticket/5673
The text was updated successfully, but these errors were encountered: