# Ticket #8184: trac_8184-indentation.patch

File trac_8184-indentation.patch, 6.8 KB (added by Robert Miller, 13 years ago)

Apply on top of trac_8184-eclib.patch

• ## sage/libs/mwrank/interface.py

```Fix indentation in some docstrings

diff -r da1d714ce6c6 -r d35e82645fb5 sage/libs/mwrank/interface.py```
 a """ Returns the rank of this curve, computed using 2-descent. In general this may only be a lower bound for the rank; an upper bound may be obtained using the function rank_bound(). To test whether the value has been proved to be correct, use the method \method{certain}. In general this may only be a lower bound for the rank; an upper bound may be obtained using the function rank_bound(). To test whether the value has been proved to be correct, use the method \method{certain}. EXAMPLES:: EXAMPLES:: sage: E = mwrank_EllipticCurve([0, -1, 0, -900, -10098]) sage: E.rank() 0 sage: E.certain() True sage: E = mwrank_EllipticCurve([0, -1, 0, -900, -10098]) sage: E.rank() 0 sage: E.certain() True :: :: sage: E = mwrank_EllipticCurve([0, -1, 1, -929, -10595]) sage: E.rank() 0 sage: E.certain() False sage: E = mwrank_EllipticCurve([0, -1, 1, -929, -10595]) sage: E.rank() 0 sage: E.certain() False """ return self.__two_descent_data().getrank() Returns an upper bound for the rank of this curve, computed using 2-descent. If the curve has no 2-torsion, this is equal to the 2-Selmer rank.  If the curve has 2-torsion, the upper bound may be smaller than the bound obtained from the 2-Selmer rank minus the 2-rank of the torsion, since more information is gained from the 2-isogenous curve or curves. If the curve has no 2-torsion, this is equal to the 2-Selmer rank.  If the curve has 2-torsion, the upper bound may be smaller than the bound obtained from the 2-Selmer rank minus the 2-rank of the torsion, since more information is gained from the 2-isogenous curve or curves. EXAMPLES: sage: E.rank_bound() 2 In this case the value returned by \method{rank} is only a lower bound in general (though in this is correct):: In this case the value returned by \method{rank} is only a lower bound in general (though in this is correct):: sage: E.rank() 0 sage: E.certain() False sage: E.certain() False """ return self.__two_descent_data().getrankbound() def selmer_rank(self): r""" Returns the rank of the 2-Selmer group of the curve. Returns the rank of the 2-Selmer group of the curve. EXAMPLES: The following is the curve 960D1, which has rank 0, but Sha of The following is the curve 960D1, which has rank 0, but Sha of order 4.  The 2-torsion has rank 2, and the Selmer rank is 3:: sage: E = mwrank_EllipticCurve([0, -1, 0, -900, -10098]) sage: E.selmer_rank() 3 Nevertheless, we can obtain a tight upper bound on the rank since a second descent is performed which establishes the 2-rank of Sha:: Nevertheless, we can obtain a tight upper bound on the rank since a second descent is performed which establishes the 2-rank of Sha:: sage: E.rank_bound() 0 sage: E.rank_bound() 2 In cases like this with no 2-torsion, the rank upper bound is always equal to the 2-Selmer rank.  If we ask for the rank, all we get is a lower bound:: In cases like this with no 2-torsion, the rank upper bound is always equal to the 2-Selmer rank.  If we ask for the rank, all we get is a lower bound:: sage: E.rank() 0 sage: E.certain() False sage: E.certain() False """ return self.__two_descent_data().getselmer() called, then it is first called by \method{certain} using the default parameters. The result is true if and only if the results of the methods \method{rank} and \method{rank_bound} are equal. The result is true if and only if the results of the methods \method{rank} and \method{rank_bound} are equal. EXAMPLES: A \$2\$-descent does not determine \$E(\Q)\$ with certainty for the curve \$y^2 + y = x^3 - x^2 - 120x - 2183\$. sage: E.rank() 0 The previous value is only a lower bound; the upper bound is greater:: The previous value is only a lower bound; the upper bound is greater:: sage: E.rank_bound() 2
• ## sage/schemes/elliptic_curves/ell_rational_field.py

`diff -r da1d714ce6c6 -r d35e82645fb5 sage/schemes/elliptic_curves/ell_rational_field.py`
 a sage: E.selmer_rank() 3 Here the Selmer rank is equal to the 2-torsion rank (=1) plus the 2-rank of Sha (=2), and the rank itself is zero:: sage: E.rank() 0 Here the Selmer rank is equal to the 2-torsion rank (=1) plus the 2-rank of Sha (=2), and the rank itself is zero:: sage: E.rank() 0 In contrast, for the curve 571A, also with rank 0 and Sha of order 4, we get a worse bound:: sage: E.rank_bound() 2 To establish that the rank is in fact 0 in this case, we would need to carry out a higher descent:: sage: E.three_selmer_rank() # optional: magma 0 Or use the L-function to compute the analytic rank:: To establish that the rank is in fact 0 in this case, we would need to carry out a higher descent:: sage: E.three_selmer_rank() # optional: magma 0 Or use the L-function to compute the analytic rank:: sage: E.rank(only_use_mwrank=False) 0 """ try: return self.__selmer_rank 2 sage: E.rank(only_use_mwrank=False)   # uses L-function 0 """ try: return self.__rank_bound