Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/schemes/elliptic_curves/lseries_ell.py
8820 views
1
"""
2
Complex Elliptic Curve L-series
3
4
AUTHORS:
5
6
- Jeroen Demeyer (2013-10-17): compute L series with arbitrary precision
7
instead of floats.
8
9
- William Stein et al. (2005 and later)
10
11
"""
12
#*****************************************************************************
13
# Copyright (C) 2005 William Stein
14
# Copyright (C) 2013 Jeroen Demeyer
15
#
16
# Distributed under the terms of the GNU General Public License (GPL)
17
# as published by the Free Software Foundation; either version 2 of
18
# the License, or (at your option) any later version.
19
# http://www.gnu.org/licenses/
20
#*****************************************************************************
21
22
from sage.structure.sage_object import SageObject
23
from sage.rings.all import RealField, RationalField
24
from math import sqrt, exp, log, ceil
25
import sage.functions.exp_integral as exp_integral
26
import sage.misc.all as misc
27
28
class Lseries_ell(SageObject):
29
"""
30
An elliptic curve $L$-series.
31
"""
32
def __init__(self, E):
33
"""
34
Create an elliptic curve $L$-series.
35
36
EXAMPLES::
37
38
sage: EllipticCurve([1..5]).lseries()
39
Complex L-series of the Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
40
"""
41
self.__E = E
42
43
def elliptic_curve(self):
44
"""
45
Return the elliptic curve that this L-series is attached to.
46
47
EXAMPLES::
48
49
sage: E = EllipticCurve('389a')
50
sage: L = E.lseries()
51
sage: L.elliptic_curve ()
52
Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field
53
"""
54
return self.__E
55
56
def taylor_series(self, a=1, prec=53, series_prec=6, var='z'):
57
"""
58
Return the Taylor series of this $L$-series about $a$ to
59
the given precision (in bits) and the number of terms.
60
61
The output is a series in var, where you should view var as
62
equal to s-a. Thus this function returns the formal power
63
series whose coefficients are L^{(n)}(a)/n!.
64
65
EXAMPLES::
66
67
sage: E = EllipticCurve('389a')
68
sage: L = E.lseries()
69
sage: L.taylor_series(series_prec=3)
70
-1.28158145675273e-23 + (7.26268290541182e-24)*z + 0.759316500288427*z^2 + O(z^3) # 32-bit
71
-2.69129566562797e-23 + (1.52514901968783e-23)*z + 0.759316500288427*z^2 + O(z^3) # 64-bit
72
sage: L.taylor_series(series_prec=3)[2:]
73
0.000000000000000 + 0.000000000000000*z + 0.759316500288427*z^2 + O(z^3)
74
"""
75
D = self.dokchitser(prec)
76
return D.taylor_series(a, series_prec, var)
77
78
def _repr_(self):
79
"""
80
Return string representation of this L-series.
81
82
EXAMPLES::
83
84
sage: E = EllipticCurve('37a')
85
sage: L = E.lseries()
86
sage: L._repr_()
87
'Complex L-series of the Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field'
88
"""
89
return "Complex L-series of the %s"%self.__E
90
91
def dokchitser(self, prec=53,
92
max_imaginary_part=0,
93
max_asymp_coeffs=40,
94
algorithm='gp'):
95
r"""
96
Return interface to Tim Dokchitser's program for computing
97
with the L-series of this elliptic curve; this provides a way
98
to compute Taylor expansions and higher derivatives of
99
$L$-series.
100
101
INPUT:
102
prec -- integer (bits precision)
103
max_imaginary_part -- real number
104
max_asymp_coeffs -- integer
105
algorithm -- string: 'gp' or 'magma'
106
107
\note{If algorithm='magma', then the precision is in digits rather
108
than bits and the object returned is a Magma L-series, which has
109
different functionality from the Sage L-series.}
110
111
EXAMPLES::
112
113
sage: E = EllipticCurve('37a')
114
sage: L = E.lseries().dokchitser()
115
sage: L(2)
116
0.381575408260711
117
sage: L = E.lseries().dokchitser(algorithm='magma') # optional - magma
118
sage: L.Evaluate(2) # optional - magma
119
0.38157540826071121129371040958008663667709753398892116
120
121
If the curve has too large a conductor, it isn't possible to
122
compute with the L-series using this command. Instead a
123
RuntimeError is raised::
124
125
sage: e = EllipticCurve([1,1,0,-63900,-1964465932632])
126
sage: L = e.lseries().dokchitser(15)
127
Traceback (most recent call last):
128
...
129
RuntimeError: Unable to create L-series, due to precision or other limits in PARI.
130
"""
131
if algorithm == 'magma':
132
from sage.interfaces.all import magma
133
return magma(self.__E).LSeries(Precision = prec)
134
135
from sage.lfunctions.all import Dokchitser
136
key = (prec, max_imaginary_part, max_asymp_coeffs)
137
try:
138
return self.__dokchitser[key]
139
except KeyError:
140
pass
141
except AttributeError:
142
self.__dokchitser = {}
143
L = Dokchitser(conductor = self.__E.conductor(),
144
gammaV = [0,1],
145
weight = 2,
146
eps = self.__E.root_number(),
147
poles = [],
148
prec = prec)
149
gp = L.gp()
150
s = 'e = ellinit(%s);'%list(self.__E.minimal_model().a_invariants())
151
s += 'a(k) = ellak(e, k);'
152
L.init_coeffs('a(k)', 1, pari_precode = s,
153
max_imaginary_part=max_imaginary_part,
154
max_asymp_coeffs=max_asymp_coeffs)
155
L.rename('Dokchitser L-function associated to %s'%self.__E)
156
self.__dokchitser[key] = L
157
return L
158
159
def sympow(self, n, prec):
160
r"""
161
Return $L(\Sym^{(n)}(E, \text{edge}))$ to prec digits
162
of precision.
163
164
INPUT:
165
n -- integer
166
prec -- integer
167
168
OUTPUT:
169
string -- real number to prec digits of precision as a string.
170
171
\note{Before using this function for the first time for
172
a given $n$, you may have to type \code{sympow('-new_data <n>')},
173
where \code{<n>} is replaced by your value of $n$. This
174
command takes a long time to run.}
175
176
EXAMPLES::
177
178
sage: E = EllipticCurve('37a')
179
sage: a = E.lseries().sympow(2,16) # not tested - requires precomputing "sympow('-new_data 2')"
180
sage: a # not tested
181
'2.492262044273650E+00'
182
sage: RR(a) # not tested
183
2.49226204427365
184
"""
185
from sage.lfunctions.sympow import sympow
186
return sympow.L(self.__E, n, prec)
187
188
def sympow_derivs(self, n, prec, d):
189
r"""
190
Return $0$th to $d$th derivatives of $L(\Sym^{(n)}(E,
191
\text{edge}))$ to prec digits of precision.
192
193
INPUT:
194
n -- integer
195
prec -- integer
196
d -- integer
197
198
OUTPUT:
199
a string, exactly as output by sympow
200
201
\note{To use this function you may have to run a few commands
202
like \code{sympow('-new_data 1d2')}, each which takes a few
203
minutes. If this function fails it will indicate what
204
commands have to be run.}
205
206
EXAMPLES::
207
208
sage: E = EllipticCurve('37a')
209
sage: print E.lseries().sympow_derivs(1,16,2) # not tested -- requires precomputing "sympow('-new_data 2')"
210
sympow 1.018 RELEASE (c) Mark Watkins --- see README and COPYING for details
211
Minimal model of curve is [0,0,1,-1,0]
212
At 37: Inertia Group is C1 MULTIPLICATIVE REDUCTION
213
Conductor is 37
214
sp 1: Conductor at 37 is 1+0, root number is 1
215
sp 1: Euler factor at 37 is 1+1*x
216
1st sym power conductor is 37, global root number is -1
217
NT 1d0: 35
218
NT 1d1: 32
219
NT 1d2: 28
220
Maximal number of terms is 35
221
Done with small primes 1049
222
Computed: 1d0 1d1 1d2
223
Checked out: 1d1
224
1n0: 3.837774351482055E-01
225
1w0: 3.777214305638848E-01
226
1n1: 3.059997738340522E-01
227
1w1: 3.059997738340524E-01
228
1n2: 1.519054910249753E-01
229
1w2: 1.545605024269432E-01
230
"""
231
from sage.lfunctions.sympow import sympow
232
return sympow.Lderivs(self.__E, n, prec, d)
233
234
def zeros(self, n):
235
"""
236
Return the imaginary parts of the first $n$ nontrivial zeros
237
on the critical line of the L-function in the upper half
238
plane, as 32-bit reals.
239
240
EXAMPLES::
241
242
sage: E = EllipticCurve('37a')
243
sage: E.lseries().zeros(2)
244
[0.000000000, 5.00317001]
245
246
sage: a = E.lseries().zeros(20) # long time
247
sage: point([(1,x) for x in a]) # graph (long time)
248
249
AUTHOR:
250
-- Uses Rubinstein's L-functions calculator.
251
"""
252
from sage.lfunctions.lcalc import lcalc
253
return lcalc.zeros(n, L=self.__E)
254
255
def zeros_in_interval(self, x, y, stepsize):
256
r"""
257
Return the imaginary parts of (most of) the nontrivial zeros
258
on the critical line $\Re(s)=1$ with positive imaginary part
259
between $x$ and $y$, along with a technical quantity for each.
260
261
INPUT:
262
x, y, stepsize -- positive floating point numbers
263
264
OUTPUT:
265
list of pairs (zero, S(T)).
266
267
Rubinstein writes: The first column outputs the imaginary part
268
of the zero, the second column a quantity related to S(T) (it
269
increases roughly by 2 whenever a sign change, i.e. pair of
270
zeros, is missed). Higher up the critical strip you should use
271
a smaller stepsize so as not to miss zeros.
272
273
EXAMPLES::
274
275
sage: E = EllipticCurve('37a')
276
sage: E.lseries().zeros_in_interval(6, 10, 0.1) # long time
277
[(6.87039122, 0.248922780), (8.01433081, -0.140168533), (9.93309835, -0.129943029)]
278
"""
279
from sage.lfunctions.lcalc import lcalc
280
return lcalc.zeros_in_interval(x, y, stepsize, L=self.__E)
281
282
def values_along_line(self, s0, s1, number_samples):
283
"""
284
Return values of $L(E, s)$ at \code{number_samples}
285
equally-spaced sample points along the line from $s_0$ to
286
$s_1$ in the complex plane.
287
288
\note{The L-series is normalized so that the center of the
289
critical strip is 1.}
290
291
INPUT:
292
s0, s1 -- complex numbers
293
number_samples -- integer
294
295
OUTPUT:
296
list -- list of pairs (s, zeta(s)), where the s are
297
equally spaced sampled points on the line from
298
s0 to s1.
299
300
EXAMPLES::
301
302
sage: E = EllipticCurve('37a')
303
sage: E.lseries().values_along_line(1, 0.5 + 20*I, 5)
304
[(0.500000000, ...),
305
(0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I),
306
(0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I),
307
(0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I),
308
(0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
309
310
"""
311
from sage.lfunctions.lcalc import lcalc
312
return lcalc.values_along_line(s0-RationalField()('1/2'),
313
s1-RationalField()('1/2'),
314
number_samples, L=self.__E)
315
316
def twist_values(self, s, dmin, dmax):
317
r"""
318
Return values of $L(E, s, \chi_d)$ for each quadratic
319
character $\chi_d$ for $d_{\min} \leq d \leq d_{\max}$.
320
321
\note{The L-series is normalized so that the center of the
322
critical strip is 1.}
323
324
INPUT:
325
326
- ``s`` -- complex numbers
327
- ``dmin`` -- integer
328
- ``dmax`` -- integer
329
330
OUTPUT:
331
332
list of pairs (d, L(E, s,chi_d))
333
334
EXAMPLES::
335
336
sage: E = EllipticCurve('37a')
337
sage: vals = E.lseries().twist_values(1, -12, -4)
338
sage: vals # abs tol 1e-17
339
[(-11, 1.47824342), (-8, 8.9590946e-18), (-7, 1.85307619), (-4, 2.45138938)]
340
sage: F = E.quadratic_twist(-8)
341
sage: F.rank()
342
1
343
sage: F = E.quadratic_twist(-7)
344
sage: F.rank()
345
0
346
"""
347
from sage.lfunctions.lcalc import lcalc
348
return lcalc.twist_values(s - RationalField()('1/2'), dmin, dmax, L=self.__E)
349
350
def twist_zeros(self, n, dmin, dmax):
351
r"""
352
Return first $n$ real parts of nontrivial zeros of
353
$L(E,s,\chi_d)$ for each quadratic character $\chi_d$ with
354
$d_{\min} \leq d \leq d_{\max}$.
355
356
\note{The L-series is normalized so that the center of the
357
critical strip is 1.}
358
359
INPUT:
360
n -- integer
361
dmin -- integer
362
dmax -- integer
363
364
OUTPUT:
365
dict -- keys are the discriminants $d$, and
366
values are list of corresponding zeros.
367
368
EXAMPLES::
369
370
sage: E = EllipticCurve('37a')
371
sage: E.lseries().twist_zeros(3, -4, -3) # long time
372
{-4: [1.60813783, 2.96144840, 3.89751747], -3: [2.06170900, 3.48216881, 4.45853219]}
373
"""
374
from sage.lfunctions.lcalc import lcalc
375
return lcalc.twist_zeros(n, dmin, dmax, L=self.__E)
376
377
def at1(self, k=None, prec=None):
378
r"""
379
Compute `L(E,1)` using `k` terms of the series for `L(E,1)` as
380
explained in Section 7.5.3 of Henri Cohen's book "A Course in
381
Computational Algebraic Number Theory". If the argument `k`
382
is not specified, then it defaults to `\sqrt(N)`, where `N` is
383
the conductor.
384
385
INPUT:
386
387
- ``k`` -- number of terms of the series. If zero or ``None``,
388
use `k = \sqrt(N)`, where `N` is the conductor.
389
390
- ``prec`` -- numerical precision in bits. If zero or ``None``,
391
use a reasonable automatic default.
392
393
OUTPUT:
394
395
A tuple of real numbers ``(L, err)`` where ``L`` is an
396
approximation for `L(E,1)` and ``err`` is a bound on the error
397
in the approximation.
398
399
This function is disjoint from the PARI ``elllseries``
400
command, which is for a similar purpose. To use that command
401
(via the PARI C library), simply type
402
``E.pari_mincurve().elllseries(1)``.
403
404
ALGORITHM:
405
406
- Compute the root number eps. If it is -1, return 0.
407
408
- Compute the Fourier coefficients `a_n`, for `n` up to and
409
including `k`.
410
411
- Compute the sum
412
413
.. MATH::
414
415
2 * sum_{n=1}^{k} (a_n / n) * exp(-2*pi*n/Sqrt(N)),
416
417
where `N` is the conductor of `E`.
418
419
- Compute a bound on the tail end of the series, which is
420
421
.. MATH::
422
423
2 e^{-2 \pi (k+1) / \sqrt{N}} / (1 - e^{-2 \pi/\sqrt{N}}).
424
425
For a proof see [Grigov-Jorza-Patrascu-Patrikis-Stein].
426
427
EXAMPLES::
428
429
sage: L, err = EllipticCurve('11a1').lseries().at1()
430
sage: L, err
431
(0.253804, 0.000181444)
432
sage: parent(L)
433
Real Field with 24 bits of precision
434
sage: E = EllipticCurve('37b')
435
sage: E.lseries().at1()
436
(0.7257177, 0.000800697)
437
sage: E.lseries().at1(100)
438
(0.7256810619361527823362055410263965487367603361763, 1.52469e-45)
439
sage: L,err = E.lseries().at1(100, prec=128)
440
sage: L
441
0.72568106193615278233620554102639654873
442
sage: parent(L)
443
Real Field with 128 bits of precision
444
sage: err
445
1.70693e-37
446
sage: parent(err)
447
Real Field with 24 bits of precision and rounding RNDU
448
449
Rank 1 through 3 elliptic curves::
450
451
sage: E = EllipticCurve('37a1')
452
sage: E.lseries().at1()
453
(0.0000000, 0.000000)
454
sage: E = EllipticCurve('389a1')
455
sage: E.lseries().at1()
456
(-0.001769566, 0.00911776)
457
sage: E = EllipticCurve('5077a1')
458
sage: E.lseries().at1()
459
(0.0000000, 0.000000)
460
"""
461
sqrtN = sqrt(self.__E.conductor())
462
if k:
463
k = int(k)
464
else:
465
k = int(ceil(sqrtN))
466
467
if prec:
468
prec = int(prec)
469
else:
470
# Use the same precision as deriv_at1() below for
471
# consistency
472
prec = int(9.065*k/sqrtN + 1.443*log(k)) + 12
473
R = RealField(prec)
474
# Compute error term with bounded precision of 24 bits and
475
# round towards +infinity
476
Rerror = RealField(24, rnd='RNDU')
477
478
if self.__E.root_number() == -1:
479
return (R.zero(), Rerror.zero())
480
481
an = self.__E.anlist(k) # list of Sage Integers
482
pi = R.pi()
483
sqrtN = R(self.__E.conductor()).sqrt()
484
485
z = (-2*pi/sqrtN).exp()
486
zpow = z
487
# Compute series sum and accumulate floating point errors
488
L = R.zero()
489
error = Rerror.zero()
490
491
for n in xrange(1,k+1):
492
term = (zpow * an[n])/n
493
zpow *= z
494
L += term
495
# We express relative error in units of epsilon, where
496
# epsilon is a number divided by 2^precision.
497
# Instead of multiplying the error by 2 after the loop
498
# (to account for L *= 2), we already multiply it now.
499
#
500
# For multiplication and division, the relative error
501
# in epsilons is bounded by (1+e)^n - 1, where n is the
502
# number of operations (assuming exact inputs).
503
# exp(x) additionally multiplies this error by abs(x) and
504
# adds one epsilon. The inputs pi and sqrtN each contribute
505
# another epsilon.
506
# Assuming that 2*pi/sqrtN <= 2, the relative error for z is
507
# 7 epsilon. This implies a relative error of (8n-1) epsilon
508
# for zpow. We add 2 for the computation of term and 1/2 to
509
# compensate for the approximation (1+e)^n = 1+ne.
510
#
511
# The error of the addition is at most half an ulp of the
512
# result.
513
#
514
# Multiplying everything by two gives:
515
error += term.epsilon(Rerror)*(16*n + 3) + L.ulp(Rerror)
516
L *= 2
517
518
# Add series error (we use (-2)/(z-1) instead of 2/(1-z)
519
# because this causes 1/(1-z) to be rounded up)
520
error += ((-2)*Rerror(zpow)) / Rerror(z - 1)
521
return (L, error)
522
523
def deriv_at1(self, k=None, prec=None):
524
r"""
525
Compute `L'(E,1)` using `k` terms of the series for `L'(E,1)`,
526
under the assumption that `L(E,1) = 0`.
527
528
The algorithm used is from Section 7.5.3 of Henri Cohen's book
529
``A Course in Computational Algebraic Number Theory.''
530
531
INPUT:
532
533
- ``k`` -- number of terms of the series. If zero or ``None``,
534
use `k = \sqrt(N)`, where `N` is the conductor.
535
536
- ``prec`` -- numerical precision in bits. If zero or ``None``,
537
use a reasonable automatic default.
538
539
OUTPUT:
540
541
A tuple of real numbers ``(L1, err)`` where ``L1`` is an
542
approximation for `L'(E,1)` and ``err`` is a bound on the error
543
in the approximation.
544
545
.. WARNING::
546
547
This function only makes sense if `L(E)` has positive order
548
of vanishing at 1, or equivalently if `L(E,1) = 0`.
549
550
ALGORITHM:
551
552
- Compute the root number eps. If it is 1, return 0.
553
554
- Compute the Fourier coefficients `a_n`, for `n` up to and
555
including `k`.
556
557
- Compute the sum
558
559
.. MATH::
560
561
2 * \sum_{n=1}^{k} (a_n / n) * E_1(2 \pi n/\sqrt{N}),
562
563
where `N` is the conductor of `E`, and `E_1` is the
564
exponential integral function.
565
566
- Compute a bound on the tail end of the series, which is
567
568
.. MATH::
569
570
2 e^{-2 \pi (k+1) / \sqrt{N}} / (1 - e^{-2 \pi/\sqrt{N}}).
571
572
For a proof see [Grigorov-Jorza-Patrascu-Patrikis-Stein]. This
573
is exactly the same as the bound for the approximation to
574
`L(E,1)` produced by :meth:`at1`.
575
576
EXAMPLES::
577
578
sage: E = EllipticCurve('37a')
579
sage: E.lseries().deriv_at1()
580
(0.3059866, 0.000801045)
581
sage: E.lseries().deriv_at1(100)
582
(0.3059997738340523018204836833216764744526377745903, 1.52493e-45)
583
sage: E.lseries().deriv_at1(1000)
584
(0.305999773834052301820483683321676474452637774590771998..., 2.75031e-449)
585
586
With less numerical precision, the error is bounded by numerical accuracy::
587
588
sage: L,err = E.lseries().deriv_at1(100, prec=64)
589
sage: L,err
590
(0.305999773834052302, 5.55318e-18)
591
sage: parent(L)
592
Real Field with 64 bits of precision
593
sage: parent(err)
594
Real Field with 24 bits of precision and rounding RNDU
595
596
Rank 2 and rank 3 elliptic curves::
597
598
sage: E = EllipticCurve('389a1')
599
sage: E.lseries().deriv_at1()
600
(0.0000000, 0.000000)
601
sage: E = EllipticCurve((1, 0, 1, -131, 558)) # curve 59450i1
602
sage: E.lseries().deriv_at1()
603
(-0.00010911444, 0.142428)
604
sage: E.lseries().deriv_at1(4000)
605
(6.9902290...e-50, 1.31318e-43)
606
"""
607
sqrtN = sqrt(self.__E.conductor())
608
if k:
609
k = int(k)
610
else:
611
k = int(ceil(sqrtN))
612
613
if prec:
614
prec = int(prec)
615
else:
616
# Estimate number of bits for the computation, based on error
617
# estimate below (the denominator of that error is close enough
618
# to 1 that we can ignore it).
619
# 9.065 = 2*Pi/log(2)
620
# 1.443 = 1/log(2)
621
# 12 is an arbitrary extra number of bits (it is chosen
622
# such that the precision is 24 bits when the conductor
623
# equals 11 and k is the default value 4)
624
prec = int(9.065*k/sqrtN + 1.443*log(k)) + 12
625
R = RealField(prec)
626
# Compute error term with bounded precision of 24 bits and
627
# round towards +infinity
628
Rerror = RealField(24, rnd='RNDU')
629
630
if self.__E.root_number() == 1:
631
# Order of vanishing at 1 of L(E) is even and assumed to be
632
# positive, so L'(E,1) = 0.
633
return (R.zero(), Rerror.zero())
634
635
an = self.__E.anlist(k) # list of Sage Integers
636
pi = R.pi()
637
sqrtN = R(self.__E.conductor()).sqrt()
638
v = exp_integral.exponential_integral_1(2*pi/sqrtN, k)
639
640
# Compute series sum and accumulate floating point errors
641
L = R.zero()
642
error = Rerror.zero()
643
# Sum of |an[n]|/n
644
sumann = Rerror.zero()
645
646
for n in xrange(1,k+1):
647
term = (v[n-1] * an[n])/n
648
L += term
649
error += term.epsilon(Rerror)*5 + L.ulp(Rerror)
650
sumann += Rerror(an[n].abs())/n
651
L *= 2
652
653
# Add error term for exponential_integral_1() errors.
654
# Absolute error for 2*v[i] is 4*max(1, v[0])*2^-prec
655
if v[0] > 1.0:
656
sumann *= Rerror(v[0])
657
error += (sumann >> (prec - 2))
658
659
# Add series error (we use (-2)/(z-1) instead of 2/(1-z)
660
# because this causes 1/(1-z) to be rounded up)
661
z = (-2*pi/sqrtN).exp()
662
zpow = ((-2*(k+1))*pi/sqrtN).exp()
663
error += ((-2)*Rerror(zpow)) / Rerror(z - 1)
664
return (L, error)
665
666
def __call__(self, s):
667
r"""
668
Returns the value of the L-series of the elliptic curve E at s, where s
669
must be a real number.
670
671
.. NOTE::
672
673
If the conductor of the curve is large, say `>10^{12}`,
674
then this function will take a very long time, since it
675
uses an `O(\sqrt{N})` algorithm.
676
677
EXAMPLES::
678
679
sage: E = EllipticCurve([1,2,3,4,5])
680
sage: L = E.lseries()
681
sage: L(1)
682
0.000000000000000
683
sage: L(1.1)
684
0.285491007678148
685
sage: L(1.1 + I)
686
0.174851377216615 + 0.816965038124457*I
687
"""
688
return self.dokchitser()(s)
689
690
def L1_vanishes(self):
691
"""
692
Returns whether or not `L(E,1) = 0`. The result is provably
693
correct if the Manin constant of the associated optimal
694
quotient is <= 2. This hypothesis on the Manin constant
695
is true for all curves of conductor <= 40000 (by Cremona) and
696
all semistable curves (i.e., squarefree conductor).
697
698
ALGORITHM: see :meth:`L_ratio`.
699
700
EXAMPLES::
701
702
sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
703
sage: E.lseries().L1_vanishes()
704
False
705
sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
706
sage: E.lseries().L1_vanishes()
707
False
708
sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
709
sage: E.lseries().L1_vanishes()
710
True
711
sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
712
sage: E.lseries().L1_vanishes()
713
True
714
sage: E = EllipticCurve([0, 0, 1, -38, 90]) # 361A (CM curve))
715
sage: E.lseries().L1_vanishes()
716
True
717
sage: E = EllipticCurve([0,-1,1,-2,-1]) # 141C (13-isogeny)
718
sage: E.lseries().L1_vanishes()
719
False
720
721
AUTHOR: William Stein, 2005-04-20.
722
"""
723
return self.L_ratio() == 0
724
725
def L_ratio(self):
726
r"""
727
Returns the ratio `L(E,1)/\Omega` as an exact rational
728
number. The result is \emph{provably} correct if the Manin
729
constant of the associated optimal quotient is `\leq 2`. This
730
hypothesis on the Manin constant is true for all semistable
731
curves (i.e., squarefree conductor), by a theorem of Mazur
732
from his \emph{Rational Isogenies of Prime Degree} paper.
733
734
EXAMPLES::
735
736
sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
737
sage: E.lseries().L_ratio()
738
1/5
739
sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
740
sage: E.lseries().L_ratio()
741
1/25
742
sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
743
sage: E.lseries().L_ratio()
744
0
745
sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
746
sage: E.lseries().L_ratio()
747
0
748
sage: E = EllipticCurve([0, 0, 1, -38, 90]) # 361A (CM curve))
749
sage: E.lseries().L_ratio()
750
0
751
sage: E = EllipticCurve([0,-1,1,-2,-1]) # 141C (13-isogeny)
752
sage: E.lseries().L_ratio()
753
1
754
sage: E = EllipticCurve(RationalField(), [1, 0, 0, 1/24624, 1/886464])
755
sage: E.lseries().L_ratio()
756
2
757
758
See :trac:`3651` and :trac:`15299`::
759
760
sage: EllipticCurve([0,0,0,-193^2,0]).sha().an()
761
4
762
sage: EllipticCurve([1, 0, 1, -131, 558]).sha().an() # long time
763
1.00000000000000
764
765
ALGORITHM: Compute the root number. If it is -1 then L(E,s)
766
vanishes to odd order at 1, hence vanishes. If it is +1, use
767
a result about modular symbols and Mazur's "Rational Isogenies"
768
paper to determine a provably correct bound (assuming Manin
769
constant is <= 2) so that we can determine whether L(E,1) = 0.
770
771
AUTHOR: William Stein, 2005-04-20.
772
"""
773
try:
774
return self.__lratio
775
except AttributeError:
776
pass
777
778
if not self.__E.is_minimal():
779
self.__lratio = self.__E.minimal_model().lseries().L_ratio()
780
return self.__lratio
781
782
QQ = RationalField()
783
if self.__E.root_number() == -1:
784
self.__lratio = QQ.zero()
785
return self.__lratio
786
787
# Even root number. Decide if L(E,1) = 0. If E is a modular
788
# *OPTIMAL* quotient of J_0(N) elliptic curve, we know that T *
789
# L(E,1)/omega is an integer n, where T is the order of the
790
# image of the rational torsion point (0)-(oo) in E(Q), and
791
# omega is the least real Neron period. (This is proved in my
792
# Ph.D. thesis, but is probably well known.) We can easily
793
# compute omega to very high precision using AGM. So to prove
794
# that L(E,1) = 0 we compute T/omega * L(E,1) to sufficient
795
# precision to determine it as an integer. If eps is the
796
# error in computation of L(E,1), then the error in computing
797
# the product is (2T/Omega_E) * eps, and we need this to be
798
# less than 0.5, i.e.,
799
# (2T/Omega_E) * eps < 0.5,
800
# so
801
# eps < 0.5 * Omega_E / (2T) = Omega_E / (4*T).
802
#
803
# Since in general E need not be optimal, we have to choose
804
# eps = Omega_E/(8*t*B), where t is the exponent of E(Q)_tor,
805
# and is a multiple of the degree of an isogeny between E
806
# and the optimal curve.
807
#
808
# NOTES: We *do* have to worry about the Manin constant, since
809
# we are using the Neron model to compute omega, not the
810
# newform. My theorem replaces the omega above by omega/c,
811
# where c is the Manin constant, and the bound must be
812
# correspondingly smaller. If the level is square free, then
813
# the Manin constant is 1 or 2, so there's no problem (since
814
# we took 8 instead of 4 in the denominator). If the level
815
# is divisible by a square, then the Manin constant could
816
# be a divisible by an arbitrary power of that prime, except
817
# that Edixhoven claims the primes that appear are <= 7.
818
819
t = self.__E.torsion_subgroup().order()
820
omega = self.__E.period_lattice().basis()[0]
821
d = self.__E._multiple_of_degree_of_isogeny_to_optimal_curve()
822
C = 8*d*t
823
eps = omega / C
824
825
sqrtN = 2*int(sqrt(self.__E.conductor()))
826
k = sqrtN + 10
827
while True:
828
L1, error_bound = self.at1(k)
829
if error_bound < eps:
830
n = int(round(L1*C/omega))
831
quo = QQ((n,C))
832
self.__lratio = quo / self.__E.real_components()
833
return self.__lratio
834
k += sqrtN
835
misc.verbose("Increasing precision to %s terms."%k)
836
837