\documentclass[12pt]{article}
\textheight=1.07\textheight
%\voffset=-.5in
\bibliographystyle{amsplain}
\usepackage{amsmath}
\include{macros}
\title{\Large Introduction to Computing With Modular Forms}
\author{William A. Stein
\\{\sf was@math.harvard.edu}\\{\sf http://modular.fas.harvard.edu/$\sim$was}}
\date{8 March 2001 at Arizona State University}
\begin{document}
\maketitle

\section{Some open questions}
Here are two central questions in number theory that are, for the most
part, completely open today:
\begin{enumerate}
\item {\em The Birch and Swinnerton-Dyer conjecture:} a
simple conjectural criterion that decides whether 
or not a cubic equation $y^2=x^3+ax+b$ has infinitely 
many solutions.
\item {\em Serre's conjecture:} Classify the odd $2$-dimensional mod-$\ell$
representations of $\Gal(\Qbar/\Q)$.
\end{enumerate}

We now have partial solutions to each of these problems, and each 
involves modular forms.

\section{What is a modular form?}
Let~$N$ and~$k$ be positive integers.
\begin{definition}[Modular form] 
A modular form of level~$N$ and weight~$k$ is a holomorphic function
on the (extended) upper half plane such that for every 
determinant-$1$ matrix
$\abcd{a}{b}{c}{d}$ with $N\mid{}c$ we have
$$f\left(\frac{az+b}{cz+d}\right) = (cz+d)^k f(z).$$
We will denote the complex vector space of these modular 
forms by $M_k(N) = M_k(\Gamma_0(N))$.
\end{definition}

\begin{example}
The {\em Eisenstein series} 
$$E_k=\sum \frac{1}{(nz+m)^k},$$
for $k\geq 4$ an even integer, is a modular form of level~$1$ and
weight~$k$.
(Here we sum over all pairs $(n,m)\in \Z\cross \Z$ with
not both~$n$ and~$m$ equal to zero.)
Notice that 
\begin{align*}
E_k\left(\frac{az+b}{cz+d}\right)
 &= \sum \frac{1}{(n\frac{az+b}{cz+d}+m)^k}\\
 &= \sum \frac{(cz+d)^k}
   {\left(n(az+b) + m(cz+d)\right)^k}\\
 &= (cz+d)^k \sum \frac{1}{\left((na+mc)z + (nb+md)\right)^k}
  = (cz+d)^k E_k(z)
\end{align*}
(I won't check holomorphicity.)
\end{example}

\section{Computing with modular forms}

\subsection{Representation of modular forms}   
Because $\abcd{1}{1}{0}{1}$ has lower left entry divisible
by $N$, every modular form~$f$ has a Fourier expansion
  $$f(z) = \sum_{n \geq 0} a_n q^n,$$
where $q(z) = e^{2\pi i z}$.  In cases of interest, 
the $a_n$ lie in a fixed finite extension of~$\Q$.
We usually give a modular forms by giving its weight,
level, and the first few terms of its Fourier expansion.
E.g.,
$$E_4 = 1 + 240\sum_{n=1}^{\infty} \sigma_3(n)q^n
\quad\text{ and }\quad
E_6 = 1 - 504\sum_{n=1}^{\infty} \sigma_5(N)q^n.$$
%There are precise bounds on the number of terms needed to determine
%a $q$-expansion, or even the congruence class of a $q$-expansion.
%See a paper of Sturm.

\subsection{Generating the space of modular forms}
Modular forms of level~$1$ are relatively simple to compute using any
basic computer algebra system.
\begin{theorem}
A basis for $M_k(1)$ is 
$$\{E_4^i E_6^j : 4i + 6j = k, \text{ and } i, j\geq 0\}.$$
\end{theorem}
However, this method fails miserably when $N>1$ because there aren't
enough Eisenstein series.  For example, $M_2(11)$ has dimension
two but there is only one Eisenstein series in $M_2(11)$.
However, one can compute the forms of low weight and then
generate the forms of higher weight by multiplying the low
weight forms together.

\subsection{The Hecke algebra}
There is a commutative ring 
  $$\T = \Z[\ldots T_n \ldots]$$
of endomorphisms of $M_k(N)$.  It has the property that $T_n(f) =
a_n(f)$=$n$th coefficient of~$f$; 
moreover, $M_k(N) = \Hom(\T,\C)$.  Thus to compute
$M_k(N)$ it suffices to compute $\T$.

\begin{example}
There is a basis for $M_2(11)$ such that
$$T_1=\mtwo{1}{0}{0}{1},\quad
  T_2 = \mtwo{-2}{0}{1}{3},\quad
  T_3 = \mtwo{-1}{0}{1}{4},\quad
  T_4 = \mtwo{2}{0}{1}{7},\quad
  T_5 = \mtwo{1}{0}{1}{6}.$$
From this we deduce that the following two modular forms span $M_2(11)$:
$$f_1 = q - 2q^2 -q^3 + 2q^4 + q^5 + \cdots$$
and 
$$f_2 = q + 3q^2 + 4q^3 + 7q^4 + 6q^5 + \cdots.$$
By counting points on the elliptic curve $E$ given by
$y^2 + y = x^3 - x^2 - 10x - 20$
of conductor~$11$ one finds the following
modular form:
$$f_E = q - 2q^2 - q^3 + 2*q^4 + q^5 + \cdots.$$
Observe that $f_E = f_1$.
\end{example}

The Hecke algebra $\T$ acts on many spaces in addition to the space of
modular forms.  For example, $\T$ acts on the space of {\em modular 
symbols}, which is a very explicitly presented 
complex vector space.  By reading off the $\T$ action on
modular symbols, one recovers the $q$-expansions of modular forms. 

\subsection{Modular symbols}
When $k=2$ and $N=p$ is prime, the space of modular symbols is
presented as follows.  It is the quotient of the vector
space generated by symbols $[0], [1], ..., [p-1], [\infty]$
by the relations
$$x + x \sigma = 0\quad\text{ and }\quad
x+ x\tau + x\tau^2 = 0,$$
where $\sigma = \abcd{0}{-1}{1}{0}$ and $\tau=\abcd{1}{-1}{1}{0}$.
For more details, see my paper {\em An introduction to computing
modular forms using modular symbols.}

\subsection{Quadratic forms}
Using the ideal theory of queternion algebras, it is possible to 
list a collection of~$\theta$ series 
$\sum (\text{num ways to represent $n$}) q^n$
that generate certain spaces of modular forms.  
In the case of weight
two, David Kohel implemented this algorithm in \magma{}.  

\subsection{Hecke}
I wrote a package called ``HECKE'' that comes with \magma{},
which uses modular symbols for most internal computations. 
It includes functions
that, e.g., compute a basis of $q$-expansions for the subspace of
modular forms that are ``$0$ at the cusps''.

[[If the audience is small, show them!]]


\section{Two applications}

\subsection{The Birch and Swinnerton-Dyer conjecture}
Birch and Swinnerton-Dyer made a conjecture about the behaviour at
$s=1$ of a the $L$-function attached to an abelian variety. 
It was recently proved by Wiles and others that every cubic 
equation $y^2=x^3+ax+b$ is associated to a modular form.   
For cubic curves associated to modular forms, quite a lot of
the BSD conjecture is known.


\subsection{Serre's Conjecture}
Serre conjected that odd irreducible two-dimensional modular
representations of $G=\Gal(\Qbar/\Q)$ are ``attached to modular forms''
(NOT proved!)
Moreover, he gave a very precise recipe for the space
of modular forms that should give rise to the representation
(mostly proved!).
Probably about half of the explicit modular forms computations
I've encountered have involved this amazingly useful conjecture. 
Also, the ``recipe'' part of Serre's conjecture was used in
the proof of FLT.

%\bibliography{biblio}
\end{document}
