Skip to content

Commit 79ae468

Browse files
committed
less experimental; deprecate .multiplication_by_m_isogeny()
1 parent 9045e7d commit 79ae468

File tree

6 files changed

+18
-27
lines changed

6 files changed

+18
-27
lines changed

src/sage/schemes/elliptic_curves/ell_generic.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -2324,6 +2324,7 @@ def multiplication_by_m_isogeny(self, m):
23242324
23252325
sage: E = EllipticCurve('11a1')
23262326
sage: E.multiplication_by_m_isogeny(7)
2327+
doctest:warning ... DeprecationWarning: ...
23272328
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
23282329
23292330
TESTS:
@@ -2363,6 +2364,9 @@ def multiplication_by_m_isogeny(self, m):
23632364
sage: all(mu(-m) == -mu(m) for m in (1,2,3,5,7))
23642365
True
23652366
"""
2367+
from sage.misc.superseded import deprecation
2368+
deprecation(32826, 'The .multiplication_by_m_isogeny() method is superseded by .scalar_multiplication().')
2369+
23662370
mx, my = self.multiplication_by_m(m)
23672371

23682372
torsion_poly = self.torsion_polynomial(abs(m)).monic()
@@ -2384,16 +2388,10 @@ def scalar_multiplication(self, m):
23842388
:class:`sage.schemes.elliptic_curves.hom_scalar.EllipticCurveHom_scalar`
23852389
object.
23862390
2387-
.. WARNING::
2388-
2389-
This method is currently experimental. It is intended to
2390-
eventually supersede :meth:`multiplication_by_m_isogeny`.
2391-
23922391
EXAMPLES::
23932392
23942393
sage: E = EllipticCurve('77a1')
23952394
sage: m = E.scalar_multiplication(-7); m
2396-
doctest:warning ...
23972395
Scalar-multiplication endomorphism [-7] of Elliptic Curve defined by y^2 + y = x^3 + 2*x over Rational Field
23982396
sage: m.degree()
23992397
49
@@ -2518,9 +2516,9 @@ def automorphisms(self, field=None):
25182516
....: continue
25192517
....: break
25202518
sage: Aut = E.automorphisms()
2521-
sage: Aut[0] == E.multiplication_by_m_isogeny(1)
2519+
sage: Aut[0] == E.scalar_multiplication(1)
25222520
True
2523-
sage: Aut[1] == E.multiplication_by_m_isogeny(-1)
2521+
sage: Aut[1] == E.scalar_multiplication(-1)
25242522
True
25252523
sage: sorted(Aut) == Aut
25262524
True

src/sage/schemes/elliptic_curves/hom.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ def _richcmp_(self, other, op):
182182
sage: F = E.change_ring(GF(71))
183183
sage: wE = identity_morphism(E)
184184
sage: wF = identity_morphism(F)
185-
sage: mE = E.multiplication_by_m_isogeny(1)
185+
sage: mE = E.scalar_multiplication(1)
186186
sage: mF = F.multiplication_by_m_isogeny(1)
187+
doctest:warning ... DeprecationWarning: ...
187188
sage: [mE == wE, mF == wF]
188189
[True, True]
189190
sage: [a == b for a in (wE,mE) for b in (wF,mF)]
@@ -746,7 +747,7 @@ def compare_via_evaluation(left, right):
746747
sage: from sage.schemes.elliptic_curves.hom_composite import EllipticCurveHom_composite
747748
sage: mu = EllipticCurveHom_composite.from_factors([phi, psi])
748749
sage: from sage.schemes.elliptic_curves.hom import compare_via_evaluation
749-
sage: compare_via_evaluation(mu, E.multiplication_by_m_isogeny(7))
750+
sage: compare_via_evaluation(mu, E.scalar_multiplication(7))
750751
True
751752
752753
.. SEEALSO::

src/sage/schemes/elliptic_curves/hom_composite.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def from_factors(cls, maps, E=None, strict=True):
350350
TESTS::
351351
352352
sage: E = EllipticCurve('4730k1')
353-
sage: EllipticCurveHom_composite.from_factors([], E) == E.multiplication_by_m_isogeny(1)
353+
sage: EllipticCurveHom_composite.from_factors([], E) == E.scalar_multiplication(1)
354354
True
355355
356356
::
@@ -563,7 +563,7 @@ def _comparison_impl(left, right, op):
563563
sage: psi = phi.codomain().isogeny(phi(Q))
564564
sage: psi = psi.codomain().isomorphism_to(E) * psi
565565
sage: comp = psi * phi
566-
sage: mu = E.multiplication_by_m_isogeny(phi.degree())
566+
sage: mu = E.scalar_multiplication(phi.degree())
567567
sage: sum(a*comp == mu for a in E.automorphisms())
568568
1
569569
@@ -680,9 +680,9 @@ def dual(self):
680680
Composite morphism of degree 9 = 3^2:
681681
From: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 28339*x + 59518 over Finite Field of size 65537
682682
To: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Finite Field of size 65537
683-
sage: psi * phi == phi.domain().multiplication_by_m_isogeny(phi.degree())
683+
sage: psi * phi == phi.domain().scalar_multiplication(phi.degree())
684684
True
685-
sage: phi * psi == psi.domain().multiplication_by_m_isogeny(psi.degree())
685+
sage: phi * psi == psi.domain().scalar_multiplication(psi.degree())
686686
True
687687
"""
688688
phis = (phi.dual() for phi in self._phis[::-1])

