<Chapter><Heading>Congruence Subgroups, Cuspidal Cohomology  and Hecke Operators</Heading>


In this chapter we explain how HAP can be used to make computions 
about modular forms associated to congruence subgroups <M>\Gamma</M> of <M>SL_2(\mathbb Z)</M>. Also, in  Subsection 10.8 onwards, we demonstrate
 cohomology computations for the <E>Picard group</E> <M>SL_2(\mathbb Z[i])</M>,
 some <E>Bianchi groups</E>
 <M>PSL_2({\cal O}_{-d}) </M> where <M>{\cal O}_{d}</M> is the ring of integers of <M>\mathbb Q(\sqrt{-d})</M> for  square free positive integer <M>d</M>, and some other groups of the form
<M>SL_m({\cal O})</M>, 
<M>GL_m({\cal O})</M>,
<M>PSL_m({\cal O})</M>, 
<M>PGL_m({\cal O})</M>,
 for <M>m=2,3,4</M> and certain <M>{\cal O}=\mathbb Z, {\cal O}_{-d}</M>.
 

<Section Label="sec:EichlerShimura"><Heading>Eichler-Shimura isomorphism</Heading>

<P/>We begin by recalling the Eichler-Shimura isomorphism
<Cite Key="eichler"/><Cite Key="shimura"/>
<Display> S_k(\Gamma) \oplus \overline{S_k(\Gamma)} \oplus E_k(\Gamma) \cong_{\sf Hecke} H^1(\Gamma,P_{\mathbb C}(k-2))</Display>
<P/> which relates the cohomology of groups to the theory of modular forms associated to a finite index subgroup <M>\Gamma</M> of <M>SL_2(\mathbb Z)</M>. In subsequent sections we explain how to compute with the right-hand side of the isomorphism. But first,
for completeness,  let us define the terms on the  left-hand side.

<P/> Let <M>N</M> be a positive integer. A subgroup <M>\Gamma</M> of <M>SL_2(\mathbb Z)</M> is said to be a  <E>congruence subgroup</E> of level <M>N </M> if it contains the kernel of the canonical homomorphism  <M>\pi_N\colon SL_2(\mathbb Z) \rightarrow SL_2(\mathbb Z/N\mathbb Z)</M>. 

So any congruence subgroup is of finite index in <M>SL_2(\mathbb Z)</M>, 
but the converse is not true. 

<P/>One congruence subgroup of particular interest is the group
<M>\Gamma_1(N)=\ker(\pi_N)</M>, known as the <E>principal congruence subgroup</E> of level <M>N</M>. Another congruence subgroup of particular interest is the group  <M>\Gamma_0(N)</M> of those matrices that project to upper triangular matrices
in <M>SL_2(\mathbb Z/N\mathbb Z)</M>.  

<P/>A <E>modular form</E> of weight <M>k</M> for a congruence subgroup
<M>\Gamma</M> is a complex valued  function on the upper-half plane,
 <M>f\colon {\frak{h}}=\{z\in \mathbb C : Re(z)>0\} \rightarrow \mathbb C</M>, satisfying:
<List>
<Item> <M>\displaystyle f(\frac{az+b}{cz+d}) = (cz+d)^k f(z)</M> for <M>\left(\begin{array}{ll}a&amp;b\\ c &amp;d \end{array}\right) \in \Gamma</M>,
</Item>
<Item> <M>f</M> is `holomorphic' on the <E>extended upper-half plane</E> 
<M>\frak{h}^\ast = \frak{h} \cup \mathbb Q \cup \{\infty\}</M> obtained from the upper-half plane by `adjoining a point at each cusp'.
</Item>
</List>
The collection of all weight <M>k</M> modular forms for <M>\Gamma</M> form a vector space <M>M_k(\Gamma)</M> over <M>\mathbb C</M>.

<P/>A modular form <M>f</M> is said to be a <E>cusp form</E> if <M>f(\infty)=0</M>. The collection of all weight <M>k</M> cusp forms for <M>\Gamma</M> form a vector subspace <M>S_k(\Gamma)</M>. There is a decomposition 
<Display>M_k(\Gamma) \cong S_k(\Gamma) \oplus E_k(\Gamma)</Display>
<P/> involving a summand <M>E_k(\Gamma)</M>  known as the <E>Eisenstein
space</E>. See <Cite Key="stein"/> for further introductory details on modular forms. 
<P/>The Eichler-Shimura isomorphism is more than an isomorphism of vector spaces. It is an isomorphism of Hecke modules: both sides admit  notions of <E>Hecke operators</E>, and the isomorphism preserves these operators. The bar on the left-hand side of the isomorphism denotes complex conjugation, or <E>anti-holomorphic</E> forms. See
<Cite Key="wieser"/> for a full account of the isomorphism.

<P/><P/>
On the right-hand side of the isomorphism, the <M>\mathbb Z\Gamma</M>-module 
<M>P_{\mathbb C}(k-2)\subset \mathbb C[x,y]</M> denotes the space of homogeneous degree 
<M>k-2</M> polynomials with action of <M>\Gamma</M> given by
<Display>\left(\begin{array}{ll}a&amp;b\\ c &amp;d \end{array}\right)\cdot p(x,y) = p(dx-by,-cx+ay)\ .</Display>
In particular <M>P_{\mathbb C}(0)=\mathbb C</M> is the trivial module.
Below we shall compute with the integral analogue <M>P_{\mathbb Z}(k-2) \subset \mathbb Z[x,y]</M>.


<P/><P/>
In the following sections we  explain how to use the right-hand side of the Eichler-Shimura
isomorphism to compute eigenvalues of the Hecke operators restricted to the 
 subspace        
 <M>S_k(\Gamma)</M> of cusp forms.

</Section>

<Section><Heading>Generators for <M>SL_2(\mathbb Z)</M> and the cubic tree</Heading>

<P/> The matrices 
<M>S=\left(\begin{array}{rr}0&amp;-1\\ 1 &amp;0 \end{array}\right)</M>
and <M>T=\left(\begin{array}{rr}1&amp;1\\ 0 &amp;1 \end{array}\right)</M>
generate <M>SL_2(\mathbb Z)</M> and it is not difficult to devise an algorithm for expressing an arbitrary integer matrix <M>A</M>
of determinant <M>1</M> as a word
in <M>S</M>, <M>T</M> and their inverses. The following illustrates such an algorithm.

<Example>
<#Include SYSTEM "tutex/11.1.txt">
</Example>

It is convenient to introduce the matrix <M>U=ST = \left(\begin{array}{rr}0&amp;-1\\ 1 &amp;1 \end{array}\right)</M>. The matrices <M>S</M> and <M>U</M>
also generate <M>SL_2(\mathbb Z)</M>. In fact we have a free presentation
 <M>SL_2(\mathbb Z)= \langle S,U\, |\, S^4=U^6=1, S^2=U^3 \rangle </M>. 

<P/><P/>
The <E>cubic tree</E> <M>\cal T</M> is a tree (<E>i.e.</E> a <M>1</M>-dimensional  contractible regular  
CW-complex) with countably infinitely many edges in which each vertex has degree <M>3</M>.


