Navigation

When computing with spaces of modular forms, it is helpful to have
easy-to-compute formulas for dimensions of these spaces. Such
formulas provide a check on the output of the algorithms from
Chapter General Modular Symbols that compute explicit bases for spaces of
modular forms. We can also use dimension formulas to improve the
efficiency of some of the algorithms in Chapter General Modular Symbols, since
we can use them to determine the ranks of certain matrices without
having to explicitly compute those matrices. Dimension formulas can also be
used in generating bases of -expansions; if we know the dimension
of and if we have a process for computing -expansions
of elements of , e.g., multiplying together
-expansions of certain forms of smaller weight, then we can tell
when we are done generating .

This chapter contains formulas for dimensions of spaces of modular
forms, along with some remarks about how to evaluate these formulas.
In some cases we give dimension formulas for spaces that we
will define in later chapters.
We also give
many examples, some of which were computed using the modular symbols
algorithms from Chapter General Modular Symbols.

Many of the dimension formulas and algorithms we give below grew out
of Shimura’s book [Shi94] and a program that Bruce Kaskel
wrote (around 1996) in PARI, which Kevin Buzzard extended. That
program codified dimension formulas that Buzzard and Kaskel found or
extracted from the literature (mainly [Shi94, Section 2.6]).
The algorithms for dimensions of spaces with nontrivial character are
from [CO77], with some refinements
suggested by Kevin Buzzard.

For the rest of this chapter, denotes a positive integer and
is an integer. We will give no simple formulas for
dimensions of spaces of weight modular forms; in fact, it
might not be possible to give such formulas since the
methods used to derive the formulas below do not apply in the case
. If , the only modular forms are the constants, and for
the dimension of is .

For a nonzero integer and a prime , let be the largest
integer such that . In the formulas in this
chapter, always denotes a prime number. Let be the
space of modular forms of level weight and character ,
and let and be the cuspidal and Eisenstein
subspaces, respectively.

The dimension formulas below for ,
, and can be
found in [DS05, Ch. 3],
[Shi94, Section 2.6] [1] and
[Miy89, Section 2.5]. They are derived using the Riemann-Roch Theorem
applied to the covering or and
appropriately chosen divisors. It would be natural to give a sample
argument along these lines at this point, but we will not since it
easy to find such arguments in other books and survey papers (see,
e.g., [DI95]). So you will not learn much about how to
derive dimension formulas from this chapter. What you will learn is
precisely what the dimension formulas are, which is something that is
often hard to extract from obscure references.

In addition to reading this chapter, the reader may wish to consult
[Mar05] for proofs of similar dimension formulas,
asymptotic results, and a nonrecursive formula for dimensions of
certain new subspaces.

Csirik, Wetherell, and Zieve prove in
[CWZ01] that a random positive integer has
probability of being a value of

and they give bounds on the size of the set of values of below
some given . For example, they show that are the first few integers that are not of the
form for any . See Figure 6.1
for a plot of the very erratic function . In
contrast, the function is very
well behaved (see Figure 6.2).

Fix a Dirichlet character of modulus ,
and let be the conductor of (we do not
assume that is primitive).
Assume that , since otherwise
and the formulas of
Section Modular Forms for apply. Also, assume that ,
since otherwise . In this section we
discuss formulas for computing each of ,
and .

In [CO77], Cohen and
Oesterl’e assert (without published proof; see Remark Remark 6.11 below)
that for any and ,
as above,

This flexible formula can be used to compute the dimension of
,
, and for any , , ,
by using that

One thing that is not straightforward when implementing an algorithm
to compute the above dimension formulas is how to efficiently compute
the sets and . Kevin Buzzard suggested the
following two algorithms. Note that if
is odd, then , so the sum over
is only needed when is even.

Algorithm 6.9

Given a positive integer and an even
Dirichlet character of modulus ,
this algorithm computes .

Note that , since is even. By the Chinese
Remainder Theorem, the set is empty if and only if there is
no square root of modulo some prime power divisor of . If
is empty, the algorithm correctly detects this fact in
steps (a) – (b).
Thus assume is
nonempty. For each prime power that exactly divides
, let be such that and for . This is the value of
computed in steps (d) – (g)
(as one sees using elementary number theory).

The next key observation is that

(1)

since by the Chinese Remainder Theorem the elements of are
in bijection with the choices for a square root of modulo each
prime power divisors of . The observation (1)
is a huge gain from an efficiency point of view—if had
prime factors, then would have size , which could be
prohibitive, where the product involves only factors. To finish
the proof, just note that steps
(h) – (j)
compute the local factors ,
where again we use that is even. Note that a solution
of lifts uniquely to a solution mod for
any , because the kernel of the natural homomorphism is a group of -power order.

The algorithm for computing the sum over is similar.

For , to compute , use the formula directly
and the fact that , unless and .
To compute for , use the fact that the big
formula at the beginning of this section
is valid for any integer to replace
by and
that for to rewrite the formula as

Note also that for , if
and only if is trivial and it equals otherwise.
We then also obtain

We can also compute when
directly, since

The following table contains the dimension of
for some sample values of and . In each case,
is the product of characters of maximal order
corresponding to the prime power factors of (i.e.,
the product of the generators of the group
of Dirichlet characters of modulus ).

Example 6.10

We compute the last line of the above table. First
we create the character .

Cohen and Oesterl’e also give dimension formulas for spaces of
half-integral weight modular forms, which we do not give in this
chapter. Note that [CO77] does not
contain any proofs that their claimed formulas are correct,
but instead they say only that “Les formules qui les donnent sont
connues de beaucoup de gens et il existe plusieurs m’ethodes
permettant de les obtenir (th’eor`eme de Riemann-Roch, application
des formules de trace donn’ees par Shimura).” [2]
Fortunately, in [Que06],
Jordi Quer derives the
(integral weight) formulas of [CO77]
along with formulas for dimensions of spaces and
for more general congruence subgroups.

Let be the conductor of a Dirichlet character of modulus .
Then the dimension of the new subspace of is

where is as in the statement
of Proposition 6.4, and is the restriction
of mod .