Skip to content

Commit

Permalink
Trac #11631: L-series attached to cusp forms are broken
Browse files Browse the repository at this point in the history
{{{
sage: C = CuspForms(43,2)
sage: N = C.newforms('a')
sage: f = N[1]
sage: L = f.cuspform_lseries()
Boom!
}}}

There are two issues:

  (1) the code doesn't work at all when the degree of the form is > 1,
which is the main interesting case,

  (2) the name "cuspform_lseries" is bad, since f is already a cuspform,
and we use the name "lseries" in all other places (e.g., elliptic
curves, abelian varieties), so it is hard to find.  In fact, I didn't
even think to look for cuspform_lseries, instead only finding this via
lots of grepping and reading source code.

So to fix this issue, I think (1) the bug should get fixed, and (2) the
name should be changed (actually *deprecate* the old name as explained
in the developers guide and introduce the name lseries).

See also #12015.

The part about deprecating cuspform_lseries() is moved to #16917.

URL: http://trac.sagemath.org/11631
Reported by: was
Ticket author(s): Gonzalo Tornaría
Reviewer(s): Michael Neururer
  • Loading branch information
Release Manager authored and vbraun committed Sep 7, 2014
2 parents 72301ea + 1939a9c commit bbb459c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/sage/modular/modform/element.py
Expand Up @@ -685,7 +685,7 @@ def period(self, M, prec=53):
+ mu_dN ** n * (mu_d ** (n * b) - eps * mu_d ** (n * c)))
for n in range(1, numterms + 1))

def cuspform_lseries(self, prec=53,
def cuspform_lseries(self, conjugate=0, prec=53,
max_imaginary_part=0,
max_asymp_coeffs=40):
r"""
Expand All @@ -697,6 +697,8 @@ def cuspform_lseries(self, prec=53,
INPUT:
- ``conjugate`` - (default: 0), integer between 0 and degree-1
- ``prec`` - integer (bits precision)
- ``max_imaginary_part`` - real number
Expand All @@ -716,6 +718,16 @@ def cuspform_lseries(self, prec=53,
sage: L(0.5)
0.0296568512531983
For non-rational newforms we can specify a conjugate::
sage: f = Newforms(43, names='a')[1]
sage: L = f.cuspform_lseries(conjugate=0)
sage: L(1)
0.620539857407845
sage: L = f.cuspform_lseries(conjugate=1)
sage: L(1)
0.921328017272472
Consistency check with delta_lseries (which computes coefficients in pari)::
sage: delta = CuspForms(1,12).0
Expand Down Expand Up @@ -773,7 +785,10 @@ def cuspform_lseries(self, prec=53,
# Find out how many coefficients of the Dirichlet series are needed
# in order to compute to the required precision
num_coeffs = L.num_coeffs()
s = 'coeff = %s;'%self.q_expansion(num_coeffs+1).padded_list()
coeffs = self.q_expansion(num_coeffs+1).padded_list()
# compute the requested embedding
emb = self.base_ring().embeddings(rings.ComplexField(prec))[conjugate]
s = 'coeff = %s;'% map(emb, coeffs)
L.init_coeffs('coeff[k+1]',pari_precode = s,
max_imaginary_part=max_imaginary_part,
max_asymp_coeffs=max_asymp_coeffs)
Expand Down

0 comments on commit bbb459c

Please sign in to comment.