Introduction#

Modular Forms#

This theoretically-oriented section serves as a guide to the rest of the chapter. We recall the definition of modular forms, then briefly discuss \(q\)-expansions, Hecke operators, eigenforms, congruences, and modular symbols.

Fix positive integers \(N\) and \(k\), let \({\bf H}\) denote the complex upper half plane. Denote by \(M_k(\Gamma_1(N))\) the space of modular forms on \(\Gamma_1(N)\) of weight \(k\). This is the complex vector space of holomorphic functions \(f : {\bf H}\rightarrow{\mathbb{C}}\) such that

\[\begin{split}f\left({az + b\over cz+d}\right) = (cz+d)^k f(z) \qquad \hbox{\rm for all } \quad \begin{pmatrix}a&b\\ c&d\end{pmatrix} \in \Gamma_1(N),\end{split}\]

and \(f(z)\) is holomorphic at each “cusp” in \({\mathbb{P}}^1({\mathbb{Q}})={\mathbb{Q}}\cup\{\infty\}\) (see, e.g., [Diamond and Im, 1995] for a more precise definition.)

A Dirichlet character is a homomorphism \(\varepsilon:({\mathbb{Z}}/N{\mathbb{Z}})^*\rightarrow {\mathbb{C}}^*\) of abelian groups. Dirichlet characters are of interest because they decompose \(M_k(\Gamma_1(N))\) into more manageable chunks. If \(V\) is any complex vector space equipped with an action \(\rho:({\mathbb{Z}}/N{\mathbb{Z}})^* \rightarrow {\operatorname{Aut}}(V)\) and \(\varepsilon\) is a Dirichlet character, we set

\[V(\varepsilon) = \{ x \in V : \rho(a) x = \varepsilon(a)x \quad\hbox{\rm all} \quad a \in ({\mathbb{Z}}/N{\mathbb{Z}})^*\}.\]

The space \(M_k(\Gamma_1(N))\) is equipped with an action of \(({\mathbb{Z}}/N{\mathbb{Z}})^*\) by the diamond-bracket operators \(\langle d \rangle\), which are defined as follows. Given \(\overline{d}\in ({\mathbb{Z}}/N{\mathbb{Z}})^*\), choose a matrix \(\begin{pmatrix}a&b\\ c &d\end{pmatrix} \in \Gamma_0(N)\) such that \(d\, \hbox{\rm mod } N = \overline{d}\). Then

\[\langle d \rangle f(z) = (cz+d)^{-k} f\left({az + b\over cz+d}\right).\]

We call \(M_k(\Gamma_1(N))(\varepsilon)\) the space of modular forms of weight \(k\), level \(N\), and character \(\varepsilon\). This is the complex vector space of holomorphic functions \(f : {\bf H}\rightarrow {\mathbb{C}}\) such that

\[\begin{split}f\left({az + b\over cz+d}\right) = \varepsilon(a) (cz+d)^k f(z) \qquad \hbox{\rm for all } \quad \begin{pmatrix}a&b\\ c&d\end{pmatrix} \in \Gamma_0(N),\end{split}\]

and which is holomorphic at the cusps. We let \(M_k([\varepsilon])\) denote the direct sum of the spaces \(M_k(\Gamma_1(N))(\varepsilon)\) as \(\varepsilon\) varies over the \({\operatorname{Gal}}(\overline{{\mathbb{Q}}}/{\mathbb{Q}})\)-conjugates of \(\varepsilon\). It is unnecessary to specify the level because it is built into \(\varepsilon\).

To summarize, for any integer \(k\) and positive integer \(N\), there is a finite-dimensional \({\mathbb{C}}\)-vector space \(M_k(\Gamma_1(N))\). Moreover,

\[M_k(\Gamma_1(N)) \, = \, \bigoplus_{\text{\rm all }\varepsilon} M_k(\Gamma_1(N))(\varepsilon)\quad =\quad \bigoplus_{\text{\rm Gal}(\overline{{\mathbb{Q}}}/{\mathbb{Q}})\text{-class reps. }\varepsilon} M_k([\varepsilon]).\]

In Section Creation Functions, we describe how to create the spaces \(M_k(\Gamma_1(N))\) and \(M_k([\varepsilon])\) in Magma, for any \(k\geq 1\), \(N\geq 1\), and character \(\varepsilon\).

Let \(f\) be a modular form, and observe that since \(\begin{pmatrix}1&1\\ 0&1\end{pmatrix} \in \Gamma_1(N)\), we have \(f(z)=f(z+1)\). If we set \(q = {\rm exp}(2\pi i z)\), there is a \(q\)-expansion representation for \(f\):

\[f = a_0 + a_1 q + a_2 q^2 + a_3 q^3 + a_4q^4 + \cdots.\]

The \(a_n\) are called the Fourier coefficients of \(f\). Magma contains an algorithm for computing a basis of \(q\)-expansions for any space of modular forms of weight \(k\geq 2\) (see Section Bases).

