<Chapter><Heading>Fundamental domains for Bianchi groups</Heading>
<Section><Heading>Bianchi groups</Heading>

The <E>Bianchi groups</E> are the groups 
<M>G_{-d}=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>. 
These groups act on <E>upper-half space</E>

<Display>{\frak h}^3 =\{(z,t) \in \mathbb C\times \mathbb R\ |\ t &gt; 0\}  </Display>

	by the formula
	<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>

where we use 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>. 
Alternatively,   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 t^2}{|cz +d|^2 + |c|^2t^2} \ +\
\frac{t}{|cz+d|^2+|c|^2t^2}\, j
      \ .</Display>

<P/>We take the boundary <M>\partial {\frak h}^3</M> to be the Riemann 
	sphere <M>\mathbb C \cup \infty</M> and let 
	<M>\overline{\frak h}^3</M> denote the union of <M>{\frak h}^3</M> 
and its boundary. The action of <M>G_{-d}</M> extends to the 
	boundary. The element <M>\infty</M> and each element of the number 
		field 
	<M>\mathbb Q(\sqrt{-d})</M> are thought of as lying in the boundary <M>\partial {\frak h}^3</M> and are  referred to as <E>cusps</E>. 
Let <M>X</M> denote the union of <M>{\frak h}^3</M> with the set of cusps, <M>X={\frak h}^3 \cup \{\infty\} \cup \mathbb Q(\sqrt{-d})</M>.
	It follows from work of Bianchi and Humbert that the space <M>X</M>
 admits the structure 
of a regular CW-complex (depending on <M>d</M>) for which the 
action of <M>G_{-d}</M> on <M>{\frak h}^3</M> extends to a cellular 
	action on <M>X</M> which permutes cells. Moreover, 
<M>G_{-d}</M> acts transitively on the <M>3</M>-cells 
	of <M>X</M>
and each <M>3</M>-cell has trivial stabilizer in <M>G_{-d}</M>. Details are provided in Richard Swan's paper <Cite Key="swanB"/>.

<P/> We refer to the closure in <M>X</M>
	of any one of these <M>3</M>-cells as a <E>fundamental domain</E> for the action <M>G_{-d}</M>. Cohomology of <M>G_{-d}</M> can be computed from a knowledge of
	the combinatorial structure of this fundamental domain together with
	a knowledge of the stabilizer groups of the cells of dimension <M>\le 2</M>.

</Section>

<Section><Heading>Swan's description of a fundamental domain</Heading>
		A pair <M>(a,b)</M> of elements in <M>{\cal O}_{-d}</M> is said to be <E>unimodular</E> if the ideal generated by <M>a,b</M> is the whole ring <M>{\cal O}_{-d}</M> and  <M>a\ne 0</M>.
			A unimodular pair can be represented by a hemisphere in <M>\overline{\frak h}^3</M> with base centred at the point <M>b/a \in \mathbb C</M> and of radius <M>|1/a|</M>. 
				The  radius is <M>\le 1</M>. 
					Think of the points in <M>{\frak h}^3</M> as lying strictly above <M>\mathbb C</M>.  Let <M>B</M>
denote the space obtained by removing the interiors of all such hemispheres from <M>{\frak h}^3</M>. 

<P/> When <M>d \equiv 3 {\rm \ mod\  } 4</M> let <M>F</M> be the subspace of <M>\overline{\frak h}^3</M> consisting of the points <M>x+iy+jt</M> with <M>-1/2 \le x \le 1/2</M>, <M>-1/4 \le y \le 1/4</M>, <M>t \ge 0</M>. Otherwise, let <M>F</M> be the subspace of <M>\overline{\frak h}^3</M> consisting of the points <M>x+iy+jt</M> with <M>-1/2 \le x \le 1/2</M>, <M>-1/2 \le y \le 1/2</M>, <M>t \ge 0</M>.

<P/> It is explained in <Cite Key="swanB"/> that <M>F\cap B</M> is a <M>3</M>-cell in the above mentioned regular CW-complex structure on <M>X</M>. 
</Section>

