Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/modular/buzzard.py
4045 views
1
"""
2
Conjectural Slopes of Hecke Polynomial
3
4
Interface to Kevin Buzzard's PARI program for computing conjectural
5
slopes of characteristic polynomials of Hecke operators.
6
7
AUTHORS:
8
9
- William Stein (2006-03-05): Sage interface
10
11
- Kevin Buzzard: PARI program that implements underlying functionality
12
"""
13
14
#############################################################################
15
# Copyright (C) 2006 William Stein <[email protected]>
16
#
17
# Distributed under the terms of the GNU General Public License (GPL)
18
#
19
# http://www.gnu.org/licenses/
20
#############################################################################
21
22
__doc_exclude = ['gp', '_gp', 'Gp', 'Integer', 'sage_eval']
23
24
from sage.interfaces.gp import Gp
25
from sage.misc.all import sage_eval
26
27
_gp = None
28
29
def gp():
30
r"""
31
Return a copy of the GP interpreter with the appropriate files loaded.
32
33
EXAMPLE::
34
35
sage: sage.modular.buzzard.gp()
36
PARI/GP interpreter
37
"""
38
39
global _gp
40
if _gp is None:
41
_gp = Gp(script_subdirectory='buzzard')
42
_gp.read("DimensionSk.g")
43
_gp.read("genusn.g")
44
_gp.read("Tpprog.g")
45
return _gp
46
47
## def buzzard_dimension_cusp_forms(eps, k):
48
## r"""
49
## eps is [N, i x 3 matrix], where eps[2][,1] is the primes dividing
50
## N, eps[2][,2] is the powers of these primes that divide N, and eps[2][,3]
51
## is the following: for p odd, p^n||N, it's t such that znprimroot(p^n)
52
## gets sent to exp(2*pi*i/phi(p^n))^t. And for p=2, it's
53
## 0 for 2^1, it's 0 (trivial) or -1 (non-trivial) for 2^2, and for p^n>=8
54
## it's either t>=0 for the even char sending 5 to exp(2*pi*i/p^(n-2))^t,
55
## or t<=-1 for the odd char sending 5 to exp(2*pi*i/p^(n-2))^(-1-t).
56
## (so either 0<=t<2^(n-2) or -1>=t>-1-2^(n-2) )
57
58
## EXAMPLES:
59
## sage: buzzard_dimension_cusp_forms('TrivialCharacter(100)', 4)
60
61
## Next we compute a dimension for the character of level 45 which is
62
## the product of the character of level 9 sending znprimroot(9)=2 to
63
## $e^{2 \pi i/6}^1$ and the character of level 5 sending
64
## \code{znprimroot(5)=2} to $e^{2 \pi i/4}^2=-1$.
65
66
## sage: buzzard_dimension_cusp_forms('DirichletCharacter(45,[1,2])', 4)
67
## <boom!> which is why this is commented out!
68
## """
69
## s = gp().eval('DimensionCuspForms(%s, %s)'%(eps,k))
70
## print s
71
## return Integer(s)
72
73
74
def buzzard_tpslopes(p, N, kmax):
75
"""
76
Returns a vector of length kmax, whose `k`'th entry
77
(`0 \leq k \leq k_{max}`) is the conjectural sequence
78
of valuations of eigenvalues of `T_p` on forms of level
79
`N`, weight `k`, and trivial character.
80
81
This conjecture is due to Kevin Buzzard, and is only made assuming
82
that `p` does not divide `N` and if `p` is
83
`\Gamma_0(N)`-regular.
84
85
EXAMPLES::
86
87
sage: c = buzzard_tpslopes(2,1,50)
88
sage: c[50]
89
[4, 8, 13]
90
91
Hence Buzzard would conjecture that the `2`-adic valuations
92
of the eigenvalues of `T_2` on cusp forms of level 1 and
93
weight `50` are `[4,8,13]`, which indeed they are,
94
as one can verify by an explicit computation using, e.g., modular
95
symbols::
96
97
sage: M = ModularSymbols(1,50, sign=1).cuspidal_submodule()
98
sage: T = M.hecke_operator(2)
99
sage: f = T.charpoly('x')
100
sage: f.newton_slopes(2)
101
[13, 8, 4]
102
103
AUTHORS:
104
105
- Kevin Buzzard: several PARI/GP scripts
106
107
- William Stein (2006-03-17): small Sage wrapper of Buzzard's
108
scripts
109
"""
110
v = gp().eval('tpslopes(%s, %s, %s)'%(p,N,kmax))
111
v = sage_eval(v)
112
v.insert(0, []) # so v[k] = info about weight k (since python is 0-based)
113
return v
114
115