Fix a positive integer \(N\) and let \(M\) be a sum of spaces \(M_k(N,\varepsilon)\). Let \(q{\rm -exp} : M \rightarrow {\mathbb{C}}[[q]]\) denote the map that associates to a modular form \(f\) its \(q\)-expansion. One can prove that there is a basis \(f_1,\ldots, f_d\) of \(M\) that maps to a basis for the free \({\mathbb{Z}}\)-module \(q{\rm -exp}(M) \cap {\mathbb{Z}}[[q]]\). See Section \(q\)-Expansions for how to compute such a basis in Magma. Let \(M_{\mathbb{Z}}\) be the \({\mathbb{Z}}\)-module spanned by \(f_1,\ldots, f_d\). For any ring \(R\), we define the space of modular forms over \(R\) to be \(M_R = M_{\mathbb{Z}}{\otimes}_{{\mathbb{Z}}} R\). Thus \(M_R\) is a free \(R\)-module of rank \(d\) with basis the images of \(f_1,\ldots, f_d\) in \(M_{\mathbb{Z}}{\otimes}_{{\mathbb{Z}}} R\). The computation of \(M_R\) is discussed in Section Base Extension.

Any space \(M\) of modular forms is equipped with an action of a commutative ring \({\bf T}={\mathbb{Z}}[\ldots T_n \ldots]\) of Hecke operators. The computation of Hecke operators \(T_n\) and their characteristic polynomials is described in Section Operators.

An eigenform is a simultaneous eigenvector for every element of the Hecke algebra \({\bf T}\). A newform is an eigenform that doesn’t come from a space of lower level and is normalized so that the coefficient of \(q\) is \(1\). Section Newforms describes how to find newforms. Computation of the mod \(p\) reductions and \(p\)-adic and complex embeddings of a newform is described in Section Reductions and Embeddings.

Computation of congruences is discussed in Section Congruences.

Modular symbols are closely related to modular forms. See Section Modular Symbols for the connection between the two.

About the Package#

The modular forms package is in many ways an interface to the modular symbols machinery (Section Modular Symbols). It also contains additional functionality (such as Eisenstein series), and features that are implemented independently (such as Hecke operators). In some situations however, it is better to work with modular symbols directly. In particular, spaces of modular forms are required to be Galois-stable over the rationals, while spaces of modular symbols are not. Moreover some features, such as Hecke operators of certain spaces, are unavailable for a given space of modular forms but can be obtained using the corresponding modular symbols.

In Magma V2.14 modular forms of weight one, and of half-integral weight, were added. Most of the existing functions now also work for these weights, however some are not implemented (for instance Newforms). Further functionality for half-integral weight will be added in future releases (including Hecke operators).

Categories#

In Magma, spaces of modular forms belong to the category ModFrm, and the elements of spaces of modular forms belong to ModFrmElt.

Verbose Output#

To set the verbosity level use the command SetVerbose("ModularForms",n), where n is \(0\) (silent), \(1\) (verbose), or \(2\) (very verbose). The default verbose level is \(0\).

Example: Basics (ex-021995)#

In this example, we illustrate categories and verbosity for modular forms.

> M := ModularForms(11,2); M;
Space of modular forms on Gamma_0(11) of weight 2 and dimension 2 over
Integer Ring.
> Type(M);
ModFrm
> B := Basis(M); B;
[
    1 + 12*q^2 + 12*q^3 + 12*q^4 + 12*q^5 + 24*q^6 + 24*q^7 + O(q^8),
    q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 + O(q^8)
]
> Type(B[1]);
ModFrmElt

Run in calculator

Using SetVerbose, we get some information about what is happening during computations.

> SetVerbose("ModularForms",2);
> M := ModularForms(30,4);
> EisensteinSubspace(M);
ModularForms: Computing eisenstein subspace.
ModularForms: Computing dimension.
Space of modular forms on Gamma_0(30) of weight 4 and dimension 8 over
Integer Ring.
> SetVerbose("ModularForms",0);   // turn off verbose mode

Run in calculator

An Illustrative Overview#

In this section, we give a longer example that serves as an overview of the modular forms package. It illustrates computations of modular forms of level \(1\), and illustrates the exceptional case of Serre’s conjecture with a level \(13\) example.

Example: Overview (ex-1436f8)#

First, we compute the two-dimensional space of modular forms of weight \(12\) and level \(1\) over \({\mathbb{Z}}\).

> M := ModularForms(Gamma0(1),12); M;
Space of modular forms on Gamma_0(1) of weight 12 and dimension 2 over
Integer Ring.

Run in calculator

The default output precision is \(8\):

> Basis(M);
[
    1 + 196560*q^2 + 16773120*q^3 + 398034000*q^4 + 4629381120*q^5 +
    34417656000*q^6 + 187489935360*q^7 + O(q^8),
    q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7
    + O(q^8)
]
> [PowerSeries(f,10) : f in Basis(M)];
[
    1 + 196560*q^2 + 16773120*q^3 + 398034000*q^4 + 4629381120*q^5 +
        34417656000*q^6 + 187489935360*q^7 + 814879774800*q^8 +
        2975551488000*q^9 + O(q^10),
    q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7
        + 84480*q^8 - 113643*q^9 + O(q^10)
]
> f := Basis(M)[1];
> Coefficient(f,2);
196560

