-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
Steps To Reproduce
version 10.0
sage: E = EllipticCurve([1,0,0,-1,0])
sage: P=E([1,0])
sage: P.order()
+Infinity
sage: phi = E.isogenies_prime_degree(2)[0]
sage: phi(P)
...
AttributeError: 'PlusInfinity' object has no attribute 'gcd'
Expected Behavior
phi(P) should return a point of infinite order on the isogenous curve
Actual Behavior
phi(P) crashes because after computing Q=phi(P) it checks whether P has its order set (which it does) and then tries to compute the gcd of the order with the degree of the isogeny, which fails when the order is +Infinity. The idea is that sometimes it is eas to set the order of Q.
Additional Information
This bug was intriduced by @yyyyx4 in commit 3c297c6 in Nov 2022 -- before that, no attempt was made to compute the order of Q from that of P.
The fix is simply that if P's order is set and is infinte then set Q's order to be the same, before testing the gcd condition.
Environment
- **OS**: ubuntu 22.04.2 LTS
- **Sage Version**: 10.0
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide