Opened 8 years ago

Closed 7 years ago

#16959 closed defect (fixed)

p-primary bound for Sha can be improved

Reported by: wuthrich Owned by:
Priority: major Milestone: sage-6.4
Component: elliptic curves Keywords: tate-shafarevich, shark
Cc: pbruin Merged in:
Authors: Chris Wuthrich Reviewers: William Stein, Peter Bruin
Report Upstream: N/A Work issues:
Branch: 01e4bb0 (Commits, GitHub, GitLab) Commit: 01e4bb03168ef08f91295b948baaa8c8c34b696d
Dependencies: #16977 Stopgaps:

Status badges

Description

This ticket aims to improve the p-adic bit of sha_tate for elliptic curves over Q.

  • There are a few minor points to improve in the documentation (some of the conditions are not stated precisely or slightly wrong).
  • We can now allow reducible primes, too. Since #6406 we ask for the p-adic rep to be surjective. However the recent results in [1] imply that the bounds are also correct for all odd primes of semi-stable reduction when the curve admits a p-isogeny.
  • There is a small bug in padic_lseries, which made this fails:
    sage: E = EllipticCurve("5040bi1")
    sage: E.sha().p_primary_bound(5)
    

(reported by Charlene Soh).

[1] C Wuthrich, On the integrality of modular symbols and Kato's Euler system for elliptic curves. Doc. Math. 19 (2014), 381–402.

Change History (26)

comment:1 Changed 8 years ago by wuthrich

  • Branch set to u/wuthrich/ticket/16959
  • Commit set to e20fe2691428bf33958cdc3a716a9f2248dde789

New commits:

083af08corrections in sha_tate
e20fe26trac #16959: doctests for corrections in sha_tate

comment:2 Changed 8 years ago by wuthrich

  • Status changed from new to needs_review

comment:3 Changed 8 years ago by wuthrich

Sorry for the noise. I reformated some of the docstrings. Not that much changes actually.

comment:4 Changed 8 years ago by was

Please run doctests, e.g., -- your changes here impact the file BSD.py, causing 5 doctest failures:

/scratch/wstein/sage-6.4.beta0$ ./sage -t --warn-long 108.4 src/sage/schemes/elliptic_curves/BSD.py
Running doctests with ID 2014-09-10-16-21-02-4fc7534a.
Doctesting 1 file.
sage -t --warn-long 108.4 src/sage/schemes/elliptic_curves/BSD.py
**********************************************************************
File "src/sage/schemes/elliptic_curves/BSD.py", line 304, in sage.schemes.elliptic_curves.BSD.?
Failed example:
    EllipticCurve('11a').prove_BSD(verbosity=2)
Expected:
    p = 2: True by 2-descent...
    True for p not in {2, 5} by Kolyvagin.
    True for p=5 by Mazur
    []
Got:
    p = 2: True by 2-descent
    True for p not in {2, 5} by Kolyvagin.
    Kato further implies that #Sha[5] is trivial.
    []
**********************************************************************
File "src/sage/schemes/elliptic_curves/BSD.py", line 310, in sage.schemes.elliptic_curves.BSD.?
Failed example:
    EllipticCurve('14a').prove_BSD(verbosity=2)
