Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
make sure multiplication_by_m_isogeny picks the correct isomorphism
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Sep 17, 2021
1 parent 40081c7 commit ead071d
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions src/sage/schemes/elliptic_curves/ell_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2150,7 +2150,7 @@ def multiplication_by_m(self, m, x_only=False):
def multiplication_by_m_isogeny(self, m):
r"""
Return the ``EllipticCurveIsogeny`` object associated to the
multiplication-by-`m` map on self.
multiplication-by-`m` map on this elliptic curve.
The resulting isogeny will
have the associated rational maps (i.e. those returned by
Expand All @@ -2169,22 +2169,51 @@ def multiplication_by_m_isogeny(self, m):
OUTPUT:
- An ``EllipticCurveIsogeny`` object associated to the
multiplication-by-`m` map on self.
multiplication-by-`m` map on this elliptic curve.
EXAMPLES::
sage: E = EllipticCurve('11a1')
sage: E.multiplication_by_m_isogeny(7)
Isogeny of degree 49 from Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field to Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
TESTS:
Tests for :trac:`32490`::
sage: E = EllipticCurve(QQbar, [1,0])
sage: E.multiplication_by_m_isogeny(1).rational_maps()
(x, y)
::
sage: E = EllipticCurve_from_j(GF(31337).random_element())
sage: P = E.random_point()
sage: [E.multiplication_by_m_isogeny(m)(P) == m*P for m in (1,2,3,5,7,9)]
[True, True, True, True, True, True]
::
sage: E = EllipticCurve('99.a1')
sage: E.multiplication_by_m_isogeny(5)
Isogeny of degree 25 from Elliptic Curve defined by y^2 + x*y + y = x^3 - x^2 - 17*x + 30 over Rational Field to Elliptic Curve defined by y^2 + x*y + y = x^3 - x^2 - 17*x + 30 over Rational Field
sage: E.multiplication_by_m_isogeny(2).rational_maps()
((1/4*x^4 + 33/4*x^2 - 121/2*x + 363/4)/(x^3 - 3/4*x^2 - 33/2*x + 121/4),
(-1/256*x^7 + 1/128*x^6*y - 7/256*x^6 - 3/256*x^5*y - 105/256*x^5 - 165/256*x^4*y + 1255/256*x^4 + 605/128*x^3*y - 473/64*x^3 - 1815/128*x^2*y - 10527/256*x^2 + 2541/128*x*y + 4477/32*x - 1331/128*y - 30613/256)/(1/16*x^6 - 3/32*x^5 - 519/256*x^4 + 341/64*x^3 + 1815/128*x^2 - 3993/64*x + 14641/256))
"""
mx, my = self.multiplication_by_m(m)

torsion_poly = self.torsion_polynomial(m).monic()
phi = self.isogeny(torsion_poly, codomain=self)
phi._EllipticCurveIsogeny__initialize_rational_maps(precomputed_maps=(mx, my))

return phi
# trac 32490: using codomain=self can give a wrong isomorphism
for aut in self.automorphisms():
psi = aut * phi
if psi.rational_maps() == (mx, my):
return psi

assert False, 'bug in multiplication_by_m_isogeny()'

def isomorphism_to(self, other):
"""
Expand Down

0 comments on commit ead071d

Please sign in to comment.