Opened 6 years ago

Closed 4 years ago

#22345 closed enhancement (fixed)

Elliptic curve isogenies over number fields II: implement Billerey's algorithm for reducible primes

Reported by: John Cremona Owned by:
Priority: minor Milestone: sage-8.3
Component: elliptic curves Keywords: elliptic curves, isogenies, number fields
Cc: Alyson Deines, Kiran Kedlaya Merged in:
Authors: John Cremona Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 2423f7a (Commits, GitHub, GitLab) Commit: 2423f7aa9cd4523bc82a4627513acbcf13b786ae
Dependencies: Stopgaps:

Status badges

Description (last modified by Frédéric Chapoton)

This follows in from #22343 which is a dependency. We implement Billerey's algorithm for finding the set of reducible primes for an elliptic curve without CM over a number field. This is based on an implementation by Ciaran Schembri for a masters' project at Warwick.

Change History (26)

comment:1 Changed 5 years ago by Alyson Deines

Branch: u/aly.deines/elliptic_curve_isogenies_over_number_fields_ii__implement_billeray_s_algorithm_for_reducible_primes

comment:2 Changed 5 years ago by Alyson Deines

Commit: bfe5ca4f9bdd21e47a9e87560b516f158cd9a58a
Keywords: elliptic curves isogenies number fields added

I started putting Cremona's code for Billerey's algorithm into appropriate places in Sage. I cleaned it up a bit and addes some documentations.

Things left to do or fix:

  • add documentation
  • only works if the curve has integral discriminant
  • incorporate into isogeny finding for EC's over number fields
  • more examples, especially over larger fields
  • timings against other methods
  • probably more . . .

comment:3 Changed 5 years ago by Alyson Deines

Milestone: sage-7.6sage-wishlist

comment:4 Changed 5 years ago by Alyson Deines

Priority: majorminor

comment:5 Changed 5 years ago by John Cremona

Thanks for the work so far. I'm working on this again now and will go through your to-do list.

comment:6 Changed 5 years ago by John Cremona

Branch: u/aly.deines/elliptic_curve_isogenies_over_number_fields_ii__implement_billeray_s_algorithm_for_reducible_primesu/cremona/22345
Commit: bfe5ca4f9bdd21e47a9e87560b516f158cd9a58a1a1e7a6b6cda1c22de1e6711bb4c320ac0506047
Status: newneeds_review