src/sage/schemes/elliptic_curves/hom_scalar.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44
This class provides an :class:`EllipticCurveHom` instantiation for
55
multiplication-by-`m` maps on elliptic curves.
66
7-
.. WARNING::
8-
9-
This module is currently considered experimental.
10-
It may change in a future release without prior warning, or even
11-
be removed altogether if things turn out to be unfixably broken.
12-
137
EXAMPLES:
148
159
We can construct and evaluate scalar multiplications::
1610
1711
sage: from sage.schemes.elliptic_curves.hom_scalar import EllipticCurveHom_scalar
18-
doctest:warning ...
1912
sage: E = EllipticCurve('77a1')
2013
sage: phi = E.scalar_multiplication(5); phi
2114
Scalar-multiplication endomorphism [5] of Elliptic Curve defined by y^2 + y = x^3 + 2*x over Rational Field
@@ -136,8 +129,6 @@
136129
from sage.schemes.elliptic_curves.weierstrass_morphism import negation_morphism
137130
from sage.schemes.elliptic_curves.hom import EllipticCurveHom
138131

139-
from sage.misc.superseded import experimental_warning
140-
experimental_warning(32826, 'EllipticCurveHom_scalar is experimental code.')
141132

142133
class EllipticCurveHom_scalar(EllipticCurveHom):
143134

@@ -393,6 +384,7 @@ def scaling_factor(self):
393384
sage: u == phi.formal()[1]
394385
True
395386
sage: u == E.multiplication_by_m_isogeny(5).scaling_factor()
387+
doctest:warning ... DeprecationWarning: ...
396388
True
397389
398390
ALGORITHM: The scaling factor equals the scalar that is being

src/sage/schemes/elliptic_curves/hom_velusqrt.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1252,9 +1252,9 @@ def dual(self):
12521252
To: Elliptic Curve defined by y^2 = x^3 + 39*x + 40 over Finite Field in z2 of size 101^2
12531253
sage: phi.dual()
12541254
Isogeny of degree 11 from Elliptic Curve defined by y^2 = x^3 + 39*x + 40 over Finite Field in z2 of size 101^2 to Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 + x + 1 over Finite Field in z2 of size 101^2
1255-
sage: phi.dual() * phi == phi.domain().multiplication_by_m_isogeny(11)
1255+
sage: phi.dual() * phi == phi.domain().scalar_multiplication(11)
12561256
True
1257-
sage: phi * phi.dual() == phi.codomain().multiplication_by_m_isogeny(11)
1257+
sage: phi * phi.dual() == phi.codomain().scalar_multiplication(11)
12581258
True
12591259
"""
12601260
# FIXME: This code fails if the degree is divisible by the characteristic.

src/sage/schemes/projective/projective_morphism.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2705,7 +2705,7 @@ def projective_degrees(self):
27052705
sage: k = GF(11)
27062706
sage: E = EllipticCurve(k,[1,1])
27072707
sage: Q = E(6,5)
2708-
sage: phi = E.multiplication_by_m_isogeny(2)
2708+
sage: phi = E.scalar_multiplication(2)
27092709
sage: mor = phi.as_morphism()
27102710
sage: mor.projective_degrees()
27112711
(12, 3)
@@ -2747,7 +2747,7 @@ def degree(self):
27472747
sage: k = GF(11)
27482748
sage: E = EllipticCurve(k,[1,1])
27492749
sage: Q = E(6,5)
2750-
sage: phi = E.multiplication_by_m_isogeny(2)
2750+
sage: phi = E.scalar_multiplication(2)
27512751
sage: mor = phi.as_morphism()
27522752
sage: mor.degree()
27532753
4

0 commit comments

Comments
 (0)