\section{More homological algebra}

In this section we will deal with algebraic constructions leading to
the definitions of homology and cohomology groups with coefficients
given in the previous sections.
At the end we use introduced notions to state and prove so called
universal coefficient theorems for singular homology and
cohomology groups.

\begin{cislo}\label{HAfun}{\bf Functors and cofunctors.} Let
$\a$ and $\b$ be two categories.
A \emph{functor}\index{functor}
$t:\a\to\b$ assigns to every object $x$ in $\a$ an object $t(x)$
in $\b$ and to every morphism $f:x\to y$ in $\a$ a morphism
$t(f):t(x)\to t(y)$ such that $t(\id_x)=\id_{t(x)}$ and
$t(fg)=t(f)t(g)$.

A \emph{contravariant functor}\index{contravariant functor}
or briefly \emph{cofunctor}\index{cofunctor}
$t:\a\to\b$ assigns to every object $x$ in $\a$ an object $t(x)$
in $\b$ and to every morphism $f:x\to y$ in $\a$ a morphism
$t(f):t(y)\to t(x)$ in $\b$ such that $t(\id_x)=\id_{t(x)}$ and
$t(fg)=t(g)t(f)$.

Let $R$ be a commutative ring with a unit element. The category
of $R$-modules and their homomorphisms will be denoted by
$R$-$\mod$. $R$-$\gmod$ will be used for the category of graded
$R$-modules, $R$-$\chain$ and $R$-$\cochain$ will stand for the
categories of chain
complexes  and the category of cochain complexes of
$R$-modules, respectively. For $R=\mathbb Z$ the previous
categories are Abelian groups $\ab$, graded Abelian groups $\gab$,
chain complexes of Abelian groups $\chain$ and cochain
complexes of Abelian groups $\cochain$, respectively.

Homology $H$ is a functor from the category $R$-$\chain$ to the
category $R$-$\gmod$. Let $t$ be a functor  from $R$-$\mod$ to
$R$-$\mod$
which induces a functor $t:\chain\to \chain$, and let $s$ be a
cofunctor from $R$-$\mod$ to $R$-$\mod$, which induces a cofunctor from
$\chain$ to $\cochain$. The aim of this section is to say
something about the functor $H\circ t$ and the cofunctor $H\circ
s$. Model examples of such functors will be $t(-)=-\otimes_R M$
and $s(-)=\hom_R(-,M)$ for a fixed $R$-module $M$. We have already
used these functors when we have defined homology and cohomology
groups with coefficients.
\end{cislo}

\begin{cislo}\label{HAtensor}{\bf Tensor product.} The \emph{tensor
product}\index{tensor product} $A\otimes_R B$ of two $R$-modules
$A$ and $B$ is the quotient of the free $R$-module over $A\times B$
and the ideal generated by the elements of the form
$$r(a,b)-(ra,b),\  r(a,b)-(a,rb),\ (a_1+a_2,b)-(a_1,b)-(a_2,b),\
(a,b_1+b_2)-(a,b_1)-(a,b_2)$$
where $a,a_1,a_2\in A$, $b,b_1,b_2\in B$, $r\in R$. The class of
equivalence of the element $(a,b)$ in $A\otimes_R B$ is denoted
by  $a\otimes b$. The map $\varphi:A\times B\to A\otimes_R B$,
$\varphi(a,b)=a\otimes b$ is bilinear and has the following
universal property:

Whenever an $R$-module $C$ and a bilinear map $\psi:A\times B\to
C$ are given, there is just one $R$-modul homomorphism $\Psi:A\otimes_R
B\to C$ such that the diagram
$$\xymatrix{
A\times B\ar[r]^-{\psi}\ar[d]^{\varphi}& C\\
A\otimes_R B\ar[ru]_-{\Psi} & {}
}$$
commutes. This property determines the tensor product uniquely up
to isomorphism.

If $f:A\to C$ and $g:B\to D$ are homomorphisms of $R$-modules
then $(a,b)\to f(a)\otimes g(b)$ is a bilinear map and the universal
property above ensures the existence and uniqueness of an
$R$-homomorphism $f\otimes g:A\otimes_R B\to C\otimes_R D$ with the
property $(f\otimes g)(a\otimes b)=f(a)\otimes g(b)$.