I have rearranged the code quite a bit. The technical parts of Billerey I though were better kept separate and not as methods of the elliptic curve class itself, so I put them in (Alternatives were a new file, or on In I also refactored the code to produce a finite set of primes, separating out the cm case, and allowing the user a choice of 3 algorithms, Billerey, Larson or 'heuristic', the latter being non-rigorous, just testing all primes up a to a given bound to see if they passthe necessary local conditions. This is never the default and the docstring makes it clear that the output is not guaranteed complete.

This leaves a much simplified method reducible_primes() in the elliptic curves class itself, while the isogeny class code uses the new function to find the reducible primes, with Billerey the default algorithm.

I could put in more examples if desired. I have not done systematic timing tests, but note that until the work done on another ticket Larson's method could not handle fields of degree 5 and up at all.

While writing this I realised that I have not yet provided the possibility for E.isogeny_class() to use a non-default algorithm, and will add that, but I'll leave the ticket at "needs review" so that patchbots get working on it.

comment:7 Changed 5 years ago by John Cremona

Some timings: with z=zeta_101 and E=[0,1,0,z,z], reducible_primes_naive(E) with default parameters (max_l=1000, num_P=100) returns [2, 607] in 2m, while reducible_primes_naive(E, max_l=2000, num_P=200) returns [2] in about the same time (starting from scratch; if you do the second right after the first it is faster since some previous work is cached). Working on this example revealed something stupid only indirectly relevant to this ticket: computing the 2-isogeny takes for ever! The stupid reason is that after computing the isogenous curve it tries to compute its global_minimal model. Which involves computing the class group of K..... That needs fixing somehow but on a different ticket.

comment:8 Changed 5 years ago by git

Commit: 1a1e7a6b6cda1c22de1e6711bb4c320ac0506047d3643b5fa076eb17231a1b4ca7d3a2a9e9bb5e05

Branch pushed to git repo; I updated commit sha1. New commits:

d3643b5#22345 improved e.c. isogenies over number fields

comment:9 Changed 5 years ago by John Cremona

The last commit makes several improvements after more testing. In Billerey's algorithm itself the improvement is to only use B. to find reducible primes greater than some lower bound (default 200) which never occur in practice, using the local test for smaller primes. Secondly, after noticing that some "easy" examples were taking forever on account of class group computations (which in turn are triggered by the conversion to global minimal models) I added a minimal_models flag which defaults to True to give the old behaviour but which can be set to False. New doctest to illustrate this are added. This flag had to be put into dozens of places from the top-level E.isogeny_class() down through various layers to the underlying isogeny code.

I am currently checking that all the additional docstrings compile OK...

comment:10 Changed 5 years ago by John Cremona

Status: needs_reviewneeds_work

comment:11 Changed 5 years ago by git

Commit: d3643b5fa076eb17231a1b4ca7d3a2a9e9bb5e05252f04856bc6c61a11ebf3cc85dd86b656771bdd

Branch pushed to git repo; I updated commit sha1. New commits:

252f048#22345 fixed some bad docstrings

comment:12 Changed 5 years ago by John Cremona

Status: needs_workneeds_review

comment:13 Changed 5 years ago by John Cremona

Summary: Elliptic curve isogenies over number fields II: implement Billeray's algorithm for reducible primesElliptic curve isogenies over number fields II: implement Billerey's algorithm for reducible primes

comment:14 Changed 5 years ago by Jean-Pierre Flori

Looks like this need rebasing, or is it only trac's git which is not smart enough?

comment:15 Changed 5 years ago by John Cremona

I'll rebase. I thought it was based on a recent version but maybe not

comment:16 Changed 5 years ago by git

Commit: 252f04856bc6c61a11ebf3cc85dd86b656771bdd645c6b7c2904204b1c2e1bedff6264c99abed4ef

Branch pushed to git repo; I updated commit sha1. New commits:

70b8f12Merge branch 'develop' into 22345
645c6b7#22345 rebase + small speedup

comment:17 Changed 5 years ago by John Cremona

That took longer than expected. The rebase was easy but when I tested all of schemes/elliptic_curves there was a long time warning coming from a test in, relating to an earlier fix for #20737, marked as 15s but taking a minute (in semi_global_minimal_model()). I am not sure where the regression came from (not at all to do with this ticket, which in fact makes it possible for semi_global_minimal_model() not to be called when computing isogenies, precisely for the reason that it can take too long when the class group is large). I did two things which help: first, use prime_range() instead of primes() in the primes_of_bounded_norm methods for number fields, and secondly to use a larger bound when searching for a prime in an ideal class -- since if it fails it doubles the bound, which is of course wasteful since the small ones are re-tested. If the resulting time (25s for me for this test) is deemed too long we can mark it 'not tested', but it is there precisely because this case is a hard one.

comment:18 Changed 5 years ago by Kiran Kedlaya

Cc: Kiran Kedlaya added

comment:19 Changed 5 years ago by Alyson Deines

Branch: u/cremona/22345u/aly.deines/22345

comment:20 Changed 5 years ago by John Cremona

Commit: 645c6b7c2904204b1c2e1bedff6264c99abed4ef51c21c3b4ca9c55e5d8f7d8d9a924e7627fc766e

Aly can you explain the branch change you made on Aug 24 which I only just noticed? I cannot read your branch (it shows on trac but not as a link) so I don't know what you changed.

New commits:

51c21c3Merge branch 'u/cremona/22345' of git:// into t/22345/22345

comment:21 Changed 5 years ago by Frédéric Chapoton

Status: needs_reviewneeds_work

branch does not apply

comment:22 Changed 4 years ago by John Cremona

Branch: u/aly.deines/22345u/cremona/22345
Commit: 51c21c3b4ca9c55e5d8f7d8d9a924e7627fc766e94f711426d546c9d28503f3ff82e85d7257e3ce7
Status: needs_workneeds_review

I have merged in 8.3.rc0, fixed conflicts and checked that all tests pass. I hope I will not have to do this again a year from now!

New commits:

94f7114Merge branch 'develop' into 22345
Last edited 4 years ago by John Cremona (previous) (diff)

comment:23 Changed 4 years ago by Frédéric Chapoton

Branch: u/cremona/22345public/ticket/22345
Commit: 94f711426d546c9d28503f3ff82e85d7257e3ce72423f7aa9cd4523bc82a4627513acbcf13b786ae
Description: modified (diff)
Reviewers: Frédéric Chapoton

Please look at my commit, fixing some details about py3:

  • using r""" for documentation containing latex operators
  • do not use .next

If you agree with my changes, you can set to positive.. But I do not claim anything about checking the math, so you may want to wait for an expert's opinion.

New commits:

2423f7atrac 22345 some details (py3 compatibility, please)

comment:24 Changed 4 years ago by John Cremona

Status: needs_reviewpositive_review

I am happy with your changes. Thanks. I have discussed the ideas here with people who have not actually looked at the code in detail. I think the only reasonable thing to do is to get it merged so that it gets used (if there is anyone out there interested). I have used this a lot in computing isogeny classes of curves for the LMFDB, which is how I found out that the old code in Sage was completely useless over number fields of degree >4.

comment:25 Changed 4 years ago by Frédéric Chapoton

Milestone: sage-wishlistsage-8.3

comment:26 Changed 4 years ago by Volker Braun

Branch: public/ticket/223452423f7aa9cd4523bc82a4627513acbcf13b786ae
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.