Run in calculator

The Newforms command returns a list of the Galois-orbits of newforms.

> NumberOfNewformClasses(M);
2
> f := Newform(M,1); f;
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 +
O(q^8)

Run in calculator

We can call the “q” in the \(q\)-expansion anything we want and also compute forms to higher precision.

> Mf<w> := Parent(f); Mf;
Space of modular forms on Gamma_0(1) of weight 12 and dimension 1 over
Rational Field.
> f + O(w^12);
w - 24*w^2 + 252*w^3 - 1472*w^4 + 4830*w^5 - 6048*w^6 - 16744*w^7 +
    84480*w^8 - 113643*w^9 - 115920*w^10 + 534612*w^11 + O(w^12)

Run in calculator

Typing f + O(w^12) is equivalent to typing PowerSeries(f,12). The second newform orbit contains an Eisenstein series.

> E := Newform(M,2); PowerSeries(E,2);
691/65520 + q + O(q^2)

Run in calculator

Next we compute the two conjugate newforms in \(S_2(\Gamma_1(13))\):

> M := ModularForms(Gamma1(13),2);
> S := CuspidalSubspace(M); S;
Space of modular forms on Gamma_1(13) of weight 2 and dimension 2 over
Integer Ring.
> NumberOfNewformClasses(S);
1
> f := Newform(S, 1); f;
q + (-a - 1)*q^2 + (2*a - 2)*q^3 + a*q^4 + (-2*a + 1)*q^5 + (-2*a +
4)*q^6 + O(q^8)

Run in calculator

Here \(a\) is a root of the polynomial \(x^2-x+1\).

> Parent(f);
Space of modular forms on Gamma_1(13) of weight 2 and dimension 2 over
Number Field with defining polynomial x^2 - x + 1 over the Rational
Field.

Run in calculator

The Galois-conjugacy class of \(f\) has two newforms in it.

> Degree(f);
2
> g := Newform(S, 1, 2); g;
q + (-b - 1)*q^2 + (2*b - 2)*q^3 + b*q^4 + (-2*b + 1)*q^5 + (-2*b +
4)*q^6 + O(q^8)
> BaseRing(Parent(g));
Number Field with defining polynomial x^2 - x + 1 over the Rational
Field

Run in calculator

The parents of \(f\) and \(g\) are isomorphic (but distinct) abstract extensions of \({\mathbb{Q}}\) both isomorphic to \({\mathbb{Q}}(\sqrt{-3})\).

> Parent(f) eq Parent(g);
false

Run in calculator

We can also list all of the newforms at once, gathered into Galois orbits, using the Newforms command:

> N := Newforms(M);
> #N;
8
> N[3];
[*
1/13*(-7*zeta_6 - 11) + q + (2*zeta_6 + 1)*q^2 + (-3*zeta_6 + 1)*q^3 +
(6*zeta_6 - 3)*q^4 - 4*q^5 + (-7*zeta_6 + 7)*q^6 + (-7*zeta_6 + 8)*q^7
+ O(q^8),
1/13*(7*zeta_6 - 18) + q + (-2*zeta_6 + 3)*q^2 + (3*zeta_6 - 2)*q^3 +
(-6*zeta_6 + 3)*q^4 - 4*q^5 + 7*zeta_6*q^6 + (7*zeta_6 + 1)*q^7 +
O(q^8)
*]

Run in calculator

The “Nebentypus” or character of \(f\) has order \(6\).

> e := DirichletCharacter(f); Parent(e);
Group of Dirichlet characters of modulus 13 over Cyclotomic Field of
order 6 and degree 2
> Order(e);
6

Run in calculator

This shows that there are no cuspidal newforms with Dirichlet character of order \(2\). As we see below, the mod-\(3\) reduction of \(f\) has character \(\overline{\varepsilon}\) that takes values in \({\mathbb{F}}_3\) and has order \(2\). The minimal lift of \(\overline{\varepsilon}\) to characteristic \(0\) has order \(2\), while there are no newforms of level \(13\) with character of order \(2\). (This example illustrates the “exceptional case of Serre’s conjecture”.)

> f3 := Reductions(f,3); f3;
[* [*
q + 2*q^3 + 2*q^4 + O(q^8)
*] *]
> M3<q> := Parent(f3[1][1]);
> f3[1][1]+O(q^15);
q + 2*q^3 + 2*q^4 + q^9 + q^12 + 2*q^13 + O(q^15)

Run in calculator

The modular forms package can also be used to quickly compute dimensions of spaces of modular forms.

> M := ModularForms(Gamma0(1),2048);
> Dimension(M);
171
> M := ModularForms(Gamma1(389),2);
> Dimension(M);
6499
> Dimension(CuspidalSubspace(M));
6112

Run in calculator

Don’t try to compute a basis of \(q\)-expansions for \(M\)!

> M := ModularForms(Gamma0(123456789),6);
> Dimension(CuspidalSubspace(M));
68624152
> Dimension(EisensteinSubspace(M));
16

Run in calculator