diff --git a/src/sage/rings/polynomial/symmetric_reduction.pyx b/src/sage/rings/polynomial/symmetric_reduction.pyx index 0559aa77ca8..0da8d656830 100644 --- a/src/sage/rings/polynomial/symmetric_reduction.pyx +++ b/src/sage/rings/polynomial/symmetric_reduction.pyx @@ -254,9 +254,9 @@ cdef class SymmetricReductionStrategy: return richcmp((left._parent, left._lm, left._tail), (right._parent, right._lm, right._tail), op) - def gens(self) -> list: + def gens(self) -> tuple: """ - Return the list of Infinite Polynomials modulo which ``self`` reduces. + Return the tuple of Infinite Polynomials modulo which ``self`` reduces. EXAMPLES:: @@ -269,9 +269,9 @@ cdef class SymmetricReductionStrategy: y_2*y_1^2, y_2^2*y_1 sage: S.gens() - [y_2*y_1^2, y_2^2*y_1] + (y_2*y_1^2, y_2^2*y_1) """ - return self._lm + return tuple(self._lm) def setgens(self, L): """ diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py index 518fda03481..cafa2eaee3e 100644 --- a/src/sage/schemes/elliptic_curves/ell_number_field.py +++ b/src/sage/schemes/elliptic_curves/ell_number_field.py @@ -158,7 +158,7 @@ def base_extend(self, R): [(52 : 111 : 1)] sage: EK = E.base_extend(K) sage: EK.gens() - [(52 : 111 : 1)] + ((52 : 111 : 1),) """ E = super().base_extend(R) if isinstance(E, EllipticCurve_number_field): @@ -2328,9 +2328,9 @@ def gens(self, **kwds): sage: K. = NumberField(x^2 + 23, 'a') sage: E = EllipticCurve(K,[0,0,0,101,0]) sage: E.gens() - [(23831509/8669448*a - 2867471/8669448 : 76507317707/18049790736*a - 424166479633/18049790736 : 1), + ((23831509/8669448*a - 2867471/8669448 : 76507317707/18049790736*a - 424166479633/18049790736 : 1), (-2031032029/969232392*a + 58813561/969232392 : -15575984630401/21336681877488*a + 451041199309/21336681877488 : 1), - (-186948623/4656964 : 549438861195/10049728312*a : 1)] + (-186948623/4656964 : 549438861195/10049728312*a : 1)) It can happen that no points are found if the height bounds used in the search are too small (see :issue:`10745`):: @@ -2338,11 +2338,11 @@ def gens(self, **kwds): sage: K. = NumberField(x^4 + x^2 - 7) sage: E = EllipticCurve(K, [1, 0, 5*t^2 + 16, 0, 0]) sage: E.gens(lim1=1, lim3=1) - [] + () sage: E.rank() 1 sage: gg=E.gens(lim3=13); gg # long time (about 4s) - [(... : 1)] + ((... : 1),) Check that the point found has infinite order, and that it is on the curve:: @@ -2356,7 +2356,7 @@ def gens(self, **kwds): sage: K. = NumberField(x^2 - 17) sage: E = EllipticCurve(K, [-4, 0]) sage: E.gens() - [(-1/2*t + 1/2 : -1/2*t + 1/2 : 1), (-t + 3 : -2*t + 10 : 1)] + ((-1/2*t + 1/2 : -1/2*t + 1/2 : 1), (-t + 3 : -2*t + 10 : 1)) sage: E.rank() 2 @@ -2368,7 +2368,7 @@ def gens(self, **kwds): sage: EK.rank() 0 sage: EK.gens() - [] + () IMPLEMENTATION: @@ -2378,10 +2378,10 @@ def gens(self, **kwds): PARI/GP scripts from http://www.math.unicaen.fr/~simon/. """ try: - return self.gens_quadratic(**kwds) + return tuple(self.gens_quadratic(**kwds)) except ValueError: self.simon_two_descent(**kwds) - return self._known_points + return tuple(self._known_points) def period_lattice(self, embedding): r""" diff --git a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py index 36d629888b5..23766b59996 100644 --- a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +++ b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py @@ -572,7 +572,7 @@ def poly_ring(self): def gens(self): """ - Return a list [x, T] where x and T are the generators of the ring + Return a tuple (x, T) where x and T are the generators of the ring (as element *of this ring*). .. NOTE::