\documentclass[12pt, landscape]{article}
\usepackage{fullpage}
\title{Modular Symbols, Modular Forms and Modular Abelian
Varieties in MAGMA}
\author{William Stein\\
{\tt http://modular.fas.harvard.edu}}
\date{IHP Minicourse: October 4--8, 2004}
\include{macros}
\usepackage[hypertex]{hyperref}
\usepackage{python}
\setlength{\parindent}{0cm}
\begin{document}
\sf\large
\maketitle
\begin{abstract}
\LARGE
\par\noindent{}I found MAGMA frustrating and incomprehensible until Allan Steel
visited Berkeley and intensely explained it to me for two days.
Since then, MAGMA has seemed much easier. Now it is my turn. In these lectures, I'll
try to show you the central ideas needed to compute with modular
forms and modular abelian varieties in MAGMA. These are the
insights I often tell people when discussing computing with modular
forms.
\end{abstract}
\newpage
\tableofcontents
\newpage
\setlength{\parskip}{1em}
\mbox{}\vspace{1cm}
\begin{center}
{\Huge \bf Background}
\end{center}
\begin{itemize}
\item You are very familiar with the basics of MAGMA
\item I will not assume you know about modular symbols and modular forms.
\end{itemize}
\vspace{2ex}
\begin{center}
{\Huge \bf Acknowledgements}
\end{center}
\begin{itemize}
\item {\bf Kevin Buzzard} had a major influence on how I designed the modular
symbols and Dirichlet characters code for MAGMA.
\item {\bf David Kohel} wrote
an early version of the Dirichlet characters package.
\item The main reason
any of this code is efficient is that {\bf Allan Steel} has massively
optimized the exact dense linear algebra core of MAGMA, partly in
response to my requests.
\item The algorithms owe a major debt to
{\bf John Cremona}'s book and {\bf Loic Merel}'s modular symbols article.
\end{itemize}
\newpage
\section{Dirichlet Characters}
Spaces of modular forms of integer weight $\geq 2$ are built out of spaces
defined by a level, weight, and Dirichlet character.
A \defn{Dirichlet character} over a domain~$R$ is a map $\eps:\Z\to R$ such
that for some homomorphism $f:(\Z/N\Z)^* \to R^*$
we have
$$
\eps(a) = \begin{cases} 0 & \text{if }(a,N)\neq 1,\\
f(a \text{ mod } N) & \text{if }(a,N)=1.
\end{cases}
$$
Create Dirichlet characters by creating the group
of all Dirichlet characters of modulus $N$ over a ring $R$
using the {\tt DirichletGroup} command.
\begin{verbatim}{Creation of a DirichletGroup}
> G := DirichletGroup(8*13, CyclotomicField(12));
> G;
Group of Dirichlet characters of modulus 104 over Cyclotomic
Field of order 12 and degree 4
> // WARNING: The default ring is Q, not Q(zeta_n), where n=exponent((Z/nZ)^*) !
> DirichletGroup(8*13);
Group of Dirichlet characters of modulus 104 over Rational Field
\end{verbatim}
\newpage
The three generators of $G$ correspond to the decomposition
$$
(\Z/104\Z)^* = \langle 79 \rangle \times \langle 53 \rangle
\times \langle 41 \rangle,
$$
where $79\con -1\pmod{4}$ generates $(\Z/4\Z)^*$,
the element $53 \con 5\pmod{8}$ generates the non-$\pm 1$ factor
of $(\Z/8\Z)^*$, and $41\con 2\pmod{13}$ generates $(\Z/13\Z)^*$.
\begin{verbatim}{Invariants of characters}
> Order(a);
2
> Order(b);
2
> Order(c);
12
> Conductor(a);
4
> Conductor(b);
8
> Conductor(c);
13
> a(3);
-1
> b(3);
-1
> c(3);
zeta_12^2 - 1
\end{verbatim}
We can also do arithmetic with Dirichlet characters.
\begin{verbatim}{Arithmetic with characters}
> G := DirichletGroup(5,CyclotomicField(4));
> H := DirichletGroup(7,RationalField());
> Parent(a*b);
Group of Dirichlet characters of modulus 35 over Cyclotomic Field
of order 4 and degree 2
\end{verbatim}
In addition to the handbook, I encourage you to look at the source code, which
is completely available in the following file (nothing is in C):
\begin{center}
{\tt package/Geometry/ModSym/dirichlet.m}
\end{center}
\newpage\section{Modular Symbols}
\subsection{Introduction}
Computation of spaces $\sM_k(N,\eps)$ of {\bf modular symbols}
is the heart of most of the algorithms in MAGMA for computing
with modular forms and modular abelian varieties:
\begin{itemize}
\item Computing spaces $M_k(N,\eps)$ of {\bf modular forms}
involves modular symbols algorithms and enumeration of Eisenstein
series.
\item Modular abelian varieties viewed
as complex vector spaces modulo lattices, where the lattices are
naturally viewed as spaces of modular symbols.
\end{itemize}
References:
\begin{itemize}
\item My Ph.D. thesis {\em Explicit Approaches to Modular Abelian Varieties}
\item Loic Merel's {\em Universal Fourier Expansions of Modular Forms}.
\end{itemize}
Fix a positive integer~$N$, an integer $k\geq 2$, and a Dirichlet
character~$\eps$ of level~$N$. Let $\sM_k(N,\eps)$ be the
space of modular symbols of level $N$, weight $k$, and character $\eps$,
which we view as being defined by the following algorithm.
As motivation for computing modular symbols, keep in mind
that there is an isomorphism of $\T$-modules
$$
\sM_k(N,\eps) \isom S_k(N,\eps)^{\oplus 2} \oplus E_k(N,\eps),
$$
where $S_k(N,\eps)$ is the space of cusp forms of type
$N,k,\eps$, and $E_k$ is the space of Eisenstein series
of that type.
\begin{algorithm}{Manin Symbols}\label{alg:manin}
This algorithm computes a presentation for the space
$\sM_k(N,\eps)$ of modular symbols,
as a vector space over $K=\Q(\eps)$.
\begin{steps}
\item{}[Generating Manin Symbols]
Create a list of the distinct Manin symbols $[X^i Y^{k-2-i}, (c,d)]$,
where $i=0,\ldots, k-2$, and $(c,d)\in\P^1(N)$, so
$c,d\in\Z/N\Z$ and $\gcd(c,d,N)=1$. Let $V$ be the $K$-vector
space generated by these Manin symbols.
\item{}[Subspace of Relations] \label{step:rels}
The group $\GL_2(\Q)$ acts on $V$ on the right by
$$[P(X,Y),\,(c,d)].\abcd{a}{b}{c}{d} = [P(dX-bY,-cX+aY),\,(au+cv,bu+dv)].$$
Let $S=\abcd{0}{-1}{1}{0}$ and $T=\abcd{0}{-1}{1}{-1}$, and
let $W$ be the suspace of $V$ generated by the elements
\begin{equation}\label{eqn:maninrels}
x + xT \qquad\text{and}\qquad x + xS + xS^2
\end{equation}
for all generating manin symbols $x$.
\item{}[Quotient] Using sparse linear algebra techniques,
compute and output the quotient
$
\sM_k(N,\eps) \isom V/W,
$
This is essentially the same as finding the reduced row echelon form
of the matrix whose rows are given by the relations (\ref{eqn:maninrels}).
The output is a list of freely generating Manin symbols
$x_0,\ldots, x_n$, and all other Manin symbols written as linear
combinations of $x_0,\ldots, x_n$.
\end{steps}
\end{algorithm}
There is a \defn{star involution} $*$ on $\sM_k(N,\eps)$, and
for many computations it is sufficient to compute in
one of the quotients
$$\sM_k(N,\eps)/(*-1)\qquad\text{or}\qquad \sM_k(N,\eps)/(*+1).$$
We compute this quotient
directly by including the relations $x+xI$ or $x-xI$ in~$W$
in Step~\ref{step:rels}, where $I=\abcd{-1}{0}{0}{1}$.
We illustrate modular symbols by using MAGMA to compute a presentation
for $\sM_5(13,\eps)$, where $\eps$ has order~$4$, so $K=\Q(i)$.
\begin{verbatim}{Modular symbols creation}
> G := DirichletGroup(13, CyclotomicField(4));
> eps(-1);
-1
> Order(eps);
4
> M := ModularSymbols(eps, 5);
> M;
Full modular symbols space of level 13, weight 5, character eps,
and dimension 8 over Cyclotomic Field of order 4 and degree 2
\end{verbatim}
Thus $\sM_5(13,\eps)$ has dimension~$8$ as a vector space over $\Q(i)$.
Note that the level $N=13$ is encoded as the modulus of $\eps$,
so it is not necessary to specify $N$ when defining $\sM_k(N,\eps)$.
The following command enumerates a basis represented as Manin symbols.
\begin{verbatim}{Basis of Manin symbols}
> [ManinSymbol(x)[1] : x in Basis(M)];
[
,
,
,
,
,
,
,
]
\end{verbatim}
The command {\tt ManinSymbol} is necessary because elements
of $\sM_k(N,\eps)$ print by default as modular symbols.
If $[P(X,Y),(c,d)]$ is a Manin symbol, and $g=\abcd{a}{b}{c'}{d'}\in\SL_2(\Z)$
satisfies $c\con c'$ and $d\con d' \pmod{N}$, then
the corresponding modular symbol is
$P(dX-bY,-cX+aY) \{g(0),g(\infty)\}$.
\begin{verbatim}{Corresponding modular symbol}
> M.1;
X^3*{0, oo}
> M.2;
(1331*X^3 + 363*X^2*Y + 33*X*Y^2 + Y^3)*{-1/11, 0}
\end{verbatim}
\begin{remark}
I think my current implementation of computation of the presentation
for modular symbols in MAGMA take significantly more memory than it
should.
\end{remark}
\subsection{Efficiency Trick: Work Mod~$p$}
For many computations computing with modular symbols modulo~$p$
is enough, and can be {\em vastly more efficient}. If we create a group
{\tt DirichletGroup(N,R)} of Dirichlet characters with $R$
a finite field, then the corresponding space of modular symbols
is a vector space over~$R$. In MAGMA this vector space
is defined by Algorithm~\ref{alg:manin} but with $K=R$.
\begin{verbatim}{Modular symbols mod}
> G := DirichletGroup(2000,GF(5));
> Conductor(c);
5
> Order(c);
4
> M := ModularSymbols(c,3);
> M;
Full modular symbols space of level 2000, weight 3, character c,
and dimension 1200 over Finite field of size 5
\end{verbatim}
Most code for modular symbols views the base field
as generic, so it is identical for finite fields and
characteristic~$0$.
\vspace{1ex}
\par\noindent{\bf BIG WARNING:} {\em This need {\em not} be a
``mod~$p$ reduction'' of the space in characteristic $0$. In
particular when $p$ is small it is possible that there is
``spurious'' torsion.}
\begin{verbatim}{Spurious torsion}
> function f(N,k)
return Dimension(ModularSymbols(N,k,GF(2))) -
Dimension(ModularSymbols(N,k));
end function;
> [N : N in [2..100] | f(N,2) gt 0];
[ 5, 10, 13, 17, 25, 26, 29, 34, 37, 41, 50, 53, 58, 61, 65, 73,
74, 82, 85, 89, 97 ]
\end{verbatim}
In each case the dimension is one bigger, except for
$65$ and $85$, when it is off by~$3$.
For an application of this efficient trick, see
Buzzard-Stein, ``A Mod~$5$ Approach to Artin's Conjecture''.
\subsection{Hecke Operators}
The spaces $\sM_k(N,\eps)$ are equipped with a commuting
ring of Hecke operators $T_n$, for all positive integers~$n$.
MAGMA computes these Hecke operators using Merel's Heilbronn matrix
formulas. For each~$n$, Merel defines a computable set $S_n$ (in fact
various sets) of matrices of determinant`$n$ such that
$$
T_n(x) = \sum_{g\in S_n} x|g.
$$
The sets $S_n$ only depend on $n$, not on $k,N,\eps$, and the
cardinality of $S_n$ is $O(n\log(n))$ [[double check--maybe only
for $n$ prime]].
The command to list the set $S_n$ for a given~$n$, returns
the matrices as a sequence whose entries are the integer
sequences corresponding to the elements of $S_n$.
\begin{verbatim}{Heilbronn matrices}
> HeilbronnMerel(2);
[
[ 1, 0, 0, 2 ],
[ 1, 0, 1, 2 ],
[ 2, 0, 0, 1 ],
[ 2, 1, 0, 1 ]
]
> #HeilbronnMerel(29);
199
> #HeilbronnMerel(10007);
337977
> #HeilbronnCremona(10007); # in some cases these can be used...
67698
\end{verbatim}
We next compute a Hecke operator on the space $\sM_5(13,\eps)$ defined
above. We do not print the full Hecke operator out here,
since that would take too much space, but instead print
the factorization of its characteristic polynomial.
\begin{verbatim}{Hecke operators}
> T_2 := HeckeOperator(M,2);
> Nrows(T_2);
8
> T_2[1];
(zeta_4 + 16 -3/4 1/4 3/4 -3/4 0 2 -3/2)
> Factorization(CharacteristicPolynomial(T_2));
[
<$.1 - 16*zeta_4 - 1, 1>,
<$.1 - zeta_4 - 16, 1>,
<$.1^3 + (zeta_4 + 1)*$.1^2 - 23*zeta_4*$.1 - 29*zeta_4 + 29, 2>
]
\end{verbatim}
The characteristic polynomial has $2$ factors that appear
with multiplicity one, which correspond to Eisenstein series,
and a factor with multiplicity $2$, which corresponds
to the space of cusp forms.
\subsection{Subspaces}
The spaces $\sM_k(N,\eps)$ have many important subspaces.
MAGMA computes the cuspidal subspace $\sS_k(N,\eps)$ as
the kernel of a natural map to a space of {\em boundary
modular symbols}; this subspace corresponds is
isomorphic to $S_k(N,\eps)^{\oplus 2}$.
\begin{verbatim}{Cuspidal subspace}
> S := CuspidalSubspace(M); S;
Modular symbols space of level 13, weight 5, character eps, and
dimension 6 over Cyclotomic Field of order 4 and degree 2
> Factorization(CharacteristicPolynomial(HeckeOperator(S,2)));
[
<$.1^3 + (zeta_4 + 1)*$.1^2 - 23*zeta_4*$.1 - 29*zeta_4 + 29, 2>
]
\end{verbatim}
There are other interesting subspaces, such as the new and
old subspaces. The old subspace is the subspace generated
by the images of all maps from lower level, and the new subspace
is the kernel of all maps to lower level. In the following
example we compute the new subspace of
$\sM_2(33,1)$, where $1$ denotes the trivial character.
\begin{verbatim}{New subspace}
> M := ModularSymbols(33);
> M;
Full modular symbols space for Gamma_0(33) of weight 2 and
dimension 9 over Rational Field
> NewSubspace(M);
Modular symbols space for Gamma_0(33) of weight 2 and dimension 3
over Rational Field
\end{verbatim}
\subsection{Decomposition}
For many applications, the most important operation on spaces of
modular symbols is {\tt Decomposition}, which involves writing
$\sM_k(N,\eps)$ as a sum of spaces that cannot be split
further using Hecke operators of index coprime to the level
up to some bound $b$. Since the Hecke algebra is commutative,
each subspace is preserved by the Hecke operators.
\begin{verbatim}{Decomposition}
> M := ModularSymbols(33,2);
> Decomposition(M,2);
[
Modular symbols space for Gamma_0(33) of weight 2 and
dimension 3 over Rational Field,
Modular symbols space for Gamma_0(33) of weight 2 and
dimension 2 over Rational Field,
Modular symbols space for Gamma_0(33) of weight 2 and
dimension 4 over Rational Field
]
\end{verbatim}
The command {\tt HeckeBound} returns an integer~$b$, so
that {\tt Decomposition(M,c)} equals {\tt Decomposition(M,b)}
for all $c\geq b$.
\begin{verbatim}{Hecke bound}
> HeckeBound(M);
8
\end{verbatim}
\begin{remark}
I think that a careful complexity analysis of decomposition would
reveal that the complexity is at least $O((Nk)^6)$, the running time
being dominated by the factorization of characteristic polynomials
on a space of dimension $O(Nk)$. No such complexity analysis has
been done, as far as I know, except that Giesbrecht has given a
carefully analyzed algorithm for computing rational Jordan form,
which is a problem closely related to decomposing modular symbols
spaces.
\end{remark}
The precise algorithm used for decomposition in MAGMA was created and
implemented by Allan Steel, and I don't completely understand it, and
I don't think it's been published anywhere.
\section{Modular Forms}
\subsection{Definitions}
\begin{definition}[Modular Forms]
The finite-dimensional complex vector space
$
M_k(N,\eps)
$
of \defn{modular forms} of level~$N$, weight~$k$, and character~$\eps$ is
the set of holomorphic functions~$f$ on
$$
\h^* = \{z \in \C \,:\, \Im(z) > 0 \} \union \P^1(\Q)
$$
such
$$
f|[g]_k := \det(g)^{k-1} (cz+d) f(g(z)) = \eps(g) f,
$$
where $\eps(g) = \eps(a)$.
\end{definition}
A \defn{cusp form} is a modular form such that $f(\P^1(\Q)) = \{0\}$,
and we denote the subspace of cusp forms by $S_k(N,\eps)$.
Any $f\in M_k(N,\eps)$ has a representation
$$
f(z) = \sum_{n=0}^{\infty} a_n q^n, \qquad q(z) = e^{2\pi i z}.
$$
The Hecke operators $T_p$, for~$p$ prime, act on $M_k(N,\eps)$ by
$$
T_p(f) = \sum_{n=0}^{\infty} a_{np} q^n + \eps(p) p^{k-1} f(q^n),
$$
and there is a similar definition of $T_n$ for any~$n$.
\subsection{Computing Modular Forms Using MAGMA}
Given $N,k,\eps$, MAGMA can compute a basis of power series expensions
as above, modulo a power of~$q$.
One way to compute a basis for all cusp forms is to use
the {\tt qExpansionBasis} command, applied to the cuspidal
subspace of a space of modular symbols.
%\begin{example}
First we compute $S_2(13,\eps)$, where $\eps$ has
order~$6$. This space has dimension~$1$ over the
complex numbers.
\begin{verbatim}{Power Series}
> G := DirichletGroup(13,CyclotomicField(6));
> M := ModularSymbols(eps,2, +1);
> S := CuspidalSubspace(M);
> S;
Modular symbols space of level 13, weight 2, character eps, and
dimension 1 over Cyclotomic Field of order 6 and degree 2
> qExpansionBasis(S,4);
[
q + (-zeta_6 - 1)*q^2 + (2*zeta_6 - 2)*q^3 + O(q^4)
]
\end{verbatim}
The {\tt +1} in the {\tt ModularSymbols} command computes
the quotient $$\sM_k(N,\eps)/(*-1),$$ which is all that
is needed to compute $S_k(N,\eps)$, since
$\sM_2(13,\eps)/(*-1)\isom S_k(N,\eps) \oplus E_k(N,\eps)'$,
where $E_k(N,\eps)'$ is a certain subspace of the Eisenstein
space.
The following example has bigger dimension and there
are old forms.
\begin{verbatim}{Oldforms and expansions}
> M := ModularSymbols(33,2);
> S := CuspidalSubspace(M);
> qExpansionBasis(S,10);
[
q - q^5 - 2*q^6 + 2*q^7 - 2*q^8 - q^9 + O(q^10),
q^2 - q^4 - q^5 - q^6 + 2*q^7 - q^8 + q^9 + O(q^10),
q^3 - 2*q^6 - q^9 + O(q^10)
]
> qExpansionBasis(OldSubspace(S),10);
[
q - 2*q^2 + 2*q^4 + q^5 - 2*q^7 - 3*q^9 + O(q^10),
q^3 - 2*q^6 - q^9 + O(q^10)
]
> qExpansionBasis(NewSubspace(S),10);
[
q + q^2 - q^3 - q^4 - 2*q^5 - q^6 + 4*q^7 - 3*q^8 + q^9 +
O(q^10)
]
\end{verbatim}
In this example we compute a basis of $q$-expansion corresponding
to a simple factor of $S_2(389,1)$.
\begin{verbatim}{Basis of expansions}
> M := ModularSymbols(389,2, 1);
> S := CuspidalSubspace(M);
> D := Decomposition(S,2);
> V := D[3]; V;
Modular symbols space for Gamma_0(389) of weight 2 and dimension
3 over Rational Field
> qExpansionBasis(V,10);
[
q - q^5 - 2*q^6 - q^7 + 2*q^8 - q^9 + O(q^10),
q^2 - q^3 + O(q^10),
q^4 - q^5 - q^6 + q^9 + O(q^10)
]
> qEigenform(V,6); // eigenform in span of above q-expansions
q + a*q^2 - a*q^3 + (a^2 - 2)*q^4 + (-a^2 + 1)*q^5 + O(q^6)
> BaseRing(Modulus(Parent($1)));
Univariate Quotient Polynomial Algebra in a over Rational Field
with modulus a^3 - 4*a - 2
\end{verbatim}
%\end{example}
The {\tt qExpansionBasis} command does not work on the full space of
modular symbols, because the algorithm compute the $q$-expansions
using systems of Hecke eigenvalues on modular symbols (and
Atkin-Lehner-Li theory), and these do not determine the constant terms
of the $q$-expansions of Eisenstein series.
I wrote a package for computing with modular forms that makes no
direct reference to modular symbols, but which is mostly built on the
modular symbols machinery.
The command {\tt ModularForms(N,k,eps)} creates the
direct sum
$$
\bigoplus_{\text{$\Gal(\Qbar/\Q)$-conjugates }\eps'} M_k(N,\eps')
$$
where the sum is over all $\Gal(\Qbar/\Q)$-conjugates~$\eps'$ of~$\eps$.
This is a vector space over $\Q$, and even better, a free $\Z$-module.
\begin{remark}
{\bf WARNING.}
I think that defining {\tt ModularForms(N,k,eps)} this way was a
{\em bad design decision} (on my part!), and I should have defined
{\tt ModularForms(N,k,eps)} to be $M_k(N,\eps)$ as a
$\Q(\eps)$-vector space, and I intend to change this (while keeping
the old definition as an option). The advantage of the choice
I made is that, e.g., reduction modulo~$p$ make sense.
\end{remark}
\begin{definition}[Newform]
A \defn{newform} is an element $f\in S_k(N,\eps)$ that is in the kernel
of the maps to level properly dividing~$N$, is an eigenvector
for every Hecke operator, and is normalized so the coefficient of~$q$
is~$1$.
\end{definition}
One can compute Eisenstein series and a list of all newforms (gathered
together in $\Gal(\Qbar/\Q)$-conjugacy classes) using spaces of
modular forms using the {\tt Newforms} command.
In the following example we compute the two newforms in $M_{12}(1)$.
One newform is the Ramanajun $\Delta$ function, and the other is
the normalized Eisenstein series of weight~$12$.
\begin{verbatim}{Newforms}
> M := ModularForms(1,12);
> Newforms(M);
[* [*
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7
+ O(q^8)
*], [*
691/65520 + q + 2049*q^2 + 177148*q^3 + 4196353*q^4 +
48828126*q^5 + 362976252*q^6 + 1977326744*q^7 + O(q^8)
*] *]
\end{verbatim}
In the next example, we compute $S_2(23)$, which is spanned by
two conjugate eigenforms.
\begin{verbatim}{Conjugate eigenforms}
> M := ModularForms(23,2);
> S := CuspidalSubspace(M);
> S;
Space of modular forms on Gamma_0(23) of weight 2 and dimension 2
over Integer Ring.
> Newforms(S);
[* [*
q + a*q^2 + (-2*a - 1)*q^3 + (-a - 1)*q^4 + 2*a*q^5 + (a - 2)*q^6
+ (2*a + 2)*q^7 + O(q^8),
q + b*q^2 + (-2*b - 1)*q^3 + (-b - 1)*q^4 + 2*b*q^5 + (b - 2)*q^6
+ (2*b + 2)*q^7 + O(q^8)
*] *]
> Parent($1[1][1]);
Space of modular forms on Gamma_0(23) of weight 2 and dimension 2
over Number Field with defining polynomial x^2 + x - 1 over the
Rational Field.
\end{verbatim}
Listing all the conjugate newforms is somewhat silly, because they
all look identical; they are just defined over different copies
of the field generated by the Fourier coefficients. In particular,
adding the two newforms together is not defined in MAGMA (it
doesn't give the trace).
\begin{verbatim}{Arithmetic Problem}
> f := Newforms(S)[1][1]; g := Newforms(S)[1][2];
> f + g;
>> f + g;
^
Runtime error in '+': Arguments 1 and 2 have incompatible
coefficient rings.
\end{verbatim}
For many computations that really require arithmetic with
all the conjugates of a form, one should just embed the forms
in the complex numbers or a $p$-adic field, where $p$ split.
Computation of such embeddings is built in:
\begin{verbatim}{Embeddings}
> ComplexEmbeddings(f);
[* [*
q - 1.618033988749894848204586834365638117720*q^2 + [ truncated ... ]
q + 0.618033988749894848204586834365638117720*q^2 - [ truncated ...]
*] *]
> $1[1][1] + $1[1][2];
2*q - q^2 - q^4 - 2.0...*q^5 -
> pAdicEmbeddings(f,2);
[* [*
O(2^20) + (1 + O(2^20))*q + ((1 + O(2^20))*a + O(2^20))*q^2 + [ truncated ]
O(2^20) + (1 + O(2^20))*q + ((1 + O(2^20))*b + O(2^20))*q^2 + [ truncated ]
*] *]
> $1[1][1] + $1[1][2]; // since 2 doesn't split.
>> $1[1][1] + $1[1][2];
^
Runtime error in '+': Arguments 1 and 2 have incompatible
coefficient rings.
> pAdicEmbeddings(f,11);
[* [*
O(11^20) + (1 + O(11^20))*q + (273946294811098331671 + [ truncated ... ]
*], [*
O(11^20) + (1 + O(11^20))*q - (273946294811098331672 + [ truncated ... ]
*] *]
> $1[1][1] + $1[2][1];
O(11^20) + (2 + O(11^20))*q - (1 + O(11^20))*q^2 + [ truncated ... ]
\end{verbatim}
The output of the embedding commands are also modular forms,
so one can compute them to higher precision, etc.
Also one can reduce newforms to characteristic~$p$.
\begin{verbatim}{Reductions}
> Reductions(f,2);
[* [*
q + $.1*q^2 + q^3 + $.1^2*q^4 + $.1*q^6 + O(q^8),
q + $.1^2*q^2 + q^3 + $.1*q^4 + $.1^2*q^6 + O(q^8)
*] *]
> Reductions(f,11);
[* [*
q + 7*q^2 + 7*q^3 + 3*q^4 + 3*q^5 + 5*q^6 + 5*q^7 + O(q^8)
*], [*
q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + q^6 + 8*q^7 + O(q^8)
*] *]
> f11 := Reductions(f,11)[1][1];
> Type(f11);
ModFrmElt
> f11;
q + 7*q^2 + 7*q^3 + 3*q^4 + 3*q^5 + 5*q^6 + 5*q^7 + O(q^8)
> PowerSeries(f11,15);
q + 7*q^2 + 7*q^3 + 3*q^4 + 3*q^5 + 5*q^6 + 5*q^7 + 7*q^8 + 2*q^9
+ 10*q^10 + 4*q^11 + 10*q^12 + 3*q^13 + 2*q^14 + O(q^15)
\end{verbatim}
The following examples illustrates how {\tt ModularForms(N,k,eps)}
is (confusingly) defined to be the direct sum of spaces for the
conjugates of $\eps$.
\begin{verbatim}{Modular forms are over the integers}
> G := DirichletGroup(13, CyclotomicField(6));
> M := ModularForms(eps);
> BaseRing(M);
Integer Ring
> S := CuspidalSubspace(M);
> S;
Space of modular forms on Gamma_1(13) with character all
conjugates of [eps], weight 2, and dimension 2 over Integer Ring.
> Basis(S);
[
q - 4*q^3 - q^4 + 3*q^5 + 6*q^6 + O(q^8),
q^2 - 2*q^3 - q^4 + 2*q^5 + 2*q^6 + O(q^8)
]
\end{verbatim}
Recall from before though that the dimension of $S_2(13,\eps)$
as a $\Q(\zeta_6)$-vector space is $1$. However, there are two
$\Gal(\Qbar/\Q)$-conjugates:
\begin{verbatim}{Galois conjugates}
> Newforms(S);
[* [*
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),
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)
*] *]
\end{verbatim}
\section{Modular Abelian Varieties}
An abelian variety is a projective variety that is equipped with an
algebraic group structure. Since the variety is projective, the group
structure must be abelian. The abelian varieties of dimension~$1$ are
exactly the elliptic curves. Jacobians of curves of genus $>1$ are
examples of abelian varieties of dimension $>1$, and it is a theorem that
every abelian variety over an infinite field is a quotient of a Jacobian.
The modular Jacobians $J_1(N)$ are a special class of Jacobians that
are very well understood because of their connection with modular
forms. The abelian variety $J_1(N)$ is the Jacobian of the modular
curve $X_1(N)$, which over~$\C$ is the quotient of the extended
upper half plane $\h^*$ by
$$
\Gamma_1(N) = \left\{
\mtwo{a}{b}{c}{d}\in\SL_2(\Z) \, : \,
\mtwo{a}{b}{c}{d} \con \mtwo{1}{*}{0}{1}\pmod{N}
\right\}.
$$
\begin{definition}[Modular Abelian Variety]
An abelian variety~$A$ over a number field~$K$
is a \defn{modular abelian variety} of level~$N$
if it is a quotient of $J_1(N)$.
\end{definition}
There is an analogue of the Shimura-Taniyama-Weil conjecture for
abelian varieties. Over $\Q$, the simple modular abelian
varieties~$A$ are supposed to be the simple abelian varieties of
$\GL_2$-type, i.e., those whose endomorphism ring is an order in a
number field of degree $\dim(A)$. For more about this {\em open
conjecture}, see Ribet's beautiful paper {\em Abelian Varieties
over~$\Q$ and Modular Forms}.
The new quotient of $J_1(N)$ breaks up as a product $\prod A_f$
corresponding to the $\Gal(\Qbar/\Q)$-conjugacy classes of
newforms~$f$. The newform abelian varieties $A_f$ are simple abelian
varieties over~$\Q$ and the dimension of $A_f$ is the degree of the
field generated by the coefficients of~$f$. For example, the isogeny
classes of elliptic curves over~$\Q$ are in bijection with the
$A_f$ with $f\in\Z[[q]]$.
I wrote a MAGMA package for doing fairly general computations with
modular abelian varieties, which builds on the modular symbols
machinery described earlier in this paper. Also, there are many
functions that take spaces of modular symbols as input, and compute
some quantity associated to the corresponding modular abelian
varieties. I've used this code mainly for investigations into
visibility of Shafarevich-Tate groups.
Here is a list of some items that one one wants to compute about
modular abelian variety over~$\Q$:
\begin{enumerate}
\item (*) The {\em modular degree}, i.e., the square root of the
degree of the natural map $A\to A^{\vee}$ induced by virtual of $A$
being modular.
\item Defining equations for $A$.
\item (*) The Birch and Swinnerton-Dyer quotient $L(A,1)/\Omega_A$.
\item\label{anrank} (*?) The order of vanishing $r=\ord_{s=1} L(A,s)$ and leading coefficient $L^{r}(A,1)/r!$
of the expansion of $L(A,s)$ about $s=1$.
\item\label{mordell-weil} The Mordell-Weil group of $A$ and the regulator $\Reg_A$.
\item\label{padic} The $p$-adic $L$-functions attached to $A$.
\item (*?) The Tamagawa numbers $c_p$ of $A$.
\item (*?) The torsion subgroup $A(\Q)_{\tor}$.
\item (*) The intersection $A\cap B$, where $A,B\subset J$.
\item (*) Whether $A$ is isomorphic to $A^{\vee}$, and more
generally the minimal degree of a homomorphism $A \to A^{\vee}$.
\item (?) Enumeration of the isogeny class of $A$ over~$\Q$.
(Perhaps via images of $A$ under natural maps into other modular Jacobians,
and quotients of~$A$ by carefully chosen finite subgroups.)
\end{enumerate}
My impression is that even for elliptic curves, unfortunately nobody
has any clue about how to {\em provably} compute $r=\ord_{s=1} L(A,s)$
when $r>3$; however, if we don't care about provable correctness, then
computing~$r$ is straightforward (see, e.g., Cremona's book). Except
for (\ref{anrank}), algorithms to solve the above problems are in
reasonable shape when $\dim(A)=1$, and would all provably terminate if
we knew finiteness of $\Sha(A)$. So far the situation for modular
abelian varieties isn't nearly as complete. The items in the above
list indicated with a (*) are at least partially implemented in MAGMA
for simple modular abelian varieties.
Substantial work has been done on finding defining equations when
$\dim(A)$ is small and $A = \Jac(X)$ for some curve~$X$, e.g., by the
researchers in Essen. The paper {\em Empirical evidence for the
{B}irch and {S}winnerton-{D}yer conjectures for modular {J}acobians
of genus 2 curves} then discussed methods for computing such an~$A$
when $X$ has genus~$2$, along with the Cassels-Flynn book and many
other papers. In contrast to this trend, my approach has been to
compute as much as possible about~$A$ without writing down defining
questions; instead I exploit the special structure coming from the
modularity of~$A$. Regarding (\ref{mordell-weil}), computing the
regulator and Mordell-Weil group seems to require having defining
equations. For (\ref{padic}) Robert Pollack could likely do much
about adding computation of $p$-adic $L$-functions of abelian
varieties to MAGMA.
I found the algorithm for computing component groups and Tamagawa
numbers. It computes the order of the component group at primes~$p$
such that $A_f$ has multiplicative reduction and $A_f$ is a quotient
of $J_0(N)$. In all cases it can find the Tamagawa number up to a
power of~$2$, and in many cases it can also find the Tamagawa number.
The reason it doesn't find the Tamagawa number in all cases is because
the algorithm finds the order of the group, not its group structure,
and the Tamagawa number is either the order of the group or the order
of the $2$-torsion subgroup. When the level is not prime, this
algorithm relies on David Kohel's MAGMA package for computing with
ideal classes in an Eichler order in a quaternion algebra, which is
unfortunately the main code that my modular forms code depends on that
I don't understand. It was what got me into using MAGMA in the first
place.
When $A$ is simple, I implemented an algorithm in MAGMA for computing
the exact endomorphism ring of~$A$. Then computing the minimal degree
of any homomorphism $A\to A^{\vee}$ can be reduced to finding all
solutions to a diophantine norm equation, up to units. Fortunately
MAGMA contains code for solving norm equations. This summer Tseno
Tselkov did a project with me, in which he implemented an algorithm to
find the minimal degree of an isogeny between $A_f$ and $A_f^{\vee}$
(which is not yet in the standard MAGMA distribution). Very
surprisingly, in all the data he computed, when $f\in
S_2(\Gamma_0(N))$, the minimal degree is a power of~$2$. This is
hopefully the first step toward an algorithm to enumerate every
element of the isogeny class of any $A_f$.
\subsection{Modular Abelian Varieties and Modular Symbols}
The following examples illustrate computation of most of the starred
items in the list above. In each case we create a simple space~$V$ of
modular symbols; associated to $V$ there is a newform~$f$, and
associated to~$f$ there is an abelian variety $A_f$, which in the
examples is an optimal quotient of $J_0(N)$. The space of modular
symbols ``is'' the homology of $A_f$, which is a rich object equipped
with structure coming from the modularity of $A_f$. For example, the
homology has a Hecke action.
In the first example, we compute with simple factors of $J_0(389)$
using commands applied to spaces of modular symbols (note that $389$
is prime). In
Section~\ref{sec:modabvarpackage} we will do the same computations but
using the modular abelian varieties package, which provides a nicer
wrapper around these functions (and adds other things that are not
possible using just modular symbols). However, to most effectively
use MAGMA, it is best to know about both ways of doing these
computations.
\begin{verbatim}{Modular abelian varieties via modular symbols}
> M := ModularSymbols(389);
> S := CuspidalSubspace(M);
> D := NewformDecomposition(S);
> [Dimension(A)/2 : A in D]; // dimensions of abvars A_f
[ 1, 2, 3, 6, 20 ]
> [ModularDegree(D[i]) : i in [1..#D]];
[ 40, 144, 992, 17856, 20480 ]
> [LRatio(D[i],1) : i in [1..#D]]; // BSD Ratios L(A_f,1)/Omega
[ 0, 0, 0, 0, 51200/97 ]
> Factorization(51200);
[ <2, 11>, <5, 2> ]
> LSeriesLeadingCoefficient(D[1],1,100);
0.75931650029224679065762600319 2
> E := EllipticCurve(A); AnalyticRank(E); // Watkin's new code
2 0.7593000000
> LSeriesLeadingCoefficient(D[2],1,100);
1.487184621319346836916654326667 1
> TamagawaNumber(D[1],389); // c_{389} = 1 for elliptic curve
1
> TamagawaNumber(D[5],389); // c_{389} = 97 for 20-dim quotient
97
> TorsionBound(D[5],13); // multiple of order of torsion
97
> #RationalCuspidalSubgroup(D[5]); // divisor of order of torsion
97
> Invariants(IntersectionGroup(D[1],D[2]));
[ 2, 2 ]
> Invariants(IntersectionGroup(D[1],D[5]));
[ 20, 20 ]
\end{verbatim}
\begin{remark}
If $E$ is the elliptic curve factor and $A$ is the $20$-dimensional
factor, then the above computation, the BSD conjecture, and
visibility theory imply
that $\Sha(A) = 5^2 \cdot 2^?$ and
$$(\Z/5\Z)^2 \isom E(\Q)/5 E(\Q)\subset \Sha(A).$$
\end{remark}
\subsection{The Modular Abelian Varieties Package}
\label{sec:modabvarpackage}
Given a Dirichlet character $\eps$ of modulus $N$, there is an abelian
variety $J(N,\eps)$ whose rational homology corresponds to
$\sS_2(N,\eps)$ viewed as a $\Q$-vector space; thus $J(N,\eps)$ is an
abelian variety over $\Q$ (not $\Q(\eps)$!) that is isogenous to a
product of abelian varieties $A_f$ attached to the
$\Gal(\Qbar/\Q)$-conjugacy classes of newforms of level dividing $N$
with character~$\eps$.
If $A\subset J(N,\eps)$ is an abelian subvariety, then
the image of $\H_1(A,\Q)$ in $\sS_2(N,\eps)$ is a vector
subspace $V_A$, and $A$ is determined by $V_A$.
An \defn{explicitly given modular abelian variety} is a modular
abelian variety $B$ that is specified by giving
a vector subspace $V \subset \sS_2(N,\eps)$ that
corresponds to an abelian variety $A\subset J(N,\eps)$
and a finite subgroup $G\subset A$. Then $B\isom A/G$.
Every modular abelian variety can be specified in this
way, though it can be a highly nontrivial problem
to figure out how. For example, Jaocbians of Shimura curves
are modular abelian varieties, but determining them explicitly
in terms of abelian varieties $J(N,\eps)$ is nontrivial
(see e.g. David Helm's Ph.D. thesis for more).
MAGMA includes a package for computing with explicitly given modular
abelian varieties. The following code illustrates the computations
that we did above, but instead uses the modular abelian varieties
package:
\begin{verbatim}{Modular abelian varieties package}
> J := JZero(389); J;
Modular abelian variety JZero(389) of dimension 32 and level 389
over Q
> D := Decomposition(J);
> [Dimension(A) : A in D];
[ 1, 2, 3, 6, 20 ]
> [ModularDegree(A) : A in D];
[ 40, 144, 992, 17856, 20480 ]
> [LRatio(A,1) : A in D];
[ 0, 0, 0, 0, 51200/97 ]
> L := LSeries(D[1]); L;
L(389A,s): L-series of Modular abelian variety 389A of dimension
1, level 389 and conductor 389 over Q
> LeadingCoefficient(L,1,200);
0.75931650029224679065762600319 2
> TamagawaNumber(D[1],389);
1 1 true
> TamagawaNumber(D[5],389);
97 97 true
> TorsionLowerBound(D[5]);
97
> TorsionMultiple(D[5]);
97
> G := RationalCuspidalSubgroup(D[5]); G;
Finitely generated subgroup ... with invariants [ 97 ]
> B := D[5]/G; B; // quotients by anything are defined.
Modular abelian variety of dimension 20 and level 389 over Q
> H := D[1] meet D[5]; // takes a while
> H;
Finitely generated subgroup ... with invariants [ 20, 20 ]
\end{verbatim}
\begin{remark}
I found (trivial-to-fix) bugs in my implementation of {\tt
ModularDegree} and {\tt LeadingCoefficient} functions while
preparing this talk; if you try the above example in MAGMA V2.11-6
you will get the wrong answers. I'll upload a fix right after this
conference.
\end{remark}
The modular abelian varieties package allows for creation of much more
general abelian varieties than the modular symbols package; for
example, it supports arbitrary finite direct sums and quotients by
finite subgroups. Also, it includes explicit computation of endomorphism
rings and hom rings over $\Q$.
\begin{verbatim}{Computation of End}
> J := JZero(22);
> [Matrix(phi) : phi in Basis(End(J))];
...
\end{verbatim}
This gives the following four matrices as generators:
$$
\left(\begin{matrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{matrix}\right),\quad
\left(\begin{matrix}
0 & 1 & 0 & 1 \\
0 & 0 & 0 & 0 \\
1 & 0 & 1 & -1 \\
0 & 1 & 0 & 1 \end{matrix}\right),
$$
$$
\left(\begin{matrix}
0 & 1 & 0 & -1 \\
0 & 1 & 0 & 0 \\
-1 & 2 & -1 & 1 \\
-1 & 1 & 0 & 0 &
\end{matrix}\right),\quad
\left(\begin{matrix}
0 & 1 & -2 & 1 \\
-1 & 2 & -1 & 0 \\
-1 & 0 & 1 & -1 \\
0 & -1 & 1 & -1
\end{matrix}\right).
$$
Also one can do new computations with endomorphism rings. For example, the following
is a table of the index of the Hecke algebra in its saturation in $\End(J_0(N))$, which
is a quantity that controls the relation between the modular degree and congruences
modular degree degrees (the ``congruence modulus''):
\begin{verbatim}{Index of Hecke Algebra in Saturation}
> function f(N)
J := JZero(N);
T := HeckeAlgebra(J);
return Index(Saturation(T),T);
end function;
> for N in [1..120] do print N, f(N); end for;
...
\end{verbatim}
This results in the following table:
\begin{center}
\begin{tabular}{|r|c|}\hline$N$ & $f(N)$\\\hline
1&1\\
2&1\\
3&1\\
4&1\\
5&1\\
6&1\\
7&1\\
8&1\\
9&1\\
10&1\\
11&1\\
12&1\\
13&1\\
14&1\\
15&1\\
16&1\\
17&1\\
18&1\\
19&1\\
20&1\\
\hline\end{tabular}
\begin{tabular}{|r|c|}\hline$N$ & $f(N)$\\\hline
21&1\\
22&1\\
23&1\\
24&1\\
25&1\\
26&1\\
27&1\\
28&1\\
29&1\\
30&1\\
31&1\\
32&1\\
33&1\\
34&1\\
35&1\\
36&1\\
37&1\\
38&1\\
39&1\\
40&1\\
\hline\end{tabular}
\begin{tabular}{|r|c|}\hline$N$ & $f(N)$\\\hline
41&1\\
42&1\\
43&1\\
44&2\\
45&1\\
46&2\\
47&1\\
48&1\\
49&1\\
50&1\\
51&1\\
52&1\\
53&1\\
54&3\\
55&1\\
56&2\\
57&1\\
58&1\\
59&1\\
60&2\\
\hline\end{tabular}
\begin{tabular}{|r|c|}\hline$N$ & $f(N)$\\\hline
61&1\\
62&2\\
63&1\\
64&2\\
65&1\\
66&1\\
67&1\\
68&2\\
69&1\\
70&1\\
71&1\\
72&2\\
73&1\\
74&1\\
75&1\\
76&2\\
77&1\\
78&2\\
79&1\\
80&4\\
\hline\end{tabular}
\begin{tabular}{|r|c|}\hline$N$ & $f(N)$\\\hline
81&1\\
82&1\\
83&1\\
84&2\\
85&1\\
86&1\\
87&1\\
88&8\\
89&1\\
90&1\\
91&1\\
92&16\\
93&1\\
94&4\\
95&1\\
96&8\\
97&1\\
98&1\\
99&9\\
100&1\\\hline
\end{tabular}
% \begin{tabular}{|r|c|}\hline$N$ & $f(N)$\\\hline
% 101&1\\
% 102&1\\
% 103&1\\
% 104&4\\
% 105&1\\
% 106&1\\
% 107&1\\
% 108&54\\
% 109&1\\
% 110&2\\
% 111&1\\
% 112&8\\
% 113&1\\
% 114&1\\
% 115&1\\
% 116&4\\
% 117&1\\
% 118&2\\
% 119&1\\
% 120&32\\\hline
% \end{tabular}
\end{center}
This table suggests that if $p\mid f(N)$ is a prime, then $p^2\mid
4\cdot N$, a fact closely related to what Ken Ribet proved at the
Raynaud birthday conference in Orsay a few years ago. Also, Mazur
proved that $f(p)=1$ when $p$ is prime.
\subsection{Three Open Problems}
I'd like to finish with three open problems whose solution is needed
in order to have a good theory for computing with modular abelian
varieties over number fields.
\begin{openproblem}
Suppose $A$ and $B$ are explicitly given modular abelian varieties.
Decide whether two explicitly given modular abelian varieties are
isomorphic. (I think I know how to do this unless some simple
factor occurs with multiplicity bigger than $1$ in the isogeny
decomposition of both $A$ and $B$.)
\end{openproblem}
\begin{openproblem}
Find an efficient way to compute the endomorphism ring
$\End(A_f/K)$, for any number field $K$.
\end{openproblem}
By explicit, we mean give generators as a subgroup of
$\End(\H_1(A,\Z))$. This ring can be computed using the Ribet-Shimura
theory of inner twists, but the formulas they give translated to
modular symbols are very slow; one needs a formula involving only
Manin symbols.
\begin{openproblem}
Suppose $A$ is an abelian variety over a number field $K$, that we
have explicit generators for $\End(A)$, and that $A$ is isogenous to
a power $B^n$ of a simple abelian variety~$B$. Determine $A$ and
find an explicit isogeny between $A$ and $B^n$.
\end{openproblem}
I will say more about modular abelian varieties in the context
of the Birch and Swinnerton-Dyer conjecture in my lecture on Thursday
morning at 10:00am.
%There are specific algorithms for computing the presentation for
%$\sM_k(N,\eps)$ in certain special cases that are better
\end{document}