-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Have multiplication_by_m() return an EllipticCurveIsogeny object #7262
Comments
comment:1
moving an email discussion forward, John said :
I would send both coordinates to the constructor. Your code of constructing them is faster than what the generic isogeny-code will do.
Yes, that is what I will do. I do not think that we will need this option of specifying an isogeny when the codomain is not known. One could always send the denominator as a kernel_polynomial which will create the codomain. Of course there is an obvious extension that should be added here. Complex multiplication, like multiplication_by_n(2*i+3). Also we could make automorphisms into a group and create a endomorphism ring... oh but I am dreaming some steps ahead of what I will do about this ticket. Chris. |
comment:2
I've got a prototype patch ready that I'm going to post now, but I'd like some opinions before I finish it off. First, here's what I did: it'd be nice if we could make Here are some questions:
I'm not sure what the best plan is -- I'm guessing people aren't willing to accept that speed hit in general. We could also have a separate function, maybe I'm attaching a patch anyway, in case people want to play around with it. Don't be frightened by the size of the patch file -- I got a little carried away using Since I'm mostly looking for comments, I'm adding one or two people on the cc list ... |
comment:3
(Shame that I am sitting in my office, marking exams, when all this action happens on bugs.) I fear that speed is an issue, so I am in favour of having both options, In a more long-term vision, you might want to look at #7368. For instance, I am not sure yet, how one should design isogenies in general. Probably they should internally remember their factorisation if they came with one. Like a seperable \circ non-seperable isogeny. Even for the isogeny [m], it might be much faster if we treat it as \phi \circ \hat\phi when there is a factorisation like that. etc etc. But any progress on this is very welcome and the big philiosophical questions can be looked at later. Probably you are aware of the related ticket #6413. |
comment:4
Quick comment: let's allow the old version to remain, with a different name. And let's keep the x-only version (again with a different name if it must) since that is used a lot, e.g. for dividing points by m. Must run -- not marking exams but defining the group law on elliptic curves in 10 mins! |
comment:5
Ok, new ticket created for making isogenies faster to create at #8014. Also, I'm posting a new patch (within the next two minutes, just double-checking there's no cruft in it) that breaks this out into a |
Author: Craig Citro |
This comment has been minimized.
This comment has been minimized.
comment:7
Apparently I never posted the other patch? Weird. Anyway, as I mentioned above: the patch is big, but it's basically me hitting |
comment:8
I have read through the patch, but not started testing yet. I think this is a summary of what it contains:
Have I missed anything? I do think that this is a good start, and will go on to test. |
comment:9
Yep, that's exactly what's in the patch. |
comment:10
Am I doing something stupid here? The patch applies fine but when I run the test I get
which makes no sense since E has type |
comment:11
Replying to @JohnCremona:
Apologies, I patched a clone but ran the main branch. Stupid! Tests do pass. Positive review soon, I expect! |
comment:12
Looks good to me. I wanted to do more tests (over number fields and finite fields) but have to go. |
comment:13
Oops.
Boom. |
comment:14
Well, the error that pops up in that case is just an exception being raised by the |
comment:15
I also add that the following problem with the documentation should be adjusted, too...
By the way, is it considered "good coding" to cut lines at 80 characters ? I never thought about this and I am happy to follow that rule, if others desire that. |
comment:16
I posted a new patch fixing the newline in docstring issue. (I was bad and didn't even try building the docs.) As to 80 character line widths: while lots of people use wider terminals nowadays, 80 has always been the standard width from days of yore. For the neanderthals like me who still prefer the command-line over the terminal, and in particular keep to 80 characters, it's a big mess when things are wider. So in short, yes, at least some people prefer 80 character line widths -- but no one's going to start rejecting patches if you forget. Chris, what're your thoughts on the exception John ran into? What would you like to see happen? |
comment:17
Looking at the code, I see that this is not doing exactly what my original idea was when I opened this trac. The reason this is so slow is that a lot of computations will be done several times. I thought that one should create the isogeny without running through the current init of the object. I think all data is known easily once the division polynomial is computed. Of course, we can leave it like that by now, but I would suggest to open a further ticket to improve this. Another ugly thing is
One should set the post_isomorphism correctly. As to the 4-isogeny, this is indeed not implemented since it is a bit more complicated. The best would be to have the composition of morphisms defined and then to defined by iterating [2]. We can leave it like that by now. It is a shame though. |
comment:18
For now why don't we limit this function to prime m? I agree with setting domain=codomain. I did that a lot with the l-isogeny code when I knew I had an endomorphism. One day we'll have endomorphisms as a proper class. Sorry I did not check docbuilding as I was called away... |
comment:19
We have to limit (actually the current code does that already) that the only even m which works is m=2. But m=9 is fine. |
comment:20
Okay, good point about the codomain -- I'm going to attach a new patch with that fix. I should mention that I've never actually used the isogeny or multiplication by m code myself -- I volunteered for this while we were triaging during the bug days. So if you don't think the patch is helpful, feel free to say so ... I won't take it personally. I agree that something more sophisticated is definitely called for. I happened to email Dan Shumow about this, and he had much the same opinion as you and John: it would be nice to have an endomorphism class that inherits from isogeny, and then possibly even a multiplication-by-m class that inherits from that, each avoiding more and more computation. I was thinking that the first step would be to make things get calculated lazily in |
comment:21
Attachment: trac_7262.patch.gz |
Merged: sage-4.3.2.alpha0 |
Reviewer: John Cremona, Chris Wuthrich |
Currently sage returns a pair of rational functions when asked
I would be better if this creates a
EllipticCurveIsogeny
object from E to E.CC: @JohnCremona @williamstein @robertwb
Component: elliptic curves
Keywords: isogeny
Author: Craig Citro
Reviewer: John Cremona, Chris Wuthrich
Merged: sage-4.3.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/7262
The text was updated successfully, but these errors were encountered: