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

Implemented order computation and identity checking for automorphisms of elliptic curves #37089

Merged
merged 3 commits into from
Feb 25, 2024

Conversation

r98inver
Copy link
Contributor

@r98inver r98inver commented Jan 18, 2024

The WeierstrassIsomorphism class is also used to represent automorphisms of elliptic curves. Sometimes one is looking for a particular automorphism (say, of order 3 or 4), and this check is simplified with the .order() method for elliptic-curve automorphisms.
The is_identity() method is added for convenience.

#sd123

@grhkm21
Copy link
Contributor

grhkm21 commented Jan 18, 2024

(Please correct me if I'm wrong!) If the elliptic curve is not over a field, e.g. over Zmod(35), and when the automorphism has order $3$ when restricted to over $E / \mathbb{F}_5$ and $4$ when restricted to over $E / \mathbb{F}_7$, then it will have order $12$ over $E / \mathbb{F}_{35}$. This can be a doctest

@grhkm21
Copy link
Contributor

grhkm21 commented Jan 18, 2024

Just for completeness sake, here's an update. Currently it can't be a doctest since WeierstrassIsomorphism assumes the base ring is a field, which is not really necessary. However, this demonstrates the idea:

sage: E = EllipticCurve(Zmod(13 * 19), [19, 13])
....: assert E.change_ring(GF(13)).j_invariant() == 1728 # % 13
....: assert E.change_ring(GF(19)).j_invariant() == 0
....: 
....: # E.automorphisms() # this fails
....: aut_13 = E.change_ring(GF(13)).automorphisms()
....: aut_19 = E.change_ring(GF(19)).automorphisms()
....: 
....: # Since it's an isomorphism, only the *u* matters
....: import itertools
....: for phi_13, phi_19 in itertools.product(aut_13, aut_19):
....:     u = Mod(CRT([ZZ(phi_13.u), ZZ(phi_19.u)], [13, 19]), 13 * 19)
....:     order = u.multiplicative_order()
....:     if order > 6:
....:         print(phi_13, phi_19, order, sep="\n")
....:         break
....: 
Elliptic-curve endomorphism of Elliptic Curve defined by y^2 = x^3 + 6*x over Finite Field of size 13
  Via:  (u,r,s,t) = (5, 0, 0, 0)
Elliptic-curve endomorphism of Elliptic Curve defined by y^2 = x^3 + 13 over Finite Field of size 19
  Via:  (u,r,s,t) = (7, 0, 0, 0)
12

Copy link
Contributor

@grhkm21 grhkm21 left a comment

Choose a reason for hiding this comment

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

Thanks for contributing #sd123 🚀

styling issues

@grhkm21
Copy link
Contributor

grhkm21 commented Feb 15, 2024

Hi, is there any update on this? :)

@r98inver
Copy link
Contributor Author

Forgot to push, should be ok now

Copy link
Contributor

@grhkm21 grhkm21 left a comment

Choose a reason for hiding this comment

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

Very sorry for not spotting these earlier. After these changes it should be ready.

Copy link
Contributor

@grhkm21 grhkm21 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

@r98inver
Copy link
Contributor Author

Thanks for the review and the suggestions!

@grhkm21
Copy link
Contributor

grhkm21 commented Feb 18, 2024

No problem! Great work for a first contribution :D

Copy link

Documentation preview for this PR (built with commit aa7c27a; changes) is ready! 🎉

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 19, 2024
sagemathgh-37089: Implemented order computation and identity checking for automorphisms of elliptic curves
    
The WeierstrassIsomorphism class is also used to represent automorphisms
of elliptic curves. Sometimes one is looking for a particular
automorphism (say, of order 3 or 4), and this check is simplified with
the .order() method for elliptic-curve automorphisms.
The is_identity() method is added for convenience.

#sd123
    
URL: sagemath#37089
Reported by: Riccardo Invernizzi
Reviewer(s): grhkm21, Riccardo Invernizzi
@vbraun vbraun merged commit efd42e5 into sagemath:develop Feb 25, 2024
22 of 23 checks passed
@mkoeppe mkoeppe added this to the sage-10.3 milestone Mar 7, 2024
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.

5 participants