<Section><Heading>Computing a fundamental domain</Heading>

	Explicit fundamental domains for certain
	values of <M>d</M> were calculated by Bianchi in the 1890s and further calculations were made by  Swan in 1971 <Cite Key="swanB"/>. In the 1970s, 
		building on Swan's work, <URL><Link>https://www.sciencedirect.com/science/article/pii/S0723086913000042</Link><LinkText>Robert Riley</LinkText></URL> developed a computer 
		program for computing fundamental domains of certain Kleinian groups (including Bianchi groups). In their 2010 PhD theses  <URL><Link>https://theses.hal.science/tel-00526976/en/</Link><LinkText>Alexander Rahm</LinkText></URL> and <URL><Link>https://wrap.warwick.ac.uk/id/eprint/35128/</Link><LinkText>M.T. Aranes</LinkText></URL>  
independently developed  Pari/GP and Sage software
			based on Swan's ideas. In 2011 <URL><Link>https://mathstats.uncg.edu/sites/yasaki/publications/bianchipolytope.pdf</Link><LinkText>Dan Yasaki</LinkText></URL> used a  different 
approach  based on Voronoi's theory of perfect forms in his  
		Magma software  for fundamental domains of Bianchi groups. 
			<URL><Link>http://www.normalesup.org/~page/Recherche/Logiciels/logiciels-en.html</Link><LinkText>Aurel Page</LinkText></URL> developed software for fundamental domains of Kleinian groups in his 2010 masters thesis.
				In 2018 <URL><Link>https://github.com/schoennenbeck/VMH-DivisionAlgebras</Link><LinkText>Sebastian Schoennenbeck</LinkText></URL> used a more general approach based on perfect forms in his Magma software for computing fundamental domains of Bianchi and other groups. 

		Output from the code of Alexander Rahm and Sebastian Schoennenbeck for certain Bianchi groups has been
		stored iin <B>HAP</B> for use in constructing free resolutions.
		
		<P/>More recently a <B>GAP</B> implementation of Swan's algorithm has been included  in <B>HAP</B>. The implementation uses exact computations in <M>\mathbb Q(\sqrt{-d})</M> and in <M>\mathbb Q(\sqrt{d})</M>. A 
			bespoke
			implementation of these two fields is
			part of the implementation so as to avoid making apparently slower
computations with cyclotomic numbers. The account of Swan's algorithm in the thesis of Alexander Rahm was the main reference during the implementation.  

</Section>

<Section><Heading>Examples</Heading>
	The fundamental domain <M>D=\overline{F \cap B}</M> (where the overline denotes closure) has boundary 
	<M>\partial D</M> involving the four vertical quadrilateral
	<M>2</M>-cells  contained in the four vertical quadrilateral <M>2</M>-cells of <M>\partial F</M>. We refer to these as the <E>vertical <M>2</M>-cells</E> of <M>D</M>. 
		When visualizing <M>D</M> we ignore the <M>3</M>-cell and the four vertical <M>2</M>-cells entirely  and
		visualize only the remaining  <M>2</M>-cells.  
			These <M>2</M>-cells can be viewed as a <M>2</M>-dimensional image by projecting them onto the complex plane, or they can be viewed as an interactive <M>3</M>-dimensional image.

<P/>A fundamental domain for <M>G_{-39}</M> can
				be visualized using the following commands.

			<Example>
<#Include SYSTEM "tutex/bianchi.1.txt">
</Example>
			<Alt Only="HTML">&lt;img src="images/bianchi3D39.png" align="center" height="550" alt="Fundamental domain for a Bianchi group"/>
</Alt>
<Alt Only="HTML">&lt;img src="images/bianchi2D39.png" align="center" width="350" alt="Fundamental domain for a Bianchi group"/>
</Alt>
<P/> A <E>cusp vertex</E> of <M>D</M> is any vertex of <M>D</M>  lying
	in <M>\mathbb C \cup \infty</M>. In the above visualizations for 
	<M>G_{-39}</M> several cusp vertices in <M>\mathbb C</M>
		are : in the 2-dimensional visualization they are represented by red dots. 
		Computer calculations show that these
		cusps lie in precisely three orbits under the action of <M>G_{-d}</M>. Thus, together with the orbit of <M>\infty</M> there are four distinct orbits of cusps. By the well-known correspondence between cusp orbits and elements of the class group it follows that the class group of <M>\mathbb Q(\sqrt{-39})</M> is of order <M>4</M>. 
			
		<P/>The following additional commands comvert the ``bottom surface'' of the Bianchi polyhedron <M>D</M> to a <M>2</M>-dimensional regular CW-complex and then displays the <M>1</M>-skeleton of this <M>2</M>-complex.

			<Example>
