Skip to content
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

Compute composite degree (separable) isogenies of EllipticCurves #35949

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

grhkm21
Copy link
Contributor

@grhkm21 grhkm21 commented Jul 13, 2023

  • Implement .isogenies_degree for EllipticCurves

πŸ“ Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

βŒ› Dependencies

This supports computing (separable) isogenies of composite degree. It is
generic and calls `.isogenies_prime_degree`.
Copy link
Member

@yyyyx4 yyyyx4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the few small remarks, looks good to me!

src/sage/schemes/elliptic_curves/ell_field.py Outdated Show resolved Hide resolved
src/sage/schemes/elliptic_curves/ell_field.py Show resolved Hide resolved
src/sage/schemes/elliptic_curves/ell_field.py Outdated Show resolved Hide resolved
Thanks Lorenz for the review <3

Co-authored-by: Lorenz Panny <84067835+yyyyx4@users.noreply.github.com>
@grhkm21
Copy link
Contributor Author

grhkm21 commented Nov 6, 2023

Thanks for the review :)

Yes.

Co-authored-by: Lorenz Panny <84067835+yyyyx4@users.noreply.github.com>
Copy link
Member

@yyyyx4 yyyyx4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the smaller code remarks above below, I'm also wondering if this should be an iterator: The list can grow very quickly, so doing it as a depth-first iterator might be a good idea?

src/sage/schemes/elliptic_curves/ell_field.py Outdated Show resolved Hide resolved
src/sage/schemes/elliptic_curves/ell_field.py Outdated Show resolved Hide resolved
src/sage/schemes/elliptic_curves/ell_field.py Outdated Show resolved Hide resolved
src/sage/schemes/elliptic_curves/ell_field.py Outdated Show resolved Hide resolved
@grhkm21
Copy link
Contributor Author

grhkm21 commented Feb 12, 2024

I swear I wrote some code similar to the previous two commits, but somehow didn't commit it, and it's not in my git stash either. Anyways, please kindly review it once again :) it's very short now.

@grhkm21 grhkm21 requested a review from yyyyx4 February 12, 2024 15:54
Copy link

Documentation preview for this PR (built with commit f5d5834; changes) is ready! πŸŽ‰

@yyyyx4
Copy link
Member

yyyyx4 commented Feb 13, 2024

There are duplicates in the list as soon as any prime appears with multiplicity 3 or more in the degree:

sage: E = EllipticCurve(GF(11^2), [1,0])
sage: len(list(E.isogenies_degree(2^3)))
27
sage: len(set(E.isogenies_degree(2^3)))
15

To fix it, we could restrict to cyclic isogenies:

sage: P,Q = E.torsion_basis(2)
sage: len([phi for phi in E.isogenies_degree(2^3) if phi(P) or phi(Q)])
12
sage: len({phi for phi in E.isogenies_degree(2^3) if phi(P) or phi(Q)})
12

Returning only cyclic isogenies is arguably "better" anyway, since non-cyclic isogenies could be considered somewhat degenerate among the set of all isogenies of given degree. However, adding this check will make the code quite a bit more complicated. I'm unsure how to proceed.

@grhkm21
Copy link
Contributor Author

grhkm21 commented Feb 13, 2024

Oh right, sorry for missing that. We can have a check to ensure we are not taking the dual isogeny of the previous taken one, since the prime degrees considered are sorted.

@hellman
Copy link
Sponsor

hellman commented Feb 13, 2024

I think it would be useful to have an phi1.is_dual_of(phi2) method (up to isomorphism check). I also need something like for mitm.

But if we add it to the EllipticCurveHom class, it should be generic (e.g. factor the degree?), which could introduce an overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants