Skip to content

Commit 3ff268a

Browse files
committed
revievers suggested changes
1 parent b4f0de6 commit 3ff268a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/sage/schemes/elliptic_curves/BSD.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def pari_two_descent_work(E):
155155
156156
- ``E`` -- an elliptic curve
157157
158-
OUTPUT:
158+
OUTPUT: A tuple of 5 elements with the first 4 being integers.
159159
160160
- a lower bound on the rank
161161

src/sage/schemes/elliptic_curves/ell_rational_field.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,7 @@ def simon_two_descent(self, verbose=0, lim1=5, lim3=50, limtriv=3,
17821782
This function is deprecated as the functionality of
17831783
Simon's script for elliptic curves over the rationals
17841784
has been ported over to pari.
1785-
Use :meth:`.rank` with the keyword ``algorithm='pari;`` instead.
1785+
Use :meth:`.rank` with the keyword ``algorithm='pari'`` instead.
17861786
17871787
INPUT:
17881788
@@ -2102,6 +2102,9 @@ def rank(self, use_database=True, verbose=False,
21022102
sage: E._EllipticCurve_rational_field__rank
21032103
(0, True)
21042104
2105+
This example has Sha = Z/4 x Z/4 and the rank cannot be
2106+
determined using pari only::
2107+
21052108
sage: E =EllipticCurve([-113^2,0])
21062109
sage: E.rank(use_database=False, verbose=False, algorithm="pari")
21072110
Traceback (most recent call last):
@@ -2216,6 +2219,9 @@ def rank(self, use_database=True, verbose=False,
22162219
ge = sorted([self.point([QQ(x[0]),QQ(x[1])], check=True) for x in pts])
22172220
ge = self.saturation(ge)[0]
22182221
self._known_points = ge
2222+
# note that lower is only a conjectural
2223+
# lower bound for the rank, the only
2224+
# proven lower bound is #ge.
22192225
if len(ge) == upper:
22202226
verbose_verbose(f"rank {upper} unconditionally determined by pari")
22212227
rank = Integer(upper)
@@ -2283,7 +2289,7 @@ def gens(self, proof=None, **kwds):
22832289
:meth:`~gens_certain` method to find out afterwards
22842290
whether the generators were proved.
22852291
2286-
IMPLEMENTATION: Uses Cremona's mwrank C library or ellrank in pari.
2292+
IMPLEMENTATION: Uses Cremona's mwrank C++ library or ellrank in pari.
22872293
22882294
EXAMPLES::
22892295
@@ -2379,7 +2385,7 @@ def _compute_gens(self, proof,
23792385
Traceback (most recent call last):
23802386
...
23812387
RuntimeError: generators could not be determined. So far we found []. Hint: increase pari_effort.
2382-
sage: E.gens(use_database=False, algorithm="pari",pari_effort=10)
2388+
sage: E.gens(use_database=False, algorithm="pari",pari_effort=10) # long time
23832389
[(-166136231668185267540804/2825630694251145858025 : 167661624456834335404812111469782006/150201095200135518108761470235125 : 1)]
23842390
23852391
"""
@@ -2435,6 +2441,9 @@ def _compute_gens(self, proof,
24352441
ge = sorted([self.point([QQ(x[0]),QQ(x[1])], check=True) for x in pts])
24362442
ge = self.saturation(ge)[0]
24372443
self._known_points = ge
2444+
# note that lower is only a conjectural
2445+
# lower bound for the rank, the only
2446+
# proven lower bound is #ge.
24382447
if len(ge) == upper:
24392448
verbose_verbose(f"rank {upper} unconditionally determined by pari")
24402449
rank = Integer(upper)
@@ -3015,8 +3024,7 @@ def selmer_rank(self, algorithm="pari"):
30153024
if algorithm=="pari":
30163025
ep = self.pari_curve()
30173026
lower, upper, s, pts = ep.ellrank()
3018-
T = self.torsion_subgroup().invariants()
3019-
tor = sum(x%2==0 for x in T)
3027+
tor = self.two_torsion_rank()
30203028
return upper + tor + s
30213029
elif algorithm=="mwrank":
30223030
C = self.mwrank_curve()

0 commit comments

Comments
 (0)