<#Include SYSTEM "tutex/bianchi.1A.txt">
</Example>
                        <Alt Only="HTML">&lt;img src="images/bianchi1skeleton.gif" align="center" height="350" alt="Fundamental domain for a Bianchi group"/>
</Alt>


<P/>A fundamental domain for <M>G_{-22}</M> can
                                be visualized using the following commands.

                        <Example>
<#Include SYSTEM "tutex/bianchi.2.txt">
</Example>
                        <Alt Only="HTML">&lt;img src="images/bianchi3D22.png" align="center" height="550" alt="Fundamental domain for a Bianchi group"/>
</Alt>
<Alt Only="HTML">&lt;img src="images/bianchi2D22.png" align="center" width="350" alt="Fundamental domain for a Bianchi group"/>
</Alt>

<P/>Two cusps are  visible in these visualizations for <M>G_{-22}</M>. They 
	 lie in a single orbit. Thus, together with the orbit of <M>\infty</M>, there are two orbits of cusps for this group.

<P/> An alternative visualization for <M>G_{-22}</M> can be produced, in which the cells in a given orbit are coloured with a common colour. The following commands produce this visualization.

	<Example>
<#Include SYSTEM "tutex/bianchi.2A.txt">
</Example>

	<Alt Only="HTML">&lt;img src="images/bianchi3D22extra.png" align="center" height="550" alt="Fundamental domain for a Bianchi group"/>
</Alt>



<P/>A fundamental domain for <M>G_{-163}</M> can
                                be visualized using the following commands.

                        <Example>
<#Include SYSTEM "tutex/bianchi.3.txt">
</Example>
                        <Alt Only="HTML">&lt;img src="images/bianchi3D163.png" align="center" height="550" alt="Fundamental domain for a Bianchi group"/>
</Alt>
<Alt Only="HTML">&lt;img src="images/bianchi2D163.png" align="center" width="350" alt="Fundamental domain for a Bianchi group"/>
</Alt>
	<Alt Only="HTML">&lt;img src="images/bianchi3D163extra.png" align="center" height="550" alt="Fundamental domain for a Bianchi group"/>
</Alt>


<P/>There is just a single orbit of cusps in this example, the orbit containing <M>\infty</M>, since <M>\mathbb Q(\sqrt{-163})</M> is a principal ideal domain and hence has trivial class group. 

	<P/>A fundamental domain for <M>G_{-33}</M> is 
                                 visualized using the following commands.

                        <Example>
<#Include SYSTEM "tutex/bianchi.4.txt">
</Example>
                        <Alt Only="HTML">&lt;img src="images/bianchi3D33.png" align="center" height="550" alt="Fundamental domain for a Bianchi group"/>
</Alt>
<Alt Only="HTML">&lt;img src="images/bianchi2D33.png" align="center" width="350" alt="Fundamental domain for a Bianchi group"/>
</Alt>


</Section>

<Section><Heading>Establishing correctness of a fundamental domain</Heading>
	The cusps of a fundamental domain can be calculated independently of the domain computation. The remaining vertices of the domain will have positive heights. To prove that the computation is correct we need to establish that no 
	non-cuspidal vertex lies below any  hemishpere centered on the complex plane at <M>b/a\in \mathbb C</M> with <M>(a,b)</M> a unimodular pair. As these  hemispheres have increasingly smaller radius we only need to check those finitely many hemispheres with radius smaller than the height of the lowest non-cuspidal vertex.  

	<P/>For a few values of <M>d</M> the smallest radius <M>r</M> 
		of a hemisphere contributing to the fundamental domain boundary has been stored. For  cases where this smallest radius is not stored a very slow method for finding <M>r</M> is implemented and the user is advised to speed things up by guessiing a 
		value <M>N=1/r^2</M> and then test that this value of <M>N</M> is indeed large enough. The following commands illustrate this for <M>d=-46</M> with a guess of <M>N=600</M>. Once the test is done we can see that in fact a smaller guess of <M>N=441</M> would have sufficed.

			<Example>
<#Include SYSTEM "tutex/bianchi.14.txt">
</Example>

</Section>

<Section><Heading>Computing quotient <M>2</M>-complexes</Heading>
	The space <M>X={\frak h}^3 \cup \{\infty\} \cup \mathbb Q(\sqrt{-d})</M> retracts onto an <M>SL_2({\mathcal O}_{-d})</M>-equivariant <M>2</M>-dimensional regular CW-complex <M>K \subset X</M>. By barycentrically subdividing  <M>K</M>  we can assume that the group action on <M>K</M> is <E>rigid</E> in the sense
		that any group element in the stabilizer
		of a cell fixes that cell pointwise. Given a congruence subgroup <M>\Gamma \le SL_2({\mathcal O}_{-d})</M> the quotient space <M>Y=K/\Gamma</M> inherits a regular CW-structure.  
			We have <M>H_n(\Gamma,\mathbb Q) = H_n(Y,\mathbb Q)</M>
				and <M>H_n(\Gamma,\mathbb Z_p) = H_n(Y,\mathbb Z_p)</M> for any prime not dividing the order of any group element in <M>\Gamma</M>.
					At these primes the <M>p</M>-torsion in <M>H_n(Y,\mathbb Z)</M> equals that in <M>H_n(\Gamma,\mathbb Z)</M>.
<!--
				Let <M>\mathcal S</M> denote the set of primes occuring in the orders of
				the finite subgroups of <M>\Gamma</M>. For primes <M>p\notin S</M> the group <M>H_n(\Gamma,\mathbb Z)</M> contains a summand <M>\mathbb Z/p^k\mathbb Z </M> if and only if <M>H_n(Y,\mathbb Z)</M> contains this summand. Thus the homology of <M>H_n(Y,\mathbb Z)</M> can be used to detect torsion in <M>H_n(\Gamma,\mathbb Z)</M>

				<P/>For <M>\Gamma=\Gamma_0(71) \le SL(2,{\mathcal O}_{-2})</M> the following session shows that <M>{\mathcal S}=\{2,3\}</M> and that 
				<M>H_1(\Gamma_0(71),\mathbb Z)</M> contains the summand 				$$(\mathbb Z_7)^2\oplus (\mathbb Z_{17})^6 \oplus (\mathbb Z_{19})^2 \oplus (\mathbb Z_{617})^2 \oplus (\mathbb Z_{873263})^2 \oplus (\mathbb Z_{250653841})^2 .$$
-->
					The following session computes the 
					integral
					homology of <M>Y</M> for <M>\Gamma=\Gamma_0(71) \le SL(2,{\mathcal O}_{-2})</M> and establishes that <M>\Gamma</M> has no <M>p</M>-torsion for primes <M>p>3</M> and has index <M>5042</M>.
	                                       <Example>
<#Include SYSTEM "tutex/bianchi.18.txt">
</Example>

	The above computation can be corroborated by using a free resolution to
	calculate <M>H_1(\Gamma_0(71),\mathbb Z)</M> at all primes.

	<Example>
		<#Include SYSTEM "tutex/bianchi.19.txt">
</Example>

	The next example computes a CW complex <M>Y</M>
		with <M>H^\ast(Y,\mathbb Z) =H^\ast(\Gamma_0(23),\mathbb Z)</M> modulo the primes <M>2,3</M> for <M>\Gamma_0(23) &lt; SL_2({\mathcal O}_{-2})</M> and shows that a basis <M>b_1,b_2,\ldots b_9</M> for <M>H^1(W,\mathbb Z) =\mathbb Z^{9}</M>  
		 satisfies <M>b_i\cup b_j=0</M> except for 
		 <M>b_1\cup b_6 = -b_6\cup b_1\neq 0</M>, <M>b_1\cup b_7 =-b_7\cup b_1\ne 0</M>, <M>b_1\cup b_9=-b_9\cup b_1\ne 0</M>.



	        <Example>
                <#Include SYSTEM "tutex/bianchi.20.txt">
</Example>

<P/>THe following additional commands compute the <M>11</M>-primary parts <M>H^2(\Gamma_0(23),\mathbb Z)_{(11)}=\mathbb Z_{11}</M>, <M>H^n(\Gamma_0(23),\mathbb Z)_{(11)}=0</M> for <M>2\ne n>0</M>.
	They then compute the cohomology ring <M>A=H^\ast(\Gamma_0(23),\mathbb Z_{11})</M>, a basis <M>B</M> of <M>H^1(\Gamma_0(23),\mathbb Z_{11}) =(\mathbb Z_{11})^{10}</M>, and procuce a matrix <M>C=(c_{ij})</M> with
	<M>c_{ij}=0</M> if <M>b_i\cup b_j=0</M>, <M>c_{ij}=1</M> if <M>b_i\cup b_j\ne 0</M> for <M>b_i,b_j\in B</M>.
	<Example>
                <#Include SYSTEM "tutex/bianchi.21.txt">
</Example>


</Section>

<Section><Heading>Computing a free resolution for <M>SL_2({\mathcal O}_{-d})</M></Heading>

	The above fundamental domains can be used to construct  free resolutions for <M>SL_2({\mathcal O}_{-d})</M> and <M>PSL_2({\mathcal O}_{-d})</M>. The following commands illustrate the computation of free resolutions for <M>SL_2({\mathcal O}_{-43})</M> and <M>SL_2({\mathcal O}_{-10})</M> and
		<M>SL_2({\mathcal O}_{-14})</M>
		and their integral homology (which in each case is periodic of period dividing <M>4</M> in degrees <M>\ge 3</M>).

			The computation of  fundamental domains uses exact arithmetic in the two field extensions <M>\mathbb Q(\sqrt{d})</M> and <M> \mathbb Q(\sqrt{-d})</M>.

			                <Example>
<#Include SYSTEM "tutex/bianchi.5.txt">
</Example>

	The following commands count the number of orbits of cusps  (in addition to the orbit of <M>\infty</M>). They determine that there is 
		precisely one element in the ideal class group of <M>{\mathcal O}_{-43}</M> (i.e it is a principal ideal domain) and that there are precisely two elements in the ideal class group of <M>{\mathcal O}_{-10}</M>
			and precisely four elements in the ideal class group of <M>{\mathcal O}_{-14}</M>.
	<Example>
<#Include SYSTEM "tutex/bianchi.6.txt">
</Example>



</Section>

	<Section><Heading>Some sanity checks</Heading>
		There is ample scope for bugs in the implementation of the above method for computing resolutions of Bianchi groups. The following
		sanity checks lend confidence to the implementation.
<Subsection><Heading>Equivariant Euler characteristic</Heading>
	Let <M>X</M> be any cell complex with an action of a group <M>G</M>  
		such that (i) <M>X</M> has finitely many
		<M>G</M>-orbits of cells, and (ii)  the stabilizer subgroup in <M>G</M> for each cell is either finite or free abelian. One defines
			the <E>equivariant Euler characteristic</E>
		$$\chi_G(X) = \sum_e 
			(-1)^{dim~ e} / |Stab_G(e)|$$ 
			where <M>e</M> ranges over a set of representatives of the orbits of those cells with finite stabilizers. If <M>G</M> has a finite index torsion free subgroup and if the complex <M>X</M> is contractible then one 
				can define the Euler characteristic of the group to be <M>\chi(G) = \chi_G(X)</M>. It is known that <M>\chi (SL_n({\mathcal O}))
					= \chi(GL_n({\mathcal O})) =0</M>
					for <M>\mathcal O</M> the ring of integers of a number field <Cite Key="Gangl"/>.

					<P/>One easy test to make in our computations is to check that the equivariant Euler characteristic of the <M>2</M>-complex is indeed zero. The following commands perform this test for the group <M>SL_2({\mathcal O}_{-23})</M>.

						 <Example>
<#Include SYSTEM "tutex/bianchi.7.txt">
</Example>

</Subsection>

<Subsection><Heading>Boundary squares to zero</Heading>
The signs in the boundary maps of the free resolution are delicate. Another easy test is to check that the boundary in the resolution squares to zero. The following commands perform this check for the group <M>SL_2({\mathcal O}_{-23})</M>.

	<Example>
