Skip to content

Commit 8fcb85e

Browse files
author
Release Manager
committed
Trac #34811: rational maps for WeierstrassIsomorphism should not be polynomials
The methods `.rational_maps()` and `.x_rational_map()` for `WeierstrassIsomorphism` return polynomials, but the same methods for other `EllipticCurveHom` return rational maps (i.e., elements of the fraction field). For consistency, these methods should return the same types in all child classes of `EllipticCurveHom`, despite the rational maps actually having denominator `1` in this case. URL: https://trac.sagemath.org/34811 Reported by: lorenz Ticket author(s): Lorenz Panny Reviewer(s): Travis Scrimshaw
2 parents c7be323 + 551d007 commit 8fcb85e

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/sage/schemes/elliptic_curves/weierstrass_morphism.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ def __init__(self, E=None, urst=None, F=None):
487487

488488
self._mpoly_ring = PolynomialRing(base_ring, ['x','y'])
489489
self._poly_ring = PolynomialRing(base_ring, ['x'])
490+
self._xyfield = self._mpoly_ring.fraction_field()
491+
self._xfield = self._poly_ring.fraction_field()
490492

491493
self._domain = E
492494
self._codomain = F
@@ -748,14 +750,16 @@ def rational_maps(self):
748750
sage: w(P).xy() == (f(P.xy()), g(P.xy()))
749751
True
750752
751-
TESTS::
753+
TESTS:
754+
755+
Check for :trac:`34811`::
752756
753757
sage: iso.rational_maps()[0].parent()
754-
Multivariate Polynomial Ring in x, y over Rational Field
758+
Fraction Field of Multivariate Polynomial Ring in x, y over Rational Field
755759
sage: iso.rational_maps()[1].parent()
756-
Multivariate Polynomial Ring in x, y over Rational Field
760+
Fraction Field of Multivariate Polynomial Ring in x, y over Rational Field
757761
"""
758-
return tuple(baseWI.__call__(self, self._mpoly_ring.gens()))
762+
return tuple(baseWI.__call__(self, self._xyfield.gens()))
759763

760764
def x_rational_map(self):
761765
"""
@@ -775,12 +779,14 @@ def x_rational_map(self):
775779
sage: iso.x_rational_map() == iso.rational_maps()[0]
776780
True
777781
778-
TESTS::
782+
TESTS:
783+
784+
Check for :trac:`34811`::
779785
780786
sage: iso.x_rational_map().parent()
781-
Univariate Polynomial Ring in x over Rational Field
787+
Fraction Field of Univariate Polynomial Ring in x over Rational Field
782788
"""
783-
x, = self._poly_ring.gens()
789+
x, = self._xfield.gens()
784790
return (x - self.r) / self.u**2
785791

786792
def kernel_polynomial(self):

0 commit comments

Comments
 (0)