  
  [1X14 [33X[0;0YFundamental domains for Bianchi groups[133X[101X
  
  
  [1X14.1 [33X[0;0YBianchi groups[133X[101X
  
  [33X[0;0YThe  [13XBianchi  groups[113X are the groups [22XG_-d=PSL_2(cal O_-d)[122X where [22Xd[122X is a square
  free  positive integer and [22Xcal O_-d[122X is the ring of integers of the imaginary
  quadratic field [22XQ(sqrt-d)[122X. These groups act on [13Xupper-half space[113X[133X
  
  
  [24X[33X[0;6Y{\frak h}^3 =\{(z,t) \in \mathbb C\times \mathbb R\ |\ t > 0\}[133X
  
  [124X
  
  [33X[0;0Yby the formula[133X
  
  
  [24X[33X[0;6Y\left(\begin{array}{ll}a&b\\  c  &d  \end{array}\right)\cdot  (z+tj)  \  = \
  \left(a(z+tj)+b\right)\left(c(z+tj)+d\right)^{-1}\[133X
  
  [124X
  
  [33X[0;0Ywhere  we  use the symbol [22Xj[122X satisfying [22Xj^2=-1[122X, [22Xij=-ji[122X and write [22Xz+tj[122X instead
  of [22X(z,t)[122X. Alternatively, the action is given by[133X
  
  
  [24X[33X[0;6Y\left(\begin{array}{ll}a&b\\  c  &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 \ .[133X
  
  [124X
  
  [33X[0;0YWe  take  the  boundary  [22X∂  frak  h^3[122X to be the Riemann sphere [22XC ∪ ∞[122X and let
  [22Xoverlinefrak  h^3[122X  denote the union of [22Xfrak h^3[122X and its boundary. The action
  of  [22XG_-d[122X  extends  to  the  boundary.  The element [22X∞[122X and each element of the
  number  field  [22XQ(sqrt-d)[122X  are thought of as lying in the boundary [22X∂ frak h^3[122X
  and  are  referred  to as [13Xcusps[113X. Let [22XX[122X denote the union of [22Xfrak h^3[122X with the
  set  of cusps, [22XX=frak h^3 ∪ {∞} ∪ Q(sqrt-d)[122X. It follows from work of Bianchi
  and  Humbert  that  the space [22XX[122X admits the structure of a regular CW-complex
  (depending  on  [22Xd[122X)  for  which  the  action of [22XG_-d[122X on [22Xfrak h^3[122X extends to a
  cellular  action on [22XX[122X which permutes cells. Moreover, [22XG_-d[122X acts transitively
  on  the [22X3[122X-cells of [22XX[122X and each [22X3[122X-cell has trivial stabilizer in [22XG_-d[122X. Details
  are provided in Richard Swan's paper [Swa71b].[133X
  
  [33X[0;0YWe  refer  to  the closure in [22XX[122X of any one of these [22X3[122X-cells as a [13Xfundamental
  domain[113X  for  the  action  [22XG_-d[122X.  Cohomology  of  [22XG_-d[122X 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 [22X≤ 2[122X.[133X
  
  
  [1X14.2 [33X[0;0YSwan's description of a fundamental domain[133X[101X
  
  [33X[0;0YA  pair  [22X(a,b)[122X of elements in [22Xcal O_-d[122X is said to be [13Xunimodular[113X if the ideal
  generated by [22Xa,b[122X is the whole ring [22Xcal O_-d[122X and [22Xane 0[122X. A unimodular pair can
  be  represented by a hemisphere in [22Xoverlinefrak h^3[122X with base centred at the
  point [22Xb/a ∈ C[122X and of radius [22X|1/a|[122X. The radius is [22X≤ 1[122X. Think of the points in
  [22Xfrak  h^3[122X  as  lying  strictly  above  [22XC[122X. Let [22XB[122X denote the space obtained by
  removing the interiors of all such hemispheres from [22Xfrak h^3[122X.[133X
  
  [33X[0;0YWhen [22Xd ≡ 3 mod 4[122X let [22XF[122X be the subspace of [22Xoverlinefrak h^3[122X consisting of the
  points  [22Xx+iy+jt[122X with [22X-1/2 ≤ x ≤ 1/2[122X, [22X-1/4 ≤ y ≤ 1/4[122X, [22Xt ≥ 0[122X. Otherwise, let [22XF[122X
  be  the  subspace  of [22Xoverlinefrak h^3[122X consisting of the points [22Xx+iy+jt[122X with
  [22X-1/2 ≤ x ≤ 1/2[122X, [22X-1/2 ≤ y ≤ 1/2[122X, [22Xt ≥ 0[122X.[133X
  
  [33X[0;0YIt  is  explained  in  [Swa71b] that [22XF∩ B[122X is a [22X3[122X-cell in the above mentioned
  regular CW-complex structure on [22XX[122X.[133X
  
  
  [1X14.3 [33X[0;0YComputing a fundamental domain[133X[101X
  
  [33X[0;0YExplicit  fundamental  domains  for  certain  values of [22Xd[122X were calculated by
  Bianchi  in  the  1890s  and  further calculations were made by Swan in 1971
  [Swa71b].   In   the   1970s,   building   on   Swan's  work,  Robert  Riley
  ([7Xhttps://www.sciencedirect.com/science/article/pii/S0723086913000042[107X)
  developed  a  computer  program for computing fundamental domains of certain
  Kleinian  groups  (including  Bianchi  groups).  In  their  2010  PhD theses
  Alexander Rahm ([7Xhttps://theses.hal.science/tel-00526976/en/[107X) and M.T. Aranes
  ([7Xhttps://wrap.warwick.ac.uk/id/eprint/35128/[107X)     independently    developed
  Pari/GP  and  Sage  software  based  on  Swan's  ideas.  In  2011 Dan Yasaki
  ([7Xhttps://mathstats.uncg.edu/sites/yasaki/publications/bianchipolytope.pdf[107X)
  used  a different approach based on Voronoi's theory of perfect forms in his
  Magma  software  for  fundamental  domains  of  Bianchi  groups.  Aurel Page
  ([7Xhttp://www.normalesup.org/~page/Recherche/Logiciels/logiciels-en.html[107X)
  developed  software  for  fundamental domains of Kleinian groups in his 2010
  masters       thesis.       In       2018       Sebastian      Schoennenbeck
  ([7Xhttps://github.com/schoennenbeck/VMH-DivisionAlgebras[107X)  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 [12XHAP[112X for use in constructing free resolutions.[133X
  
  [33X[0;0YMore  recently a [12XGAP[112X implementation of Swan's algorithm has been included in
  [12XHAP[112X.  The  implementation  uses  exact  computations  in  [22XQ(sqrt-d)[122X  and  in
  [22XQ(sqrtd)[122X.  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.[133X
  
  
  [1X14.4 [33X[0;0YExamples[133X[101X
  
  [33X[0;0YThe  fundamental domain [22XD=overlineF ∩ B[122X (where the overline denotes closure)
  has boundary [22X∂ D[122X involving the four vertical quadrilateral [22X2[122X-cells contained
  in  the four vertical quadrilateral [22X2[122X-cells of [22X∂ F[122X. We refer to these as the
  [13Xvertical  [22X2[122X-cells[113X of [22XD[122X. When visualizing [22XD[122X we ignore the [22X3[122X-cell and the four
  vertical  [22X2[122X-cells  entirely  and visualize only the remaining [22X2[122X-cells. These
  [22X2[122X-cells  can  be viewed as a [22X2[122X-dimensional image by projecting them onto the
  complex plane, or they can be viewed as an interactive [22X3[122X-dimensional image.[133X
  
  [33X[0;0YA  fundamental  domain  for  [22XG_-39[122X  can  be  visualized  using the following
  commands.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD:=BianchiPolyhedron(-39);[127X[104X
    [4X[28X3-dimensional Bianchi polyhedron over OQ( Sqrt(-39) ) [128X[104X
    [4X[28Xinvolving hemispheres of minimum squared radius 1/39 [128X[104X
    [4X[28Xand non-cuspidal vertices of minimum squared height 1/49 . [128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDisplay3D(D);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay2D(D);;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YA  [13Xcusp  vertex[113X  of  [22XD[122X  is  any  vertex  of  [22XD[122X  lying in [22XC ∪ ∞[122X. In the above
  visualizations   for  [22XG_-39[122X  several  cusp  vertices  in  [22XC[122X  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  [22XG_-d[122X. Thus, together with the orbit of [22X∞[122X 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 [22XQ(sqrt-39)[122X is
  of order [22X4[122X.[133X
  
  [33X[0;0YThe  following  additional  commands  comvert  the ``bottom surface'' of the
  Bianchi polyhedron [22XD[122X to a [22X2[122X-dimensional regular CW-complex and then displays
  the [22X1[122X-skeleton of this [22X2[122X-complex.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD:=BianchiPolyhedron(-39);;[127X[104X
    [4X[25Xgap>[125X [27XY:=RegularCWComplex(D);[127X[104X
    [4X[28XRegular CW-complex of dimension 2[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XDisplay(GraphOfRegularCWComplex(Y));[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YA  fundamental  domain  for  [22XG_-22[122X  can  be  visualized  using the following
  commands.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD:=BianchiPolyhedron(-22);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay3D(OQ,D);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay2D(OQ,D);;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YTwo  cusps  are  visible  in  these  visualizations for [22XG_-22[122X. They lie in a
  single  orbit.  Thus,  together with the orbit of [22X∞[122X, there are two orbits of
  cusps for this group.[133X
  
  [33X[0;0YAn  alternative  visualization for [22XG_-22[122X can be produced, in which the cells
  in  a  given orbit are coloured with a common colour. The following commands
  produce this visualization.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-22);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay3D(K);[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YA  fundamental  domain  for  [22XG_-163[122X  can  be  visualized using the following
  commands.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD:=BianchiPolyhedron(-163);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay3D(OQ,D);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay2D(OQ,D);;[127X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-163);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay3D(K);[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThere  is just a single orbit of cusps in this example, the orbit containing
  [22X∞[122X, since [22XQ(sqrt-163)[122X is a principal ideal domain and hence has trivial class
  group.[133X
  
  [33X[0;0YA fundamental domain for [22XG_-33[122X is visualized using the following commands.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD:=BianchiPolyhedron(-33);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay3D(OQ,D);;[127X[104X
    [4X[25Xgap>[125X [27XDisplay2D(OQ,D);;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.5 [33X[0;0YEstablishing correctness of a fundamental domain[133X[101X
  
  [33X[0;0YThe  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  [22Xb/a∈  C[122X  with  [22X(a,b)[122X 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.[133X
  
  [33X[0;0YFor  a few values of [22Xd[122X the smallest radius [22Xr[122X 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  [22Xr[122X is
  implemented  and the user is advised to speed things up by guessiing a value
  [22XN=1/r^2[122X  and  then  test  that  this  value of [22XN[122X is indeed large enough. The
  following commands illustrate this for [22Xd=-46[122X with a guess of [22XN=600[122X. Once the
  test  is  done  we  can see that in fact a smaller guess of [22XN=441[122X would have
  sufficed.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XP:=BianchiPolyhedron(-46);[127X[104X
    [4X[28XTry [128X[104X
    [4X[28X  P:=BianchiPolyhedron(OQ,N);[128X[104X
    [4X[28Xfor some guessed positive integer value of N and then try[128X[104X
    [4X[28X  SwanBianchiCriterion(P);[128X[104X
    [4X[28Xto test if the value of N was large enough. If the test returns false then you\[128X[104X
    [4X[28X'll need to try a larger value of N.[128X[104X
    [4X[28X[128X[104X
    [4X[28XA successful value of N can be stored as a pair [d,N] in the list HAPRECORD wh\[128X[104X
    [4X[28Xich can be edited manually in the file hap/lib/Congruence/bianchi.gi .[128X[104X
    [4X[28X[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XP:=BianchiPolyhedron(-46,600);[127X[104X
    [4X[28X3-dimensional Bianchi polyhedron over OQ( Sqrt([128X[104X
    [4X[28X-46) ) involving hemispheres of minimum squared radius 1/[128X[104X
    [4X[28X441 and non-cuspidal vertices of minimum squared height 1/8280 . [128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSwanBianchiCriterion(P);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.6 [33X[0;0YComputing quotient [22X2[122X[101X[1X-complexes[133X[101X
  
  [33X[0;0YThe  space  [22XX=frak  h^3  ∪  {∞}  ∪  Q(sqrt-d)[122X  retracts onto an [22XSL_2(mathcal
  O_-d)[122X-equivariant [22X2[122X-dimensional regular CW-complex [22XK ⊂ X[122X. By barycentrically
  subdividing [22XK[122X we can assume that the group action on [22XK[122X is [13Xrigid[113X in the sense
  that  any  group  element  in  the  stabilizer  of  a  cell  fixes that cell
  pointwise.  Given  a congruence subgroup [22XΓ ≤ SL_2(mathcal O_-d)[122X the quotient
  space  [22XY=K/Γ[122X  inherits a regular CW-structure. We have [22XH_n(Γ, Q) = H_n(Y, Q)[122X
  and  [22XH_n(Γ,  Z_p)  = H_n(Y, Z_p)[122X for any prime not dividing the order of any
  group  element  in [22XΓ[122X. At these primes the [22Xp[122X-torsion in [22XH_n(Y, Z)[122X equals that
  in  [22XH_n(Γ, Z)[122X. The following session computes the integral homology of [22XY[122X for
  [22XΓ=Γ_0(71)  ≤  SL(2,mathcal O_-2)[122X and establishes that [22XΓ[122X has no [22Xp[122X-torsion for
  primes [22Xp>3[122X and has index [22X5042[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-2);;[127X[104X
    [4X[25Xgap>[125X [27Xiso:=K!.isomorphismToGroupCyclotomicMats;;[127X[104X
    [4X[25Xgap>[125X [27XKK:=BarycentricSubdivision(K);; #KK is a rigid complex[127X[104X
    [4X[25Xgap>[125X [27XResolutionIsomorphismGroup(KK,iso);; #matrices in G=SL(2,O-2) now have[127X[104X
    [4X[25Xgap>[125X [27X                                     #cyclotomic entries[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XOQ:=RingOfIntegers(QuadraticNumberField(-2));;[127X[104X
    [4X[25Xgap>[125X [27XI:=QuadraticIdeal(OQ,71);;[127X[104X
    [4X[25Xgap>[125X [27XN:=HAP_CongruenceSubgroupGamma0(I);; #A congruence subgroup of G[127X[104X
    [4X[25Xgap>[125X [27XIndexInSL2O(N);[127X[104X
    [4X[28X5042[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XY:=GComplexToRegularCWComplex(KK,N); #Y = KK/N is a quotient CW-complex[127X[104X
    [4X[28XRegular CW-complex of dimension 2[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XHomology(Y,0);[127X[104X
    [4X[28X[ 0 ][128X[104X
    [4X[25Xgap>[125X [27XHomology(Y,1);[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, [128X[104X
    [4X[28X  4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, [128X[104X
    [4X[28X  16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 96, 672, 8471771350548821313678624, [128X[104X
    [4X[28X  42358856752744106568393120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [128X[104X
    [4X[28X  0, 0, 0, 0, 0 ][128X[104X
    [4X[25Xgap>[125X [27XHomology(Y,2);[127X[104X
    [4X[28X[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XFlat(List([0..2], n->[127X[104X
    [4X[25X>[125X [27X              List([1..K!.dimension(n)],k->Order(K!.stabilizer(n,k)))  ));[127X[104X
    [4X[28X[ 24, 6, 8, 4 ][128X[104X
    [4X[25Xgap>[125X [27XFactors(8471771350548821313678624);[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 3, 7, 17, 17, 17, 19, 617, 873263, 250653841 ][128X[104X
    [4X[25Xgap>[125X [27XFactors(42358856752744106568393120);[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 3, 5, 7, 17, 17, 17, 19, 617, 873263, 250653841 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  above  computation  can  be  corroborated by using a free resolution to
  calculate [22XH_1(Γ_0(71), Z)[122X at all primes.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X		[128X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(KK,2);;[127X[104X
    [4X[25Xgap>[125X [27XS:=ResolutionFiniteSubgroup(R,N);;[127X[104X
    [4X[25Xgap>[125X [27XC:=TensorWithIntegers(S);;[127X[104X
    [4X[25Xgap>[125X [27XD:=ContractedComplex(C);;[127X[104X
    [4X[25Xgap>[125X [27XHomology(D,1);[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, [128X[104X
    [4X[28X  4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16,[128X[104X
    [4X[28X  16, 16, 16, 16, 16, 16, 16, 32, 96, 96, 672, 8471771350548821313678624, [128X[104X
    [4X[28X  127076570258232319705179360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [128X[104X
    [4X[28X  0, 0, 0, 0, 0 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  next  example  computes  a CW complex [22XY[122X with [22XH^∗(Y, Z) =H^∗(Γ_0(23), Z)[122X
  modulo  the  primes  [22X2,3[122X  for  [22XΓ_0(23) < SL_2(mathcal O_-2)[122X and shows that a
  basis  [22Xb_1,b_2,...  b_9[122X  for [22XH^1(W, Z) = Z^9[122X satisfies [22Xb_i∪ b_j=0[122X except for
  [22Xb_1∪ b_6 = -b_6∪ b_1≠ 0[122X, [22Xb_1∪ b_7 =-b_7∪ b_1ne 0[122X, [22Xb_1∪ b_9=-b_9∪ b_1ne 0[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X                [128X[104X
    [4X[25Xgap>[125X [27XI:=QuadraticIdeal(OQ,23);;[127X[104X
    [4X[25Xgap>[125X [27XN:=HAP_CongruenceSubgroupGamma0(I);;[127X[104X
    [4X[25Xgap>[125X [27XY:=GComplexToRegularCWComplex(KK,N);;[127X[104X
    [4X[25Xgap>[125X [27XY:=SimplifiedComplex(Y);;[127X[104X
    [4X[25Xgap>[125X [27XCohomology(Y,1);[127X[104X
    [4X[28X[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ][128X[104X
    [4X[25Xgap>[125X [27XB:=IdentityMat(9);; # represents the 9 cohomology generators[127X[104X
    [4X[25Xgap>[125X [27XC:=NullMat(9,9);;[127X[104X
    [4X[25Xgap>[125X [27Xcup:=CupProduct(Y);;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..9] do[127X[104X
    [4X[25X>[125X [27Xfor j in [j+1..9] do[127X[104X
    [4X[25X>[125X [27Xif not IsZero(cup(1,1,B[i],B[j])) then C[i][j]:=1; C[j,i]:=1; fi;[127X[104X
    [4X[25X>[125X [27Xod;od;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(C);[127X[104X
    [4X[28X[ [  0,  0,  0,  0,  0,  1,  1,  0,  1 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  1,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  1,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  1,  0,  0,  0,  0,  0,  0,  0,  0 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YTHe  following additional commands compute the [22X11[122X-primary parts [22XH^2(Γ_0(23),
  Z)_(11)=  Z_11[122X,  [22XH^n(Γ_0(23),  Z)_(11)=0[122X  for [22X2ne n>0[122X. They then compute the
  cohomology  ring  [22XA=H^∗(Γ_0(23),  Z_11)[122X,  a basis [22XB[122X of [22XH^1(Γ_0(23), Z_11) =(
  Z_11)^10[122X, and procuce a matrix [22XC=(c_ij)[122X with [22Xc_ij=0[122X if [22Xb_i∪ b_j=0[122X, [22Xc_ij=1[122X if
  [22Xb_i∪ b_jne 0[122X for [22Xb_i,b_j∈ B[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X                [128X[104X
    [4X[25Xgap>[125X [27XCohomology(Y,2);[127X[104X
    [4X[28X[ 2, 2, 2, 4, 4, 4, 4, 4, 44, 0, 0, 0, 0, 0, 0, 0, 0 ][128X[104X
    [4X[25Xgap>[125X [27XA:=CohomologyRing(Y,11);[127X[104X
    [4X[28X<algebra of dimension 20 over GF(11)>[128X[104X
    [4X[25Xgap>[125X [27XB:=Basis(A);;[127X[104X
    [4X[25Xgap>[125X [27XB:=Filtered(B,b->A!.degree(b)=1);;[127X[104X
    [4X[25Xgap>[125X [27XC:=NullMat(Length(B),Length(B));;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [1..Length(B)] do[127X[104X
    [4X[25X>[125X [27Xfor j in [1..Length(B)] do[127X[104X
    [4X[25X>[125X [27Xif not IsZero(B[i]*B[j]) then C[i][j]:=1; fi;[127X[104X
    [4X[25X>[125X [27Xod;od;[127X[104X
    [4X[25Xgap>[125X [27XDisplay(C);[127X[104X
    [4X[28X[ [  0,  0,  0,  0,  0,  0,  0,  0,  0,  0 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  1,  1,  1 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  1,  1,  1 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  1,  1,  1,  1,  1 ],[128X[104X
    [4X[28X  [  0,  0,  0,  0,  0,  0,  0,  1,  1,  1 ],[128X[104X
    [4X[28X  [  0,  0,  0,  1,  0,  0,  1,  1,  1,  1 ],[128X[104X
    [4X[28X  [  0,  0,  0,  1,  0,  1,  0,  1,  1,  1 ],[128X[104X
    [4X[28X  [  0,  1,  1,  1,  1,  1,  1,  0,  1,  1 ],[128X[104X
    [4X[28X  [  0,  1,  1,  1,  1,  1,  1,  1,  0,  1 ],[128X[104X
    [4X[28X  [  0,  1,  1,  1,  1,  1,  1,  1,  1,  0 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.7 [33X[0;0YComputing a free resolution for [22XSL_2(mathcal O_-d)[122X[101X[1X[133X[101X
  
  [33X[0;0YThe  above fundamental domains can be used to construct free resolutions for
  [22XSL_2(mathcal   O_-d)[122X   and   [22XPSL_2(mathcal  O_-d)[122X.  The  following  commands
  illustrate  the  computation of free resolutions for [22XSL_2(mathcal O_-43)[122X and
  [22XSL_2(mathcal  O_-10)[122X  and  [22XSL_2(mathcal  O_-14)[122X  and their integral homology
  (which  in  each  case is periodic of period dividing [22X4[122X in degrees [22X≥ 3[122X). The
  computation  of  fundamental  domains uses exact arithmetic in the two field
  extensions [22XQ(sqrtd)[122X and [22XQ(sqrt-d)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-43);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,11);;[127X[104X
    [4X[25Xgap>[125X [27XC:=TensorWithIntegers(R);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..10],n->Homology(C,n));[127X[104X
    [4X[28X[ [ 0 ], [ 0, 0 ], [ 2, 2, 12, 0 ], [ 2, 2, 24 ], [ 2, 2 ], [ 2 ], [128X[104X
    [4X[28X  [ 2, 2, 12 ], [ 2, 2, 24 ], [ 2, 2 ], [ 2 ], [ 2, 2, 12 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-10);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,11);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..10],k->Homology(TensorWithIntegers(R),k));[127X[104X
    [4X[28X[ [ 0 ], [ 2, 2, 0, 0, 0 ], [ 2, 2, 2, 12, 0, 0 ], [ 2, 2, 2, 24 ], [128X[104X
    [4X[28X  [ 2, 4, 12 ], [ 2, 2, 2, 6 ], [ 2, 2, 2, 12 ], [ 2, 2, 2, 24 ], [128X[104X
    [4X[28X  [ 2, 4, 12 ], [ 2, 2, 2, 6 ], [ 2, 2, 2, 12 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-14);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,11);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..10],k->Homology(TensorWithIntegers(R),k));[127X[104X
    [4X[28X[ [ 0 ], [ 6, 0, 0, 0, 0, 0 ], [ 2, 2, 2, 4, 12, 0, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 24 ], [ 2, 2, 2, 4, 12 ], [ 2, 2, 2, 2, 24 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 4, 12 ], [ 2, 2, 2, 2, 24 ], [ 2, 2, 2, 4, 12 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 24 ], [ 2, 2, 2, 4, 12 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  following  commands count the number of orbits of cusps (in addition to
  the  orbit  of [22X∞[122X). They determine that there is precisely one element in the
  ideal  class group of [22Xmathcal O_-43[122X (i.e it is a principal ideal domain) and
  that  there  are  precisely two elements in the ideal class group of [22Xmathcal
  O_-10[122X and precisely four elements in the ideal class group of [22Xmathcal O_-14[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-43);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..K!.dimension(0)],k->Order(K!.stabilizer(0,k)));[127X[104X
    [4X[28X[ 24, 24, 6, 6, 4, 4, 12, 12 ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-10);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..K!.dimension(0)],k->Order(K!.stabilizer(0,k)));[127X[104X
    [4X[28X[ 6, 6, 4, 4, 6, infinity ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-14);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..K!.dimension(0)],k->Order(K!.stabilizer(0,k)));[127X[104X
    [4X[28X[ 6, 6, 2, 2, 2, infinity, infinity, 2, infinity, 6, 4 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.8 [33X[0;0YSome sanity checks[133X[101X
  
  [33X[0;0YThere  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.[133X
  
  
  [1X14.8-1 [33X[0;0YEquivariant Euler characteristic[133X[101X
  
  [33X[0;0YLet  [22XX[122X  be  any cell complex with an action of a group [22XG[122X such that (i) [22XX[122X has
  finitely  many  [22XG[122X-orbits of cells, and (ii) the stabilizer subgroup in [22XG[122X for
  each  cell  is  either  finite  or free abelian. One defines the [13Xequivariant
  Euler  characteristic[113X  $$\chi_G(X)  =  \sum_e  (-1)^{dim~ e} / |Stab_G(e)|$$
  where  [22Xe[122X  ranges  over a set of representatives of the orbits of those cells
  with  finite  stabilizers. If [22XG[122X has a finite index torsion free subgroup and
  if   the   complex   [22XX[122X  is  contractible  then  one  can  define  the  Euler
  characteristic  of  the  group  to  be  [22Xχ(G)  =  χ_G(X)[122X.  It is known that [22Xχ
  (SL_n(mathcal O)) = χ(GL_n(mathcal O)) =0[122X for [22Xmathcal O[122X the ring of integers
  of a number field [DSGG+16].[133X
  
  [33X[0;0YOne  easy  test to make in our computations is to check that the equivariant
  Euler characteristic of the [22X2[122X-complex is indeed zero. The following commands
  perform this test for the group [22XSL_2(mathcal O_-23)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xchi:=0;;[127X[104X
    [4X[25Xgap>[125X [27Xfor n in [0..2] do[127X[104X
    [4X[25X>[125X [27Xfor k in [1..K!.dimension(n)] do[127X[104X
    [4X[25X>[125X [27Xg:=Order(K!.stabilizer(n,k));[127X[104X
    [4X[25X>[125X [27Xif g < infinity then chi:=chi + (-1)^n/g; fi;[127X[104X
    [4X[25X>[125X [27Xod;od;[127X[104X
    [4X[25Xgap>[125X [27Xchi;[127X[104X
    [4X[28X0[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.8-2 [33X[0;0YBoundary squares to zero[133X[101X
  
  [33X[0;0YThe  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 [22XSL_2(mathcal O_-23)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,10);;[127X[104X
    [4X[25Xgap>[125X [27Xn:=2;;List([1..R!.dimension(n)],k->ResolutionBoundaryOfWord(R,n-1,R!.boundary(n,k)));[127X[104X
    [4X[28X[ [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ] ][128X[104X
    [4X[25Xgap>[125X [27Xn:=3;;List([1..R!.dimension(n)],k->ResolutionBoundaryOfWord(R,n-1,R!.boundary(n,k)));[127X[104X
    [4X[28X[ [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ] ][128X[104X
    [4X[25Xgap>[125X [27Xn:=4;;List([1..R!.dimension(n)],k->ResolutionBoundaryOfWord(R,n-1,R!.boundary(n,k)));[127X[104X
    [4X[28X[ [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ] ][128X[104X
    [4X[25Xgap>[125X [27Xn:=5;;List([1..R!.dimension(n)],k->ResolutionBoundaryOfWord(R,n-1,R!.boundary(n,k)));[127X[104X
    [4X[28X[ [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [128X[104X
    [4X[28X  [  ], [  ], [  ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.8-3 [33X[0;0YCompare different algorithms or implementations[133X[101X
  
  [33X[0;0YSebastian  Schoennenbeck  in  his  thesis  work  computed  some contractible
  [22X2[122X-complexes  on  which Bianchi groups act with finite stabilizers (even when
  the  ideal  class  is  greater than [22X1[122X) using a different approach to that of
  Swan.  These computed complexes are stored in [12XHAP[112X 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 [22X2[122X-complexes
  that are also stored in [12XHAP[112X in cases where the ideal class is equal to [22X1[122X.[133X
  
  [33X[0;0YThe  following  commands  test  that Sebastian Schoennenbeck's [22X2[122X-complex for
  [22XSL_2(mathcal  O_-23)[122X  yields  the  same  integral  homology as the above [12XHAP[112X
  implementation.   Both  computations  use  [12XHAP[112X's  implementation  of  Wall's
  perturbation technique for computing the resolution from the [22X2[122X-complex.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=ContractibleGcomplex("SL(2,O-23)");;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,10);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..9],n->Homology(TensorWithIntegers(R),n));[127X[104X
    [4X[28X[ [ 0 ], [ 12, 0, 0, 0 ], [ 2, 2, 12, 0, 0 ], [ 2, 2, 12 ], [ 2, 2, 12 ], [128X[104X
    [4X[28X  [ 2, 2, 12 ], [ 2, 2, 12 ], [ 2, 2, 12 ], [ 2, 2, 12 ], [ 2, 2, 12 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,10);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..9],n->Homology(TensorWithIntegers(R),n));[127X[104X
    [4X[28X[ [ 0 ], [ 12, 0, 0, 0 ], [ 2, 2, 12, 0, 0 ], [ 2, 2, 12 ], [ 2, 2, 12 ], [128X[104X
    [4X[28X  [ 2, 2, 12 ], [ 2, 2, 12 ], [ 2, 2, 12 ], [ 2, 2, 12 ], [ 2, 2, 12 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.8-4 [33X[0;0YCompare geometry to algebra[133X[101X
  
  [33X[0;0YThe  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 [22Xmathcal O_-d[122X. The following commands check this
  for [22XSL_2(mathcal O_-23)[122X where [22Xmathcal O_-23[122X is known to have class number 3.
  (This class number is easily computed from a formula in Swan's paper.)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..K!.dimension(0)],k->Order(K!.stabilizer(0,k)));[127X[104X
    [4X[28X[ 6, 2, 2, 4, infinity, infinity ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YA  visualization  of  the fundamental domain tells us a certain amount about
  the algebra. In the case of [22XSL_2(mathcal O_-23)[122X[133X
  
  [33X[0;0Ya  fundamental  domain  for  the  action  on  [22XC[122X  by the translation subgroup
  generated   by   the   matrices   $$   \left(\begin{array}{ll}   1   &1\\  0
  &1\end{array}\right),      \left(\begin{array}{ll}     1     &\omega\\     0
  &1\end{array}\right)  $$  [22Xω  =  (1+sqrt-23)/2[122X  is  indicated  by  the  white
  rectangle.  From  this  we  see that under the action of [22XSL_2(mathcal O_-23)[122X
  there  are  at  most  [22X11[122X  orbits  of  [22X2[122X-cells,  the  central decagon and ten
  quadrilaterals.  However,  the  matrix  $$ \left(\begin{array}{rr} 0 &-1\\ 1
  &0\end{array}\right)  $$  maps  [22X(z,0)[122X  to  [22X(-1/z,0)[122X  and  fixes  [22X(0,1)[122X. 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
  [22X2[122X-cells in the Bianchi [22X2[122X-complex.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..K!.dimension(2)],k->Length(K!.boundary(2,k)));[127X[104X
    [4X[28X[ 10, 4, 4, 4, 4, 4 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.9 [33X[0;0YGroup presentations[133X[101X
  
  [33X[0;0YSwan's  reason for studying fundamental domains was to obtain explicit group
  presentations  for [22XSL_2(mathcal O_-d)[122X for various values of [22Xd[122X. The following
  commands obtain a presentation for [22XSL_2(mathcal O_-23)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,2);;[127X[104X
    [4X[25Xgap>[125X [27XP:=PresentationOfResolution(R);[127X[104X
    [4X[25Xgap>[125X [27XG:=SimplifiedFpGroup(P!.freeGroup/P!.relators);[127X[104X
    [4X[28X<fp group on the generators [ k, r, s, w, x ]>[128X[104X
    [4X[25Xgap>[125X [27XRelatorsOfFpGroup(G);[127X[104X
    [4X[28X[ w^-1*k*w*k^-1, s^-1*r*s*r^-1, k^6, x^-1*k^-3*x*k^-3, s^-1*k^-3*s*k^-3, [128X[104X
    [4X[28X  r^-1*w*x^-1*s*r*w^-1*x*s^-1, r^-1*k^-3*r*k^-3, [128X[104X
    [4X[28X  x*k^-2*r^-1*x*r^-1*s^-1*k^-1*s^-1, x^-1*k^3*s*r*x^-1*s*r ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27X#Next we identify the generators as matrices[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfGroup(P!.freeGroup);[127X[104X
    [4X[28X[ k, m, n, p, q, r, s, t, u, v, w, x, y, z ][128X[104X
    [4X[25Xgap>[125X [27XP!.gens;[127X[104X
    [4X[28X[ 19, 6, 6, 20, 6, 21, 22, 6, 52, 53, 2, 50, 1, 4 ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xk:=R!.elts[19];[127X[104X
    [4X[28X[ [ 1, 1 ], [128X[104X
    [4X[28X  [ -1, 0 ] ][128X[104X
    [4X[25Xgap>[125X [27Xr:=R!.elts[21];[127X[104X
    [4X[28X[ [ 3, 3 + -1 Sqrt(-23) ], [128X[104X
    [4X[28X  [ -3/2 + -1/2 Sqrt(-23), -5 ] ][128X[104X
    [4X[25Xgap>[125X [27Xs:=R!.elts[22];[127X[104X
    [4X[28X[ [ 2 + 1 Sqrt(-23), 13/2 + 1/2 Sqrt(-23) ], [128X[104X
    [4X[28X  [ 5/2 + -1/2 Sqrt(-23), -1 Sqrt(-23) ] ][128X[104X
    [4X[25Xgap>[125X [27Xw:=R!.elts[2];[127X[104X
    [4X[28X[ [ 3/2 + 1/2 Sqrt(-23), -3/2 + 1/2 Sqrt(-23) ], [128X[104X
    [4X[28X  [ 3/2 + -1/2 Sqrt(-23), 3 ] ][128X[104X
    [4X[25Xgap>[125X [27Xx:=R!.elts[50];[127X[104X
    [4X[28X[ [ 11/2 + 1/2 Sqrt(-23), 15/2 + -1/2 Sqrt(-23) ], [128X[104X
    [4X[28X  [ -1 Sqrt(-23), -4 + -1 Sqrt(-23) ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.9-1 [33X[0;0YSwan's generators[133X[101X
  
  [33X[0;0YThe  five  generators  in the above presentation for [22XSL_2(mathcal O_-23)[122X are
  obtained  by  constructing  the  low  dimensions  of a CW-classifying space,
  forming  a maximal tree in its [22X1[122X-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  [22X3[122X-dimensional
  fundamental domain. For [22Xdne 1, 3[122X the number of these face-pairing generators
  in  [22XSL_2(mathcal O_-d)[122X is equal to [22X3[122X plus the number of orbits of [22X2[122X-cells in
  the  equivariant  [22X2[122X-complex  [22XK[122X.  The  three  extra  generators  are  the two
  translations  corresponding  to  the  vertical  faces  of  the [22X3[122X-dimensional
  fundamental  domain  which  get  homotopied  to edges in [22XK[122X, plus the element
  [22X(beginarrayrr  -1  &  00 & -1endarray)[122X which acts trivially on [22Xfrak H^3[122X. For
  [22Xd=1,3[122X  there  is  one  further generator due to the existence of non-trivial
  units in [22Xmathcal O( Q(sqrt-1))[122X and [22Xmathcal O( Q(sqrt-3))[122X.[133X
  
  [33X[0;0YThe  following commands show that for [22XSL_2(mathcal O_-23)[122X there are 6 orbits
  of [22X2[122X-cells in [22XK[122X and then lists Swan's 9 generators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XK!.dimension(2);[127X[104X
    [4X[28X6[128X[104X
    [4X[25Xgap>[125X [27Xfor g in GeneratorsOfGroup(K!.group) do[127X[104X
    [4X[25X>[125X [27XPrint(g,"\n");[127X[104X
    [4X[25X>[125X [27Xod;[127X[104X
    [4X[28X[ [ -1, 0 ], [ 0, -1 ] ][128X[104X
    [4X[28X[ [ 1, 1 ], [ 0, 1 ] ][128X[104X
    [4X[28X[ [ 1, 1/2 + 1/2 Sqrt(-23) ], [ 0, 1 ] ][128X[104X
    [4X[28X[ [ -1, 0 ], [ 1, -1 ] ][128X[104X
    [4X[28X[ [ 5 + 2 Sqrt(-23), -11 ], [ 3/2 + -1/2 Sqrt(-23), 3/2 + 1/2 Sqrt(-23) ] ][128X[104X
    [4X[28X[ [ 208 + 25 Sqrt(-23), -225 + 25 Sqrt(-23) ], [ 3/2 + 1/2 Sqrt(-23), -3 ] ][128X[104X
    [4X[28X[ [ 18 + 91 Sqrt(-23), -437 ], [ 5/2 + 1/2 Sqrt(-23), -5/2 + 1/2 Sqrt(-23) ] ][128X[104X
    [4X[28X[ [ 1 + -6 Sqrt(-23), -29 ], [ 5/2 + -1/2 Sqrt(-23), -5/2 + -1/2 Sqrt(-23) ] ][128X[104X
    [4X[28X[ [ 1 Sqrt(-23), -6 ], [ 4, 1 Sqrt(-23) ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.10 [33X[0;0YFinite index subgroups[133X[101X
  
  [33X[0;0YThe  following  commands  compute  the  integral  homology  of  a congruence
  subgroup  [22XG[122X  of  index  24  in  [22XSL_2(mathcal  O_-23)[122X.  They  also  compute a
  presentation for [22XG[122X with 13 generators and 24 relators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XOQ:=RingOfIntegers(QuadraticNumberField(-23));;[127X[104X
    [4X[25Xgap>[125X [27XI:=QuadraticIdeal(OQ,[Sqrt(-23)]);[127X[104X
    [4X[28Xideal of norm 23 in O(Q(Sqrt(-23)))[128X[104X
    [4X[25Xgap>[125X [27XG:=HAP_CongruenceSubgroupGamma0(I);[127X[104X
    [4X[28X<group of 2x2 matrices in characteristic 0>[128X[104X
    [4X[25Xgap>[125X [27XIndexInSL2O(G);[127X[104X
    [4X[28X24[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XK:=BianchiGcomplex(-23);;[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,11);;[127X[104X
    [4X[25Xgap>[125X [27XR:=QuadraticToCyclotomicCoefficients(R);;[127X[104X
    [4X[25Xgap>[125X [27XS:=ResolutionFiniteSubgroup(R,G);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..10],n->Homology(TensorWithIntegers(S),n));[127X[104X
    [4X[28X[ [ 0 ], [ 2, 0, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0 ], [ 2, 2, 2, 2, 2, 2, 2, 2 ],[128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2 ], [ 2, 2, 2, 2, 2, 2, 2, 2 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2 ], [ 2, 2, 2, 2, 2, 2, 2, 2 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2 ], [ 2, 2, 2, 2, 2, 2, 2, 2 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XP:=PresentationOfResolution(S);;[127X[104X
    [4X[25Xgap>[125X [27XH:=SimplifiedFpGroup(P!.freeGroup/P!.relators);[127X[104X
    [4X[28X<fp group on the generators [ f8, f10, f15, f70, f86, f125, f132, f138, f182, [128X[104X
    [4X[28X  f187, f191, f273, f279 ]>[128X[104X
    [4X[25Xgap>[125X [27XLength(RelatorsOfFpGroup(H));[127X[104X
    [4X[28X24[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.11 [33X[0;0YTotally real quadratic fields / Hilbert modular group[133X[101X
  
  [33X[0;0YFor  square free [22Xd>0[122X the group [22XPSL_2(mathcal O_d)[122X is a subgroup of [22XPSL_2( R)[122X
  but  not a discrete subgroup. It embeds as a discrete subgroup of [22XPSL_2( R)×
  PSL_2(  R)[122X but a fundamental domain for its action on [22Xfrak h^2 × frak h^2[122X is
  not   implemented  in  HAP.  One  can  obtain  a  contractible  [22XGL_2(mathcal
  O_d)[122X-equivariant    complex    using    Sebastian    Schoennenbeck's   Magma
  implementation
  ([7Xhttps://github.com/schoennenbeck/VMH-TotallyRealNumberFields[107X)  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 [22XGL_2(mathcal O( Q(sqrt14)))[122X. In this
  example  the  contractible  complex  is  [22X4[122X-dimensional  and has [22X33[122X orbits of
  [22X4[122X-dimensional cells.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XK:=ContractibleGcomplex("GL(2,O14)");[127X[104X
    [4X[28XNon-free resolution in characteristic 0 for matrix group . [128X[104X
    [4X[28XNo contracting homotopy available. [128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XList([0..5],K!.dimension);[127X[104X
    [4X[28X[ 144, 463, 532, 234, 33, 0 ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(K,6);;[127X[104X
    [4X[25Xgap>[125X [27XList([0..5],n->Homology(TensorWithIntegers(R),n));[127X[104X
    [4X[28X[ [ 0 ], [ 2, 2, 2, 0 ], [ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 24, 24, 0, 0, 0, 0 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 12, 24 ], [128X[104X
    [4X[28X  [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X14.12 [33X[0;0YCalling Magma's Voronoi algorithm directly[133X[101X
  
  [33X[0;0YIf[133X
  
  [30X    [33X[0;6Ythe  [12XMagma[112X  computational algebra system can be started using the line
        command [10Xmagma[110X and[133X
  
  [30X    [33X[0;6YSebastian         Schoennenbeck's         Magma         implementation
        ([7Xhttps://github.com/schoennenbeck/VMH-ImaginaryQuadraticNumberFields[107X)
        of Voronoi's algorithm for imaginary quadratic number fields is copied
        to ~pkg/Voronoi/VMH-ImaginaryQuadraticNumberFields and[133X
  
  [30X    [33X[0;6YSebastian         Schoennenbeck's         Magma         implementation
        ([7Xhttps://github.com/schoennenbeck/VMH-TotallyRealNumberFields[107X)      of
        Voronoi's algorithm for totally real quadratic number fields is copied
        to ~pkg/Voronoi/VMH-TotallyRealNumberFields[133X
  
  [33X[0;0Ythen  one can use the [12XGAP[112X commands [10XVoronoiGL(n,d)[110X and [10XVoronoiSL(n,d)[110X to call
  the [12XMagma[112X implementation of the Voronoi algorithm directly. For example, the
  following commands do this to calculate the homology groups [22XH^4(GL_2(mathcal
  O_-5  ),P_{mathcal  O_-5}(8))  =  (  Z_2)^17  ⊕  (  Z_4)^2  ⊕  (  Z_8)^2[122X and
  [22XH_4(GL_2(mathcal  O(  Q(sqrt5)),  Z)  = ( Z_2)^7 ⊕ Z_60[122X and [22XH_n(GL_3(mathcal
  O_-5), Z)[122X for [22Xn=1,2[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XV:=VoronoiComplexSL(2,-5);; #makes a call to Magma[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(V,5);;[127X[104X
    [4X[25Xgap>[125X [27XM:=HomogeneousPolynomials(R!.group,8);;[127X[104X
    [4X[25Xgap>[125X [27XC:=HomToIntegralModule(R,M);;[127X[104X
    [4X[25Xgap>[125X [27XCohomology(C,4);[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 8, 8 ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XV:=VoronoiComplexGL(2,5);; #makes a call to Magma[127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(V,5);;[127X[104X
    [4X[25Xgap>[125X [27XHomology(TensorWithIntegers(R),4);[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 2, 2, 60 ][128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27X#V:=VoronoiComplexGL(3,-5);; #makes a call to Magma (requires much time)[127X[104X
    [4X[25Xgap>[125X [27XV:=ContractibleGcomplex("SL(3,O-5)");; #loads stored data (is faster) [127X[104X
    [4X[25Xgap>[125X [27XR:=FreeGResolution(V,4);;[127X[104X
    [4X[25Xgap>[125X [27XHomology(TensorWithIntegers(R),1);[127X[104X
    [4X[28X[ 2 ][128X[104X
    [4X[25Xgap>[125X [27XHomology(TensorWithIntegers(R),2);[127X[104X
    [4X[28X[ 2, 2, 2, 4 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
