Author: William A. Stein
Compute Environment: Ubuntu 18.04 (Deprecated)
1\chapter{Modular algorithms}
2\label{chap:computing}
3\section{Computing the space of modular symbols}
4\begin{definition}
5Let~$W$ be a subspace of a finite-dimensional vector space~$V$.
6To \defn{compute} the quotient $V/W$ means to
7give a matrix representing the projection $V\ra V/W$, with
8respect to some basis for~$V$ and some basis~$B$ for $V/W$, along with
9a lift to~$V$ of each element of~$B$.
10\end{definition}
11In other words, to compute $V/W$ means to create a
12reduction function that assigns
13to each element of~$V$ its canonical representative
14on the free basis''~$B$.%, modulo the relations~$W$.
15
16Let~$N$ be a positive integer, fix a mod~$N$ Dirichlet
17character~$\eps$, let $K:=\Q[\eps]$ be the smallest extension
18containing the values of~$\eps$, and  let $\O:=\Z[\eps]$.
19
20\begin{algorithm}\label{alg:MkNK}
21Given a positive integer~$N$, a Dirichlet character~$\eps$,
22and an integer $k\geq 2$
23this algorithm computes $\sM_k(N,\eps;K)$.
24It uses the Manin-symbols description of $\sM_k(N,\eps;K)$ given
25in Theorem~\ref{thm:maninsymbols}.
26We compute the quotient presentation of Theorem~\ref{thm:maninsymbols}
27in three steps.
28\begin{enumerate}
29\item Let $V_1$ be the finite-dimensional $K$-vector space
30generated by the Manin symbols
31$[X^iY^{k-2-i}, (u,v)]$
32for $i=0,\ldots, k-2$ and $0\leq u,v < N$ with $\gcd(u,v,N)=1$.
33Let~$W_1$ be the subspace of~$V_1$ generated by all differences
34$$[X^iY^{k-2-i}, (\lambda u,\lambda v)] - 35\eps(\lambda)[X^iY^{k-2-i}, (u, v)].$$
36Because all relations are two-term, it
37is easy to compute $V_2:=V_1/W_1$.
38In computing this quotient, we do not have to
39explicitly compute the {\em large} matrix representing
40the linear map $V_1\ra V_2$, as it can be replaced by a suitable
41reduction procedure'' involving algebra over
42$\Z/N\Z$.
43\item
44Let~$\sigma$ act on Manin symbols as in Section~\ref{sec:maninsymbols}; thus
45$$[X^iY^{k-2-i}, (u, v)]\sigma = (-1)^i[Y^iX^{k-2-i}, (v,-u)].$$
46Let~$W_2$ be the subspace of~$V_2$ generated by the sums
47$x + x\sigma$ for $x\in V_2$.
48Because all relations are two-term relations, it is
49easy to compute $V_3 := V_2/W_2$.
50\item Let~$\tau$ act on Manin symbols as in
51Section~\ref{sec:maninsymbols};
52thus
53$$[X^iY^{k-2-i}, (u, v)]\tau = 54 [(-Y)^i(X-Y)^{k-2-i}, (v,-u-v)].$$
55Note that the symbol on the right can be written as a sum
56of generating Manin symbols.
57Let~$W_3$ be the subspace of~$V_3$ generated by the sums
58$x + x\tau + x\tau^2$
59where~$x$ varies over the images of a basis of~$V_2$
60({\em not} just a basis for $V_3$!).
61Using some form of Gauss elimination, we compute $V_3/W_3$;
62we then have $\sM_k(N,\eps;K)\ncisom V_3/W_3$.
63\end{enumerate}
64\end{algorithm}
65\begin{proof}
66For $\lambda \in (\Z/N\Z)^*$, denote by $\langle \lambda \rangle$ the right
67action of~$\lambda$ on Manin symbols; thus
68   $$[X^iY^{k-2-i}, (u,v)]\langle \lambda \rangle 69 = [X^iY^{k-2-i}, (\lambda{}u,\lambda{}v)].$$
70By Theorem~\ref{thm:maninsymbols} the space $\sM_k(N,\eps;K)$ is isomorphic
71to the quotient of the vector spaces~$V_1$ of Step~1 modulo the relations
72$x+x\sigma=0$, $x+x\tau+x\tau^2=0$, and $x\langle \lambda \rangle=\lambda x$
73as~$x$ varies over all Manin symbols and~$\lambda$ varies over $(\Z/N\Z)^*$.
74
75As motivation, we note that a naive
76computation of $V_1$ modulo the $\sigma$, $\tau$, and
77$\langle \lambda\rangle$ relations using Gauss elimination
78is far too inefficient.  This is why we compute the
79quotient in three steps.  The complexity of Steps~1 and
80Steps~2 are negligible. The difficulty occurs in Step~3;
81at least the relations of this step occur in a space of dimension much
82smaller than that of~$V_1$.
83
84To see that the algorithm is correct, it is necessary only to observe
85that $\sigma$ and $\tau$ both commute with all diamond-bracket operators
86$\langle \lambda \rangle$; this is an immediate consequence of the
87above formulas.  We remark that in Step~3 it is in
88general {\em necessary} to compute the quotient
89by all relations $x + x\tau + x\tau^2$ with~$x$ the image of a basis
90vector for $V_2$ instead
91of just~$x$ in~$V_3$ because~$\sigma$ and~$\tau$ do not commute.
92\end{proof}
93
94\begin{remark}
95In implementing the above algorithm, the reader should take care
96in Steps~1 and~2 because the relations can together force certain
97of the Manin symbols to equal~$0$.
98For example, there might be relations of the form $x_1+x_2=0$ and
99$x_1-x_2=0$ which together force $x_1=x_2=0$.
100\end{remark}
101
102\begin{remark}
103To compute the~$+1$ quotient
104$\sM_k(N,\eps;K)^{+}$, it
105is necessary to modify Step~2 of Algorithm~\ref{alg:MkNK}
106by including in~$W_2$ the differences $x - x I$
107where $I=\abcd{-1}{0}{\hfill 0}{1}$, and
108$$[X^iY^{k-2-i}, (u,v)] I 109 = (-1)^i[X^iY^{k-2-i}, (-u,v)].$$
110Likewise, to compute the $-1$ quotient we include the sums $x + x I.$
111Note, as in the remarks in the proof of Algorithm~\ref{alg:MkNK},
112we can not add in the~$I$ relations in Step~1 because~$I$ and~$\sigma$
113do not commute.
114\end{remark}
115
116
117\begin{algorithm}\label{alg:MkNO}
118Given a positive integer~$N$, a Dirichlet character~$\eps$,
119and an integer $k\geq 2$,
120this algorithm computes the $\O$-modules $\sM_k(N,\eps)$
121and $\sS_k(N,\eps)$.
122\begin{enumerate}
123\item Using Algorithm~\ref{alg:MkNK}
124compute the $K$-vector space $V:=\sM_k(N,\eps;K)$.
125\item Compute the $\O$-lattice~$L$ in~$V$ generated
126by the classes of the finitely many symbols $[X^iY^{k-2-i}, (u,v)]$
127for $i=0,\ldots, k-2$ and $0\leq u,v < N$ with $\gcd(u,v,N)=1$.
128It is only necessary to take one symbol in each
129$\eps$-equivalence class, so there are
130$(k-2+1)\cdot\#\P^1(\Z/N\Z)$ generating symbols.
131This computes $\sM_k(N,\eps)$ which equals~$L$.
132\item To compute the submodule $\sS_k(N,\eps)$ of~$L$, we use
133the algorithm of Section~\ref{sec:computeboundary}
134to compute the
135boundary map $\delta:\sM_k(N,\eps;K)\ra B_k(N,\eps;K)$.
136Then $\sS_k(N,\eps)$ is the kernel of~$\delta$ restricted
137to the lattice~$L$.
138\end{enumerate}
139
140\end{algorithm}
141
142As a check, using the formulas of Section~\ref{sec:dimensionformulas},
143we compute the dimension of the space $S_k(N,\eps)$ of cusp
144forms and compare with the dimension of $\sS_k(N,\eps;K)$
145computed in Algorithm~\ref{alg:MkNO}.
146
147\begin{remark}
148[[To be removed.]] I have not thought through how to perform
149Steps 2 or 3 in case $\O\neq\Z$.
150In particular, I do not know how to compute
151the $\O$-module kernel of~$\delta$,
152except using a silly algorithm that reduces everything to working
153over~$\Z$.
154\end{remark}
155
156
157\section{Computing the Hecke algebra}
158\label{sec:computinghecke}
159
160In this chapter we give a formula for the dimension of
161$S_k(\Gamma_1(N),\eps)$ and an upper bound on the number
162of Hecke operators needed to generate the Hecke algebra
163as a $\Z$-module.  We obtain the dimension formula by specializing
164Hijikata's generalization of the Eichler-Selberg trace formula
165to the case of the identity operator, and the bound on Hecke operators is obtained application of~\cite{sturm:cong}.
166
167Let~$\Gamma$ be a subgroup of $\SL_2(\Z)$ that contains
168$\Gamma_1(N)$ for some~$N$.
169Let $M_k(\Gamma)$ be the space of weight-$k$ modular
170forms for~$\Gamma$, and let $\T\subset\End(M_k(\Gamma))$
171be the corresponding Hecke algebra.
172This section contains a bound~$r$ such that
173the Hecke operators~$T_n$, with $n\leq r$, generate~$\T$ as
174a $\Z$-module.
175This result was suggested to the author by
176Ribet and Agash\'e.
177
178
179For any subring~$R$ of~$\C$,
180denote by $M_k(\Gamma;R)$ the space of modular forms
181for~$\Gamma$ with Fourier coefficients in~$R$.
182The following proposition is well-known.
183\begin{proposition}\label{prop:perfectpair}
184For any ring~$R$, there is a perfect pairing
185$$\T_R\tensor_RM_k(N;R) \ra R,\qquad (T,f)\mapsto a_1(Tf),$$
186where $\T_R = \T\tensor_{\Z} R$.
187We have $(T_n,f)=a_n(f)$ where $T_n$ is the $n$th Hecke operator.
188\end{proposition}
189
190Let~$\mu$ denote the index of~$\Gamma$ in $\sltwoz$.
191\begin{theorem}[Sturm]
192\label{thm:sturm}
193Let~$\lambda$ be a prime ideal in the ring~$\O$
194of integers in some number field.
195If $f\in M_k(\Gamma;\O)$
196satisfies $a_n(f)\con 0\pmod{\lambda}$
197for $n\leq \frac{k}{12}\mu$, then $f\con 0\pmod{\lambda}$.
198\end{theorem}
199\begin{proof}
200Theorem 1 of \cite{sturm:cong}.
201\end{proof}
202Denote by $\lceil{}x\rceil$ the smallest integer $\geq x$.
203\begin{proposition}\label{prop:determine}
204If $f\in M_k(\Gamma)$ satisfies
205 $a_n(f)=0$ for
206 $n\leq r=\left\lceil\frac{k}{12}\mu\right\rceil$,
207then $f=0$.
208\end{proposition}
209\begin{proof}
210We must show that the composite map
211$M_k(\Gamma)\hookrightarrow\C[[q]]\into\C[[q]]/(q^{r+1})$
212is injective.  Because~$\C$ is a flat $\Z$-module and
213$M_k(\Gamma;\Z)\tensor\C = M_k(\Gamma)$, it suffices
214to show that the map $F:M_k(\Gamma;\Z)\into\Z[[q]]/(q^{r+1})$ is injective.
215Suppose $F(f)=0$, and let~$p$ be a prime number.
216Then $a_n(f)=0$ for $n\leq r$, hence plainly
217$a_n(f)\con 0\pmod{p}$ for any such~$n$.
218Theorem~\ref{thm:sturm} implies that $f\con 0\pmod{p}$.
219Duplicating this argument shows that the coefficients
220of~$f$ are divisible by all primes~$p$, so they are~$0$.
221\end{proof}
222
223\begin{theorem}\label{thm:bound}
224As a $\Z$-module, $\T$ is generated by $T_1,\ldots,T_r$,
225where $r=\lceil \frac{k}{12}\mu \rceil$.
226\end{theorem}
227\begin{proof}
228Let~$Z$ be the submodule of~$\T$ generated by
229$T_1,T_2,\ldots,T_r$.  Consider the exact sequence of
231  $0\into Z \xrightarrow{\,i\,} \T \into \T/Z \into 0.$
232Let~$p$ be a prime and tensor this sequence with~$\F_p$ to obtain
233the exact sequence
234  $$Z\tensor \F_p\xrightarrow{\,\overline{i}\,} 235 \T\tensor\F_p \into (\T/Z)\tensor\F_p\into 0.$$
236Put $R=\Fp$ in Proposition~\ref{prop:perfectpair}, and suppose that
237$f\in M_k(N,\Fp)$ pairs to~$0$ with each of $T_1,\ldots, T_r$.
238Then by Proposition~\ref{prop:perfectpair}, $a_m(f)=a_1(T_m f)=0$ in
239$\Fp$ for each~$m$, $1\leq m\leq r$.  Theorem~\ref{thm:sturm}
240then asserts that $f = 0$. Thus the pairing, when restricted
241to the image of $Z\tensor\Fp$ in $\T\tensor\Fp$, is also perfect.  Thus
242$\dim_{\Fp} \overline{i}(Z\tensor\Fp) 243 = \dim_{\Fp} M_k(N,\Fp)= \dim_{\Fp} \T\tensor\Fp,$
244so $(\T/Z) \tensor \F_p = 0$; repeating this argument for
245all~$p$ shows that $\T/Z=0$.
246\end{proof}
247
248% dirichlet.tex
249\section{Representing and enumerating Dirichlet characters}
250A Dirichlet character is a homomorphism
251$\eps:(\Z/N\Z)^*\ra \C^*$.  We have the
252following lemma, whose proof is well-known.
253\begin{lemma}
254If~$p$ is an odd prime, then $(\Z/p^n\Z)^*$ is a cyclic group.
255The group $(\Z/2^n\Z)^*$ is generated by~$-1$ and~$5$.
256\end{lemma}
257It is necessary to agree upon a representation of Dirichlet characters.
258Factor~$N$ as a product of prime powers:  $N=\prod_{i=1}^r p_i^{e_i}$ with
259$p_i < p_{i+1}$ and each $e_i>0$; then
260$(\Z/N\Z)^* \isom \prod_{i=1}^r (\Z/p_i^{e_i}\Z)^*$.
261If $p_i$ is odd then the lemma implies that $(\Z/p_i^{e_i}\Z)^*$ is cyclic.
262If $p_1=2$, then $(\Z/p_1^{e_1}\Z)^*$ is a product
263$\langle -1 \rangle \cross \langle 5 \rangle$
264of two cyclic groups, both possibly trivial.
265For each~$i$, we let $a_i$ be the smallest generator of
266the $i$th factor $(\Z/p_i^{e_i}\Z)^*$.  If $p_1=2$, let $a_1$ and $a_2$
267correspond to the two factors $\langle -1 \rangle$ and
268$\langle 5 \rangle$, respectively; then $a_3$ corresponds to $p_2$, etc.
269Here~$a_i$ is smallest in the
270sense that the minimal lift $\tilde{a}_i\in\Z_{>0}$ is smallest.
271Let~$n$ be the exponent of $(\Z/N\Z)^*$, and
272let $\zeta=e^{2\pi i /n}\in \C^*$.
273To give~$\eps$ is the same as giving the images of each generator
274of~$a_i$ as a power of~$\zeta$.  We thus represent~$\eps$ as
275a matrix with respect to a canonically chosen, but unnatural,
276basis.
277
278The matrix representing a character~$\eps$ can be viewed as a vector with~$r$
279entries in $\Z/n\Z$, where~$m$ is the exponent of $(\Z/N\Z)^*$.
280Such a vector represents a character if and only if the $i$th component
281of the vector has additive order
282dividing $\vphi(p_i^{e_i})$.  If $p_1=2$, then
283there are $r+1$ entries instead of~$r$ entries, and the condition
284is suitably modified.
285If a vector $v=[d_1,\ldots,d_r]$ represents a character~$\eps$,
286then each of the Galois conjugate characters is represented
287by $[md_1,\ldots,md_r]$ where~$m$ runs over $(\Z/n\Z)^*$.
288
289When performing actual machine computations, we work in the smallest
290field that contains all of the values of~$\eps$.
291Thus if $d=\gcd(d_1,\ldots,d_r,n)$, then we work in the subfield
292$\Q(\zeta^d)$, which is cheaper than working in $\Q(\zeta)$.
293
294It is sometimes important to work in characteristic~$\ell$.
295Then the notation is as above, except~$\zeta$ is replaced by a
296primitive $n'$th root of unity, where~$n'$ is the prime-to-$\ell$
297part of~$n$.   Note that the primitive
298$n$th roots of unity in characteristic~$\ell$ need not be conjugate;
299for example, both~$2$ and~$3$ are square roots of~$-1$ in $\F_5$, but
300they are not conjugate.  Thus we must specify~$\zeta$ as part
301of the notation when giving a mod~$\ell$ Dirichlet character.
302
303%In all cases, we extend~$\eps$ to a set-theoretic
304%mapping from~$\Z$ by setting $\eps(x)=0$ if $\gcd(x,N)\neq 1$.
305
306\begin{example}
307Suppose~$p$ is an odd prime.
308The group of mod~$p$ Dirichlet characters is isomorphic to
309$\Z/(p-1)\Z$, and two characters~$a$ and~$b$ are Galois
310conjugate if and only if there is an element $x\in(\Z/(p-1)\Z)^*$
311such that $xa=b$.
312A character is determined up to Galois conjugacy by its order,
313so the classes of mod~$p$ Dirichlet characters are
314in bijection with the divisors~$d$ of $p-1=\#(\Z/p\Z)^*$.
315
316The quadratic mod~$p$ character is denoted $[(p-1)/2]$.
317We denote the quadratic mod~$2p$ character by
318$[0,0,(p-1)/2]$; the quadratic mod~$4p$ character is denoted
319$[(p-1)/2,0,(p-1)/2]$.  If $n\geq 2$, then the nontrivial
320mod~$2^n$ character that factors through $(\Z/4\Z)^*$ is denoted
321$[(2^{n-2}-1)/2,0]$.
322\end{example}
323
324
325\section{The dimension of $S_k(N,\eps)$}
326\label{sec:dimensionformulas}
327Explicit formulas for $\dim S_k(\Gamma)$,
328with~$\Gamma$ a congruence subgroup, were given by
329Shimura in \cite[Thms.~2.23--2.25]{shimura:intro}. I don't know
330if these methods generalize to give a formula for
331$\dim S_k(N,\eps)$.  However, an extremely tedious specialization of
332Hijikata's trace formula (see \cite{hijikata:trace}) to the case $n=1$
333yields an explicit formula for $\tr(T_1)=\dim S_k(N,\eps)$; source
334code is available from the author.
335
336\section{Computing a $\Z$-basis of $q$-expansions}
337\label{sec:intbasis}
338Assume that $\eps^2=1$.
339To compute $S_k(N,\eps;\Z)$, first use modular symbols and the Sturm bound
340to compute a $\Q$-basis of $q$-expansions for $S_k(N,\eps;\Q)$.
341Construct a matrix~$A$ whose rows are the coefficients of the $q$-expansions.
342Let~$B$ be a matrix whose columns form a basis for the right kernel of~$A$.
343Then a basis for $S_k(N,\eps;\Z)$ is obtained by computing
344a basis for the integer kernel of the transpose of~$B$,
345which can be computed using standard algorithms.  For example, we might
346have $A=[0,2]$; then $B=\begin{smallmatrix}1\\0\end{smallmatrix}$, and
347the integer kernel of the transposes of~$B$ is spanned by $[0,1]$.
348
349
350
351\section{Decomposing the space of modular symbols}
352\label{sec:decomposemodsym}
353
354Let $\sM_k(N,\eps)$ be the space of modular symbols
355of level $N$ and character $\eps$ over $K=\Q(\eps)$.
356In this section we describe how to decompose the
357new part of $\sM_k(N,\eps)$ as a direct sum of $\T$-modules
358corresponding to the Galois conjugacy classes
359of newforms  with character $\eps$.
360As an application, we can compute the $q$-expansions
361of the normalized cuspidal newforms of level $N$ and
362character $\eps$.  Using the theory of
363Atkin-Lehner~\cite{atkin-lehner}, it is
364then possible to construct a basis for $S$.
365
366The algorithm is, for the most part, a
367straightforward generalization  of the method used
368by Cremona \cite{cremona:algs}
369to enumerate the $\Q$-rational weight two newforms
370corresponding to modular elliptic curves.
371Nevertheless, we present several nonobvious tricks which
372we learned in the course of doing computation and
373which greatly speed up the algorithm.
374One key idea is to work in the space dual to
375modular symbols as described in the next section.
376
377\subsection{Duality}
378Let $\sM_k(N,\eps)^\dual$ denote $\Hom(\sM_k(N,\eps),K)$
379equipped with its natural right $\T$-action:
380   $$(\vphi T)(x) = \vphi(Tx).$$
381The natural pairing
382 \begin{equation}\label{eqn:pairing}
383\langle\,,\,\rangle:\sM_k(N,\eps)^\dual \cross \sM_k(N,\eps) \ra K
384\end{equation}
385given by $\langle\vphi,x\rangle = \vphi(x)$
386satisfies
387  $\langle\vphi{}T,x\rangle = \langle\vphi ,T{}x\rangle$.
388
389Viewing the elements $T\in\T$ as sitting inside
390$\sM_k(N,\eps)$,
391the transpose map $T\mapsto T^t$
392allows us to view $\sM_k(N,\eps)^\dual$
393as a left $\T$-module.
394\begin{proposition}\label{prop:heckeduality}
395Let $V\subset \sM_k(N,\eps)^{\new}$ be an irreducible
396new $\T$-submodule and set $I=\Ann_\T V$.
397Then $\sM_k(N,\eps)^{\dual}[I]$ is isomorphic to~$V$
398as a $\T\tensor\Q$-module.
399\end{proposition}
400
401The degeneracy maps $\alp_t$ and $\beta_t$ of
402Section~\ref{sec:degeneracymaps} give rise to
403maps $\alp_t^{\dual}$ and $\beta_t^{\dual}$
404between the dual spaces and having
405the dual properties to those of $\alp_t$ and $\beta_t$.
406In particular, they commute with the Hecke operators
407$T_p$ for $p$ prime to $N$.
408The new and old subspace of $\sM_k(N,\eps)^\dual$
409are defined as in Definition~\ref{def:newandoldsymbols}.
410
411\begin{algorithm}\label{alg:decompmknew}
412This algorithm computes a decomposition of $\sM_k(N,\eps)^{\dual\new}$.
413Using Algorithm~\ref{alg:MkNK} compute $\sM_k(N,\eps)$.
414Then compute the maps $\beta_t$ using Algorithm~\ref{alg:degenreps}
415and intersect the transposes of their kernels in order to
416obtain $\sM_k(N,\eps)^{\dual\new}$.
417Compute the boundary map $\delta:\sM_k(N,\eps)\ra B_k(N,\eps)$
418using Algorithm~\ref{alg:cusplist}.  Using the Hecke operators,
419Algorithm~\ref{alg:efficienttpdual}, and
420Proposition~\ref{prop:heckeduality},
421cut out the cuspidal submodule $\sS_k(N,\eps)^{\dual\new}$.
422Set $p=2$ and perform the following steps.
423\begin{enumerate}
424\item Using Algorithm~\ref{alg:efficienttpdual},
425compute a matrix $A$ representing the Hecke operator $T_p$
426on $\sM_k(N,\eps)^{\dual\new}$.
427\item Compute and factor the characteristic polynomial $F$ of $A$.
428\item For each irreducible factor $f$ of $F$
429compute $V_f = \ker(f(A))$.  Use the following criteria
430to determine if $V_f$ is irreducible:
431\begin{enumerate}
432\item If~$p$ is greater than the Sturm bound
433(see Theorem~\ref{thm:bound}) then $V_f$
434must be irreducible.
435\item If some element $T\in \T$ has
436characteristic polynomial on $V_f$ the
437square of an irreducible polynomial, then $V_f$ is irreducible.
438Determine if $V_f$ is cuspidal by checking
439if $V_f$ is contained in $\sS_k(N,\eps)^{\dual\new}$
440computed above.
441If $V_f$ is cuspidal and some element $T\in \T$ has characteristic
442polynomial on $V_f$ the square of an irreducible polynomial,
443then $V_f$ is irreducible.
444\end{enumerate}
445\item If $V_f$ is irreducible, record $V_f$ in a list and continue
446with the next factor of the characteristic polynomial.  If
447we can not show that $V_f$ is irreducible, repeat step 1 with
448$\sM_k(N,\eps)^{\dual\new}$ replaced by $V_f$.
449\end{enumerate}
450\end{algorithm}
451
452
453\subsection{Efficient computation of Hecke operators on the dual space}
454In this section we give a method for computing the action
455of the Hecke operators $T_p$ on an invariant subspace
456$V\subset \sM_k(N,\eps)^{\dual}$.
457A naive way to compute the right action of $T_p$ on $V$
458is to compute a matrix representing $T_p$ on $\sM_k(N,\eps)$,
459transpose to obtain $T_p$ on $\sM_k(N,\eps)^\dual$,
460and then restrict to $V$ using Gaussian elimination.
461To compute $T_p$ on $\sM_k(N,\eps)$, observe that $\sM_k(N,\eps)$
462has a basis $e_1,\!\ldots,e_n$, where each $e_i$
463is a Manin symbol $[P,(c,d)]$, and that the action
464of $T_p$ on $[P,(c,d)]$ can be computed using
465Section~\ref{subsec:heckeonmanin}.
466In practice, $d=\dim V$ will often be much less than $n$;
467it is then possible to compute $T_p$ on $V$ in $d/n$ of the
468time it takes using the above naive method.  This is a
469substantial savings when $d$ is small.
470Transposing the injection
471$V\hookrightarrow \sM_k(N,\eps)^{\dual}$
472we obtain a surjection $\sM_k(N,\eps)\ra V^\dual$.
473There exists a subset $e_{i_1},\!\ldots, e_{i_d}$
474of the $e_i$ whose image forms
475a basis for $V^\dual$.   With some care, it is then possible
476to compute $T_p$ on $V^{\dual}$ by computing $T_p$ on each of
477$e_{i_1},\!\ldots, e_{i_d}$.   We describe in detail below
478a definite way to carry out this computation using matrices.
479
480  Let $V$ be an $n\times m$ matrix whose rows
481generate an $n$-dimensional subspace of an $m$-dimensional space of
482row vectors.  Let $T$ be an $m\times m$-matrix and
483suppose that $V$ has rank $n$ and that  $VT$ is contained
484in the row space of $V$.
485Let $E$ be an $m\times n$ matrix with the property that the
486$n\times n$ matrix $VE$ is invertible, with inverse $D$.
487\begin{proposition}
488$VT = VTEDV.$
489\end{proposition}
490\begin{proof}
491Observe that
492 $$V(EDV) = (VED)V = IV = V.$$
493Thus right multiplication by $EDV$
494      $$v \mapsto vEDV$$
495induces the {\em identity map} on the row space of $V$.
496Since $VT$ is contained in the row space of $V$, we have
497                     $$(VT)EDV = VT,$$
498as claimed.
499\end{proof}
500
501We have not computed $T$, but we can
502compute $T$ on each basis element $e_1,\ldots,e_d$
503of the ambient space--unfortunately, $d$ is extremely large.
504Our problem: quickly compute the action of
505$T^t$ on the invariant subspace spanned
506by the rows of $V$.  Can this be done without
507having to compute $T$ on all $e_i$?
508Yes,  the following algorithm shows how using
509a subset of only $n=\dim V$ of the $e_i$.
510This results in a tremendous savings;
511usually $\dim V$ is small and $d$ is large.
512
513\begin{algorithm}\label{alg:efficienttpdual}
514Let $T$ be any linear transformation [[of the ambient space]]
515which leaves $V$ invariant and for
516which we can compute $T(e_i)$ for $i=1,\ldots, d$.
517This algorithm computes the matrix representing the
518action of $T$ on $V$ while computing $T(e_i)$ for
519only $\dim V$ of the~$i$.
520
521Choose any $m\times n$ matrix $E$ whose columns are
522sparse linear combinations of the $e_i$ and such that
523$VE$ is invertible.
524For this we find a set of positions so that elements of the space
525spanned by the columns of $V$ are determined by the entries in
526these spots. This is accomplished by row reducing, and setting $E$
527equal to the pivot columns.
528Using Gauss-elimination compute the inverse $D$ of the
529$n\times n$ matrix $VE$.
530The matrix representing the action of $T$ with respect
531to $V$ is then
532  $$V(TE)D=V(TE)(VE)^{-1}.$$
533\end{algorithm}
534\begin{proof}
535Let $A$ be any matrix so that
536$VA$ is the $n\times n$ identity
537matrix.
538By the proposition we have
539  $$VTA = (VTEDV)A = VTED(VA) = VTED = V(TE)D.$$
540To see that $VTA$ represents $T$,
541observe that by the proposition,
542   \begin{eqnarray*}
543   VTAV &=& (VTEDV)AV=(VTEDV\!A)V\\
544        &=& (VTED)(V\!A)V=(VTED)V=VT
545   \end{eqnarray*}
546so that $VTA$ gives the correct linear combination of the rows of $V$.
547\end{proof}
548
549\comment{
550Compute $TE$, then multiply on the left by $V$ and on the right
551by $DV$ to obtain $VT = V(TE)DV$.
552Compute a right inverse $R$ of $V$ as follows: If the reduced
553row echelon form of the augmented matrix $[V'\,|\,I]$ is $[I\,|\,A]$,
554then $AV'=I$, where $I$ is the $n\times n$ identity matrix.
555Taking the transpose reveals that $VA'=I$ and so we take $R=A'$.}
556
557\subsection{Eigenvectors}\label{sec:eigenvector}
558Once a $\T$-simple subspace of $\sM^*$ has been identified, the
559following algorithm can be used to write down an eigenvector
560defined over an extension of the base field.
561
562\begin{algorithm}
563Let $A$ be an $n\times n$ matrix over a field $K$ and
564suppose that the characteristic polynomial $f(x)=x^n+\cdots+a_1 x + a_0$
565of $A$ is irreducible.   Let $\alpha$ be a root of $f(x)$
566in an algebraic closure $\Kbar$ of $K$.
567Factor $f(x)$ over $K(\alp)$ as
568 $f(x) = (x-\alp) g(x)$.
569Then for any randomly chosen $v\in K^n$ the vector
570$g(A)v$ is an eigenvector of $A$ with eigenvalue $\alp$.
571Compute the vector $g(A)v$ by computing
572$Av$, $A(Av)$, $A(A(Av))$ and then summing using that
573  $$g(x)=x^{n-1}+c_{n-2} x^{n-2}+\cdots+c_1 x+ c_0$$
574where the coefficients $c_i$ are determined by the recurrence
575$$c_0 = - a_0/\alp,\qquad c_i = (c_{i-1}-a_i)/\alp.$$
576\end{algorithm}
577\begin{proof}
578By the Cayley-Hamilton theorem \cite[XIV.3]{lang:algebra}
579we have that $f(A)=0$.  Consequently, for any $v\in K^n$,
580we have $(A-\alp)g(A)v=0$ so that $A g(A)v = \alp v$.
581Since $f$ is irreducible it is the polynomial of least
582degree satisfied by $A$ and so $g(A)\neq 0$.
583Therefore $g(A)v\neq 0$ for all $v$ not in the proper
584closed subset $\ker(g(A))$.
585\end{proof}
586
587\subsection{Eigenvalues}\label{sec:eigenvalues}
588In this section we give an algorithm for
589computing the $q$-expansion of one of the newforms
590corresponding to a factor of $\sM_k(N,\eps)^{\new}$.
591This is a generalization of the algorithm described
592in \cite[\S2.9]{cremona:algs}.
593
594\begin{algorithm}\label{alg:eigenvalues}
595Given a factor $V\subset \sS_k(N,\eps)^{\dual\new}$
596as computed by Algorithm~\ref{alg:decompmknew}
597this algorithm computes the $q$-expansion of
598one of the corresponding Galois conjugate newforms.
599\begin{enumerate}
600\item Using Algorithm~\ref{alg:efficienttpdual} compute
601the action of the $*$-involution (Section~\ref{sec:heckeops})
602on $V$.  Then compute the $+1$ eigenspace $V^+\subset V$.
603\item Find a Hecke operator $T\in\T$ such that the
604characteristic polynomial of the matrix $A$
605of $T$ acting on $V^+$ is irreducible.
606Such a Hecke operator $T$ must exist by the primitive element theorem
607\cite[V.4]{lang:algebra}.
608\item Using Algorithm~\ref{sec:eigenvector} compute
609an eigenvector $e$ for $A$ over an extension of $K$.
610\item Because $e$ is an eigenvector and the pairing
611given in Equation~\ref{eqn:pairing} respects the
612Hecke action, we have that for any Hecke operator
613$T_n$ and element $w\in \sM_k(N,\eps)$, that
614$$a_n \langle e, w \rangle 615 = \langle e T_n, w\rangle 616 = \langle e, T_n w \rangle.$$
617Choose $w$ so that 1) $w$ is a freely generating
618Manin symbols (see Algorithm~\ref{alg:MkNK})
619and 2) $\langle e,w\rangle \ne 0$.  Then
620$$a_n =\frac {\langle e, T_n w \rangle} 621 {\langle e, w \rangle}.$$
622The $a_n$ can now be computed by
623computing $\langle e, w \rangle$ once and for all,
624and then computing $\langle e, T_n w \rangle$ for
625each $n$.
626\end{enumerate}
627\end{algorithm}
628The beauty of this algorithm is that when $w$
629is a freely generating Manin symbol the computation
630of $T_p w = \sum_{x\in R_p} wx$ is very quick, requiring
631only summing over the Heilbronn matrices of determinant
632$p$ {\em once}.
633
634In practice we compute only the eigenvalues $a_p$ using
635the above algorithm, then use the following
636recurences to obtain the $a_n$:
637\begin{eqnarray*}
638  a_{nm} &=& a_n a_m \qquad\text{if $(n,m)=1$, and}\\
639  a_{p^r}&=& a_{p^{r-1}}a_p - \eps(p) p^{k-2} a_{p^{r-2}}.
640\end{eqnarray*}
641
642
643\subsection{Sorting and labeling eigenforms}
644In Section~\ref{sec:eigenvalues} we saw how to associate
645to each new factor a sequence $a_n$ of Hecke eigenvalues.
646These can be used to sort and hence label the factors.
647This is essential so that we can refer to the factors in our
648explicit investigations.
649
650Except in the case of weight~$2$ and trivial character,
651we use the following ordering.  To each eigenvector
652associate the following sequence of integers
653$$\tr(a_1), \tr(a_2), \,\tr(a_3),\, \tr(a_5),\, \ldots$$
654where the trace is from $K[f]$ down to $\Q$.
655Sort the eigenforms by ordering the
656sequences in dictionary order with
657minus coming before plus.
658Note that we included $\tr(a_1)$ so that
659this ordering would gather together factors of the same dimension.
660
661When $k=2$ and the character is trivial we
662use a different and somewhat complicated ordering
663because it extends the notation for elliptic curves
664that was introduced in the second edition of \cite{cremona:algs}
665and has since become standard.
666Sort the factors of $\sS_k(N,\eps)^{\new}$ as follows.
667First by dimension, with smallest dimension first.
668Within each dimension, sort in binary order,
669by the signs of the Atkin-Lehner  involutions
670with - corresponding to 0 and + to 1, thus if there
671are three Atkin-Lehner involutions then the sign patterns
672are sorted as follows:
673$$+++, -++, +-+, --+, ++-, -+-, +--, ---.$$
674Finally, let $p$ be the smallest prime not dividing $N$.
675Within each of the Atkin-Lehner classes, sort by
676the magnitudes of the $K(f)/\Q$-trace of
677$a_p$ breaking ties by letting the positive trace be first.
678If there are still any ties, repeat the final step with the
679next smallest prime not dividing $N$, etc.
680
681
682
683\section{Intersections and congruences}
684
685Consider a complex torus $J=V/\Lambda$, and let
686$A=V_A/\Lambda_A$ and $B=V_B/\Lambda_B$ be subtori whose
687intersection $A\intersect B$ is finite.
688\begin{proposition}\label{prop:intersection}
689There is a natural isomorphism of groups
690$$A\intersect B \isom 691 \left(\frac{\Lambda}{\Lambda_A + \Lambda_B}\right)_{\tor}.$$
692\end{proposition}
693\begin{proof}
694There is an exact sequence
695$$0\ra A\intersect B \ra A \oplus B \ra J.$$
696Consider the diagram
697$$\xymatrix{ 698 & {\Lambda_A \oplus\Lambda_B}\ar[d] \ar[r] & {\Lambda} \ar[r]\ar[d]& 699 {\Lambda/(\Lambda_A + \Lambda_B)}\ar[d]\\ 700 & {V_A \oplus V_B}\ar[d] \ar[r] & V \ar[r]\ar[d] & {V/(V_A+V_B)}\ar[d]\\ 701 {A\intersect B}\ar[r] & A\oplus B\ar[r] & J \ar[r] & J/(A+ B)}$$
702The snake lemma gives an exact sequence
703$$0 \ra 704 A\intersect B \ra 705 \Lambda/(\Lambda_A + \Lambda_B) \ra 706 V/(V_A+V_B).$$
707Since $V/(V_A+V_B)$ is a $\C$-vector space, the torsion
708part of $\Lambda/(\Lambda_A + \Lambda_B)$ must map to~$0$.
709No nontorsion in $\Lambda/(\Lambda_A + \Lambda_B)$ could
710map to~$0$, because if it did then $A\intersect B$ wouldn't
711be finite.  The lemma follows.
712\end{proof}
713
714The following formula for the intersection of~$n$ subtori is obtained
715in a similar way.
716\begin{proposition}
717For $i=1,\ldots,n$ let $A_i = V_i/\Lambda_i$ be a subtorus of
718$J=V/\Lambda$, and assume that each pairwise intersection
719$A_i \intersect A_j$ is finite.
720Then
721$$A_1\intersect \cdots \intersect A_n 722 \isom 723\left(\frac{\Lambda\oplus \cdots \oplus \Lambda} 724 {f(\Lambda_1\oplus\cdots\oplus \Lambda_n)}\right)$$
725where $f(x_1,\ldots,x_n)=(x_1-x_2,x_2-x_3,x_3-x_4,\ldots,x_{n-1}-x_n)$.
726\end{proposition}
727
728\begin{remark}
729Using this proposition the author constructed the
731\begin{figure}
732\begin{center}
733\includegraphics{shirt.eps}
734\end{center}
735\caption{T-shirt design}
736\label{cap:tshirt}
737\end{figure}
738\end{remark}
739
740
741Let~$N$ be a positive integer, $k\geq 2$ an integer, and~$\eps$
742a mod~$N$ Dirichlet character.
743Suppose~$f$ and~$g$ are newforms in $S_k(N,\eps;\Qbar)$.
744The following proposition gives rise to an algorithm for
745computing congruences between infinite Fourier expansions;
746the key advantage of the algorithm is that it only
747involves finite exact computations and avoids any need
748to compute $q$-expansions.
749\begin{proposition}\label{prop:degcong}
750Suppose~$f$ and~$g$ are newforms in $S_k(N,\eps;\Qbar)$.
751Let $I_f$ and $I_g$ be the corresponding annihilators in the Hecke
752algebra~$\T$.
753Let $\Lambda = \sS_k(N,\eps;\O)$, and set
754$\Lambda_f=\Lambda[I_f]$
755and $\Lambda_g=\Lambda[I_g]$.
756If $p\mid \#\left(\frac{\Lambda}{\Lambda_f + \Lambda_g}\right)_{\tor}$
757then there is a prime~$\wp$ of residue characteristic~$p$ such
758that $f\con g \pmod{\wp}$.
759\end{proposition}
760\begin{proof}
761Consider the exact sequence
762$$0 \ra \Lambda_f \oplus \Lambda_g \ra \Lambda \ra 763 \Lambda/(\Lambda_f+\Lambda_g) \ra 0$$
764where the first map is $(a,b)\mapsto a-b$.
765Upon tensoring this sequence with~$\F_p$ we obtain:
766$$Z 767 \ra (\Lambda_f \tensor\F_p) \oplus (\Lambda_g \tensor\F_p) 768 \ra \Lambda\tensor\F_p \ra (\Lambda/(\Lambda_f+\Lambda_g))\tensor\F_p\ra 0,$$
769where $Z=\Tor_1(\Lambda/(\Lambda_f+\Lambda_g),\F_p)$.
770Denote by $\im(\Lambda_f)$ the image of $\Lambda_f\tensor\F_p$
771in $\Lambda\tensor\F_p$
772and likewise for $\Lambda_g$.
773Our assumption that~$p$ divides the torsion part
774of $\Lambda/(\Lambda_f+\Lambda_g)$ implies that~$Z$
775is nonzero, so $\im(\Lambda_f)$ and $\im(\Lambda_g)$
776have nonzero intersection inside the $\F_p$-vector
777space $\Lambda\tensor\F_p$.
778The Hecke algebra~$\T$ acts on $\im(\Lambda_f)$ is through
779its action on~$f$, that is, through the quotient $\T/I_f$;
780similarly,~$\T$ acts on $\im(\Lambda_g)$ through $\T/I_g$.
781Thus~$\T$ acts on the nonzero $\T\tensor\F_p$-module
782$\im(\Lambda_f)\intersect \im(\Lambda_g)$
783through $\T/(I_f+I_g+p)$.  This implies that
784$I_f+I_g+p$ is not the unit ideal, which is equivalent
785to the assertion of the proposition.
786\end{proof}
787
788\comment{ %HEY, AMOD'S ALREADY DONE IT...
789The method of proof can also be used to show that
790if a prime divides the modular degree, then it is
791a congruence prime'' (see Ribet's proof
792in~\cite[\S5]{zagier:parametrizations}).  Here's
793how the argument goes, with a slight generalization
794to arbitrary weight.  Let~$f$ be a weight-$k$ newform
795on $\Gamma_0(N)$ or $\Gamma_1(N)$,
796and denote by~$A$ the corresponding abelian
797subvariety of the appropriate self-dual abelian variety $J$.
798For example, if~$k$ is~$2$, then~$J$ is $J_0(N)$ or $J_1(N)$.
799We have the following diagram of abelian varieties (over~$\C$):
800$$\xymatrix{ 801 & B\ar[d]\\ 802*++{A}\[email protected]{^(->}[r]\ar[dr]^{\vphi}& J\ar[d]\\ 803 & {\Adual}}$$
804where~$B$ is the kernel of the natural map $J\ra \Adual$.
805If $p\mid \deg(\vphi)$, then
806Proposition~\ref{prop:intersection}
807implies that~$p$ also divides
808$\#(\Lambda/(\Lambda_A+\Lambda_B))_{\tor}$.
809Arguing as in the proof of Proposition~\ref{prop:degcong},
810we see that $I_A+I_B+p$ is not the unit ideal in~$\T$.
811There is a perfect pairing between  $S_k=S_k(N;\Z)$ and~$\T$,
812which [[I HOPE!]] induces a non-canonical isomorphism
813$$\frac{S_k}{S_k[I_A]+ S_k[I_B]} 814 \isom 815 \frac{\T}{I_A + I_B}.$$
816Thus~$r$, which equals the order of the left hand quotient,
817is also equal to $\T/(I_A + I_B)$.  Since $I_A+I_B+p$ is
818not the unit ideal, it follows that $p\mid r$.
819
820\begin{selfnote}
821FIX THE LAST BIT!!!!!!!!!!!!
822It seems Amod has given the weight~$2$ proof of
823this in his note on the Manin constant.
824Mention Amod's results on this question.
825\end{selfnote}
826}
827
828
829% ratperiod.tex
830\section{The rational period mapping}
831\label{sec:ratperiod}
832
833Consider a triple $(N,k,\eps)$, and let $K=\Q[\eps]$.
834Let~$I$ be an ideal in the Hecke algebra~$\T$ associated to
835$(N,k,\eps)$.
836The rational period mapping associated
837to~$I$ is a map from the space $\sM_k(N,\eps;K)$ of
838modular symbols to a finite dimensional $K$-vector space.
839It is a computable analogue of the classical integration
840pairing, and is of great value in extracting the rational parts
841of analytic invariants; e.g., of special values of $L$-functions.
842In the next section we use it to computing the
843image of cuspidal points on $J(N,k,\eps)$.
844
845\begin{definition}
846Let $D:=\Hom(\sM_k(N,\eps;K),K)[I]$;  the
847\defn{rational period mapping} is the natural
848quotient map
849$$\Theta_I : \sM_k(N,\eps;K) \ra \frac{\sM_k(N,\eps;K)} 850{\bigcap\, \{\ker(\vphi) : \vphi \in D\}}.$$
851\end{definition}
852
853\begin{algorithm}\label{alg:ratperiod}
854This algorithm computes $\Phi_I$.
855Choose a basis for $W=\sM_k(N,\eps;K)$ and use it
856to view~$W$ as a space of column vectors equipped with
857a left action of~$\T$.
858View $W^*=\Hom(\sM_k(N,\eps;K),K)$ as the
859space of row vectors of length equal to $\dim \sM_k(N,\eps;K)$;
860thus~$W^*$ is dual to~$W$ via the natural pairing between
861row and column vectors.  The Hecke operators acts
862on $W^*$ on the right.
863Compute a basis $\vphi_1,\ldots,\vphi_{n}$ for
864the $K$-vector space $W^*[I]$.
865Then the rational period mapping with respect to
866this basis is $\vphi_1\cross \cdots \cross \vphi_n$;
867it is given by the matrix whose rows
868are $\vphi_1,\ldots,\vphi_n$.
869\end{algorithm}
870\begin{proof}
871The kernels of $\vphi_1\cross \cdots \cross \vphi_n$
872and $\Phi_I$ are the same.
873\end{proof}
874
875
876\begin{example}\label{ex:ratperiod1}
877Let~$I$ be the annihilator of the newform $f=q-2q^2+\cdots \in M_2(37,1;\Q)$
878corresponding to the elliptic curve {\bf 37k2A}.
879There is a basis for $W=\sM_2(37,1;\Q)$ such that
880$$T_2 = \left(\begin{matrix} 881-1& 1 &1&-1& 0\\ 882 1&-1& 1& 0& 0\\ 883 0& 0&-2& 1& 0\\ 884 0& 0& 0& 0& 0\\ 885 0& 0& 0& 1& 3\\ 886\end{matrix}\right)$$
887The characteristic polynomial of $T_2$ is $x^2(x+2)^2(x-3)$.
888Thus $W[I]=\ker(T_2+2)$ is spanned by the column
889vectors $(1,-1,0,1/2,0)^t$ and
890$(0,0,1,-1/2,0)^t$, and $W^*[I]=\ker(T_2^{t}+2)$ is spanned by the row vectors
891$(1,0,-1,0,0)$ and $(0,1,-1,0,0)$.  The rational period mapping
892is $\Phi_I((a,b,c,d,e)^t) = (a-c,b-c)$.
893%Using $\Phi_I$ we can compute the image of the modular
894%symbol $\{0,\infty\}$.
895\end{example}
896
897\begin{lemma}\label{lem:ratperiodlemma}
898  $$\dim \sM_k(N,\eps;K)[I] = \dim \Hom(\sM_k(N,\eps;K),K)[I].$$
899\end{lemma}
900\begin{proof}
901Let $W=\sM_k(N,\eps;K)$ and $W^*$ be its dual.
902Let $a_1,\ldots,a_n$ be a set of generators for~$I$.
903Choose a basis for~$W$ that is compatible with the following filtration:
904$$0\subset (\ker(a_1)\intersect\cdots\intersect\ker(a_n)) 905\subset (\ker(a_1)\intersect\cdots\intersect\ker(a_{n-1})) 906\subset\cdots \subset \ker(a_1)\subset W.$$
907The rank of a square matrix
908equals the rank of its transpose, so the dimension of $\ker(a_1)$ is
909the same as the dimension of $\ker(a_1^t)$, that is,
910$\dim W[(a_1)] = \dim W^*[(a_1)]$.
911Since~$\T$ is commutative,~$a_2$ leaves $\ker(a_1)$ invariant;
912because of how we chose our basis for~$W$,
913the transpose of $a_2|_{\ker(a_1)}$ is $a_2^t|_{\ker(a_1^t)}$.
914Thus again, $\dim (\ker(a_2|_{\ker(a_1)}))$ equals
915$\dim (\ker(a_2^t|_{\ker(a_1^t)}))$.
916 Proceeding inductively, we prove the lemma.
917\end{proof}
918
919\begin{corollary}
920Suppose $\sM_k(N,\eps;K)[I]\subset \sS_k(N,\eps;K)$, and
921let $P:\sM_k(N,\eps;K)\ra \Hom(S_k(N,\eps;\C)[I],\C)$
922be the classical period map induced by the integration
923pairing.  Then $\ker(P) = \ker(\Phi_I)$.
924\end{corollary}
925\begin{proof}
926Since $P(\sM_k(N,\eps;\O)$ is known to be an $\O$-lattice in
927the complex vector space $\Hom(S_k(N,\eps;\C)[I],\C)$,
928the $K$-dimension of $\im(P)$ equals
929$2\cdot \dim_\C S_k(N,\eps;\C)[I]$,
930which in turn equals
931$\dim_K \sM_k(N,\eps;K)[I]$.
932Thus by Lemma~\ref{lem:ratperiodlemma} the
933images $\im(P)$ and $\im(\Phi_I)$ have the same
934dimension, hence $\ker(P)$ and $\ker(\Phi_I)$ also have the
935same dimension.  It thus suffices to prove the inclusion
936$\ker(\Phi_I)\subset\ker(P)$.
937Suppose $\Phi_I(x)=0$; then $\vphi(x)=0$ for all
938$x\in W^*[I]$, where $W=\sM_k(N,\eps;K)$.
939Thus $\vphi(x)=0$ for all $\vphi\in (W\tensor\C)^*[I]$.
940Since the integration pairing that defines~$P$ respects
941the action of~$\T$, the composition of~$P$ with any linear
942functional lies in $(W\tensor\C)^*[I]$.  Thus $P(x)=0$,
943as required.
944\end{proof}
945
946
947% cuspdiff.tex
948\section{The images of cuspidal points}
949\label{sec:cuspdiff}
950
951Consider a triple $(N,k,\eps)$, and let $K=\Q[\eps]$.
952Recall that integration defines a period mapping
953$$P : \sM_k(N,\eps;K)\ra \Hom(S_k(N,\eps;\C),\C).$$
954A \defn{cuspidal point} of
955$$J=J(N,k,\eps):= 956\frac{\Hom(S_k(N,\eps;\C),\C)} 957 {P(\sS_k(N,\eps;\O))}$$
958is a point that is in the image under~$P$ of $\sM_k(N,\eps;\O)$.
959It is of great interest to compute the structure of
960the cuspidal subgroup of~$J$ and of the quotients of~$J$.
961For example, when $k=2$ and $\eps=1$ Manin proved
962(see~\cite{manin:parabolic}) that the cuspidal
963point $\{0,\infty\}$ is a torsion point in $J(\Q)$, so
964its order gives a lower bound on $J(\Q)_{\tor}$.
965
966\begin{algorithm}[Cuspidal subgroup]
967Let~$I$ be an ideal in the Hecke algebra~$\T$.
968This algorithm computes the cuspidal subgroup
969of the quotient $A_I$ of~$J$.
970Using Algorithm~\ref{alg:MkNO}
971compute $\sM_k(N,\eps;\O)$ and $\sS_k(N,\eps;\O)$.
972Using Algorithm~\ref{alg:ratperiod},
973compute the rational period mapping~$\Phi_I$.
974Then the cuspidal subgroup is the
975subgroup of $\Phi_I(\sS_k(N,\eps;\O))$ generated
976by the elements $\Phi_I(x)$ for $x\in \sM_k(N,\eps;\O)$.
977In particular, the point of $A_I(\C)$ corresponding
978to $X^iY^{k-2-i}\{\alp,\beta\}$ is
979the image of $\Phi_I(X^iY^{k-2-i}\{\alp,\beta\})$ in the quotient
980of $\Phi_I(\sM_k(N,\eps;\O)$ by $\Phi_I(\sS_k(N,\eps;\O))$.
981\end{algorithm}
982
983\begin{example}
984This example continues Example~\ref{ex:ratperiod1}.
985The basis chosen is also a basis for $\sM_2(37,1;\Z)$,
986so by computing the boundary map, or the integer
987kernel of $T_2(T_2+2)$, we find that $\sS_2(37,1;\Z)$
988is spanned by $(1,0,0,0,0)$, $(0,1,0,0,0)$,
989$(0,0,1,0,0)$, and $(0,0,0,1,0)$.
990Thus $\Phi_I(\sS_2(37,1;\Z))$ is generated by
991$(1,0)$ and $(0,1)$.
992The modular symbols $\{0,\infty\}$ is represented
993by $(0,0,0,0,-1)$, so the image of the cusp $(0)-(\infty)\in J_0(37)$
994is~$0$ in {\bf 37k2A}.
995
996The rational period mapping associated to {\bf 37k2B} (with respect
997to some basis) is
998$$\Phi_I((a,b,c,d,e)^t) = (a-c-2d+\frac{2}{3}e,\,\, 999 b+c+2d-\frac{2}{3}e).$$
1000Thus $\Phi_I(\sS_2(37,1;\Z))$ is generated by
1001$(1,0)$ and $(0,1)$.
1002The image of $\{0,\infty\}$ is
1003is $\frac{2}{3}(1,-1)$, so the image of
1004$(0)-(\infty)$ in {\bf 37k2B} has order~$3$.
1005\end{example}
1006
1007
1008
1009\section{The modular degree}
1010Let~$f$ be a newform of level~$N$, weight
1011$k\geq 2$ and character~$\eps$ such that $\eps^2=1$.
1012In this section we define and compute the modular degree of
1013the torus $A_f$ attached to~$f$.
1014
1015\begin{definition}\label{defn:modulardegree}
1016The \defn{modular map} is the map
1017$\theta_f:\Adual_f \ra A_f$
1018of Diagram~\ref{dgm:uniformization}.
1019The \defn{modular degree}~$m_f$ of~$f$ (or of~$A_f$) is
1020the degree of this map.
1021\end{definition}
1022
1023When $k=2$, $\theta_f$ is a polarization so
1024(\cite[Thm.~13.3]{milne:abvars}) the degree of~$\theta$
1025is a square.
1026\begin{proposition}
1027Let $E/\Q$ be a modular elliptic curve of conductor~$N$
1028which is an optimal quotient of $J_0(N)$.
1029Then $\delta_f$ is the square of the usual modular degree, which is
1030the least degree of a map $X_0(N)\ra E$.
1031\end{proposition}
1032When $k\neq 2$, the degree of~$\theta$ need not be a perfect square.
1033For example, their is a one-dimensional quotient $A_f$
1034associated to form $f\in S_4(10)$ such that $m_f=2\cdot 5$.
1035
1036\begin{algorithm}
1037The modular kernel is the cokernel of the natural map
1038$\sS[I_f] \ra \Phi_f(\sS)$ of
1039Diagram~\ref{dgm:uniformization}.
1040\end{algorithm}
1041\begin{proof}
1042Use the snake lemma.
1043\end{proof}
1044
1045
1046\section{The modular degree}
1047Let~$f$ be a newform of level~$N$, weight
1048$k\geq 2$ and character~$\eps$ such that $\eps^2=1$.
1049In this section we define and compue the modular degree of
1050the torus $A_f$ attached to~$f$.
1051
1052\begin{definition}
1053The \defn{modular map} is the map
1054$\theta_f:\Adual_f \ra A_f$
1055of Diagram~\ref{dgm:uniformization}.
1056The \defn{modular degree} $m_f$ of~$f$ (or of~$A_f$) is
1057the degree of this map.
1058\end{definition}
1059
1060When $k=2$, $\theta_f$ is a polarization so
1061(\cite[Thm.~13.3]{milne:abvars}) the degree of~$\theta$
1062is a square.
1063\begin{proposition}
1064Let $E/\Q$ be a modular elliptic curve of conductor~$N$
1065which is an optimal quotient of $J_0(N)$.
1066Then $\delta_f$ is the square of the usual modular degree, which is
1067the least degree of a map $X_0(N)\ra E$.
1068\end{proposition}
1069When $k\neq 2$, the degree of~$\theta$ need not be a perfect square.
1070For example, their is a one-dimensional quotient $A_f$
1071associated to form $f\in S_4(10)$ such that $m_f=2\cdot 5$.
1072
1073\begin{algorithm}
1074The modular kernel is the cokernel of the natural map
1075$\sS[I_f] \ra \Phi_f(\sS)$ of
1076Diagram~\ref{dgm:uniformization}.
1077\end{algorithm}
1078\begin{proof}
1079Use the snake lemma.
1080\end{proof}
1081
1082
1083% vals.tex
1084\section{Rational part of the $L$-function}
1085\label{sec:rationalvals}
1086
1087Let $\sM(\Q)=\sM(N,\Q)$ and extend $\Phi_f$ to a map $\sM(\Q) \ra \C$.
1088Then $\Phi_f$ has a rational structure in the following sense.
1089
1090\begin{lemma}\label{algphi}
1091Let $\vphi_1,\ldots, \vphi_n$ be a $\Q$-basis for
1092$\Hom(\sM(\Q),\Q)[I_f]$ and set
1093$$\Psi=\vphi_1\cross\cdots\cross\vphi_n : \sM(\Q) \ra \Q^n.$$
1094Then $n=2d$ and $\ker(\Psi)=\ker(\Phi_f)$.
1095\end{lemma}
1096\begin{proof}
1097This result is due to Shimura (\cite{shimura:onperiods}),
1098but we sketch a proof.
1099To compute the dimension of $\Hom(\sM(\Q),\Q)[I_f]$ we may first tensor with $\C$.
1100Let $\Sbar_2$ denote the weight 2 anti-holomorphic cusp forms
1101and $E_2$ the weight $2$ Eisenstein series for $\Gamma_0(N)$.
1102Then $\sM(\C)$ is isomorphic as a $\T$-module to
1103$S_2\oplus \Sbar_2\oplus E_2$ (prop. 9 of \cite{merel:1585} and
1104the Eichler-Shimura embedding).  Because of the Peterson inner product,
1105the dual $\Hom(\sM(\C),\C)$ is also isomorphic as a $\T$-module
1106to $S_2\oplus \Sbar_2\oplus E_2$.  Since $f$ is new, by
1107the Atkin-Lehner theory,
1108$$(S_2\oplus \Sbar_2\oplus E_2)[I_f] = S_2[I_f]\oplus \Sbar_2[I_f]$$
1109has complex dimension $2d$, which gives the first assertion.
1110
1111Next note that $\ker(\Phi_f)\tensor\C\subset\ker(\Psi)\tensor\C$
1112because each map $x\mapsto \langle f_i, x \rangle$ lies in
1113$\Hom(\sM(\Q),\C)[I_f]$ and $\ker(\Psi)\tensor\C$ is the intersection of
1114the kernels of {\em all} maps in $\Hom(\sM(\Q),\C)[I_f]$.
1115By Theorem~\ref{Af} the image of $\Phi_f$ is a lattice, so
1116$\dim_\Q \ker(\Phi_f)=\dim_{\Q} \sM(\Q) - 2d$. Since $\Psi$ is the
1117intersection of the kernels of $n=2d$ independent
1118linear functionals $\vphi_1,\ldots, \vphi_n$,
1119$\ker(\Psi)$ also has dimension $\dim\sM(\Q)-2d$.  Since
1120the dimensions are the same and there is an inclusion,
1121we have an equality
1122$\ker(\Phi_f)\tensor\C = \ker(\Psi)\tensor\C$ which forces
1123$\ker(\Phi_f)=\ker(\Psi)$.
1124\end{proof}
1125
1126
1127Let $V$ be a finite dimensional
1128vector space over $\R$.  A \defn{lattice} $L\subset V$
1129is a free abelian group of rank $=\dim V$ such that
1130$\R L=V$.
1131If $L, M\subset V$ are lattices, the \defn{lattice
1132 index}\label{pg:latticeindex}
1133$[L:M]$ is the absolute value of the
1134determinant of an automorphism of $V$
1135taking $L$ isomorphically onto $M$.
1136Extend the definition to the case
1137when $M$ has rank strictly smaller than $\dim V$
1138by defining $[L:M]=0$.
1139\begin{lemma}\label{latticeker}
1140Suppose $\tau_i : V\ra W_i$, $i=1,2$ are surjective linear maps such that
1141$\ker(\tau_1)=\ker(\tau_2)$.  Then
1142$$[\tau_1(L):\tau_1(M)] = [\tau_2(L):\tau_2(M)].$$
1143\end{lemma}
1144\begin{proof}
1145Surjectivety and equality of kernels insures that there is a unique
1146isomorphism $\iota:W_1\ra W_2$ such that $\iota\tau_1 = \tau_2$.
1147Let $\sigma$ be an automorphism of $W_1$ such that $\sigma(\tau_1(L))=\tau_1(M)$.
1148Then
1149$$\iota\sigma\iota^{-1}(\tau_2(L)) = \iota\sigma\tau_1(L)=\iota\tau_1(M)=\tau_2(M).$$
1150Since conjugation doesn't change the determinant,
1151$$[\tau_2(L):\tau_2(M)]=|\det(\iota\sigma\iota^{-1})| 1152 =|\det(\sigma)| = [\tau_1(L):\tau_1(M)].$$
1153\end{proof}
1154
1155Let $S_2(N,\Z)$ be the space of cusp forms whose $q$-expansion
1156at infinity hass integer coefficients.
1157Let $\Omega_f^0$ be the measure of the identity component of
1158$A_f(\R)$ with respect to an integral basis for
1159$S_f(\Z)=S_2(N,\Z)[I_f]$.
1160Let $\e=\{0,i\infty\}\in\sM(N,\Z)$ denote the \defn{winding
1161element\label{defn:windingelement}}.
1162
1163\begin{theorem}\label{ratpart}
1164Let $\Psi$ be as in Lemma~\ref{algphi}.  Then
1165$$\pm \frac{L(A_f,1)}{\Omega_f^0} = [\Psi(\sS(N,\Z)^+) : \Psi(\T{}\e)]$$
1166\end{theorem}
1167\begin{proof}
1168Let $\Phi=\Phi_f$ be the period map defined
1169by a basis $f_1,\ldots,f_d$ of conjugate newforms.
1170The codomain of $\Phi$, which we identify with $\C^d$, is an algebra
1171with unit element $\mathbf{1}=(1,\ldots,1)$ equipped with an action
1172of the Hecke operators:
1173  $T_p$ acts as $(a_p^{(1)},\ldots,a_p^{(d)})$
1174where the components are the  Galois conjugates of $a_p$.
1175Let $\Z^d\subset\R^d\subset\C^d$ be the usual submodules.
1176Let $\Vol(\sS^+)$ be the volume of a fundamental domain
1177for the real lattice $\Phi(\sS^+)=\Phi(\sS(N,\Z)^+)$.
1178Observe that
1179$\Vol(\sS^+)=[\Z^d:\Phi(\sS^+)]$ and $|L(A_f,1)|=[\Z^d:\Phi(\e)\Z^d]$.
1180Let $W\subset\C^d$ be the $\Z$-module spanned by the columns of a basis
1181for $S_f(\Z)$.  Because $\Omega_f^0$ is computed with respect to
1182a basis for $S_f(\Z)$,
1183 $$\Vol(\sS^+)=[W:\T\mathbf{1}]\cdot \Omega_f^0.$$
1184Because $S_2(N,\Z)$  is saturated,
1185$[\Z^d:W]=1$ so $[\Z^d:\T\mathbf{1}]=[W:\T\mathbf{1}]$.
1186The following calculation involves lattices in $\R^d$:
1187\begin{eqnarray*}
1188[\Phi(\sS^+):\Phi(\T{}\e)]
1189     &=& [\Phi(\sS^+):\Z^d]\cdot[\Z^d:\Phi(\T{}\e)]\\
1190     &=& \frac{1}{[\Z^d:\Phi(\sS^+)]} \cdot [\Z^d:\Phi(\T\e)]\\
1191     &=&\frac{1}{\Vol(\sS^+)}\cdot [\Z^d:\Phi(\e)\Z^d]\cdot [\Phi(\e)\Z^d:\Phi(\T\e)]\\
1192     &=&\frac{|L(A_f,1)|}{\Vol(\sS^+)}\cdot[\Phi(\e)\Z^d:\Phi(\T\e)]\\
1193     &=&\frac{|L(A_f,1)|}{\Vol(\sS^+)}\cdot[\Phi(\e)\Z^d:\Phi(\e)\T{}\mathbf{1}]\\
1194     &=&\frac{|L(A_f,1)|}{\Omega_f^0\cdot [W:\T\mathbf{1}]}\cdot[\Z^d:\T{}\mathbf{1}]\\
1195%     &=&\frac{|L(A_f,1)|}{\Omega_f^0}\cdot [\Z^d:W]\\
1196     &=&\frac{|L(A_f,1)|}{\Omega_f^0}.\\
1197\end{eqnarray*}
1198The theorem now follows from lemmas \ref{algphi}, \ref{latticeker},
1199and the fact that $f$ has real Fourier coefficients so $L(A_f,1)\in\R$
1200hence $|L(A_f,1)|=\pm L(A_f,1)$.
1201
1202\end{proof}
1203
1204\begin{corollary}
1205Let $n_f$ be the order of the image in $A_f(\Q)$ of the point
1206$(0)-(\infty)\in J_0(N)(\Q)$.  Then
1207$$\frac{L(A_f,1)}{\Omega_f^0}\in \frac{1}{n_f}\Z.$$
1208\end{corollary}
1209\begin{proof}
1210Let $x$ denote the image of $(0)-(\infty)\in A_f(\Q)$
1211and set $I=\Ann(x)\subset\T$.   Since $f$ is a {\em newform}
1212the Hecke operators $T_p$ for $p|N$ act as $0$ or $\pm 1$ on
1213$A_f(\Q)$ (end of section 6 of \cite{diamond-im}).
1214If $p\nmid N$ a standard calculation (section 2.8 of \cite{cremona:algs})
1215combined with the Abel-Jacobi theorem shows that $T_p(x) = (p+1)x$.
1216Let $C=\Z{}x$ denote the (finite, by Manin-Drinfeld) cyclic subgroup of
1217$A_f(\Q)$ generated by $x$, so $n_f$ is the order of $C$.
1218There is an injection
1219$\T/I\hookrightarrow C$
1220sending $T_p$ to $T_p(x)$.
1221By the theorem, we have
1222\begin{eqnarray*}
1223\pm L(A_f,1)/\Omega_f^0 &=& [\Psi(\sS^+):\Psi(\T{}e)]\\
1224     &=& [\Psi(\sS^+):\Psi(I\e)]\cdot [\Psi(I\e):\Psi(\T{}\e)]\\
1225     &=& [\Psi(\sS^+):I\Psi(\e)]\cdot [I\Psi(\e):\T{}\Psi(\e)]\\
1226     &=& \frac{[\Psi(\sS^+):I\Psi(\e)]}{[\T{}\Psi(\e):I\Psi(\e)]} \in \frac{1}{n_f}\Z.
1227\end{eqnarray*}
1228The final inclusion follows from two observations.
1229By Abel-Jacobi, $I$ is exactly those
1230elements of $\T$ which send $\Psi(\e)$ into $\Psi(\sS^+)$, so
1231$[\Psi(\sS^+):I\Psi(\e)]\in\Z$.  Second, there is a surjective map
1232$$\T/I \ra \frac{\T\Psi(\e)}{I\Psi(\e)}$$
1233sending $t$ to $t \Psi(\e)$, so $[\T{}\Psi(\e):I\Psi(\e)]$
1234divides $n_f=|C|=|\T/I|$.
1235\end{proof}
1236
1237
1238% analytic.tex
1239
1240\section{Analytic invariants}
1241Let
1242$$f =\sum_{n\geq 1} a_n q^n\in S_k(N,\eps)$$ be a newform,
1243{\bf and assume that $\eps^2=1$.}
1244Let $K_f = \Q(\ldots a_n \ldots)$ and
1245let $f_1,\ldots,f_d$ be the Galois conjugates of~$f$,
1246where $d=[K_f:\Q]$.
1247As in Section~\ref{sec:tori},
1248we consider the complex torus $A_f$ attached to~$f$.
1249In this section we describe how to compute the torus $A_f$ and
1250the special values at the critical integers $1,2,\ldots,k-1$
1251of the~$L$ function  associated to~$f$.
1252
1253Recall that the $L$-series associated to~$f$ is
1254  $$L(f,s) \defeq \sum_{n=1}^{\infty} a_n n^{-s},$$
1255and that Hecke proved that $L(f,s)$ has an analytic
1256continuation to the whole complex plane.
1257Set
1258$$L(A_f,s) \defeq \prod_{i=1}^d L(f_i,s).$$
1259When $k=2$ and $\eps=1$, this is the canonical $L$-series
1260associated to the abelian variety $A_f/\Q$.
1261
1262Let
1263  $$g = \sum_{n\geq 1} a_n q^n \in M_k(N,\eps)$$
1264be a modular form (we do not assume that~$g$ is an eigenform).
1265We recall the integration pairing of Theorem~\ref{thm:perfectpairing}:
1266$$1267 \langle\,, \,\rangle:\, M_k(N,\eps) \cross \sM_k(N,\eps) 1268 \lra \C$$
1269$$\langle f , P\{\alp,\beta\}\rangle = 1270 \twopii \int_{\alp}^{\beta} f(z)P(z,1) dz.$$
1271Let $I_f\subset \T$ be the kernel of the
1272map $\T\ra K_f$ sending~$T_n$ to~$a_n$.
1273The integration pairing
1274gives rise to the period mapping\label{defn:periodmapping}
1275$$\Phi_f : \sM_k(N,\eps) \ra \Hom(S_k(N,\eps)[I_f],\C),$$
1276and $A_f = \Hom(S_k(N,\eps)[I_f],\C)/\Phi_f(\sS_k(N,\eps))$
1277is the cokernel.
1278
1279\subsection{Extended modular symbols}\label{defn:extendedmodsyms}
1280For the purposes of computing periods, it
1281is advantageous to extend the notion of modular
1282symbols to allows symbols of the form
1283$P\{z,w\}$ where~$z$ and~$w$ are now
1284arbitrary elements of $\h^*=\h\union\P^1(\Q)$.
1285The  free abelian group $\esM_k$
1286of \defn{extended modular symbols}
1287is spanned by such symbols, and is of uncountable
1288rank over~$\Z$.  However, it is still equipped with
1289an action of $\gzero$ and we can form the
1290largest torsion-free quotient
1291$\esM_k(N,\eps)$ of $\esM_k$ by
1292the relations $\gam x = \eps(\gam)x$ for
1293$\gam\in\gzero$.
1294
1295The integration pairing
1296extends to $\esM_k(N,\eps)$.  There is a natural
1297embedding
1298$\iota: \sM_k(N,\eps)\hookrightarrow \esM_k(N,\eps)$
1299which respect the pairing in the sense that
1300   $\langle f, \iota(x)\rangle = \langle f , x\rangle.$
1301In many cases it is advantageous to replace
1302$x\in\sM_k(N,\eps)$ first by $\iota(x)$, and then
1303by an equivalent sum $\sum y_i$ of symbols
1304$y_i\in \esM_k(N,\eps)$.
1305The period
1306   $\langle f, x\rangle$
1307is then replaced by the  equivalent
1308sum of periods $\sum \langle f , y_i\rangle$.
1309The latter is frequently {\em much} easier to approximate
1310numerically.
1311
1312
1313\subsection{Numerically computing period integrals}
1314Consider a point~$\alp$ in the upper half plane
1315and any one of the (extended) modular symbols
1316$X^mY^{k-2-m}\{\alp,\infty\}$.
1317Given a cuspform $g =\sum_{n\geq 1} b_n q^n\in S_k(N,\eps)$
1318and an integer $m\in \{0,1,\ldots,k-2\}$, we find that
1319\begin{equation}\label{intsum}
1320\langle g, \, X^mY^{k-2-m}\{\alpha,\infty\}\rangle =
1321\twopii \int_{\alpha}^{i\infty} g(z)z^m dz =
1322\twopii \sum_{n=1}^{\oo} b_n \int_{\alpha}^{i\infty} e^{2\pi i n z} z^m dz.
1323\end{equation}
1324The reversal of summation and integration is justified because
1325the imaginary part of~$\alp$ is positive so that the sum
1326converges absolutely.  This is made explicit in the following
1327lemma, which can be proved using repeated integration by parts.
1328\begin{lemma}\label{lem:intexp}
1329\begin{equation}\label{intexp}
1330\int_{\alpha}^{i\infty} e^{2\pi i n z} z^m dz
1331   \,\,=\,\, e^{2\pi i n \alpha}
1332      \sum_{s=0}^m \left(
1333          \frac{(-1)^s \alpha^{m-s}}
1334              {(2\pi i n)^{s+1}}
1335         \prod_{j=(m+1)-s}^m j\right).
1336\end{equation}
1337\end{lemma}
1338
1339The following proposition is the higher weight
1340analogue of \cite[Prop. 2.1.1(5)]{cremona:algs}.
1341\begin{proposition}\label{modsym-errorterm}
1342For any $\gam\in \Gamma_0(N)$, $P\in V_{k-2}$ and $\alp\in\h^*$
1343the following holds:
1344\begin{eqnarray}
1345P\{\oo, \gam(\oo)\}
1346  &=& P\{\alp,\gam(\alp)\} + (P - \eps(\gam)\gam^{-1}P)\{\oo,\alp\}\\
1347  &=& \eps(\gam)(\gam^{-1}P)\{\alp, \oo\} - P\{\gamma(\alp),\oo\}.
1348\end{eqnarray}
1349\end{proposition}
1350\begin{proof}
1351By definition, if $x\in\sM_k(N,\eps)$ is a modular symbol
1352and $\gam\in\Gamma_0(N)$ then $\gam{}x=\eps(\gam)x$;
1353in particular, $\eps(\gam)\gam^{-1}x=x$, so
1354\begin{eqnarray*}
1355P\{\oo, \gam(\oo)\}
1356  &=& P\{\oo,\alp\} + P\{\alp,\gam(\alp)\} + P\{\gam(\alp),\gam(\oo)\}\\
1357  &=& P\{\oo,\alp\} + P\{\alp,\gam(\alp)\} + \eps(\gam)\gam^{-1}(P\{\gam(\alp),\gam(\oo)\})\\
1358  &=& P\{\oo,\alp\} + P\{\alp,\gam(\alp)\} + \eps(\gam)(\gam^{-1}P)\{\alp, \oo\}\\
1359  &=& P\{\alp,\gam(\alp)\} + P\{\oo,\alp\}  - \eps(\gam)(\gam^{-1}P)\{\oo, \alp\}\\
1360  &=& P\{\alp,\gam(\alp)\} + (P - \eps(\gam)\gam^{-1}P)\{\oo,\alp\}.
1361\end{eqnarray*}
1362The second equality in the statement of the proposition now follows easily.
1363\end{proof}
1364In the classical case of weight two and trivial character,
1365the error term $(P - \eps(\gam)\gam^{-1}P)\{\oo,\alp\}$
1366vanishes.  In general this term does
1368(or rendering apparently unrepairable) the
1369analogues of the formulas
1370found in \cite[2.10]{cremona:algs}.
1371
1372\begin{algorithm}
1373Given a triple $\gam\in\Gamma_0(N)$,  $P\in V_{k-2}$ and
1374$g\in S_k(N,\eps)$
1375(as a $q$-expansion to some precision) this algorithm computes
1376the period integral
1377$\langle g, \,P\{\oo, \gamma(\oo)\}\rangle.$
1378Express $\gam$ as $\abcd{\hfill a}{b}{cN}{d}\in\gzero$ and take
1379$\alp = \frac{-d+i}{cN}$ in Proposition~\ref{modsym-errorterm}.
1380Replacing~$\gam$ by $-\gam$ if necessary,
1381we find that the imaginary parts of~$\alp$ and
1382$\gam(\alp)=\frac{a+i}{cN}$
1383are both $1/cN>0$.
1384Equation~\ref{intsum} and Lemma~\ref{lem:intexp} can now be
1385used to compute the period integrals of
1386Proposition~\ref{modsym-errorterm}.
1387\end{algorithm}
1388
1389With the goal of computing period lattices in mind, it is
1390reassuring to know that every element of $\sS_k(N,\eps)$
1391can be written as a linear combination of symbols of the form
1392$P\{\oo,\gamma(\oo)\}$.
1393In the special case of weight two and trivial character,
1394this is the assertion (proved by Manin~\cite{manin:parabolic})
1395that the group  homomorphism  $\Gamma_0(N)\ra H_1(X_0(N),\Z)$
1396sending~$\gamma$ to $\{0,\gamma(0)\}$ is surjective.  When the
1398group-theoretic statement.
1399
1400\begin{proposition}\label{onlyoo}
1401Any element of $\sS_k(N,\eps)$ can be written in the form
1402$$\sum_{i=1}^n P_{i}\{\infty,\gam_i(\infty)\}$$
1403with $P_i\in V_{k-2}$ and $\gam_i\in\gzero.$
1404Moreover, $P_i$ and $\gamma_i$ can be chosen so that
1405$\sum \eps(\gamma_i) P_i = \sum \gamma_i^{-1} P_i$.
1406\end{proposition}
1407\begin{proof}\footnote{Helena Verrill found this proof!}
1408First recall
1409the definition of the spaces~$\sM$,
1410$\sM_k=V_{k-2}\tensor\sM$ and
1411$\sM_k(N,\eps)=\sM_k/I$ (see Section~\ref{sec:defnofmodsyms}).
1412Let $I=I_{N,\eps}$ be the ideal in the
1413group ring of~$\gzero$ generated by all
1414elements of the form $\eps(\gamma) -\gamma$
1415for $\gam\in\gzero$.
1416
1417Suppose $v\in\sS_k(N,\eps)$.  Use the relation
1418$\{\alp,\beta\}=\{\oo,\beta\}-\{\oo,\alp\}\in\sM$
1419to see that any~$v$ is the image
1420of an element $\tilde{v}\in \sM_k$ of the form
1421  $$\tilde{v} = \sum_{\beta\in\Q}P_\beta\tensor \{\oo,\beta\}\in \sM_k$$
1422with only finitely many $P_\beta$ nonzero.
1423The boundary map~$\delta$ lifts in a natural way
1424to $V_{k-2}\tensor\sM$, as illustrated.
1425$$\xymatrix{ 1426&I(V_{k-2}\otimes\sM)\ar[r]\ar[d]& 1427 I(V_{k-2}\otimes\sB)\ar[d] \\ 1428&V_{k-2}\otimes\sM\ar[r]^{\tilde{\delta}}\ar[d] & V_{k-2}\otimes\sB\ar[d] \\ 1429*++{\sS_k(N,\eps)}\[email protected]{^{(}->}[r] 1430&\sM_k(N,\eps)\ar[r]^{\delta} 1431&\sB_k(N,\eps)\\ 1432}\qquad\qquad\mbox{}$$
1433Our assumption that $\delta(v)=0$ implies that
1434$\tilde{\delta}(\tilde{v})\in I(V_{k-2}\otimes\sB)$.
1435So there are $Q_{\gam,\beta}\in V_{k-2}$,
1436for $\gam\in\gzero$ and $\beta\in\P^1(\Q)$, only
1437finitely many nonzero, such that
1438$$\tilde{\delta}(\tilde{v}) 1439 = \sum_{\gam,\beta}(\eps(\gamma)-\gamma) 1440 (Q_{\gamma,\beta}\tensor\{\beta\}).$$
1441We now use a summation trick.
1442\begin{eqnarray*}
1443\sum_{\beta\in\Q}
1444\tilde{\delta}(\tilde{v})
1445= P_\beta\tensor \{\beta\}-P_\beta\tensor \{\oo\}
1446&=& \sum_{\gam, \beta}
1447  \eps(\gamma) Q_{\gam,\beta}\tensor \{\beta\}
1448-(\gam Q_{\gam,\beta})\tensor \{\gam\beta\}\\
1449&=&
1450\sum_{\gam, \beta} \eps(\gamma) Q_{\gam,\beta}\tensor \{\beta\}
1451-(\gam{}Q_{\gam,\gam^{-1}\beta})\tensor \{\beta\}\\
1452&=&
1453\sum_{ \gam, \beta}\Bigl( \eps(\gamma)Q_{\gam,\beta}
1454    -\gam{}Q_{\gam,\gam^{-1}\beta}\Bigr)\tensor \{\beta\}.\\
1455\end{eqnarray*}
1456Equating terms we deduce that for $\beta\not=\infty$,
1457$$P_\beta=\sum_{\gam} 1458 \eps(\gam)Q_{\gam,\beta}-\gam{}Q_{\gam,\gam^{-1}\beta}.$$
1459Using this expression for $P_\beta$ and
1460that $\eps(\gamma)\gamma^{-1}$ acts trivially
1461on $\sM_k(N,\eps)$ we find that
1462\begin{eqnarray*}
1463v = \sum_{\beta}
1464P_\beta
1465\{\oo,\beta\}
1466&=&
1467\sum_{\gam,\beta}
1468\Bigl(\eps(\gam)Q_{\gam,\beta}
1469     -\gam{}Q_{\gam{},\gam^{-1}\beta}\Bigr)
1470\{\oo,\beta\}\\
1471&=&
1472\sum_{\gam,\beta}
1473\eps(\gam)Q_{\gam,\beta}
1474     -\eps(\gamma)\gamma^{-1}
1475      \Bigl(\gam{}Q_{\gam{},\gam^{-1}\beta}\Bigr)
1476\{\oo,\beta\}\\
1477&=&
1478\sum_{\gam,\beta}
1479\eps(\gam)Q_{\gam,\beta}\{\oo,\beta\}
1480-\eps(\gam)Q_{\gam,\gam^{-1}\beta}\{\gam^{-1}\oo,\gam^{-1}\beta\}\\
1481&=&
1482\sum_{\gam,\beta}
1483\eps(\gam)Q_{\gam,\beta}\{\oo,\beta\}
1484-\eps(\gam)Q_{\gam,\beta}\{\gam^{-1}\oo,\beta\}\\
1485&=&
1486\sum_{\gam,\beta}
1487\eps(\gam)Q_{\gam,\beta}
1488\{\oo,\gam^{-1}\oo\}.\\
1489\end{eqnarray*}
1490This is of the desired form.
1491\end{proof}
1492
1493Unlike the case of weight two and trivial character,
1494Proposition~\ref{onlyoo} does not give generators for $\sS_k(N,\eps)$.
1495This is because not every element of the form $P\{\oo,\gam(\oo)\}$
1496must lie in $\sS_k(N,\eps)$.  However, if $\gam P = P$ then
1497$P\{\oo,\gam(\oo)\}$ does lie in $\sS_k(N,\eps)$.  It would be
1498interesting to know whether $\sS_k(N,\eps)$ is generated by symbols of
1499the form $P\{\oo,\gam(\oo)\}$ with $\gam P = P$.  When $k$ is odd this
1500is clearly not the case: when $k=3$ the condition $\gamma P = P$
1501implies that $\gamma\in\gzero$ has an eigenvector with eigenvalue~$1$,
1502hence is of finite order.  When~$k$ is even the author can see no
1503obstruction to generating $\sS_k(N,\eps)$ using such symbols.
1504
1505\subsection{The $W_N$-trick}\label{sec:wntrick}
1506{\bf In this section we assume that~$k$ is even.}
1507Consider the involution $W_N$ defined in
1508Section~\cite{atkin-lehner}.  This is an involution that
1509acts on both modular symbols and modular forms.
1510The follow proposition shows how to compute
1511$\langle g, P\{\oo,\gam(\oo)\}$ under
1512certain restrictive assumptions.
1513It generalizes the main result of~\cite{cremona:periods} to
1514higher weight.
1515
1516\begin{proposition}\label{wntrick}
1517Let $g \in S_k(N,\eps)$ be a cuspform which is
1518an eigenform for the Atkin-Lehner involution~$W$
1519having eigenvalue $w\in \{\pm 1\}$.
1520Then for any $\gamma\in\Gamma_0(N)$ and any
1521$P\in V_{k-2}$, with the property that $\gamma P = \eps(\gamma)P$, we have
1522for any $\alp\in\h$ the following formula:
1523$$\langle g, P\{\oo,\gamma(\oo)\}\rangle = \hspace{4.5in}$$
1524$$\langle g, w \frac{P(Y,-NX)}{N^{k/2-1}}\{W(\alp),\oo\} 1525 +(P - w \frac{P(Y,-NX)}{N^{k/2-1}})\{i/\sqrt{N},\oo\} 1526 -P\{\gamma(\alp),\oo\} \rangle.$$
1527Here $W(\alp) = -1/(N\alp)$.
1528\end{proposition}
1529\begin{proof}
1530By Proposition~\ref{modsym-errorterm} our condition on~$P$
1531implies that $P\{\oo,\gamma(\oo)\}= P\{\alp,\gamma(\alp)\}$.
1532The steps of the following computation are described below.\vspace{1ex}\\
1533$\langle g, P\{\alp,\gamma(\alp)\}\rangle$\vspace{-1ex}
1534\begin{eqnarray*}
1535  &=&\langle g, P\{\alp,i/\sqrt{N}\} + P\{i/\sqrt{N},W(\alp)\}+P\{W(\alp),\gamma(\alp)\}
1536           \rangle \\
1537  &=&\langle g, w \frac{W(P)}{N^{k/2-1}}
1538        \{W(\alp),i/\sqrt{N}\} + P\{i/\sqrt{N},W(\alp)\}+P\{W(\alp),\gamma(\alp)\}
1539           \rangle \\
1540  &=&\langle g, (w \frac{W(P)}{N^{k/2-1}}-P)
1541        \{W(\alp),i/\sqrt{N}\} +P\{W(\alp),\oo\} - P\{\gamma(\alp),\oo\}\rangle\\
1542  &=& \langle g, w \frac{W(P)}{N^{k/2-1}}\{W(\alp),\oo\}
1543        +(P - w \frac{W(P)}{N^{k/2-1}})\{i/\sqrt{N},\oo\}
1544        -P\{\gamma(\alp),\oo\} \rangle.\\
1545\end{eqnarray*}
1546For the first step, we break the path into three paths.
1547In the second step, we apply the $W$-involution to the first
1548term, and use that the action of~$W$ is compatible with
1549the pairing $\langle \,,\, \rangle$. The third step involves
1550combining the first two terms and breaking up the third.
1551In the final step, we replace $\{ W(\alp), i/\sqrt{N}\}$
1552by $\{W(\alp),\infty\}+\{\infty,i/\sqrt{N}\}$ and regroup.
1553\end{proof}
1554
1555A good choice for~$\alp$ is
1556$\alp=\gamma^{-1}\left(\frac{b}{d}+\frac{i}{d\sqrt{N}}\right)$,
1557so that $W(\alp) = \frac{c}{d}+\frac{i}{d\sqrt{N}}$.
1558This maximizes the minimum of the imaginary parts
1559of~$\alp$ and~$W(\alp)$.
1560
1561Let $\gamma=\abcd{a}{b}{c}{d}\in \Gamma_0(N)$.
1562A polynomial~$P$ for which $\gamma (P)=P$ is given by
1563$$P(X,Y) = (cX^2 + (d-a)XY - bY^2)^{\frac{k-2}{2}}.$$
1564This formula was obtained by viewing $V_{k-2}$ as
1565the $k-2$th symmetric product of the two-dimensional
1566space on which $\gzero$ acts naturally.  For example,
1567observe that since $\det(\gamma)=1$
1568the symmetric product of two eigenvectors for~$\gamma$ is an eigenvector
1569in $V_{2}$ having eigenvalue~$1$.
1570For the same reason, if $\eps(\gamma)\neq 1$, there is
1571often no polynomial $P(X,Y)$ such that $\gamma(P)=\eps(\gamma) P$.
1572When this is the case, first choose~$\gamma$ so that $\eps(\gamma)=1$.
1573
1574Since the imaginary parts of the terms
1575$i/\sqrt{N}$, $\alp$ and $W(\alp)$ in the proposition
1576are all relatively large, the sums appearing in
1577Equation~\ref{intsum} converge quickly if~$d$ is small.
1578Let us emphasize, that {\em it
1579is {\bf extremely} important to choose~$\gamma$
1580in Proposition~\ref{wntrick} with~$d$ small, otherwise
1581the series will converge {\em very} slowly.}
1582
1583
1584\subsection{Computing the period map}\label{computephi}
1585Let $I\subset \T$ be the kernel of the
1586map $\T\ra K_f$ sending~$T_n$ to~$a_n$.
1587As in Section~\ref{sec:ratperiod},
1588let $\Theta_f$ be the rational period mapping associated to~$f$.
1589We have a commutative diagram
1590$$\xymatrix{ 1591 {\sM_k(N,\eps)}\ar[dr]_{\Theta_I}\ar[rr]^{\Phi_f} 1592 & & \Hom(S_k(N,\eps)[I],\C) \\ 1593 & {\displaystyle\frac{\sM_k(N,\eps)}{\ker(\Phi_f)}}\ar[ur]^{\iota} 1594}$$
1595Using Algorithm~\ref{alg:ratperiod}, we can
1596compute $\Theta_f$ so to compute $\Phi_f$ we need to compute~$\iota$.
1597Let $g_1,\ldots,g_d$ be a basis for the $\Q$-vector space $S_k(N,\eps;\Q)[I]$.
1598We will compute the period mapping with respect to the basis of
1599$\Hom(S_k(N,\eps;\Q)[I],\C)$ dual to this basis.
1600Choose elements $x_1,\ldots,x_d\in \sM_k(N,\eps)$
1601with the following properties:
1602\begin{enumerate}
1603\item Using Proposition~\ref{modsym-errorterm} or Proposition~\ref{wntrick}
1604it is possible to efficiently compute the period integrals
1605$\langle g_i, x_j \rangle$, $i,j\in\{1,\ldots d\}$.
1606\item The $2d$ elements $v+*v$ and $v-*v$ for $v=\Theta_I(x_1),\ldots,\Theta_I(x_d)$
1607span a space of dimension $2d$.
1608\end{enumerate}
1609Given this data, we can compute
1610$$\iota (v+*v) = 1611 2\Re(\langle g_1, x_i\rangle, \ldots, \langle g_d, x_i\rangle)$$
1612and
1613$$\iota (v-*v) = 1614 2i\Im(\langle g_1, x_i\rangle, \ldots, \langle g_d, x_i\rangle).$$
1615We break the integrals into real and imaginary parts because this
1616increases the precision of our answers.
1617Since the vectors $v_n+*v_n$ and $v_n-*v_n$, $n=1,\ldots,d$ span
1618$\frac{\sM_k(N,\eps)}{\ker(\Phi_f)}$  we have computed~$\iota$.
1619
1620It is advantageous when possible to find symbols~$x_i$ satisfying the
1621conditions of Proposition~\ref{wntrick}.  This is usually possible
1622when~$d$ is very small, but in practice we have had problems doing
1623this when~$d$ is large, for example with \text{\bf 131k2B},
1624in which case the dimension is~$10$.
1625
1626\subsection{Computing special values}
1627\label{sec:compspecval}
1628For $s = 1,\ldots,k-1$ we have
1629\begin{eqnarray}\label{specialvalueformula}
1630  L(f,s)   &=&
1631    \frac{-2\pi^{s-1}i^{s-1}}{(s-1)!}\cdot
1632      \langle f, X^{s-1}Y^{k-1-s}\{0,\oo\}\rangle,\\
1633  L(A_I,s) &=& \prod_{i=1}^d L(f_i,s).
1634\end{eqnarray}
1635For ease of notation let
1636$$\e_i := X^{s-1}\{0,\oo\}$$
1637denote the $i$th \defn{winding element}.
1638In section~\ref{computephi} we computed the period map
1639$\Phi_f$ with respect to a basis $g_1,\ldots,g_d$
1640for $S_k(N,\eps;\Q)[I]$.
1641Upon writing~$f$ as a $K_f$-linear combination
1642$\alp_1 g_1+ \cdots+ \alp_d g_d$ we find that
1643\begin{eqnarray*}
1644\langle f, \e_i\rangle
1645    &=& \langle \alp_1 g_1+ \cdots+ \alp_d g_d, \e_i\rangle\\
1646    &=& \alp_1 \langle g_1, \e_i \rangle + \cdots
1647        \alp_d \langle g_d, \e_i \rangle\\
1648    &=& \alp_1 \Phi_f(\e_i)_1 + \cdots
1649        \alp_d \Phi_f(\e_i)_d
1650\end{eqnarray*}
1651Here $\Phi_f(\e_i)_j$ denotes the $j$th coordinate of
1652$\Phi_f(\e_i)$.
1653Finally using Equation~\ref{specialvalueformula} we compute
1654the special value.
1655
1656\subsection{Computing the real and pure imaginary volume}
1657\label{sec:realvolume}
1658[[THIS SECTION IS REALLY BAD; WHAT HAPPENED?  See
1659\begin{verbatim}
1660  /home/was/papers/periods/old/periods.tex
1661\end{verbatim}
1662for something that is much better.
1663]]
1664
1665By Proposition~\ref{prop:starpairing}, for any $x\in\sS_k(N,\eps)$
1666we have that
1667\begin{eqnarray*}
1668  \overline{\Phi_f(x)} &=& (\overline{\langle g_1, x\rangle},
1669                  \ldots,\overline{\langle g_d,x\rangle})\\
1670        &=& (\langle g_1^*, x^*\rangle,
1671                  \ldots, \langle g_d^*,x^*\rangle)\\
1672        &=& (\langle g_1, x^*\rangle,
1673                  \ldots, \langle g_d,x^*\rangle)
1674          \in \Phi_f(\sS_k(N,\eps)).
1675\end{eqnarray*}
1676Therefore complex conjugation leaves the period
1677lattice $\Lambda_f=\Phi_f(\sS_k(N,\eps))$ invariant, which
1678means that $A_f = \C^d/\Lambda_f$
1679is equipped with an action of complex conjugation.
1680We can thus define the real and imaginary volumes of $A_f$.
1681Let $g_1,\ldots,g_d$ be a
1682$\Z$-basis for $S_k(N,\eps;\Z)[I_f]$.  This choice
1683equips $A_f=\C^d/\Lambda_f$ with a real-valued measure~$\mu$.
1684We define the \defn{real volume} $\Omega_f^+=\mu(A_f(\R))$ to be the measure
1685of the points of $A_f$ invariants under complex conjugation.
1686The \defn{imaginary volume}  $\Omega_f^-=\mu(A_f(\C)^{-})i^d$ is the
1687measure of those points anti-invariant under complex conjugation,
1688multiplied by the power $d=\dim A_f$ of~$i$.
1689
1690Suppose~$s$ is an integer in the set $\{1,\ldots,k-1\}$.
1691If~$s$ is odd then the ratio $L(A_f,s)/\Omega_f^+$ is a
1692rational number.  When~$s$ is even the ratio
1693$L(A_f,s)/\Omega_f^-$ is an integer times a power of~$2$.
1694This is proved in Section~\ref{sec:rationalvals}.
1695
1696When $k=2$ and~$\eps$ is trivial, $A_f$
1697has the structure of abelian variety over~$\Q$.
1698The quantity $\Omega_f^+$ above is
1699related to the quantity $\Omega_A$\label{defn:omega} appearing in the Birch
1700and Swinnerton-Dyer conjecture \cite{tate:bsd}
1701for $A_f$.  The latter quantity is the volume
1702of $A_f(\R)$ with respect to a basis of integral
1703differentials on the N\'{e}ron model of $A_f$ over $\Spec(\Z)$.
1704The two quantities are related by the
1705Manin constant, which the author conjectures is always~$1$
1706(see Section~\ref{sec:maninconstant}).
1707
1708\subsection{Examples}
1709\subsubsection{Jacobians of genus two curves}
1710\label{sec:analytic-empirical}
1711The authors of~\cite{empirical}
1712gather empirical evidence for the BSD conjecture for
1713Jacobian of genus two curves.  Of the~$32$ Jacobians considered, all but
1714four are optimal quotients of $J_0(N)$ for some~$N$.  The methods
1715of this section can be used to compute $\Omega_f^{+}$ for the
1716Jacobians of these~$28$ curves.   Using explicit models
1717for the genus two curves, the authors of \cite{empirical}
1718computed the volume of~$A$ with respect to a basis for the N\'eron
1719differentials of~$A$. In all~$28$ cases our answers agreed
1720to the precision computed.  Thus in these cases we have numerically
1721verified that the Manin constant equals one.
1722
1723The first example considered in \cite{empirical} is the Jacobian
1724$A=J_0(23)$ of the modular curve $X_0(23)$.  This curve has as a model
1725     $$y^2+(x^3+x+1)y = -2x^5-3x^2+2x-2$$
1726from which one can compute the BSD $\Omega_A = 2.7328...$.
1727The following integral basis of cusp forms for $S_2(23)$ can
1728be found using the method described in
1729Section~\ref{sec:intbasis}:
1730\begin{eqnarray*}
1731 g_1 &=&   q - q^3 - q^4 - 2q^6 + 2q^7 + \cdots        \\
1732 g_2 &=& q^2 - 2q^3 - q^4 + 2q^5 + q^6 + 2q^7 +\cdots
1733\end{eqnarray*}
1734The space $\sM_2(23;\Q)$ of modular symbols has dimension five and is spanned
1735by  $\{-1/19,0\}$, $\{-1/17,0\}$, $\{-1/15,0\}$, $\{-1/11,0\}$
1736and $\{\oo,0\}$.  The submodule $\sS_2(23;\Z)$ has rank four and
1737has as basis the first four of the above five symbols.
1738Choose $\gamma_1 = \abcd{8}{1}{23}{3}$ and
1739$\gamma_2=\abcd{6}{1}{23}{4}$ and let
1740$x_i = \{\oo,\gamma_i(\oo)\}$.
1741Using the $W_N$-trick (see Section~\ref{sec:wntrick}) we compute
1742the period integrals $\langle g_i, x_j\rangle$ using $97$ terms
1743of the $q$-expansions of $g_1$ and $g_2$, and obtain
1744$$\begin{array}{ll} 1745\langle g_1, x_1 \rangle \almost -1.3543+1.0838i,\qquad 1746 &\langle g_1, x_2 \rangle \almost -0.5915+ 1.6875i\\ 1747\langle g_2, x_1 \rangle \almost -0.5915 - 0.4801i,\qquad 1748 &\langle g_2, x_2 \rangle \almost -0.7628 + 0.6037i 1749\end{array}$$
1750Using $97$ terms we already obtain about 14 decimal digits
1751of accuracy, but we don't reproduce them all here.
1752We next find that
1753$$\langle g_1, x_1 + x_1^*\rangle \sim 2\Re(-1.3543+1.0838i) = 2.7086,$$
1754and so on.
1755Upon writing each generator of $\sS_2(23)$ in terms
1756of $x_1 + x_1^*$, $x_1 - x_1^*$, $x_2 + x_2^*$ and $x_2 - x_2^*$
1757we discover that the period mapping with respect to the
1758basis dual to $g_1$ and $g_2$ is (approximately)
1759$$\begin{array}{rcll} 1760\{-1/19,0\}&\mapsto&(\hspace{.8em}0.5915 - 1.6875i,& \hspace{.8em}0.7628 - 0.6037i)\\ 1761\{-1/17,0\}&\mapsto&(-0.5915 - 1.6875i,& -0.7628 - 0.6037i)\\ 1762\{-1/15,0\}&\mapsto&(-1.3543 - 1.0838i,& -0.5915 + 0.4801i)\\ 1763\{-1/11,0\}&\mapsto&(-1.5256,& \hspace{.8em}0.3425) 1764\end{array}$$
1765Working in $\sS_2(23)$ we find $\sS_2(23)^+$ is spanned by
1766$\{-1/19,0\}-\{-1/17,0\}$ and $\{-1/11,0\}$.  Using
1767the algorithm of Section~\ref{sec:realvolume},
1768we find that there is only one real component so
1769$$\Omega_I^+ \sim 1770\left|\begin{array}{cc} 1771 1.1831 & 1.5256 \\ 1772 -1.5256 & 0.3425 1773\end{array}\right| = 2.7327...$$
1774To greater precision we find that $\Omega_f^+\sim 2.7327505324965$.
1775This agrees with the value in \cite{empirical}; since the Manin constant
1776is an integer, it must equal~$1$.
1777
1778\subsubsection{Level one cusp forms}
1779In the following two sections we consider several specific examples
1780of tori attached to modular forms of weight greater than two.
1781
1782Let $k\geq 12$ be an even integer.  Associated to each Galois
1783conjugacy class of normalized eigenforms~$f$, there is a
1784torus $A_f$ over~$\R$.
1785The real and pure imaginary volumes of the first few of
1786these tori are displayed in
1787Table~\ref{table:vols}\footnote{It didn't take more than three minutes
1788to compute any number in this table}.  (For weights~$24$ and~$28$ we
1789give $\Omega^-/i$ so that the columns will line up nicely.)
1790In each case, $97$ terms of the $q$-expansion were used.
1791
1792\begin{table}
1793\begin{center}
1794\caption{Volumes of level one cusp forms.\label{table:vols}}
1795\begin{tabular}{|c|}\hline
1796\vspace{-2ex}\\
1797$\begin{array}{clll} 1798\hspace{2em}k\hspace{2em} & \hspace{4em}\Omega^+ \hspace{4em}& 1799 \hspace{4em}\Omega^-\hspace{4em}\\ 1800 12& 0.002281474899 & 0.000971088287i \\ 1801 16 &0.003927981492 & 0.000566379403i \\ 1802 18& 0.000286607497 & 0.023020042428i \\ 1803 20& 0.008297636952 & 0.0005609325015i \\ 1804 22& 0.002589288079 & 0.0020245743816i \\ 1805 24 &0.000000002968& 0.0000000054322i& \\ 1806 26 &0.003377464512 & 0.3910726132671i \\ 1807 28& 0.000000015627 & 0.0000000029272i& 1808\end{array}$
1809\vspace{-2ex}\\
1810\\\hline
1811\end{tabular}\end{center}
1812\end{table}
1813
1814The volumes appear to be {\em much} smaller than
1815the volumes of weight two abelian varieties.
1816The dimension of each $A_f$ is~$1$, except for
1817weights $24$ and $28$ when the dimension is~$2$.
1818%The invariants $c_4$, $c_6$, and~$j$ of the elliptic curves
1819%can be calculated from the period lattice using the
1820%algorithm described in \cite{cremona:algs}.
1821
1822
1823\subsubsection{CM elliptic curves of weight greater than two}
1824\label{cmellipticcurves}
1825Let~$f$ be a rational newform with complex multiplication.
1826Experimentally, it appears that the
1827associated elliptic~$A_f$ has rational $j$-invariant.
1828As evidence for this we present Table~\ref{table:cmcurves},
1829which includes the analytic data about every
1830rational CM form of weight  four and level $\leq 197$.
1831The computations of Table~\ref{table:cmcurves} were done
1832using at least~$97$ terms of the $q$-expansion of~$f$.
1833The rationality of $j$ could probably be proved by observing
1834that the CM forces $A_f$ to have extra automorphisms.
1835
1836\begin{table}
1837\begin{center}
1838\caption{CM elliptic curves of weight $>2$.\label{table:cmcurves}}
1839\begin{tabular}{|c|}\hline
1840$\begin{array}{rcccrr} 1841E & j &\Omega^+&\Omega^- & c_4\hspace{2em} & c_6 \hspace{2em} \\ 1842\text{\bf 9k4A} & 0 & 0.2095 & 0.1210i & 0.0000 & -56626421686.2951\\ 1843\text{\bf 32k4A} &1728 & 0.2283 & 0.2283i & -3339814.8874 & 0.0000\\ 1844\text{\bf 64k4D} &1728 & 0.1614 & 0.1614i& 53437038.1988 & 0.0000\\ 1845\text{\bf 108k4A} & 0 & 0.0440 & 0.0762i& -14699.2655 & 24463608892439.7456\\ 1846\text{\bf 108k4C}& 0 & 0.0554 & 0.0960i& 1608.7743 & 6115643810955.1724\\ 1847\text{\bf 121k4A}&-2^{15}& 0.0116 & 0.0385i & 184885659519816.8841 & 25723073306989527.1216\\ 1849\text{\bf 144k4E}& 0 & 0.0454 & 0.0262i& 81.1130& 1850-549788016394046.1396\\ 1851\text{\bf 27k6A} & 0 & 0.0110 & 0.0191i& 0.0000 & 97856189971744203.7795\\ 1852\text{\bf 32k6A} &1728 & 0.0199 & 0.0199i& -58095643136.7658&8.0094\\ 1853\end{array}$
1854\vspace{-2ex}\\
1855\\\hline
1856\end{tabular}\end{center}
1857\end{table}
1858
1859In these examples, the invariants $c_4$ and $c_6$ are unreckognizable
1860to the author; in contrast, in weight~$2$ these invariants are (expected to
1861be) integers (see \cite[2.14]{cremona:algs}).
1862
1863\comment{
1864\begin{remark}
1865For the curves  {\bf 32k4A} and {\bf 32k6A},
1866we have $\Omega^+=\Omega^-\pmod{i}$.
1867This is because each lattice admits complex multiplication by~$i$
1868and is hence invariant under rotation by $90$ degrees.
1869The same thing happens with the next few higher weights at
1870level~$32$.  For how many weights does it persists?
1871\end{remark}
1872
1873
1874function ssinvs(N,k)
1875   p  := 100;
1876   ss := 37;
1877   np := #[p : p in [1..ss] | IsPrime(p)];
1878   M:=ModularSymbols(N,k);
1879   D:=Decomposition(M);
1880   LabelFactors(D);
1881   L := [* *];
1882   for A in D do
1883      if IsNew(A) and IsCuspidal(A) then
1884         f  := qEigenform(A,ss);
1885         ns := #[i : i in [1..Degree(f)] | IsPrime(i) and Coefficient(f,i) eq 0];
1886         if ns/np gt 0.3 then
1887            e   := EllipticInvariants(A,p);
1888            omr := RealVolume(A,p);
1889            omi := ImaginaryVolume(A,p);
1890            printf "%ok%o%o\nc4=\t%o\nc6=\t%o\nj=\t%o\no=\t%o\ni=\t%o\n\n",
1891                   N,k,ToIsogenyCode(IsogenyClass(A)),e,e,e,omr,omi;
1892            Append(~L,A);
1893         end if;
1894      end if;
1895   end for;
1896   return L;
1897end function;
1898}
1899
1900\subsubsection{Some abelian varieties of large dimension}
1901In Table~\ref{table:bigvols}, we give the volumes of five abelian
1902varieties of dimension greater than~$1$.  In each case, at least
1903$200$ terms of the $q$-expansions were used.
1904\begin{table}
1905\begin{center}
1906\caption{Volumes of high dimensional abelian varieties.\label{table:bigvols}}
1907\begin{tabular}{|c|}\hline
1908\vspace{-2ex}\\
1909$\begin{array}{rcrr} 1910A & \dim & \hspace{2em}\Omega^+ & \hspace{2em}\Omega^- \\ 1911\text{\bf 79k2B} & 5 & 10 & 209i\\ 1912\text{\bf 83k2B} & 6 & 22 & 41\\ 1913\text{\bf 131k2B} & 10 & 51 & 615\\ 1914\text{\bf 11k4A} & 2 & 0.0815 & 0.0212\,\,\\ 1915\text{\bf 17k4B} & 3 & 0.0047 & 0.0007i\\ 1916\end{array}$
1917\vspace{-2ex}\\
1918\\\hline
1919\end{tabular}\end{center}
1920\end{table}
1921
1922
1923
1924
1925