<#Include SYSTEM "tutex/bianchi.8.txt">
</Example>


		</Subsection>
		<Subsection><Heading>Compare different algorithms or implementations</Heading>
			Sebastian Schoennenbeck in his thesis work
			computed some contractible
			<M>2</M>-complexes  on which Bianchi groups act with finite stabilizers (even when the ideal class is greater than <M>1</M>) using a different approach to that of Swan.  These computed complexes are stored in <B>HAP</B> and provide an alternative way of computing cohomology for the stored groups. Alexander Rahm in his thesis work implemented Swan's approach and has provided some <M>2</M>-complexes that are also stored in <B>HAP</B> in  cases where the 
				ideal class is equal to <M>1</M>.
				<P/>The following commands test that Sebastian Schoennenbeck's <M>2</M>-complex for <M>SL_2({\mathcal O}_{-23})</M> yields the same integral homology as the above <B>HAP</B> implementation. Both computations use <B>HAP</B>'s implementation of Wall's perturbation technique for computing the resolution from the <M>2</M>-complex.

					  <Example>
<#Include SYSTEM "tutex/bianchi.9.txt">
</Example>

		</Subsection>
<Subsection><Heading>Compare geometry to algebra</Heading>
		The number of cusps (i.e. the number of orbits of vertices with infinite stabilizer subgroup) must be precisely one less than the number of elements in the ideal class group of <M>{\mathcal O}_{-d}</M>. The following commands check this for <M>SL_2({\mathcal O}_{-23})</M> where <M>{\mathcal O}_{-23}</M> is known to have class number 3. (This class number is easily computed from a formula in Swan's paper.)

			<Example>
<#Include SYSTEM "tutex/bianchi.11.txt">
</Example>

	A visualization of the fundamental domain tells us a certain amount about the algebra. In the case of <M>SL_2({\mathcal O}_{-23})</M>

	<P/>		<Alt Only="HTML">&lt;img src="images/sl2O-23.png" align="center" height="300" alt="Fundamental domain for a Bianchi group"/>
</Alt>

<P/>
	a fundamental domain for the action on <M>\mathbb C</M> by the translation subgroup generated by the matrices
	$$ \left(\begin{array}{ll}
	    1 &amp;1\\
	    0 &amp;1\end{array}\right),
	\left(\begin{array}{ll}
            1 &amp;\omega\\
            0 &amp;1\end{array}\right) $$

	<M>\omega = (1+\sqrt{-23})/2</M> is indicated by the white rectangle. From this we see that under the action of <M>SL_2({\mathcal O}_{-23})</M>
		there are at most <M>11</M> orbits of <M>2</M>-cells, the central decagon and ten quadrilaterals. However, the matrix
	$$ \left(\begin{array}{rr}
            0 &amp;-1\\
            1 &amp;0\end{array}\right)
             $$
			maps <M>(z,0)</M> to <M>(-1/z,0)</M> and fixes <M>(0,1)</M>. This isometry identifies points on the boundary of the decagon pairwise.
 These observations are  consistent with the above listing of the six orbit stabilizers and the
		following algebraic information on the boundaries of the <M>2</M>-cells  in the Bianchi <M>2</M>-complex.

		<Example>
<#Include SYSTEM "tutex/bianchi.12.txt">
</Example>


</Subsection>

	</Section>

<Section><Heading>Group presentations</Heading>
		Swan's reason for studying fundamental domains was to obtain explicit group presentations for <M>SL_2({\mathcal O}_{-d})</M> for various values of <M>d</M>. The following commands obtain a presentation for <M>SL_2({\mathcal O}_{-23})</M>.

			<Example>
<#Include SYSTEM "tutex/bianchi.10.txt">
</Example>

<Subsection><Heading>Swan's generators</Heading>
	The five generators in the above presentation for <M>SL_2({\mathcal O}_{-23})</M> are obtained by constructing the low dimensions of a CW-classifying space, forming a maximal tree in its <M>1</M>-skeleton, constructing
		a presentation whose generators correspond to edges not in the tree, and then applying Tietze operations to simplify this presentation. 
		Swan's approach instead uses generators corresponding to the "face pairings" of the <M>3</M>-dimensional fundamental domain. For <M>d\ne 1, 3</M> the  number of
			these face-pairing generators in <M>SL_2({\mathcal O}_{-d})</M> is equal to <M>3</M> plus the number of orbits of <M>2</M>-cells in the equivariant <M>2</M>-complex <M>K</M>. The three extra generators are the two translations corresponding to the vertical faces of the <M>3</M>-dimensional fundamental domain which get homotopied to edges in   <M>K</M>, plus the element <M>\left(\begin{array}{rr} -1 &amp; 0\\0 &amp; -1\end{array}\right)</M> which acts trivially on <M>{\frak H}^3</M>.
				For <M>d=1,3</M> there is one further generator due to the existence of non-trivial units in <M>{\mathcal O}(\mathbb Q(\sqrt{-1}))</M> and <M>{\mathcal O}(\mathbb Q(\sqrt{-3}))</M>.

				<P/>
				The following commands show that for <M>SL_2({\mathcal O}_{-23})</M> there are 6 orbits of <M>2</M>-cells in <M>K</M> and then lists Swan's 9 generators.

					           <Example>
<#Include SYSTEM "tutex/bianchi.16.txt">
</Example>
		
</Subsection>

</Section>

<Section><Heading>Finite index subgroups</Heading>
		The following commands compute the integral homology of a congruence subgroup <M>G</M> of index 24 in <M>SL_2({\mathcal O}_{-23})</M>.
			They also compute a presentation for <M>G</M>
				with 13 generators and 24 relators.

<Example>
<#Include SYSTEM "tutex/bianchi.13.txt">
</Example>

</Section>

<Section><Heading>Totally real quadratic fields / Hilbert modular group</Heading>
	For square free <M>d>0</M> the group <M>PSL_2({\mathcal O}_d)</M> is a subgroup of <M>PSL_2(\mathbb R)</M> but  not a discrete subgroup. 
		It embeds as a discrete subgroup of <M>PSL_2(\mathbb R)\times PSL_2(\mathbb R)</M> but a fundamental domain  for its action on <M>{\frak h}^2 \times {\frak h}^2</M> is not implemented in HAP. One can obtain a
			contractible <M>GL_2({\mathcal O}_d)</M>-equivariant complex
				using 
		<URL><Link>https://github.com/schoennenbeck/VMH-TotallyRealNumberFields</Link><LinkText>Sebastian Schoennenbeck's Magma implementation</LinkText></URL> of Voronoi's algorithm to produce text files that can be read into HAP.
			A few of these text files are stored in HAP. The following commands use one such text file to compute integral homology groups of
		<M>GL_2({\mathcal O}(\mathbb Q(\sqrt{14})))</M>. In this example the contractible complex is <M>4</M>-dimensional and has <M>33</M> orbits of <M>4</M>-dimensional cells.

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

<Section><Heading>Calling Magma's Voronoi algorithm directly</Heading>
	If <List>
		<Item>the <B>Magma</B> computational algebra system 
			can be started  using
			the line command <C>magma</C> and</Item>
		<Item> 
			<URL><Link>https://github.com/schoennenbeck/VMH-ImaginaryQuadraticNumberFields</Link><LinkText>Sebastian Schoennenbeck's Magma implementation</LinkText></URL> of Voronoi's algorithm for imaginary quadratic number fields is copied to ~pkg/Voronoi/VMH-ImaginaryQuadraticNumberFields and</Item>
		<Item><URL><Link>https://github.com/schoennenbeck/VMH-TotallyRealNumberFields</Link><LinkText>Sebastian Schoennenbeck's Magma implementation</LinkText></URL> of Voronoi's algorithm for totally real quadratic number  fields is copied to ~pkg/Voronoi/VMH-TotallyRealNumberFields </Item>
		</List>
				then one can use the <B>GAP</B> commands <C>VoronoiGL(n,d)</C>
					and <C>VoronoiSL(n,d)</C> to call  the <B>Magma</B> implementation of the Voronoi algorithm  directly. For example, the following commands do this to calculate the homology  groups
					<M>H^4(GL_2({\mathcal O}_{-5} ),P_{{\mathcal O}_{-5}}(8)) = (\mathbb Z_2)^{17} \oplus (\mathbb Z_4)^2 \oplus (\mathbb Z_8)^2 </M>
						and <M>H_4(GL_2({\mathcal O}(\mathbb Q(\sqrt{5})),\mathbb Z) = (\mathbb Z_2)^7 \oplus \mathbb Z_{60}</M>
							and <M>H_n(GL_3({\mathcal O}_{-5}),\mathbb Z)</M> for <M>n=1,2</M>.

				<Example>
<#Include SYSTEM "tutex/bianchi.17.txt">
</Example>

</Section>
</Chapter>