Homomorphisms between $R$-modules form an $R$-module denoted by
$\hom_R(A,B)$.
If $R=\Z$, we will denote the tensor product of Abelian groups $A$
and $B$ without the subindex $\Z$, i.e. $A\otimes B$, and similarly,
the group of homomorfisms from $A$ to $B$ will be denoted by
$\hom(A,B)$.

\begin{ex*} Prove from the definition that
$$\Z\otimes \Z=\Z,\quad\Z\otimes \Z_n=\Z_n,
\quad \Z_n\otimes \Z_m=\Z_{d(n,m)},\quad \Z_n\otimes \Q=0$$
where $d(m,n)$ is the greatest common divisor of $n$ and $m$.
Further compute
$$\hom (\Z,\Z),\quad \hom (\Z,\Z_n),\quad \hom (\Z_n,\Z),\quad
\hom (\Z_n,\Z_m).$$
\end{ex*}
\end{cislo}

\begin{cislo}\label{HAad}{\bf Additive functors and cofunctors.}
A functor (or a cofunctor) $t:\mod\to \mod$ is called
\emph{additive}\index{additive functor} \index{additive cofunctor}
if
$$t(\alpha+\beta)=t(\alpha)+t(\beta)$$
for all $\alpha,\beta\in\hom_R(A,B)$. Additive functors and
cofunctors have the following properties.
\begin{enumerate}
\item $t(0)=0$ for any zero homomorphism.
\item $t(A\oplus B)=t(A)\oplus t(B)$
\item Every additive functor (cofunctor) converts short exact
sequences which split into short exact sequences which again
split.
\item Every additive functor (cofunctor)  can be extended to a
functor  $\chain\to\chain$ (cofunctor $\chain\to\cochain$)
which preserves chain homotopies (converts chain homotopies to
cochain homotopies).
\end{enumerate}

\begin{proof}[Proof of (2) and (3)] Consider a short exact
sequence
$$0\to A\xrightarrow{i} B\xrightarrow{j} C\to 0$$
which splits, i.~e. there are homomorphisms $p:B\to A$, $q:C\to B$
such that $p i=\id_{A}$, $j q=\id_{C}$, $i p+q j=\id_{B}$. 
See 3.1. % \ref{HOexact}. 
Applying an additive functor $t$ we get a
splitting short exact sequence described by homomorphisms $t(i)$, $t(j)$,
$t(p)$, $t(q)$.
\end{proof}
\end{cislo}

\begin{cislo}\label{HAef}{\bf Exact functors and cofunctors.}
An additive functor (or an additive cofunctor) $t:\mod\to \mod$ is called
\emph{exact}\index{exact functor} \index{exact cofunctor}
if it preserves short exact sequences.

\begin{example*} The functor $t(-)=-\otimes \Z_2$ and the
cofunctor $s(-)=\hom (-,\Z)$ are additive but not exact. To
show it apply them on the short exact sequence
$$0\to \Z\xrightarrow{2\times}\Z\to\Z_2\to 0.$$
On the other hand, the functor $t(-)=-\otimes \Q$ from $\ab$ to $\ab$ is exact.
\end{example*}

\begin{lemma*} Let $(C,\partial)$ be a chain complex and
let $t:\mod\to \mod$ be an exact functor. Then
$$H_n(tC,t\partial)=tH_n(C,\partial).$$
Consequently, $t$ converts all exact sequences into exact
sequences.
\end{lemma*}

\begin{proof} Since $t$ preserves short exact sequences, it
preserves kernels, images and factors. So we get
$$H_n(tC)=\frac{\ker t\partial_n}{\im t\partial_{n+1}}=
\frac{t(\ker \partial_n)}{t(\im \partial_{n+1})}=
t\left(\frac{\ker \partial_n}{\im
\partial_{n+1}}\right)=t(H_n(C)).$$
\end{proof}
\end{cislo}

\begin{cislo}\label{HAref}{\bf Right exact functors.}
An additive functor $t:\mod\to \mod$ is called
\emph{right exact}\index{right exact functor}
if it converts any exact sequence
$$A\xrightarrow{i}B\xrightarrow{j}C\to 0$$
into an exact sequence
$$tA\xrightarrow{t(i)}tB\xrightarrow{t(j)}tC\to 0.$$