We can realize  the cubic tree <M>\cal T</M> by taking the
left cosets of <M>{\cal U}=\langle U\rangle</M> in <M>SL_2(\mathbb Z)</M> as vertices, and joining cosets
<M>x\,{\cal U} </M> and <M>y\,{\cal U}</M> by an edge if, and only if, 
<M>x^{-1}y \in {\cal U}\, S\,{\cal U}</M>. Thus the
vertex <M>\cal U </M> is joined to <M>S\,{\cal U} </M>, 
<M>US\,{\cal U}</M> and <M>U^2S\,{\cal U}</M>. The vertices of this tree
are in one-to-one
correspondence with all reduced words in <M>S</M>, <M>U</M>  and <M>U^2</M> 
that, apart from the identity, end in <M>S</M>.

<P/> From our realization of the cubic tree <M>\cal T</M>
we see that <M>SL_2(\mathbb Z)</M> acts on <M>\cal T</M> in such a way that
each vertex is stabilized by a cyclic subgroup conjugate to <M>{\cal U}=\langle U\rangle</M> and each edge is stabilized by a cyclic subgroup conjugate to
<M>{\cal S} =\langle S \rangle</M>.

<P/> In order to store this action of <M>SL_2(\mathbb Z)</M> on
the cubic tree <M>\cal T</M> we just need to record the following finite amount of information.
<P/>
<Alt Only="HTML">&lt;img src="images/fdsl2.png" align="center" width="350" alt="Information for the cubic tree"/>
</Alt>

</Section>

<Section><Heading>One-dimensional fundamental domains and  
generators for congruence subgroups</Heading>

The modular group <M>{\cal M}=PSL_2(\mathbb Z)</M> is isomorphic, as an abstract group, 
to the free product <M>\mathbb Z_2\ast \mathbb Z_3</M>. By the Kurosh subgroup 
theorem, any finite index subgroup <M>M \subset {\cal M}</M> is isomorphic to the free product 
of finitely many copies of <M>\mathbb Z_2</M>s, <M>\mathbb Z_3</M>s and <M>\mathbb Z</M>s. A
subset <M>\underline x \subset M</M> is  an <E>independent</E> 
 set of subgroup generators if <M>M</M> is the free product of the cyclic subgroups <M>&lt;x &gt;</M> as <M>x</M> runs over <M>\underline x</M>. Let us say 
that a set of elements in <M>SL_2(\mathbb Z)</M> is <E>projectively 
independent</E> if it maps injectively onto an independent set of subgroup generators <M>\underline x\subset {\cal M}</M>.  
The generating set <M>\{S,U\}</M> for <M>SL_2(\mathbb Z)</M> given in the preceding section is projectively independent. 

<P/> We are interested in constructing a set of generators for a given congruence subgroup <M>\Gamma</M>. If a small generating set for <M>\Gamma</M> is required then we should
 aim
to  construct one which is close to being  projectively independent. 

<P/>
 It is useful to    
invoke the following general result which follows from a perturbation result about free <M>\mathbb ZG</M>-resolutons in <Cite Key="ellisharrisskoldberg" Where="Theorem 2"/> and an old observation of John Milnor that a free <M>\mathbb ZG</M>-resolution can be realized as the cellular chain complex of a CW-complex if it can be so realized in low dimensions.

<P/><B>Theorem.</B> Let <M>X</M> be a contractible CW-complex on which a group
<M>G</M> acts by permuting cells. The cellular chain complex <M>C_\ast X</M> 
is a <M>\mathbb ZG</M>-resolution of <M>\mathbb Z</M> which typically is not free. 
Let <M>[e^n]</M> denote the orbit of the n-cell <M>e^n</M> under the action. Let <M>G^{e^n} \le G</M> denote the stabilizer subgroup of <M>e^n</M>, in which group elements are not required to stabilize <M>e^n</M> point-wise. Let <M>Y_{e^n}</M>
denote a contractible CW-complex on which <M>G^{e^n}</M> acts cellularly and freely. Then there exists a contractible CW-complex <M>W</M>
on which <M>G</M> acts cellularly and freely, and in which the orbits of <M>n</M>-cells are labelled by <M>[e^p]\otimes [f^q]</M> where <M>p+q=n</M> and 
<M>[e^p]</M> ranges over the <M>G</M>-orbits of <M>p</M>-cells  in <M>X</M>, <M>[f^q]</M> ranges over the <M>G^{e^p}</M>-orbits of <M>q</M>-cells in <M>Y_{e^p}</M>.
<P/>

<P/>Let <M>W</M> be as in the theorem. Then the quotient CW-complex <M>B_G=W/G</M> is a classifying space for <M>G</M>. Let <M>T</M> denote a maximal tree in the <M>1</M>-skeleton <M>B^1_G</M>. Basic geometric group theory tells us that  the <M>1</M>-cells in <M>B^1_G\setminus T</M> correspond to
a generating set for <M>G</M>.

<P/>
Suppose  we wish to compute a set of generators for a principal congruence subgroup 
<M>\Gamma=\Gamma_1(N)</M>. In the above theorem take <M>X={\cal T}</M> to be the cubic tree, and note that <M>\Gamma</M> acts freely on <M>\cal T</M> and thus that <M>W={\cal T}</M>. 
To determine the  <M>1</M>-cells of <M>B_{\Gamma}\setminus T</M>
 we need to determine a cellular subspace 
<M>D_\Gamma \subset \cal T</M>   whose images under the action of <M>\Gamma</M>  cover <M>\cal T</M> and are  pairwise either disjoint or identical. The subspace <M>D_\Gamma</M> will not be a CW-complex as it won't be closed, but it can be chosen to be connected, 
and hence contractible. We call <M>D_\Gamma</M> a <E>fundamental region</E> for <M>\Gamma</M>. We denote by <M>\mathring D_\Gamma</M> the 
largest CW-subcomplex of <M>D_\Gamma</M>. The vertices of <M>\mathring D_\Gamma</M> are the same as the vertices of <M>D_\Gamma</M>.
Thus <M>\mathring D_\Gamma</M> is a subtree of the cubic tree with <M>|\Gamma|/6</M> vertices. 
 For each vertex <M>v</M> in  the tree
<M>\mathring D_\Gamma</M> define <M>\eta(v)=3 -{\rm degree}(v)</M>. Then the number of  generators for <M> \Gamma </M>  will
 be <M>(1/2)\sum_{v\in \mathring D_\Gamma} \eta(v)</M>. 

 <P/> 
The following commands determine projectively independent 
generators for <M>\Gamma_1(6)</M> and display
<M>\mathring D_{\Gamma_1(6)}</M>. The subgroup <M>\Gamma_1(6)</M> is free on <M>13</M> generators. 

<Example>
<#Include SYSTEM "tutex/11.2.txt">
</Example>
<P/>
<Alt Only="HTML">&lt;img src="images/pctree6.gif" align="center" width="350" alt="Fundamental region in the   cubic tree"/>
</Alt>

<P/>An alternative but very related approach to computing generators  of congruence subgroups of <M>SL_2(\mathbb Z)</M>
 is described in <Cite Key="kulkarni"/>.
