Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28495 views
License: GPL3
ubuntu2004
1
\documentclass[11pt]{article}
2
%\overfullrule=5pt
3
\usepackage{amsmath}
4
\usepackage{amsfonts}
5
\usepackage{amssymb}
6
7
\DeclareMathOperator{\Tr}{Tr}
8
\DeclareMathOperator{\PSL}{PSL}
9
\DeclareMathOperator{\SL}{SL}
10
\DeclareMathOperator{\GL}{GL}
11
\newcommand{\Q}{{\mathbb Q}}
12
\newcommand{\Z}{{\mathbb Z}}
13
\newcommand{\R}{{\mathbb R}}
14
\newcommand{\C}{{\mathbb C}}
15
\newcommand{\z}{\zeta}
16
\newcommand{\al}{\alpha}
17
\newcommand{\be}{\beta}
18
\newcommand{\ga}{\gamma}
19
\renewcommand{\z}{\zeta}
20
\renewcommand{\th}{\theta}
21
\newcommand{\G}{\Gamma}
22
\newcommand{\new}{\text{new}}
23
24
\def\kbd#1{{\tt #1}}
25
26
\begin{document}
27
\pagestyle{plain}
28
29
\title{Tutorial for Modular Forms in Pari/GP}
30
\author{Henri Cohen}
31
32
\maketitle
33
34
\smallskip
35
36
\section{Introduction}
37
38
Three packages are available to work with modular forms and related functions
39
in \kbd{Pari/GP}. The first one is the $L$-function package, which has been
40
available since 2.9.0 (2015), and computes with general motivic
41
$L$-functions, and in particular with $L$-functions attached to Dirichlet
42
characters, Hecke characters, Artin representations, and modular forms. The
43
name of most functions in this package begins with \kbd{lfun}, such as
44
\kbd{lfuninit}.
45
46
The second is the modular symbol package, whose primary aim
47
is not so much to compute modular form spaces and modular forms, but to
48
compute $p$-adic $L$-functions attached to modular forms. The name of most
49
functions in this package begins with \kbd{ms}, such as \kbd{msinit}.
50
51
The third package is the modular forms package, whose aim is to compute in
52
the standard spaces $M_k(\G_0(N),\chi)$ with $k$ integral or half-integral,
53
both with modular form \emph{spaces} and individual modular \emph{forms}. The
54
name of most functions in this package begins with \kbd{mf}, such as
55
\kbd{mfinit}. The goal of the present manual is to describe this package in
56
view of a guide for a new user, so will essentially be a tutorial,
57
although we include a reference guide at the end.
58
59
\medskip
60
61
We can work on five subspaces of $M_k(\G_0(N),\chi)$, through a
62
corresponding \emph{space flag} in the commands: the cuspidal \emph{new
63
space} $S_k^{\new}(\G_0(N),\chi)$ (flag = 0), the full cuspidal space
64
$S_k(\G_0(N),\chi)$ (flag = 1), the old space $S_k^{\text{old}}(\G_0(N),\chi)$
65
(flag = 2, probably of little use), the space generated by all Eisenstein
66
series ${\cal E}_k(\G_0(N),\chi)$ (flag = 3), and finally the full space
67
including the Eisenstein part $M_k(\G_0(N),\chi)$ (flag = 4, which can be
68
omitted since it is the default). Note that although it can be defined, we have
69
not included the space $M_k^{\new}$, nor the ``certain space'' of
70
Zagier--Skoruppa. In the half-integral weight case, we have included
71
only the full cuspidal space and the full space (flags $1$ and $4$), as
72
well as the Kohnen's $+$-space and the corresponding newspace and eigenforms
73
when $N$ is squarefree.
74
75
Note in particular that the package includes the computation of modular
76
forms of weight $k=1$ and of half-integral weight.
77
78
\medskip
79
80
The modular forms themselves are represented in a special internal format
81
which the user need not worry about and which basically is a recipe to
82
compute successive Fourier coefficients at infinity: if $F$ is a GP modular
83
form, \kbd{mfcoefs}$(F, 10)$ will give you the Fourier coefficients at infinity
84
from $a(0)$ to $a(10)$ of the modular form corresponding to $F$ as a row
85
\emph{vector} (if you want a power series expansion, use the GP function
86
\kbd{Ser}, see below). Many operations are available on such objects, but the
87
most important thing the user needs to know is that the number of Fourier
88
coefficients need not be specified in advance: the command
89
\kbd{mfcoefs}$(F,n)$ is valid for any integer $n$. We will of course explain
90
the details of this below.
91
92
\medskip
93
94
Finally, note that we may roughly divide the complexity of available functions
95
into three levels:
96
97
\begin{enumerate}
98
\item The first level includes all the basic modular form and modular spaces
99
creation and operations. Many functions are very fast, but some are quite
100
time-consuming for very different reasons; first those dealing with forms and
101
spaces involving Dirichlet characters of large order; second finding eigenforms
102
when the splitting using the Hecke algebra is difficult; and third modular
103
spaces of weight $1$ when there exist ``exotic'' forms. Reasonable levels
104
(for low weight) can go up to a few thousands. The critical parameter is
105
actually the dimension of the underlying modular form space where linear
106
algebra needs to be performed, so the time complexity is at least
107
proportional to $(N\times k)^3$, and in fact more than that due to
108
coefficient explosion in the base field $\Q(\chi)$.
109
110
\item The second level needs technical information about spaces generated by
111
products of two Eisenstein series, and is quite expensive. But it allows to
112
perform computations which would be almost impossible otherwise, such as
113
Fourier expansions of $f|_k\gamma$ (hence at any cusp), numerical
114
evaluation of modular forms at any point in the upper half-plane (even close
115
to the real axis) or $L$-functions attached to an arbitrary form. We have
116
included a caching method, so that once a single such computation is
117
performed in a given space, the needed technical data is stored and
118
no longer needs to be computed so that all subsequent calls are much faster.
119
Reasonable levels (for low weight) can go up to one thousand, say.
120
Again, the critical parameter is the space dimension but this time the
121
linear algebra is performed in large degree cyclotomic fields, even when the
122
Nebentypus is trivial. Compared to the first level, we lose at least
123
a factor $\Lambda(N)$ (the exponent of the multiplicative group $(\Z/N\Z)^*$)
124
in the time complexity, which gets as large as $N-1$ if $N$ is prime.
125
126
\item The third level, which uses the second level functions, allows more
127
numerical computations such as period polynomials, modular symbols,
128
Petersson products, etc\dots The time complexity does not increase much
129
since it is dominated by the second level.
130
\end{enumerate}
131
132
\section{Creation of Modular Forms}
133
134
In \kbd{Pari/GP} modular forms can be created in three different ways:
135
136
\begin{itemize}\item As \emph{basic modular forms}, i.e., forms attached (or
137
not) to different mathematical objects, and which are of so frequent use
138
that we have implemented them so that the user has them at his disposal.
139
Examples: \kbd{mfDelta} (Ramanujan's delta), \kbd{mfEk}
140
(Eisenstein series of weight $k$ on the full modular group; of course
141
we also have more general Eisenstein series), \kbd{mffrometaquo}
142
(eta quotients), \kbd{mffromell} (modular form attached to an elliptic
143
curve over $\Q$), \kbd{mffromqf} (modular form attached
144
to a lattice).
145
\item From existing forms by applying \emph{operations}.
146
Examples: multiplication/division, linear combination,
147
derivation and integration, Serre derivative, RC-brackets, Hecke and
148
Atkin--Lehner operations, expansion and diamond operators, etc\dots
149
\item Through the creation of the modular form \emph{spaces}:
150
typically, if only \kbd{mf=mfinit} is applied, then a
151
basis of forms is obtained by the command \kbd{mfbasis(mf)}.
152
The command \kbd{mfeigenbasis(mf)} produces the canonical basis of
153
eigenforms.\end{itemize}
154
155
\section{A First Session: working with Leaves}
156
157
This is now a tutorial session. We will see sample commands as we go along.
158
159
\begin{verbatim}
160
? D = mfDelta(); V = mfcoefs(D, 8)
161
% = [0, 1, -24, 252, -1472, 4830, -6048, -16744, 84480]
162
\end{verbatim}
163
164
The command \kbd{mfcoefs(D,n)} gives the vector of Fourier coefficients (at
165
infinity) $[a(0),a(1),\dots,a(n)]$ (note that there are $n+1$ coefficients).
166
This is a compact representation, but if you prefer power series you
167
can use \kbd{Ser(V,q)} (convert a vector into a power series).
168
169
\begin{verbatim}
170
% = q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6\
171
- 16744*q^7 + 84480*q^8 + O(q^9)
172
\end{verbatim}
173
(This simple-minded recipe only works when the form has rational
174
coefficients. Make sure to use \kbd{q = varhigher("q")} first if the form has
175
nonrational algebraic coefficients to avoid problems with variable priorities.)
176
Similarly
177
178
\begin{verbatim}
179
? E4 = mfEk(4); E6 = mfEk(6); apply(f->mfcoefs(f,3),[E4,E6])
180
% = [[1, 240, 2160, 6720], [1, -504, -16632, -122976]]
181
? E43 = mfpow(E4, 3); E62 = mfpow(E6, 2);
182
? DP = mflinear([E43, E62], [1, -1]/1728);
183
? mfcoefs(DP, 6)
184
% = [0, 1, -24, 252, -1472, 4830, -6048]
185
? mfisequal(D, DP)
186
% = 1
187
\end{verbatim}
188
189
Self-explanatory. Note that there is a command \kbd{mfcoef(F, n)} (without
190
the final ``s'') which simply outputs the coefficient $a(n)$.
191
A final example of the same type:
192
193
\begin{verbatim}
194
? F = mffrometaquo([1,2; 11,2]); mfcoefs(F,10)
195
% = [0, 1, -2, -1, 2, 1, 2, -2, 0, -2, -2]
196
? G = mffromell(ellinit("11a1"))[2];
197
? mfisequal(F, G)
198
% = 1
199
\end{verbatim}
200
201
Here, \kbd{mffrometaquo} takes as argument a matrix representing an
202
\emph{eta quotient}, here $\eta(1\times\tau)^2\eta(11\times\tau)^2$.
203
204
The second component of the \kbd{mffromell} output is the modular form
205
associated to the elliptic curve by modularity.
206
207
\section{A Second Session: Modular Form Spaces}
208
209
In the first session, we have seen a few preinstalled modular forms (that
210
we can call \emph{leaves}), and a number of operations on them. All reasonable
211
operations have been implemented (if some are missing, please tell us). We are
212
now going to work with \emph{spaces} of modular forms.
213
214
\begin{verbatim}
215
? mf = mfinit([1,12]); L = mfbasis(mf); #L
216
% = 2
217
? mfdim(mf)
218
% = 2
219
\end{verbatim}
220
221
This creates the full space of modular forms of level $1$ and weight $12$.
222
This space is created thanks to an almost random basis that one can obtain
223
using \kbd{mfbasis}, and we see either by asking for the number of elements
224
of \kbd{L} or by using the command \kbd{mfdim}, that it has dimension $2$,
225
not surprising. We can see it better by writing:
226
227
\begin{verbatim}
228
? mfcoefs(L[1],6)
229
% = [691/65520, 1, 2049, 177148, 4196353, 48828126, 362976252]
230
? mfcoefs(L[2],6)
231
% = [0, 1, -24, 252, -1472, 4830, -6048]
232
\end{verbatim}
233
or simply
234
\begin{verbatim}
235
? mfcoefs(mf,6) \\ apply mfcoefs to mfbasis elements
236
% =
237
[691/65520 0]
238
[ 1 1]
239
[ 2049 -24]
240
[ 177148 252]
241
[ 4196353 -1472]
242
[ 48828126 4830]
243
[362976252 -6048]
244
\end{verbatim}
245
246
Note two things: first, the Eisenstein series are given before the cusp forms
247
(this may change, but for now this is the case), and second, the Eisenstein
248
series is normalized so that it is the coefficient $a(1)$ which is equal to
249
$1$, and not $a(0)$. In particular, here at least, it is a normalized
250
Hecke eigenform.
251
252
If we want to work only in the cuspidal space $S_{12}(\G)$, we simply use
253
the flag $1$, such as:
254
255
\begin{verbatim}
256
? mf = mfinit([1,12], 1); L = mfbasis(mf); #L
257
% = 1
258
? mfcoefs(L[1],6)
259
% = [0, 1, -24, 252, -1472, 4830, -6048]
260
\end{verbatim}
261
262
Let us now look at higher dimensional cases. In the following example, we
263
consider the \emph{new space} (flag = $0$), although in the present case
264
this is the same as the cuspidal space:
265
266
\begin{verbatim}
267
? mf = mfinit([35,2], 0); L = mfbasis(mf); #L
268
% = 3
269
? for (i = 1, 3, print(mfcoefs(L[i], 10)))
270
[0, 3, -1, 0, 3, 1, -8, -1, -9, 1, -1]
271
[0, -1, 9, -8, -11, -1, 4, 1, 13, 7, 9]
272
[0, 0, -8, 10, 4, -2, 4, 2, -4, -12, -8]
273
\end{verbatim}
274
275
These are essentially random cusp forms. Usually, you want the eigenforms:
276
this is obtained by the function \kbd{mfeigenbasis} (note in passing that
277
\kbd{B=mfeigenbasis(mf)} adds components to \kbd{mf}, so that the next
278
call is instantaneous). You can ask for the defining number fields with the
279
command \kbd{mffields}. Note that these commands act only on the new space,
280
but the package also accepts the spaces that contain it (such as the cuspidal
281
space or the full space, but not the old space), although the result is only
282
about the new space.
283
284
\begin{verbatim}
285
? mffields(mf)
286
% = [y, y^2 - y - 4]
287
? L = mfeigenbasis(mf); #L
288
% = 2
289
? mfcoefs(L[1],10)
290
% = [0, 1, 0, 1, -2, -1, 0, 1, 0, -2, 0]
291
? mfcoefs(L[2],4)
292
% = [Mod(0, y^2 - y - 4), Mod(1, y^2 - y - 4),\
293
Mod(-y, y^2 - y - 4),Mod(y - 1, y^2 - y - 4),\
294
Mod(y + 2, y^2 - y - 4)]
295
? lift(mfcoefs(L[2],10))
296
% = [0, 1, -y, y - 1, y + 2, 1, -4, -1, -y - 4, -y + 2, -y]
297
\end{verbatim}
298
299
The command \kbd{mffields} gives the polynomials in the variable $y$ defining
300
the number field extensions on which the eigenforms are defined. Here, one of
301
the fields is $\Q$, the other is $\Q(\sqrt{17})$. To obtain the eigenforms,
302
we use \kbd{mfeigenbasis}, and there are only two and not three, since the
303
one defined on $\Q(\sqrt{17})$ goes together with its conjugate. Asking
304
directly \kbd{mfcoefs(L[2],4)} gives the coefficients as \kbd{polmods}, not
305
easy to read, so it is usually preferable to \emph{lift} them, giving the
306
last command, where in the output we must of course remember that $y$ stands
307
for \emph{one} of the two roots of $y^2-y-4=0$, i.e., $(1\pm\sqrt{17})/2$.
308
309
In fact, for some numerical computations, we really need the
310
coefficients of the eigenform embedded in $\C$, and not just as abstract
311
algebraic numbers (in our case of trivial character, they will be in $\R$).
312
This is why a few functions (most notably \kbd{mfeval} and \kbd{lfunmf})
313
will return a \emph{vector} of results and not a scalar when called on such
314
a form.
315
316
For instance, here is a little GP script which computes the numerical
317
expansion of a modular form instead of the expansion in \kbd{polmods}:
318
319
\begin{verbatim}
320
mfcoefsembed(F,n) = mfembed(F, mfcoefs(F,n));
321
\end{verbatim}
322
323
Note that this produces a vector of expansions when the eigenforms
324
are defined over an extension, i.e. $[\Q(F):\Q(\chi)] > 1$, one per conjugate
325
form.
326
\begin{verbatim}
327
? mfcoefsembed(L[2],5) \\ two conjugate forms
328
%4 = [[0, 1, 1.5615..., -2.5615..., 0.43844..., 1],
329
[0, 1, -2.561...,, 1.5615...,, 4.5615..., 1]]
330
\end{verbatim}
331
332
The first eigenform found above is \emph{rational}, hence by the modularity
333
theorem there exists up to isogeny a unique elliptic curve to which it
334
corresponds. We check this by writing
335
336
\begin{verbatim}
337
? [mf,F] = mffromell(ellinit("35a1")); mfcoefs(F, 10)
338
% = [0, 1, 0, 1, -2, -1, 0, 1, 0, -2, 0]
339
? mfisequal(F, L[1])
340
% = 1
341
\end{verbatim}
342
343
For a more typical example (still with no character):
344
345
\begin{verbatim}
346
? [ mfdim([96,2], flag) | flag <- [0..4] ]
347
% = [2, 9, 7, 15, 24]
348
\end{verbatim}
349
350
This gives us the dimensions of the new space, the cuspidal space,
351
the old space, the space of Eisenstein series, and the whole space of
352
modular forms.
353
354
Just for fun, we write (recall that the default is the full space):
355
\begin{verbatim}
356
? mf = mfinit([96,2]); L = mfbasis(mf);
357
? for (i = 12, 15, print(mfcoefs(L[i], 15)))
358
[23/24, 1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24]
359
[31/24, 1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24]
360
[47/24, 1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24]
361
[95/24, 1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24]
362
\end{verbatim}
363
364
Apparently, these four Eisenstein series differ only by their constant
365
term, which is of course not possible. Indeed:
366
367
\begin{verbatim}
368
? F = mflinear([L[14],L[12]],[1,-1]); mfcoefs(F, 50)
369
% = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\
370
0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\
371
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0]
372
? G = mfhecke(mf, F, 24); mfcoefs(G, 12)
373
% = [1, 24, 24, 96, 24, 144, 96, 192, 24, 312, 144, 288, 96]
374
? mftobasis(mf, G)
375
% = [0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\
376
0, 0, 0, 0, 0, 0]~
377
? 24*mfcoefs(L[5], 12)
378
% = [1, 24, 24, 96, 24, 144, 96, 192, 24, 312, 144, 288, 96]
379
\end{verbatim}
380
381
The first command shows that the Eisenstein series differ on their $n$-th
382
Fourier coefficient for $n=0$, $24$, and $48$, and the second command applies
383
the Hecke operator $T_{24}$ (sometimes denoted $U_{24}$) to the difference,
384
whose effect is to replace $a(n)$ by $a(24n)$, giving the much more
385
compact output of $G$. The last commands show that $G$ is equal to
386
$24$ times the fifth Eisenstein series \kbd{L[5]}.
387
388
\begin{verbatim}
389
? mf=mfinit([96,2],0); mffields(mf)
390
% = [y, y]
391
? L = mfeigenbasis(mf); for(i=1, 2, print(mfcoefs(L[i], 16)))
392
[0, 1, 0, 1, 0, 2, 0, -4, 0, 1, 0, 4, 0, -2, 0, 2, 0]
393
[0, 1, 0, -1, 0, 2, 0, 4, 0, 1, 0, -4, 0, -2, 0, -2, 0]
394
? Fa = mffromell(ellinit("96a1"))[2]; mfcoefs(Fa, 16)
395
% = [0, 1, 0, 1, 0, 2, 0, -4, 0, 1, 0, 4, 0, -2, 0, 2, 0]
396
? Fb = mffromell(ellinit("96b1"))[2]; mfcoefs(Fb, 16)
397
% = [0, 1, 0, -1, 0, 2, 0, 4, 0, 1, 0, -4, 0, -2, 0, -2, 0]
398
\end{verbatim}
399
400
The \kbd{mffromell} function returns a triple \kbd{[mf,F,C]},
401
where \kbd{mf} is the modular form cuspidal space to which \kbd{F} belongs,
402
\kbd{F} is the rational eigenform corresponding to the elliptic curve by
403
modularity, and \kbd{C} is the vector of coefficients of \kbd{F} on the
404
basis in \kbd{mf}, which we recall is usually not a basis of eigenforms
405
(otherwise \kbd{F} would belong to this basis).
406
407
Note also that \kbd{Fa} and \kbd{Fb} are twists of one another:
408
409
\begin{verbatim}
410
? mfisequal(mftwist(Fa, -4), Fb)
411
% = 1
412
\end{verbatim}
413
414
\section{Interlude: Dirichlet characters}
415
416
There are many ways to represent multiplicative characters on $(\Z/N\Z)^*$ in
417
\kbd{Pari/Gp}, we will list them by increasing order of sophistication,
418
restricting to characters with complex values:
419
420
\begin{itemize}
421
422
\item A quadratic character $(D/.)$ (Kronecker symbol) is described by
423
the integer $D$. For instance $1$ is the trivial character.
424
425
\item There is a (noncanonical but fixed) bijection between $(\Z/N\Z)^\times$
426
and its character group, via \emph{Conrey labels}. So \kbd{Mod}$(a,N)$
427
represents a character whenever $a$ is coprime to $N$. This makes it easy
428
to loop on all characters without worrying too much about which is which.
429
In this labeling, \kbd{Mod(1,N)} is the trivial character, and characters
430
are multiplied/divided by performing the corresponding operation on their
431
Conrey labels.
432
433
\item The finite abelian group $G = (\Z/N\Z)^*$ is written
434
$$G = \bigoplus_{i\leq n}\; (\Z/d_i\Z) \cdot g_i,$$
435
with $d_n \mid \dots \mid d_2 \mid d_1$ (SNF condition), all $d_i > 0$, and
436
$\prod_i d_i = \phi(N)$. The SNF condition makes the $d_i$ unique, but the
437
generators $g_i$, of respective order $d_i$, are definitely not unique. The
438
$\oplus$ notation means that all elements of $G$ can be written uniquely as
439
$\prod_i g_i^{n_i}$ where $n_i \in \Z/d_i\Z$. The $g_i$ are the so-called
440
\emph{SNF generators} of $G$. The command \kbd{znstar}$(N)$ outputs the SNF
441
structure (group order, $d_i$ and $g_i$), but $G = \kbd{znstar}(N, 1)$ is
442
needed to initialize a group we can work with: most importantly we can now
443
solve discrete logarithm problems and decompose elements on the $g_i$.
444
445
A character on the abelian group $\oplus (\Z/d_j\Z) g_j$ is given by a row
446
vector $\chi = [a_1,\ldots,a_n]$ of integers $0\leq a_i < d_i$ such that
447
$\chi(g_j) = e(a_j / d_j)$ for all $j$, with the standard notation $e(x) :=
448
\exp(2i\pi x)$. In other words, $\chi(\prod g_j^{n_j}) = e(\sum a_j n_j /
449
d_j)$. In this encoding $[0,\dots,0]$ is the trivial character. Of course
450
a character $\chi$ must always be given as a \emph{pair} $[G,\chi]$,
451
since $\chi$ is meaningless without knowledge of the $(g_i)$ or the $(d_i)$.
452
\end{itemize}
453
454
The command \kbd{znchar}$(S)$ converts a datum describing a character to the
455
third form $[G,\chi]$. The command \kbd{znchartokronecker} converts a
456
character of order $\leq 2$ to the first form $(D/.)$, and functions such
457
as \kbd{zncharconductor}, \kbd{znchartoprimitive}, and \kbd{zncharinduce}
458
allow to restrict or extend characters between different $(\Z/M\Z)^*$.
459
460
Note the important fact that it is necessary to give the two arguments $G$ and
461
$\chi$ separately to these functions, for instance \kbd{zncharconductor(G,chi)}
462
(and not \kbd{zncharconductor([G,chi])}).
463
464
Functions such as \kbd{charmul}, \kbd{chardiv}, \kbd{charpow},
465
\kbd{charorder} or \kbd{chareval} apply to more general abelian characters
466
than characters on $(\Z/N\Z)^\times$, whence the prefix \kbd{char} instead of
467
\kbd{znchar}.
468
469
\section{A Third Session: Nontrivial Characters}
470
471
Recall that a nontrivial character can be represented either by a discriminant
472
$D$ (not necessarily fundamental), the character being the Legendre--Kronecker
473
symbol $(D/n)$, or by its \emph{Conrey label} in $(\Z/N\Z)^\times$, for
474
instance \kbd{Mod(161,633)} (which has order 42, as \kbd{znorder} tells us).
475
476
Defining modular form spaces with character is as simple as without:
477
we replace the parameters $[N,k]$ by $[N,k,\chi]$.
478
Instead of \kbd{mf=mfinit([35,2])}, one can write
479
\kbd{mf=mfinit([35,2,5], 0)}, where 5 is the quadratic character $(5/.)$. Thus:
480
481
\begin{verbatim}
482
? mf = mfinit([35,2,5],0); mffields(mf)
483
% = [y^2 + 1]
484
? F = mfeigenbasis(mf)[1]; lift(mfcoefs(F, 10))
485
% = [0, 1, 2*y, -y, -2, -y - 2, 2, -y, 0, 2, -4*y + 2]
486
\end{verbatim}
487
where in the last output $y$ is equal to one of the two roots of $y^2+1=0$,
488
i.e., $\pm i$.
489
490
Working with nontrivial characters allows us in particular to work with odd
491
weights, and in particular in weight $1$:
492
493
\begin{verbatim}
494
? mf = mfinit([23,1,-23], 0); mfdim(mf)
495
% = 1
496
? F = mfbasis(mf)[1]; mfcoefs(F, 16)
497
% = [0, 1, -1, -1, 0, 0, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, -1]
498
? mfgaloistype(mf,F)
499
% = 6
500
\end{verbatim}
501
502
The last output means that the image in $\PSL_2(\C)$ of the projective
503
representation associated to $F$ is of type $D_3$. Note that an ''exotic''
504
representation is given by a negative number, opposite of the cardinality
505
of the projective image.
506
507
Since this form is of dihedral type, it can be obtained via theta functions.
508
Indeed:
509
510
\begin{verbatim}
511
? F1 = mffromqf([2,1; 1,12])[2]; V1 = mfcoefs(F1, 16)
512
% = [1, 2, 0, 0, 2, 0, 4, 0, 4, 2, 0, 0, 4, 0, 0, 0, 2]
513
? F2 = mffromqf([4,1; 1,6])[2]; V2 = mfcoefs(F2, 16)
514
% = [1, 0, 2, 2, 2, 0, 2, 0, 2, 2, 0, 0, 4, 2, 0, 0, 4]
515
? (V1 - V2)/2
516
% = [0, 1, -1, -1, 0, 0, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, -1]
517
? mfisequal(F, mflinear([F1, F2], [1, -1]/2))
518
% = 1
519
\end{verbatim}
520
521
Here we were lucky in that we ``knew'' that the correct character was
522
$(-23/n)$. But what if we did not know this ? The first observation is
523
that modular form spaces corresponding to Galois conjugate characters
524
are isomorphic ($\chi$ is Galois conjugate to $\chi'$ if $\chi'=\chi^m$
525
for some $m$ coprime to the order of $\chi$). Thus, it is sufficient
526
to find a representative of each equivalence class, and this is given by
527
the \kbd{GP} commands \kbd{G=znstar(N,1); chargalois(G)}, where $N$ is the
528
level of the desired character (note that $N$ will not necessarily be
529
the conductor of the characters). This exactly outputs a list of representative
530
of each equivalence class (do not for now try to understand the details of
531
this command, nor the fact that \kbd{chargalois} and \kbd{znstar} have
532
optional parameters). However, this is not quite yet what we want.
533
Although only for efficiency, we want characters with the same parity
534
as the weight, otherwise the corresponding modular form spaces will be $0$.
535
This is achieved by the \kbd{GP} command \kbd{zncharisodd(G,chi)} which
536
does what you think it does. Let us first do this for $N=23$: we write
537
\begin{verbatim}
538
? G = znstar(23, 1);
539
? L = [chi | chi<-chargalois(G), zncharisodd(G,chi)]; #L
540
% = 2
541
? [mfdim([23,1,[G,chi]], 0) | chi <- L ]
542
% = [0, 1]
543
? [charorder(G,chi) | chi <- L]
544
% = [22, 2]
545
\end{verbatim}
546
547
This tells us that (up to Galois conjugation) there are two possible odd
548
characters, one, of order $22$, giving a $0$-dimensional space, the other
549
being the quadratic character given above. Note that \kbd{chargalois}
550
returns (orbits of) characters attached to an arbitrary abelian finite group
551
$G$ while \kbd{mfinit} expects a \emph{pair} \kbd{[G,chi]} for some
552
\kbd{znstar} $G$, as written above.
553
554
When doing long explorations with all characters of a certain level, it
555
is preferable to use \emph{wildcards}. For instance, instead of the above
556
one can write:
557
558
\begin{verbatim}
559
? mfall = mfinit([23,1,0], 0); #mfall
560
% = 1
561
? mf = mfall[1]; mfdim(mf)
562
% = 1
563
? mfparams(mf)
564
% = [23, 1, -23, 0]
565
\end{verbatim}
566
567
This does not exactly give us the same information: the third parameter $0$
568
in the first command asks for \emph{all} nonempty spaces of level $23$ and
569
weight $1$, and the program tells us that there is only one, of dimension $1$.
570
The last command \kbd{mfparams} outputs \kbd{[N,k,CHI,space]}, so here tells
571
us that the corresponding character is the Kronecker--Legendre symbol $(-23/n)$.
572
573
Using wildcards, let us explore levels in certain ranges: we write
574
\begin{verbatim}
575
wt1exp(lim1,lim2)=
576
{ my(mfall,mf,chi,v);
577
for (N = lim1, lim2,
578
mfall = mfinit([N,1,0], 0); /* use wildcard */
579
for (i=1, #mfall,
580
mf = mfall[i];
581
chi = mfparams(mf)[3]; /* nice format: D or Mod(a,N) */
582
[ print([N,chi,-t]) | t<-mfgaloistype(mf), t < 0 ]
583
)
584
);
585
}
586
\end{verbatim}
587
588
For instance, \kbd{wt1exp(1,230)} outputs in 4 seconds
589
590
\begin{verbatim}
591
[124, Mod(87, 124), 12]
592
[133, Mod(83, 133), 12]
593
[148, Mod(105, 148), 24]
594
[171, Mod(94, 171), 12]
595
[201, Mod(104, 201), 12]
596
[209, Mod(197, 209), 12]
597
[219, Mod(8, 219), 12]
598
[224, Mod(95, 224), 12]
599
[229, Mod(122, 229), 24]
600
[229, Mod(122, 229), 24]
601
\end{verbatim}
602
603
Thus, the smallest exotic $A_4$ form is in level $124$ and the smallest $S_4$
604
form is in level $148$. Note that in level $229$, we have two (non Galois
605
conjugate) eigenforms of type $S_4$.
606
607
If we type \kbd{wt1exp(633,633)}, in 6 seconds we obtain \kbd{[633, Mod(107,
608
633), 60]}, and this level is indeed the lowest level for which there exists
609
a type $A_5$ form. The character orders are obtained either as
610
\kbd{znorder(chi)} (since all the \kbd{chi} are \kbd{intmods}), or
611
using the general construction
612
\begin{verbatim}
613
[G,v] = znstar(chi);
614
ord = charorder(G,v)
615
\end{verbatim}
616
where we first convert \kbd{chi} to a general abelian character in
617
$[G,\chi]$ format.
618
619
\section{Leaf Functions}
620
621
Although we have already seen most of these functions in the first session,
622
we repeat some of examples here.
623
624
\subsection{Functions Created from Scratch}
625
626
We now start a slightly more systematic exploration of the available functions.
627
We begin by \emph{leaf functions}, i.e., functions created from scratch or
628
from a given mathematical object.
629
630
\begin{verbatim}
631
? D = mfDelta(); mfcoefs(D, 5)
632
% = [0, 1, -24, 252, -1472, 4830]
633
? E4 = mfEk(4); mfcoefs(E4, 5)
634
% = [1, 240, 2160, 6720, 17520, 30240]
635
? E6 = mfEk(6);
636
? D2 = mflinear([mfpow(E4, 3), mfpow(E6, 2)], [1, -1]/1728);
637
? mfisequal(D, D2)
638
% = 1
639
\end{verbatim}
640
641
Self-explanatory. More complicated Eisenstein series:
642
643
\begin{verbatim}
644
? E3 = mfeisenstein(1, 1, -3); mfcoefs(E3, 10)
645
% = [1/6, 1, 0, 1, 1, 0, 0, 2, 0, 1, 0]
646
? E4 = mfeisenstein(5, -4, 1); mfcoefs(E4, 10)
647
% = [5/4, 1, 1, -80, 1, 626, -80, -2400, 1, 6481, 626]
648
? H2 = mfEH(5/2); mfcoefs(H2,10)
649
% = [1/120, -1/12, 0, 0, -7/12, -2/5, 0, 0, -1, -25/12, 0]
650
\end{verbatim}
651
652
The \kbd{mfeisenstein(k,c1,c2)} command generates the Eisenstein series of weight
653
$k$ and characters \kbd{c1} and \kbd{c2}. The \kbd{mfEH(k)} command is specific
654
to half-integral weight $k$ and generates the Cohen--Eisenstein series of
655
weight $k$.
656
657
\begin{verbatim}
658
? T = mfTheta(); mfcoefs(T,16)
659
% = [1, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2]
660
? mf = mfinit([4, 5, -4]); mftobasis(mf, mfpow(T, 10))
661
% = [64/5, 4/5, 32/5]
662
? B = mfbasis(mf); apply(mfdescribe, B)
663
% = ["F_5(1, -4)", "F_5(-4, 1)", "TR^new([4, 5, -4, y])"]
664
? mfisCM(B[3])
665
% = -4
666
\end{verbatim}
667
668
Here, we compute the coefficients of $\th^{10}$ on the basis of \kbd{mf}
669
(we know of course the level, weight, and character). We then apply
670
the \kbd{mfdescribe} function, which tells us that the first two forms in
671
the basis are Eisenstein series, and the third one is some trace form
672
on the cuspidal new space. However, the last command says that this third
673
basis element is a \emph{CM form}, so that its coefficients can be computed
674
just as fast as those of Eisenstein series, so that there does exist
675
an explicit formula for the number of representations as a sum of ten
676
squares.
677
678
Keeping the above sessions, we can also write:
679
680
\begin{verbatim}
681
? mftobasis(mf, mfpow(H2, 2))
682
% = [1/18000, 1/18000, -3/2000]~
683
\end{verbatim}
684
685
\subsection{Functions Created from Mathematical Objects}
686
687
\begin{verbatim}
688
? [mf,F,co] = mffromell(ellinit("26b1")); co
689
% = [1/2, 1/2]~
690
? mfcoefs(F,10)
691
% = [0, 1, 1, -3, 1, -1, -3, 1, 1, 6, -1]
692
\end{verbatim}
693
694
This creates the modular form attached by modularity to the second isogeny
695
class of elliptic curves over $\Q$ for conductor $26$. The result is a
696
3-component vector: \kbd{mf} is the modular form space, $F$ the modular form,
697
and \kbd{co} are the coefficients of $F$ on the basis of \kbd{mf}.
698
699
Similarly, there are functions \kbd{mffromlfun} (from $L$-functions attached
700
to eigenforms), \kbd{mffromqf} (from quadratic forms) and \kbd{mffrometaquo}:
701
702
\begin{verbatim}
703
? F = mffrometaquo([1, 2; 11, 2]); mfcoefs(F, 10)
704
% = [0, 1, -2, -1, 2, 1, 2, -2, 0, -2, -2]
705
? F = mffrometaquo([1, 2; 2, -1]); mfparams(F)
706
% = [16, 1/2, 1, y]
707
? mfcoefs(F, 10)
708
% = [1, -2, 0, 0, 2, 0, 0, 0, 0, -2, 0]
709
\end{verbatim}
710
711
The \kbd{mfparams} command tells us that $F\in M_{1/2}(\G_0(16))$.
712
713
\section{Atkin, Hecke and Expanding Operators}
714
715
\begin{verbatim}
716
? mf = mfinit([96,4], 0); mfdim(mf)
717
% = 6
718
? M = mfheckemat(mf, 7)
719
% =
720
[0 0 0 372 696 0]
721
722
[0 0 36 0 0 -96]
723
724
[0 27/5 0 -276/5 -276/5 0]
725
726
[1 0 -12 0 0 62]
727
728
[0 0 1 0 0 -16]
729
730
[0 -3/5 0 14/5 -16/5 0]
731
? P = charpoly(M)
732
% = x^6 - 1456*x^4 + 209664*x^2 - 2985984
733
? factor(P)
734
% =
735
[x - 36 1]
736
737
[x - 12 1]
738
739
[ x - 4 1]
740
741
[ x + 4 1]
742
743
[x + 12 1]
744
745
[x + 36 1]
746
\end{verbatim}
747
748
Note a few things: first, the matrix of the Hecke operator $T(7)$ does not
749
have integral coefficients. Indeed, recall that the basis of modular forms
750
in \kbd{mf} is mostly random, so there is no reason for the matrix to be
751
integral. On the other hand, since the eigenvalues of Hecke operators are
752
algebraic integers, the characteristic polynomial of $T(7)$ must be monic
753
with integer coefficients. As it happens, it factors completely into
754
linear factors to the power $1$, so all the eigenvalues of $T(7)$ are in
755
fact in $\Z$: this immediately shows that the splitting will be entirely
756
rational and the eigenforms with integer coefficients. Let's check:
757
758
\begin{verbatim}
759
? mffields(mf)
760
% = [y, y, y, y, y, y]
761
? L = mfeigenbasis(mf); for(i=1,6,print(mfcoefs(L[i],16)))
762
[0, 1, 0, 3, 0, 10, 0, 4, 0, 9, 0, -20, 0, 70, 0, 30, 0]
763
[0, 1, 0, 3, 0, 2, 0, 12, 0, 9, 0, 60, 0, -42, 0, 6, 0]
764
[0, 1, 0, 3, 0, -14, 0, -36, 0, 9, 0, -36, 0, 54, 0, -42, 0]
765
[0, 1, 0, -3, 0, 10, 0, -4, 0, 9, 0, 20, 0, 70, 0, -30, 0]
766
[0, 1, 0, -3, 0, 2, 0, -12, 0, 9, 0, -60, 0, -42, 0, -6, 0]
767
[0, 1, 0, -3, 0, -14, 0, 36, 0, 9, 0, 36, 0, 54, 0, 42, 0]
768
\end{verbatim}
769
770
We see that of the six eigenforms, the last three are twists of the first
771
three.
772
773
There also exists the command \kbd{G=mfhecke(mf,F,n)}, which given a modular
774
form $F$ in \kbd{mf}, outputs the modular form $T(n)F$.
775
776
\begin{verbatim}
777
? mf=mfinit([96,6],0); mffields(mf)
778
% = [y, y, y, y, y, y, y^2 - 31, y^2 - 31]
779
? mfatk = mfatkininit(mf,3);
780
% factor(charpoly(mfatk[2]/mfatk[3]))
781
% =
782
[x - 1 5]
783
784
[x + 1 5]
785
\end{verbatim}
786
787
This requires a little explanation: the command \kbd{mfatkininit(mf,3)}
788
computes a number of quantities necessary to work with the Atkin--Lehner
789
operator $W_3$ in the space \kbd{mf}. The main part of the result is
790
the second component, which is essentially the matrix of $W_3$ on the
791
basis of \kbd{mf}, and which is guaranteed to have exact coefficients
792
(here rational). However in the general case, the matrix of $W_3$
793
is equal to \kbd{mfatk[2]/mfatk[3]}, where \kbd{mfatk[3]} may be an
794
inexact complex number. For now you need not worry about the first component.
795
796
Thus, the eigenvalues (or possibly the pseudo-eigenvalues) must be of modulus
797
$1$, and in the case of a quadratic character defined modulo $N/Q$, they
798
are equal to $\pm1$ in even weight, to $\pm i$ in odd weight. Here,
799
$1$ and $-1$ both occur $5$ times. However, this does not tell us which
800
eigenvalues correspond to each eigenspace. For this, we do the following:
801
802
\begin{verbatim}
803
? mfatkineigenvalues(mf,3)
804
% = [[-1], [-1], [-1], [1], [1], [1], [-1, -1], [1, 1]]
805
? mf=minit([96,3,-3],0); mffields(mf)
806
% = [y^4 + 8*y^2 + 9, y^4 + 4*y^2 + 1]
807
? mfatkineigenvalues(mf,32)
808
% = [[I, -I, -I, I], [-I, I, I, -I]]
809
? mfatkineigenvalues(mf,3)
810
% = [[a, -conj(a), -a, conj(a)], [b, -conj(b), conj(b), -b]]
811
\end{verbatim}
812
813
The first command tells us that in the six rational eigenspaces, the first
814
three have eigenvalue $-1$, the other three $+1$, and in the eigenspaces
815
of dimension $2$, the first eigenspace has both eigenvalues $-1$, the
816
second both $+1$. As is seen from the next lines, it is of course not
817
necessary for the eigenvalues of $W_Q$ in the same eigenspace to be equal.
818
819
In the next two commands, we are now in a case where the character is
820
non trivial and the weight odd. The eigenvalues are now $\pm i$, and not
821
equal in the same eigenspace.
822
823
Finally, the last command is a case where the character is not defined modulo
824
$N/Q=96/3=32$, so we only have pseudoeigenvalues, which are simply of
825
absolute value $1$ by Atkin--Lehner theory. Here, $a$ and $b$ are
826
complicated complex numbers and \kbd{conj} denotes the complex conjugate
827
(using the \kbd{algdep} command, one can check that $a$ is a root of
828
$9x^4+10x^2+9=0$ and $b$ is a root of $3x^4-2x^2+3=0$.
829
830
Note that when the character is (trivial or) quadratic and defined modulo
831
$N/Q$ the output is always rounded, but otherwise, the eigenvalues are given
832
as approximate complex numbers.
833
834
As for the Hecke operators, there exists an \kbd{mfatkin} command, whose
835
syntax is \kbd{mfatkin(mfatk, F)}, where \kbd{mfatk} is the output of
836
an \kbd{mfatkininit} command and $F$ is in the space \kbd{mfatk}, and which
837
outputs the modular form $F|_kW_Q$, where $Q$ is implicit in \kbd{mfatk}.
838
839
Finally note the \kbd{mfbd} expanding command which computes $B(d)F$:
840
841
\begin{verbatim}
842
? E4 = mfEk(4); mfcoefs(E4,6)
843
% = [1, 240, 2160, 6720, 17520, 30240, 60480]
844
? F = mfbd(E4,2); mfcoefs(F,6)
845
% = [1, 0, 240, 0, 2160, 0, 6720]
846
\end{verbatim}
847
848
\section{Algebraic Functions on Modular Forms}
849
850
Here we give examples of functions on modular forms which do not involve
851
any approximate numerical computation. We have already mentioned the most
852
important ones: \kbd{mfhecke}, \kbd{mfatkin}, and \kbd{mfbd}.
853
854
\begin{verbatim}
855
? E4 = mfEk(4); F = mfderivE2(E4); mfcoefs(F,5)
856
% = [-1/3, 168, 5544, 40992, 177576, 525168]
857
? E6 = mfEk(6); mfisequal(F, mflinear([E6], [-1/3]))
858
% = 1
859
? G = mfbracket(E4, E6, 1); mfcoefs(G,5)
860
% = [0, -3456, 82944, -870912, 5087232, -16692480]
861
? mfisequal(G, mflinear([mfDelta()], [-3456]))
862
% = 1
863
\end{verbatim}
864
865
\medskip
866
867
In the first commands, we compute the Serre derivative of $E_4$, and
868
check that it is equal to $-E_6/3$. The name \kbd{mfderivE2} of course
869
comes from the fact that the Serre derivative involves the quasi-modular
870
Eisenstein series $E_2$. Note that there exists the function \kbd{mfderiv}
871
(including to negative order, corresponding to integration), which is
872
provided for the user's convenience for certain computations, but whose
873
output is outside the range of modular forms.
874
875
The second computation checks that the first Rankin--Cohen bracket of
876
$E_4$ and $E_6$ is a multiple of $\Delta$.
877
878
You may complain that it is heavy to write an \kbd{mflinear} command as above
879
simply to compute a scalar multiple of a form. But nothing prevents you from
880
defining in a script that you read at the beginning of your session:
881
882
\begin{verbatim}
883
mfscalmul(F,s)=mflinear([F],[s]);
884
mfadd(F,G)=mflinear([F,G],[1,1]);
885
mfsub(F,G)=mflinear([F,G],[1,-1]);
886
\end{verbatim}
887
888
There also exist the natural operations on modular forms \kbd{mfmul},
889
\kbd{mfdiv} (which may result in modular functions, i.e., with poles),
890
and \kbd{mfpow}. There is also a function \kbd{mfshift} (multiply or divide
891
by a power of $q$), but which again takes us outside the range of modular
892
forms.
893
894
\begin{verbatim}
895
? E4 = mfEk(4); F = mftwist(E4, -3); mfcoefs(F, 7)
896
% = [0, 240, -2160, 0, 17520, -30240, 0, 82560]
897
? mfparams(F)
898
% = [9, 4, 1, y]
899
? mf = mfinit([4,5,-4], 1); F = mfbasis(mf)[1]; mfcoefs(F, 10)
900
% = [0, 1, -4, 0, 16, -14, 0, 0, -64, 81, 56]
901
? mfisCM(F)
902
% = -4
903
? G = mftwist(F, -4); mfcoefs(G, 10)
904
% = [0, 1, 0, 0, 0, -14, 0, 0, 0, 81, 0]
905
? mfparams(G)
906
% = [16, 5, -4, y]
907
? mfconductor(mfinit(G, 1), G)
908
% = 8
909
\end{verbatim}
910
911
This session illustrates a number of important issues concerning
912
\emph{twisting}. In the first commands, we twist $E_4$ by the quadratic
913
character $-3$ (in the present implementation, only twisting by quadratic
914
characters is allowed), and we see that the resulting form has level
915
$9=(-3)^2$. Fine. In the next command, we compute the unique form
916
in $S_4(\G_0(5),\chi_{-4})$, and see that it has CM by $\Q(\sqrt{-4})$.
917
918
However, note that the form is not equal to the form twisted by the
919
character $\chi_{-4}$ (only the coefficients of $q^n$ with $n$ prime to $4$
920
are equal, the others vanish). The \kbd{mfparams} command tells us that
921
the twisted form has level $16=(-4)^2$. However, the final command tells
922
us that in fact it has level $8$: \kbd{mfconductor} gives the smallest
923
level on which the form is defined.
924
925
\begin{verbatim}
926
? mf = mfinit([96,2], 1); L = mfbasis(mf);
927
? apply(x->mfconductor(mf,x), L)
928
% = [24, 48, 96, 32, 96, 48, 96, 96, 96]
929
? apply(x->mftonew(mf,x)[1][1..2], L)
930
% = [[24, 1], [24, 2], [24, 4], [32, 1], [32, 3],\
931
[48, 1], [48, 2], [96, 1], [96, 1]]
932
\end{verbatim}
933
934
Here we compute the full cuspidal space $S_2(\G_0(96))$, of dimension $9$,
935
and we ask which is the lowest level on which each form in the basis
936
is defined. This list shows that there is one form $F_1$ in level $24$
937
which, by applying $B(d)$ with $d=2$ and $d=4$ gives a form of level $48$
938
and one of level $96$. Then a form $F_2$ in level $32$, by applying $B(3)$
939
gives a form of level $96$, a form $F_3$ in level $48$, by applying $B(2)$
940
gives a form of level $96$, and finally two genuine forms of level $96$
941
(so that the dimension of the newspace is equal to $2$, which we can check
942
by typing \kbd{mfdim([96,2],0)}).
943
944
The last command \kbd{mftonew} checks all this; look at the precise description
945
of the command.
946
947
\section{Cusps and Cosets}
948
949
Recall that in the present version of the package, the only congruence
950
subgroup that is considered is $\G_0(N)$, so when we consider cusps in
951
the geometrical sense, they are cusps of $\G_0(N)$, and cosets are
952
right cosets of $\G_0(N)$ in $\G$, so that $\G=\bigsqcup_j\G_0(N)\ga_j$.
953
954
The function \kbd{mfcusps(N)} gives the list of all (equivalence classes of)
955
cusps of $\G_0(N)$, \kbd{mfcuspwidth(N,cusp)} gives the width of the cusp;
956
these are linked to the \emph{geometry}. On the other hand, the notion
957
of \emph{regularity} of a cusp is linked to the specific modular form space,
958
and the function \kbd{mfcuspisregular([N,k,CHI],cusp)} determines if the cusp
959
is regular or not:
960
961
\begin{verbatim}
962
? C = mfcusps(108)
963
% = [0, 1/2, 1/3, 2/3, 1/4, 1/6, 5/6, 1/9, 2/9, 1/12,\
964
5/12, 1/18, 5/18, 1/27, 1/36, 5/36, 1/54, 1/108]
965
? [mfcuspwidth(108,c) | c<-C]
966
% = [108, 27, 12, 12, 27, 3, 3, 4, 4, 3, 3, 1, 1, 4,\
967
1, 1, 1, 1]
968
? NK = [108,3,-4];
969
? [mfcuspisregular(NK,c) | c<-C]
970
% = [1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1]
971
? [c | c<-C, !mfcuspisregular(NK,c)]
972
% = [1/2, 1/6, 5/6, 1/18, 5/18, 1/54]
973
\end{verbatim}
974
975
The first command list the $18$ cusps of $\G_0(108)$ (\kbd{mfnumcusps(108)}
976
gives this directly, useful if there are thousands of cusps and you do not
977
want them explicitly), the second command prints their widths, and the last
978
commands show that the cusps $1/2$, $1/6$, $5/6$, $1/18$, $5/18$, and $1/54$
979
are irregular in the space $M_3(\G_0(108),\chi_{-4})$, and the others are
980
regular.
981
982
There is another command \kbd{mfcuspval} having to do with cusps, but this
983
will be mentioned later.
984
985
\medskip
986
987
\begin{verbatim}
988
? C = mfcosets(4)
989
% = [[0, -1; 1, 0], [1, 0; 1, 1], [0, -1; 1, 2],\
990
[0, -1; 1, 3], [1, 0; 2, 1], [1, 0; 4, 1]]
991
? mftocoset(4, [1, 1; 2, 3], C)
992
% = [[-1, 1; -4, 3], 5]
993
\end{verbatim}
994
995
The \kbd{mfcosets(N)} command lists all right cosets of $\G_0(N)$ in $\G$.
996
Note that in the present implementation the trivial coset is always the
997
last one, and is represented by the matrix $[1,0;N,1]$, but since this
998
may change one must be careful.
999
1000
The \kbd{mftocoset(N,M,C)} command gives a two-component
1001
vector $[\ga,i]$, where $\ga\in\G_0(N)$ is such that $M=\ga\cdot C[i]$.
1002
1003
\section{The mfslashexpansion command}
1004
1005
We now give examples of the use of advanced features of the package, which
1006
use inexact complex arithmetic. However in many cases the results are known
1007
algebraic numbers and, if asked to do so, the function gives them exactly.
1008
1009
This command returns the Fourier expansion at infinity of $f |_k \gamma$,
1010
for $\gamma\in \GL_2(\Q)^+$. It returns a vector $v$ of coefficients, which
1011
can only be interpreted together with three extra parameters
1012
$\al\in \Q_{\geq 0}$, $w \in \Z_{\geq 1}$ and a
1013
$2\times 2$ upper triangular matrix $A=[a,b;0,d]$
1014
(equal to the identity if $\gamma\in\PSL_2(\Z)$). We have
1015
$f |_k \gamma = F |_k A $, with
1016
$$F(\tau) = q^\al \sum_{n\geq 0} v[n] q^{n/w}$$
1017
and $q = e(\tau)$. Of course, $F |_k A = (a/d)^{k/2} F(\tau + b/d)$ so the
1018
exact expansion is easily inferred from the returned one, whereas the chosen
1019
encoding allows to compute the coefficients $v[n]$ in a smaller number field
1020
than if we had included all the constants into $v$. It is important to note
1021
that the three parameters $\al, w, A$ only depend on the modular form
1022
space and $\gamma$, but not on the form $f$.
1023
1024
\begin{verbatim}
1025
? mf = mfinit([4,6]); B = mfbasis(mf);
1026
? for (i=1, #B, \
1027
print( mfslashexpansion(mf,B[i],[1,0;2,1],5,1,&P) ))
1028
\\ we don't print P which is [0, 1, [1,0;0,1]] in all cases
1029
[-1/504, 1, 33, 244, 1057, 3126]
1030
[-1/504, 0, 1, 0, 33, 0]
1031
[-1/32256, -1/64, 33/64, -61/16, 1057/64, -1563/32]
1032
[0, -1, 0, 12, 0, -54]
1033
? R = mfslashexpansion(mf,B[1],[0,-1;4,0],5,1,&P); [P,R]
1034
% = [[0, 1, [1,0;0,1]], [-8/63, 0, 0, 0, 64, 0]]
1035
? R = mfslashexpansion(mf,B[1],[0,-1;1,0],5,1,&P); [P,R]
1036
% = [[0, 4, [1,0;0,1]], [-1/504, 0, 0, 0, 1, 0]]
1037
1038
? mf=mfinit([4,7,-4]); B=mfbasis(mf);
1039
? for (i=1, #B, \
1040
print( mfslashexpansion(mf,B[i],[1,0;2,1],5,1,&P) ))
1041
\\ we don't print P which is [1/2, 1, [1,0;0,1]] in all cases
1042
[1/64, 91/8, 7813/32, 7353/4, 530713/64, 221445/8]
1043
[1, -728, 15626, -117648, 530713, -1771560]
1044
[1/16, -15/2, 5/8, 75, -231/16, -465/2]
1045
[2, 0, 20, 0, -462, 0]
1046
? mfslashexpansion(mf,B[1],[0,-1;4,0],5,1,&P)
1047
% = [Mod(61/256*t, t^2 + 1), Mod(-1/64*t, t^2 + 1),
1048
Mod(-1/64*t, t^2 + 1), Mod(91/8*t, t^2 + 1),
1049
Mod(-1/64*t, t^2 + 1), Mod(-7813/32*t, t^2 + 1)]
1050
? P
1051
% = [0, 1, [1, 0; 0, 1]]
1052
? R=mfslashexpansion(mf,B[1],[0,-1;4,0],5,0)
1053
% = [0.23828125000000000000000000000000000000*I,\
1054
-0.015625000000000000000000000000000000000*I,\
1055
-0.015625000000000000000000000000000000000*I,\
1056
11.375000000000000000000000000000000000*I,\
1057
-0.015625000000000000000000000000000000000*I,\
1058
-244.15625000000000000000000000000000000*I]
1059
? bestappr(R)
1060
% = [61/256*I, -1/64*I, -1/64*I, 91/8*I, -1/64*I, -7813/32*I]
1061
\end{verbatim}
1062
1063
Here are some detailed explanations. The first space is $M_6(\G_0(4))$,
1064
of dimension $4$. We ask for $1+5$ terms of the Fourier expansion of
1065
$F|_6\ga$ for all $F$ in the given basis, and $\ga=[1,0;2,1]$, which is one
1066
of the possible Fourier expansions at the cusp $1/2$. The last parameter
1067
$P$ contains $[\al,w,A]$ after the call and the $1$ means we want an exact
1068
algebraic expression (a $0$ as used in the last example means we expect
1069
floating point complex numbers).
1070
1071
We obtain the $4$ desired expansions. In the next commands, we do the same
1072
for the first basis element and $\ga=[0,-1;4,0]$, which is the
1073
\emph{Fricke involution}, and corresponds to the cusp $0$. The next
1074
command, which does essentially the same computation, uses $\ga=[0,-1;1,0]$,
1075
and now $P=[0,4, [1,0;0,1]]$ which tells us that the expansion is in powers of
1076
$q^{1/4}$.
1077
1078
The next example is the space $M_7(\G_0(4),\chi_{-4})$, also of
1079
dimension $4$, and we ask the same thing. Now $P$ tells us that $\al = 1/2$
1080
and $w = 1$ so we now have for instance
1081
$$B[1]|_7\ga = (1/64)q^{1/2} + (91/8)q^{3/2}+\cdots$$
1082
1083
In the next command, we expand $B[1]|_7\ga$ with $\ga$ equal to the Fricke
1084
involution; and finally we check numerically by setting the one-to-last
1085
parameter to $0$ and obtain the expansion as raw complex numbers. We
1086
recognize them immediately using the \kbd{bestappr} command.
1087
1088
Note that in the special case (like here) where $\ga$ is a Fricke (or more
1089
generally an Atkin--Lehner) involution, we can proceed otherwise to obtain
1090
the expansion:
1091
1092
\begin{verbatim}
1093
? mfatk = mfatkininit(mf,4); C = mfatk[3]
1094
% = -1.000000000000000000000000000*I
1095
? F = mfatkin(mfatk, B[1]); mfcoefs(F, 6)
1096
% = [61/256, -1/64, -1/64, 91/8, -1/64, -7813/32, 91/8]
1097
\end{verbatim}
1098
1099
This tells us that the true expansion of $F|_7W_4$ is the expansion that
1100
is output divided by the constant $C$, so we recover the previous
1101
expansion.
1102
1103
\smallskip
1104
1105
It is important to see what affects the timing and correctness of the
1106
\kbd{mfslashexpansion} command. The following session gives typical examples:
1107
1108
\begin{verbatim}
1109
? mf = mfinit([496,4],0); F = mfbasis(mf)[1]; mfdim(mf)
1110
time = 329 ms.
1111
% = 45
1112
? mfslashexpansion(mf,F,[1,0;3,1],5,0,&P);
1113
time = 1,316 ms.
1114
? mfslashexpansion(mf,F,[1,0;3,1],5,1,&P);
1115
time = 51,136 ms.
1116
1117
? mf = mfinit([503,4],0); F = mfbasis(mf)[1]; mfdim(mf)
1118
time = 1,505 ms.
1119
% = 125
1120
? sizebyte(mf)
1121
% = 5123352
1122
? mfslashexpansion(mf,F,[1,0;3,1],5,0,&P);
1123
time = 32,640 ms.
1124
? sizebyte(mf)
1125
% = 18216400
1126
? mfslashexpansion(mf,F,[1,0;3,1],5,0,&P);
1127
time = 6,504 ms.
1128
\end{verbatim}
1129
1130
We omit the numerical outputs since they have no significance for the present
1131
discussion. We notice several things:
1132
\begin{itemize}
1133
\item First, the time for rationalization (flag $1$) in the first example
1134
is extremely large: $51$ seconds instead of $1.3$. The reason for this is
1135
that the width of the corresponding cusp (here $1/3$) is equal to $P[2]=496$,
1136
and the program must recognize algebraic numbers in the large cyclotomic
1137
field $\Q(\zeta_{496})$ which takes a huge amount of time. In fact, at the
1138
default accuracy of $38D$, the result is certainly wrong.
1139
\item Second, the time depends enormously on the dimension: the expansion
1140
for dimension $125$ is $25$ times slower than for dimension $45$, of course
1141
not surprising, but it must be taken into account.
1142
\item Third, and most importantly, the last command shows the cache effect:
1143
exactly the same instruction now requires only $6.5$ seconds instead of
1144
$32.6$. This is because, behind the scenes, the first \kbd{mfslashexpansion}
1145
precomputed a number of quantities which it stored in your variable \kbd{mf}:
1146
in fact, the \kbd{sizebyte} commands show that, after the first expansion,
1147
the size of \kbd{mf} has more than tripled.
1148
\end{itemize}
1149
1150
\section{Analytic Commands}
1151
1152
The existence of the \kbd{mfslashexpansion} command allows us to do many
1153
useful things. In fact, already the \kbd{mfatkininit} and \kbd{mfatkin}
1154
commands would not be possible without it. Immediate applications are the
1155
\kbd{mfcuspval} command which computes the valuation at cusps, and the
1156
\kbd{mfeval} command, which in addition to computing values in the upper-half
1157
plane (see below), also computes values at the cusps:
1158
1159
\begin{verbatim}
1160
? T = mfTheta(); mf=mfinit(T);C=mfcusps(mf)
1161
% = [0, 1/2, 1/4]
1162
? [ mfcuspval(mf,T,c) | c<-C ]
1163
% = [0, 1/4, 0]
1164
? mfeval(mf, T, C) \\ or [mfeval(mf,T,c) | c<-C]
1165
% = [1/2 - 1/2*I, 0, 1]
1166
\end{verbatim}
1167
1168
More sophisticated is the computation of numerical periods, and more
1169
generally of \emph{symbols}
1170
$$\int_{s_1}^{s_2}(X-\tau)^{k-2}F|_k\ga(\tau)\,d\tau\;,$$
1171
where $s_1$ and $s_2$ are two cusps (e.g., $s_1=0$, $s_2=\infty$):
1172
1173
\begin{verbatim}
1174
? mf = mfinit([96,4],0); [F1] = mfbasis(mf);
1175
? FS1 = mfsymbol(mf,F1);
1176
time = 2,272 ms
1177
? mfsymboleval(FS1,[0,oo])
1178
% = 2.0968669678226579060336519703627002478*I*x^2\
1179
+ 0.36368580656317635568444277442842940073*x\
1180
- 0.049315736834713109138297211986510643780*I
1181
? mfsymboleval(FS1,[1,5/2])
1182
% = 4.1937339356453158120673039407254004956*I*x^2\
1183
+ (0.72737161312635271136888554885685880147\
1184
- 14.678068774758605342235563792538901735*I)*x\
1185
+ (-1.2729003229711172448955497104995029026\
1186
+ 15.103654043044843600467382361156555509*I)
1187
? mfsymboleval(FS1,[1,2],[0,-1;1,0])
1188
% = (0.54552870984476453352666416164264410111\
1189
+ 2.5224522361088961642654705389803540222*I)*x^2\
1190
+ (-0.72737161312635271136888554885685880148\
1191
- 6.2906009034679737181009559110881007434*I)*x\
1192
+ 4.1937339356453158120673039407254004956*I
1193
\end{verbatim}
1194
1195
The general strategy for computing these quantities is first to do a
1196
precomputation which only involves \kbd{mf} and the form $F$ using
1197
\kbd{mfsymbol}, which can take a few seconds, but afterwards all the
1198
computations are instantaneous.
1199
1200
Note that if you only want the period polynomial from $0$ to $\infty$ use
1201
\kbd{mfperiodpol(mf,F1)} which gives the same answer as before but in only
1202
$20$ ms.
1203
1204
You may also use \kbd{mfsymboleval} in two other ways, but note that in
1205
this case the precomputation is not used so the computation may be slow:
1206
1207
\begin{verbatim}
1208
? mf=mfinit([96,6],0);F=mfbasis(mf)[1];
1209
? FS=mfsymbol(mf,F);
1210
time = 9,761 ms.
1211
? mfsymboleval(FS,[I,oo])
1212
% = 0.0029721...*I*x^4 + 0.0137806...*x^3 + ... + 0.0061009...
1213
? mfsymboleval(FS,[I,2*I])
1214
% = 0.0029665...*I*x^4 + 0.0137326...*x^3 + ... + 0.0059760...
1215
? mfsymboleval(FS,[I/10000,I])
1216
% = 46.363730...*I*x^4 + 3.8815894...*x^3 + ... + 0.0183869...
1217
? -x^4*subst(mfsymboleval(FS,[I,10000*I],[0,-1;1,0]),x,-1/x)
1218
% = 46.363730...*I*x^4 + 3.8815894...*x^3 + ... + 0.0183869...
1219
? mfsymboleval([mf,F],[I,oo])
1220
% = 0.0029721...*I*x^4 + 0.0137806...*x^3 + ... + 0.0061009...
1221
? mfsymboleval([mf,F],[I,2*I])
1222
% = 0.0029665...*I*x^4 + 0.0137326...*x^3 + ... + 0.0059760...
1223
\end{verbatim}
1224
1225
These examples illustrate four points:
1226
\begin{enumerate}\item Computing an \kbd{mfsymbol}
1227
may be rather long ($9.8$ seconds in this example), although as already
1228
mentioned, subsequent computations of symbols \emph{between cusps} will then
1229
be instantaneous.
1230
\item As the next three commands show, \kbd{mfsymboleval}
1231
also accepts paths with endpoints in the upper half-plane. Although we
1232
have tried to optimize the computation, in certain cases (but not in
1233
the above example) when one of the endpoints is close to the real line
1234
the computation may be slow.
1235
\item The next command shows the use of the extra parameter $\ga$ which
1236
asks to integrate $F|_k\ga$ instead of $F$, here with \kbd{ga=[0,-1;1,0]}.
1237
This allows to perform the same computation with endpoints which are away
1238
from the real line. This is essentially what is done \emph{automatically} by
1239
\kbd{mfsymboleval}.
1240
\item The last two commands show a special format which avoids doing the
1241
longish \kbd{mfsymbol} computation: the results are obtained almost
1242
instantaneously \emph{without} using symbols. The price to pay in using this
1243
``cheaper'' format is that the endpoints of the path cannot be cusps other
1244
than \kbd{oo}.
1245
\end{enumerate}
1246
1247
\begin{verbatim}
1248
? mf = mfinit([96,4],0); [F1,F2] = mfbasis(mf);
1249
? FS1 = mfsymbol(mf,F1); FS2 = mfsymbol(mf,F2);
1250
? mfpetersson(FS1)
1251
% = 0.00061471684149817788924091516302517391826
1252
? mfpetersson(FS2)
1253
% = 0.0055324515734836010031682364672265652647
1254
? mfpetersson(FS1, FS2)
1255
% = 1.5879887877319313665 E-40 + 7.652958013165934297 E-42*I
1256
\end{verbatim}
1257
1258
Same remark: once the \kbd{mfsymbols} \kbd{FS1} and \kbd{FS2} initialized,
1259
all the Petersson product computations (as well as others) are essentially
1260
immediate. Note that since neither \kbd{F1} nor \kbd{F2} are eigenforms,
1261
there is no reason for their Petersson product to vanish. To prove it does
1262
we do as follows:
1263
1264
\begin{verbatim}
1265
? BE = mfeigenbasis(mf);
1266
? M = Mat([mftobasis(mf,f) | f<-BE]); M^(-1)
1267
% =
1268
[1 3 10 4 -20 70]
1269
1270
[1 3 2 12 60 -42]
1271
1272
[1 3 -14 -36 -36 54]
1273
1274
[1 -3 10 -4 20 70]
1275
1276
[1 -3 2 -12 -60 -42]
1277
1278
[1 -3 -14 36 36 54]
1279
\end{verbatim}
1280
1281
On the other hand, it is immediate to see that \kbd{BE[i+3]} is a twist of
1282
\kbd{BE[i]} and that as a consequence their Petersson square are equal. It
1283
follows from the shape of the above matrix that the Petersson scalar product
1284
of $B[i]$ with $B[j]$ will vanish when the corresponding scalar product of
1285
the corresponding columns vanish, hence for $(i,j)=(1,2)$, $(1,4)$, $(1,5)$,
1286
$(2,3)$, $(2,6)$, $(3,4)$, $(3,5)$, $(4,6)$, and $(5,6)$.
1287
1288
\smallskip
1289
1290
Note that \kbd{mfpetersson} can also be used for two noncuspidal forms, as
1291
long as the Petersson product converges. Consider the following example:
1292
1293
\begin{verbatim}
1294
? mf = mfinit([12,5,-3]); cusps = mfcusps(mf);
1295
? E1 = mfeisenstein(5,1,-3); [mfcuspval(mf,E1,c) | c<-cusps]
1296
% = [0, 0, 1, 0, 1, 1]
1297
? E2 = mfeisenstein(5,-3,1); [mfcuspval(mf,E2,c) | c<-cusps]
1298
% = [1/3, 1/3, 0, 1/3, 0, 0]
1299
? P(mf) =
1300
{ my(E1S = mfsymbol(mf,E1));
1301
my(E2S = mfsymbol(mf,E2));
1302
mfpetersson(E1S,E2S); }
1303
? P(mf)
1304
% = -1.8848216716468969562647734582232071466 E-5\
1305
- 1.9057659114817512165 E-43*I
1306
? mf3 = mfinit([3,5,-3]); P(mf3)
1307
time = 16 ms.
1308
? mf96 = mfinit([96,5,-3]); P(mf96)
1309
time = 3,521 ms.
1310
\end{verbatim}
1311
1312
The first commands create two Eisenstein series of weight $5$,
1313
$E_5(1,\chi_{-3})$ and $E_5(\chi_{-3},1)$, which belong to
1314
$M_5(\G_0(3),\chi_{-3})$. In the next commands, we look at the larger space of
1315
level $12$ and compute the valuations of $E_1$ and $E_2$ at the six cusps of
1316
$\G_0(12)$. We see that at these six cusps one of the two Eisenstein series
1317
vanishes, so the Petersson product will converge, and is computed in the
1318
next command. In the last commands we compute the same product but in level
1319
$3$ and level $96$; because of the normalization, we obtain essentially the
1320
same result (not given), but of course the times are very different: $0.016$
1321
seconds in level $3$ and $3.5$ seconds in level $96$.
1322
1323
\medskip
1324
1325
There are two more important numerical functions: evaluating a modular form
1326
at a point in the upper half plane, and evaluating the corresponding
1327
$L$-function. We begin by a trivial example:
1328
1329
\begin{verbatim}
1330
? E4 = mfEk(4); mf = mfinit(E4); mfeval(mf,E4,I)
1331
% = 1.4557628922687093224624220035988692874
1332
? 3*gamma(1/4)^8/(2*Pi)^6
1333
% = 1.4557628922687093224624220035988692874
1334
\end{verbatim}
1335
1336
This is of course a trivial computation, simply sum the $q$-expansion. The
1337
fact that the value of a modular form with rational coefficients such as
1338
$E_4$ at a \emph{CM point} such as $i$ has an explicit expression is a
1339
consequence of complex multiplication.
1340
1341
\begin{verbatim}
1342
? mf = mfinit([12,4],1); F = mfbasis(mf)[1];
1343
? mfeval(mf, F, 1/Pi + 10^(-6)*I)
1344
% = -89811.049350396250531782882568405506024\
1345
- 58409.940965200894541585402642924371696*I
1346
? mfeval(mf, F, 1/Pi + 10^(-7)*I)
1347
% = 4.8212468504661113183253396691813292261 E-52\
1348
+ 6.7885262281520647908871247541561415340 E-52*I
1349
\end{verbatim}
1350
1351
Several remarks are in order.
1352
1353
\begin{enumerate}
1354
\item We are evaluating a modular form very near the
1355
real axis. If the form was in level $1$ such as $E_4$ above, we could use a
1356
modular transformation to reduce to the evaluation in the fundamental domain
1357
of $\G$, which would be very fast. Here we do something similar but
1358
more sophisticated.
1359
\item Contrary to most examples, the result at height $10^{-7}$ is not a
1360
numerical approximation of $0$, the exact value is indeed as printed to
1361
the given accuracy.
1362
\item It is amusing to see the large oscillations of the value: at height
1363
$10^{-6}$ the value is still in the $10^5$ range, and at $10^{-7}$ it is
1364
in the $10^{-52}$ range. Of course it must eventually tend to $0$ since
1365
$F$ is a cusp form (for $E_4$ it would tend to infinity).
1366
\item When applying \kbd{mfeval} at a \emph{cusp} (as above for
1367
\kbd{mfTheta()}), the result is
1368
the value at the cusp, but is in general \emph{not} equal
1369
to the limit of the value of the modular form when the argument tends to
1370
the cusp, since this limit is often infinite for a noncuspidal form.
1371
\end{enumerate}
1372
1373
Note that when dealing with \emph{eigenforms}, which may have several
1374
embeddings into $\C$, the result will have several components, one for each
1375
embedding:
1376
1377
\begin{verbatim}
1378
? mf = mfinit([23,2],0); F=mfeigenbasis(mf)[1];
1379
? mfeval(mf,F,I)
1380
% = [0.0018695834459685012330841605500720163964,\
1381
0.0018618146628840767703527958851699552194]
1382
\end{verbatim}
1383
1384
More generally, this embedding problem affects all numerical functions.
1385
Continuing the above example:
1386
1387
\begin{verbatim}
1388
? mfparams(F)
1389
% = [23, 2, 1, y^2 - y - 1]
1390
? mfslashexpansion(mf,F,[0,-1;1,0],5,1)
1391
% = [0, -1/23, 1/23*y, -2/23*y + 1/23, -1/23*y + 1/23, 2/23*y]
1392
? FS = mfsymbol(mf,F); mfpetersson(FS,FS)
1393
% =
1394
[0.00394889657400250316885... -1.0827196147167250830 E-40]
1395
1396
[-1.2120247024777595243 E-40 0.00564425429876478351015...]
1397
\end{verbatim}
1398
1399
The $y$ in the second result is thus understood to be \emph{one} of
1400
the roots of the polynomial $y^2-y-1$, and the result of \kbd{mfpetersson}
1401
is a $2\times 2$ \emph{diagonal} matrix because of the two embeddings of $F$.
1402
1403
\smallskip
1404
1405
The other important evaluation function is that of the $L$-function
1406
attached to a modular form. In fact, the modular form package only
1407
creates (in a clever way) the $L$-function, all the rest of the work
1408
is done by the $L$-function package. Note the important fact that
1409
the modular form need not be an eigenform or even stable under the
1410
Fricke involution.
1411
1412
\begin{verbatim}
1413
? E4 = mfEk(4); mf=mfinit(E4); LE = lfunmf(mf,E4);
1414
? lfun(LE, 2) / Pi^2
1415
% = -3.3333333333333333333333333333333333333
1416
? lfun(LE, 0)
1417
% -1
1418
? D = mfDelta(); mf=mfinit(D); LD = lfunmf(mf,D);
1419
? lfunlambda(LD, 3)/lfunlambda(LD, 5)
1420
% = 1.5555555555555555555555555555555555556
1421
? lfunlambda(LD, 1)/lfunlambda(LD, 3)
1422
% = 2.3444283646888567293777134587554269175
1423
? bestappr(%)
1424
% = 1620/691
1425
? mf = mfinit([23,2],0); F = mfbasis(mf)[1]; L = lfunmf(mf,F);
1426
? lfun(L, 2)
1427
% = 1.5959983753450272580976413437480171832
1428
? G = mfeigenbasis(mf)[1]; M = lfunmf(mf,G);
1429
? apply(x->lfun(x,I),M)
1430
% = [-0.15856033373254740657327844579672155664\
1431
+ 0.79671369922504818377602680344686311969*I,\
1432
-0.10230278816509023908993775663030712037\
1433
+ 0.65954223983092583287784522268295299513*I]
1434
\end{verbatim}
1435
1436
Note that the constant term $a(0)$ is ignored by the $L$-function, but
1437
can be recovered thanks to the formula $a(0)=-L(F,0)$.
1438
1439
The last commands illustrate first the fact that the $L$-functions can be
1440
computed for non-eigenforms ($F$ is not an eigenform), and second that
1441
if there are several embeddings, the \kbd{lfunmf} function returns a
1442
vector of \kbd{lfunmf}, one for each embedding.
1443
1444
Another illustration of the $L$-function package:
1445
1446
\begin{verbatim}
1447
? LIN = lfuninit(LD, [6, 6, 50]);
1448
? ploth(t = 0, 50, lfunhardy(LIN, t))
1449
\end{verbatim}
1450
1451
%\includegraphics[width=\textwidth]{pari3.pdf}
1452
1453
\medskip
1454
1455
\section{The mfeigensearch and mfsearch commands}
1456
1457
The last commands that we want to illustrate are \emph{searching} commands,
1458
The idea is simple: you believe that you have a modular form, but you do not
1459
know its level, weight, character, or field of definition of its
1460
coefficients, but only a number of its Fourier coefficients, perhaps only
1461
modulo $p$, and you would like to find forms which ``match'' your given form.
1462
1463
In this degree of generality, the search space is too wide. We have therefore
1464
decided to reduce the generality, so as to make the search more reasonable.
1465
Note that this will probably vary with the different versions of the program,
1466
so what is described here may be more restrictive than future versions. In
1467
the present implementation, we assume that the form we are looking for has
1468
rational coefficients, so that its character is (trivial or) quadratic.
1469
1470
The \kbd{mfsearch} command does this naively but is likely to be more
1471
efficient than taylor-made scripts:
1472
\begin{verbatim}
1473
? V = mfsearch([60,2],[0,1,2,3,4,5,6], 1); #V
1474
time = 5 ms.
1475
% = 3
1476
? V = mfsearch([[1..60],2],[0,1,2,3,4,5,6], 1); #V
1477
time = 40 ms.
1478
% = 5
1479
? [ mfparams(f) | f<-V ]
1480
% = [[56, 2, 8, y], [58, 2, 1, y],
1481
[60, 2, 1, y], [60, 2, 12, y], [60, 2, 60, y]]
1482
? [ print(mfcoefs(f,10)) | f<-V ]
1483
[0, 1, 2, 3, 4, 5, 6, -6, -4, -7, -20]
1484
[0, 1, 2, 3, 4, 5, 6, -34, 37, 22, 7]
1485
[0, 1, 2, 3, 4, 5, 6, 20, 0, -27, -6]
1486
[0, 1, 2, 3, 4, 5, 6, -170/9, -272/9, -11/3, -134/9]
1487
[0, 1, 2, 3, 4, 5, 6, 200/13, -304/13, -435/13, -278/13]
1488
\end{verbatim}
1489
This command looks for all forms, first in level $60$ then in level $1$ to $60$
1490
and weight $2$ whose first coefficients are $[0,1,2,3,4,5,6]$, the final $1$
1491
is optional and specifies the \emph{space} (in \kbd{mfinit} sense) where the
1492
search is performed, here the cuspidal space (by default the full space). It
1493
returns a list of $3$ forms in level $60$ and $5$ in total.
1494
1495
The \kbd{mfeigensearch} command is more interesting. We look for is a
1496
cuspidal \emph{eigenform} whose field of definition is $\Q$, so that its
1497
Fourier coefficients are integers, and its character is (trivial or)
1498
quadratic. An example is as follows:
1499
\begin{verbatim}
1500
? AP = [[2,2], [3,-1]] \\ a(2) = 2 and a(3) = -1
1501
? L = mfeigensearch([[1..120],4], AP); #L
1502
% = 2
1503
? [f,g] = L; [mfparams(f), mfparams(g)]
1504
% = [[26, 4, 1, y], [118, 4, 1, y]]
1505
? mfcoefs(f, 10)
1506
% = [0, 1, 2, -1, 4, 17, -2, -35, 8, -26, 34]
1507
? mfcoefs(g, 10)
1508
% = [0, 1, 2, -1, 4, -13, -2, -27, 8, -26, -26]
1509
\end{verbatim}
1510
1511
The first command asks for all forms as above in weight $4$ and level from
1512
$1$ up to $120$, such that $a(2)=2$ and $a(3)=-1$. The answer is that there
1513
are two forms, which we call $f$ and $g$. We compute their levels ($26$ and
1514
$118$ respectively), notice they have trivial character, and list their
1515
Fourier coefficients up to $10$ and we see that indeed $a(2)=2$ and $a(3)=-1$
1516
in both cases.
1517
1518
To specify the coefficients that we want there are a number of ways. The
1519
simplest, as above, is to give the list of pairs of integers $[p,a(p)]$.
1520
For instance:
1521
\begin{verbatim}
1522
? L = mfeigensearch([[1..80],2], [[2,2], [7,-3]]); #L
1523
% = 1
1524
? F = L[1]; mfparams(F)
1525
% = [75, 2, 1, y]
1526
? mfcoefs(F, 12)
1527
% = [0, 1, 2, -1, 2, 0, -2, -3, 0, 1, 0, 2, -2]
1528
\end{verbatim}
1529
1530
The coefficient $a(p)$ may also be given as an \kbd{intmod} \kbd{Mod}$(a,m)$
1531
then one looks for a match for $a(p)$ modulo $m$. For instance, we come
1532
back to our first example:
1533
\begin{verbatim}
1534
? AP5 = [[2,Mod(2,5)], [3,Mod(-1,5)]]; \\ now modulo 5
1535
? L=mfeigensearch([[1..120], 4], AP); #L
1536
% = 3
1537
? [ mfparams(f)[1] | f <- L ]
1538
% = [26, 26, 118]
1539
? [F1,F2] = L; \\ let's consider the first two
1540
? mfcoefs(F1, 10)
1541
% = [0, 1, 2, -1, 4, 17, -2, -35, 8, -26, 34]
1542
? mfcoefs(F2, 10)
1543
% = [0, 1, 2, 4, 4, -18, 8, 20, 8, -11, -36]
1544
? F = mflinear([F1, F2], [-1, 1]);
1545
? content(mfcoefs(F, mfsturm([26,4])+1))
1546
% = 5
1547
\end{verbatim}
1548
Working modulo $5$, we now find that there is an extra eigenform satisfying
1549
our criteria, and perhaps surprisingly, again in level $26$. The first,
1550
\kbd{F1}, is the one found above, with $a(2)=2$ and $a(3)=-1$. The second,
1551
\kbd{F2}, has $a(2)=2$ but $a(3)=4\equiv-1\pmod5$.
1552
1553
But we can go further and see that this is not a simple coincidence:
1554
the next command shows that both eigenforms seem to be congruent modulo $5$,
1555
at least up to $a(10)$. In fact they are indeed congruent modulo $5$:
1556
to prove this, we use the fact that the basic Sturm bound (the one obtained
1557
using \kbd{mfsturm([N,k])}, not \kbd{mfsturm(mf)}) is also valid modulo $p$.
1558
Since all coefficients are congruent up to the Sturm bound, they are
1559
congruent for all $n$.
1560
1561
\section{Half-Integral Weight Functions}
1562
1563
\subsection{General Functions}
1564
1565
Many of the commands that we have seen, and most importantly the
1566
\kbd{mfinit} and \kbd{mfdim} command, can be used verbatim in the case
1567
of modular forms of half-integral weight, sometimes with small differences.
1568
\begin{itemize}
1569
\item Two functions created from mathematical objects can give forms
1570
of half-integral weight, \kbd{mfetaquo} and \kbd{mffromqf}.
1571
1572
\item Leaf functions created from scratch are \kbd{mfTheta}, which gives the
1573
standard Jacobi theta function of weight $1/2$, and \kbd{mfEH}, which gives
1574
the Cohen--Hurwitz Eisenstein series of half-integral weight.
1575
1576
\end{itemize}
1577
1578
\begin{verbatim}
1579
? F = mffrometaquo([2,5;1,-2;4,-2]); Ser(mfcoefs(F,10),q)
1580
% = 1 + 2*q + 2*q^4 + 2*q^9 + O(q^11)
1581
? T = mfTheta(); mfisequal(F,T)
1582
% = 1
1583
? F = mffromqf(2*matid(3))[2]; Ser(mfcoefs(F,5),q)
1584
% = 1 + 6*q + 12*q^2 + 8*q^3 + 6*q^4 + 24*q^5 + O(q^6)
1585
? mfisequal(F, mfpow(T,3))
1586
% = 1
1587
\end{verbatim}
1588
1589
\begin{itemize}\item The only spaces which are \emph{directly} available
1590
by \kbd{mfinit} and \kbd{mfdim} are the full cuspidal space and the full
1591
modular form space. The new space can be defined in some cases but indirectly,
1592
using Kohnen's theory, see below.
1593
\item The only Hecke operators $T(n)$ which are nonzero are those where
1594
$n$ is a square (we have not programmed the $T(p)$ with $p$ dividing the
1595
level).
1596
\end{itemize}
1597
1598
\subsection{Specific Functions}
1599
1600
The most important specific function in half-integral weight is
1601
\kbd{mfshimura}, which computes the Shimura lift corresponding to a
1602
discriminant $D$ (1 by default) and also returns an \kbd{mf} space
1603
containing the lift:
1604
1605
\begin{verbatim}
1606
? mf=mfinit([60,5/2],1); F=mfbasis(mf)[1];
1607
? D = [1,5,8,12,13,17,21];
1608
? for (i=1, #D, \
1609
[mf2,G] = mfshimura(mf,F,D[i]); print(mfcoefs(G,10)))
1610
[0, 1, 2, 0, 2, -1, -2, 6, 6, -3, -10]
1611
[0, 0, 0, -1, 0, 0, 20, 0, 0, -2, 0]
1612
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1613
[0, 0, 0, 0, 0, 24, 0, 0, 0, 0, -48]
1614
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1615
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1616
[0, 1, 0, 3, 52, -5, -120, 14, -156, 3, 0]
1617
? mfdescribe(mf)
1618
% = "S_5/2(G_0(60, 1))"
1619
? mfdescribe(mf2)
1620
% = "S_4(G_0(30, 1))"
1621
\end{verbatim}
1622
1623
Two things to notice: first the image can be identically $0$.
1624
Second, the program takes some time (20 seconds for the above), because
1625
computing a Shimura image takes time proportional to $D^4$.
1626
1627
\smallskip
1628
1629
The other specific functions are related to the Kohnen $+$-space. Continuing
1630
the above example:
1631
1632
\begin{verbatim}
1633
? K=mfkohnenbasis(mf); matsize(K)
1634
% = [14, 4]
1635
? K[,1]
1636
% = [-1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]~
1637
? F=mflinear(mf,K[,1]);
1638
? Ser(mfcoefs(F,35),q)
1639
% = -q + 2*q^4 - 4*q^16 + 3*q^21 - 6*q^24 + 5*q^25 + O(q^36)
1640
\end{verbatim}
1641
1642
The first command shows that although the dimension of the cuspidal space
1643
is $14$, that of the Kohnen $+$-space is $4$; if desired, the corresponding
1644
modular forms can be obtained by \kbd{mflinear(mf,K[,j])} for each $j$ as
1645
done in the next command. The Fourier expansion of $F$ given
1646
on the last line shows that the only nonzero coefficients of $q^n$ occur
1647
when $n\equiv0,1\pmod4$. Continuing:
1648
1649
\begin{verbatim}
1650
? [mf2,FS]=mfshimura(mf,F); mfparams(FS)
1651
% = [15, 4, 1, y]
1652
? [mf2,FS]=mfshimura(mf,mfbasis(mf)[1]); mfparams(FS)
1653
% = [30, 4, 1, y]
1654
\end{verbatim}
1655
1656
These commmands show that the image of an element of the Kohnen $+$-space has
1657
level $15=60/4$, while the second shows that the image of a random form has
1658
level $30=60/2$.
1659
1660
\smallskip
1661
1662
A final command related to the Kohnen $+$-space is \kbd{mfkohnenbijection}.
1663
This allows, in half-integral weight, to compute the new space, its
1664
splitting, and the eigenforms:
1665
1666
\begin{verbatim}
1667
? [mf3,M,K,shi] = mfkohnenbijection(mf);
1668
? M * mfheckemat(mf3,11) * M^(-1)
1669
% =
1670
[ 48 24 24 24]
1671
1672
[ 0 32 0 -20]
1673
1674
[-48 -72 -40 -72]
1675
1676
[ 0 0 0 52]
1677
? mf30 = mfinit(mf3,0); B0 = mfbasis(mf30); #B0
1678
% = 2
1679
? BNEW = [mflinear(mf, K * M * mftobasis(mf3,f)) | f<-B0];
1680
? BE = mfeigenbasis(mf30);
1681
? BEIGEN = [mflinear(mf, K * M * mftobasis(mf3,f)) | f<-BE ];
1682
? Ser(mfcoefs(BEIGEN[1],24),q)
1683
% = q + q^4 - 3*q^9 - 5*q^16 + 6*q^21 + 3*q^24 + O(q^25)
1684
? Ser(mfcoefs(BEIGEN[2],24),q)
1685
% = q^5 + q^8 - 3*q^12 - 4*q^17 + 3*q^20 + O(q^25)
1686
? mfcoefs(BEIGEN[1],10^4);
1687
time = 7,532 ms.
1688
\end{verbatim}
1689
1690
The \kbd{mfkohnenbijection} command computes a square matrix $M$ giving
1691
a Hecke-module isomorphism from the space $S_{2k-1}(\G_0(N),\chi^2)$ to the
1692
Kohnen $+$-space $S_k^+(\G_0(4N,\chi))$. Note that this
1693
makes sense only when $N$ is squarefree.
1694
1695
Thus, $M$ allows to transport all problems from the ``difficult'' space
1696
$S=S_k^+(\G_0(4N),\chi)$ to the ``easy'' space $S_{2k-1}(\G_0(N),\chi^2)$.
1697
For instance, the next command (essentially instantaneous) gives the matrix of
1698
the Hecke operator $T(121)$ on $S$; a direct implementation using the action
1699
of $T(121)$ would take $10.6$ seconds.
1700
1701
The vector \kbd{BNEW} computed afterwards gives a basis of the Kohnen new
1702
space $S_k^{+,\text{new}}(\G_0(4N),\chi)$, here of dimension $2$.
1703
1704
The vector \kbd{BEIGEN} computed in a similar way contains the eigenfunctions
1705
of this new space. The example of \kbd{BEIGEN[2]} shows that, contrary to
1706
the integral weight case, these eigenfunctions can have vanishing coefficient
1707
of $q^1$. Note that we \emph{know} by construction that the image of
1708
\kbd{BEIGEN[j]} by any Shimura lift is a multiple of \kbd{BE[j]} (with the
1709
same index $j$).
1710
\smallskip
1711
1712
The above construction of the new space and the eigenforms being so useful,
1713
a specific function exists for this purpose: instead of all the above,
1714
simply write \kbd{[mf30,BNEW,BEIGEN]=mfkohneneigenbasis(mf,bij)}. Here
1715
\kbd{BNEW} and \kbd{BEIGEN} will be matrices whose columns are the
1716
coefficients of a basis of the Kohnen new space and of the eigenforms
1717
respectively, and \kbd{mf30} the corresponding new space of integral weight.
1718
1719
\section{Reference Manual for the Package}
1720
1721
We give a brief description in alphabetical order of all the functions
1722
specific to the package. To use the package, it is sometimes necessary to
1723
use functions on characters or functions of the \kbd{lfun} package, but
1724
those will not be described here.
1725
1726
Note that when a modular form $F$ can be embedded in $\C$ in several ways
1727
(typically for eigenforms), some functions give a vector (or even a matrix
1728
for bilinear operations) of results, one for each embedding: this occurs
1729
specifically for \kbd{lfunmf}, \kbd{mfeval}, \kbd{mfmanin}, \kbd{mfpetersson},
1730
\kbd{mfsymboleval}. This will not always be specified.
1731
1732
\def\f{\medskip\noindent}
1733
1734
\noindent\kbd{getcache()}: returns technical information about auto-growing
1735
caches.
1736
1737
\f\kbd{lfunmf(mf,$\{F\}$)}: creates the $L$-function associated to $F$, for use
1738
in the \kbd{lfun} package, where $F$ need not be an eigenform. If $F$ is
1739
omitted, output all $L$-functions associated to the eigenforms. If $F$ (or
1740
the eigenforms) have several embeddings in $\C$, output the vector of the
1741
corresponding \kbd{lfunmf}.
1742
1743
\f\kbd{mfatkin(mfatk, F)}: computes $F|_k W_Q$, where $Q\Vert N$, where
1744
\kbd{mfatk} must have been initialized by \kbd{mfatk=mfatkininit(mf,Q)}.
1745
1746
\f\kbd{mfatkineigenvalues(mf, Q)}: \kbd{mf} being a cuspidal or new space and
1747
$Q$ a primitive divisor of $N$, output the vector of Atkin--Lehner
1748
eigenvalues or pseudo-eigenvalues for each Galois eigenspace.
1749
1750
\f\kbd{mfatkininit(mf,Q)}: initialization function for the \kbd{mfatkin}
1751
function. The output is \kbd{[mfb,M,C,mf]}, where $C$ is a complex constant,
1752
$M/C$ is the matrix of the Atkin--Lehner operator $W_Q$ from the space
1753
\kbd{mf} to the space \kbd{mfb} (set equal to $0$ if equal to \kbd{mf}). The
1754
matrix $M$ is guaranteed to be with exact coefficients (rational or
1755
\kbd{polmods}).
1756
1757
\f\kbd{mfbasis(mf,$\{\text{space}=4\}$)}: gives a basis of the space of
1758
modular forms \kbd{mf}, either output by an \kbd{mfinit} command, in which
1759
case \kbd{space} is ignored, or \kbd{mf=[N,k,CHI]} (use \kbd{mfeigenbasis}
1760
for the eigenforms).
1761
1762
\f\kbd{mfbd(F,d)}: gives $B(d)(F)$, $B(d)$ expanding operator.
1763
1764
\f\kbd{mfbracket(F,G,$\{m=0\}$)}: $m$th Rankin--Cohen bracket of $F$ and $G$.
1765
1766
\f\kbd{mfcoef(F,n)}: $n$th Fourier coefficient $a(n)$ of $F$.
1767
1768
\f\kbd{mfcoefs(F,n)}: vector $[a(0),a(1),...,a(n)]$ of the Fourier coefficients
1769
of $F$ up to $n$. If $F$ is a modular form \emph{space}, give the matrix
1770
whose columns are the vectors of the Fourier coefficients of the basis.
1771
1772
\f\kbd{mfconductor(mf,F)}: smallest $M$ such that $F$ belongs to
1773
$M_k(\G_0(M),\chi)$.
1774
1775
\f\kbd{mfcosets(N)}: list of right cosets of $\G$ modulo $\G_0(N)$. In the
1776
present implementation, the trivial coset is the last and represented by
1777
the matrix $[1,0;N,1]$. $N$ can also be an \kbd{mf}.
1778
1779
\f\kbd{mfcuspisregular(NK,cusp)}: \kbd{NK} being $[N,k,\chi]$ or an \kbd{mf},
1780
determine if the cusp is regular or not.
1781
1782
\f\kbd{mfcusps(N)}: list of cusps of $\G_0(N)$. $N$ can also be an \kbd{mf}.
1783
1784
\f\kbd{mfcuspval(mf,F,cusp)}: valuation of modular form $F$ at \kbd{cusp}, which
1785
can be a rational number or \kbd{oo}.
1786
1787
\f\kbd{mfcuspwidth(N,cusp)}: width of \kbd{cusp} in $\G_0(N)$. $N$ can also be
1788
an \kbd{mf}.
1789
1790
\f\kbd{mfDelta()}: Ramanujan's Delta function of weight $12$.
1791
1792
\f\kbd{mfderiv(F,$\{m=1\}$)}: $m$th derivative $q.d/dq$ of $F$, where
1793
$m$ can be negative, corresponding to integration (the constant term
1794
is then set to $0$ by convention). The result is only quasi-modular.
1795
1796
\f\kbd{mfderivE2(F,$\{m=1\}$)}: $m$th Serre derivative $q.d/dq F-kE_2F/12$.
1797
1798
\f\kbd{mfdescribe(F,$\{\&G\}$)}: $F$ being a modular form or a modular form
1799
space, gives a human-readable description of $F$. If the address of $G$ is
1800
given, put in it the vector of parameters of the outmost operator defining
1801
$F$ (empty vector if $F$ is a leaf or a modular form space).
1802
1803
\f\kbd{mfdim(mf,$\{\text{space}=4\}$)}: dimension of the space \kbd{mf},
1804
where \kbd{mf} can also be of the form $[N,k,\chi]$ in which case \kbd{space}
1805
is taken into account. \kbd{mf} can also be of the form $[N,k,0]$, where $0$
1806
is a wildcard, in which case it gives detailed information for each character
1807
$\chi$ for which the corresponding space of level $N$, weight $k$ and given
1808
character is nonzero: each result is of the form
1809
\kbd{[order,Conrey,dim,dimdih]}, where \kbd{Conrey} is the Conrey label for
1810
the character, \kbd{order} is its order, \kbd{dim} is the dimension of the
1811
corresponding space, and \kbd{dimdih}, which is computed only in weight $1$,
1812
is the dimension of the subspace of dihedral forms.
1813
1814
\f\kbd{mfdiv(F,G)}: division of \kbd{F} by \kbd{G}.
1815
1816
\f\kbd{mfEH(k)}: $k$ being half-integral, gives the Cohen--Eisenstein series
1817
of weight $k$ on $\G_0(4)$.
1818
1819
\f\kbd{mfeigenbasis(mf)}: \kbd{mf} containing the new space, gives
1820
(in some order) the basis of normalized eigenforms.
1821
1822
\f\kbd{mfeigensearch(NK,AP)}: search for normalized eigenforms with
1823
integer coefficients in spaces specified by \kbd{NK}, satisfying conditions
1824
satisfied by \kbd{AP}. \kbd{NK} is a pair $[N,k]$, the search being in
1825
level $N$ and weight $k$ with trivial or quadratic character; the parameter
1826
$N$ may be replaced by a vector of allowed levels. \kbd{AP} is a list of pairs
1827
$[[p_1,a(p_1)],...,[p_n,a(p_n)]]$, where $a(p)$ is either an integer or an
1828
\kbd{intmod} (match modulo $a(p)\kbd{.mod}$).
1829
1830
\f\kbd{mfeisenstein(k,$\{\chi_1\}$,$\{\chi_2\}$)}: Eisenstein series
1831
$E_k(\chi_1)$ or
1832
$E_k(\chi_1,\chi_2)$, normalized so that $a(1)=1$ (so \kbd{mfeisenstein(k)}
1833
without any character argument is equal to \kbd{mfEk(k)} multiplied by
1834
$-B_k/(2k)$).
1835
1836
\f\kbd{mfEk(k)}: Eisenstein series $E_k$ for the full modular group normalized
1837
so that $a(0)=1$, including for $k=2$.
1838
1839
\f\kbd{mfeval(mf,F,vtau)}: evaluation of $F$ at the point \kbd{vtau} (or a
1840
vector of points) in the completed upper half-plane. If $F$ is an eigenform
1841
with several embeddings in $\C$, evaluate at each embedding.
1842
1843
\f\kbd{mffields(mf)}: \kbd{mf} containing the new space, gives the list of
1844
relative polynomials defining the number field extensions for all the Galois
1845
orbits of the eigenforms. \kbd{mf} can also be a modular form, in which case
1846
the result is the number field extension of $\Q(\chi)$ in which the Fourier
1847
coefficients of \kbd{mf} lie.
1848
1849
\f\kbd{mffromell(e)}: \kbd{e} being an elliptic curve defined over $\Q$ in
1850
\kbd{ellinit} format, gives \kbd{[mf,F,coe]}, where \kbd{F} is the eigenform
1851
corresponding to \kbd{e} by modularity, \kbd{mf} the corresponding new space,
1852
and \kbd{coe} the coefficients of \kbd{F} on the basis of \kbd{mf}.
1853
1854
\f\kbd{mffrometaquo(eta,$\{\text{flag}=0\}$)}: \kbd{eta} being a matrix
1855
representing an eta quotient, gives the corresponding modular form or
1856
function. If the result is not a modular form or function, return an error if
1857
\kbd{flag=0}, or $0$ otherwise. If the result has negative valuation,
1858
normalize to valuation $0$.
1859
1860
\f\kbd{mffromlfun(L)}: \kbd{L} being the $L$-function of a self-dual modular
1861
form with rational coefficients, for instance a rational eigenform, retun
1862
\kbd{[NK,space,v]}, where \kbd{mf = mfinit(NK,space)} is a modular form space
1863
containing the form and \kbd{mftobasis(mf,v)} yields the coefficients of
1864
\kbd{F} on the basis of \kbd{mf}.
1865
1866
\f\kbd{mffromqf(Q,$\{P\}$)}: \kbd{Q} being an even integral quadratic form of
1867
even dimension and \kbd{P} an optional homogeneous spherical polynomial with
1868
respect to \kbd{Q}, gives \kbd{[mf,F,coe]}, where \kbd{F} is the theta
1869
function associated to \kbd{Q} and \kbd{P}, \kbd{mf} the corresponding space,
1870
and \kbd{coe} the coefficients of \kbd{F} on the basis of \kbd{mf}.
1871
1872
\f\kbd{mfgaloistype(mf,$\{F\}$)}: \kbd{mf} being either $[N,1,\chi]$ or
1873
a new or cuspidal space of weight $1$ forms, outputs the type of the projective
1874
representations attached to all the eigenforms in \kbd{mf}, or only that of
1875
\kbd{F} if it is given. The output is $2n$ for $D_n$, or $-12$, $-24$, $-60$
1876
for $A_4$, $S_4$, $A_5$.
1877
1878
\f\kbd{mfhecke(mf,F,n)}: Computes $T(n)(f)$, where $T(n)$ is the $n$th Hecke
1879
operator. Note that the level which is used is that of the modular form space
1880
\kbd{mf}, not that of $F$ if it is different.
1881
1882
\f\kbd{mfheckemat(mf,n)}: matrix of $T(n)$ on the space \kbd{mf}.
1883
1884
\f\kbd{mfinit(NK,$\{\text{space}=4\}$)}: create the space of modular forms
1885
associated to $NK=[N,k,\chi]$ or $NK=[N,k]$. Codes for \kbd{space} is $0$,
1886
new space, $1$ cuspidal space, $2$ old space, $3$ space of Eisenstein series,
1887
$4$ full space $M_k$ (default). $NK$ can also be of the form $NK=[N,k,0]$,
1888
where $0$ is a wildcard, in which case it gives the vector of all nonzero
1889
\kbd{mfinit} for each Galois orbit of characters $\chi$.
1890
1891
\f\kbd{mfisCM(F)}: returns $0$ if $F$ does not have complex multiplication,
1892
and the CM discriminant(s) if it does. Note that in weight $1$ $F$ may have
1893
two CM discriminants, which occurs iff its galoistype is $D_2$.
1894
1895
\f\kbd{mfisequal(F,G,$\{\text{lim}=0\}$)}: Are $F$ and $G$ equal, or at least
1896
are their first \kbd{lim+1} Fourier coefficients equal ?
1897
1898
\f\kbd{mfkohnenbasis}(mf): \kbd{mf} being a cuspidal space of half-integral
1899
weight and level $4N$ with $N$ squarefree, computes a basis $B$ of the Kohnen
1900
$+$-space as a matrix whose columns are the coefficients of $B$ on the basis
1901
of \kbd{mf}.
1902
1903
\f\kbd{mfkohnenbijection}(mf): \kbd{mf} being a cuspidal space of
1904
half-integral weight, computes \kbd{[mf2,M,K,shi]}, where \kbd{M} is a matrix
1905
giving a Hecke-module isomorphism from the cuspidal space \kbd{mf2} of weight
1906
$2k-1$ and level $N$ to the Kohnen $+$-space of weight $k$ and level $4N$,
1907
the columns of the matrix \kbd{K} are the coefficients of the Kohnen $+$-space
1908
on the basis of \kbd{mf}, and \kbd{shi} gives technical information about
1909
which linear combination of Shimura lifts has been chosen.
1910
1911
\f\kbd{mfkohneneigenbasis}(mf,bij): \kbd{mf} being a cuspidal space of
1912
half-integral weight and \kbd{bij} the output of \kbd{mfkohnenbijection(mf)},
1913
computes a triple \kbd{[mf0,Bnew,Beigen]}, where \kbd{Bnew} and \kbd{Beigen}
1914
are matrices whose columns are the coefficients of a basis of the Kohnen
1915
new space and of the eigenforms on the basis of \kbd{mf} respectively, and
1916
\kbd{mf0} is the corresponding new space of integral weight $2k-1$.
1917
1918
\f\kbd{mflinear(vecF,vecL)}: linear combination of the forms in \kbd{vecF}
1919
with coefficients in \kbd{vecL}. Forms must have the same weight and
1920
character, but not necessarily the same level. This function is used
1921
for simpler operations such as
1922
\begin{verbatim}
1923
mflinear([F],[s]) \\ scalar multiplication
1924
mflinear([F,G],[1,1]) \\ addition
1925
mflinear([F,G],[1,-1]) \\ subtraction
1926
\end{verbatim}
1927
If \kbd{vecF=mfbasis(mf)}, it is better to write \kbd{mflinear(mf,vecL)}
1928
instead, since coefficient computations will be faster.
1929
1930
\f\kbd{mfmanin(FS)}: $FS$ being a modular symbol associated to an eigenform,
1931
returns $[[P^+,P^-],[\omega^+,\omega^-,r]]$ where the $P^{\pm}$ are the
1932
even/odd polynomials of special values, the $\omega^{\pm}$ the
1933
corresponding periods, and $r=\Im(\omega^+\overline{\omega^-})/<F,F>$.
1934
1935
\f\kbd{mfmul(F,G)}: product of the modular forms $F$ and $G$.
1936
1937
\f\kbd{mfnumcusps(N)}: number of cusps of $\G_0(N)$.
1938
1939
\f\kbd{mfparams(F)}: returns parameters $[N,k,\chi,P]$ of the modular form $F$,
1940
where $K$ is the polynomial defining the number field containing the
1941
coefficients of $F$ (e.g., $y$ if $F$ is rational), or $[-1,-1,-1,0]$ if
1942
it is not defined. If $F$ is a modular form space, returns $[N,k,\chi,space]$.
1943
1944
\f\kbd{mfperiodpol(mf,F,$\{\text{parity}=0\}$)}: period polynomial of the
1945
form $F$; if the \kbd{parity} argument is $1$ or $-1$, return the even/odd
1946
period polynomial.
1947
1948
\f\kbd{mfperiodpolbasis(k,$\{\text{parity}=0\}$)}: basis of period polynomials of weight
1949
$k$ for the full modular group, even/odd ones if \kbd{parity} is $1$ or $-1$.
1950
1951
\f\kbd{mfpetersson(FS,$\{\text{GS}=\text{FS}\}$)}: $FS$ and $GS$ being the modular symbols associated
1952
to $F$ and $G$ with \kbd{mfsymbol}, computes the Petersson product of $F$ and
1953
$G$ with the usual normalization $1/[\G:\G_0(N)]$. (Petersson square if $GS$
1954
is omitted.)
1955
1956
\f\kbd{mfpow(F, n)}: Modular form $F$ to the power $n$.
1957
1958
\f\kbd{mfsearch([N,k], V, $\{\text{space}=4\}$)}: search for \emph{rational}
1959
modular forms of weight~$k$ and level $N$ in the specified modular
1960
form spaces whose Fourier expansion up to the length of $V$ exactly matches
1961
$V$. The output is a list of forms. The parameter $N$ may be replaced
1962
by a list of allowed levels, e.g. \kbd{[$N_1$..$N_2$]} for all levels
1963
between $N_1$ and $N_2$.
1964
1965
\f\kbd{mfshift(F,m)}: \kbd{F} divided by $q^m$, omitting the remainder if there
1966
is one, where $m$ can be positive or negative. The result is usually not
1967
a modular form.
1968
1969
\f\kbd{mfshimura(mf,F,$\{D = 1\}$)}: $F$ being a modular form of
1970
half-integral weight $k\ge3/2$ and $D$ a discriminant, return
1971
\kbd{[mf2,FS,v]}, where \kbd{FS} is the corresponding Shimura lift of integral
1972
weight $2k-1$, \kbd{mf2} the corresponding modular form space and \kbd{v} the
1973
coefficients of \kbd{FS} on the basis of \kbd{mf2}. By extension, $D$ can also
1974
be a positive squarefree integer.
1975
1976
\f\kbd{mfslashexpansion(mf,f,g,n,flrat,$\{\&P\}$)}: compute the Fourier
1977
expansion of $f|_k g$ to order $n$, where $f$ is a form in \kbd{mf} and
1978
$g\in M_2^+(\Q)$. If \kbd{flrat} is set, try to ``rationalize''
1979
(error if unsuccessful). If the output is $[a(0),...,a(n)]$ and the
1980
optional $P$ contains parameters $[\al,w,A]$, then $f|_k g = F|_k A$
1981
where
1982
$F(\tau) = q^{\al}\sum_{0\le j\le n}a(j)q^{j/w}$, with $q=\exp(2\pi i\tau)$.
1983
$A$ is always upper triangular and usually the identity, so that $F|_k A$
1984
is immediate to compute.
1985
1986
\f\kbd{mfspace(mf,$\{F\}$)}: type of modular space \kbd{mf} if $F$ is omitted,
1987
or of a modular form $F$ in \kbd{mf}: result is $0$ for new, $1$ for cuspidal,
1988
$2$ for old, $3$ for full, $4$ for Eisenstein, and $-1$ if form is not in
1989
the space.
1990
1991
\f\kbd{mfsplit(mf,$\{\text{dimlim}=0\}$,$\{\text{flag}=0\}$)}: compute the
1992
eigenforms in \kbd{mf}, and limit the dimension of each Galois orbit to
1993
\kbd{dimlim} if set. \kbd{flag} is used to avoid some long computations (see
1994
doc). The space \kbd{mf} \emph{must} contain the new space. Note that the
1995
result is only a two-component vector \kbd{vF,vK}, where \kbd{vF} is a vector
1996
of eigenforms and \kbd{vK} the corresponding number fields, but is \emph{not}
1997
similar to the output of an \kbd{mfinit} command.
1998
1999
\f\kbd{mfsturm(mf)}: If \kbd{mf} is a space, true Sturm bound of \kbd{mf}, i.e.,
2000
largest valuation at infinity of a nonzero form. If \kbd{mf} is $[N,k,\chi]$,
2001
only an upper bound.
2002
2003
\f\kbd{mfsymbol(mf,F)}: initialize data for working with integrals related
2004
to $F$ such as \kbd{mfsymboleval}, \kbd{mfpetersson}, and \kbd{mfmanin}.
2005
2006
\f\kbd{mfsymboleval(FS,path,$\{\ga\}$)}: $FS$ being the modular symbol
2007
assocated to some form $F$ and \kbd{path} being $[s_1,s_2]$ where $s_1$ and
2008
$s_2$ are cusps or points in the upper half-plane, evaluate the symbol on the
2009
path, i.e., compute the polynomial
2010
$\int_{s_1}^{s_2}(X-\tau)^{k-2}F(\tau)\,d\tau$. If $\ga\in GL_2^+(\Q)$ is
2011
given, replace $F$ by $F|_k\ga$. If the integral diverges, the result will be
2012
either a rational function or a polynomial of degree $d>k-2$.
2013
2014
\f\kbd{mftaylor(F,n,$\{\text{fl}=0\}$)}: for now, only for $F\in M_k(\G)$ and
2015
at the point $i$. Compute the first $n$ Taylor coefficients of $F$ around
2016
$i$; if \kbd{fl} is set compute in fact $p_n$ such that
2017
$$f(\tau)=(2i/(\tau+i))^k\sum_{n\ge0}p_n((\tau-i)/(\tau+i))^n\;.$$
2018
2019
\f\kbd{mfTheta($\{\chi\}$)}: unary theta series corresponding to the primitive
2020
Dirichlet character $\chi$, thus in weight $1/2$ (resp., $3/2$)
2021
if $\chi$ is even (resp., odd).
2022
2023
\f\kbd{mftobasis(mf,F,$\{\text{flag}=0\}$)}: coefficients of form $F$ on the
2024
basis in \kbd{mf}. If \kbd{flag} is set, do not return an error if $F$ does
2025
not belong to \kbd{mf} or not enough coefficients.
2026
2027
\f\kbd{mftocoset(N,M,L)}: $L$ being the list of cosets output by
2028
\kbd{L=mfcosets(N)} and $M$ being in $\SL_2(\Z)$, output a pair
2029
$[\ga,i]$ such that $M=\ga L[i]$, where $\ga\in \G_0(N)$.
2030
2031
\f\kbd{mftonew(mf,F)}: Decompose $F$ is the cuspidal space \kbd{mf} as
2032
a sum of $B(d)G_M$ where $G_M\in S_k^{\new}(\G_0(M),\chi)$ and $dM\mid N$,
2033
return the vector of $[M,d,G]$.
2034
2035
\f\kbd{mftraceform(NK,$\{\text{space}=0\}$)}: gives the trace form
2036
corresponding to $NK=[N,k,\chi]$ and \kbd{space} (only the new space and the
2037
cuspidal space).
2038
2039
\f\kbd{mftwist(F,D)}: twist of the form $F$ by the quadratic character
2040
$(D/n)$.
2041
\end{document}
2042
2043