\begin{thm*} Consider an $R$-module $M$. The functor $t(-)
=-\otimes_{R}M$ from $\mod$ to $\ab$ is right exact.
\end{thm*}

\begin{proof} The exact sequence $A\xrightarrow{i} B\xrightarrow{j}
C\to 0$ is converted into the sequence
$$ A\otimes_R M\xrightarrow{i\otimes \id_M} B\otimes_R M\xrightarrow{j
\otimes \id_M}C\otimes_R M\to 0.$$
It is clear that $j\otimes \id_M$ is an epimorphism. According to
the lemma below $\ker(j\otimes\id_M)$ is generated by elements
$b\otimes m$ where $b\in \ker j=\im i$. Hence,
$\ker(j\otimes\id_M)=\im(i\otimes\id_M)$.
\end{proof}

\begin{lemma*} If $\alpha:A\to A'$ and $\beta:B\to B'$ are
epimorphisms, then $\ker(\alpha\otimes\beta)$ is generated by
elements $a\otimes b$ where $a\in\ker\alpha$ or $b\in\ker\beta$.
\end{lemma*}
For the proof see [Spanier], %\cite{Sp}, 
Chapter 5, Lemma 1.5.
\end{cislo}

\begin{cislo}\label{HAlecf}{\bf Left exact cofunctors.}
An additive cofunctor $t:\mod\to \mod$ is called
\emph{left exact}\index{left exact functor}
if it converts any exact sequence
$$A\xrightarrow{i}B\xrightarrow{j}C\to 0$$
into an exact sequence
$$O\to tC\xrightarrow{t(j)}tB\xrightarrow{t(i)}tA.$$

\begin{thm*} Consider an $R$-module $M$. The cofunctor $t(-)
=\hom_{R}(-,M)$ from $\mod$ to $\mod$ is left exact.
\end{thm*}
The proof is not difficult and is left as an exercise.
\end{cislo}

\begin{cislo}\label{HApm}{\bf Projective modules.} An
$R$-modul is called \emph{projective}\index{projective module}
if for any epimorphism $p:A\to B$ and any homomorphism
$f:P\to B$ there is $F:P\to A$ such that the diagram
$$
\xymatrix{
{}& A\ar[d]^p\\
P\ar[ru]^-F \ar[r]_-f & B \ar[d]\\
{}& 0
}
$$
commutes. Every free $R$-module is projective.
\end{cislo}

\begin{cislo}\label{HApr}{\bf Projective resolution.} A
\emph{projective resolution} \index{projective resolution}
of an $R$-module $A$ is a chain
complex $(P,\varepsilon)$, $P_i=0$ for $i<0$
and a homomorphism $\alpha: P_0\to
A$ such that the sequence
$$\to P_i\xrightarrow{\varepsilon_i} P_{i-1}\to\dots\to
P_1\xrightarrow{\e_1} P_0\xrightarrow{\alpha}A\to 0$$
is exact. It means that
$$H_i(P,\varepsilon)=
\begin{cases}0\quad&\text{for }i\ne 0,\\
P_0/\im\varepsilon_1=P_0/\ker\alpha\cong A\quad&\text{for }i=0.
\end{cases}$$
If all $P_i$ are free modules, the resolution is called
\emph{free}\index{free resolution}.

\begin{lemma} To every module there is a free resolution.
\end{lemma}

\begin{proof} For module $A$ denote $F(A)$ a free module over
$A$ and $\pi:F(A)\to A$ a canonical projection. Then the free
resolution of $A$ is constructed in the following way
$$\xymatrix
{
P_2=F\ker\varepsilon_1\ar[r] \ar@/^1pc/[rr]^-{\varepsilon_2}
&\ker\varepsilon_1 \ar[r]
& P_1=F(\ker\pi)\ar[r] \ar@/^1pc/[rr]^-{\varepsilon_1} & \ker\pi\ar[r]
&P_0=F(A)\ar[r]_-{\pi} & A
}$$
\end{proof}

\begin{lemma} Every Abelian group $A$ has the projective
resolution
$$0\to\ker\pi\to F(A)\xrightarrow{\pi}A\to 0.$$
\end{lemma}

\begin{proof} $\ker\pi$ as a subgroup of free Abelian group $F(A)$
is free.
\end{proof}

