Skip to content

Commit ef9b279

Browse files
author
Release Manager
committed
gh-36638: return Weierstrass scaling factor in base field for EllipticCurveIsogeny In the absence of pre- and post-isomorphisms, this value was returned as an `Integer` instead of in the base field, which is unexpected and sometimes causes things to break spontaneously. URL: #36638 Reported by: Lorenz Panny Reviewer(s):
2 parents 2b9f3e0 + a508ff9 commit ef9b279

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sage/schemes/elliptic_curves/ell_curve_isogeny.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2838,11 +2838,18 @@ def scaling_factor(self):
28382838
sage: phi.dual().scaling_factor()
28392839
43
28402840
2841+
TESTS:
2842+
2843+
Check for :issue:`36638`::
2844+
2845+
sage: phi.scaling_factor().parent() # needs sage.rings.finite_rings
2846+
Finite Field in z2 of size 257^2
2847+
28412848
ALGORITHM: The "inner" isogeny is normalized by construction,
28422849
so we only need to account for the scaling factors of a pre-
28432850
and post-isomorphism.
28442851
"""
2845-
sc = Integer(1)
2852+
sc = self.__base_field.one()
28462853
if self.__pre_isomorphism is not None:
28472854
sc *= self.__pre_isomorphism.scaling_factor()
28482855
if self.__post_isomorphism is not None:

0 commit comments

Comments
 (0)