Skip to content

Commit 641c2d1

Browse files
committed
35983: fix and doctest
1 parent 543f8d6 commit 641c2d1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/sage/schemes/elliptic_curves/ell_curve_isogeny.py

Lines changed: 17 additions & 2 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,9 +1294,11 @@ 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

0 commit comments

Comments
 (0)