Fix indentation in some docstrings
diff r da1d714ce6c6 r d35e82645fb5 sage/libs/mwrank/interface.py
a

b


244  244  """ 
245  245  Returns the rank of this curve, computed using 2descent. 
246  246  
247   In general this may only be a lower bound for the rank; an 
248   upper bound may be obtained using the function rank_bound(). 
249   To test whether the value has been proved to be correct, use 
250   the method \method{certain}. 
 247  In general this may only be a lower bound for the rank; an 
 248  upper bound may be obtained using the function rank_bound(). 
 249  To test whether the value has been proved to be correct, use 
 250  the method \method{certain}. 
251  251  
252   EXAMPLES:: 
 252  EXAMPLES:: 
253  253  
254   sage: E = mwrank_EllipticCurve([0, 1, 0, 900, 10098]) 
255   sage: E.rank() 
256   0 
257   sage: E.certain() 
258   True 
 254  sage: E = mwrank_EllipticCurve([0, 1, 0, 900, 10098]) 
 255  sage: E.rank() 
 256  0 
 257  sage: E.certain() 
 258  True 
259  259  
260   :: 
 260  :: 
261  261  
262   sage: E = mwrank_EllipticCurve([0, 1, 1, 929, 10595]) 
263   sage: E.rank() 
264   0 
265   sage: E.certain() 
266   False 
 262  sage: E = mwrank_EllipticCurve([0, 1, 1, 929, 10595]) 
 263  sage: E.rank() 
 264  0 
 265  sage: E.certain() 
 266  False 
267  267  
268  268  """ 
269  269  return self.__two_descent_data().getrank() 
… 
… 

273  273  Returns an upper bound for the rank of this curve, computed 
274  274  using 2descent. 
275  275  
276   If the curve has no 2torsion, this is equal to the 2Selmer 
277   rank. If the curve has 2torsion, the upper bound may be 
278   smaller than the bound obtained from the 2Selmer rank minus 
279   the 2rank of the torsion, since more information is gained 
280   from the 2isogenous curve or curves. 
 276  If the curve has no 2torsion, this is equal to the 2Selmer 
 277  rank. If the curve has 2torsion, the upper bound may be 
 278  smaller than the bound obtained from the 2Selmer rank minus 
 279  the 2rank of the torsion, since more information is gained 
 280  from the 2isogenous curve or curves. 
281  281  
282  282  EXAMPLES: 
283  283  
… 
… 

307  307  sage: E.rank_bound() 
308  308  2 
309  309  
310   In this case the value returned by \method{rank} is only a 
311   lower bound in general (though in this is correct):: 
 310  In this case the value returned by \method{rank} is only a 
 311  lower bound in general (though in this is correct):: 
312  312  
313  313  sage: E.rank() 
314  314  0 
315   sage: E.certain() 
316   False 
 315  sage: E.certain() 
 316  False 
 317  
317  318  """ 
318  319  return self.__two_descent_data().getrankbound() 
319  320  
320  321  def selmer_rank(self): 
321  322  r""" 
322   Returns the rank of the 2Selmer group of the curve. 
323   
 323  Returns the rank of the 2Selmer group of the curve. 
 324  
324  325  EXAMPLES: 
325  326  
326   The following is the curve 960D1, which has rank 0, but Sha of 
 327  The following is the curve 960D1, which has rank 0, but Sha of 
327  328  order 4. The 2torsion has rank 2, and the Selmer rank is 3:: 
328  329  
329  330  sage: E = mwrank_EllipticCurve([0, 1, 0, 900, 10098]) 
330  331  sage: E.selmer_rank() 
331  332  3 
332  333  
333   Nevertheless, we can obtain a tight upper bound on the rank 
334   since a second descent is performed which establishes the 
335   2rank of Sha:: 
 334  Nevertheless, we can obtain a tight upper bound on the rank 
 335  since a second descent is performed which establishes the 
 336  2rank of Sha:: 
336  337  
337  338  sage: E.rank_bound() 
338  339  0 
… 
… 

355  356  sage: E.rank_bound() 
356  357  2 
357  358  
358   In cases like this with no 2torsion, the rank upper bound is 
359   always equal to the 2Selmer rank. If we ask for the rank, 
360   all we get is a lower bound:: 
361   
 359  In cases like this with no 2torsion, the rank upper bound is 
 360  always equal to the 2Selmer rank. If we ask for the rank, 
 361  all we get is a lower bound:: 
 362  
362  363  sage: E.rank() 
363  364  0 
364   sage: E.certain() 
365   False 
 365  sage: E.certain() 
 366  False 
366  367  
367  368  """ 
368  369  return self.__two_descent_data().getselmer() 
… 
… 

411  412  called, then it is first called by \method{certain} 
412  413  using the default parameters. 
413  414  
414   The result is true if and only if the results of the methods 
415   \method{rank} and \method{rank_bound} are equal. 
 415  The result is true if and only if the results of the methods 
 416  \method{rank} and \method{rank_bound} are equal. 
416  417  
417  418  EXAMPLES: 
418   
 419  
419  420  A $2$descent does not determine $E(\Q)$ with certainty 
420  421  for the curve $y^2 + y = x^3  x^2  120x  2183$. 
421  422  
… 
… 

427  428  sage: E.rank() 
428  429  0 
429  430  
430   The previous value is only a lower bound; the upper bound is greater:: 
 431  The previous value is only a lower bound; the upper bound is greater:: 
431  432  
432  433  sage: E.rank_bound() 
433  434  2 
diff r da1d714ce6c6 r d35e82645fb5 sage/schemes/elliptic_curves/ell_rational_field.py
a

b


2459  2459  sage: E.selmer_rank() 
2460  2460  3 
2461  2461  
2462   Here the Selmer rank is equal to the 2torsion rank (=1) plus 
2463   the 2rank of Sha (=2), and the rank itself is zero:: 
2464   
2465   sage: E.rank() 
2466   0 
2467   
 2462  Here the Selmer rank is equal to the 2torsion rank (=1) plus 
 2463  the 2rank of Sha (=2), and the rank itself is zero:: 
 2464  
 2465  sage: E.rank() 
 2466  0 
 2467  
2468  2468  In contrast, for the curve 571A, also with rank 0 and Sha of 
2469  2469  order 4, we get a worse bound:: 
2470  2470  
… 
… 

2474  2474  sage: E.rank_bound() 
2475  2475  2 
2476  2476  
2477   To establish that the rank is in fact 0 in this case, we would 
2478   need to carry out a higher descent:: 
2479   
2480   sage: E.three_selmer_rank() # optional: magma 
2481   0 
2482   
2483   Or use the Lfunction to compute the analytic rank:: 
2484   
 2477  To establish that the rank is in fact 0 in this case, we would 
 2478  need to carry out a higher descent:: 
 2479  
 2480  sage: E.three_selmer_rank() # optional: magma 
 2481  0 
 2482  
 2483  Or use the Lfunction to compute the analytic rank:: 
 2484  
2485  2485  sage: E.rank(only_use_mwrank=False) 
2486  2486  0 
 2487  
2487  2488  """ 
2488  2489  try: 
2489  2490  return self.__selmer_rank 
… 
… 

2518  2519  2 
2519  2520  sage: E.rank(only_use_mwrank=False) # uses Lfunction 
2520  2521  0 
 2522  
2521  2523  """ 
2522  2524  try: 
2523  2525  return self.__rank_bound 