Skip to content

Commit a6e99a7

Browse files
committed
use abs(m) to compute m-division polynomial
1 parent c3028e7 commit a6e99a7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/sage/schemes/elliptic_curves/ell_generic.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2350,10 +2350,23 @@ def multiplication_by_m_isogeny(self, m):
23502350
sage: E.multiplication_by_m_isogeny(2).rational_maps()
23512351
((1/4*x^4 + 33/4*x^2 - 121/2*x + 363/4)/(x^3 - 3/4*x^2 - 33/2*x + 121/4),
23522352
(-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))
2353+
2354+
Test for :trac:`34727`::
2355+
2356+
sage: E = EllipticCurve([5,5])
2357+
sage: E.multiplication_by_m_isogeny(-1)
2358+
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
2359+
sage: E.multiplication_by_m_isogeny(-2)
2360+
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
2361+
sage: E.multiplication_by_m_isogeny(-3)
2362+
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
2363+
sage: mu = E.multiplication_by_m_isogeny
2364+
sage: all(mu(-m) == -mu(m) for m in (1,2,3,5,7))
2365+
True
23532366
"""
23542367
mx, my = self.multiplication_by_m(m)
23552368

2356-
torsion_poly = self.torsion_polynomial(m).monic()
2369+
torsion_poly = self.torsion_polynomial(abs(m)).monic()
23572370
phi = self.isogeny(torsion_poly, codomain=self)
23582371
phi._EllipticCurveIsogeny__initialize_rational_maps(precomputed_maps=(mx, my))
23592372

0 commit comments

Comments
 (0)