<P/>The congruence subgroup <M>\Gamma_0(N)</M> does not act freely on the vertices of <M>\cal T</M>, and so one needs to incorporate
 a generator for the cyclic stabilizer group according to the above theorem. Alternatively, we can replace the cubic tree by a six-fold cover 
<M>{\cal T}'</M> on whose vertex set  <M>\Gamma_0(N)</M> acts freely. 
This alternative approach will produce a  redundant set of generators.
The following commands  display
<M>\mathring D_{\Gamma_0(39)}</M> for a fundamental region in <M>{\cal T}'</M>. They also use the corresponding generating set for <M>\Gamma_0(39)</M>, 
involving <M>18</M> generators, to compute the abelianization <M>\Gamma_0(39)^{ab}= \mathbb Z_2 \oplus \mathbb Z_3^2 \oplus \mathbb Z^9</M>. The abelianization
  shows that any generating set has at least <M>11</M> generators.

<Example>
<#Include SYSTEM "tutex/11.3.txt">
</Example>
<P/>
<Alt Only="HTML">&lt;img src="images/g0tree39.gif" align="center" width="350" alt="Fundamental region in the   cubic tree"/>
</Alt>

<P/> Note that to compute <M>D_\Gamma</M> one only needs to be able to test whether a given matrix lies in <M>\Gamma</M> or not. 
Given an inclusion <M>\Gamma'\subset \Gamma</M> of congruence subgroups, it is straightforward to use the trees <M>\mathring D_{\Gamma'}</M> and <M>\mathring D_{\Gamma}</M> to compute a system of coset representative for <M>\Gamma'\setminus \Gamma</M>.
</Section>

<Section><Heading>Cohomology of congruence subgroups</Heading>

To compute the cohomology <M>H^n(\Gamma,A)</M> of a congruence subgroup 
<M>\Gamma</M> with coefficients in a <M>\mathbb Z\Gamma</M>-module <M>A</M>
 we need to construct <M>n+1</M> terms of a free
<M>\mathbb Z\Gamma</M>-resolution of <M>\mathbb Z</M>. We can do this by first 
using perturbation techniques (as described in <Cite Key="buiellis"/>) to combine the cubic tree with resolutions for
 the cyclic groups of order <M>4</M> and <M>6</M> in order to produce a free
<M>\mathbb ZG</M>-resolution <M>R_\ast</M> for <M>G=SL_2(\mathbb Z)</M>. This resolution is also a free <M>\mathbb Z\Gamma</M>-resolution with each term of rank
<Display>{\rm rank}_{\mathbb Z\Gamma} R_k = |G:\Gamma|\times {\rm rank}_{\mathbb ZG} R_k\ .</Display>
<P/>For congruence subgroups of lowish index in <M>G</M> this resolution suffices to make computations.

<P/>The following commands compute
<Display>H^1(\Gamma_0(39),\mathbb Z) = \mathbb Z^9\ .</Display>


<Example>
<#Include SYSTEM "tutex/11.4.txt">
</Example>

<P/>This  computation establishes that the space <M>M_2(\Gamma_0(39))</M>
of weight <M>2</M> modular forms is of dimension <M>9</M>.


<P/>The following commands show that 
<M>{\rm rank}_{\mathbb Z\Gamma_0(39)} R_1 = 112</M>
but that it is possible to apply `Tietze like' simplifications to <M>R_\ast</M> to obtain a free <M>\mathbb Z\Gamma_0(39)</M>-resolution <M>T_\ast</M>
with <M>{\rm rank}_{\mathbb Z\Gamma_0(39)} T_1 = 11</M>. It is  more efficient to work with <M>T_\ast</M> when making cohomology computations with coefficients in a module <M>A</M> of large rank. 
<Example>
<#Include SYSTEM "tutex/11.5.txt">
</Example>


<P/>The following commands compute
<Display>H^1(\Gamma_0(39),P_{\mathbb Z}(8)) = \mathbb Z_3 \oplus \mathbb Z_6
\oplus \mathbb Z_{168} \oplus \mathbb Z^{84}\ ,</Display>
<Display>H^1(\Gamma_0(39),P_{\mathbb Z}(9)) = \mathbb Z_2 \oplus \mathbb Z_2 .</Display>


<Example>
<#Include SYSTEM "tutex/11.4a.txt">
</Example>

<P/>This computation establishes that the space <M>M_{10}(\Gamma_0(39))</M>
of weight <M>10</M> modular forms is of dimension <M>84</M>, 
and <M>M_{11}(\Gamma_0(39))</M> is of dimension <M>0</M>. 
(There are never any modular forms of odd weight, and so 
<M>M_k(\Gamma)=0</M> for all odd <M>k</M> and any congruence subgroup 
<M>\Gamma</M>.)

<Subsection><Heading>Cohomology with rational coefficients</Heading>
To calculate cohomology <M>H^n(\Gamma,A)</M> with coefficients in a <M>\mathbb Q\Gamma</M>-module <M>A</M>  it suffices to construct a resolution of <M>\mathbb Z</M> by non-free <M>\mathbb Z\Gamma</M>-modules where <M>\Gamma</M> acts  with finite stabilizer groups on each module in the resolution. Computing over <M>\mathbb Q</M> is computationally less expensive than computing over <M>\mathbb Z</M>. The following commands first compute <M>H^1(\Gamma_0(39),\mathbb Q) = 
H_1(\Gamma_0(39),\mathbb Q)= \mathbb Q^9</M>. As a larger example, they then compute 
<M>H^1(\Gamma_0(2^{13}-1),\mathbb Q) =\mathbb Q^{1365}</M> where <M>\Gamma_0(2^{13}-1)</M> has index <M>8192</M> in <M>SL_2(\mathbb Z)</M>.

<Example>
<#Include SYSTEM "tutex/11.4b.txt">
</Example>
</Subsection>
</Section>

<Section><Heading>Cuspidal cohomology</Heading>
To define and compute cuspidal cohomology we  consider the action of 
<M>SL_2(\mathbb Z)</M> on the upper-half plane <M>{\frak h}</M>
given by
<Display>\left(\begin{array}{ll}a&amp;b\\ c &amp;d \end{array}\right) z =
\frac{az +b}{cz+d}\ .</Display>
A standard 'fundamental domain' for this action is the region

<Display>\begin{array}{ll}
 D=&amp;\{z\in {\frak h}\ :\ |z| &gt; 1, |{\rm Re}(z)| &lt; \frac{1}{2}\} \\ 
&amp;
\cup\ \{z\in {\frak h} \ :\ |z| \ge 1, {\rm Re}(z)=-\frac{1}{2}\}\\ 
&amp; \cup\ \{z \in {\frak h}\ :\ |z|=1, -\frac{1}{2} \le {\rm Re}(z) \le 0\}
\end{array}
</Display>
illustrated below.

<P/><Alt Only="HTML">&lt;img src="images/filename-1.png" align="center" width="450" alt="Fundamental domain in the upper-half plane"/>
</Alt>

<P/> The action factors through an action of
<M>PSL_2(\mathbb Z) =SL_2(\mathbb Z)/\langle
\left(\begin{array}{rr}-1&amp;0\\ 0 &amp;-1 \end{array}\right)\rangle</M>.  The images of <M>D</M> under the action of <M>PSL_2(\mathbb Z)</M> 
cover the upper-half plane, and any two images have at most a single point in common. The possible common points are the bottom left-hand corner point which is stabilized by <M>\langle U\rangle</M>, and  the bottom middle point which is stabilized by <M>\langle S\rangle</M>.  

<P/> A congruence subgroup <M>\Gamma</M>  
has a `fundamental domain' <M>D_\Gamma</M> equal to a union of finitely many 
copies of <M>D</M>, one copy for each coset in <M>\Gamma\setminus SL_2(\mathbb Z)</M>. 
The
quotient space <M>X=\Gamma\setminus {\frak h}</M> is not compact, and can be 
compactified in several ways. We are interested in the Borel-Serre 
compactification.
This is a space <M>X^{BS}</M> for which there is an inclusion
<M>X\hookrightarrow X^{BS}</M> and this inclusion is a homotopy equivalence. 
One defines the  <E>boundary</E> <M>\partial X^{BS} = X^{BS} - X</M> and uses the inclusion <M>\partial X^{BS} \hookrightarrow X^{BS} \simeq X</M> to define the cuspidal cohomology group, over the ground ring <M>\mathbb C</M>, as
<Display> H_{cusp}^n(\Gamma,P_{\mathbb C}(k-2)) = \ker (\ H^n(X,P_{\mathbb C}(k-2)) \rightarrow
H^n(\partial X^{BS},P_{\mathbb C}(k-2)) \ ).</Display>
Strictly speaking, this is the definition of  <E>interior cohomology</E> 
<M>H_!^n(\Gamma,P_{\mathbb C}(k-2))</M> which in general contains the
 cuspidal cohomology as a subgroup. However, for congruence subgroups of
