Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/schemes/elliptic_curves/sha_tate.py
4128 views
1
# -*- coding: utf-8 -*-
2
r"""
3
Tate-Shafarevich group
4
5
If `E` is an elliptic curve over a global field `K`, the Tate-Shafarevich group
6
is the subgroup of elements in `H^1(K,E)` which map to zero under every global-to-local
7
restriction map `H^1(K,E) \to H^1(K_v,E)`, one for each place `v`
8
of `K`.
9
10
The group is usually denoted by the Russian letter Sha, in this document it will be denoted by `Sha`.
11
12
`Sha` is known to be an abelian torsion group. It is conjectured that the Tate-Shafarevich group is finite for any elliptic curve over a global field. But it is not known in general.
13
14
A theorem of Kolyvagin and Gross-Zagier using Heegner points shows that if the L-series of an elliptic curve `E/\QQ` does not
15
vanish at 1 or has a simple zero there, then `Sha` is finite.
16
17
A theorem of Kato, together with theorems from Iwasawa theory, allow for certain primes `p` to show that the `p`-primary part of `Sha` is finite and gives an effective upper bound for it.
18
19
The (`p`-adic) conjecture of Birch and Swinnerton-Dyer predicts the order of `Sha` from the leading term of the (`p`-adic) L-series of the elliptic curve.
20
21
Sage can compute a few things about `Sha`. The commands ``an``,
22
``an_numerical`` and ``an_padic`` compute the conjectural order of `Sha`
23
as a real or `p`-adic number. With ``p_primary_bound`` one can find an
24
upper bound of the size of the `p`-primary part of `Sha`. Finally, if
25
the analytic rank is at most 1, then ``bound_kato`` and
26
``bound_kolyvagin`` find all primes for which we the theorems of Kato
27
and Kolyvagin respectively do not prove the triviality the `p`-primary
28
part of `Sha`.
29
30
EXAMPLES::
31
32
sage: E = EllipticCurve('11a1')
33
sage: S = E.sha()
34
sage: S.bound_kato()
35
[2, 3, 5]
36
sage: S.bound_kolyvagin()
37
([2, 5], 1)
38
sage: S.an_padic(7,3)
39
1 + O(7^5)
40
sage: S.an()
41
1
42
sage: S.an_numerical()
43
1.00000000000000
44
45
sage: E = EllipticCurve('389a')
46
sage: S = E.sha(); S
47
Tate-Shafarevich group for the Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field
48
sage: S.an_numerical()
49
1.00000000000000
50
sage: S.p_primary_bound(5)
51
0
52
sage: S.an_padic(5)
53
1 + O(5)
54
sage: S.an_padic(5,prec=4) # long time (2s on sage.math, 2011)
55
1 + O(5^3)
56
57
58
AUTHORS:
59
60
- William Stein (2007) -- initial version
61
62
- Chris Wuthrich (April 2009) -- reformat docstrings
63
64
"""
65
#*****************************************************************************
66
# Copyright (C) 2007 William Stein <[email protected]>
67
#
68
# Distributed under the terms of the GNU General Public License (GPL)
69
# as published by the Free Software Foundation; either version 2 of
70
# the License, or (at your option) any later version.
71
# http://www.gnu.org/licenses/
72
#*****************************************************************************
73
74
from sage.structure.sage_object import SageObject
75
from sage.rings.all import (
76
Integer,
77
RealField,
78
RationalField,
79
RIF,
80
ZZ)
81
from sage.misc.functional import log
82
from math import sqrt
83
from sage.misc.all import verbose
84
import sage.rings.arith as arith
85
from sage.rings.padics.factory import Qp
86
87
factor = arith.factor
88
valuation = arith.valuation
89
Q = RationalField()
90
91
class Sha(SageObject):
92
r"""
93
The Tate-Shafarevich group associated to an elliptic curve.
94
95
If `E` is an elliptic curve over a global field `K`, the Tate-Shafarevich group
96
is the subgroup of elements in `H^1(K,E)` which map to zero under every global-to-local
97
restriction map `H^1(K,E) \to H^1(K_v,E)`, one for each place `v`
98
of `K`.
99
100
EXAMPLES::
101
102
sage: E = EllipticCurve('571a1')
103
sage: E._set_gens([])
104
sage: S = E.sha()
105
sage: S.bound_kato()
106
[2, 3]
107
sage: S.bound_kolyvagin()
108
([2], 1)
109
sage: S.an_padic(7,3)
110
4 + O(7^5)
111
sage: S.an()
112
4
113
sage: S.an_numerical()
114
4.00000000000000
115
116
sage: E = EllipticCurve('389a')
117
sage: S = E.sha(); S
118
Tate-Shafarevich group for the Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field
119
sage: S.an_numerical()
120
1.00000000000000
121
sage: S.p_primary_bound(5) # long time
122
0
123
sage: S.an_padic(5) # long time
124
1 + O(5)
125
sage: S.an_padic(5,prec=4) # long time
126
1 + O(5^3)
127
128
"""
129
def __init__(self, E):
130
r"""
131
The Tate-Shafarevich group associated to an elliptic curve.
132
133
INPUT:
134
a elliptic curve over `\QQ`
135
136
EXAMPLES::
137
138
sage: E = EllipticCurve('11a1')
139
sage: S = E.sha()
140
sage: S
141
Tate-Shafarevich group for the Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
142
143
sage: S == loads(dumps(S))
144
True
145
146
"""
147
self.E = E
148
self.Emin = E.minimal_model() if not E.is_minimal() else E
149
150
def __cmp__(self,other):
151
r"""
152
Compares two Tate-Shafarevich groups by simply comparing the elliptic curves.
153
154
EXAMPLES::
155
156
sage: E = EllipticCurve('37a1')
157
sage: S = E.sha()
158
sage: S == S
159
True
160
"""
161
c = cmp(type(self), type(other))
162
if c:
163
return c
164
return cmp(self.E, other.E)
165
166
def __repr__(self):
167
r"""
168
String representation of the Tate-Shafarevich group.
169
170
EXAMPLES::
171
172
sage: E = EllipticCurve('11a1')
173
sage: S = E.sha()
174
sage: S.__repr__()
175
'Tate-Shafarevich group for the Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field'
176
177
"""
178
return "Tate-Shafarevich group for the " + repr(self.E)
179
180
########################################################################
181
# Functions related to the BSD conjecture.
182
########################################################################
183
184
def an_numerical(self, prec = None,
185
use_database=True, proof=None):
186
r"""
187
Return the numerical analytic order of `Sha`, which is
188
a floating point number in all cases.
189
190
INPUT:
191
192
- ``prec`` - integer (default: 53) bits precision -- used
193
for the L-series computation, period, regulator, etc.
194
- ``use_database`` - whether the rank and generators should
195
be looked up in the database if possible. Default is True
196
- ``proof`` - bool or None (default: None, see proof.[tab] or
197
sage.structure.proof) proof option passed
198
onto regulator and rank computation.
199
200
.. note::
201
See also the an() command, which will return a
202
provably correct integer when the rank is 0 or 1.
203
204
.. WARNING::
205
If the curve's generators are not known, computing
206
them may be very time-consuming. Also, computation of the
207
L-series derivative will be time-consuming for large rank and
208
large conductor, and the computation time for this may
209
increase substantially at greater precision. However, use of
210
very low precision less than about 10 can cause the underlying
211
PARI library functions to fail.
212
213
EXAMPLES::
214
215
sage: EllipticCurve('11a').sha().an_numerical()
216
1.00000000000000
217
sage: EllipticCurve('37a').sha().an_numerical()
218
1.00000000000000
219
sage: EllipticCurve('389a').sha().an_numerical()
220
1.00000000000000
221
sage: EllipticCurve('66b3').sha().an_numerical()
222
4.00000000000000
223
sage: EllipticCurve('5077a').sha().an_numerical()
224
1.00000000000000
225
226
A rank 4 curve::
227
228
sage: EllipticCurve([1, -1, 0, -79, 289]).sha().an_numerical() # long time (3s on sage.math, 2011)
229
1.00000000000000
230
231
A rank 5 curve::
232
233
sage: EllipticCurve([0, 0, 1, -79, 342]).sha().an_numerical(prec=10, proof=False) # long time (22s on sage.math, 2011)
234
1.0
235
236
See trac #1115::
237
238
sage: sha=EllipticCurve('37a1').sha()
239
sage: [sha.an_numerical(prec) for prec in xrange(40,100,10)]
240
[1.0000000000,
241
1.0000000000000,
242
1.0000000000000000,
243
1.0000000000000000000,
244
1.0000000000000000000000,
245
1.0000000000000000000000000]
246
"""
247
if prec is None:
248
prec = RealField().precision()
249
RR = RealField(prec)
250
prec2 = prec+2
251
RR2 = RealField(prec2)
252
try:
253
an = self.__an_numerical
254
if an.parent().precision() >= prec:
255
return RR(an)
256
else: # cached precision too low
257
pass
258
except AttributeError:
259
pass
260
# it's critical to switch to the minimal model.
261
E = self.Emin
262
r = Integer(E.rank(use_database=use_database, proof=proof))
263
L = E.lseries().dokchitser(prec=prec2)
264
Lr= RR2(L.derivative(1,r)) # L.derivative() returns a Complex
265
Om = RR2(E.period_lattice().omega(prec2))
266
Reg = E.regulator(use_database=use_database, proof=proof, precision=prec2)
267
T = E.torsion_order()
268
cp = E.tamagawa_product()
269
Sha = RR((Lr*T*T)/(r.factorial()*Om*cp*Reg))
270
self.__an_numerical = Sha
271
return Sha
272
273
def an(self, use_database=False, descent_second_limit=12):
274
r"""
275
Returns the Birch and Swinnerton-Dyer conjectural order of `Sha`
276
as a provably correct integer, unless the analytic rank is > 1,
277
in which case this function returns a numerical value.
278
279
INPUT:
280
281
- ``use_database`` -- bool (default: False); if True, try to use any
282
databases installed to lookup the analytic order of `Sha`, if
283
possible. The order of `Sha` is computed if it can't be looked up.
284
285
- ``descent_second_limit`` -- int (default: 12); limit to use on
286
point searching for the quartic twist in the hard case
287
288
This result is proved correct if the order of vanishing is 0
289
and the Manin constant is <= 2.
290
291
If the optional parameter ``use_database`` is True (default:
292
False), this function returns the analytic order of `Sha` as
293
listed in Cremona's tables, if this curve appears in Cremona's
294
tables.
295
296
NOTE:
297
298
If you come across the following error::
299
300
sage: E = EllipticCurve([0, 0, 1, -34874, -2506691])
301
sage: E.sha().an()
302
Traceback (most recent call last):
303
...
304
RuntimeError: Unable to compute the rank, hence generators, with certainty (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is nontrivial.
305
Try increasing descent_second_limit then trying this command again.
306
307
You can increase the ``descent_second_limit`` (in the above example,
308
set to the default, 12) option to try again::
309
310
sage: E.sha().an(descent_second_limit=16) # long time (2s on sage.math, 2011)
311
1
312
313
EXAMPLES::
314
315
sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
316
sage: E.sha().an()
317
1
318
sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
319
sage: E.sha().an()
320
1
321
322
sage: EllipticCurve('14a4').sha().an()
323
1
324
sage: EllipticCurve('14a4').sha().an(use_database=True) # will be faster if you have large Cremona database installed
325
1
326
327
The smallest conductor curve with nontrivial `Sha`::
328
329
sage: E = EllipticCurve([1,1,1,-352,-2689]) # 66b3
330
sage: E.sha().an()
331
4
332
333
The four optimal quotients with nontrivial `Sha` and conductor <= 1000::
334
335
sage: E = EllipticCurve([0, -1, 1, -929, -10595]) # 571A
336
sage: E.sha().an()
337
4
338
sage: E = EllipticCurve([1, 1, 0, -1154, -15345]) # 681B
339
sage: E.sha().an()
340
9
341
sage: E = EllipticCurve([0, -1, 0, -900, -10098]) # 960D
342
sage: E.sha().an()
343
4
344
sage: E = EllipticCurve([0, 1, 0, -20, -42]) # 960N
345
sage: E.sha().an()
346
4
347
348
The smallest conductor curve of rank > 1::
349
350
sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
351
sage: E.sha().an()
352
1.00000000000000
353
354
The following are examples that require computation of the Mordell-Weil
355
group and regulator::
356
357
sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
358
sage: E.sha().an()
359
1
360
361
sage: E = EllipticCurve("1610f3")
362
sage: E.sha().an()
363
4
364
365
In this case the input curve is not minimal, and if this function didn't
366
transform it to be minimal, it would give nonsense::
367
368
sage: E = EllipticCurve([0,-432*6^2])
369
sage: E.sha().an()
370
1
371
372
See trac #10096: this used to give the wrong result 6.0000
373
before since the minimal model was not used::
374
375
sage: E = EllipticCurve([1215*1216,0]) # non-minimal model
376
sage: E.sha().an() # long time (2s on sage.math, 2011)
377
1.00000000000000
378
sage: E.minimal_model().sha().an() # long time (1s on sage.math, 2011)
379
1.00000000000000
380
"""
381
if hasattr(self, '__an'):
382
return self.__an
383
if use_database:
384
d = self.Emin.database_curve()
385
if hasattr(d, 'db_extra'):
386
self.__an = Integer(round(float(d.db_extra[4])))
387
return self.__an
388
389
# it's critical to switch to the minimal model.
390
E = self.Emin
391
eps = E.root_number()
392
if eps == 1:
393
L1_over_omega = E.lseries().L_ratio()
394
if L1_over_omega == 0: # order of vanishing is at least 2
395
return self.an_numerical(use_database=use_database)
396
T = E.torsion_subgroup().order()
397
Sha = (L1_over_omega * T * T) / Q(E.tamagawa_product())
398
try:
399
Sha = Integer(Sha)
400
except ValueError:
401
raise RuntimeError, \
402
"There is a bug in an, since the computed conjectural order of Sha is %s, which is not an integer."%Sha
403
if not arith.is_square(Sha):
404
raise RuntimeError, \
405
"There is a bug in an, since the computed conjectural order of Sha is %s, which is not a square."%Sha
406
E.__an = Sha
407
self.__an = Sha
408
return Sha
409
410
else: # rank > 0 (Not provably correct)
411
L1, error_bound = E.lseries().deriv_at1(10*sqrt(E.conductor()) + 10)
412
if abs(L1) < error_bound:
413
s = self.an_numerical()
414
E.__an = s
415
self.__an = s
416
return s
417
418
regulator = E.regulator(use_database=use_database, descent_second_limit=descent_second_limit)
419
T = E.torsion_subgroup().order()
420
omega = E.period_lattice().omega()
421
Sha = Integer(round ( (L1 * T * T) / (E.tamagawa_product() * regulator * omega) ))
422
try:
423
Sha = Integer(Sha)
424
except ValueError:
425
raise RuntimeError, \
426
"There is a bug in an, since the computed conjectural order of Sha is %s, which is not an integer."%Sha
427
if not arith.is_square(Sha):
428
raise RuntimeError, \
429
"There is a bug in an, since the computed conjectural order of Sha is %s, which is not a square."%Sha
430
E.__an = Sha
431
self.__an = Sha
432
return Sha
433
434
def an_padic(self, p, prec=0, use_twists=True):
435
r"""
436
Returns the conjectural order of `Sha(E/\QQ)`,
437
according to the `p`-adic analogue of the Birch
438
and Swinnerton-Dyer conjecture as formulated
439
in [MTT] and [BP].
440
441
REFERENCES:
442
443
- [MTT] B. Mazur, J. Tate, and J. Teitelbaum,
444
On `p`-adic analogues of the conjectures of Birch and
445
Swinnerton-Dyer, Inventiones mathematicae 84, (1986), 1-48.
446
447
- [BP] Dominique Bernardi and Bernadette Perrin-Riou,
448
Variante `p`-adique de la conjecture de Birch et
449
Swinnerton-Dyer (le cas supersingulier), C. R. Acad. Sci. Paris,
450
Ser I. Math, 317 (1993), no 3, 227-232.
451
452
- [SW] William Stein and Christian Wuthrich, Computations About Tate-Shafarevich Groups
453
using Iwasawa theory, preprint 2009.
454
455
456
INPUT:
457
458
- ``p`` - a prime > 3
459
460
- ``prec`` (optional) - the precision used in the computation of the `p`-adic L-Series
461
462
- ``use_twists`` (default = True) - If true the algorithm may change
463
to a quadratic twist with minimal conductor to do the modular
464
symbol computations rather than using the modular symbols of the
465
curve itself. If False it forces the computation using the
466
modular symbols of the curve itself.
467
468
OUTPUT: `p`-adic number - that conjecturally equals `\# Sha(E/\QQ)`.
469
470
If prec is set to zero (default) then the precision is set so that
471
at least the first `p`-adic digit of conjectural `\# Sha(E/\QQ)` is
472
determined.
473
474
EXAMPLES:
475
476
Good ordinary examples::
477
478
sage: EllipticCurve('11a1').sha().an_padic(5) # rank 0
479
1 + O(5^2)
480
sage: EllipticCurve('43a1').sha().an_padic(5) # rank 1
481
1 + O(5)
482
sage: EllipticCurve('389a1').sha().an_padic(5,4) # rank 2, long time (2s on sage.math, 2011)
483
1 + O(5^3)
484
sage: EllipticCurve('858k2').sha().an_padic(7) # rank 0, non trivial sha, long time (10s on sage.math, 2011)
485
7^2 + O(7^6)
486
sage: EllipticCurve('300b2').sha().an_padic(3) # 9 elements in sha, long time (2s on sage.math, 2011)
487
3^2 + O(3^6)
488
sage: EllipticCurve('300b2').sha().an_padic(7, prec=6) # long time
489
2 + 7 + O(7^8)
490
491
Exceptional cases::
492
493
sage: EllipticCurve('11a1').sha().an_padic(11) # rank 0
494
1 + O(11^2)
495
sage: EllipticCurve('130a1').sha().an_padic(5) # rank 1
496
1 + O(5)
497
498
Non-split, but rank 0 case (trac #7331)::
499
500
sage: EllipticCurve('270b1').sha().an_padic(5) # rank 0, long time (2s on sage.math, 2011)
501
1 + O(5^2)
502
503
The output has the correct sign::
504
505
sage: EllipticCurve('123a1').sha().an_padic(41) # rank 1, long time (3s on sage.math, 2011)
506
1 + O(41)
507
508
Supersingular cases::
509
510
sage: EllipticCurve('34a1').sha().an_padic(5) # rank 0
511
1 + O(5^2)
512
sage: EllipticCurve('53a1').sha().an_padic(5) # rank 1, long time (11s on sage.math, 2011)
513
1 + O(5)
514
515
Cases that use a twist to a lower conductor::
516
517
sage: EllipticCurve('99a1').sha().an_padic(5)
518
1 + O(5)
519
sage: EllipticCurve('240d3').sha().an_padic(5) # sha has 4 elements here
520
4 + O(5)
521
sage: EllipticCurve('448c5').sha().an_padic(7,prec=4, use_twists=False) # long time (2s on sage.math, 2011)
522
2 + 7 + O(7^6)
523
sage: EllipticCurve([-19,34]).sha().an_padic(5) # see trac 6455, long time (4s on sage.math, 2011)
524
1 + O(5)
525
"""
526
try:
527
return self.__an_padic[(p,prec)]
528
except AttributeError:
529
self.__an_padic = {}
530
except KeyError:
531
pass
532
533
E = self.Emin
534
tam = E.tamagawa_product()
535
tors = E.torsion_order()**2
536
reg = E.padic_regulator(p)
537
# todo : here we should cache the rank computation
538
r = E.rank()
539
540
541
if use_twists and p > 2:
542
Et, D = E.minimal_quadratic_twist()
543
# trac 6455 : we have to assure that the twist back is allowed
544
D = ZZ(D)
545
if D % p == 0:
546
D = D/p
547
for ell in D.prime_divisors():
548
if ell % 2 == 1:
549
if Et.conductor() % ell**2 == 0:
550
D = D/ell
551
ve = valuation(D,2)
552
de = (D/2**ve).abs()
553
if de % 4 == 3:
554
de = -de
555
Et = E.quadratic_twist(de)
556
# now check individually if we can twist by -1 or 2 or -2
557
Nmin = Et.conductor()
558
Dmax = de
559
for DD in [-4*de,8*de,-8*de]:
560
Et = E.quadratic_twist(DD)
561
if Et.conductor() < Nmin and valuation(Et.conductor(),2) <= valuation(DD,2):
562
Nmin = Et.conductor()
563
Dmax = DD
564
D = Dmax
565
Et = E.quadratic_twist(D)
566
lp = Et.padic_lseries(p)
567
else :
568
lp = E.padic_lseries(p)
569
D = 1
570
571
if r == 0 and D == 1:
572
# short cut for rank 0 curves, we do not
573
# to compute the p-adic L-function, the leading
574
# term will be the L-value divided by the Neron
575
# period.
576
ms = E.modular_symbol(sign=+1, normalize='L_ratio')
577
lstar = ms(0)/E.real_components()
578
bsd = tam/tors
579
if prec == 0:
580
prec = valuation(lstar/bsd, p)
581
shan = Qp(p,prec=prec+2)(lstar/bsd)
582
583
584
elif E.is_ordinary(p):
585
K = reg.parent()
586
lg = log(K(1+p))
587
588
if (E.is_good(p) or E.ap(p) == -1):
589
if not E.is_good(p):
590
eps = 2
591
else:
592
eps = (1-arith.kronecker_symbol(D,p)/lp.alpha())**2
593
# according to the p-adic BSD this should be equal to the leading term of the p-adic L-series divided by sha:
594
bsdp = tam * reg * eps/tors/lg**r
595
else:
596
r += 1 # exceptional zero
597
eq = E.tate_curve(p)
598
Li = eq.L_invariant()
599
600
# according to the p-adic BSD (Mazur-Tate-Teitelbaum)
601
# this should be equal to the leading term of the p-adic L-series divided by sha:
602
bsdp = tam * reg * Li/tors/lg**r
603
604
605
v = bsdp.valuation()
606
if v > 0:
607
verbose("the prime is irregular.")
608
609
# determine how much prec we need to prove at least the triviality of
610
# the p-primary part of Sha
611
612
if prec == 0:
613
n = max(v,2)
614
bounds = lp._prec_bounds(n,r+1)
615
while bounds[r] <= v:
616
n += 1
617
bounds = lp._prec_bounds(n,r+1)
618
verbose("set precision to %s"%n)
619
else:
620
n = max(2,prec)
621
622
not_yet_enough_prec = True
623
while not_yet_enough_prec:
624
lps = lp.series(n,quadratic_twist=D,prec=r+1)
625
lstar = lps[r]
626
if (lstar != 0) or (prec != 0):
627
not_yet_enough_prec = False
628
else:
629
n += 1
630
verbose("increased precision to %s"%n)
631
632
shan = lstar/bsdp
633
634
elif E.is_supersingular(p):
635
K = reg[0].parent()
636
lg = log(K(1+p))
637
638
639
# according to the p-adic BSD this should be equal to the leading term of the D_p - valued
640
# L-series :
641
bsdp = tam /tors/lg**r * reg
642
# note this is an element in Q_p^2
643
644
verbose("the algebraic leading terms : %s"%bsdp)
645
646
v = [bsdp[0].valuation(),bsdp[1].valuation()]
647
648
if prec == 0:
649
n = max(min(v)+2,3)
650
else:
651
n = max(3,prec)
652
653
verbose("...computing the p-adic L-series")
654
not_yet_enough_prec = True
655
while not_yet_enough_prec:
656
lps = lp.Dp_valued_series(n,quadratic_twist=D,prec=r+1)
657
lstar = [lps[0][r],lps[1][r]]
658
verbose("the leading terms : %s"%lstar)
659
if (lstar[0] != 0 or lstar[1] != 0) or ( prec != 0):
660
not_yet_enough_prec = False
661
else:
662
n += 1
663
verbose("increased precision to %s"%n)
664
665
verbose("...putting things together")
666
if bsdp[0] != 0:
667
shan0 = lstar[0]/bsdp[0]
668
else:
669
shan0 = 0 # this should actually never happen
670
if bsdp[1] != 0:
671
shan1 = lstar[1]/bsdp[1]
672
else:
673
shan1 = 0 # this should conjecturally only happen when the rank is 0
674
verbose("the two values for Sha : %s"%[shan0,shan1])
675
676
# check consistency (the first two are only here to avoid a bug in the p-adic L-series
677
# (namely the coefficients of zero-relative precision are treated as zero)
678
if shan0 != 0 and shan1 != 0 and shan0 - shan1 != 0:
679
raise RuntimeError, "There must be a bug in the supersingular routines for the p-adic BSD."
680
681
#take the better
682
if shan1 == 0 or shan0.precision_relative() > shan1.precision_relative():
683
shan = shan0
684
else:
685
shan = shan1
686
687
else:
688
raise ValueError, "The curve has to have semi-stable reduction at p."
689
690
self.__an_padic[(p,prec)] = shan
691
return shan
692
693
694
def p_primary_bound(self, p):
695
r"""
696
Returns a provable upper bound for the order of `Sha(E)(p)`. In particular,
697
if this algorithm does not fail, then it proves that the `p`-primary
698
part of `Sha` is finite.
699
700
INPUT: ``p`` -- a prime > 2
701
702
OUTPUT: integer -- power of `p` that bounds the order of `Sha(E)(p)` from above
703
704
The result is a proven upper bound on the order of `Sha(E)(p)`.
705
So in particular it proves it finiteness even if the rank of
706
the curve is larger than 1. Note also that this bound is sharp
707
if one assumes the main conjecture of Iwasawa theory of
708
elliptic curves (and this is known in certain cases).
709
710
Currently the algorithm is only implemented when certain conditions are verified.
711
712
- The mod `p` Galois representation must be surjective.
713
- The reduction at `p` is not allowed to be additive.
714
- If the reduction at `p` is non-split multiplicative, then the rank has to be 0.
715
- If `p=3` then the reduction at 3 must be good ordinary or split multiplicative and the rank must be 0.
716
717
718
EXAMPLES::
719
720
sage: e = EllipticCurve('11a3')
721
sage: e.sha().p_primary_bound(3)
722
0
723
sage: e.sha().p_primary_bound(7)
724
0
725
sage: e.sha().p_primary_bound(11)
726
0
727
sage: e.sha().p_primary_bound(13)
728
0
729
730
sage: e = EllipticCurve('389a1')
731
sage: e.sha().p_primary_bound(5)
732
0
733
sage: e.sha().p_primary_bound(7)
734
0
735
sage: e.sha().p_primary_bound(11)
736
0
737
sage: e.sha().p_primary_bound(13)
738
0
739
740
sage: e = EllipticCurve('858k2')
741
sage: e.sha().p_primary_bound(3) # long time (10s on sage.math, 2011)
742
0
743
744
# checks for trac 6406
745
sage: e.sha().p_primary_bound(7)
746
Traceback (most recent call last):
747
...
748
ValueError: The mod-p Galois representation is not surjective. Current knowledge about Euler systems does not provide an upper bound in this case. Try an_padic for a conjectural bound.
749
sage: e.sha().an_padic(7) # long time (depends on "e.sha().p_primary_bound(3)" above)
750
7^2 + O(7^6)
751
752
sage: e = EllipticCurve('11a3')
753
sage: e.sha().p_primary_bound(5)
754
Traceback (most recent call last):
755
...
756
ValueError: The mod-p Galois representation is not surjective. Current knowledge about Euler systems does not provide an upper bound in this case. Try an_padic for a conjectural bound.
757
sage: e.sha().an_padic(5)
758
1 + O(5^2)
759
760
"""
761
p = Integer(p)
762
E = self.Emin
763
if E.is_ordinary(p) or E.is_good(p):
764
su = E.galois_representation().is_surjective(p)
765
if not su :
766
raise ValueError, "The mod-p Galois representation is not surjective. Current knowledge about Euler systems does not provide an upper bound in this case. Try an_padic for a conjectural bound."
767
shan = self.an_padic(p,prec = 0,use_twists=True)
768
if shan == 0:
769
raise RuntimeError, "There is a bug in an_padic."
770
S = shan.valuation()
771
else:
772
raise ValueError, "The curve has to have semi-stable reduction at p."
773
774
return S
775
776
def two_selmer_bound(self):
777
r"""
778
This returns the 2-rank, i.e. the `\GF{2}`-dimension
779
of the 2-torsion part of `Sha`, provided we can determine the
780
rank of `E`.
781
782
EXAMPLES::
783
784
sage: sh = EllipticCurve('571a1').sha()
785
sage: sh.two_selmer_bound()
786
2
787
sage: sh.an()
788
4
789
790
sage: sh = EllipticCurve('66a1').sha()
791
sage: sh.two_selmer_bound()
792
0
793
sage: sh.an()
794
1
795
796
sage: sh = EllipticCurve('960d1').sha()
797
sage: sh.two_selmer_bound()
798
2
799
sage: sh.an()
800
4
801
"""
802
E = self.Emin
803
S = E.selmer_rank()
804
r = E.rank()
805
t = E.two_torsion_rank()
806
b = S - r - t
807
if b < 0 :
808
b = 0
809
return b
810
811
def bound_kolyvagin(self, D=0, regulator=None,
812
ignore_nonsurj_hypothesis=False):
813
r"""
814
Given a fundamental discriminant `D \neq -3,-4` that satisfies the
815
Heegner hypothesis for `E`, return a list of primes so that
816
Kolyvagin's theorem (as in Gross's paper) implies that any
817
prime divisor of `Sha` is in this list.
818
819
INPUT:
820
821
- ``D`` - (optional) a fundamental discriminant < -4 that satisfies the
822
Heegner hypothesis for `E`; if not given, use the first such `D`
823
- ``regulator`` -- (optional) regulator of `E(K)`; if not given, will
824
be computed (which could take a long time)
825
- ``ignore_nonsurj_hypothesis`` (optional: default False) --
826
If True, then gives the bound coming from Heegner point
827
index, but without any hypothesis on surjectivity
828
of the mod-`p` representation.
829
830
OUTPUT:
831
832
- list - a list of primes such that if `p` divides `Sha(E/K)`, then
833
`p` is in this list, unless `E/K` has complex multiplication or
834
analytic rank greater than 2 (in which case we return 0).
835
836
- index - the odd part of the index of the Heegner point in the full
837
group of `K`-rational points on E. (If `E` has CM, returns 0.)
838
839
REMARKS:
840
841
1) We do not have to assume that the Manin constant is 1
842
(or a power of 2). If the Manin constant were
843
divisible by a prime, that prime would get included in
844
the list of bad primes.
845
846
2) We assume the Gross-Zagier theorem is True under the
847
hypothesis that `gcd(N,D) = 1`, instead of the stronger
848
hypothesis `gcd(2\cdot N,D)=1` that is in the original
849
Gross-Zagier paper. That Gross-Zagier is true when
850
`gcd(N,D)=1` is"well-known" to the experts, but doesn't
851
seem to written up well in the literature.
852
853
3) Correctness of the computation is guaranteed using
854
interval arithmetic, under the assumption that the
855
regulator, square root, and period lattice are
856
computed to precision at least `10^{-10}`, i.e., they are
857
correct up to addition or a real number with absolute
858
value less than `10^{-10}`.
859
860
EXAMPLES::
861
862
sage: E = EllipticCurve('37a')
863
sage: E.sha().bound_kolyvagin()
864
([2], 1)
865
sage: E = EllipticCurve('141a')
866
sage: E.sha().an()
867
1
868
sage: E.sha().bound_kolyvagin()
869
([2, 7], 49)
870
871
We get no information when the curve has rank 2.::
872
873
sage: E = EllipticCurve('389a')
874
sage: E.sha().bound_kolyvagin()
875
(0, 0)
876
sage: E = EllipticCurve('681b')
877
sage: E.sha().an()
878
9
879
sage: E.sha().bound_kolyvagin()
880
([2, 3], 9)
881
882
"""
883
E = self.Emin
884
if E.has_cm():
885
return 0, 0
886
887
if D == 0:
888
D = -5
889
while not E.satisfies_heegner_hypothesis(D):
890
D -= 1
891
892
if not E.satisfies_heegner_hypothesis(D):
893
raise ArithmeticError, "Discriminant (=%s) must be a fundamental discriminant that satisfies the Heegner hypothesis."%D
894
if D == -3 or D == -4:
895
raise ArithmeticError, "Discriminant (=%s) must not be -3 or -4."%D
896
eps = E.root_number()
897
L1_vanishes = E.lseries().L1_vanishes()
898
if eps == 1 and L1_vanishes:
899
return 0, 0 # rank even hence >= 2, so Kolyvagin gives nothing.
900
alpha = sqrt(abs(D))/(2*E.period_lattice().complex_area())
901
F = E.quadratic_twist(D)
902
k_E = 2*sqrt(E.conductor()) + 10
903
k_F = 2*sqrt(F.conductor()) + 10
904
#k_E = 2
905
#k_F = 2
906
907
MIN_ERR = 1e-10 # we assume that regulator and
908
# discriminant, etc., computed to this accuracy.
909
tries = 0
910
while True:
911
tries += 1
912
if tries >= 6:
913
raise RuntimeError, "Too many precision increases in bound_kolyvagin"
914
if eps == 1: # E has even rank
915
verbose("Conductor of twist = %s"%F.conductor())
916
LF1, err_F = F.lseries().deriv_at1(k_F)
917
LE1, err_E = E.lseries().at1(k_E)
918
err_F = max(err_F, MIN_ERR)
919
err_E = max(err_E, MIN_ERR)
920
if regulator != None:
921
hZ = regulator/2
922
else:
923
hZ = F.regulator(use_database=True)/2
924
#print alpha * LE1 * LF1 / hZ
925
I = RIF(alpha) * RIF(LE1-err_E,LE1+err_E) * RIF(LF1-err_F,LF1+err_F) / hZ
926
#print I
927
928
else: # E has odd rank
929
930
if regulator != None:
931
hZ = regulator/2
932
else:
933
hZ = E.regulator(use_database=True)/2
934
LE1, err_E = E.lseries().deriv_at1(k_E)
935
LF1, err_F = F.lseries().at1(k_F)
936
err_F = max(err_F, MIN_ERR)
937
err_E = max(err_E, MIN_ERR)
938
#I = alpha * LE1 * LF1 / hZ
939
940
I = RIF(alpha) * RIF(LE1-err_E,LE1+err_E) * RIF(LF1-err_F,LF1+err_F) / hZ
941
942
verbose('interval = %s'%I)
943
t, n = I.is_int()
944
if t:
945
break
946
elif I.absolute_diameter() < 1:
947
raise RuntimeError, "Problem in bound_kolyvagin; square of index is not an integer -- D=%s, I=%s."%(D,I)
948
verbose("Doubling bounds")
949
k_E *= 2
950
k_F *= 2
951
# end while
952
953
# We include 2 since Kolyvagin (in Gross) says nothing there
954
if n == 0: return 0, 0 # no bound
955
F = factor(n)
956
B = [2]
957
for p, e in factor(n):
958
if p > 2:
959
if e%2 != 0:
960
raise RuntimeError, "Problem in bound_kolyvagin; square of index is not a perfect square! D=%s, I=%s, n=%s, e=%s."%(D,I,n,e)
961
B.append(p)
962
else:
963
n /= 2**e # replace n by its odd part
964
if not ignore_nonsurj_hypothesis:
965
for p in E.galois_representation().non_surjective():
966
B.append(p)
967
B = list(set([int(x) for x in B]))
968
B.sort()
969
return B, n
970
971
972
def bound_kato(self):
973
r"""
974
Returns a list `p` of primes such that the theorems of Kato's [Ka]
975
and others (e.g., as explained in a paper/thesis of Grigor
976
Grigorov [Gri]) imply that if `p` divides the order of `Sha(E/\QQ)` then `p` is in
977
the list.
978
979
If `L(E,1) = 0`, then this function gives no information, so
980
it returns False.
981
982
THEOREM (Kato): Suppose `L(E,1) \neq 0` and `p \neq 2, 3` is a prime such that
983
984
- `E` does not have additive reduction at `p`,
985
- the mod-`p` representation is surjective.
986
987
Then `{ord}_p(\#Sha(E))` divides `{ord}_p(L(E,1)\cdot\#E(\QQ)_{tor}^2/(\Omega_E \cdot \prod c_q))`.
988
989
EXAMPLES::
990
991
sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
992
sage: E.sha().bound_kato()
993
[2, 3, 5]
994
sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
995
sage: E.sha().bound_kato()
996
[2, 3, 5]
997
sage: E = EllipticCurve([1,1,1,-352,-2689]) # 66B3
998
sage: E.sha().bound_kato()
999
[2, 3]
1000
1001
For the following curve one really has that 25 divides the order of `Sha` (by Grigorov-Stein paper [GS])::
1002
1003
sage: E = EllipticCurve([1, -1, 0, -332311, -73733731]) # 1058D1
1004
sage: E.sha().bound_kato() # long time (about 1 second)
1005
[2, 3, 5, 23]
1006
sage: E.galois_representation().non_surjective() # long time (about 1 second)
1007
[]
1008
1009
For this one, `Sha` is divisible by 7::
1010
1011
sage: E = EllipticCurve([0, 0, 0, -4062871, -3152083138]) # 3364C1
1012
sage: E.sha().bound_kato() # long time (< 10 seconds)
1013
[2, 3, 7, 29]
1014
1015
No information about curves of rank > 0::
1016
1017
sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
1018
sage: E.sha().bound_kato()
1019
False
1020
1021
REFERENCES:
1022
1023
- [Ka] Kayuza Kato, `p`-adic Hodge theory and values of zeta functions of modular
1024
forms, Cohomologies `p`-adiques et applications arithmetiques III,
1025
Asterisque vol 295, SMF, Paris, 2004.
1026
1027
- [Gri]
1028
1029
- [GS]
1030
1031
"""
1032
E = self.Emin
1033
if E.has_cm():
1034
return False
1035
if E.lseries().L1_vanishes():
1036
return False
1037
B = [2, 3]
1038
for p in E.galois_representation().non_surjective():
1039
if p > 3:
1040
B.append(p)
1041
N = E.conductor()
1042
for p in E.conductor().prime_divisors():
1043
if E.has_additive_reduction(p) and p not in B:
1044
B.append(p)
1045
1046
# The only other p that might divide B are those that divide
1047
# the integer 2*#E(Q)_tor^2 * L(E,1)/omega. So we compute
1048
# that to sufficient precision to determine it. Note that
1049
# we have to assume the Manin constant is <=2 in order to provably
1050
# compute L(E,1)/omega.
1051
for p, n in factor(self.an()):
1052
if n >= 2: # use parity of Sha
1053
B.append(int(p))
1054
B = list(set(B))
1055
B.sort()
1056
return B
1057
1058
def bound(self):
1059
r"""
1060
Compute a provably correct bound on the order of the Tate-Shafarevich
1061
group of this curve. The bound is a either False (no bound) or a list
1062
``B`` of primes such that any divisor of `Sha` is in this list.
1063
1064
EXAMPLES::
1065
1066
sage: EllipticCurve('37a').sha().bound()
1067
([2], 1)
1068
"""
1069
if self.Emin.lseries().L1_vanishes():
1070
B = self.bound_kolyvagin()
1071
else:
1072
B = self.bound_kato()
1073
return B
1074
1075
1076