\begin{thm*} Consider a homomorphism of $R$-modules
$\varphi:A\to A'$. Let $(P_n,\e_n)$ and $(P'_n,\e'_n)$ be
projective resolutions of $A$ and $A'$, respectively. Then there
is a chain homomorphism $\varphi_n:(P,\e)\to (P',\e')$ such that
the  diagram
$$
\xymatrix{
\dots\ar[r]^-{\e_3} & P_2\ar[r]^-{\e_2}\ar[d]^{\p_2} &
P_1\ar[r]^-{\e_1}\ar[d]^{\p_1} & P_0\ar[r]^-{\alpha}\ar[d]^{\p_0} &
A\ar[r]\ar[d]^{\p} & 0\\
\dots\ar[r]^-{\e'_3} & P'_2\ar[r]^-{\e'_2} &
P'_1\ar[r]^-{\e'_1} & P'_0\ar[r]^-{\alpha'} &
A'\ar[r] & 0
}
$$
commutes. Moreover, any two such chain homomorphism $(P,\e)\to
(P',\e')$ are chain homotopic.
\end{thm*}

\begin{proof}[Proof of the first part] $\alpha'$ is an
epimorphism and $P_0$ is
projective. Hence there is $\p_0:P_0\to P'_0$ such that the first
square on the right side commutes.

Since
$\alpha'(\p_0\e_1)=\p(\alpha\e_1)=\p\circ 0=0$,
we get that
$$\im(\p_0\e)\subseteq\ker\alpha'=\im\e'_1.$$

$\e'_1:P'_1\to \im\e'_1$ is an epimorhism and $P_1$ is
projective. Hence there is $\p_1:P_1\to P'_1$ such that the
second square in the diagram commutes.

The proof of the rest of the first part proceeds in the same way
by induction.
\end{proof}

