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

Vélu isogeny formulas use incorrect a-invariants when pre-isomorphism is set #33214

Closed
yyyyx4 opened this issue Jan 22, 2022 · 12 comments
Closed

Comments

@yyyyx4
Copy link
Member

yyyyx4 commented Jan 22, 2022

With Sage 9.5.rc3:

sage: E = EllipticCurve(GF(71^2), [5,5])
sage: phi = E.isogeny(E.lift_x(0))
sage: E1 = E.change_weierstrass_model(9,8,7,6)
sage: phi = phi * E1.isomorphism_to(E)
sage: P = E1.lift_x(1)
sage: P in phi.domain()
True
sage: phi(P)
---------------------------------------------------------------------------

# ...

~/prg/sage/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py in _call_(self, P)
   1182             outP = (tempX, tempY)
   1183
-> 1184         return self.__E2(outP)
   1185
   1186     def __getitem__(self, i):

# ...

TypeError: Coordinates [46, 3*z2 + 44, 1] do not define a point on Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Finite Field in z2 of size 71^2

The reason is the following code in EllipticCurveIsogeny.__compute_via_velu():

        a1 = self.__E1.a1()
        a3 = self.__E1.a3()

Here, .__E1 is the same as .domain(), but the Vélu formulas compute the "inner" isogeny. Thus, these should be the a1,a3 constants of the pre-isomorphism codomain.

CC: @JohnCremona @categorie @defeo

Component: elliptic curves

Author: Lorenz Panny

Branch/Commit: 3b823d0

Reviewer: John Cremona, Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/33214

@yyyyx4 yyyyx4 added this to the sage-9.6 milestone Jan 22, 2022
@yyyyx4
Copy link
Member Author

yyyyx4 commented Jan 22, 2022

Author: Lorenz Panny

@yyyyx4
Copy link
Member Author

yyyyx4 commented Jan 22, 2022

Commit: 4408774

@yyyyx4
Copy link
Member Author

yyyyx4 commented Jan 22, 2022

@yyyyx4
Copy link
Member Author

yyyyx4 commented Jan 22, 2022

New commits:

a1f4f7euse correct a1,a3 constants when pre-isomorphism exists
4408774add doctest for #33214

@fchapoton
Copy link
Contributor

comment:2

looks good to me, and simple enough

John or Luca, do you approve ?

@JohnCremona
Copy link
Member

comment:3

Well spotted, sounds very reasonable. Can you add something to the doctest which makes it clear that this is correct in the example, while the same code pre-patch is not? Some assertion which would fail before? Perhaps composing with a dual and checking that the composite multiplies by the degree? That way people can see that this is correct, without having to do some hard computations to verify.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2022

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

8f5da9eMerge tag '9.6.beta6' into public/fix_velu_isogeny_evaluation_with_pre_isomorphism
3b823d0add another doctest

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2022

Changed commit from 4408774 to 3b823d0

@yyyyx4
Copy link
Member Author

yyyyx4 commented Mar 29, 2022

comment:5

Thanks! I just added another test to verify that the rational maps of the isogeny with pre-isomorphism satisfy the (co)domain curve equations. (The rational maps are internally computed by evaluating the isogeny at a generic point, i.e., it uses the same code path that is corrected here.) Both tests fail with a current Sage and pass after this patch.

@JohnCremona
Copy link
Member

Reviewer: John Cremona, Frédéric Chapoton

@JohnCremona
Copy link
Member

comment:6

Replying to @yyyyx4:

Thanks! I just added another test to verify that the rational maps of the isogeny with pre-isomorphism satisfy the (co)domain curve equations. (The rational maps are internally computed by evaluating the isogeny at a generic point, i.e., it uses the same code path that is corrected here.) Both tests fail with a current Sage and pass after this patch.

That's great, just what I was suggesting.

@vbraun
Copy link
Member

vbraun commented Apr 2, 2022

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

No branches or pull requests

4 participants