Introduction

Contents

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 Hh denote the complex upper half plane. Denote by Mk1(N)) the space of modular forms on Γ1(N) of weight k. This is the complex vector space of holomorphic functions f : H -> C such that f((az + b)/(cz + d)) = (cz + d)^k*f(z) for all [a b, c d] ∈Γ1(N), and f(z) is holomorphic at each "cusp" in P1(Q)=Q∪{∞} (see, e.g., [DI95] for a more precise definition.)

A Dirichlet character is a homomorphism ε:(Z/NZ) * -> C * of abelian groups. Dirichlet characters are of interest because they decompose Mk1(N)) into more manageable chunks. If V is any complex vector space equipped with an action ρ:(Z/NZ) * -> Aut(V) and ε is a Dirichlet character, we set V(ε) = { x ∈V : ρ(a) x = ε(a)x all a ∈(Z/NZ) * }. The space Mk1(N)) is equipped with an action of (Z/NZ) * by the diamond-bracket operators < d >, which are defined as follows. Given /line(d)∈(Z/NZ) * , choose a matrix [a b, c d] ∈Γ_0(N) such that d mod N = /line{d}. Then < d > f(z) = (cz + d) - k f((az + b)/(cz + d)). We call M_k(Γ_1(N))(ε) the space of modular forms of weight k, level N, and character ε. This is the complex vector space of holomorphic functions f : H - > C such that f((az + b)/(cz + d)) = ε(a) (cz + d)k f(z) for all [a b, c d] ∈Γ0(N), and which is holomorphic at the cusps. We let M_k([ε]) denote the direct sum of the spaces M_k(Γ_1(N))(ε) (as ε varies over the Gal(Qbar/Q)-conjugates) of ε. It is unnecessary to specify the level because it is built into ε.

To summarize, for any integer k and positive integer N, there is a finite - dimensional C-vector space M_k(Γ_1(N)). Moreover, Mk1(N)) = bigoplus_(hbox(all ε}) Mk1(N))(ε) = bigoplus_(hbox(Gal(Qbar/Q)-class reps. ε}) Mk([ε]). In Section ref(sec - creation), we describe how to create the spaces M_k(Γ_1(N)) and M_k([ε]) in Magma, for any k≥1, N≥1, and character ε.

Let f be a modular form, and observe that since [a b, c d] ∈Γ1(N), we have f(z)=f(z + 1). If we set q = (exp)(2π i z), there is a q-expansion representation for f: f = a0 + a1 q + a2 q2 + a3 q3 + a4q4 + ... . The an 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≥2 (see Section Basis).

Fix a positive integer N and let M be a sum of spaces Mk(N, ε). Let q(- exp) : M -> C[[q]] denote the map that associates to a modular form f its q-expansion. One can prove that there is a basis f1, ..., fd of M that maps to a basis for the free Z-module q(- exp)(M) ∩Z[[q]]. See Section q-Expansions for how to compute such a basis in Magma. Let MZ be the Z-module spanned by f1, ..., fd. For any ring R, we define the space of modular forms over R to be MR = MZ tensor Z R. Thus MR is a free R-module of rank d with basis the images of f1, ..., fd in MZ tensor Z R. The computation of MR is discussed in Section Base Extension.

Any space M of modular forms is equipped with an action of a commutative ring Tt=Z[ ... Tn ... ] of Hecke operators. The computation of Hecke operators Tn and their characteristic polynomials is described in Section Hecke and Atkin-Lehner Operators.

An eigenform is a simultaneous eigenvector for every element of the Hecke algebra Tt. 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 version 2.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 ModFrm_Basics (H141E1)

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

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

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 ModFrm_Overview (H141E2)

First, we compute the two-dimensional space of modular forms of weight 12 and level 1 over Z.
> M := ModularForms(Gamma0(1),12); M;
Space of modular forms on Gamma_0(1) of weight 12 and dimension 2 over
Integer Ring.
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
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)
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)
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)
Next we compute the two conjugate newforms in S21(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)
Here a is a root of the polynomial x2 - 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.
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
The parents of f and g are isomorphic (but distinct) abstract extensions of Q both isomorphic to Q(Sqrt( - 3)).
> Parent(f) eq Parent(g);
false
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)
*]
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
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 /line(ε) that takes values in F3 and has order 2. The minimal lift of /line(ε) 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)
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
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
V2.28, 13 July 2023