\begin{proof}[Proof of the second part] Let $\p_*$ and $\p'_*$ be
two chain homomorphisms making the diagram above commutative.
Since $\alpha'(\p_0-\p'_0)=\alpha(\p-\p)=0$, we have
$$\im(\p_0-\p'_0)\subseteq\ker\alpha'=\im\e'_1.$$
Therefore there exists $s_0:P_0\to P'_1$ such that
$\e'_1s_0=\p_0-\p'_0$.

Next, $\e'_1(\p_1-\p'_1-s_0\e_1)=\e'_1(\p_1-\p'_1)-\e'_1s_0\e_1=
(\p_0-\p'_0)\e_1-(\p_0-\p'_0)\e_1=0$, hence
$$\im(\p_0-\p'_0-s_0\e_1)\subseteq\ker\e'_1=\im\e'_2,$$
and consequently, there is $s_1:P_1\to P'_2$ such that
$$\e'_2s_1=\p_1-\p'_1-s_0\e_1.$$
The rest proceeds by induction in the same way.
\end{proof}
\end{cislo}

\begin{cislo}\label{HAdf}{\bf Derived functors.} Consider a right
exact functor $t:\mod\to\mod$ and a homomorphism
of $R$-modules $\p:A\to A'$. Let $(P,\e)$ and $(P',\e')$
be projective resolutions of $A$ and $A'$, respectively, and let
$\p_*:(P,\e)\to (P',\e')$ be a chain homomorphism induced by
$\p$. The \emph{derived functors}\index{derived
functor} $t_i:\mod\to\mod$ of the functor $t$ are defined
\begin{align*}
t_iA&=H_i(tP,t\e)\\
t_i\p&=H_i(t\p).
\end{align*}
The functor $t_0$ is equal to $t$ since
$$t_0A=tP_0/\im t\e_1=tP_0/\ker t\alpha\cong tA.$$
Using the previous theorem  we can easily show that
the definition does not depend on the choice of projective
resolutions and a chain homomorphism $\p_*$.

\begin{defin*} The $i$-th derived functors of the functor
$t(-)=-\otimes_R M$ is denoted \index{Tor}
$$\tor_i^R(-,M).$$
If $R=\Z$, the index $\Z$ in the notation will be omitted.
\end{defin*}

\begin{example*} Let $R=\Z$. Any Abelian group $A$ has a free
resolution with $P_i=0$ for $i\ge 2$. Hence
$$\tor_i(A,B)=0\quad\text{for }i\ge 2.$$
Hence we will omit the index $1$ in $\tor_1(A,B)$.
We have
\begin{enumerate}
\item  $\tor(A,B)=0$ for any free Abelian group $A$.
\item  $\tor(A,B)=0$ for any free Abelian group $B$.
\item  $\tor(\Z_m,\Z_n)=\Z_{d(m,n)}$ where $d(m,n)$ is the
greatest common divisor of $m$ and $n$.
\item $\tor(-,B)$ is an additive functor.
\end{enumerate}
The proof based on the definition is not difficult and is left to the reader as an exercise.
\end{example*}
\end{cislo}

\begin{cislo}\label{HAdcf}{\bf Derived cofunctors.} Consider a
left exact cofunctor $t:\mod\to\mod$ and a homomorphism
of $R$-modules $\p:A\to A'$. Let $(P,\e)$ and $(P',\e')$
be projective resolutions of $A$ and $A'$, respectively, and let
$\p_*:(P,\e)\to (P',\e')$ be a chain homomorphism induced by
$\p$. The \emph{derived cofunctors}\index{derived
cofunctor} $t^i:\mod\to\mod$ of the functor $t$ are defined
\begin{align*}
t^iA&=H^i(tP,t\e)\\
t^i\p&=H^i(t\p).
\end{align*}
The functor $t^0$ is equal to $t$ since
$$t_0A=\ker t\e_1=\im t\alpha= tA.$$
Using Theorem  \ref{HApr} we can easily show that
the definition does not depend on the choice of projective
resolutions and a chain homomorphism $\p_*$.

\begin{defin*} The $i$-th derived functors of the functor
$t(-)=\hom_R (-,M)$ is denoted \index{Ext}
$$\ext^i_R(-,M).$$
If $R=\Z$, the index $\Z$ in the notation will be omitted.
\end{defin*}

\begin{example*} Let $R=\Z$. Since every Abelian group $A$ has a free
resolution with $P_i=0$ for $i\ge 2$,
$$\ext^i(A,B)=0\quad\text{for }i\ge 2.$$
Hence we will write  $\ext(A,B)$ for $\ext^{1}(A,B)$. We have
\begin{enumerate}
\item  $\ext(A,B)=0$ for any free Abelian group $A$.
\item  $\ext(\Z_n,\Z)=\Z_n$.
\item  $\ext(\Z_m,\Z_n)=\Z_{d(m,n)}$ where $d(m,n)$ is the
greatest common divisor of $m$ and $n$.
\item $\ext(-,B)$ is an additive cofunctor.
\end{enumerate}
The proof is the application of the definition and it is again left to the reader.
\end{example*}
\end{cislo}

\begin{cislo}\label{HAukc}{\bf Universal coefficient theorems.}
In this paragraph we first express the
cohomology groups $H^n(X;G)$ with the aid of functors
$\hom$ and $\ext$ using the homology groups $H_{*}(X)$.

\begin{thma} If a free chain complex  $C$ of Abelian groups has homology
groups $H_n(C)$, then the cohomology groups $H^n(C;G)$
of the cochain complex
$C^n=\hom(C_n,G)$ are determined by the following split short exact sequence
$$0\to\ext(H_{n-1}(C),G)\to H^n(C;G)\xrightarrow{h}
\hom(H_n(C),G)\to 0$$
where $h[f]([c])=f(c)$ for  all cycles $c\in C_n$ and all cocycles $f\in \hom(C_n;G)$.
\end {thma}

\begin{remark*}The
exact sequence is natural but the splitting not.
In this case the naturality means that for every chain
homomorphism $f:C\to D$ we have commutative diagram
$$
\xymatrix{
0\ar[r] &
\ext(H_{n-1}(C),G) \ar[r] \ar[d]^{\ext(H_{n-1}f,\id_G)}&
H^n(C;G)\ar[r]^-{h_C}\ar[d]^{H^nf}&
\hom(H_n(C),G)\ar[r]\ar[d]^{\hom(H_nf,\id_G)}& 0\\
0\ar[r] &
\ext(H_{n-1}(D),G) \ar[r] &
H^n(D;G)\ar[r]^-{h_D}&
\hom(H_n(D),G)\ar[r]& 0
}
$$
\end{remark*}

\begin{proof} The free chain complex $(C_n,\partial)$ determines
two other  chain complexes, the chain complex of cycles
$(Z_n,0)$ and the chain complex of boundaries $(B_n,0)$. We have
the short exact sequence of these chain complexes
$$0\to Z_n\xrightarrow{i} C_n\xrightarrow{\partial}B_{n-1}\to 0.$$
Since $B_{n-1}$ is a subgroup of the free Abelian group $C_{n-1}$,
it is also free and the exact sequence splits. Since the functor
$\hom(-,G)$ is additive, it converts this sequence into
the short exact sequence of cochain complexes
$$0\to \hom(B_{n-1},G)\xrightarrow{\delta}
\hom(C_n,G)\xrightarrow{i^*}\hom(Z_n,G)\to 0.$$
As in 5.6 %\ref{COles} 
we obtain the long exact sequence
of cohomology groups of the given cochain complexes
$$\to\hom(Z_{n-1},G)\to\hom(B_{n-1},G)\to H^n(C;G)\xrightarrow{i^*}
\hom(Z_n,G)\xrightarrow{\delta^*}\hom(B_n,G)\to$$
Next, one has to realize how the connecting homomorphism $\delta^*$
in this exact sequence looks like using its definition and the special
form of the short exact sequence. The conclusion is that
$\delta^*=j^*$ where $j:B_n\hookrightarrow Z_n$ is an iclusion. Now we can
reduce the long exact sequence to the short one
$$0\to \frac{\hom(B_{n-1},G)}{\im j^*}\longrightarrow
H^n(C;G)\overset{i^*}\longrightarrow \ker j^*\to 0.$$
We determine $\ker j^*$ and $\hom(B_{n-1},G)/\im j^*$. Consider
the short exact sequence
$$0\to B_n\xrightarrow{j} Z_n\to H_n(C)\to 0.$$
It is a free resolution of $H_n(C)$. Applying the cofunctor $\hom(-,G)$
we get the cochain complex
$$0\to\hom(Z_n,G)\xrightarrow{j^*}\hom(B_n,G)\to
0\to 0\to\dots$$
from which we can easily compute that
$$\hom(H_n(C),G)=\ker j^*,\quad \ext(H_n(C),G)=
\frac{\hom(B_{n-1},G)}{\im j^*}.$$
This completes the proof of exactness.

We will find a splitting $r:\hom(H_n(C);G)\to H^n(C^*;G)$.
Let $g\in\hom(H_n(C),G)$. We can define $f\in \hom(C_n,G)$ such that on
cycles $c\in Z_n$
$$f(c)=g([c])$$
where $[c]\in H_n(C)$. $f$ is a cocycle, hence $[f]\in H^n(C;G)$
and $h[f]([c])=f(c)=g([c])$.
\end{proof}


In a very similar way one can compute homology groups with coefficients in $G$ using
the tensor product $H_*(C)\otimes G$ and $\tor(H_*(C),G)$.

\begin{thma}\label{HAukh}
If a free chain complex  $C$ has homology groups
$H_n(C)$, then the homology groups $H_n(C_*;G)$ of the chain complex
$C_n\otimes G$ are determined by the split short exact sequence
$$0\to H_{n}(C)\otimes G\xrightarrow{l} H_n(C;G)\to
\tor (H_{n-1}(C),G)\to 0$$
where $l([c]\otimes g)=[c\otimes g]$ for $c\in Z_n(C)$, $g\in G$.
\end{thma}
\end{cislo}

\begin{cislo}\label{HAex}{\bf Exercise.} Compute cohomology of real projective spaces with $\Z$
and $\Z_2$ coefficients using the universal coefficient theorem
for cohomology.

\begin{ex*} Using again the universal coefficient theorem for
cohomology and Theorem 4.4 %\ref{HOCWcomp} 
prove that that for a given CW-complex $X$ the cohomology of the cochain complex
$$(H^n(X^n,X^{n-1};G), d^n)$$
where $d^n$ is the composition
$$H^n(X^n,X^{n-1};G)\xrightarrow{j_n^*}H^n(X^n;G)
\xrightarrow{\delta^*}H^{n+1}(X^{n+1},X^{n};G)$$
is isomorphic to $H^*(X;G)$. See also Theorem 5.14. %\ref{COcomp}.
\end{ex*}
\end{cislo}