Skip to content

Commit

Permalink
Remove deprecated multiplication_by_m_isogeny
Browse files Browse the repository at this point in the history
  • Loading branch information
grhkm21 committed Jan 22, 2024
1 parent 6a81d72 commit ac0ce58
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 112 deletions.
95 changes: 0 additions & 95 deletions src/sage/schemes/elliptic_curves/ell_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2435,101 +2435,6 @@ def multiplication_by_m(self, m, x_only=False):

return mx, my

def multiplication_by_m_isogeny(self, m):
r"""
Return the ``EllipticCurveIsogeny`` object associated to the
multiplication-by-`m` map on this elliptic curve.
The resulting isogeny will
have the associated rational maps (i.e., those returned by
:meth:`multiplication_by_m`) already computed.
NOTE: This function is currently *much* slower than the
result of ``self.multiplication_by_m()``, because
constructing an isogeny precomputes a significant amount
of information. See :trac:`7368` and :trac:`8014` for the
status of improving this situation.
INPUT:
- ``m`` -- a nonzero integer
OUTPUT:
- An ``EllipticCurveIsogeny`` object associated to the
multiplication-by-`m` map on this elliptic curve.
EXAMPLES::
sage: E = EllipticCurve('11a1')
sage: E.multiplication_by_m_isogeny(7)
doctest:warning ... DeprecationWarning: ...
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]) # needs sage.rings.number_field
sage: E.multiplication_by_m_isogeny(1).rational_maps() # needs sage.rings.number_field
(x, y)
::
sage: E = EllipticCurve_from_j(GF(31337).random_element()) # needs sage.rings.finite_rings
sage: P = E.random_point() # needs sage.rings.finite_rings
sage: [E.multiplication_by_m_isogeny(m)(P) == m*P for m in (1,2,3,5,7,9)] # needs sage.rings.finite_rings
[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))
Test for :trac:`34727`::
sage: E = EllipticCurve([5,5])
sage: E.multiplication_by_m_isogeny(-1)
Isogeny of degree 1
from Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Rational Field
to Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Rational Field
sage: E.multiplication_by_m_isogeny(-2)
Isogeny of degree 4
from Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Rational Field
to Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Rational Field
sage: E.multiplication_by_m_isogeny(-3)
Isogeny of degree 9
from Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Rational Field
to Elliptic Curve defined by y^2 = x^3 + 5*x + 5 over Rational Field
sage: mu = E.multiplication_by_m_isogeny
sage: all(mu(-m) == -mu(m) for m in (1,2,3,5,7))
True
"""
from sage.misc.superseded import deprecation
deprecation(32826, 'The .multiplication_by_m_isogeny() method is superseded by .scalar_multiplication().')

mx, my = self.multiplication_by_m(m)

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

# 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 scalar_multiplication(self, m):
r"""
Return the scalar-multiplication map `[m]` on this elliptic
Expand Down
15 changes: 0 additions & 15 deletions src/sage/schemes/elliptic_curves/hom.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,21 +227,6 @@ def _richcmp_(self, other, op):
sage: phi.dual() == psi.dual()
True
::
sage: from sage.schemes.elliptic_curves.weierstrass_morphism import WeierstrassIsomorphism, identity_morphism
sage: E = EllipticCurve([9,9])
sage: F = E.change_ring(GF(71))
sage: wE = identity_morphism(E)
sage: wF = identity_morphism(F)
sage: mE = E.scalar_multiplication(1)
sage: mF = F.multiplication_by_m_isogeny(1)
doctest:warning ... DeprecationWarning: ...
sage: [mE == wE, mF == wF]
[True, True]
sage: [a == b for a in (wE,mE) for b in (wF,mF)]
[False, False, False, False]
.. SEEALSO::
- :meth:`_comparison_impl`
Expand Down
3 changes: 1 addition & 2 deletions src/sage/schemes/elliptic_curves/hom_scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ def scaling_factor(self):
sage: u = phi.scaling_factor()
sage: u == phi.formal()[1]
True
sage: u == E.multiplication_by_m_isogeny(5).scaling_factor()
doctest:warning ... DeprecationWarning: ...
sage: u == 5
True
The scaling factor lives in the base ring::
Expand Down

0 comments on commit ac0ce58

Please sign in to comment.