Sharedwww / tables / hecke-tutorial / hecke.texOpen in CoCalc
Author: William A. Stein
1
\documentclass{article}
2
\include{macros}
3
4
\newcommand{\head}[1]{\vspace{3ex}\par\noindent{\large \bf
5
#1}\vspace{1ex}\par\noindent}
6
7
\newcommand{\bighead}[1]{\vspace{4ex}\par\noindent{\Large \bf
8
#1}\vspace{1ex}\par\noindent}
9
10
\begin{document}
11
\begin{center}
12
{\bf \Large \sc HECKE: Modular Forms Calculator}\vspace{1ex}\\
13
by William Stein\\
14
January 2, 2004
15
\end{center}
16
17
\head{What is \hecke{}?}\hecke{} is a {\sf C++} program that I wrote
18
in 1999-2000 for computing with modular symbols and modular forms. It
19
implements algorithms of Cremona, Hijikata, Merel,
20
Mestre-Oesterl\'{e}, Shimura, and others. It is free
21
software, released under the GPL,
22
and available for Linux and OS X here:
23
\begin{verbatim}
24
http://modular.fas.harvard.edu/Tables/hecke-cpp.html
25
\end{verbatim}
26
(There is also a Windows port, but I'm not sure how to get a copy.)
27
\hecke{} is {\em not} ``rock solid'', so you should be skeptical of
28
the results it gives and aware that the interface is primitive.
29
Nonetheless, \hecke{} is capable of many computations which aren't
30
currently available in any other free package.
31
32
\hecke{} grew out of work on my thesis
33
which involves computing special values of $L$-functions, congruences,
34
and verifying modularity of certain Galois representations. In a
35
sense, \hecke{} is also the program I wish had existed when I was
36
taking my first modular forms course and wanted to see lots of
37
concrete examples of modular forms. Some of the tables computed
38
using \hecke{} can be found at {\tt http://modular.fas.harvard.edu/\~{
39
}was/Tables}.
40
41
I stopped new development of \hecke{} in 2000 and implemented many of
42
the same algorithms (and more) in {\sc Magma}, which is a closed
43
source, non-free, but not for profit, computer algebra system
44
developed at the University of Sydney. (All of the code I wrote for
45
{\sc Magma} is written in {\sc Magma} and can be viewed by anyone.)
46
Fortunately, several volunteers (Alex Brown, Ami Fischman, and Justin
47
Walker) have kept \hecke{} up-to-date, in the sense that it will
48
compile on modern computers.
49
50
\hecke{} is much different than the modular forms package I wrote in
51
{\sc Magma}. One major difference is that {\sc Magma} is a far more
52
complicated system, and using it to do anything nontrivial requires
53
some basic familiarity with how {\sc Magma} works, which takes some
54
time to acquire. In contrast, \hecke{} (especially the ``msymbols''
55
mode, see below) does nothing besides computations with modular forms,
56
and has menus, so you can immediately start computing Hecke operators
57
and basis. However, when using \hecke{} you'll probably often import
58
the results of computations to another system, such as PARI, Maple, or
59
Mathematica, and work with them further there. Another key difference
60
is that \hecke{} computations are persistent, in the sense that
61
\hecke{} saves the result of {\em every} computation you do to your hard
62
drive (in a folder called {\tt data}), so next time you do the
63
computation it is loaded from disk. In contrast, the {\sc Magma}
64
modular forms package as no built-in functionality for saving
65
computations to disk (as of Jan. 2004).
66
67
\newpage\head{What does \hecke{} do?}\hecke{} is an interactive calculator.
68
\begin{itemize}
69
\item {\bf Modular forms and Hecke operators:} Computations on the
70
spaces of modular forms $M_k(\Gamma_1(N),\eps)$, for $k\geq 2$, over
71
cyclotomic and finite fields. Functions include:
72
\begin{itemize}
73
\item Computation of bases of newforms.
74
Within computational
75
limits, the level, weight, and character can be pretty
76
much arbitrary, with the restriction that $k\geq 2$ be
77
an integer. Furthermore, all eigenforms are computed,
78
{\em not} just the ones with eigenvalues in $\Q$.
79
\item Computation of the ``Birch and Swinnerton-Dyer'' rational
80
numbers $L(M_f,i)/\Omega_i$ where $M_f$ is a complex torus
81
attached to $f$ and $\Omega_i$ is a certain volume.
82
\item For optimal quotients $A_f$ of $J_0(N)$
83
associated to newforms:
84
\begin{enumerate}
85
\item The modular degree and group structure of the canonical
86
polarization obtained by pullback of the $\theta$ divisor.
87
\item Intersection of $A_f^{\vee}$ and $A_g^{\vee}$.
88
\item Order of image of $(0)-(\infty)$ in $A_f(\Q)_{\tor}$.
89
\item Multiple of order of $A_f(\Q)_{\tor}$.
90
\item Tamagawa numbers of quotients of $J_0(p)$,
91
with $p$ prime. (Note: Component group
92
order at~$p$ for quotient of $J_0(N)$,
93
when $\ord_p(N)=1$, is available in {\sc Magma}.)
94
\end{enumerate}
95
(Note: Similar computations for quotients of $J_1(N)$
96
are mostly implemented in {\sc Magma}, though not
97
well documented as of January 2004.)
98
\item Discriminants of Hecke algebras.
99
\item Numerical computation of special values and period
100
lattices of forms of even weight $k\geq 2$, in many
101
(but not all) cases. When $f$ has rational Fourier
102
coefficients, computation of the invariants of
103
the associated elliptic curve over $\R$ (the implementation
104
of this is not nearly as refined as in Cremona's elliptic
105
curve package).
106
\end{itemize}
107
108
\item {\bf Formulas:} The classical formulas, such
109
as the numbers of cusps on modular curves, dimensions of spaces
110
of cusps forms, and computation of
111
$\dim S_k(\Gamma_1(N),\eps)$ for $k\geq 2$
112
and $\eps$ a Dirichlet character modulo $N$.
113
(Note: Computation of $\dim S_k(\Gamma_1(N),\eps)$
114
using the Hijikata trace formula is non-optimal;
115
there is a much simpler formula of Cohen and
116
Oesterle, which is what is implemented in {\sc Magma}.)
117
118
\item {\bf Character groups of tori:} Action of Hecke operators
119
$T_{\ell}$, for $\ell=2,3,5,7$, on the character group associated to
120
$J_0(p)$ (using the Mestre-Oesterl\'{e} graph method). The matrices
121
attained in this way are very sparse.
122
123
\item {\bf Tables:} Functions for making tables.
124
125
\end{itemize}
126
127
128
\bighead{Guided tour}In this guided tour, you will see how to use
129
\hecke{} to compute the action of Hecke operators, bases of
130
eigenforms, and obtain information about special values of
131
$L$-functions. The output given below is a small subset of
132
the actual output, which is much more verbose.
133
134
\head{Starting \hecke}To start \hecke{}, type
135
{\tt hecke} at the command line. You will see something like this:
136
\begin{verbatim}
137
# hecke
138
HECKE Version 0.4, Copyright (C) 1999-2003, William A. Stein
139
HECKE comes with ABSOLUTELY NO WARRANTY.
140
This is free software, and you are welcome to redistribute it
141
under certain conditions; read the included COPYING file for details.
142
143
144
HECKE: Modular Forms Calculator Version 0.4 (Sep. 24, 2003)
145
146
William Stein
147
Ported to Mac OS X (Justin C. Walker) and Windows (Alex F. Brown)
148
Send bug reports and suggestions to was@math.harvard.edu.
149
Type ? for help.
150
151
HECKE>
152
\end{verbatim}
153
Typing {\tt ?} gives a list of commands and modes which include:
154
\begin{verbatim}
155
HECKE> ?
156
157
about: About
158
calc: Motive calculator
159
exsymbols: Extended modular symbols mode
160
formulas: Formula calculator
161
graphs: Monodromy pairing calculator
162
msymbols: Modular symbols calculator
163
tables: Table making routines
164
quit: Quit
165
\end{verbatim}
166
\head{Modular forms and Hecke operators calculator}Type {\tt
167
msymbols} to start the modular forms and Hecke operators calculator.
168
You will be asked for several pieces of information, which define the
169
space on which to work. In this mode you can only compute with
170
one space of modular forms at a time (see the {\tt calc} mode for
171
computations that relate different spaces). Answer as follows:
172
\begin{verbatim}
173
level N = 389
174
character chi = 0
175
weight k = 2
176
\end{verbatim}
177
After a brief computation the calculator interface will
178
print some information about $M_2(\Gamma_0(389))$ and
179
await your command.
180
\begin{verbatim}
181
---------------------------------------------------------------
182
Current space: M_2(Gamma_0(389); Q)^+, dim=33
183
Hecke action on: V=M_2, dim=33
184
---------------------------------------------------------------
185
M_2(389) ?
186
\end{verbatim}
187
The \verb+Q)^+{\tt +} means that we are actually computing with the $+1$
188
quotient of modular symbols, so in general some Eisenstein series
189
could be missing, but all cusp forms will be present. Use the
190
{\tt exsymbols} mode for more precise control.
191
192
Typing {\tt ?} gives a list of help topics.
193
\begin{verbatim}
194
1: computing OPERATORS
195
2: setting current SPACE
196
3: cutting out SUBSPACES
197
4: computing BASIS
198
5: CONVERSIONS between representations
199
6: arithmetic INVARIANTS of torus A_V
200
7: INVARIANTS of Hecke algebra
201
8: OPTIONS
202
\end{verbatim}
203
To get an idea of what $M_2(\Gamma_0(389))$ looks like, we compute
204
the characteristic polynomials of several Hecke operators $T_n$.
205
We do this by typing {\tt t}, then entering a positive integer $n$.
206
\begin{verbatim}
207
? t
208
Tn: Enter values of n, then q when done.
209
2
210
f2=(x-3)*(x + 2)*(x^2 -2)*(x^3 -4*x -2)*
211
(x^20 -3*x^19 -29*x^18 + 91*x^17 + 338*x^16 -1130*x^15
212
-2023*x^14 + 7432*x^13 + 6558*x^12 -28021*x^11 -10909*x^10
213
+ 61267*x^9 + 6954*x^8 -74752*x^7 + 1407*x^6 + 46330*x^5
214
-1087*x^4 -12558*x^3 -942*x^2 + 960*x + 148)*
215
(x^6 + 3*x^5 -2*x^4 -8*x^3 + 2*x^2 + 4*x -1);
216
q
217
\end{verbatim}
218
Let's compute the action of a few Hecke operators on the factor of
219
degree two. Type {\tt subeigenpoly}, then select the appropriate
220
factor:
221
\begin{verbatim}
222
M_2(389) ? subeigenpoly
223
[...]
224
n = 2 <---- you type this
225
Choose one of the following factors.
226
1: x+2
227
2: x-3
228
3: x^2-2
229
4: x^3-4*x-2
230
5: x^20-3*x^19-29*x^18+91*x^17+338*x^16-1130*x^15-2023*x^14+
231
7432*x^13+6558*x^12-28021*x^11-10909*x^10+61267*x^9+6954*x^8-
232
74752*x^7+1407*x^6+46330*x^5-1087*x^4-12558*x^3-942*x^2+960*x+148
233
6: x^6+3*x^5-2*x^4-8*x^3+2*x^2+4*x-1
234
7: ALL factors
235
Select a factor: 3 <---- you type this
236
\end{verbatim}
237
238
When the {\tt M\_2(389) ? } prompt appears, type {\tt opmatrix} to
239
turn on matrix display and {\tt opcharpoly} to turn off
240
computation of characteristic polynomials. Now you can compute
241
matrices which represent the Hecke operators on this dimension two
242
space:
243
\begin{verbatim}
244
M_2(389) ? opmatrix
245
matrix display on
246
M_2(389) ? opcharpoly
247
charpoly display off
248
M_2(389) ? t
249
2
250
T2=[2,1;-2,-2];
251
3
252
T3=[0,1;-2,-4];
253
6
254
T6=[-2,-2;4,6];
255
q
256
M_2(389) ? opmatrix
257
matrix display off
258
M_2(389) ? opcharpoly
259
charpoly display on
260
\end{verbatim}
261
Let $A$ denote the corresponding two-dimensional optimal quotient of
262
$J_0(389)$. To compute the BSD value $L(A,1)/\Omega_A$, type {\tt
263
torusbsd}. \hecke{} outputs $0$ along with the first few terms of the
264
$q$-expansion of $f$ and the discriminant of the ring
265
$\Z[\ldots,a_n,\ldots]$:
266
\begin{verbatim}
267
\\ L(A_f1,1)/Omega_f = 0
268
\\ disc(Z[f]) = 2^3
269
a1 = Mod(a,a^2-2);
270
f1 = q + (a1)*q^2 + (a1-2)*q^3 + -1*q^5 + (-2*a1+2)*q^6 +
271
(-2*a1-1)*q^7 + O(q^8);
272
\end{verbatim}
273
274
That $L(A_f,1)=0$ is consistent with the sign of the functional
275
equation for $L(A_f,s)$. The sign in the functional equation for the
276
$L$-function is minus the sign of the Atkin-Lehner involution
277
$W_{389}$. To compute this involution, type {\tt actatkin} and then
278
enter {\tt 389} for $p$. \hecke{} compute that $W_{389}=I$ on~$A$,
279
so the sign in the functional equation is $-1$ and $L(A,1)$ is forced
280
to vanish.
281
\begin{verbatim}
282
M_2(389) ? actatkin
283
Compute W_q where p = 389
284
[...]
285
charpoly(W389) = (x -1)^2
286
\end{verbatim}
287
Where it says ``Compute $W_q$ where $p=$'', the subscript~$q$
288
is the power of the prime~$p$ that exactly divides the level.
289
290
291
To obtain the $q$-expansion of a normalized eigenform in
292
our two-dimensional space, type {\tt basisnew} then {\tt n=7}.
293
The result is
294
\begin{verbatim}
295
s1=t^2-2; s=Mod(t,t^2-2);
296
f1 = q + (s)*q^2 + (s-2)*q^3 + -1*q^5 +
297
(-2*s+2)*q^6 + (-2*s-1)*q^7 + O(q^8);
298
\end{verbatim}
299
which means that a normalized newform is
300
$$f_1 = q +\sqrt{2}q^2 + (\sqrt{2}-2)q^3
301
-q^5 + (-2\sqrt{2}+2)q^6
302
+(-2\sqrt{2}-1)q^7 + \cdots$$
303
304
The space $S_2(\Gamma_0(389))$ is of particular interest because
305
$p=389$ is the only prime $<50000$ such that $p$ divides
306
the discriminant of the Hecke algebra associated to
307
$S_2(\Gamma_0(p))$.
308
To compute the discriminant of the Hecke algebra $\T$ on $S_2(\Gamma_0(389))$,
309
first switch back to the full cuspidal subspace using the
310
{\tt spacecusp} command.
311
\begin{verbatim}
312
M_2(389) ? ?2
313
314
spacecusp spaceeisenstein spaceintegral
315
spacefull spaceload spacemkz
316
spacenew spacesave
317
318
M_2(389) ? spacecusp
319
---------------------------------------------------------------
320
Current space: M_2(Gamma_0(389); Q)^+, dim=33
321
Hecke action on: V=S_2, dim=32
322
---------------------------------------------------------------
323
\end{verbatim}
324
Next type {\tt heckedisc} and wait a minute while Hecke operators
325
$T_n$, for $n\leq 65$ are computed by \hecke{} in order to compute the
326
discriminant.
327
\begin{verbatim}
328
M_2(389) ? heckedisc
329
... (wait) ...
330
disc(T|V) = 151275502126849231372972147100629748722244296572574
331
00664317000679427623878656000000
332
[It seems to wait forever in the current version, perhaps
333
trying to factor the discriminant...]
334
\end{verbatim}
335
We find that the discriminant of the $\Z$-module generated by
336
$T_1,\ldots,T_{65}$ is
337
$$592456554486106225601956409404798293104261020095616213409857536000000$$
338
$$=2^{53} \cdot 3^4\cdot 5^6\cdot31^2\cdot 37\cdot97^2\cdot 389\cdot3881
339
\cdot 215517113148241
340
\cdot 477439237737571441$$
341
342
343
344
\newpage\head{Nontrivial character and weight}Next, compute
345
a basis of eigenforms for
346
$S_4(\Gamma_0(13),\eps)$
347
where $\eps:(\Z/13\Z)\ra\C^*$ is a character whose image has
348
order $3$. Type {\tt x} to quit computing on $M_2(389)$, type
349
{\tt msymbols} again and enter {\tt N = 13}, {\tt chi = 3},
350
and {\tt k = 4}. In a second, the status display will appear:
351
\begin{verbatim}
352
-------------------------------------------------------------------
353
Current space: M_4(Gamma_0(13), eps=[3]; Q[a]/(x^2 + -1 * x + 1))^+, dim=5
354
Hecke action on: V=M_4, dim=5
355
-------------------------------------------------------------------
356
M_4(13) ?
357
\end{verbatim}
358
(Note: The quadratic polynomial in the quotient should
359
be in terms of $a$ instead of $x$, but I never implemented
360
this.)
361
Type {\tt basisnew}, then {\tt n = 3} to get the first $3$
362
terms of the $q$-expansions of a basis of newforms.
363
\begin{verbatim}
364
M_4(13) ? basisnew
365
max n=3
366
\end{verbatim}
367
(Note: Only one representative from each Galois conjugacy class
368
of newforms is provided.) The output is
369
\begin{verbatim}
370
f1 = q + (-4*a)*q^2 + (-2*a)*q^3 + O(q^4);
371
s2=t^2+(-5*a)*t+(2*a-2); s=Mod(t,t^2+(-5*a)*t+(2*a-2));
372
f2 = q + (s)*q^2 + ((-3)*s+(5*a))*q^3 + O(q^4);
373
\end{verbatim}
374
This means that there are two conjugacy classes of normalized
375
eigenforms, with representatives $f_1$ and $f_2$. The first is
376
$f_1=q-4aq^2-2aq^3+\cdots$, where~$a$ is a primitive cube root of~$1$,
377
and the second is $f_2 =q + sq^2 +(-3s+5a)q^3 +\cdots$ where~$s$ is a
378
root of $t^2-5at+2a-2=0$.
379
380
To work in fields of characteristic other than $0$,
381
use the extended mode by typing {\tt exsymbols} instead of {\tt msymbols}
382
at the {\tt HECKE> } prompt.
383
384
\head{Motives associated to modular forms}The {\tt msymbols} mode is
385
useful for computing basis of eigenforms and the action of Hecke
386
operators on spaces of modular forms. It is less useful
387
for computing specific information about the structure of $J_0(N)$.
388
For that, use the {\tt calc} mode. Type {\tt x} to get to the {\tt
389
HECKE>} prompt, then type {\tt calc}. When asked if you want to work
390
in the fast $+1$ quotient, typing {\tt n}. (If you type {\tt yes},
391
many computations will be an order of magnitude faster, but are likely
392
to be wrong by a power of~$2$.)
393
394
A space (or the corresponding abelian variety) is specified in the
395
{\tt calc} mode as follows:
396
\begin{center}
397
{\bf [level]k[weight][isogeny class].[command][(arguments)]}
398
\end{center}
399
where the level is an integer, the weight is an integer $\geq 2$,
400
the isogeny classes are A, B, C, \ldots, Z, AA, BB, CC, and
401
the commands will be outlined below.
402
Omitting the weight part of the command is the same as specifying
403
$k=2$.
404
405
First enter the calc mode, then type {\tt 125} to obtain a list of
406
optimal quotients of $J_0(125)$.
407
\begin{verbatim}
408
M_4(13) ? q
409
Leaving modular symbols calculator.
410
HECKE> ?
411
412
about: About
413
calc: Motive calculator
414
exsymbols: Extended modular symbols mode
415
formulas: Formula calculator
416
graphs: Monodromy pairing calculator
417
msymbols: Modular symbols calculator
418
tables: Table making routines
419
quit: Quit
420
421
HECKE> calc
422
Welcome to the motive calculator.
423
WORK IN FAST MODE (+1 quotient, certain powers of 2 *wrong*)? [y] n
424
Type ? for help.
425
426
? 125
427
428
MOTIVECOMMAND = Summarize level.
429
****** SUMMARIZE LEVEL.
430
125k2 dim W
431
A 2 +
432
B 2 -
433
C 4 -
434
\end{verbatim}
435
The first time you type 125, a huge amount of log information will be
436
printed. Simply type 125 again to list the above without the logging
437
information. The second time you compute level 125, it takes no extra
438
time, since everything is stored in the {\tt data} directory. Even
439
if you quit \hecke{} and restart, it will still list 125 quickly.
440
441
This means that $J_0(125)\sim A\cross B\cross C$
442
where $A,B,C$ are abelian varieties of dimensions
443
$2$, $2$, and $4$. We can compute $L(A,1)/\Omega_A$,
444
$L(B,1)/\Omega_B$ and $L(C,1)/\Omega_C$:
445
\begin{verbatim}
446
? 125A.bsdratio
447
0
448
? 125B.bsdratio
449
2^2/5
450
? 125C.bsdratio
451
1/5
452
\end{verbatim}
453
You may also type {\tt 125a.bsdratio}, as the isogeny
454
code is not case sensitive.
455
The signs in the {\tt W} column above give the signs of the
456
Atkin-Lehner involution $W_{125}$.
457
458
What about the torsion? Type {\tt 125.torsionbound(13)} to get an
459
upper bound on the torsion subgroup of $J_0(125)$. Then type {\tt
460
125.cusporder} to compute the order of $(0)-(\infty)\in
461
J_0(125)(\Q)$.
462
\begin{verbatim}
463
? 125.torsionbound(13)
464
5^2
465
? 125.cusporder
466
5^2
467
\end{verbatim}
468
We're lucky because the divisor and multiple match up, so we conclude
469
that $J(\Q)\ncisom\Z^2\oplus(\Z/25\Z)$. Next type {\tt
470
125A.intersection(B)} to obtain the structure of the finite
471
abelian group $A'\intersect B'\subset J$, where $A'$, $B'$ are the
472
abelian varieties dual to $A$ and $B$. The answer {\tt [2,2,2,2]}
473
indicates that the intersection is $(\Z/2\Z)^4$. This implies
474
that the corresponding newforms satisfy a congruence in
475
characteristic $2$. To exit {\tt calc} mode, type {\tt
476
$\backslash{}$q}.
477
478
Unfortunately, I have not written a tutorial for using the
479
extended modular symbols mode or making tables.
480
481
\end{document}
482
483
484
%(For more on $J_0(125)$,
485
%see Poluakis, D. {\em La courbe modulaire $X_0(125)$ et sa
486
%jacobienne}, J. Num. Theory {\bf 25} (1987), no. 1, 112--131.)
487
488
To compute the modular degree of $A$ type {\tt torusmoddeg}.
489
It will again ask for a factor of $T_2$; enter choice $1$.
490
The answer which \hecke{} returns is ``$2^2\cdot 3^2$.
491
{\em Warning:} We are really computing the action of Hecke
492
operators on the $+1$ subspace of $H_1(X_0(N))$ so the modular
493
degree can be wrong by a power of $2$; to compute the correct
494
modular degree it is necessary to start the modular symbols
495
mode using the command {\tt Modular} instead of {\tt modular}.
496