Skip to content

implement new .torsion_basis method based on random sampling #40035

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

grhkm21
Copy link
Contributor

@grhkm21 grhkm21 commented May 1, 2025

This implements a new algorithm for computing E.torsion_basis when E is an elliptic curve. The method is very simple: sample points, check order, then check they're linearly independent by pairing.

From my testing, the algorithm is always faster than the previous "abelian_group" algorithm, so I set the default to "random_sampling" instead.

By factoring out the algorithm code, we can add algorithms more easily in the future.

We should probably have a method/flag to return also generators of $E[n]$ even when it's not isomorphic to $(Z / nZ)^2$,

@grhkm21
Copy link
Contributor Author

grhkm21 commented May 1, 2025

Oh, one disadvantage is that the torsion basis is now not cached. I don't think it's a good idea to cache it for all N though. How should we handle this? Or should we just say "when you are using torsion basis you know what you're doing so just cache it yourself"?

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.

1 participant