Expected:
    p = 2: True by 2-descent
    True for p not in {2, 3} by Kolyvagin.
    Remaining primes:
    p = 3: reducible, not surjective, good ordinary, divides a Tamagawa number
        (no bounds found)
        ord_p(#Sha_an) = 0
    [3]
Got:
    p = 2: True by 2-descent
    True for p not in {2, 3} by Kolyvagin.
    Kato further implies that #Sha[3] is trivial.
    []
**********************************************************************
File "src/sage/schemes/elliptic_curves/BSD.py", line 318, in sage.schemes.elliptic_curves.BSD.?
Failed example:
    EllipticCurve('14a').prove_BSD(two_desc='simon')
Expected:
    [3]
Got:
    []
**********************************************************************
...

comment:5 Changed 8 years ago by was

In elliptic_curves, the only failures are in BSD.py:

/scratch/wstein/sage-6.4.beta0$ ./sage -tp 12 --long src/sage/schemes/elliptic_curves/ 
...
---------------------------------------------------------------------
sage -t --long --warn-long 101.9 src/sage/schemes/elliptic_curves/BSD.py  # 5 doctests failed
----------------------------------------------------------------------
Total time for all tests: 171.4 seconds
    cpu time: 814.7 seconds
    cumulative wall time: 909.4 seconds

comment:6 Changed 8 years ago by was

  • Status changed from needs_review to needs_work

I ran all tests ('make ptestlong') across sage, including the documentation, and this is what I got:

----------------------------------------------------------------------
sage -t --long --warn-long 104.2 src/doc/en/bordeaux_2008/elliptic_curves.rst  # 1 doctest failed
sage -t --long --warn-long 104.2 src/sage/schemes/elliptic_curves/BSD.py  # 5 doctests failed
----------------------------------------------------------------------
Total time for all tests: 1106.0 seconds
    cpu time: 10570.1 seconds
    cumulative wall time: 12252.5 seconds
make: *** [ptestlong] Error 1
/scratch/wstein/sage-6.4.beta0$  

Aside from fixing that, I am happy with this "patch" (having read it).

comment:7 Changed 8 years ago by git

  • Commit changed from e20fe2691428bf33958cdc3a716a9f2248dde789 to 45eca3df3203644db640072e6aae8bc9d2592c93

Branch pushed to git repo; I updated commit sha1. New commits:

45eca3dtrac #16959: adjusting doctests

comment:8 Changed 8 years ago by wuthrich

  • Status changed from needs_work to needs_review

Sorry for the sloppy work. Now I adjusted these two and all tests pass.

I had to change William's presentation in Bordeaux. Now there are two more or less identical examples. I thought it better not to change the example though.

comment:9 Changed 8 years ago by was

It now looks perfect... except why did you delete the periods after our first initials in this diff (e.g., "W. Stein" --> "W Stein"):

diff --git a/src/sage/schemes/elliptic_curves/BSD.py b/src/sage/schemes/elliptic_curves/BSD.py
index 0b26f34..f496ccb 100644
--- a/src/sage/schemes/elliptic_curves/BSD.py
+++ b/src/sage/schemes/elliptic_curves/BSD.py
@@ -290,9 +290,9 @@ def prove_BSD(E, verbosity=0, two_desc='mwrank', proof=None, secs_hi=5,
        Hautes Études Sci. Publ. Math. No. 47 (1977), 33--186 (1978).
     .. [Rubin] K. Rubin. The "main conjectures" of Iwasawa theory for
        imaginary quadratic fields. Invent. Math. 103 (1991), no. 1, 25--68.
-    .. [SteinWuthrich] W. Stein and C. Wuthrich. Computations about
-       Tate-Shafarevich groups using Iwasawa theory.
-       http://wstein.org/papers/shark, February 2008.
+    .. [SteinWuthrich] W Stein and C Wuthrich, Algorithms
+       for the Arithmetic of Elliptic Curves using Iwasawa Theory
+       Mathematics of Computation 82 (2013), 1757-1792.
     .. [SteinEtAl] G. Grigorov, A. Jorza, S. Patrikis, W. Stein,
        C. Tarniţǎ. Computational verification of the Birch and
        Swinnerton-Dyer conjecture for individual elliptic curves.

comment:10 Changed 8 years ago by was

  • Reviewers set to William Stein
  • Status changed from needs_review to positive_review

(switching to positive review -- the dots are a triviality).

comment:11 Changed 8 years ago by vbraun

  • Status changed from positive_review to needs_work

Fails on 32-bit:

sage -t --long src/sage/schemes/elliptic_curves/sha_tate.py
**********************************************************************
File "src/sage/schemes/elliptic_curves/sha_tate.py", line 768, in sage.schemes.elliptic_curves.sha_tate.Sha.p_primary_bound
Failed example:
    e.sha().p_primary_bound(7)
Exception raised:
    Traceback (most recent call last):
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 480, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 843, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.elliptic_curves.sha_tate.Sha.p_primary_bound[13]>", line 1, in <module>
        e.sha().p_primary_bound(Integer(7))
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/sha_tate.py", line 805, in p_primary_bound
        shan = self.an_padic(p,prec = 0,use_twists=True)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/sha_tate.py", line 577, in an_padic
        lp = Et.padic_lseries(p)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/padics.py", line 158, in padic_lseries
        normalize = normalize, use_eclib=use_eclib)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/padic_lseries.py", line 197, in __init__
        self._modular_symbol = E.modular_symbol(sign=+1, use_eclib = use_eclib, normalize=normalize)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 1208, in modular_symbol
        M = ell_modular_symbols.ModularSymbolECLIB(self, sign, normalize=normalize)
      File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_modular_symbols.py", line 500, in __init__
        self._modsym = ECModularSymbol(E)
      File "sage/libs/cremona/newforms.pyx", line 70, in sage.libs.cremona.newforms.ECModularSymbol.__init__ (build/cythonized/sage/libs/cremona/newforms.cpp:2310)
    OverflowError: Python int too large to convert to C long
**********************************************************************

comment:12 Changed 8 years ago by git

  • Commit changed from 45eca3df3203644db640072e6aae8bc9d2592c93 to cfc4371cee4a277d0fa7e6fe7aa47faa42d3920b

Branch pushed to git repo; I updated commit sha1. New commits:

cfc4371Merge branch 'develop' into sha

comment:13 Changed 8 years ago by git

  • Commit changed from cfc4371cee4a277d0fa7e6fe7aa47faa42d3920b to 93d45724d5f8451cf3320e1bde08eaf7fae71e67

Branch pushed to git repo; I updated commit sha1. New commits:

93d4572trac #16959: change doctest for 32 bit

comment:14 Changed 8 years ago by vbraun

Just documenting that it doesn't work on 32bit is not really a desirable fix...

comment:15 Changed 8 years ago by vbraun

  • Cc cremona added

comment:16 Changed 8 years ago by wuthrich

  • Cc cremona removed
  • Status changed from needs_work to needs_review

I hope this would solve it, though I can't test 32-bit.

This 32-bit issue is linked to eclib having problems with 32-bit. I copied # 32-bit as I did earlier in #11211, where Paul Zimmermann noticed "However there are already some tests that are known to fail on 32-bit, for example in lib/cremona/newforms.pyx: ...". At the time I did not see any other solution than to make 32-bit fail. I don't know if the state has evolved since then.

If so that should be solved on a different ticket. This ticket here removed one example of this #32-bit behaviour and replaced it with another.

comment:17 Changed 8 years ago by vbraun

John, do you care to comment on this? ;-)

