<Chapter><Heading>Cohomology of groups (and Lie Algebras)</Heading>
<Section><Heading>Finite groups </Heading>

<Subsection><Heading>Naive homology computation for a very small group</Heading>
<P/>It is possible to compute the low degree (co)homology of a
 finite group or monoid 
of small order directly from the bar resolution. 
The following commands take this approach to computing the fifth integral
homology 
<P/><M>H_5(Q_4,\mathbb Z) = \mathbb Z_2\oplus\mathbb Z_2</M>
<P/>of the quaternion group <M>G=Q_4</M> of order <M>8</M>.
<Example>
<#Include SYSTEM "tutex/6.0.txt">
</Example>
<P/>However, this approach is of limited applicability since the bar resolution involves  <M>|G|^k</M> free generators in degree <M>k</M>. A range of techniques, tailored to specific classes of groups, can be used to compute the (co)homology of larger finite groups. 

<P/> This naive approach  does have the merit of being applicable to arbitrary small monoids.  The following calculates the  homology in degrees <M>\le 7</M> of a monoid of order 8, the monoid being specified by its multiplication table.

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

</Subsection>

<Subsection><Heading>A more efficient homology computation</Heading> 
<P/> The following example computes the seventh integral homology 
<P/><M>H_7(M_{23},\mathbb Z) = \mathbb Z_{16}\oplus\mathbb Z_{15}</M>
<P/>and fourth integral cohomomogy 
<P/><M>H^4(M_{24},\mathbb Z) = \mathbb Z_{12}</M>
<P/>and fifth integral homology
<P/><M>H_5(M_{24},\mathbb Z) =\mathbb Z_{14}</M>
<P/>of the Mathieu groups <M>M_{23}</M> and <M>M_{24}</M>. (Warning: the computation of <M>H_7(M_{23},\mathbb Z)</M> takes a couple of hours to run and the computation for <M>H_5(M_{24},\mathbb Z)</M> takes an hour to run.)
<Example>
<#Include SYSTEM "tutex/6.1.txt">
</Example>
</Subsection>

<Subsection><Heading>Computation of an induced homology homomorphism</Heading>
<P/>The following example computes the cokernel
<P/><M>{\rm coker}( H_3(A_7,\mathbb Z) \rightarrow H_3(S_{10},\mathbb Z)) \cong \mathbb Z_2\oplus \mathbb Z_2</M>
<P/>of the degree-3 integral homomogy homomorphism induced by the canonical
inclusion <M>A_7 \rightarrow S_{10}</M> of the alternating group on <M>7</M> letters into the symmetric group on <M>10</M> letters. The analogous cokernel
 with <M>\mathbb Z_2</M> homology coefficients is also computed.
<Example>
<#Include SYSTEM "tutex/6.1a.txt">
</Example>
</Subsection>

<Subsection><Heading>Some other finite group homology computations</Heading>
<P/>The following example computes the third integral homology of the Weyl group <M>W=Weyl(E_8)</M>, a group of order <M>696729600</M>.
<P/><M>H_3(Weyl(E_8),\mathbb Z) = \mathbb Z_2 \oplus \mathbb Z_2 \oplus \mathbb Z_{12}</M>
<Example>
<#Include SYSTEM "tutex/6.2.txt">
</Example>

<P/>The preceding calculation could be achieved more quickly by noting that 
<M>W=Weyl(E_8)</M> is a Coxeter group, and by using the associated Coxeter polytope. The following example uses this approach to compute the fourth integral homology of <M>W</M>. It begins by displaying the Coxeter diagram of <M>W</M>,
and then computes
<P/><M>H_4(Weyl(E_8),\mathbb Z) = \mathbb Z_2 \oplus \mathbb Z_2 \oplus 
Z_2 \oplus \mathbb Z_2</M>.
<Example>
<#Include SYSTEM "tutex/6.4.txt">
</Example>
<Alt Only="HTML">&lt;img src="images/e8diagram.gif" align="center" height="200" alt="Coxeter diagram for E8"/>
</Alt>
<Example>
<#Include SYSTEM "tutex/6.5.txt">
</Example>



<P/>The following example computes the sixth mod-<M>2</M> homology of the Sylow
<M>2</M>-subgroup <M>Syl_2(M_{24})</M> of the Mathieu group <M>M_{24}</M>.
<P/><M>H_6(Syl_2(M_{24}),\mathbb Z_2) = \mathbb Z_2^{143}</M>

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


<P/>The following example computes the sixth mod-<M>2</M> homology of 
 the Unitary group <M>U_3(4)</M> of order 312000.
<P/><M>H_6(U_3(4),\mathbb Z_2) = \mathbb Z_2^{4}</M>

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