<M>SL_2(\mathbb Z)</M> there is equality 
<M>H_!^n(\Gamma,P_{\mathbb C}(k-2)) = H_{cusp}^n(\Gamma,P_{\mathbb C}(k-2))</M>.
<P/> 
Working over <M>\mathbb C</M> has the advantage of 
avoiding the technical issue that <M>\Gamma </M> does not necessarily act freely on <M>{\frak h}</M> since there are points with finite
cyclic stabilizer groups in <M>SL_2(\mathbb Z)</M>. But it has the disadvantage of losing  information about torsion in cohomology. So HAP confronts the issue
by working with a contractible CW-complex 
<M>\tilde X^{BS}</M> on which <M>\Gamma</M> acts freely, and <M>\Gamma</M>-equivariant inclusion
<M>\partial \tilde X^{BS} \hookrightarrow \tilde X^{BS}</M>. The definition of cuspidal cohomology that we use, which coincides with the above definition when working over <M>\mathbb C</M>, is
<Display> H_{cusp}^n(\Gamma,A) = \ker (\ H^n({\rm Hom}_{\, \mathbb  Z\Gamma}(C_\ast(\tilde X^{BS}), A)\,   ) \rightarrow
H^n(\ {\rm Hom}_{\, \mathbb  Z\Gamma}(C_\ast(\tilde \partial X^{BS}), A)\, \ ).</Display>
<P/>The following data is recorded and, using perturbation theory, is  combined
 with free resolutions for <M>C_4</M> and <M>C_6</M> to constuct <M>\tilde X^{BS}</M>.
 
<P/><Alt Only="HTML">&lt;img src="images/filename-2.png" align="center" width="450" alt="Borel-Serre compactified fundamental domain in the upper-half plane"/>
</Alt>

<P/>
The following commands calculate
<Display>H^1_{cusp}(\Gamma_0(39),\mathbb Z) = \mathbb Z^6\ .</Display>
<Example>
<#Include SYSTEM "tutex/11.6.txt">
</Example>
From the Eichler-Shimura isomorphism and the already calculated dimension
of <M>M_2(\Gamma_0(39))\cong \mathbb C^9</M>, we deduce from this cuspidal cohomology that the space 
<M>S_2(\Gamma_0(39))</M> of cuspidal weight <M>2</M> forms is of dimension <M>3</M>,

and the Eisenstein space <M>E_2(\Gamma_0(39))\cong \mathbb C^3</M> is of  dimension <M>3</M>.

<P/>The following commands show that the space <M>S_4(\Gamma_0(39))</M> of cuspidal weight <M>4</M> forms  is of dimension <M>12</M>.

<Example>
<#Include SYSTEM "tutex/11.6a.txt">
</Example>

</Section>

<Section><Heading>Hecke operators on forms of weight 2</Heading>

A congruence subgroup <M>\Gamma \le SL_2(\mathbb Z)</M> and element <M>g\in SL_2(\mathbb Q)</M>  determine the subgroup
<M>\Gamma' = \Gamma \cap g\Gamma g^{-1} </M> and  homomorphisms
<Display> \Gamma\ \hookleftarrow\ \Gamma'\ \ \stackrel{\gamma \mapsto g^{-1}\gamma g}{\longrightarrow}\ \ g^{-1}\Gamma' g\ \hookrightarrow \Gamma\ . </Display> 
These homomorphisms give rise to homomorphisms of cohomology groups
<Display>H^n(\Gamma,\mathbb Z)\ \ \stackrel{tr}{\leftarrow} \ \ H^n(\Gamma',\mathbb Z) \ \ \stackrel{\alpha}{\leftarrow} \ \ H^n(g^{-1}\Gamma' g,\mathbb Z) \ \  \stackrel{\beta}{\leftarrow} H^n(\Gamma, \mathbb Z) </Display>
with <M>\alpha</M>, <M>\beta</M> functorial maps, and <M>tr</M> the transfer map.
We define the composite <M>T_g=tr \circ \alpha \circ \beta\colon H^n(\Gamma, \mathbb Z) \rightarrow H^n(\Gamma, \mathbb Z)</M> to be the <E> Hecke operator </E>  determined by <M>g</M>.
Further details on this description of Hecke operators can be found in 
<Cite Key="stein" Where="Appendix by P. Gunnells"/>.

<P/>For each prime integer <M>p\ge 1</M> we set <M>T_p =T_g</M> with
for <M>g=\left(\begin{array}{cc}1&amp;0\\0&amp;p\end{array}\right)</M>.

<P/>The following commands compute <M>T_2</M> and <M>T_5</M>
 for <M>n=1</M>
and
 <M>\Gamma=\Gamma_0(39)</M>. The commands also compute the eigenvalues of these two Hecke operators. The final command confirms that <M>T_2</M> and <M>T_5</M> commute. (It is a fact that <M>T_pT_q=T_qT_p</M> for all primes <M>p,q</M>.)   

<Example>
<#Include SYSTEM "tutex/11.7.txt">
</Example>

</Section>


<Section><Heading>Hecke operators on forms of weight <M> \ge 2</M></Heading>
The above definition of Hecke operator <M>T_g</M> for <M>g\in SL_2(\mathbb Q)</M> extends to a Hecke operator
<M>T_g\colon H^1(\Gamma,P_{\mathbb Q}(k-2) ) \rightarrow H^1(\Gamma,P_{\mathbb Q}(k-2) )</M> for <M>k\ge 2</M>. We  work over the rationals rather than the integers in 
order to ensure that the action of <M>\Gamma</M> on homogeneous polynomials extends to an action of <M>g</M>. 
The following commands compute the matrix of <M>T_2\colon H^1(\Gamma,P_{\mathbb Q}(k-2) ) \rightarrow H^1(\Gamma,P_{\mathbb Q}(k-2) )</M> for <M>\Gamma=SL_2(\mathbb Z)</M> and <M>k=4</M>;
<Example>
<#Include SYSTEM "tutex/11.7b.txt">
</Example>
</Section>

<Section><Heading>Reconstructing modular forms from cohomology computations</Heading>

<P/>Given a modular form <M>f\colon {\frak h} \rightarrow \mathbb C</M> associated to a congruence subgroup <M>\Gamma</M>, and given a compact
edge <M>e</M>  in the tessellation of <M>{\frak h}</M> (<E>i.e.</E> an edge in the cubic tree <M>\cal T</M>) arising from the above fundamental domain 
for 
<M>SL_2(\mathbb Z)</M>,  we can evaluate
<Display>\int_e f(z)\,dz \ .</Display> 
In this way we obtain a cochain <M>f_1\colon C_1({\cal T}) \rightarrow \mathbb C</M> in <M>Hom_{\mathbb Z\Gamma}(C_1({\cal T}), \mathbb C)</M>
 representing a cohomology class <M>c(f) \in H^1(\, Hom_{\mathbb Z\Gamma}(C_\ast({\cal T}), \mathbb C)  \,) = H^1(\Gamma,\mathbb C)</M>. The correspondence <M>f\mapsto c(f)</M> underlies the Eichler-Shimura isomorphism.  Hecke operators can be used to recover modular forms from cohomology classes.  
<P/>Hecke operators restrict to operators on cuspidal cohomology. On the left-hand side of the Eichler-Shimura isomorphism 
Hecke operators restrict to  operators <M>T_s\colon S_2(\Gamma) \rightarrow S_2(\Gamma)</M> for <M>s\ge 1</M>.


<P/>Let us now introduce the function <M>q=q(z)=e^{2\pi i z}</M> which is holomorphic on <M>\mathbb C</M>.
For any modular form <M>f(z)</M> there are numbers <M>a_s</M> such that
<Display>f(z) = \sum_{s=0}^\infty a_sq^s </Display>
for all <M>z\in {\frak h}</M>. The form <M>f</M> is a cusp form if <M>a_0=0</M>.

<P/>  A non-zero
cusp form <M>f\in S_2(\Gamma)</M> is an <E>eigenform</E> if it is simultaneously an eigenvector for the Hecke operators <M>T_s</M> for all <M>s =1,2,3,\cdots</M>. An eigenform is said to be <E>normalized</E> if its coefficient <M>a_1=1</M>. It turns out that if <M>f</M> is a normalized eigenform then the coefficient <M>a_s</M> is an eigenvalue for <M>T_s</M> (see for instance <Cite Key="stein"/> for details).
 It can be shown <Cite Key="atkinlehner"/> that <M>f\in S_2(\Gamma_0(N))</M> admits a basis of eigenforms.

<P/> This all implies that, in principle,
 we can construct an  approximation to an explicit
 basis for the space <M>S_2(\Gamma)</M> of cusp
 forms by computing eigenvalues for Hecke operators. 

<P/> Suppose that we would like a basis for <M>S_2(\Gamma_0(11))</M>. The following commands first show that <M>H^1_{cusp}(\Gamma_0(11),\mathbb Z)=\mathbb Z\oplus \mathbb Z</M> from which we deduce that <M>S_2(\Gamma_0(11)) =\mathbb C</M> is <M>1</M>-dimensional. Then eigenvalues of 
Hecke operators are calculated to establish that the modular form
<Display>f = q -2q^2 -q^3 +2q^4 +q^5 +2q^6 -2q^7 + -2q^9 -2q^{10} + \cdots </Display>
constitutes a basis for <M>S_2(\Gamma_0(11))</M>. 

<Example>
<#Include SYSTEM "tutex/11.7a.txt">
</Example>

<P/>  For a normalized eigenform <M>f=1 + \sum_{s=2}^\infty a_sq^s</M>
the coefficients <M>a_s</M> with <M>s</M> a composite integer can be expressed in terms of the coefficients <M>a_p</M> for prime <M>p</M>.
If <M>r,s</M> are coprime then <M>T_{rs} =T_rT_s</M>.
If <M>p</M> is a prime that is not a divisor of the level <M>N</M> of <M>\Gamma</M> then
<M>a_{p^m} =a_{p^{m-1}}a_p - p a_{p^{m-2}}.</M>
If the prime <M> p</M> divides <M>N</M> then <M>a_{p^m} = (a_p)^m</M>. It thus suffices to compute the coefficients <M>a_p</M> for prime integers <M>p</M> only.

<P/>
The following commands establish that <M>S_{12}(SL_2(\mathbb Z))</M> has a basis
consisting of one cusp eigenform
<P/><M>q - 24q^2 + 252q^3 - 1472q^4 + 4830q^5 - 6048q^6 - 16744q^7 + 84480q^8 - 113643q^9 </M>
<P/><M>- 115920q^{10} + 534612q^{11} - 370944q^{12} - 577738q^{13} + 401856q^{14} + 1217160q^{15} + 987136q^{16}</M>
<P/><M> - 6905934q^{17} + 2727432q^{18} + 10661420q^{19} + ...</M>

<Example>
<#Include SYSTEM "tutex/11.7c.txt">
</Example>

</Section>

<Section><Heading>The Picard group</Heading>
Let us now consider the <E>Picard group</E> <M>G=SL_2(\mathbb Z[ i])</M> and 
its action on <E>upper-half space</E>
<Display>{\frak h}^3 =\{(z,t) \in \mathbb C\times \mathbb R\ |\ t &gt; 0\} \ . </Display>
To describe the action we introduce the symbol <M>j</M> satisfying <M>j^2=-1</M>, <M>ij=-ji</M> and write <M>z+tj</M> instead of <M>(z,t)</M>. The action is given by 
<Display>\left(\begin{array}{ll}a&amp;b\\ c &amp;d \end{array}\right)\cdot (z+tj) \ = \ \left(a(z+tj)+b\right)\left(c(z+tj)+d\right)^{-1}\ .</Display>

Alternatively,  and more explicitly, the action is given by 
<Display>\left(\begin{array}{ll}a&amp;b\\ c &amp;d \end{array}\right)\cdot (z+tj) \ = \  
\frac{(az+b)\overline{(cz+d) } + a\overline c y^2}{|cz +d|^2 + |c|^2y^2} \ +\ 
\frac{y}{|cz+d|^2+|c|^2y^2}\, j
      \ .</Display>

<P/>A standard 'fundamental domain' <M>D</M> for this action is the following region (with some of the boundary points removed).
<Display>
 \{z+tj\in {\frak h}^3\ |\ 0 \le |{\rm Re}(z)| \le \frac{1}{2}, 0\le {\rm Im}(z) \le \frac{1}{2}, z\overline z +t^2 \ge 1\}
</Display>

<Alt Only="HTML">&lt;img src="images/picarddomain.png" align="center" width="350" alt="Fundamental domain for the Picard group"/>
</Alt>
<P/>The four bottom vertices of <M>D</M> are 
<M>a = -\frac{1}{2} +\frac{1}{2}i +\frac{\sqrt{2}}{2}j</M>,
<M>b = -\frac{1}{2}  +\frac{\sqrt{3}}{2}j</M>,
<M>c = \frac{1}{2}  +\frac{\sqrt{3}}{2}j</M>,
<M>d = \frac{1}{2} +\frac{1}{2}i +\frac{\sqrt{2}}{2}j</M>.

<P/>The upper-half space <M>{\frak h}^3</M> can be retracted onto a <M>2</M>-dimensional subspace <M>{\cal T} \subset {\frak h}^3</M>. The space <M>{\cal T}</M>
is a contractible
<M>2</M>-dimensional regular CW-complex, and the action of the Picard group <M>G</M> restricts to a cellular action of <M>G</M> on <M>{\cal T}</M>. Under this action there is one orbit of <M>2</M>-cells, represented by the curvilinear square with vertices <M>a</M>, <M>b</M>, <M>c</M> and <M>d</M> in the picture. This <M>2</M>-cell has stabilizer group isomorphic to the quaternion group
<M>Q_4</M> of order <M>8</M>.
 There are two orbits of <M>1</M>-cells, both with stabilizer group isomorphic to a semi-direct product <M>C_3:C_4</M>. There is
  one orbit of <M>0</M>-cells, with stabilizer group isomorphic to <M>SL(2,3)</M>. 


<P/>Using perturbation techniques, the <M>2</M>-complex <M>{\cal T}</M> can be combined with free resolutions for the cell stabilizer groups to contruct a regular CW-complex <M>X</M> on which the Picard group <M>G</M> acts freely. 
The following commands compute the first few terms of the free <M>\mathbb ZG</M>-resolution 
  <M>R_\ast =C_\ast X</M>. 
Then   <M>R_\ast</M> is used to compute 
<Display>H^1(G,\mathbb Z) =0\ ,</Display>
<Display>H^2(G,\mathbb Z) =\mathbb Z_2\oplus \mathbb Z_2\ ,</Display>
<Display>H^3(G,\mathbb Z) =\mathbb Z_6\ ,</Display>
<Display>H^4(G,\mathbb Z) =\mathbb Z_4\oplus \mathbb Z_{24}\ ,</Display>
 and compute a free presentation for <M>G</M> involving four generators and seven relators.

<Example>
<#Include SYSTEM "tutex/11.8.txt">
</Example>

We can also compute the cohomology of <M>G=SL_2(\mathbb Z[i])</M> with 
coefficients in a module such as the module 
<M>P_{\mathbb Z[i]}(k)</M> of degree <M>k</M>
homogeneous polynomials with coefficients in <M>\mathbb Z[i]</M>
and with the action described above. For instance, 
the following commands compute
<Display>H^1(G,P_{\mathbb Z[i]}(24)) = (\mathbb Z_2)^4 \oplus \mathbb Z_4
\oplus \mathbb Z_8 \oplus \mathbb Z_{40} \oplus \mathbb Z_{80}\, ,</Display>
<Display>H^2(G,P_{\mathbb Z[i]}(24)) = (\mathbb Z_2)^{24} \oplus \mathbb Z_{520030}\oplus \mathbb Z_{1040060} \oplus  \mathbb Z^2\, ,</Display>
<Display>H^3(G,P_{\mathbb Z[i]}(24)) = (\mathbb Z_2)^{22} \oplus \mathbb Z_{4}\oplus (\mathbb Z_{12})^2 \, .</Display>

<Example>
<#Include SYSTEM "tutex/11.9.txt">
</Example>

</Section>

<Section><Heading>Bianchi groups</Heading>
The <E>Bianchi groups</E> are the groups <M>G=PSL_2({\cal O}_{-d})</M> where <M>d</M> is a square free positive integer and <M>{\cal O}_{-d}</M> is the ring of integers
of the imaginary quadratic field <M>\mathbb Q(\sqrt{-d})</M>. More explicitly, 
<Display>{\cal O}_{-d} = \mathbb Z\left[\sqrt{-d}\right]~~~~~~~~ {\rm if~} d \equiv 1 {\rm ~mod~} 4\, ,</Display>
<Display>{\cal O}_{-d} = \mathbb Z\left[\frac{1+\sqrt{-d}}{2}\right]~~~~~ {\rm if~} d \equiv 2,3 {\rm ~mod~} 4\, .</Display>
These groups act on upper-half space <M>{\frak h}^3</M> in the same way as the Picard group.   Upper-half space can be tessellated by a  'fundamental domain'
 for this action. Moreover, as with the Picard group, this tessellation contains a <M>2</M>-dimensional cellular subspace <M>{\cal T}\subset {\frak h}^3</M>
where <M>{\cal T}</M> is a contractible CW-complex on which <M>G</M> acts cellularly. It should be mentioned that the fundamental domain and the contractible <M>2</M>-complex  <M>{\cal T}</M> are not uniquely determined by <M>G</M>.
 Various algorithms exist for computing <M>{\cal T}</M> and its cell stabilizers. One algorithm due to  Swan 
<Cite Key="swan"/> has been implemented by Alexander Rahm 
<Cite Key="rahmthesis"/> and the output for various values of <M>d</M> are stored in HAP. Another approach is to use Voronoi's theory of perfect forms. This approach has been implemented by Sebastian Schoennenbeck <Cite Key="schoennenbeck"/> and, again, its output for various values of <M>d</M> are 
stored in HAP. The following commands  combine data from Schoennenbeck's algorithm with free resolutions for cell stabiliers to compute
 
<Display>H^1(PSL_2({\cal O}_{-6}),P_{{\cal O}_{-6}}(24)) =
(\mathbb Z_2)^4
\oplus \mathbb Z_{12}
\oplus \mathbb Z_{24}
\oplus \mathbb Z_{9240}
\oplus \mathbb Z_{55440}
\oplus \mathbb Z^4\,,
</Display>
<Display>H^2(PSL_2({\cal O}_{-6}),P_{{\cal O}_{-6}}(24)) =
\begin{array}{l}
(\mathbb Z_2)^{26}
\oplus \mathbb (Z_{6})^8
\oplus \mathbb (Z_{12})^{9}
\oplus \mathbb Z_{24}
\oplus (\mathbb Z_{120})^2
\oplus (\mathbb Z_{840})^3\\
\oplus \mathbb Z_{2520}
\oplus (\mathbb Z_{27720})^2
\oplus (\mathbb Z_{24227280})^2
\oplus (\mathbb Z_{411863760})^2\\
\oplus \mathbb Z_{2454438243748928651877425142836664498129840}\\
\oplus \mathbb Z_{14726629462493571911264550857019986988779040}\\
\oplus \mathbb Z^4\end{array}\ ,
</Display>
<Display>H^3(PSL_2({\cal O}_{-6}),P_{{\cal O}_{-6}}(24)) =
(\mathbb Z_2)^{23}
\oplus \mathbb Z_{4}
\oplus (\mathbb Z_{12})^2\ .
</Display>
Note that the action of <M>SL_2({\cal O}_{-d})</M> on <M>P_{{\cal O}_{-d}}(k)</M> induces an action of <M>PSL_2({\cal O}_{-d})</M>
provided <M>k</M> is even.

<Example>
<#Include SYSTEM "tutex/11.10.txt">
</Example>

<P/>We can also consider the coefficient module
<Display> P_{{\cal O}_{-d}}(k,\ell) = P_{{\cal O}_{-d}}(k) \otimes_{{\cal O}_{-d}} \overline{P_{{\cal O}_{-d}}(\ell)}   </Display>
where the bar denotes a twist in the action obtained from complex conjugation. For an action of the projective linear group we must insist that <M>k+\ell</M> is even. The following commands compute
<Display>H^2(PSL_2({\cal O}_{-11}),P_{{\cal O}_{-11}}(5,5)) = 
(\mathbb Z_2)^8 \oplus \mathbb Z_{60} \oplus (\mathbb Z_{660})^3 \oplus \mathbb Z^6\,,      </Display>
a computation which was first made, along with many other cohomology computationsfor Bianchi groups, by Mehmet Haluk Sengun <Cite Key="sengun"/>.
<Example>
<#Include SYSTEM "tutex/11.10b.txt">
</Example>

<P/>The function <Code>ResolutionPSL2QuadraticIntegers(-d,n)</Code> relies on a limited data base produced by the algorithms implemented by Schoennenbeck and Rahm.  
The function also covers some cases covered by entering a sring
"-d+I" as first variable. These cases  
correspond to projective special groups of module automorphisms of lattices of rank 2 over the integers of the imaginary quadratic number field <M>\mathbb Q(\sqrt{-d})</M> with non-trivial Steinitz-class. In the case of a larger class group there are cases labelled "-d+I2",...,"-d+Ik" and the Ij together with O-d form a system of representatives of elements of the class group modulo squares and Galois action.


 For instance,
the following commands compute 
<Display>H_2(PSL({\cal O}_{-21+I2}),\mathbb Z) = \mathbb Z_2\oplus  \mathbb Z^6\, .</Display>

<Example>
<#Include SYSTEM "tutex/11.11.txt">
</Example>
</Section>

<Section><Heading>Some other infinite matrix groups</Heading>

Analogous to the functions for Bianchi groups, HAP has functions
<List>
<Item><Code>ResolutionSL2QuadraticIntegers(-d,n)</Code> </Item>
<Item><Code>ResolutionSL2ZInvertedInteger(m,n)</Code></Item>
<Item><Code>ResolutionGL2QuadraticIntegers(-d,n)</Code></Item>
<Item><Code>ResolutionPGL2QuadraticIntegers(-d,n)</Code></Item>
<Item><Code>ResolutionGL3QuadraticIntegers(-d,n)</Code></Item>
<Item><Code>ResolutionPGL3QuadraticIntegers(-d,n)</Code></Item>
</List>
for computing free resolutions for certain values of <M>SL_2({\cal O}_{-d})</M>,
<M>SL_2(\mathbb Z[\frac{1}{m}])</M>,
<M>GL_2({\cal O}_{-d})</M> and <M>PGL_2({\cal O}_{-d})</M>.
Additionally, the function 
<List>
<Item><Code>ResolutionArithmeticGroup("string",n)</Code></Item>
</List>
 can be used to compute resolutions for groups whose data (provided by Sebastian Schoennenbeck, Alexander Rahm and Mathieu Dutour) is stored in the directory <Code>gap/pkg/Hap/lib/Perturbations/Gcomplexes</Code> .


<P/>For instance, the following commands   compute

<Display>H^1(SL_2({\cal O}_{-6}),P_{{\cal O}_{-6}}(24)) =
(\mathbb Z_2)^4
\oplus \mathbb Z_{12}
\oplus \mathbb Z_{24}
\oplus \mathbb Z_{9240}
\oplus \mathbb Z_{55440}
\oplus \mathbb Z^4\,,
</Display>
<Display>H^2(SL_2({\cal O}_{-6}),P_{{\cal O}_{-6}}(24)) =
\begin{array}{l}
(\mathbb Z_2)^{26}
\oplus \mathbb (Z_{6})^7
\oplus \mathbb (Z_{12})^{10}
\oplus \mathbb Z_{24}
\oplus (\mathbb Z_{120})^2
\oplus (\mathbb Z_{840})^3\\
\oplus \mathbb Z_{2520}
\oplus (\mathbb Z_{27720})^2
\oplus (\mathbb Z_{24227280})^2
\oplus (\mathbb Z_{411863760})^2\\
\oplus \mathbb Z_{2454438243748928651877425142836664498129840}\\
\oplus \mathbb Z_{14726629462493571911264550857019986988779040}\\
\oplus \mathbb Z^4\end{array}\ ,
</Display>
<Display>H^3(SL_2({\cal O}_{-6}),P_{{\cal O}_{-6}}(24)) =
(\mathbb Z_2)^{58}
\oplus (\mathbb Z_{4})^4
\oplus (\mathbb Z_{12})\ .
</Display>


<Example>
<#Include SYSTEM "tutex/11.10a.txt">
</Example>

<P/>The following commands construct free resolutions up to degree 5 for the groups <M>SL_2(\mathbb Z[\frac{1}{2}])</M>,
<M>GL_2({\cal O}_{-2})</M>, <M>GL_2({\cal O}_{2})</M>, <M>PGL_2({\cal O}_{2})</M>, <M>GL_3({\cal O}_{-2})</M>, <M>PGL_3({\cal O}_{-2})</M>.
The final command constructs a free resolution up to degree 3 for <M>PSL_4(\mathbb Z)</M>.
<Example>
<#Include SYSTEM "tutex/11.12.txt">
</Example>

</Section>

<Section><Heading>Ideals and finite quotient groups</Heading>

The following commands first construct the number field <M>\mathbb Q(\sqrt{-7})</M>,
its ring of integers <M>{\cal O}_{-7}={\cal O}(\mathbb Q(\sqrt{-7}))</M>, and the principal ideal <M>I=\langle 5 + 2\sqrt{-7}\rangle \triangleleft {\cal O}(\mathbb Q(\sqrt{-7}))</M>
of norm <M>{\cal N}(I)=53</M>. The  ring <M>I</M> is prime since its norm is a prime number. The primality of <M>I</M> is also demonstrated by observing that the quotient ring  <M>R={\cal O}_{-7}/I</M> is  an integral domain and hence 
isomorphic to the unique finite field of order <M>53 </M>, 
<M>R\cong \mathbb Z/53\mathbb Z</M> . (In a ring of quadratic integers <E>prime ideal</E> is the same as <E>maximal ideal</E>). 

<P/>The finite group <M>G=SL_2({\cal O}_{-7}\,/\,I)</M> is then
 constructed and confirmed to be isomorphic to <M>SL_2(\mathbb Z/53\mathbb Z)</M>. The group <M>G</M> is shown to admit a periodic <M>\mathbb ZG</M>-resolution of <M>\mathbb Z</M> of period dividing <M>52</M>. 
<P/>Finally the integral homology
<Display>H_n(G,\mathbb Z) = \left\{\begin{array}{ll}
0 &amp; n\ne 3,7, {\rm~for~} 0\le n \le 8,\\
\mathbb Z_{2808} &amp; n=3,7,
\end{array}\right.</Display> 
is computed.
<Example>
<#Include SYSTEM "tutex/11.13.txt">
</Example>

<P/>The following commands show that the rational prime <M>7</M>
is not prime in  <M>{\cal O}_{-5}={\cal O}(\mathbb Q(\sqrt{-5}))</M>. Moreover,
 <M>7</M> totally splits in <M>{\cal O}_{-5}</M> since the final command
shows that only    the rational primes <M>2</M> and  <M>5</M> ramify in 
<M>{\cal O}_{-5}</M>.

<Example>
<#Include SYSTEM "tutex/11.14.txt">
</Example>

<P/> For <M>d &lt; 0</M>  the  rings <M>{\cal O}_d={\cal O}(\mathbb Q(\sqrt{d}))</M> are unique factorization domains for precisely
<Display> d = -1, -2, -3, -7, -11, -19, -43, -67, -163.</Display>
This result was conjectured by Gauss, and   essentially proved by Kurt Heegner,
and then later proved by Harold Stark. 

<P/>The following commands construct the classic  example of a prime ideal <M>I</M> that is not principal. They then illustrate reduction modulo <M>I</M>.
<Example>
<#Include SYSTEM "tutex/11.15.txt">
</Example>

</Section>

<Section><Heading>Congruence subgroups for ideals</Heading>

<P/> Given a ring of integers <M>{\cal O}</M> and ideal
<M>I \triangleleft {\cal O}</M> there is a canonical homomorphism
<M>\pi_I\colon SL_2({\cal O}) \rightarrow SL_2({\cal O}/I)</M>. A
subgroup <M>\Gamma \le SL_2({\cal O})</M> is said to be a
<E>congruence subgroup</E> if it contains <M>\ker \pi_I</M>. Thus congruence subgroups are of finite index.  
 Generalizing the definition in <Ref Sect="sec:EichlerShimura"/> above, we define the <E>principal congruence subgroup</E> <M>\Gamma_1(I)=\ker \pi_I</M>, and the congruence subgroup
<M>\Gamma_0(I)</M> consisting of preimages of the upper triangular matrices in
<M>SL_2({\cal O}/I)</M>.

<P/> The following commands construct <M>\Gamma=\Gamma_0(I)</M> for the ideal
<M>I\triangleleft {\cal O}\mathbb Q(\sqrt{-5})</M> generated by <M>12</M>
and <M>36\sqrt{-5}</M>. The group <M>\Gamma</M>
has index <M>385</M> in <M>SL_2({\cal O}\mathbb Q(\sqrt{-5}))</M>.
The final command displays a tree in a Cayley graph for <M>SL_2({\cal O}\mathbb Q(\sqrt{-5}))</M> whose nodes represent a transversal for <M>\Gamma</M>.

<Example>
<#Include SYSTEM "tutex/11.17.txt">
</Example>
<Alt Only="HTML">&lt;img src="images/treesqrt5.gif" align="center" width="350" alt="Information for the cubic tree"/>
</Alt>

<P/>The next commands first construct the congruence subgroup 
<M>\Gamma_0(I)</M> of index <M>144</M> in <M>SL_2({\cal O}\mathbb Q(\sqrt{-2}))</M> for the ideal <M>I</M> in <M>{\cal O}\mathbb Q(\sqrt{-2})</M> generated by
<M>4+5\sqrt{-2}</M>.
 The commands then compute 
<Display>H_1(\Gamma_0(I),\mathbb Z) = \mathbb Z_3 \oplus \mathbb Z_6 \oplus \mathbb Z_{30} \oplus \mathbb Z^8\, ,</Display>
<Display>H_2(\Gamma_0(I), \mathbb Z) = (\mathbb Z_2)^9 \oplus \mathbb Z^7\, ,</Display>
<Display>H_3(\Gamma_0(I), \mathbb Z) = (\mathbb Z_2)^9 \, .</Display>

<Example>
<#Include SYSTEM "tutex/11.16.txt">
</Example>

</Section>

<Section><Heading>First homology</Heading>
The isomorphism <M>H_1(G,\mathbb Z) \cong G_{ab}</M> allows for the computation of first integral homology using computational methods for finitely presented groups. Such methods underly the following computation of
<Display>H_1( \Gamma_0(I),\mathbb Z) \cong \mathbb Z_2 \oplus  \cdots \oplus
\mathbb Z_{4078793513671}</Display>
where <M>I</M> is the prime ideal in the Gaussian integers generated by  <M>41+56\sqrt{-1}</M>.

<Example>
<#Include SYSTEM "tutex/11.18.txt">
</Example>

<P/>We write <M>G^{ab}_{tors}</M> to denote the maximal finite
summand of the first homology group of <M>G</M> and refer to this as the
<E>torsion subgroup</E>.
 Nicholas Bergeron and Akshay Venkatesh   <Cite Key="bergeron"/> 
have conjectured relationships between 
the  torsion in congruence subgroups <M>\Gamma</M> and the volume of their quotient manifold
<M>{\frak h}^3/\Gamma</M>. For instance, for the Gaussian integers
they conjecture
<Display> \frac{\log |\Gamma_0(I)_{tors}^{ab}|}{{\rm Norm}(I)} \rightarrow \frac{\lambda}{18\pi},\ \lambda =L(2,\chi_{\mathbb Q(\sqrt{-1})}) = 1 -\frac{1}{9} + \frac{1}{25} - \frac{1}{49}  + \cdots</Display>
as the norm of the prime ideal <M>I</M> tends to <M>\infty</M>.
The following approximates <M>\lambda/18\pi = 0.0161957</M> and
<M>\frac{\log |\Gamma_0(I)_{tors}^{ab}|}{{\rm Norm}(I)} = 0.00913432</M>
for the above example.

<Example>
<#Include SYSTEM "tutex/11.19.txt">
</Example>



<P/> The link with volume is given by the Humbert volume formula
<Display>   
{\rm Vol} ( {\frak h}^3 / PSL_2( {\cal O}_{d} ) )
 = \frac{|D|^{3/2}}{24} \zeta_{ \mathbb Q( \sqrt{d} ) }(2)/\zeta_{\mathbb Q}(2)                           </Display>
 valid for square-free <M>d&lt;0</M>, where <M>D</M> is the discriminant of <M>\mathbb Q(\sqrt{d})</M>. The volume of a finite index subgroup <M>\Gamma</M>is obtained by multiplying the right-hand side by the  index <M>|PSL_2({\cal O}_d)\,:\, \Gamma|</M>.
</Section>
</Chapter>
