Skip to content

compute endomorphism orders for elliptic curves over finite fields (rank-2 case) #38493

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

Conversation

yyyyx4
Copy link
Member

@yyyyx4 yyyyx4 commented Aug 10, 2024

For an elliptic curve E over a finite field with an endomorphism algebra of rank two over ℚ, the endomorphism ring is a superorder of the "Frobenius order" ℤ[π].

This patch adds a simple method to compute the exact imaginary-quadratic order containing ℤ[π] which is isomorphic to the endomorphism ring of the curve, and generalizes the algorithm to supersingular elliptic curves with a (rational) endomorphism algebra of rank 2.

@JohnCremona
Copy link
Member

I'll look at this tomorrow. I did implement a special case of Sutherland 's algorithm already for our CM testing algorithm last year.

@yyyyx4
Copy link
Member Author

yyyyx4 commented Aug 11, 2024

Thank you! I think the implementation you wrote is the function I'm calling here. I just extended it to work for the supersingular case, too.

@JohnCremona
Copy link
Member

Apologies to @yyyyx4 for promising and then not delivering -- sheer forgetfulness on my part. I cannot promise to be able to review this in the next several days. Feel free to send me reminders.

Copy link

github-actions bot commented Dec 17, 2024

Documentation preview for this PR (built with commit 284dbfa; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@yyyyx4
Copy link
Member Author

yyyyx4 commented Dec 17, 2024

No worries, @JohnCremona! I do think it would be nice to get this into the next release, but it is by no means urgent.

@yyyyx4 yyyyx4 force-pushed the public/compute_endomorphism_order_when_quadratic branch from 0493778 to 855261d Compare April 23, 2025 10:04
# classes of curves instead.
E0 = [self] * 3
E1 = [phi.codomain() for phi in self.isogenies_prime_degree(ell)]
assert E1
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that including assert statements is good practice for production code (though of course essential while testing). Does the developers' guide say something about this? But the alternative would be to test the condition anyway and raise an error if it fails, so perhaps it does not make much difference. (Laos, I am sure thta my own code in Sage does include assert statements...)

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think there are any rules about it. I left these in since they are very quick sanity checks that might detect if something is really wrong with the algorithm. Exceptions are for a different purpose; they communicate errors that can occur as part of the expected functionality of the code (e.g., invalid inputs). In my opinion, there should be assertions all over the code base anyway, with the default in production environments being that they are turned off (python -O or PYTHONOPTIMIZE=1), but that's a different discussion...

Copy link
Member

@JohnCremona JohnCremona left a comment

Choose a reason for hiding this comment

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

Looks good, I made a few rather trivial comments but basically approve.

@yyyyx4
Copy link
Member Author

yyyyx4 commented Apr 29, 2025

Thanks for the review, @JohnCremona! If you are happy with my latest changes, don't forget to approve the pull request (I think I can no longer set "positive review" myself, contrary to the old Trac days).

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 30, 2025
sagemathgh-38493: compute endomorphism orders for elliptic curves over finite fields (rank-2 case)
    
For an elliptic curve E over a finite field with an endomorphism algebra
of rank two over ℚ, the endomorphism ring is a superorder of the
"Frobenius order" ℤ[π].

This patch adds a simple method to compute the exact imaginary-quadratic
order containing ℤ[π] which is isomorphic to the endomorphism ring of
the curve, and generalizes the algorithm to supersingular elliptic
curves with a (rational) endomorphism algebra of rank 2.
    
URL: sagemath#38493
Reported by: Lorenz Panny
Reviewer(s): John Cremona, Lorenz Panny
vbraun pushed a commit to vbraun/sage that referenced this pull request May 1, 2025
sagemathgh-38493: compute endomorphism orders for elliptic curves over finite fields (rank-2 case)
    
For an elliptic curve E over a finite field with an endomorphism algebra
of rank two over ℚ, the endomorphism ring is a superorder of the
"Frobenius order" ℤ[π].

This patch adds a simple method to compute the exact imaginary-quadratic
order containing ℤ[π] which is isomorphic to the endomorphism ring of
the curve, and generalizes the algorithm to supersingular elliptic
curves with a (rational) endomorphism algebra of rank 2.
    
URL: sagemath#38493
Reported by: Lorenz Panny
Reviewer(s): John Cremona, Lorenz Panny
vbraun pushed a commit to vbraun/sage that referenced this pull request May 4, 2025
sagemathgh-38493: compute endomorphism orders for elliptic curves over finite fields (rank-2 case)
    
For an elliptic curve E over a finite field with an endomorphism algebra
of rank two over ℚ, the endomorphism ring is a superorder of the
"Frobenius order" ℤ[π].

This patch adds a simple method to compute the exact imaginary-quadratic
order containing ℤ[π] which is isomorphic to the endomorphism ring of
the curve, and generalizes the algorithm to supersingular elliptic
curves with a (rational) endomorphism algebra of rank 2.
    
URL: sagemath#38493
Reported by: Lorenz Panny
Reviewer(s): John Cremona, Lorenz Panny
vbraun pushed a commit to vbraun/sage that referenced this pull request May 5, 2025
sagemathgh-38493: compute endomorphism orders for elliptic curves over finite fields (rank-2 case)
    
For an elliptic curve E over a finite field with an endomorphism algebra
of rank two over ℚ, the endomorphism ring is a superorder of the
"Frobenius order" ℤ[π].

This patch adds a simple method to compute the exact imaginary-quadratic
order containing ℤ[π] which is isomorphic to the endomorphism ring of
the curve, and generalizes the algorithm to supersingular elliptic
curves with a (rational) endomorphism algebra of rank 2.
    
URL: sagemath#38493
Reported by: Lorenz Panny
Reviewer(s): John Cremona, Lorenz Panny
vbraun pushed a commit to vbraun/sage that referenced this pull request May 6, 2025
sagemathgh-38493: compute endomorphism orders for elliptic curves over finite fields (rank-2 case)
    
For an elliptic curve E over a finite field with an endomorphism algebra
of rank two over ℚ, the endomorphism ring is a superorder of the
"Frobenius order" ℤ[π].

This patch adds a simple method to compute the exact imaginary-quadratic
order containing ℤ[π] which is isomorphic to the endomorphism ring of
the curve, and generalizes the algorithm to supersingular elliptic
curves with a (rational) endomorphism algebra of rank 2.
    
URL: sagemath#38493
Reported by: Lorenz Panny
Reviewer(s): John Cremona, Lorenz Panny
@vbraun vbraun merged commit b397659 into sagemath:develop May 11, 2025
23 of 24 checks passed
@yyyyx4 yyyyx4 deleted the public/compute_endomorphism_order_when_quadratic branch May 11, 2025 19:32
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.

3 participants