<P/>The following example constructs the Poincare series 
<P/><M>p(x)=\frac{1}{-x^3+3*x^2-3*x+1}</M>
<P/>for the cohomology <M>H^\ast(Syl_2(M_{12},\mathbb F_2)</M>. The coefficient
 of <M>x^n</M> in the expansion of <M>p(x)</M> is equal to the dimension of the vector space <M>H^n(Syl_2(M_{12},\mathbb F_2)</M>. The computation involves <B>Singular</B>'s Groebner basis algorithms and the Lyndon-Hochschild-Serre spectral sequence.

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

The additional following command uses the Poincare series 

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

to determine that <M>H_{1000}(Syl_2(M_{12},\mathbb Z)</M> is a direct sum of 251000 non-trivial cyclic <M>2</M>-groups.


<P/>The following example constructs the  series 
<P/><M>p(x)=\frac{x^4-x^3+x^2-x+1}{x^6-x^5+x^4-2*x^3+x^2-x+1}</M>
<P/>whose coefficient of <M>x^n</M> is equal to the dimension of the vector space <M>H^n(M_{11},\mathbb F_2)</M> for all <M>n</M> in the range
<M>0\le n\le 14</M>. The coefficient is not guaranteed correct for 
<M>n\ge 15</M>. 


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


<Section><Heading>Nilpotent groups</Heading>

The following example computes 
<P/><M>H_4(N,\mathbb Z) = \mathbb (Z_3)^4 \oplus \mathbb Z^{84}</M>
<P/>for the free nilpotent group <M>N</M> of class <M>2</M> on four generators.
<Example>
<#Include SYSTEM "tutex/6.8.txt">
</Example>

</Section>

<Section><Heading>Crystallographic and Almost Crystallographic groups</Heading>
<P/>The following example computes
<P/><M>H_5(G,\mathbb Z) = \mathbb Z_2 \oplus \mathbb Z_2</M>
<P/>for the <M>3</M>-dimensional crystallographic space group <M>G</M>
 with Hermann-Mauguin symbol "P62" 

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

<P/>The following example computes 
<P/><M>H^5(G,\mathbb Z)= \mathbb Z</M>
<P/> for an almost crystallographic group.

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

</Section>

<Section><Heading>Arithmetic groups</Heading>

<P/>The following example computes
<P/><M>H_6(SL_2({\cal O},\mathbb Z) = \mathbb Z_2 \oplus \mathbb Z_{12}</M>
<P/>for  <M>{\cal O}</M> the ring of integers of the
number field  <M>\mathbb Q(\sqrt{-2})</M>.


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

</Section>


<Section><Heading>Artin groups</Heading>

<P/>The following example computes
<P/><M>H_n(G,\mathbb Z) =\left\{ \begin{array}{ll}
	\mathbb Z &amp;n=0,1,7,8\\
	\mathbb Z_2, &amp;n=2,3\\
	\mathbb Z_2\oplus \mathbb Z_6, &amp;n=4,6\\
	\mathbb Z_3 \oplus \mathbb Z_6,&amp; n=5\\
	0, &amp;n>8 \end{array}\right.
	</M>
	<P/>for  <M>G</M> the  Artin group of type <M>E_8</M>. (Similar commands can be used to compute a resolution and homology of arbitrary Artin monoids and, in thoses cases such as the spherical cases where the <M>K(\pi,1)</M>-conjecture is known to hold, the homology is equal to that of the corresponding Artin group.)


<Example>
<#Include SYSTEM "tutex/6.11.txt">
</Example>
<Alt Only="HTML">&lt;img src="images/e8diagram.gif" align="center" height="200" alt="Coxeter diagram for E8"/>
</Alt>

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

	The Artin group <M>G</M> projects onto the Coxeter group <M>W</M> of type <M>E_8</M>. The group <M>W</M> has a natural representation as a group of <M>8\times 8</M> integer matrices. This projection gives rise to a representation 
	<M>\rho\colon G\rightarrow GL_8(\mathbb Z)</M>. The following command computes the cohomology group <M>H^6(G,\rho) = (\mathbb Z_2)^6</M>.

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

</Section>

<Section><Heading>Graphs of groups</Heading>

<P/>The following example computes
<P/><M>H_5(G,\mathbb Z) = \mathbb Z_2\oplus Z_2\oplus Z_2 \oplus Z_2 \oplus Z_2</M>
<P/>for  <M>G</M> the graph of groups corresponding to
the amalgamated product <M>G=S_5*_{S_3}S_4</M>
 of the symmetric groups <M>S_5</M> and <M>S_4</M> over the canonical subgroup 
<M>S_3</M>.

<Example>
<#Include SYSTEM "tutex/6.13.txt">
</Example>
<Alt Only="HTML">&lt;img src="images/graphgroups.png" align="center" height="100" alt="graph of groups"/>
</Alt>

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

	The next example computes the integral homology of <M>SL_2(\mathbb Z)</M> in degrees <M>\le 5</M> using the isomorphism <M>SL_2(\mathbb Z) \cong C_4\ast_{C_2}C_6</M>.


<Example>
<#Include SYSTEM "tutex/6.14B.txt">
</Example>

<Alt Only="HTML">&lt;img src="images/graphgroupsSL2.png" align="center" height="100" alt="graph of groups"/>
</Alt>

<Example>
<#Include SYSTEM "tutex/6.14C.txt">
</Example>

	The next commands compute the integral homology in degree <M>7</M>
		of a graph of groups corresponding to the HNN extension <M>G=H*_A</M> where <M>H</M> is the symmetric group <M>H=S_5</M>
		and <M>A</M> is the subgroup <M>A=S_3</M> and <M>f:A\rightarrow H</M> is the homomorphism <M>(1,2) \rightarrow (3,4)</M>, <M>(1,2,3) \rightarrow  (3,4,5)</M>. The HNN extension <M>G</M> is obtained from <M>H</M> by adding a  generator <M>t</M> subject to the relations  <M>t^{-1} a t = f(a)</M>
			for <M>a \in A</M>.

<Example>
<#Include SYSTEM "tutex/6.14D.txt">
</Example>

<Alt Only="HTML">&lt;img src="images/graphgroupsHNN.png" align="center" height="100" alt="graph of groups"/>
</Alt>

<Example>
<#Include SYSTEM "tutex/6.14E.txt">
</Example>

</Section>

<Section><Heading>Lie algebra homology and free nilpotent groups</Heading>
One method of producting a Lie algebra <M>L</M> from a group 
		<M>G</M>
is by forming
			the direct sum <M>L(G) = G/\gamma_2G \oplus \gamma_2G/\gamma_3G \oplus \gamma_3G/\gamma_4G \oplus \cdots</M> of the quotients of the lower central series <M>\gamma_1G=G</M>, <M>\gamma_{n+1}G=[\gamma_nG,G]</M>. 
				Commutation in <M>G</M> induces a Lie bracket <M>L(G)\times L(G) \rightarrow L(G)</M>.

			<P/>
				The homology <M>H_n(L)</M>
					of a Lie algebra (with trivial coefficients) 
					can be calculated as the homology of the  Chevalley-Eilenberg chain complex <M>C_\ast(L)</M>. 
						This chain complex is implemented in <B>HAP</B> in the cases where the underlying additive group of <M>L</M> is either 
							finitely generated torsion free or  finitely generated of prime exponent <M>p</M>. In these two cases the ground ring for the Lie algebra/ Chevalley-Eilenberg complex
								is taken to be <M>\mathbb Z</M> and <M>\mathbb Z_p</M> respectively.

						<P/> For example, consider the quotient <M>G=F/\gamma_8F</M> of the free group
						<M>F=F(x,y)</M> on two generators by eighth term of its lower central series. So <M>G</M> is the <E>free nilpotent group of class 7 on two generators</E>.
							The following commands compute <M>H_4(L(G)) =  \mathbb Z_2^{77} \oplus \mathbb Z_6^8 \oplus \mathbb Z_{12}^{51} \oplus \mathbb Z_{132}^{11} \oplus \mathbb Z^{2024}</M> and show that the fourth homology in this case contains 2-, 3- and 11-torsion. (The commands take an hour or so to complete.)


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

	<P/>
        For a free nilpotent group <M>G</M> the additive homology <M>H_n(L(G))</M>
		of the Lie algebra can be computed more quickly in <B>HAP</B>
			than the integral group homology <M>H_n(G,\mathbb Z)</M>. 
				Clearly there are isomorphisms<M>H_1(G) \cong H_1(L(G)) \cong G_{ab}</M> of abelian groups in homological degree <M>n=1</M>. Hopf's formula can be used to establish an isomorphism
				<M>H_2(G) \cong H_2(L(G))</M> also in degree <M>n=2</M>. The following two theorems provide further isomorphisms that allow for the homology of a free nilpotent group to be calculated more efficiently as the homology of the associated Lie algebra.

				<P/><B>Theorem 1.</B> <Cite Key="kuzmin"/> <E>Let <M>G</M>
						be a finitely generated free nilpotent group of class 2. Then the integral 
						group homology <M>H_n(G,\mathbb Z)</M> is isomorphic to the integral 
Lie algebra homology <M>H_n(L(G),\mathbb Z)</M> in each degree <M>n\ge0</M>.</E>

	<P/>
	<B>Theorem 2.</B> <Cite Key="igusa"/> 
<E>Let <M>G</M>
be a finitely generated free nilpotent group (of any class). Then the integral
                                                group homology <M>H_n(G,\mathbb Z)</M> is isomorphic to the integral
Lie algebra homology <M>H_n(L(G),\mathbb Z)</M> in  degrees <M>n=0, 1, 2, 3</M>.</E>

	<P/>We should remark that experimentation on free nilpotent groups of class <M>\ge 4</M> has not yielded a group for which the isomorphism <M>H_n(G,\mathbb Z) \cong H_n(L(G),\mathbb G)</M> fails. For instance, the isomorphism holds in degree <M>n=4</M> for the free nilpotent group of class 5 on two generators, and for the free nilpotent group of class 2 on four generators:

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


</Section>

<Section><Heading>Cohomology with coefficients in a module</Heading>
There are various ways to represent a <M>\mathbb ZG</M>-module <M>A</M>
with action <M>G\times A \rightarrow A, (g,a)\mapsto \alpha(g,a)</M>. 

<P/>One possibility is to use the data type of a <E><M>G</M>-Outer Group</E> which involves three components: an <M>ActedGroup</M> <M>A</M>; an <M>Acting Group</M> <M>G</M>; a <M>Mapping</M> <M>(g,a)\mapsto \alpha(g,a)</M>.
The following example uses this data type to compute the cohomology <M>H^4(G,A) =\mathbb Z_5 \oplus \mathbb Z_{10}</M> of the symmetric group <M>G=S_6</M> with coefficients in the integers <M>A=\mathbb Z</M> where odd permutations act non-trivially on <M>A</M>.

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

<P/> If <M>A=\mathbb Z^n</M> and <M>G</M> acts as
<P/><M>G\times A \rightarrow A, (g, v) \mapsto  \rho(g)\, v 
</M>
<P/> where <M>\rho\colon G\rightarrow Gl_n(\mathbb Z)</M> is a (not necessarily faithful)
matrix representation of degree <M>n</M> then we can avoid the use of <M>G</M>-outer groups and use just the homomorphism <M>\rho</M> instead.
The following example 
 uses this data type to compute the cohomology 
<P/><M>H^6(G,A) =\mathbb Z_2 </M>
<P/>and the homology
<P/><M>H_6(G,A) = 0 </M>
<P/> of the alternating group <M>G=A_5</M> with coefficients in  <M>A=\mathbb Z^5</M> where elements of <M>G</M> act on <M>\mathbb Z^5</M> via an irreducible representation.


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

<P/>If <M>V=K^d</M> is a vetor space of dimension <M>d</M> over the field 
<M>K=GF(p)</M> with <M>p</M> a prime and <M>G</M> acts on <M>V</M> via a homomorphism 
<M>\rho\colon G\rightarrow GL_d(K)</M> then the homology 
<M>H^n(G,V)</M> can again be computed without the use of G-outer groups. 
 As an example, the following commands compute
<P/><M>H^4(GL(3,2),V) =K^2</M>
<P/>where <M>K=GF(2)</M> and <M>GL(3,2)</M> acts with its natural action on
<M>V=K^3</M>.

<Example>
<#Include SYSTEM "tutex/6.16B.txt">
</Example>

<P/>The following example constructs the Artin braid group <M>G=B_3</M> on three strings,
	the surjection <M>G\twoheadrightarrow S_3</M>, 
		a complex representation <M>S_3\rightarrow GL_2(\mathbb C)</M>
			and the composite representation <M>\rho\colon G\rightarrow GL_2(\mathbb C)</M>. The group
			<M>G</M> acts on the vector space <M>V=\mathbb C\oplus \mathbb C</M> via <M>\rho</M>.
				Then the dimensions of the cohomology groups <M>H^n(G,V)</M> are computed.
<Example>
<#Include SYSTEM "tutex/6.16G.txt">
</Example>

<P/> It can be computationally difficult to compute  resolutions for large finite groups. But the <M>p</M>-primary part of the homology can 
	be computed using resolutions of Sylow <M>p</M>-subgroups.
This approach is used in the following example that computes
 the <M>2</M>-primary part
<P/><M>H_{2}(G,\mathbb Z)_{(2)} = \mathbb Z_2 \oplus \mathbb Z_2\oplus \mathbb Z_2</M>
<P/>of the degree 2 integral homology of the Rubik's cube group <M>G</M>. This group has order <M>43252003274489856000</M>. 

<Example>
<#Include SYSTEM "tutex/6.16F.txt">
</Example>







		The same approach is used in the following example that computes
 the <M>2</M>-primary part 
<P/><M>H_{11}(A_7,A)_{(2)} = \mathbb Z_2 \oplus \mathbb Z_2\oplus \mathbb Z_4</M>
<P/>of the degree 11 homology of the alternating group <M>A_7</M>
of degree <M>7</M> with coefficients in the module
 <M>A=\mathbb Z^7</M> on which <M>A_7</M> acts by permuting basis vectors.

<Example>
<#Include SYSTEM "tutex/6.16C.txt">
</Example>

Similar commands compute
<P/><M>H_{3}(A_{10},A)_{(2)} = \mathbb Z_4</M>
<P/>with coefficient module <M>A=\mathbb Z^{10}</M> on which <M>A_{10}</M> acts by permuting basis vectors.

<Example>
<#Include SYSTEM "tutex/6.16D.txt">
</Example>

<P/>The following commands compute 
<P/><M>H_{100}(GL(3,2),V)= K^{34}</M>
<P/>where <M>V</M> is the vector space  of dimension <M>3</M> over <M>K=GF(2)</M> acting via some irreducible representation <M>\rho\colon GL(3,2) \rightarrow GL(V)</M>.

<Example>
<#Include SYSTEM "tutex/6.16E.txt">
</Example>
</Section>
 
<Section><Heading>Cohomology as a functor of the first variable</Heading>
Suppose given a group homomorphism <M>f\colon G_1\rightarrow G_2</M> and a <M>G_2</M>-module <M>A</M>. Then <M>A</M> is naturally a <M>G_1</M>-module with  action via <M>f</M>, and there is an induced cohomology homomorphism
<M>H^n(f,A)\colon H^n(G_2,A) \rightarrow H^n(G_1,A)</M>.

<P/>The following example computes this cohomology homomorphism in degree <M>n=6</M> for the inclusion <M>f\colon A_5 \rightarrow S_5</M> and <M>A=\mathbb Z^5</M> with action that permutes the canonical basis.
The final commands determine that the kernel of the homomorphism <M>H^6(f,A)</M> is the Klein group of order <M>4</M> and that the cokernel is cyclic of order <M>6</M>.
<Example>
<#Include SYSTEM "tutex/6.16A.txt">
</Example>

</Section>

<Section><Heading>Cohomology as a functor of the second variable and the long exact coefficient sequence</Heading>
A short exact sequence of <M>\mathbb ZG</M>-modules
<M>A \rightarrowtail B \twoheadrightarrow C</M>
induces a long exact sequence of cohomology groups
<P/><M> \rightarrow H^n(G,A)  \rightarrow H^n(G,B) \rightarrow H^n(G,C) \rightarrow H^{n+1}(G,A) \rightarrow </M> .
<P/> Consider the symmetric group <M>G=S_4</M> and the sequence
<M> \mathbb Z_4  \rightarrowtail  \mathbb Z_8 \twoheadrightarrow \mathbb Z_2</M>
of trivial <M>\mathbb ZG</M>-modules.  The following commands compute the induced cohomology homomorphism

<P/><M>f\colon H^3(S_4,\mathbb Z_4)  \rightarrow  H^3(S_4,\mathbb Z_8)</M>

<P/>and determine that the image of this induced homomorphism has order <M>8</M> and that its kernel has order <M>2</M>. 

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

<P/>
The following commands then compute the homomorphism

<P/><M>H^3(S_4,\mathbb Z_8)  \rightarrow  H^3(S_4,\mathbb Z_2)</M>

<P/>induced by

<M>\mathbb Z_4  \rightarrowtail  \mathbb Z_8 \twoheadrightarrow \mathbb Z_2</M>, 

and determine that the kernel of this homomorphsim has order <M>8</M>.

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

<P/>The following commands then compute the connecting homomorphism

<P/><M>H^2(S_4,\mathbb Z_2)  \rightarrow  H^3(S_4,\mathbb Z_4)</M>

<P/>and determine that the image of this homomorphism has order <M>2</M>.

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

Note that the various orders are consistent with exactness of the sequence

<P/><M>H^2(S_4,\mathbb Z_2)  \rightarrow  H^3(S_4,\mathbb Z_4) \rightarrow  H^3(S_4,\mathbb Z_8) \rightarrow  H^3(S_4,\mathbb Z_2) </M> .

</Section>

<Section><Heading>Transfer Homomorphism</Heading>
Consider the action of the symmetric group <M>G=S_5</M> on <M>A=\mathbb Z^5</M> which permutes the canonical basis. The action restricts to the
 sylow  <M>2</M>-subgroup <M>P=Syl_2(G)</M>. The following commands compute the cohomology transfer homomorphism <M>t^4\colon H^4(P,A) \rightarrow H^4(S_5,A)</M> and determine its kernel and image. The integral homology transfer
<M>t_4\colon H_4(S_5,\mathbb Z) \rightarrow H_5(P,\mathbb Z)</M> is also computed.
<Example>
<#Include SYSTEM "tutex/6.25.txt">
</Example>
</Section>

<Section Label="Secfinitefundman"><Heading>Cohomology rings of finite fundamental groups of 3-manifolds
</Heading>
A <E>spherical 3-manifold</E> is a 3-manifold arising as the quotient <M>S^3/\Gamma</M> of the 3-sphere <M>S^3</M> by a  finite subgroup <M>\Gamma</M> of <M>SO(4)</M> acting freely as rotations.
The geometrization conjecture, proved by Grigori Perelman,
 implies that every closed connected 3-manifold with a finite fundamental group is homeomorphic to a spherical 3-manifold.

<P/> A spherical 3-manifold <M>S^3/\Gamma</M> has finite fundamental group isomorphic to <M>\Gamma</M>. This fundamental group is one of: 
<List>
<Item> <M>\Gamma=C_m=\langle x\ |\ x^m\rangle</M> (<B>cyclic fundamental group</B>)</Item>
<Item> <M>\Gamma=C_m\times  \langle x,y \ |\ xyx^{-1}=y^{-1}, x^{2^k}=y^n
\rangle</M> for  integers <M>k, m\ge 1, n\ge 2</M> and <M>m</M> coprime to <M>2n</M> (<B>prism manifold case</B>)</Item>
<Item> <M>\Gamma= C_m\times \langle x,y, z \ |\ (xy)^2=x^2=y^2, zxz^{-1}=y, zyz^{-1}=xy, z^{3^k}=1\rangle </M> for integers <M>k,m\ge 1</M> and <M>m</M> coprime to 6 (<B>tetrahedral case</B>)</Item>
<Item> <M>\Gamma=C_m\times\langle x,y\ |\ (xy)^2=x^3=y^4\rangle </M> for <M>m\ge 1</M> coprime to 6 (<B>octahedral case</B>)</Item>
<Item><M>\Gamma=C_m\times \langle x,y\ |\ (xy)^2=x^3=y^5\rangle </M> for <M>m\ge 1</M> coprime to 30 (<B>icosahedral case</B>).</Item></List>
This list of cases 
is taken from the  <URL><Link>https://en.wikipedia.org/wiki/Spherical_3-manifold</Link><LinkText>Wikipedia pages</LinkText></URL>. The group <M>\Gamma</M>
  has periodic cohomology since it acts on a sphere. The cyclic group has
period 2 and in the other four cases it has  period 4. (Recall that in general a finite group <M>G</M> has <E>periodic cohomology of period <M>n</M></E> if there is an element <M>u\in H^n(G,\mathbb Z)</M> such that the cup product <M>-\ \cup u\colon H^k(G,\mathbb Z) \rightarrow H^{k+n}(G,\mathbb Z)</M> is an isomorphism for all <M>k\ge 1</M>. It can be shown that <M>G</M> has periodic cohomology of period <M>n</M> if and only if <M>H^{n}(G,\mathbb Z)=\mathbb Z_{|G|}</M>.)

<P/>The cohomology of the cyclic group is well-known, and the cohomology of a direct product can be obtained from that of the factors using the Kunneth formula.

<P/> In the icosahedral case with <M>m=1</M> the following commands yield
$$H^\ast(\Gamma,\mathbb Z)=Z[t]/(120t=0)$$
with generator <M>t</M> of degree 4. The final command demonstrates that a periodic resolution is used in the computation.

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

In the octahedral case with <M>m=1</M> we obtain
$$H^\ast(\Gamma,\mathbb Z) = \mathbb Z[s,t]/(s^2=24t, 2s=0, 48t=0)$$
where <M>s</M> has degree 2 and  <M>t</M> has degree 4,
from the following commands.
<Example>
<#Include SYSTEM "tutex/6.19B.txt">
</Example>


In the tetrahedral case with <M>m=1</M> we obtain
$$H^\ast(\Gamma,\mathbb Z) = \mathbb Z[s,t]/(s^2=16t, 3s=0, 24t=0)$$
where <M>s</M> has degree 2 and  <M>t</M> has degree 4,
from the following commands.
<Example>
<#Include SYSTEM "tutex/6.19C.txt">
</Example>

A theoretical calculation of the integral and mod-p cohomology rings of all of these fundamental groups of spherical 3-manifolds is given in <Cite Key="tomoda"/>.

</Section>

<Section><Heading>Explicit cocycles </Heading>

Given a <M>\mathbb ZG</M>-resolution <M>R_\ast</M> and a <M>\mathbb ZG</M>-module 
<M>A</M>, one defines an <E><M>n</M>-cocycle</E> to be a <M>\mathbb ZG</M>-homomorphism 
<M>f\colon R_n \rightarrow A</M> for which the composite homomorphism 
<M>fd_{n+1}\colon R_{n+1}\rightarrow A</M> is zero. If <M>R_\ast</M>
 happens to be the standard bar resolution (i.e. the cellular chain complex of the nerve of the group <M>G</M> considered as a one object category) then the free <M>\mathbb ZG</M>-generators of <M>R_n</M> are indexed by <M>n</M>-tuples 
<M>(g_1 | g_2 | \ldots | g_n)</M> of elements <M>g_i</M> in <M>G</M>. In this case we say that the <M>n</M>-cocycle is a <E>standard n-cocycle</E>
 and we think of it as a set-theoretic function
<P/><M>f \colon  G \times G \times \cdots \times   G  \longrightarrow A</M>
<P/>satisfying a certain algebraic cocycle condition. 

Bearing in mind that a standard <M>n</M>-cocycle really just assigns an element <M>f(g_1, \ldots ,g_n) \in A</M> to an <M>n</M>-simplex in the nerve of <M>G</M>
, the cocycle condition is a very natural one which states that 
<E><M>f</M> must vanish on the boundary of a certain <M>(n+1)</M>-simplex</E>. For <M>n=2</M> the condition is that a <M>2</M>-cocycle <M>f(g_1,g_2)</M>
must satisfy 
<P/><M>g.f(h,k) + f(g,hk) = f(gh,k) + f(g,h)</M>
<P/> for all <M>g,h,k \in G</M>. This equation is explained by the following picture.

<P/><Alt Only="HTML">&lt;img src="images/cocycle.png" align="center" height="200" alt="2-cocycle equation"/>
</Alt>

<P/>
The definition of a cocycle clearly depends on the choice of <M>\mathbb ZG</M>-resolution <M>R_\ast</M>. However, the cohomology group <M>H^n(G,A)</M>, which is a group of equivalence classes of <M>n</M>-cocycles, is independent of the choice of <M>R_\ast</M>. 

<P/>
There are some occasions when one needs explicit examples of standard cocycles. For instance:

<List>
<Item>    Let <M>G</M> be a finite group and <M>k</M>
a field of characteristic <M>0</M>. The group algebra <M>k(G)</M>,
 and the algebra <M>F(G)</M> of functions 
<M>d_g\colon G\rightarrow k, h\rightarrow d_{g,h}</M>,
 are both Hopf algebras. The tensor product <M>F(G) \otimes k(G)</M>
 also admits a Hopf algebra structure known as the quantum double <M>D(G)</M>. 
A twisted quantum double <M>D_f(G)</M> was introduced by 
R. Dijkraaf, V. Pasquier &amp; P. Roche <Cite Key="dpr"/>. 
The twisted double is a quasi-Hopf algebra depending on a <M>3</M>-cocycle 
<M>f\colon G\times G\times G\rightarrow k</M>. The multiplication is given by 
<M>(d_g \otimes x)(d_h \otimes y) = d_{gx,xh}\beta_g(x,y)(d_g \otimes xy)</M> where <M>\beta_a </M>
is defined by <M>\beta_a(h,g) = f(a,h,g) f(h,h^{-1}ah,g)^{-1} f(h,g,(hg)^{-1}ahg)</M> .  Although the algebraic structure of <M>D_f(G)</M> depends very much on the particular <M>3</M>-cocycle <M>f</M>, representation-theoretic properties of <M>D_f(G)</M> depend only on the cohomology class of <M>f</M>.
</Item>
<Item>    An explicit <M>2</M>-cocycle <M>f\colon G\times G\rightarrow A</M> is needed to construct the multiplication <M>(a,g)(a',g') = (a + g\cdot a' + f(g,g'),  gg')</M> in the extension a group <M>G</M> by a <M>\mathbb ZG</M>-module 
<M>A</M> determined by the cohomology class of <M>f</M> in <M>H^2(G,A)</M>.
See <Ref Sect="secExtensions"/>.
</Item>
<Item>    In work on coding theory and Hadamard matrices a number of papers have investigated square matrices <M>(a_{ij})</M> whose entries <M>a_{ij}=f(g_i,g_j)</M>
 are the values of a <M>2</M>-cocycle <M>f\colon G\times G \rightarrow
 \mathbb Z_2</M>
 where <M>G</M> is a finite group acting trivially on <M>\mathbb Z_2</M>. See for instance <Cite Key="horadam"/> and <Ref Sect="secHadamard"/>.
</Item>
</List>


<P/>
Given a <M>\mathbb ZG</M>-resolution <M>R_\ast</M>
 (with contracting homotopy) and a <M>\mathbb ZG</M>-module <M>A</M>
 one can use HAP commands to compute explicit standard <M>n</M>-cocycles 
<M>f\colon G^n \rightarrow A</M>. With the twisted quantum double in mind, we illustrate the computation for <M>n=3</M>, <M>G=S_3</M>, and <M>A=U(1)</M>
 the group of complex numbers of modulus <M>1</M> with trivial <M>G</M>-action.

<P/>
We first compute a <M>\mathbb ZG</M>-resolution <M>R_\ast</M>. The Universal Coefficient Theorem gives an isomorphism <M>H_3(G,U(1)) = Hom_{\mathbb Z}(H_3(G,\mathbb Z), U(1))</M>, The multiplicative group <M>U(1)</M> can thus be viewed as 
<M>\mathbb Z_m</M> where <M>m</M> is a multiple of the exponent of <M>H_3(G,\mathbb Z)</M>.

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

<P/>
We thus replace the very infinite group U(1) by the finite cyclic group <M>\mathbb Z_6</M>. Since the resolution <M>R_\ast </M> has <M>4</M> generators in degree <M>3</M>, a homomorphism <M>f\colon R^3\rightarrow U(1)</M> can 
be represented by a list <M>f=[f_1, f_2, f_3, f_4]</M> with <M>f_i</M>
  the image in <M>\mathbb Z_6</M> of the <M>i</M>th generator. The cocycle condition on <M>f</M> can be expressed as a matrix equation

<P/><M>Mf^t = 0  \bmod 6</M>.

<P/>
where the matrix <M>M</M> is obtained from the following command and <M>f^t</M> denotes the transpose.
<Example>
<#Include SYSTEM "tutex/6.21.txt">
</Example>

A particular cocycle <M>f=[f_1, f_2, f_3, f_4]</M> can be obtained by choosing a solution to the equation Mf^t=0.

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

A non-standard <M>3</M>-cocycle <M>f</M> can be converted to a standard one using the command  <Code>StandardCocycle(R,f,n,q)</Code> . This command inputs 
<M>  R_\ast</M>, integers <M>n</M> and <M>q</M>, and an <M>n</M>-cocycle <M>f</M> for the resolution <M>R_\ast</M>. It returns a standard cocycle <M>G^n \rightarrow \mathbb Z_q</M>.

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

A function <M>f\colon G\times G\times G \rightarrow A</M>
 is a standard <M>3</M>-cocycle if and only if

<P/><M>g\cdot f(h,k,l) -  f(gh,k,l) + f(g,hk,l) -  f(g,h,kl) + f(g,h,k) = 0</M>

<P/>for all <M>g,h,k,l \in G</M>. In the above example the group <M>G=S_3</M>
 acts trivially on <M>A=Z_6</M>. The following commands show that the standard 
<M>3</M>-cocycle produced in the example really does satisfy this <M>3</M>-cocycle condition. 

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

</Section>

<Section Label="secWebb"><Heading>Quillen's complex and the <M>p</M>-part of homology </Heading>
Let <M>G</M> be a finite group with order divisible by  prime <M>p</M>. Let
<M>{\mathcal A}={\mathcal A}_p(G)</M> denote Quillen's simplicial complex arising as the order complex of the poset of non-trivial elementary abelian <M>p</M>-subgroups of <M>G</M>. The group <M>G</M> acts on <M>\mathcal A</M>. Denote the orbit of a <M>k</M>-simplex <M>e^k</M> by <M>[e^k]</M>, and the stabilizer of <M>e^k</M> by <M>Stab(e^k) \le G</M>. For a finite abelian group <M>H</M> let
<M>H_p</M> denote the Sylow <M>p</M>-subgroup or the "<M>p</M>-part". In Theorem 3.3 of <Cite Key="Webb"/> P.J. Webb proved the following.
<P/>
<B>Theorem.</B><Cite Key="Webb"/> For any <M>G</M>-module <M>M</M> there is a (non natural) isomomorphism<P/>
<M>H_n(G,M)_p \oplus \bigoplus_{[e^k]\, :\, k~{\rm odd}~}H_n(Stab(e^k),M)_p \cong \bigoplus_{[e^k]\, : \, k~{\rm even}~}H_n(Stab(e^k),M)_p</M>
<P/> for <M>n\ge 1</M>. The isomorphism can also be expressed as
<P/>
<M>H_n(G,M)_p  \cong \bigoplus_{[e^k]\, : \, k~{\rm even}~}H_n(Stab(e^k),M)_p\ -\ \bigoplus_{[e^k] \, :\, k~{\rm odd}~}H_n(Stab(e^k),M)_p</M> 
<P/>where terms can often be cancelled.
<P/>Thus the additive structure of the <M>p</M>-part of the
homology of <M>G</M> is determined by that of the stabilizer groups. The result also holds with homology replaced by cohomology.

<P/><B>Illustration 1</B>
<P/>
As an illustration of the theorem, the following commands calculate
<P/>
<M>H_n(SL_3(\mathbb Z_2),\mathbb Z) \cong H_n(S_4,\mathbb Z)_2 \oplus H_n(S_4,\mathbb Z)_2 \ominus H_n(D_8,\mathbb Z)_2 \oplus H_n(S_3,\mathbb Z)_3 \oplus
	H_n(C_7 : C_3,\mathbb Z)_7 </M>
<P/>
	where <M>n\ge 1</M>,
	<M>S_k</M> denotes the symmetric group on <M>n</M> letters, <M>D_8</M> the dihedral group of order <M>8</M> and <M>C_7 : C_3</M> a nonabelian semi-direct product of cyclic groups.
		Furthermore, for <M>n\ge 1</M>
		<P/><M> H_n(C_7 : C_3,\mathbb Z)_7 =\left\{\begin{array}{ll}\mathbb Z_7,\ n \equiv 5 {\rm \ mod\ } 6\\
	                                         0,\ {\rm otherwise} \end{array}\right.</M>
					 <P/>and
					 <P/><M> H_n(S_3,\mathbb Z)_3 =\left\{\begin{array}{ll}\mathbb Z_3,\ n \equiv 3 {\rm \ mod\ } 4\\
                                                 0,\ n{\rm ~otherwise .} \end{array}\right.</M>
					 <P/> Formulas for <M>H_n(S_4,\mathbb Z)</M> and <M> H_n(D_8,\mathbb Z)</M> can be found in the literature. Alternatively, they can be computed using <B>GAP</B> for a given value of <M>n</M>. For <M>n=27</M> we find
					 <P/><M> H_{27}(S_4,\mathbb Z)_2 \oplus H_{27}(S_4,\mathbb Z)_2 \ominus H_{27}(D_8,\mathbb Z)_2 \cong
						 \mathbb Z_2 \oplus \mathbb Z_2 \oplus \mathbb Z_2 \oplus \mathbb Z_2 \oplus \mathbb Z_4</M>
					 <P/> and
					 <P/><M>H_{27}(SL_3(\mathbb Z_2),\mathbb Z) \cong \mathbb Z_2 \oplus \mathbb Z_2 \oplus \mathbb Z_2 \oplus \mathbb Z_2 
						 \oplus \mathbb Z_4 \oplus \mathbb Z_3 </M>  .

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




<P/><B>Illustration 2</B>
<P/>
As a further illustration of the theorem, the following commands calculate


<P/>
<M>H_n(M_{12},M)_3 \cong \bigoplus_{1\le i\le 3}\,H_n(Stab_i,M)_3 - \bigoplus_{4\le i\le 5}H_n(Stab_i,M)_3</M>
<P/> for the Mathieu simple group <M>M_{12}</M> of order <M>95040</M>, where
<P/><M>Stab_1\cong Stab_3=(((C_3 \times C_3) : Q_8) : C_3) : C_2</M>
<P/><M>Stab_2=A_4 \times S_3</M>
<P/><M>Stab_4=C_3 \times S_3</M>
<P/><M>Stab_5=((C_3 \times C_3) : C_3) : (C_2 \times C_2)</M>  .
<Example>
<#Include SYSTEM "tutex/6.26.txt">
</Example>

<P/><B>Illustration 3</B>
<P/>
As a third illustration, the following commands show that <M>H_n(M_{23},M)_{p}</M> is periodic for primes <M>p=5, 7, 11, 23</M> of periods dividing <M>8, 6, 10, 22</M> respectively.
	They also show that <M>H_n(M_{23},\mathbb Z)_{(3)}=0</M> for <M>n=8,9,12,13</M> and <M>H_n(M_{23},\mathbb Z)_{(3)}=\mathbb Z_3</M> for <M>n=10,11</M>.

<Example>
<#Include SYSTEM "tutex/6.27.txt">
</Example>
	 <Example>
<#Include SYSTEM "tutex/6.34A.txt">
</Example>


<P/>The order <M>|M_{23}|=10200960</M> is divisible by primes 
<M>p=2, 3, 5, 7, 11, 23</M>. For <M>p=3</M> the following commands establish 
that the Poincare series
<P/><M>(x^{16} - 2x^{15}</M>
<M> + 3x^{14} - 4x^{13}</M>
<M> + 4x^{12} - 4x^{11}</M>
<M> + 4x^{10} - 3x^9</M>
<M> + 3x^8 - 3x^7 +</M>
<M> 4x^6 - 4x^5 </M>
<M>+ 4x^4 -4x^3</M>
<M> + 3x^2 -2x + 1) /</M>
<M> (x^{18} - 2x^{17}</M>
<M> + 3x^{16} - 4x^{15}</M>
<M> + 4x^{14} - </M>
<M>4x^{13} + 4x^{12}</M>
<M> - 4x^{11} + 4x^{10}</M>
<M> - 4x^9 + 4x^8</M>
<M> - 4x^7 + 4x^6 </M>
<M> - 4x^5 + 4x^4</M>
<M> - 4x^3 +</M>
<M> 3x^2 - 2x + 1)</M>
 
<P/>describes the dimension of the vector space <M>H^n(M_{23},\mathbb Z_3)</M> up to at least degree
<M>n=40</M>. To  prove that it describes the dimension in all degrees one would need to verify "completion criteria".

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

</Section>

<Section><Heading>Homology of a Lie algebra</Heading>

		Let <M>A</M> be the Lie algebra constructed from the associative algebra <M>M^{4\times 4}(\mathbb Q)</M> of all <M>4\times 4</M> rational matrices. Let <M>V</M> be its adjoint module (with underlying vector space of dimension <M>16</M> and
			equal to that of <M>A</M>). The following commands compute <M>H_{4}(A,V) = \mathbb Q</M>.

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

<P/>Note that the eighth term  <M>C_{8}(V)</M> in the Chevalley-Eilenberg complex <M>C_\ast(V)</M> is a vector space of dimension <M>205920</M> and so it will take longer to compute the homology in degree <M>8</M>.

<P/>As a second example, let <M>B</M> be the classical Lie ring of type <M>B_3</M> over the ring of integers. The following commands compute
<M>H_3(B,\mathbb Z)= \mathbb Z \oplus \mathbb Z_2^{105}</M>.
	 <Example>
<#Include SYSTEM "tutex/6.32.txt">
</Example>

</Section>

<Section><Heading>Covers of Lie algebras</Heading>

A short exact sequence of Lie algebras

	<P/><M> M \rightarrowtail C \twoheadrightarrow L </M>


	<P/>		(over a field <M>k</M>) is said to be a <E>stem extension</E>
			of <M>L</M> if <M>M</M> lies both in the centre <M>Z(C)</M> and in the derived subalgeba <M>C^2</M>. If, in addition, the rank of the vector space <M>M</M> is equal to the rank of the second Chevalley-Eilenberg homology <M>H_2(L,k)</M> then the Lie algebra <M>C</M> is said to be a <E>cover</E> of <M>L</M>.

			<P/>Each finite dimensional Lie algebra <M>L</M> admits a cover <M>C</M>, and this cover can be shown to be unique up to Lie isomorphism.

			<P/>The cover can be used to determine whether there exists a Lie algebra <M>E</M> whose central quotient <M>E/Z(E)</M> is isomorphic to <M>L</M>. The image in <M>L</M> of the centre of <M>C</M> is called the <E>Lie Epicentre</E> of <M>L</M>, and this image is trivial if and only if such an <M>E</M> exists.

			<P/>The cover can also be used to determine the stem extensions of <M>L</M>. It can be shown that each stem extension is a quotient of the cover by an ideal in the Lie multiplier <M>H_2(L,k)</M>. 

			<Subsection><Heading>Computing a cover</Heading>
				The following commands compute the cover <M>C</M> of the solvable but non-nilpotent 13-dimensional Lie algebra <M>L</M> (over <M>k=\mathbb Q</M>)
					that was introduced by M. Wuestner <Cite Key="Wustner"/>.
						They also show that:

						
							the second  homology of <M>C</M> is trivial and compute the ranks of the homology groups in other dimensions;
								the Lie algebra <M>L</M> is not isomorphic to any central quotient <M>E/Z(E)</M>.

									<Example>
<#Include SYSTEM "tutex/6.33.txt">
</Example>
			</Subsection>
</Section>
</Chapter>