I'm fine with making it a separate ticket, but then make sure that there *is* a separate ticket for that issue and link to it.

comment:18 Changed 8 years ago by cremona

I am wondering why Chris removed me from the CC field....in nay case I received the email when I was added, and now I have written on the ticket so you cannot get rid of me!

I think this can be fixed by changing lines 66-70 of sage/libs/cremona/newforms.pyx:

        a1 = new_bigint(int(E.a1()))
        a2 = new_bigint(int(E.a2()))
        a3 = new_bigint(int(E.a3()))
        a4 = new_bigint(int(E.a4()))
        a6 = new_bigint(int(E.a6()))

Here the E.a1() etc are Sage integers, and they need to be converted into eclib bigints which are exactly NTL ZZs. This should be possible without going via Python ints. The new_bigint function is defined near the top of defs.pxi is a long --> ZZ conversion (just NTL's to_ZZ). If nothing else, I think NTL can convert decimal strings to ZZs so you could try just replacing "int" with "str" in those 5 lines?

comment:19 Changed 8 years ago by wuthrich

I did not "remove" you, of course. But I am puzzled that you were not added when I chose the component. Sorry John.

That would be great if we can can get rid of these 32-bit exceptions. There are 3 such examples in sha_tate and one in newforms, not sure if there are any others, but I could not grep any others....

I am fine if you want to do these changes on this present ticket as wel even if the issue is slightly different. Probably a separate ticket makes more sense. However, I fear I can help out because I have no access to a 32-bit machine to test this.

comment:20 Changed 8 years ago by cremona

I think it would be best to do this on a separate ticket. I can test it on my 6.5-year-old laptop. See #16977. It will not be done immediately since I am still catching up after 2 weeks away, and don't have the laptop in my office anyway.

Last edited 8 years ago by cremona (previous) (diff)

comment:21 Changed 8 years ago by vbraun

If you make the edit then I can test it on the 32-bit buildbot...

comment:22 Changed 8 years ago by wuthrich

ping!

(this should get reviewed as it is in 64bits and 32bits, please. Later the doctests 32-bit can be removed again in #16977.)

comment:23 Changed 7 years ago by pbruin

  • Cc pbruin added

comment:24 Changed 7 years ago by pbruin

  • Dependencies set to #16977
  • Reviewers changed from William Stein to William Stein, Peter Bruin

Working on a reviewer patch (docstring improvements and doctest updates after #16977).

comment:25 Changed 7 years ago by pbruin

  • Branch changed from u/wuthrich/ticket/16959 to u/pbruin/16959-Sha_bound
  • Commit changed from 93d45724d5f8451cf3320e1bde08eaf7fae71e67 to 01e4bb03168ef08f91295b948baaa8c8c34b696d
  • Status changed from needs_review to positive_review

The reviewer patch mostly fixes formatting and typos in docstrings. All tests pass, time to put it back to positive review.

comment:26 Changed 7 years ago by vbraun

  • Branch changed from u/pbruin/16959-Sha_bound to 01e4bb03168ef08f91295b948baaa8c8c34b696d
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.