Skip to content

Commit 0ad2117

Browse files
author
Release Manager
committed
gh-35984: fix evaluation of isogenies on points of infinite order This fixes the bug reported at #35983 using the fix described there. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [ x] The title is concise, informative, and self-explanatory. - [ x] The description explains in detail what this PR is about. - [ x] I have linked a relevant issue or discussion. - [ x] I have created tests covering the changes. URL: #35984 Reported by: John Cremona Reviewer(s): Lorenz Panny
2 parents 46027e8 + af01502 commit 0ad2117

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/sage/schemes/elliptic_curves/ell_curve_isogeny.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,19 @@ def _call_(self, P):
12501250
sage: phi = E.isogeny(3^99*P) # optional - sage.rings.finite_rings
12511251
sage: phi(Q)._order # optional - sage.rings.finite_rings
12521252
27
1253+
1254+
Test for :trac:`35983`::
1255+
1256+
sage: E = EllipticCurve([1,0,0,-1,0]) # optional - sage.rings.finite_rings
1257+
sage: P = E([1,0]) # optional - sage.rings.finite_rings
1258+
sage: P.order() # optional - sage.rings.finite_rings
1259+
+Infinity
1260+
sage: phi = E.isogenies_prime_degree(2)[0] # optional - sage.rings.finite_rings
1261+
sage: Q = phi(P); Q # optional - sage.rings.finite_rings
1262+
(0 : 1 : 1)
1263+
sage: Q.order() # optional - sage.rings.finite_rings
1264+
+Infinity
1265+
12531266
"""
12541267
if P.is_zero():
12551268
return self._codomain(0)
@@ -1281,14 +1294,15 @@ def _call_(self, P):
12811294
xP = self.__posti_ratl_maps[0](xP)
12821295

12831296
Q = self._codomain(xP, yP)
1284-
if hasattr(P, '_order') and P._order.gcd(self._degree).is_one():
1297+
if hasattr(P, '_order'):
1298+
if P.has_infinite_order() or P._order.gcd(self._degree).is_one():
1299+
Q._order = P._order
12851300
# TODO: For non-coprime degree, the order of the point
1286-
# gets reduced by a divisor of the degree when passing
1301+
# may get reduced by a divisor of the degree when passing
12871302
# through the isogeny. We could run something along the
12881303
# lines of order_from_multiple() to determine the new
12891304
# order, but this probably shouldn't happen by default
12901305
# as it'll be detrimental to performance in some cases.
1291-
Q._order = P._order
12921306
return Q
12931307

12941308
def __getitem__(self, i):

0 commit comments

Comments
 (0)