Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fixing some details in elliptic curves over Q
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Nov 28, 2018
1 parent b36eca1 commit 7fef710
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/sage/schemes/elliptic_curves/ell_rational_field.py
Expand Up @@ -47,7 +47,7 @@
#
# The full text of the GPL is available at:
#
# http://www.gnu.org/licenses/
# https://www.gnu.org/licenses/
##############################################################################
from __future__ import print_function, division, absolute_import
from six import integer_types, iteritems
Expand Down Expand Up @@ -1532,7 +1532,7 @@ def analytic_rank(self, algorithm="pari", leading_coefficient=False):
S = set([self.analytic_rank('pari'),
self.analytic_rank('rubinstein'), self.analytic_rank('sympow')])
if len(S) != 1:
raise RuntimeError("Bug in analytic_rank; algorithms don't agree! (E=%s)"%self)
raise RuntimeError("Bug in analytic_rank; algorithms don't agree! (E=%s)" % self)
return list(S)[0]
else:
raise ValueError("algorithm %s not defined"%algorithm)
Expand Down Expand Up @@ -2087,7 +2087,7 @@ def rank(self, use_database=True, verbose=False,
if self.root_number() == 1:
L, err = self.lseries().at1(prec)
if abs(L) > err + R(0.0001): # definitely doesn't vanish
misc.verbose("rank 0 because L(E,1)=%s"%L)
misc.verbose("rank 0 because L(E,1)=%s" % L)
rank = Integer(0)
self.__rank = (rank, proof)
return rank
Expand Down Expand Up @@ -2977,13 +2977,13 @@ def is_p_minimal(self, p):
"""
Tests if curve is p-minimal at a given prime p.
INPUT: p - a prime
OUTPUT: True - if curve is p-minimal
INPUT: p -- a prime
OUTPUT:
- ``False`` - if curve isn't p-minimal
- ``True`` -- if curve is p-minimal
- ``False`` -- if curve is not p-minimal
EXAMPLES::
Expand Down Expand Up @@ -4059,11 +4059,13 @@ def torsion_subgroup(self):
[(0 : 1 : 0), (147 : 12960 : 1), (2307 : 97200 : 1), (-933 : 29160 : 1), (1011 : 0 : 1), (-933 : -29160 : 1), (2307 : -97200 : 1), (147 : -12960 : 1), (282 : 0 : 1), (8787 : 816480 : 1), (-285 : 27216 : 1), (1227 : 22680 : 1), (-1293 : 0 : 1), (1227 : -22680 : 1), (-285 : -27216 : 1), (8787 : -816480 : 1)]
"""
try:
return self.__torsion_subgroup
G = self.__torsion_subgroup
except AttributeError:
self.__torsion_subgroup = ell_torsion.EllipticCurveTorsionSubgroup(self)
self.__torsion_order = self.__torsion_subgroup.order()
return self.__torsion_subgroup
G = ell_torsion.EllipticCurveTorsionSubgroup(self)
self.__torsion_subgroup = G

self.__torsion_order = G.order()
return self.__torsion_subgroup

def torsion_points(self):
"""
Expand Down Expand Up @@ -4522,7 +4524,7 @@ class are reordered to be isomorphic with the specified
This curve had numerous `2`-isogenies::
sage: e=EllipticCurve([1,0,0,-39,90])
sage: e = EllipticCurve([1,0,0,-39,90])
sage: isocls = e.isogeny_class(); isocls.matrix()
[1 2 4 4 8 8]
[2 1 2 2 4 4]
Expand Down Expand Up @@ -5815,7 +5817,7 @@ def integral_points(self, mw_base='auto', both_signs=False, verbose=False):
if not self.is_integral():
raise ValueError("integral_points() can only be called on an integral model")

if mw_base=='auto':
if mw_base == 'auto':
try:
mw_base = self.gens()
except RuntimeError:
Expand Down Expand Up @@ -6135,8 +6137,10 @@ def S_integral_points(self, S, mw_base='auto', both_signs=False, verbose=False,
A curve of rank 3 with no torsion points::
sage: E = EllipticCurve([0,0,1,-7,6])
sage: P1=E.point((2,0)); P2=E.point((-1,3)); P3=E.point((4,6))
sage: a=E.S_integral_points(S=[2,3], mw_base=[P1,P2,P3], verbose=True);a
sage: P1 = E.point((2,0))
sage: P2 = E.point((-1,3))
sage: P3 = E.point((4,6))
sage: a = E.S_integral_points(S=[2,3], mw_base=[P1,P2,P3], verbose=True);a
max_S: 3 len_S: 3 len_tors: 1
lambda 0.485997517468...
k1,k2,k3,k4 7.65200453902598e234 1.31952866480763 3.54035317966420e9 2.42767548272846e17
Expand Down Expand Up @@ -6248,7 +6252,7 @@ def S_integral_points(self, S, mw_base='auto', both_signs=False, verbose=False,
except AttributeError:#catches: <tuple>.sort(), <!ZZ>.is_prime()
raise AttributeError('S must be a list of primes')

if mw_base=='auto':
if mw_base == 'auto':
if verbose:
print("Starting computation of MW basis")
try:
Expand Down

0 comments on commit 7fef710

Please sign in to comment.