Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/schemes/elliptic_curves/lseries_ell.py
4156 views
1
"""
2
Complex Elliptic Curve L-series
3
4
"""
5
6
from sage.structure.sage_object import SageObject
7
from sage.rings.all import (
8
RealField,
9
RationalField,
10
ComplexField)
11
from math import sqrt, exp, ceil
12
import sage.functions.transcendental as transcendental
13
R = RealField()
14
Q = RationalField()
15
C = ComplexField()
16
import sage.misc.all as misc
17
18
class Lseries_ell(SageObject):
19
"""
20
An elliptic curve $L$-series.
21
22
EXAMPLES:
23
24
"""
25
def __init__(self, E):
26
"""
27
Create an elliptic curve $L$-series.
28
29
EXAMPLES:
30
sage: EllipticCurve([1..5]).lseries()
31
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
32
"""
33
self.__E = E
34
35
def elliptic_curve(self):
36
"""
37
Return the elliptic curve that this L-series is attached to.
38
39
EXAMPLES:
40
sage: E = EllipticCurve('389a')
41
sage: L = E.lseries()
42
sage: L.elliptic_curve ()
43
Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field
44
"""
45
return self.__E
46
47
def taylor_series(self, a=1, prec=53, series_prec=6, var='z'):
48
"""
49
Return the Taylor series of this $L$-series about $a$ to
50
the given precision (in bits) and the number of terms.
51
52
The output is a series in var, where you should view var as
53
equal to s-a. Thus this function returns the formal power
54
series whose coefficients are L^{(n)}(a)/n!.
55
56
EXAMPLES:
57
sage: E = EllipticCurve('389a')
58
sage: L = E.lseries()
59
sage: L.taylor_series(series_prec=3) # random nearly 0 constant and linear terms
60
-2.69129566562797e-23 + (1.52514901968783e-23)*z + 0.759316500288427*z^2 + O(z^3)
61
sage: L.taylor_series(series_prec=3)[2:]
62
0.000000000000000 + 0.000000000000000*z + 0.759316500288427*z^2 + O(z^3)
63
"""
64
D = self.dokchitser(prec)
65
return D.taylor_series(a, series_prec, var)
66
67
def _repr_(self):
68
"""
69
Return string representation of this L-series.
70
71
EXAMPLES:
72
sage: E = EllipticCurve('37a')
73
sage: L = E.lseries()
74
sage: L._repr_()
75
'Complex L-series of the Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field'
76
"""
77
return "Complex L-series of the %s"%self.__E
78
79
def dokchitser(self, prec=53,
80
max_imaginary_part=0,
81
max_asymp_coeffs=40,
82
algorithm='gp'):
83
r"""
84
Return interface to Tim Dokchitser's program for computing
85
with the L-series of this elliptic curve; this provides a way
86
to compute Taylor expansions and higher derivatives of
87
$L$-series.
88
89
INPUT:
90
prec -- integer (bits precision)
91
max_imaginary_part -- real number
92
max_asymp_coeffs -- integer
93
algorithm -- string: 'gp' or 'magma'
94
95
\note{If algorithm='magma', then the precision is in digits rather
96
than bits and the object returned is a Magma L-series, which has
97
different functionality from the Sage L-series.}
98
99
EXAMPLES:
100
sage: E = EllipticCurve('37a')
101
sage: L = E.lseries().dokchitser()
102
sage: L(2)
103
0.381575408260711
104
sage: L = E.lseries().dokchitser(algorithm='magma') # optional - magma
105
sage: L.Evaluate(2) # optional - magma
106
0.38157540826071121129371040958008663667709753398892116
107
108
If the curve has too large a conductor, it isn't possible to
109
compute with the L-series using this command. Instead a
110
RuntimeError is raised:
111
sage: e = EllipticCurve([1,1,0,-63900,-1964465932632])
112
sage: L = e.lseries().dokchitser(15)
113
Traceback (most recent call last):
114
...
115
RuntimeError: Unable to create L-series, due to precision or other limits in PARI.
116
"""
117
if algorithm == 'magma':
118
from sage.interfaces.all import magma
119
return magma(self.__E).LSeries(Precision = prec)
120
121
from sage.lfunctions.all import Dokchitser
122
key = (prec, max_imaginary_part, max_asymp_coeffs)
123
try:
124
return self.__dokchitser[key]
125
except KeyError:
126
pass
127
except AttributeError:
128
self.__dokchitser = {}
129
L = Dokchitser(conductor = self.__E.conductor(),
130
gammaV = [0,1],
131
weight = 2,
132
eps = self.__E.root_number(),
133
poles = [],
134
prec = prec)
135
gp = L.gp()
136
s = 'e = ellinit(%s);'%list(self.__E.minimal_model().a_invariants())
137
s += 'a(k) = ellak(e, k);'
138
L.init_coeffs('a(k)', 1, pari_precode = s,
139
max_imaginary_part=max_imaginary_part,
140
max_asymp_coeffs=max_asymp_coeffs)
141
L.rename('Dokchitser L-function associated to %s'%self.__E)
142
self.__dokchitser[key] = L
143
return L
144
145
def sympow(self, n, prec):
146
r"""
147
Return $L(\Sym^{(n)}(E, \text{edge}))$ to prec digits
148
of precision.
149
150
INPUT:
151
n -- integer
152
prec -- integer
153
154
OUTPUT:
155
string -- real number to prec digits of precision as a string.
156
157
\note{Before using this function for the first time for
158
a given $n$, you may have to type \code{sympow('-new_data <n>')},
159
where \code{<n>} is replaced by your value of $n$. This
160
command takes a long time to run.}
161
162
EXAMPLES:
163
sage: E = EllipticCurve('37a')
164
sage: a = E.lseries().sympow(2,16) # optional - requires precomputing "sympow('-new_data 2')"
165
sage: a # optional
166
'2.492262044273650E+00'
167
sage: RR(a) # optional
168
2.49226204427365
169
"""
170
from sage.lfunctions.sympow import sympow
171
return sympow.L(self.__E, n, prec)
172
173
def sympow_derivs(self, n, prec, d):
174
r"""
175
Return $0$th to $d$th derivatives of $L(\Sym^{(n)}(E,
176
\text{edge}))$ to prec digits of precision.
177
178
INPUT:
179
n -- integer
180
prec -- integer
181
d -- integer
182
183
OUTPUT:
184
a string, exactly as output by sympow
185
186
\note{To use this function you may have to run a few commands
187
like \code{sympow('-new_data 1d2')}, each which takes a few
188
minutes. If this function fails it will indicate what
189
commands have to be run.}
190
191
EXAMPLES:
192
sage: E = EllipticCurve('37a')
193
sage: print E.lseries().sympow_derivs(1,16,2) # optional -- requires precomputing "sympow('-new_data 2')"
194
sympow 1.018 RELEASE (c) Mark Watkins --- see README and COPYING for details
195
Minimal model of curve is [0,0,1,-1,0]
196
At 37: Inertia Group is C1 MULTIPLICATIVE REDUCTION
197
Conductor is 37
198
sp 1: Conductor at 37 is 1+0, root number is 1
199
sp 1: Euler factor at 37 is 1+1*x
200
1st sym power conductor is 37, global root number is -1
201
NT 1d0: 35
202
NT 1d1: 32
203
NT 1d2: 28
204
Maximal number of terms is 35
205
Done with small primes 1049
206
Computed: 1d0 1d1 1d2
207
Checked out: 1d1
208
1n0: 3.837774351482055E-01
209
1w0: 3.777214305638848E-01
210
1n1: 3.059997738340522E-01
211
1w1: 3.059997738340524E-01
212
1n2: 1.519054910249753E-01
213
1w2: 1.545605024269432E-01
214
"""
215
from sage.lfunctions.sympow import sympow
216
return sympow.Lderivs(self.__E, n, prec, d)
217
218
def zeros(self, n):
219
"""
220
Return the imaginary parts of the first $n$ nontrivial zeros
221
on the critical line of the L-function in the upper half
222
plane, as 32-bit reals.
223
224
EXAMPLES:
225
sage: E = EllipticCurve('37a')
226
sage: E.lseries().zeros(2)
227
[0.000000000, 5.00317001]
228
229
sage: a = E.lseries().zeros(20) # long time
230
sage: point([(1,x) for x in a]) # graph (long time)
231
232
AUTHOR:
233
-- Uses Rubinstein's L-functions calculator.
234
"""
235
from sage.lfunctions.lcalc import lcalc
236
return lcalc.zeros(n, L=self.__E)
237
238
def zeros_in_interval(self, x, y, stepsize):
239
r"""
240
Return the imaginary parts of (most of) the nontrivial zeros
241
on the critical line $\Re(s)=1$ with positive imaginary part
242
between $x$ and $y$, along with a technical quantity for each.
243
244
INPUT:
245
x, y, stepsize -- positive floating point numbers
246
247
OUTPUT:
248
list of pairs (zero, S(T)).
249
250
Rubinstein writes: The first column outputs the imaginary part
251
of the zero, the second column a quantity related to S(T) (it
252
increases roughly by 2 whenever a sign change, i.e. pair of
253
zeros, is missed). Higher up the critical strip you should use
254
a smaller stepsize so as not to miss zeros.
255
256
EXAMPLES:
257
sage: E = EllipticCurve('37a')
258
sage: E.lseries().zeros_in_interval(6, 10, 0.1) # long time
259
[(6.87039122, 0.248922780), (8.01433081, -0.140168533), (9.93309835, -0.129943029)]
260
"""
261
from sage.lfunctions.lcalc import lcalc
262
return lcalc.zeros_in_interval(x, y, stepsize, L=self.__E)
263
264
def values_along_line(self, s0, s1, number_samples):
265
"""
266
Return values of $L(E, s)$ at \code{number_samples}
267
equally-spaced sample points along the line from $s_0$ to
268
$s_1$ in the complex plane.
269
270
\note{The L-series is normalized so that the center of the
271
critical strip is 1.}
272
273
INPUT:
274
s0, s1 -- complex numbers
275
number_samples -- integer
276
277
OUTPUT:
278
list -- list of pairs (s, zeta(s)), where the s are
279
equally spaced sampled points on the line from
280
s0 to s1.
281
282
EXAMPLES:
283
sage: I = CC.0
284
sage: E = EllipticCurve('37a')
285
sage: E.lseries().values_along_line(1, 0.5+20*I, 5) # long time and slightly random output
286
[(0.500000000, 0), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
287
"""
288
from sage.lfunctions.lcalc import lcalc
289
return lcalc.values_along_line(s0-RationalField()('1/2'),
290
s1-RationalField()('1/2'),
291
number_samples, L=self.__E)
292
293
def twist_values(self, s, dmin, dmax):
294
r"""
295
Return values of $L(E, s, \chi_d)$ for each quadratic
296
character $\chi_d$ for $d_{\min} \leq d \leq d_{\max}$.
297
298
\note{The L-series is normalized so that the center of the
299
critical strip is 1.}
300
301
INPUT:
302
s -- complex numbers
303
dmin -- integer
304
dmax -- integer
305
306
OUTPUT:
307
list -- list of pairs (d, L(E, s,chi_d))
308
309
EXAMPLES:
310
sage: E = EllipticCurve('37a')
311
sage: E.lseries().twist_values(1, -12, -4) # slightly random output depending on architecture
312
[(-11, 1.4782434171), (-8, 0), (-7, 1.8530761916), (-4, 2.4513893817)]
313
sage: F = E.quadratic_twist(-8)
314
sage: F.rank()
315
1
316
sage: F = E.quadratic_twist(-7)
317
sage: F.rank()
318
0
319
"""
320
from sage.lfunctions.lcalc import lcalc
321
return lcalc.twist_values(s - RationalField()('1/2'), dmin, dmax, L=self.__E)
322
323
def twist_zeros(self, n, dmin, dmax):
324
r"""
325
Return first $n$ real parts of nontrivial zeros of
326
$L(E,s,\chi_d)$ for each quadratic character $\chi_d$ with
327
$d_{\min} \leq d \leq d_{\max}$.
328
329
\note{The L-series is normalized so that the center of the
330
critical strip is 1.}
331
332
INPUT:
333
n -- integer
334
dmin -- integer
335
dmax -- integer
336
337
OUTPUT:
338
dict -- keys are the discriminants $d$, and
339
values are list of corresponding zeros.
340
341
EXAMPLES:
342
sage: E = EllipticCurve('37a')
343
sage: E.lseries().twist_zeros(3, -4, -3) # long time
344
{-4: [1.60813783, 2.96144840, 3.89751747], -3: [2.06170900, 3.48216881, 4.45853219]}
345
"""
346
from sage.lfunctions.lcalc import lcalc
347
return lcalc.twist_zeros(n, dmin, dmax, L=self.__E)
348
349
def at1(self, k=0):
350
r"""
351
Compute $L(E,1)$ using $k$ terms of the series for $L(E,1)$ as
352
explained on page 406 of Henri Cohen's book"A Course in Computational
353
Algebraic Number Theory". If the argument $k$ is not specified,
354
then it defaults to $\sqrt(N)$, where $N$ is the conductor.
355
356
The real precision used in each step of the computation is the
357
precision of machine floats.
358
359
INPUT:
360
k -- (optional) an integer, defaults to sqrt(N).
361
362
OUTPUT:
363
float -- L(E,1)
364
float -- a bound on the error in the approximation; this
365
is a provably correct upper bound on the sum
366
of the tail end of the series used to compute L(E,1).
367
368
This function is disjoint from the PARI \code{elllseries}
369
command, which is for a similar purpose. To use that command
370
(via the PARI C library), simply type
371
\code{E.pari_mincurve().elllseries(1)}
372
373
ALGORITHM:
374
\begin{enumerate}
375
\item Compute the root number eps. If it is -1, return 0.
376
377
\item Compute the Fourier coefficients a_n, for n up to and
378
including k.
379
380
\item Compute the sum
381
$$
382
2 * sum_{n=1}^{k} (a_n / n) * exp(-2*pi*n/Sqrt(N)),
383
$$
384
where N is the conductor of E.
385
386
\item Compute a bound on the tail end of the series, which is
387
$$
388
2 * e^(-2 * pi * (k+1) / sqrt(N)) / (1 - e^(-2*pi/sqrt(N))).
389
$$
390
For a proof see [Grigov-Jorza-Patrascu-Patrikis-Stein].
391
\end{enumerate}
392
393
EXAMPLES:
394
sage: E = EllipticCurve('37b')
395
sage: E.lseries().at1(100)
396
(0.725681061936153, 1.52437502288743e-45)
397
"""
398
if self.__E.root_number() == -1:
399
return 0
400
sqrtN = float(self.__E.conductor().sqrt())
401
k = int(k)
402
if k == 0: k = int(ceil(sqrtN))
403
an = self.__E.anlist(k) # list of Sage ints
404
# Compute z = e^(-2pi/sqrt(N))
405
pi = 3.14159265358979323846
406
z = exp(-2*pi/sqrtN)
407
zpow = z
408
s = 0.0
409
for n in xrange(1,k+1):
410
s += (zpow * float(an[n]))/n
411
zpow *= z
412
413
error = 2*zpow / (1 - z)
414
415
return R(2*s), R(error)
416
417
def deriv_at1(self, k=0):
418
r"""
419
Compute $L'(E,1)$ using$ k$ terms of the series for $L'(E,1)$.
420
421
The algorithm used is from page 406 of Henri Cohen's book ``A
422
Course in Computational Algebraic Number Theory.''
423
424
The real precision of the computation is the precision of
425
Python floats.
426
427
INPUT:
428
k -- int; number of terms of the series
429
430
OUTPUT:
431
real number -- an approximation for L'(E,1)
432
real number -- a bound on the error in the approximation
433
434
ALGORITHM:
435
\begin{enumerate}
436
\item Compute the root number eps. If it is 1, return 0.
437
438
\item Compute the Fourier coefficients $a_n$, for $n$ up to and
439
including $k$.
440
441
\item Compute the sum
442
$$
443
2 * \sum_{n=1}^{k} (a_n / n) * E_1(2 \pi n/\sqrt{N}),
444
$$
445
where $N$ is the conductor of $E$, and $E_1$ is the
446
exponential integral function.
447
448
\item Compute a bound on the tail end of the series, which is
449
$$
450
2 * e^{-2 \pi (k+1) / \sqrt{N}} / (1 - e^{-2 \ pi/\sqrt{N}}).
451
$$
452
For a proof see [Grigorov-Jorza-Patrascu-Patrikis-Stein]. This
453
is exactly the same as the bound for the approximation to
454
$L(E,1)$ produced by \code{E.lseries().at1}.
455
\end{enumerate}
456
457
EXAMPLES::
458
459
sage: E = EllipticCurve('37a')
460
sage: E.lseries().deriv_at1()
461
(0.305986660898516, 0.000800351433106958)
462
sage: E.lseries().deriv_at1(100)
463
(0.305999773834052, 1.52437502288740e-45)
464
sage: E.lseries().deriv_at1(1000)
465
(0.305999773834052, 0.000000000000000)
466
"""
467
if self.__E.root_number() == 1: return 0
468
k = int(k)
469
sqrtN = float(self.__E.conductor().sqrt())
470
if k == 0: k = int(ceil(sqrtN))
471
an = self.__E.anlist(k) # list of Sage Integers
472
# Compute z = e^(-2pi/sqrt(N))
473
pi = 3.14159265358979323846
474
v = transcendental.exponential_integral_1(2*pi/sqrtN, k)
475
L = 2*float(sum([ (v[n-1] * an[n])/n for n in xrange(1,k+1)]))
476
error = 2*exp(-2*pi*(k+1)/sqrtN)/(1-exp(-2*pi/sqrtN))
477
return R(L), R(error)
478
479
def __call__(self, s):
480
r"""
481
Returns the value of the L-series of the elliptic curve E at s, where s
482
must be a real number.
483
484
Use self.extended for s complex.
485
486
\note{If the conductor of the curve is large, say $>10^{12}$,
487
then this function will take a very long time, since it uses
488
an $O(\sqrt{N})$ algorithm.}
489
490
EXAMPLES:
491
sage: E = EllipticCurve([1,2,3,4,5])
492
sage: L = E.lseries()
493
sage: L(1)
494
0.000000000000000
495
sage: L(1.1)
496
0.285491007678148
497
sage: L(1.1 + I)
498
0.174851377216615 + 0.816965038124457*I
499
"""
500
return self.dokchitser()(s)
501
502
#def extended(self, s, prec):
503
# r"""
504
# Returns the value of the L-series of the elliptic curve E at s
505
# can be any complex number using prec terms of the power series
506
# expansion.
507
#
508
#
509
# WARNING: This may be slow. Consider using \code{dokchitser()}
510
# instead.
511
#
512
# INPUT:
513
# s -- complex number
514
# prec -- integer
515
#
516
# EXAMPLES:
517
# sage: E = EllipticCurve('389a')
518
# sage: E.lseries().extended(1 + I, 50)
519
# -0.638409959099589 + 0.715495262192901*I
520
# sage: E.lseries().extended(1 + 0.1*I, 50)
521
# -0.00761216538818315 + 0.000434885704670107*I
522
#
523
# NOTE: You might also want to use Tim Dokchitser's
524
# L-function calculator, which is available by typing
525
# L = E.lseries().dokchitser(), then evaluating L. It
526
# gives the same information but is sometimes much faster.
527
#
528
# """
529
# try:
530
# s = C(s)
531
# except TypeError:
532
# raise TypeError, "Input argument %s must be coercible to a complex number"%s
533
# prec = int(prec)
534
# if abs(s.imag()) < R(0.0000000000001):
535
# return self(s.real())
536
# N = self.__E.conductor()
537
# from sage.symbolic.constants import pi
538
# pi = R(pi)
539
# Gamma = transcendental.gamma
540
# Gamma_inc = transcendental.gamma_inc
541
# a = self.__E.anlist(prec)
542
# eps = self.__E.root_number()
543
# sqrtN = float(N.sqrt())
544
# def F(n, t):
545
# return Gamma_inc(t+1, 2*pi*n/sqrtN) * C(sqrtN/(2*pi*n))**(t+1)
546
# return C(N)**(-s/2) * C(2*pi)**s * Gamma(s)**(-1)\
547
# * sum([a[n]*(F(n,s-1) + eps*F(n,1-s)) for n in xrange(1,prec+1)])
548
549
def L1_vanishes(self):
550
"""
551
Returns whether or not L(E,1) = 0. The result is provably
552
correct if the Manin constant of the associated optimal
553
quotient is <= 2. This hypothesis on the Manin constant
554
is true for all curves of conductor <= 40000 (by Cremona) and
555
all semistable curves (i.e., squarefree conductor).
556
557
EXAMPLES:
558
sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
559
sage: E.lseries().L1_vanishes()
560
False
561
sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
562
sage: E.lseries().L1_vanishes()
563
False
564
sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
565
sage: E.lseries().L1_vanishes()
566
True
567
sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
568
sage: E.lseries().L1_vanishes()
569
True
570
sage: E = EllipticCurve([0, 0, 1, -38, 90]) # 361A (CM curve))
571
sage: E.lseries().L1_vanishes()
572
True
573
sage: E = EllipticCurve([0,-1,1,-2,-1]) # 141C (13-isogeny)
574
sage: E.lseries().L1_vanishes()
575
False
576
577
WARNING: It's conceivable that machine floats are not large
578
enough precision for the computation; if this could be the
579
case a RuntimeError is raised. The curve's real period would
580
have to be very small for this to occur.
581
582
ALGORITHM: Compute the root number. If it is -1 then L(E,s)
583
vanishes to odd order at 1, hence vanishes. If it is +1, use
584
a result about modular symbols and Mazur's "Rational Isogenies"
585
paper to determine a provably correct bound (assuming Manin
586
constant is <= 2) so that we can determine whether L(E,1) = 0.
587
588
AUTHOR: William Stein, 2005-04-20.
589
"""
590
return self.L_ratio() == 0
591
592
def L_ratio(self):
593
r"""
594
Returns the ratio $L(E,1)/\Omega$ as an exact rational
595
number. The result is \emph{provably} correct if the Manin
596
constant of the associated optimal quotient is $\leq 2$. This
597
hypothesis on the Manin constant is true for all semistable
598
curves (i.e., squarefree conductor), by a theorem of Mazur
599
from his \emph{Rational Isogenies of Prime Degree} paper.
600
601
EXAMPLES:
602
sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
603
sage: E.lseries().L_ratio()
604
1/5
605
sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
606
sage: E.lseries().L_ratio()
607
1/25
608
sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
609
sage: E.lseries().L_ratio()
610
0
611
sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
612
sage: E.lseries().L_ratio()
613
0
614
sage: E = EllipticCurve([0, 0, 1, -38, 90]) # 361A (CM curve))
615
sage: E.lseries().L_ratio()
616
0
617
sage: E = EllipticCurve([0,-1,1,-2,-1]) # 141C (13-isogeny)
618
sage: E.lseries().L_ratio()
619
1
620
sage: E = EllipticCurve(RationalField(), [1, 0, 0, 1/24624, 1/886464])
621
sage: E.lseries().L_ratio()
622
2
623
624
# See trac #3651:
625
sage: EllipticCurve([0,0,0,-193^2,0]).sha().an()
626
4
627
628
WARNING: It's conceivable that machine floats are not large
629
enough precision for the computation; if this could be the
630
case a RuntimeError is raised. The curve's real period would
631
have to be very small for this to occur.
632
633
ALGORITHM: Compute the root number. If it is -1 then L(E,s)
634
vanishes to odd order at 1, hence vanishes. If it is +1, use
635
a result about modular symbols and Mazur's "Rational Isogenies"
636
paper to determine a provably correct bound (assuming Manin
637
constant is <= 2) so that we can determine whether L(E,1) = 0.
638
639
AUTHOR: William Stein, 2005-04-20.
640
"""
641
try:
642
return self.__lratio
643
except AttributeError:
644
pass
645
646
if not self.__E.is_minimal():
647
self.__lratio = self.__E.minimal_model().lseries().L_ratio()
648
return self.__lratio
649
650
if self.__E.root_number() == -1:
651
self.__lratio = Q(0)
652
return self.__lratio
653
654
# Even root number. Decide if L(E,1) = 0. If E is a modular
655
# *OPTIMAL* quotient of J_0(N) elliptic curve, we know that T *
656
# L(E,1)/omega is an integer n, where T is the order of the
657
# image of the rational torsion point (0)-(oo) in E(Q), and
658
# omega is the least real Neron period. (This is proved in my
659
# Ph.D. thesis, but is probably well known.) We can easily
660
# compute omega to very high precision using AGM. So to prove
661
# that L(E,1) = 0 we compute T/omega * L(E,1) to sufficient
662
# precision to determine it as an integer. If eps is the
663
# error in computation of L(E,1), then the error in computing
664
# the product is (2T/Omega_E) * eps, and we need this to be
665
# less than 0.5, i.e.,
666
# (2T/Omega_E) * eps < 0.5,
667
# so
668
# eps < 0.5 * Omega_E / (2T) = Omega_E / (4*T).
669
#
670
# Since in general E need not be optimal, we have to choose
671
# eps = Omega_E/(8*t*B), where t is the exponent of E(Q)_tor,
672
# and is a multiple of the degree of an isogeny between E
673
# and the optimal curve.
674
#
675
# NOTES: We *do* have to worry about the Manin constant, since
676
# we are using the Neron model to compute omega, not the
677
# newform. My theorem replaces the omega above by omega/c,
678
# where c is the Manin constant, and the bound must be
679
# correspondingly smaller. If the level is square free, then
680
# the Manin constant is 1 or 2, so there's no problem (since
681
# we took 8 instead of 4 in the denominator). If the level
682
# is divisible by a square, then the Manin constant could
683
# be a divisible by an arbitrary power of that prime, except
684
# that Edixhoven claims the primes that appear are <= 7.
685
686
t = self.__E.torsion_subgroup().order()
687
omega = self.__E.period_lattice().basis()[0]
688
d = self.__E._multiple_of_degree_of_isogeny_to_optimal_curve()
689
C = 8*d*t
690
eps = omega / C
691
# coercion of 10**(-15) to our real field is needed to
692
# make unambiguous comparison
693
if eps < R(10**(-15)): # liberal bound on precision of float
694
raise RuntimeError, "Insufficient machine precision (=%s) for computation."%eps
695
sqrtN = 2*int(sqrt(self.__E.conductor()))
696
k = sqrtN + 10
697
while True:
698
L1, error_bound = self.at1(k)
699
if error_bound < eps:
700
n = int(round(L1*C/omega))
701
quo = Q(n) / Q(C)
702
self.__lratio = quo / self.__E.real_components()
703
return self.__lratio
704
k += sqrtN
705
misc.verbose("Increasing precision to %s terms."%k)
706
707