\documentclass[a4paper]{article}

\def\npart{II}

\def\ntitle{Algebraic Topology}
\def\nlecturer{H.\ Wilton}

\def\nterm{Michaelmas}
\def\nyear{2018}

\input{header}

\DeclareMathOperator{\rel}{rel}
\newcommand{\w}{\vee}
\renewcommand{\b}{\partial} % boundary of a simplicial complex
\newcommand{\interior}{\mathring} % interior
\DeclareMathOperator{\mesh}{mesh}
\DeclareMathOperator{\St}{St} % star

\begin{document}

\input{titlepage}

\tableofcontents

\setcounter{section}{-1}

\section{Introduction}

\begin{question}
  Is the Hopf link really linked? More formally, is there a homeomorphism \(\R^3 \to \R^3\) taking \(H\) to \(U\)?
\end{question}

\(H\) can be realised as \(S^1 \amalg S^1 \to \R^3\). For \(U\), we can consider \(S^1 \amalg S^1\) as boundary of \(D^1 \amalg D^1\) and the map extends to a map to discs.

So it makes sense to phrase the question as

\begin{question}
  Does the Hopf link \(\eta: S^1 \amalg S^1 \to \R^3\)extend to a map of discs?
\end{question}

This is an example of an \emph{extension problem}.

Here is another example. Define the \(n\)-sphere \(S^{n - 1} := \{x \in \R^n: \sum_{i = 1}^n x_i^2 = 1\}\), which sits inside \(D^n = \{x \in \R^n: \sum_{i = 1}^n x_i^2 = 1\}\). We can ask:

\begin{question}
  Does the identity map \(\id_{S^{n - 1}}: S^{n - 1} \to S^{n - 1}\) factor through \(D^n\)?
\end{question}

To gain some intuition, let's consider small \(n\). For \(n = 1\), \(S^0 = \{-1, 1\}\). The answer is no by Intermediate Value Theorem, or connectedness from topology. For \(n = 2\), this answer is again no by winding number argument. What about \(n \geq 3\)?

These problems are hard because we have to consider continuous maps between two spaces, which are in general very big and hard to compute. On the other hand, a comparable algebraic problem is

\begin{question}
  Does the map \(\id: \Z \to \Z\) factor through \(0\)?
\end{question}

Well that's much much easier!

\section{The fundamental group}

Throughout this course, ``maps'' mean continuous maps.

\subsection{Deforming maps and spaces}

\begin{definition}[homotopy]\index{homotopy}
  Let \(f_0, f_1: X \to Y\) be maps. A \emph{homotopy} between \(f_0\) and \(f_1\) is a map \(F: X \times [0, 1] \to X\) such that \(F(x, 0) = f_0(x)\) and \(F(x, 1) = f_1(x)\) for all \(x \in X\).

  If \(F\) exists, we say that \(f_0\) is \emph{homotopic} to \(f_1\) and write \(f_0 \simeq f_1\), or to emphasise the homotopy, \(f_0 \simeq_F f_1\).
\end{definition}

\begin{notation}
  \(I = [0, 1]\). We often write \(f_t(x) = F(x, t)\).
\end{notation}

\begin{eg}
  If \(Y\) is a convex region in \(\R^n\) then for any \(f_0, f_1: X \to Y\), the \emph{straightline homotopy} \(F(x, y) = t f_1(x) + (1 - t) f_0(x)\) is a homotopy \(f_0 \simeq f_1\).
\end{eg}

\begin{definition}[relative homotopy]
  If \(Z \subseteq X\) and \(F(z, t) = f_0(z) = f_1(z)\) for all \(z \in Z, t \in I\), then \(F\) is a \emph{homotopy relative to \(Z\)}, write \(f_0 \simeq_F f_1 \rel Z\).
\end{definition}

\begin{lemma}
  The relation \(\simeq\) (\(\rel Z\)) is an equivalence relation on maps \(X \to Y\).
\end{lemma}

\begin{proof}
  Reflexivity and symmetry are easy. For transitivity, suppose \(f_0 \simeq_{F_0} f_1 \simeq_{F_1} f_2\). Let
  \[
    F(x, t) =
    \begin{cases}
      F_0(x, 2t) & t \leq \frac{1}{2} \\
      F_1(x, 2t - 1) & t \geq \frac{1}{2}
    \end{cases}
  \]
  which is the homotopy we need.
\end{proof}

\begin{definition}[homotopy equivalence]\index{homotopy equivalence}
  \(f: X \to Y\) and \(g: Y \to X\) is a \emph{homotopy equivalence} if \(g \compose f \simeq \id_X\) and \(f \compose g \simeq \id_Y\). In this case we say \(X\) is homotopy equivalent to \(Y\) and write \(X \simeq Y\).
\end{definition}

\begin{eg}
  Let \(X = *\), the space with one point and \(Y = \R^n\). Let \(f: * \mapsto 0\), \(g\) be the unique map \(Y \to X\). Then \(g \compose f = \id_X\), and \(f \compose g = 0 \simeq \id_Y\) via the straightline homotopy. Therefore \(\R^n\) is homotopy equivalent to \(*\).
\end{eg}

\begin{definition}[contractible]\index{contractible}
  A space \(X\) is \emph{contractible} if \(X \simeq *\).
\end{definition}

\begin{eg}
  Let \(X = S^1, Y = \R^2 - \{0\}\). Let \(f: X \to Y\) be the natural inclusion nad \(g: Y \to X, x \mapsto \frac{x}{\norm x}\). Then
  \begin{align*}
    g \compose f &= \id_X \\
    f \compose g(x) &= \frac{x}{\norm x} \in \R^2
  \end{align*}
  Although \(Y\) is not convex, for all \(x, t\), straightline homotopy \(F(x, t)\) between \(f \compose g\) and \(\id_Y\) satisfies \(F(x, t) \neq 0\) so \(f \compose g \simeq_F \id_Y\). Thus \(X \simeq Y\).
\end{eg}

\begin{definition}[retract, deformation retract]\index{retract}\index{deformation retract}
  Let \(f: X \to Y\) and \(g: Y \to X\). If \(g \compose f = \id_X\) then \(X\) is a \emph{retract} of \(Y\).

  If in addition \(f \compose g \simeq \id_Y \rel f(X)\) then we say \(X\) is a \emph{deformation retract} of \(Y\).
\end{definition}

Note that whenever we have \(g \compose f = \id_X\), \(f\) is injective so we can think \(X\) as being embedded in \(Y\). Informally, \(Y\) is ``as complicated'' as \(X\).

\begin{lemma}
  Homotopy equivalence is an equivalence on topological spaces.
\end{lemma}

\begin{proof}
  Symmetry and reflexivity are obvious. For transitivity, consider
  \[
    \begin{tikzcd}
      X \ar[r, "f", shift left] & Y \ar[l, "g", shift left] \ar[r, "f", shift left] & Z \ar[l, "g", shift left]
    \end{tikzcd}
  \]
  Need to show that \(g \compose (g' \compose f') \compose f \simeq \id_X\) (and the other direction will follow similarly). By hypothesis \(g' \compose f' \simeq_{F'} \id_Y\). Now
  \[
    g(F'(f(x), t))
  \]
  is a homotopy
  \[
    g \compose g' \compose f' \compose f \simeq g \compose \id_Y \compose f = g \compose f \simeq \id_X.
  \]
\end{proof}

\subsection{The fundamental group}

\begin{definition}[path, loop]\index{path}\index{loop}
  A \emph{path} (from \(x_0\) to \(x_1\)) is a continuous map \(\gamma: I \to X\) (with \(\gamma(0) = x_0, \gamma(1) = x_1\)).

  A \emph{loop} (based at \(x_0\)) is a path from \(x_0\) to \(x_0\).
\end{definition}

\begin{definition}[homotopy of path]\index{homotopy of path}
  Let \(\gamma_0, \gamma_1\) be paths from \(x_0\) to \(x_1\). A \emph{homotopy (of path)} from \(\gamma_0\) to \(\gamma_1\) is a homotopy
  \[
    \gamma_0 \simeq_F \gamma_1 \rel \{0, 1\}.
  \]
\end{definition}

\begin{definition}[concatenation of path, constant path, inverse path]
  Let \(\gamma\) be a path from \(x\) to \(y\) and \(\delta\) a path from \(y\) to \(z\).
  \begin{enumerate}
  \item The \emph{concatenation} of \(\gamma\) and \(\delta\) is
    \[
      (\gamma \cdot \delta) (t) =
      \begin{cases}
        \gamma(2t) & t \leq \frac{1}{2} \\
        \delta(2t - 1) & t \geq \frac{1}{2}
      \end{cases}
    \]
  \item The \emph{constant} path (at \(x\)) is \(c_x(t) = x\).
  \item The \emph{inverse path} to \(\gamma\) is \(\overline \gamma(t) = \gamma(1 - t)\).
  \end{enumerate}
\end{definition}

\begin{theorem}[fundamental group]\index{fundamental group}
  Let \(x_0 \in X\). Let
  \[
    \pi_1(X, x_0) = \{\text{loops based at } x_0\} / \simeq.
  \]
  This has a group structure with
  \begin{itemize}
  \item \([\gamma][\delta] = [\gamma \cdot \delta]\),
  \item identity \([c_{x_0}]\),
  \item \([\gamma]^{-1} = [\overline \gamma]\).
  \end{itemize}

  We call \(\pi_1(X, x_0)\) the \emph{fundamental group} of \(X\) (based at \(x_0\)).
\end{theorem}

\begin{proof}
  To prove the theorem, we need to check that multiplication and inverses are well-defined and the group axioms are satisfied.

  \begin{lemma}
    If \(\gamma_0, \gamma_1\) are paths to \(y\) and \(\delta_0, \delta_1\) are paths from \(y\) and \(\gamma_0 \simeq \gamma_1, \delta_0 \simeq \delta_1\), then
    \[
      \gamma_0 \cdot \delta_0 \simeq \gamma_1 \cdot \delta_1.
    \]

    Also \(\overline \gamma_0 \simeq \overline \gamma_1\).
  \end{lemma}

  \begin{proof}
    We only show for concatenation. Inverses are similar. Let \(\gamma_0 \simeq_F \gamma_1, \delta_0 \simeq_G \delta_1\). (proof by picture) Algebraically, the homotopy is given by
    \[
      H(s, t) =
      \begin{cases}
        F(s, 2t) & t \leq \frac{1}{2} \\
        G(s, 2t - 1) & t \geq \frac{1}{2}
      \end{cases}
    \]
  \end{proof}

  Now we check that the group axioms are satisfied.

  \begin{lemma}\leavevmode
    \begin{enumerate}
    \item \((\alpha \cdot \beta) \cdot \gamma \simeq \alpha \cdot (\beta \cdot \gamma)\).
    \item \(\alpha \cdot c_x \simeq \alpha \simeq c_w \cdot \alpha\).
    \item \(\alpha \cdot \overline \alpha \simeq c_w\).
    \end{enumerate}
  \end{lemma}

  \begin{proof}
    We show \(1\). The other two are similar. Let
    \[
      \delta =
      \begin{cases}
        \alpha(3t) & t \leq \frac{1}{3} \\
        \beta(3t - 1) & \frac{1}{3} \leq t \leq \frac{2}{3} \\
        \gamma(3t - 2) & \frac{2}{3} \leq t \leq 1
      \end{cases}
    \]
    Let
    \[
      f_0(t) =
      \begin{cases}
        \frac{4}{3}t & t \leq \frac{1}{2} \\
        \frac{1}{3} + \frac{2}{3} t & t \geq \frac{1}{2}
      \end{cases}
    \]
    and
    \[
      f_1(t) =
      \begin{cases}
        \frac{2}{3}t & t \leq \frac{1}{2} \\
        -\frac{1}{3} + \frac{4}{3}t & t \geq \frac{1}{2}
      \end{cases}
    \]
    Note that \(f_0 \simeq f\) as \emph{paths} via the straightline homotopy in \(I\). But
    \begin{align*}
      (\alpha \cdot \beta) \cdot \gamma &= \delta \compose f_0 \\
      \alpha \cdot (\beta \cdot \gamma) &= \delta \compose f_1
    \end{align*}
    so they are homotopic as path.
  \end{proof}
\end{proof}

\begin{eg}
  Let \(X = \R^n, x_0 = 0\). Consider a loop \(\gamma\) in \(\R^n\) based at \(0\). The straightline homotopy shows that \(\gamma \simeq c_0\) as path. Therefore \(\pi_1(\R^n, 0) \cong 1\).
\end{eg}

\begin{lemma}
  Let \(f: X \to Y\) be such that \(f(x_0) = y_0\). There is a well-defined homomorphism
  \begin{align*}
    f_*: \pi_1(X, x_0) &\to \pi_1(Y, y_0) \\
    [\gamma] &\mapsto [f \compose \gamma]
  \end{align*}
  Furthermore,
  \begin{enumerate}
  \item if \(f \simeq f' \rel \{x_0\}\) then \(f_* = f_*'\).
  \item if \(g: Y \to Z\) is another map then \(f_* \compose g_* = (f \compose g)_*\).
  \item \((\id_X)_* = \id_{\pi_1(X, x_0)}\).
  \end{enumerate}
\end{lemma}

\begin{proof}
  Easy.
\end{proof}

We'd like to eliminate the dependence of \(\pi_1(X, x_0)\) on \(x_0\), at least when \(X\) is path-connected. Suppose \(x_0, x_1 \in X\). What do \(\pi_1(X, x_0)\) and \(\pi_1(X, x_1)\) have to do with each other, where \(X\) is path-connected?

Fix \(\alpha\) a path from \(x_0\) to \(x_1\).

\begin{lemma}
  There is a well-defined group homomorphism
  \begin{align*}
    \alpha_\#: \pi_1(X, x_0) &\to \pi_1(X, x_1) \\
    [\gamma] &\mapsto [\overline \alpha \cdot \gamma \cdot \alpha]
  \end{align*}
  Furthermore
  \begin{enumerate}
  \item if \(\alpha \simeq \alpha'\) then \(\alpha_\# = \alpha_\#'\),
  \item \((c_{x_0})_\# = \id_{\pi_1(X, x_0)}\),
  \item if \(\beta\) is a path from \(x_1\) to \(x_2\), \(\beta_\# \compose \alpha_\# = (\alpha \cdot \beta)_\#\).
  \item if \(f: X \to Y\) then \((f \compose \alpha)_\# \compose f_* = f_* \compose \alpha_\#\).
  \end{enumerate}
\end{lemma}

Now it makes sense to talk about isomorphism type of the fundamental group of a path-connected space.

\begin{definition}[simply connected]\index{simply connected}
  If \(X\) is path-connected and \(\pi_1(X, x_0) \cong 1\) for some (i.e.\ any) \(x_0 \in X\) then we say \(X\) is \emph{simply connected}.
\end{definition}

Our last task is to understand what homotopies that don't fix basepoints do to the fundamental group.

\begin{lemma}
  Suppose \(f, g: X \to Y\) is such that \(f \simeq_F g\). Define \(\alpha(t) = F(x_0, t)\), a path from \(f(x_0)\) to \(g(x_0)\). Then the following diagram commutes:
\[
  \begin{tikzcd}
    & \pi_1(Y, f(x_0)) \ar[dd, "\alpha_\#"] \\
    \pi_1(X, x_0) \ar[ur, "f_*"] \ar[dr, "g_*"] \\
    & \pi_1(Y, g(x_0))
  \end{tikzcd}
\]
i.e.\ \(g_* = \alpha_\# \compose f_*\).
\end{lemma}

\begin{proof}
  Let \([\gamma] \in \pi_1(X, x_0)\). We need to show that
  \[
    [g \compose \gamma] = g_*[\gamma] = \alpha_\# \compose f_*[\gamma] = [\overline \alpha \cdot (f \compose \gamma) \cdot \alpha]
  \]
  which is saying
  \[
    g \compose \gamma \simeq \overline \alpha \cdot (f \compose \gamma) \cdot \alpha
  \]
  as paths. Consider
  \begin{align*}
    I \times I &\to Y \\
    (s, t) &\mapsto F(\gamma(s), t)
  \end{align*}
  Let \(H\) be the straightline homotopy in \(I \times I\) between the yellow path and the brown path. Then \(G \compose H\) is the homotopy we need.
\end{proof}

\begin{theorem}
  If \(f: X \to Y, g: Y \to X\) is a pair of homotopy equivalences and \(x_0 \in X\) then \(f_*: \pi_1(X, x_0) \to \pi_1(Y, f(x_0))\) is an isomorphism.
\end{theorem}

\begin{proof}
  Suffices to prove that \(f_*\) is bijective. Let \(g \compose f \simeq_F \id_X\) and \(\alpha\) be the path defined from \(F\) as above. Then
  \[
    g_* \compose f_* = (g \compose f)_* = \alpha_\# \compose \id_{\pi_1(X, x_0)} = \alpha_\#
  \]
  so \(f_*\) is injective. Similarly it is surjective.
\end{proof}

\begin{corollary}
  Contractible spaces are simply connected.
\end{corollary}

\section{Covering spaces}

\subsection{Definition and first examples}

\begin{definition}[covering space]\index{covering space}
  Let \(p: \hat X \to X\) be a map. An open set \(U \subseteq X\) is \emph{evenly covered} if there is a discrete space \(\Delta_U\) and an identification \(p^{-1}(U) = \Delta_U \times U\) such that on \(p^{-1}(U)\), \(p\) coincides with projection to the second factor.

  If every \(x \in X\) has an everly covered neighbourhood, we say that \(p\) is a \emph{covering map} and \(\hat X\) is a \emph{covering space}
\end{definition}

Alternatively, write \(U_\delta = \{\delta\} \times U\). Then \(p^{-1}(U) = \coprod_{\delta \in \Delta_U} U_\delta\). Write \(p|_\delta = p|_{U_\delta}\) which is a homeomorphism.

\begin{eg}\leavevmode
  \begin{enumerate}
  \item Let \(\hat X = \R, X = S^1\) and define
  \begin{align*}
    p: \R &\to S^1 \\
    t &\mapsto e^{2\pi i t}
  \end{align*}
  Let \(1 \in U \subsetneq S^1\). Choose a branch of \(\log\) well-defined on \(U\) such that \(\log 1 = 0\). Every point \(\hat z \in p^{-1}(U)\) can be written uniquely as
  \[
    \hat z = k + \frac{\log(z)}{2\pi i}
  \]
  where \(z = p(\hat z) \in U\) and \(k \in \Z\), i.e.\ \(p^{-1}(U) = \Z \times U\). Thus \(U\) is evenly covered. The same proof shows that \(p\) is a covering map.
\item Let \(\hat X = X = S^1\). Define
  \begin{align*}
    p_n: S^1 &\to S^1 \\
    z &\mapsto z^n
  \end{align*}
  This is also a covering map by essentially the same proof by choosing a \(n\)th root of unity. In this case \(\Delta_n\) is the \(n\)th roots of unity.
\item Let \(\hat X = S^2\) and \(G = \Z/2\Z\) acts on \(S^2\) via the antipodal map. Let
  \[
    X = \hat X / G = \{\{x, -x\}: x \in S^2\}
  \]
  and \(p: \hat X \to X\) be the quotient map. The orbit space \(X\) can be identified with straightlines in \(\R^3\) passing through the origin. Given a line \(\ell\) through the origin, let
  \[
    C_\ell = \{y \in S^2: y \text{ perpendicular to } \ell\}.
  \]
  Then \(S^2 - C_\ell = U_+ \amalg U_-\). Let \(U = p(U_+ \amalg U_-)\), an open neighbourhood of \(\ell\) in \(X\). Note that \(p|_{U_+}\) and \(p|_{U_-}\) are both homeomorphisms onto \(U\). Thus \(U\) is evenly covered and \(p\) is a covering map. \(X = \R P^2\) is the \emph{real projective plane}.
\end{enumerate}
\end{eg}

Note that in all three examples, for all points \(x \in X\), the number of copies of \(U\) in \(p^{-1}(U)\) is the same. We give a name to such covering spaces:

\begin{definition}[\(n\)-sheeted]
  A covering map \(p: \hat X \to X\) is \emph{\(n\)-sheeted} where \(n \in \N \cup \{\infty\}\) if for all \(x \in X\), \(\# p^{-1}(x) = n\).
\end{definition}

\subsection{Lifting properties}

Let \(p: \hat X \to X\) be a covering map throughout the section.

\begin{definition}[lift]\index{lift}
  A \emph{lift} of \(f: Y \to X\) to \(\hat X\) is a map \(\hat f: Y \to \hat X\) such that \(f = p \compose \hat f\), i.e.\ the following diagram commutes:
  \[
    \begin{tikzcd}
      & \hat X \ar[d, "p"] \\
      X \ar[ur, "\hat f", dashed] \ar[r, "f"] & X
    \end{tikzcd}
  \]
\end{definition}

\begin{lemma}[uniqueness of lift]
  Suppose \(f: Y \to X\) where \(Y\) is connected and locally path-connected. % in fact locally path-connected not necessary
  Let \(\hat f_1, \hat f_2: Y \to \hat X\) are both lifts of \(f\). If there exists \(y \in Y\) such that \(\hat f_1(y) = \hat f_2(y)\) then \(\hat f_1 = \hat f_2\).
\end{lemma}

\begin{proof}
  Consider
  \[
    S = \{y \in Y: \hat f_1(y) = \hat f_2(y)\}.
  \]
  Claim that \(S\) is both open and closed, from which the lemma follows immediately. Given \(y_0 \in Y\), let \(U\) be an evenly covered neighbourhood of \(f(y_0)\) and \(V \subseteq \hat f^{-1}(U)\) a path-connected neighbourhood of \(y_0\). Let \(y \in V\) be arbitrary. Need to show that \(y_0 \in S\) if and only if \(y \in S\). If \(y_0 \in S\) then \(\hat f_1(y_0) = \hat f_2(y_0) \in U_\delta\) for some \(\delta \in \Delta_U\). Let \(\alpha\) be a path in \(V\) from \(y_0\) to \(y\). Then \(f \compose \alpha\) is a path from \(f(y_0)\) to \(f(y)\). Then \(\hat f_i \compose \alpha\) is a path in \(p^{-1}(U)\) from \(\hat f_i(y_0)\) to \(\hat f_i(y)\). It follows that \(\hat f_i(y) \in U_\delta\) so \(\hat f_1(y) = (\delta, f(y)) = \hat f_2(y)\) so \(y \in S\). The converse is identical.
\end{proof}

\begin{definition}[lift at a point]
  Let \(\gamma: I \to X\) be a path with \(\gamma(0) = x_0\). A (unique) lift of \(\gamma\) to \(\hat X\) such that \(\hat \gamma(0) = \hat x_0 \in p^{-1}(x_0)\) is called the \emph{lift of \(\gamma\) at \(\hat x_0\)}.
\end{definition}

\begin{lemma}[path-lifting lemma]\index{path-lifting lemma}
  Let \(\gamma: I \to X\) be a path with \(\gamma(0) = x_0\). For any \(\hat x_0 \in p^{-1}(x_0)\) there is a uniqueness \(\hat \gamma\) of \(\gamma\) at \(\hat x_0\).
\end{lemma}

\begin{proof}
  Uniqueness follows from the more general uniquenss of lift so suffices to show existence. Consider
  \[
    S = \{t \in I: \text{ lift of } \gamma|_{[0, t]} \text{ at } \hat x_0 \text{ exists}\},
  \]
  as \(0 \in S\), the lemma follows if we can show \(S\) is both open and closed. Let \(t_0 \in I\). Then \(\gamma(t_0) \in U\) for some evenly covered neighbourhood \(U\). There exists a path-connected neighbourhood \(V\) of \(t_0\) such that \(\gamma(V) \subseteq U\). Let \(t \in V\). We'll prove that \(t_0 \in S\) if and only if \(t \in S\). By symmetry suffices to show one direction. Suppose \(t_0 \in S, t \notin S\). Since \(t_0 \in S\), \(\hat \gamma(t_0)\) is well-defined so let \(\hat \gamma(t_0) \in U_\delta\). Since \([t_0, t] \subseteq V\) (as \(t \notin S\)), \(\gamma([t_0, t]) \subseteq U\) so the path
  \[
    s \mapsto
    \begin{cases}
      \hat \gamma(s) & s \leq t_0 \\
      p_\delta^{-1} \compose \gamma & t_0 \leq s \leq t
    \end{cases}
  \]
  is a lift of \(\gamma|_{[0, t]}\) so \(t \in S\). Contradiction.
\end{proof}

\begin{lemma}
  If \(X\) is path-connected the \(p\) is \(n\)-sheeted for some \(n \in \N \cup \{\infty\}\).
\end{lemma}

\begin{proof}
  Let \(x, y \in X\) and \(\alpha\) a path between them. Let \(\hat x \in p^{-1}(x)\) and let \(\hat \alpha_{\hat x}\) be the unique lift of \(\alpha\) at \(\hat x\). Define a map
  \begin{align*}
    p^{-1} (x) &\to p^{-1}(y) \\
    \hat x &\mapsto \hat \alpha_{\hat x}(1)
  \end{align*}
  Now replacing \(\alpha\) with \(\overline \alpha\) defines an inverse to this map.
\end{proof}

\begin{definition}[degree of covering map]\index{degree}
  \(n\) is called the \emph{degree} of \(p\).
\end{definition}

\begin{lemma}[homotopy lifting lemma]\index{homotopy lifting lemma}
  \label{lem:homotopy lifting lemma}
  Let \(f_0: Y \to X\) be a map where \(Y\) is path-connected. Let \(F: Y \times I \to X\) be a homotopy with \(F(\cdot, 0) = f_0\). Let \(\hat f_0: Y \to \hat X\) be a lift of \(f_0\) to \(\hat X\). Then there is a unique lift \(\hat F\) of \(F\) to \(\hat X\) such that \(\hat F(\cdot, 0) = \hat f_0\).
\end{lemma}

\begin{proof}
  Let \(y_0 \in Y\). Let \(\gamma_{y_0}(t) = F(y_0, t)\) be a path. By path lifting lemma, there is a unique lift \(\hat \gamma_{y_0}\) such that \(\hat \gamma_{y_0}(0) = \hat f_0(y_0)\) such that \(\hat F(y_0, t) = \hat\gamma_{y_0}(t)\). By uniqueness of path lifting, this is the only choice for \(\hat F\), but it is not clear that \(\hat F\) is continuous.

  We will construct a map that is obviously continuous and argue that it is also a lift. Fix \(y_0\). For all \(t\) there exists \(U_t\) an evenly covered neighbourhood of \(F(y_0, t)\). By definition of product topology,
  \[
    (y_0, t) \in V_t \times J_t \subseteq F^{-1}(U_t).
  \]
  Compactnss of \(I\) implies that \(\{y_0\} \times I\) is covered by \(V_1 \times J_1, \dots, V_n \times J_n\) where \(t_i \in J_i\). Setting \(V = \bigcap_{i = 1}^n V_i\) (and passing to a path-connected subset), we have \(\{y_0\} \times I\) covered by \(V \times J_1, \dots, V \times J_n\). Now define \(\tilde F\) on \(V \times I\) by
  \[
    \tilde F(y, t) = p_{\delta_i}^{-1} \compose F(y, t)
  \]
  for \(y \in V, t \in J_i\). Need to check that \(\tilde F\) is well-defined. Suppose \(t \in J_i \cap J_j\). Let \(y \in V\). Choose \(\alpha\) in \(V\) from \(y_0\) to \(y\) and let \(\alpha_t(s) = F(\alpha(s), t)\). Now \(p_{\delta_i}^{-1} \compose \alpha_t\) is the lift of \(\alpha_t\) at \(\hat F(y_0, t)\). Same for \(p_{\delta_j}^{-1} \compose \alpha_t\) so they are equal. Therefore their endpoints coincide: \(p_{\delta_i}^{-1} \compose F(y, t) = p_{\delta_j}^{-1} \compose F(y, t)\) . Thus \(\tilde F\) is well-defined.

  \(\tilde F\) is clearly continuous and a lift of \(F\), so it remains to check that \(\tilde F = \hat F\) on \(V \times I\). By construction \(\tilde F(y_0, 0) = \hat F(y_0, 0)\). Now \(\tilde F(\alpha(\cdot), 0)\) is a lift of \(f_0 \compose \alpha\), so will agree with \(\hat f_0 \compose \alpha\). So \(\tilde F(y, 0) = \hat f_0(y)\) for all \(y \in V\). Finally \(\tilde F(y, \cdot)\) is a lift of \(\gamma_y\) starting at \(\hat f_0(y)\), so by uniqueness again, \(\tilde F(y, t) = \tilde \gamma_y(t) = \hat F(y, t)\) for all \(y \in V, t \in I\).
\end{proof}

We have discussed lifts of maps, paths and homotopies. Recall that homotopy of paths is a slightly stronger form of homotopy and the next lemma shows that indeed the lift of a homotopy of paths is a homotopy of paths:

\begin{lemma}
  \label{lem:lift of homotopy of paths}
  Let \(F: I \times I \to X\) be a homotopy of paths and \(\hat F\) be a lift of \(F\) to \(\hat X\). Then \(\hat F\) is also a homotopy of paths.
\end{lemma}

\begin{proof}
  As \(F\) is a homotopy of path, \(F(0, t) = x_0\) for all \(t\). Consider \(\hat F(0, \cdot): I \to \hat X\). For any \(t \in I\) we have
  \[
    \hat F(0, t) \in p^{-1}(F(0, t)) = p^{-1}(x_0)
  \]
  which is discrete. As \(I\) is connected \(\hat F(0, \dots)\) is constant. Same for \(\hat F(1, \dots)\) so \(\hat F\) is a homotopy of paths.
\end{proof}

\subsection{Applications to calculations of fundamental groups}

\begin{lemma}
  If \(p: \hat X \to X\) is a map, \(x \in X\) and \(\hat x \in p^{-1}(x)\) then
  \[
    p_*: \pi_1(\hat X, \hat x) \to \pi_1(X, x)
  \]
  is an injection.
\end{lemma}

\begin{proof}
  Suppose \([\hat \gamma] \in \ker p_*\), i.e.\ \(p_*([\hat \gamma]) = [p\compose \hat \gamma] = [\gamma] = 1 \in \pi_1(X, x)\). Then \(\gamma\) is homotopic to the constant path. But by \nameref{lem:homotopy lifting lemma} this lifts to homotopy between \(\hat \gamma\) and constant path.
\end{proof}

As last time, path lifting defines an \emph{action} of \(\pi_1(X, x)\) on \(p^{-1}(x)\) by
\begin{align*}
  \pi_1(X, x) \times p^{-1}(x) &\to p^{-1}(x) \\
  ([\gamma], \hat x) &\mapsto \hat x . \gamma
\end{align*}
where \(\hat x . \gamma\) is the endpoint of the lift of \(\gamma\) at \(\hat x\). Note that by \Cref{lem:lift of homotopy of paths} this is indeed in the fibre of \(x\). Furthermore it shows that this is well-defined. Finally note that this is a \emph{right action} (ultimately because we defined concatenation of paths from left to right).

Given \(G\) action on \(X\), orbit-stabiliser says that there is a bijection between the left cosets of stabiliser \(G_x\) of an element \(x\) and the orbit \(G^x\). Furthermore, \(G\) has a natural action on the left cosets \(G/G_x\) such that the bijection is \(G\)-equivariant. Spelling this out (and use right action instead of left), we have

\begin{lemma}
  Suppose \(\hat X\) is path-connected and \(x \in X\). Let \(\hat x \in p^{-1}(x)\). Then
  \begin{align*}
    p_*\pi_1(\hat X, \hat x) \backslash \pi_1(X, x) &\to p^{-1}(x) \\
    (p_* \pi_1(\hat X, \hat x)) [\gamma] &\mapsto \hat x. \gamma
  \end{align*}
  Furthermore, the map is equivariant.
\end{lemma}

\begin{proof}
  Suffices to show that the action is transitive and the stabiliser of \(\hat x\) is \(p_* \pi_1(\hat X, \hat x)\). As \(\hat X\) is path-connected there exists a path \(\hat \gamma\) between any two points in \(p^{-1}(x)\), whose image \(\gamma\) under \(p\) is a loop bases at \(x\), and is the only loop whose lift is \(\hat \gamma\) by uniquenss. The stabiliser of \(\hat x\) are precisely the homotopy classes of loops based at \(x\) whose lifts are loops baesd at \(\hat x\), which is precisely \(p_* \pi_1(\hat X, \hat x)\).
\end{proof}

\begin{definition}[universal cover]\index{universal cover}
  If \(p: \tilde X \to X\) is a covering map with \(X\) path-connected and \(\tilde X\) simply connected then \(\tilde X\) is called a \emph{universal cover} of \(X\).
\end{definition}

\begin{corollary}
  If \(p: \tilde X \to X\) is a universal cover and \(p(\tilde x) = x\) then
  \begin{align*}
    \pi_1(X, x) &\to p^{-1}(x) \\
    [\gamma] &\mapsto \tilde x . \gamma
  \end{align*}
  is an equivariant bijection.
\end{corollary}

The map is not only bijective, but also equivariantly so. Thus by looking into the universal cover we can recover information about the fundamental group of the base space.

\begin{eg}[fundamental group of \(S^1\)]
  Consider \(p: \R \to S^1, t \mapsto e^{2\pi it}\) is a covering map. Since \(\R\) is contractible, this is the universal cover so
  \begin{align*}
    \pi_1(S^1, 1) &\to p^{-1}(1) = \Z \\
    [\gamma] &\mapsto 0. \gamma
  \end{align*}
  is a bijection. Therefore we can write down representative loops for each element of \(\pi_1(S^1, 1)\). For \(n \in \Z\), let \(\tilde \gamma_n(t) = nt\) so \(\gamma_n = p \compose \tilde \gamma_n\) is a loop in \(S^1\) based at \(1\). As \([\gamma_n] \mapsto n\), these represent every element of \(\pi_1(S^1, 1)\) uniquely.

  To recover the group structure, note that for any \(m, n \in \Z\), \(m + \tilde \gamma_n\) is the lift of \(\gamma_n\) at \(m\). On the other hand, the endpoint of the lift of \(\gamma_m \cdot \gamma_n\) at \(0\) is \(m + n\), which is the endpoint of \(m + \tilde \gamma_n\). So
  \begin{align*}
    m+n: [\gamma_m \cdot \gamma_n] \mapsto m + n
  \end{align*}
  is a homomorphism. Thus
  \[
    \pi_1(S^1, 1) \cong \Z.
  \]
\end{eg}

\subsection{The fundamental group of \(S^1\)}

\begin{theorem}
  \(\id_{S^1}\) does not extend over \(D^2\), i.e.\ \(S^1\) is not a retract of \(D^2\).
\end{theorem}

\begin{proof}
  Suppose otherwise and \(r: D^2 \to S^1\) is a retraction. Then \(\id_{S^1} = r \compose i\):
  \[
    \begin{tikzcd}
      S^1 \ar[r, "\id"] \ar[dr, "i"'] & S^1 \\
      & D^2 \ar[u, "r"]
    \end{tikzcd}
  \]
  Look at the induced fundamental groups, we have
  \[
    \id_\Z = r_* \compose i_*
  \]
  so
  \[
    \begin{tikzcd}
      \Z \ar[r, "\id"] \ar[dr, "i_*"'] & \Z \\
      & 0 \ar[u, "r_*"]
    \end{tikzcd}
  \]
  Absurd.
\end{proof}

\begin{corollary}[Brouwer fixed point theorem]\index{Brouwer fixed point theorem}
  Every continuous map \(f: D^2 \to D^2\) has a fixed point.
\end{corollary}

\begin{proof}
  If there exists \(f\) such that \(f(x) \neq x\) for all \(x \neq D^2\) then we can construct a continuous retraction \(r: D^2 \to S^1\): for all \(x \in D^2\), let \(r(x)\) be the intersection of the ray from \(f(x)\) to \(x\) with \(S^1\) (well-defined since \(f(x) \neq x\)). It is continuous. As \(r\) fixes \(S^1\) this is a retract.
\end{proof}

\begin{theorem}[fundamental theorem of algebra]
  Every nonconstant polynomial \(p: \C \to \C\) has a root.
\end{theorem}

\begin{proof}[Sketch of proof]
  Suppose \(p(z) = z^d + a_{d - 1} z^{d - 1} + \dots + a_1 z + a_0\) has no root. Then \(p: \C \setminus \{0\} \to \C \setminus \{0\}\). Let
  \begin{align*}
    r: \C \setminus \{0\} &\to S^1 \\
    z &\mapsto \frac{z}{|z|}
  \end{align*}
  be the usual retraction. Let \(\lambda_R(z) = Rz\) for \(R > 0\) and consider \(f_R\) which is the composition
  \[
    \begin{tikzcd}
      S^1 \ar[r, "\lambda_R"] & \C \setminus \{0\} \ar[r, "p"] & \C \setminus \{0\} \ar[r, "r"] & S^1
    \end{tikzcd}
  \]
  as all these maps are homotopic, they induce the same map \(f_*: \Z \to \Z\) which is multiplication by some number \(m\), independent of \(R\). When \(R\) is small, we can argue that \(f_R\) is homotopic to a constant map so \(m = 0\). When \(R\) is large, \(p\) is approximately \(z \mapsto z^d\) so \(m = d\), contradiction.
\end{proof}

\subsection{Existence of universal covers}

\begin{theorem}
  If \(X\) is path-connected and locally simply connected then \(X\) has a universal cover.
\end{theorem}

\begin{proof}[Sketch of proof][non-examinable]
  Let
  \[
    \mathfrak X = \{\gamma: I \to X: \gamma(0) = x_0\}
  \]
  and define \(\tilde X = \mathfrak X /\simeq\), the homotopy classes of paths. Define
  \begin{align*}
    p: \tilde X &\to X \\
    [\gamma] &\mapsto \gamma(1)
  \end{align*}
  The verification is omitted.
\end{proof}

\subsection{The Galois correspondence}

\begin{definition}[covering space isomorphism]\index{covering space isomorphism}
  Let \(X\) be a path-connected topological space and \(p_1: \hat X_1 \to X, p_2: \hat X_2 \to X\) are covering spaces of \(X\). An \emph{isomorphism of covering spaces} is a map \(\varphi: \hat X_1 \to \hat X_2\) such that \(p_2 \compose \varphi = p_1\).

  If \(\hat x_1, \hat x_2\) are bases points and \(\varphi(\hat x_1) = \hat x_2\), we say \(\varphi\) is \emph{based}.
\end{definition}

\begin{remark}
  \(\varphi\) is a lift of \(p_1\) to \(\hat X_2\).
\end{remark}

\begin{theorem}[Galois correspondence with base points]\index{Galois correspondence}
  Let \(X\) be path-connected, locally simply connected space and \(x_0 \in X\). Then there is a bijection between based isomorphism class of path-connected covering space \(p: (\hat X, \hat x_0) \to (X, x_0)\) and subgroups of \(\pi_1(X,x_0)\), given by
  \[
    \hat X \mapsto p_*\pi_1(\hat X, \hat x_0).
  \]
\end{theorem}

\begin{proof}
  Non-examinable and omitted.
\end{proof}

\begin{eg}
  Let \(X = S^1\), we have path-connteced covering space \(p: \R \to S^1, t \mapsto e^{2\pi it}\) and \(p_n: S^1 \to S^1, z \mapsto z^n\). The subgroups of \(\Z\) are precisely \(n\Z\). It is easy to see that \(p\) corresponds to \(0\) and \(p_n\) correponds to \(n\Z\). Galois correspondence then tells us that these are all the path-connected covering space of \(S^1\) up to isomorphism.
\end{eg}

\begin{corollary}
  Let \(X\) be ``reasonable''. Then any two universal covers \(p_1: \tilde X_1 \to X, p_2: \tilde X_2 \to X\) are isomorphic.
\end{corollary}

\begin{proof}
  Exercise.
\end{proof}

%If we insist that the base space is locally simply connected so there exists

\begin{corollary}
  Let \(X\) be path-connected, locally simply connected and \(x_0 \in X\). Then there is a bijection between isomorphism class of path-connected covering space \(p: (\hat X, \hat x_0) \to (X, x_0)\) and subgroups of \(\pi_1(X, x_0)\) modulo conjugation, given by
  \[
    \hat X \mapsto p_*\pi_1(\hat X, \hat x_0).
  \]
\end{corollary}

\begin{proof}
  Surjectivity of the map follows from immediately from the previous theorem. We need to prove that if \(p_{1*}\pi_1(\hat X_1, \hat x_1)\) and \(p_{2*}\pi_1(\hat X_2, \hat x_2)\) are conjugate then \(\hat X_1\) and \(\hat X_2\) are isomorphic covering spaces. So let
  \[
    \label{eq:a}
    p_{1*} \pi_1(\hat X_1, \hat x_1) = [\gamma] p_{2*} \pi_1(\hat X_2, \hat x_2) [\overline \gamma].
    \tag{\ast}
  \]
  Let \(\overline{\hat \gamma}\) be the lift of \(\overline \gamma\) and \(\hat x_2' = \overline{\hat \gamma}(1)\). \eqref{eq:a} then tells us that
  \[
    \p_{1*}\pi_1(\hat X_1, \hat x_1)
    = p_{2*} \hat \gamma_\# \pi_1(\hat X_2, \hat x_2)
    = p_{2*} \pi_1(\hat X_2, \hat x_2').
  \]
  Then by the original Galois correspondence, there is a based isomorphism between \(\hat X_1\) and \(\hat X_2\). Of course they are isomorphic.
\end{proof}

\begin{definition}[covering transformation]\index{covering transformation}\index{deck transformation}
  Let \(p: \hat X \to X\) be a covering space. A \emph{covering transformation} or \emph{deck transformation} \(\hat X \to \hat X\) is a homeomorphism that is also a cover isomorphism.
\end{definition}

\begin{corollary}
  Let \(X\) be ``reasonable'', path-connected and locally simply connected and \(p: \tilde X \to X\) a universal cover. Let \(x_0 \in X\) and \(\tilde x_0 \in p^{-1}(x_0)\). Let \(\tilde x \in p^{-1}(x_0)\). Then there is a unique covering transformation \(\varphi_{\tilde x} : \tilde X \to \tilde X\) such that \(\varphi_{\tilde x}(\tilde x_0) = \tilde x\).
\end{corollary}

\begin{proof}
  Both \((\tilde X, \tilde x_0)\) and \((\tilde X, \tilde x)\) correspond ot the trivial subgroup of \(\pi_1(X, x_0)\) so the result follows from 2.27.
\end{proof}

Now we have two different correspondences:

\blindtext

In fact these are isomorphic. automorphism of universal covers is isomorphic to fundamental group of base group.

We can thus make \(\pi_1(X, x_0)\) act on \(\tilde X\) on the \emph{left} by covering transformation.
\begin{remark}
  Left vs. right action. Abelian group in case of \(S^1\).
\end{remark}

\section{Seifert-van Kampen theorem}

So far we have only seen one space with nontrivial fundamental group. In general, the fundamental groups are notoriously difficult to compute. In this chapter, we will develop the machinery needed to divide and conquer the problem of finding the fundamental group of a complex space. Specifically, given \(X = Y_1 \cup Y_2\), we will ultimate describe \(\pi_1X\) in terms of \(\pi_1Y_1, \pi_1Y_2\) and \(\pi_1(Y_1 \cap Y_2)\). But before that, we have to develop more group theory.

\subsection{Free groups and presentations}

We have seen groups described in the following form in IA Groups:
\[
  D_{2n} = \langle r, s | s^2 = r^n = e, srs = r^{-1} \rangle
\]
where we impose \emph{relations} on the right on the group generated by the \emph{generators} on the left. This is an example of a \emph{presentation}. What should be the group generated by the generators be? Should it, for example, have an elemnet of order 2? Morally, the answer should be ``no'' as we should move all relations to the right. This leaves us with a free group, which is a group with no relation. Given a set \(A\) of generators, called an \emph{alphabet}, \(FA\) is the free group generated by \(A\). Thus a free group has presentation
\[
  FA = \langle a \in A \rangle.
\]
Formally

\begin{definition}[free group]\index{free group}
  A group \(F(A)\) equipped with a map of set \(A \to F(A)\) is the \emph{free group} on \(A\) if it satisfies the following universal property: whenever \(G\) is a group and \(A \to G\) is a set map there is a unique canonical homomorphism \(f: F(A) \to G\) such that
  \[
    \begin{tikzcd}
      F(A) \ar[dr, "f"] \\
      A \ar[u] \ar[r] & G
    \end{tikzcd}
  \]
  commutes.
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(F(\emptyset) \cong 1\).
  \item Let \(A = \{a\}\). If \(A \to G, a \mapsto g\), define \(f: \Z \to G, n \mapsto g^n\). Then the diagram
    \[
      \begin{tikzcd}
        \Z \ar[dr, "f"] \\
        A \ar[u] \ar[r] \ar[r] & G
      \end{tikzcd}
    \]
    commutes. Thus \(\Z\) is the free group on \(A\).
  \end{enumerate}
\end{eg}

\begin{remark}\leavevmode
  \begin{enumerate}
  \item Free group is defined uniquely up to a unique isomorphism: suppose \(A \to F'(A)\) also satisfies the universal property. Take \(G = F'(A)\) in the universal property for \(F(A)\), then there is a canonical homomorphism \(f: F(A) \to F'(A)\) such that
    \[
      \begin{tikzcd}
        F(A) \ar[dr] \\
        A \ar[u] \ar[r] & F'(A)
      \end{tikzcd}
    \]
    commutes. Conversely, take \(G = F(A)\) in the universal property for \(F'(A)\), then there is a canonical homomorphism \(f': F'(A) \to F(A)\) such that the corresponding diagram commutes. Now both \(\id_{F(A)}\) and \(f' \compose f\) both make the diagram commute so by uniqueness \(f' \compose f = \id_{F(A)}\). Likewise \(f \compose f' = \id_{F'(A)}\) so \(f\) and \(f'\) are isomorphisms.
  \item The definition does not guarantee the existence of free groups. We'll cover this later.
  \end{enumerate}
\end{remark}

\begin{notation}
  We identify \(a \in A\) with its image in \(F(A)\).
\end{notation}

\begin{definition}[presentation]\index{presentation}
  Let \(A\) be an \emph{alphabet}. A subset \(R \subseteq F(A)\) defines a \emph{(group) presentation}
  \[
    \langle A | R \rangle = F(A) / \langle \langle R \rangle \rangle
  \]
  where \(\langle\langle R \rangle\rangle\) is the normal closure of \(R\) in \(F(A)\).
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(\langle a | a^n \rangle \cong \Z/n\Z\).
  \item \(\langle r, s | r^n, s^2, srsr \rangle \cong D_{2n}\).
  \end{enumerate}
\end{eg}

\begin{lemma}[universal property of group presentation]
  Given a presentation \(\langle A | R\rangle\) and the quotient map \(q: F(A) \to \langle A | R \rangle\), for any homomorphism \(g: F(A) \to G\) such that \(g(r) = 1\) for all \(r \in R\), there exists a unique homomorphism \(f: \langle A | R \rangle \to G\) such that \(f \compose q = g\). In other words, the following diagram commutes:
  \[
    \begin{tikzcd}
      \langle A | R \rangle \ar[dr, "f"] \\
      F(A) \ar[u, "q"] \ar[r, "g"] & G
    \end{tikzcd}
  \]
\end{lemma}

\begin{proof}
  Follows easily from universal property of quotient map.
\end{proof}

\begin{definition}[pushout]\index{pushout}
  Let \(i: C \to A, j: C \to B\) be group homomorphisms. Homomorphism \(k: A \to \Gamma, \ell: B \to \Gamma\) is a \emph{pushout} if it satisfies the following property: for any group \(G\) and homomorphisms \(f: A \to G, g: B \to G\) such that \(f \compose i = g \compose j\), then there is a unique homomorphism \(\varphi: \Gamma \to G\) such that \(f = \varphi \compose k, g = \varphi \compose \ell\). In other words the following diagram commutes.
  \[
    \begin{tikzcd}
      C \ar[r, "i"] \ar[d, "j"] & A \ar[d, "k"] \ar[ddr, bend left, "f"] \\
      B \ar[r, "\ell"] \ar[drr, bend right, "g"] & \Gamma \ar[dr, "\varphi", dashed] \\
      & & G
    \end{tikzcd}
  \]
\end{definition}

Again \(\Gamma\) is uniquely defined by the universal property.

We mainly care about special cases of the definition.

\begin{definition}[free product, amalgamated free product]\index{free product}\index{free product!amalgamated}
  If \(C \cong 1\), then \(\Gamma\) is called the \emph{free product} of \(A\) and \(B\), denoted \(A * B\).

  More generally, if \(i\) and \(j\) are injective then \(\Gamma\) is called the \emph{amalgamated free product}, denoted \(A *_C B\).
\end{definition}

\begin{eg}
  \(\Z * \Z \cong F_2\) since they satisfy the same universal property. More generally, we can check that
  \[
    \underbrace{\Z * \Z * \dots * \Z}_r \cong F_r.
  \]
\end{eg}

\begin{notation}
  Write \(F_n\) for the free group with \(n\) generators.
\end{notation}

\begin{lemma}
  \[
    \begin{tikzcd}
      C \ar[r, "i"] \ar[d] & A \ar[d] \\
      1 \ar[r] & A /\langle \langle i(C) \rangle\rangle
    \end{tikzcd}
  \]
  is a pushout.
\end{lemma}

\begin{proof}
  \blindtext
\end{proof}

presentation for free group with amalgamation

\subsection{Seifert-van Kampen theorem for wedges}

\begin{definition}[wedge]\index{wedge}
  Given two pointed spaces \((X, x_0), (Y, y_0)\), the \emph{wedge} is
  \[
    X \w Y = X \amalg Y /(x_0 \sim y_0).
  \]
\end{definition}

Usually \(X\) and \(Y\) are path-connected so we can define wedges \(X \w Y\) without specifying basepoints.

\begin{theorem}[Seifert-van Kampen for wedges]\index{Seifert-van Kampen theorem}
  If \(Y_1, Y_2\) are path-connected and \(x_0\) is the wedge point of \(X = Y_1 \w Y_2\). Then
  \[
    \pi_1(X, x_0) = \pi_1(Y_1, x_0) * \pi_1(Y_2, x_0).
  \]
\end{theorem}

\begin{proof}[Sketch of proof]
  non-examinable

  Suppose \(f_1: \pi_1(Y_i, x_0) \to G\) are group homomorphisms for \(i = 1, 2\). We need to find a unique \(\phi: \pi_1(X, x_0) \to G\) such that \(\phi\) restricts to \(f_i\) on \(\pi_1(Y_i, x_0)\).

  First replace \(X\) by \(X'\) (drawing) with \(X \simeq X'\). Let \(\gamma: I \to X'\) be a based loop. We can ``straighten'' \(\gamma\) so that it is of the form
  \[
    \gamma = \alpha_1 \cdot \beta_1 \cdot \alpha_2 \cdot \beta_2 \cdots \alpha_n \cdot \beta_n
  \]
  where \(\alpha_i\)'s are in \(\pi_1(Y_1, x_0)\) and \(\beta_i\)'s are in \(\pi_1(Y_1, x_0)\). Define
  \[
    \phi(\gamma) = f_1(\alpha_1) f_2(\beta_2) f_1(\alpha_2) \cdots f_2(\beta_{n - 1}) f_1(\alpha_n) f_2(\beta_n)
  \]
  uniquely. This is easily seen to be a homomorphism but we need to prove that \(\phi\) is well-defined. Let \(\gamma' \simeq_F \gamma\) with
  \[
    \gamma' = \alpha_1' \cdot \beta_1' \cdots \alpha_m' \beta_m'
  \]
  so
  \[
    \phi(\gamma') = f_1(\alpha_1')f_2(\beta_1') \cdots f_1(\alpha_m') f_2(\beta_m'),
  \]
  we need to prove that \(\phi(\gamma) = \phi(\gamma')\). The key idea is to ``straighten'' \(F\) so that it is ``transverse'' to \(x_0\): this means that \(F^{-1}(x_0) \subseteq I \times I\) consists of a finite union of circles and intervales embedded in \(I \times I\). If there is a cirlce \(S! \subseteq F^{-1}(0)\) then we can ``cut it out'' and remove it. An arc with both endpoints on \(\gamma\) exhibit a subarc \(\delta \subseteq \Gamma\) such that \(\delta \simeq c_{x_0}\) in \(Y_1\) or \(Y_2\), reducing \(n\) without changing \(\phi(\gamma)\). After finitely many of these moves, we are left with a picture of the following form (drawing). Therefore \(m = n\) and \(\alpha_i \simeq \alpha_i', \beta_i \cong \beta_i'\) as paths so \(\phi(\gamma) = \phi(\gamma')\) as required.
\end{proof}

\begin{eg}
  Let \(X = S^1 \w S^1\), then
  \[
    \pi_1 X \cong \pi_1S^1 * \pi_1S^1 \cong \Z * \Z \cong F_2.
  \]
  More generally, let \(X_r = \bigvee_{i = 1}^r S^1\), sometimes called a bouquet, then
  \[
    \pi_1 X_r \cong \underbrace{\Z * \cdot * \Z}_{r} \cong F_r.
  \]
\end{eg}

%find universal cover of X_r

\subsection{Seifert-van Kampen theorem}

\begin{theorem}[Seifert-van Kampen]\index{Seifert-van Kampen}
  If \(X = Y_1 \cup_Z Y_2\) with \(Y_1, Y_2, Z\) open and path-connected and \(x_0 \in Z\) then the diagram
  \[
    \begin{tikzcd}
      \pi_1(Z, x_0) \ar[r, "i_{1*}"] \ar[d, "i_{2*}"] & \pi_1(Y_1, x_0) \ar[d, "j_{1*}"] \\
      \pi_1(Y_2, x_0) \ar[r, "j_{2*}"] & \pi_1(X, x_0)
    \end{tikzcd}
  \]
  is a pushout.
\end{theorem}

\begin{proof}
  Omitted.
\end{proof}

\begin{eg}
  Let \(X = S^n\) where \(n \geq 2\). Let \(x_\pm = (\pm 1, 0, \dots, 0)\) be the north/south poles and define
  \begin{align*}
    U_\pm &= S^n - \{x_\mp\} \\
    V &=  U_+ \cap U_- = S^n - \{x_\pm\}
  \end{align*}
  Then \(X = U_+ \cup_V U_-\). Stereographic projection tells us that \(U_\pm \cong \R^n\). Project \(V\) radially onto the cylinder \((-1, 1) \times S^{n - 1}\), which is a homeomorphism so \(V \cong (-1, 1) \times S^{n - 1} \simeq S^{n - 1}\). \(S^{n - 1}\) is path-connected for \(n \geq 2\) so by Seifert-van Kampen the following diagram is a pushout:
  \[
    \begin{tikzcd}
      \pi_1(S^{n - 1}, x_0) \ar[r] \ar[d] & 1 \ar[d] \\
      1 \ar[r] & \pi_1(S^n, x_0)
    \end{tikzcd}
  \]
  so \(\pi_1(S^n, x_0)\) is a quotient of \(1\) so is trivial.
\end{eg}

\begin{definition}[neighbourhood deformation retract]\index{neighbourhood deformation retract}
  A subset \(Y \subseteq X\) is called a \emph{neighbourhood deformation retract} if there exists \(Y \subseteq V \subseteq X\) where \(V\) is open in \(X\) such that \(Y\) is a deformation rectraction of \(V\).
\end{definition}

\begin{corollary}
  If \(X = Y_1 \cup_Z Y_2\) with \(Y_1, Y_2, Z\) path-connected and closed and \(Z\) a neighbourhood deformation retract of \(Y_1\) and \(Y_2\) and \(x_0 \in Z\) then
  \[
    \begin{tikzcd}
      \pi_1(Z, x_0) \ar[r] \ar[d] & \pi_1(Y_1, x_0) \ar[d] \\
      \pi_1(Y_2, x_0) \ar[r] & \pi_1(X, x_0)
    \end{tikzcd}
  \]
  is a pushout.
\end{corollary}

\begin{proof}
  See online notes.
\end{proof}

\subsection{Attaching cells}

\begin{definition}[cell]\index{cell}
  An \emph{\(n\)-cell} is a copy of \(D^n\), the closed ball in \(\R^n\).
\end{definition}

\begin{definition}
  Let \(\alpha: S^{n - 1} = \partial D^n \to X\) be a continuous map. The space
  \[
    X \cup_\alpha D^n := X \amalg D^n / \sim
  \]
  where \(\sim\) is the finest equivalence relation such that \(\alpha(\theta) \sim \theta\) for all \(\theta \in S^{n - 1}\), is called an \emph{attaching cell}.
\end{definition}

What effect does attaching an \(n\)-cell have on \(\pi_1\)?

Let's start with \(n \geq 3\):

\begin{lemma}
  If \(n \geq 3\) and \(\alpha: S^{n - 1} \to X\) is a continuous map. Let \(x_0 = \alpha(\theta_0)\) for \(\theta_0 \in S^{n - 1}\). Then the (not necessarily injective) inclusion map \(i: X \to X \cup_\alpha D^n\) induces an isomorphism \(i_*: \pi_1(X, x_0) \to \pi_1(X \cup_\alpha D^n, x_0)\).
\end{lemma}

\begin{proof}
  The main obstacle is that \(\alpha\) might not be injective. However, we can divide \(D^n\) into two parts and attach \(D^n\) in two stages: the mapping cylinder of \(\alpha\) is
  \[
    M_\alpha := X \amalg (S^{n - 1} \times I) / \sim
  \]
  where \(\alpha(\theta) \sim (\theta, 0)\) for all \(\theta \in S^{n - 1}\). Note that
  \begin{enumerate}
  \item \(X\) is a deformation retract of \(M_\alpha\).
  \item \(S^{n - 1} \times \{1\} \subseteq M_\alpha\) is a neighbourhood deformation retract.
  \item \(S^{n - 1} \subseteq D^n\) is a neighbourhood deformation retract.
  \end{enumerate}
  If we choose \(\theta_1 \in S^{n - 1}\), the previous corollary tells us that
  \[
    \begin{tikzcd}
      \pi_1(S^{n - 1}, \theta_1) \ar[r] \ar[d] & \pi_1(M_\alpha, \theta_1) \ar[d, "j_*"] \\
      \pi_1(D^n, \theta_1) \ar[r] & \pi_1(M_\alpha \cup_{S^{n - 1}} D^n, \theta_1)
    \end{tikzcd}
  \]
  is a pushout. Therefore the inclusion \(j: M_\alpha \to M_\alpha \cup_{S^{n - 1}} D^n\) induces an isomorphism on \(\pi_1\). Since \(X \cup_\alpha D^n = M_\alpha \cup_{S^{n - 1}} D^n\) and \(M_\alpha'\) deformation retracts to \(X\), the result follows.
\end{proof}

What about \(n = 2\)?

\begin{lemma}
  If \(\alpha: S^1 \to X\) is a continuous map and \(x_0 = \alpha(\theta_0)\) where \(\theta_0 \in S^1\). Then
  \[
    \pi_1(X \cup_\alpha D^2, \theta_0) \cong \pi_1(X, x_0) / \langle\langle [\alpha] \rangle\rangle
  \]
  and the inclusion map \(X \embed X \bigcap_\alpha D^2\) induces the quotient map
  \[
    \pi_1(X, x_0) \to \pi_1(X \cup_\alpha D^2, x_0).
  \]
\end{lemma}

\begin{proof}
  As in the proof of the previous lemma, the diagram
  \[
    \begin{tikzcd}
      \pi_1(S^1, \theta_0) \ar[r, "\alpha_*"] \ar[d] & \pi_1(X, x_0) \ar[d, "i_*"] \\
      \pi_1(D^2, \theta_0) \ar[r] & \pi_1(X \cup_\alpha D^2, x_0)
    \end{tikzcd}
  \]
  is a pushout. By lemma 3.2 the result follows.
\end{proof}

\begin{theorem}
  If \(G = \langle A | R \rangle\) with \(A, R\) both finite then it is the fundamental group of some space. Moreover the spaces can be taken to be compact.
\end{theorem}

In fact, we don't have to restrict our attention to finitely generated or finitely presented groups. So every group is the fundamental group of some space (although not compact in general).

\begin{proof}
  If \(R = \{r_1, \dots r_n\}\) then
  \begin{align*}
    G &= F(A) / \langle\langle r_1, \dots, r_n \rangle\rangle \\
      &\cong (F(A) / \langle\langle r_1, \dots, r_{n - 1} \rangle\rangle) / \langle\langle r_n \rangle\rangle \\
      &\cong \dots \\
      &\cong (\dots (F(A)/ \langle \langle r_1 \rangle\rangle) \dots ) / \langle\langle r_n \rangle\rangle,
  \end{align*}
  one way to check this is to show they satisfy the same universal property. Now induciton on \(n\), with the base case \(n = 1\) being the wedge of \(|A|\) circles.
\end{proof}

\subsection{Classification of surfaces}

\begin{definition}[topological manifold]\index{topological manifold}
  An \emph{\(n\)-dimensional (topological) manifold} is a Hausdorff space \(M\) such that every \(x \in M\) has an open neighbourhood \(U\) homeomorphic to an open subset of \(\R^n\).
\end{definition}

\begin{definition}[surface]\index{surface}
  A \(2\)-dimensional manifold is called a \emph{surface}.
\end{definition}

\begin{eg}
  Let \(\alpha: S^1 \to *\). Consider \(X = * \cup_\alpha D^2\). Note that \(\int D^2 \cong \R^2\) and \(S^2 - \{x_+\} \cong \R^2\) via stereographic projection. Moreover the homeomorphism \(i: \int D^2 \to S^1 - \{x_+\}\) extends to a unique continuous bijection \(X \to S^2\), so a homeomorphism. In particular \(S^2\) is a surface.
\end{eg}

\begin{eg}
  Let \(\Gamma_{2g} = \bigvee_{i = 1}^{2g} S_i^1\), with each \(S_i' \cong S^1\). Choose unit speed loops \(\alpha_1, \dots, \alpha_g\) and \(\beta_1, \dots, \beta_g\) in the circles. Let
  \[
    \rho_g = (\alpha_1 \cdot \beta_1 \cdot \overline \alpha_1 \cdot \overline \beta_1) \cdot (\alpha_2 \cdot \beta_2 \cdot \overline \alpha_2 \cdot \overline \beta_2) \dots (\alpha_g \cdot \beta_g \cdot \overline \alpha_g \cdot \overline \beta_g)
  \]
  and let
  \[
    \Sigma_g = \Gamma_{2g} \cup_{\rho_g} D^2.
  \]
  Claim \(\Sigma_g\) is a surface. There are three cases to consider. If a point in the interior of \(D^2\) then it has a neighbourhood homeomorphic to an open disk. If a point is in the interior of image of a path the ``two parts'' glue together to form an open disk. Similary all the edges are identified together.

  \(\Sigma_0\) is just \(S^2\). \(\Sigma_1\) is the square with two sides identified to a torus. In general \(\Sigma_g\) is called the (orientable surface) with genus \(g\).
\end{eg}

\begin{eg}
  Let \(\Gamma_{g + 1} = \bigvee_{i = 0}^g S_i^1\) and let
  \[
    \sigma_j = \alpha_0 \cdot \alpha_0 \cdot \alpha_1 \cdot \alpha_1 \dots \alpha_g \cdot \alpha_g
  \]
  let
  \[
    S_g = \Gamma_{g + 1} \cup_{\sigma_g} D^2.
  \]
  Similarly we can check these are surfaces. This is the \emph{non-orientable surface} of genus \(g\). \(S_0 = \R P^2\) and \(S_1\) is the Klein bottle.

  We have
  \begin{align*}
    \pi_1 \Sigma_g &= \langle a_1, \dots, a_g, b_1, \dots, b_g | a_1b_1a_1^{-1}b_1^{-1} \cdots a_gb_ga_g^{-1}b_g^{-1}\rangle \\
    \pi_1 S_g &= \langle a_0, \dots, a_g | a_0^2 a_1^2 \cdots a_g^2 \rangle
  \end{align*}
\end{eg}

We state without proof

\begin{theorem}[classification of compact surfaces]\index{classification of compact surfaces}
  If \(M\) is a compact surface then either \(M \cong \Sigma_g\) or \(M \cong S_g\).
\end{theorem}

We won't prove this but a good point to start is to consider given an identification of \(S^1\) of \(D^2\), how can we convert it into one of the two forms?

We also ask the following question: are \(\{\Sigma_g\}\) and \(\{S_g\}\) pairwise non-homeomorphic? What about homotopy equivalence? The only tool available to us is \(\pi_1\). The strategy is to that the fundamental groups map onto different abelian groups. % abelianisation

\begin{lemma}
  Let \(g \in \N\).
  \begin{enumerate}
  \item The group \(\pi_1 \Sigma_g\) surjects \(\Z^{2g}\) but not \(\Z^{2g} \oplus (\Z/(2))\).
  \item The group \(\pi_1 S_g\) surjects \(\Z^g \oplus (\Z/(2))\) but not \(\Z^{g + 1}\).
  \end{enumerate}
\end{lemma}

\begin{proof}
  Easy. See notes.
\end{proof}

And as a result we get want we want

\begin{corollary}
  The strategy works.
\end{corollary}

\section{Simplicial complexes}

We have seen that the fundamental groups are useful, and for example, when it works, it tells us \(S^n\) is contractible for \(n > 1\). There are higher dimensional analogues of \(\pi_1\), called the \emph{homotopy groups} \(\pi_n\). However, they are notoriously difficult to compute. Instead, we will use (more or less) the only thing in mathematics we understand fully (again, more or less) --- linear algebra. This is called \emph{homology}.

There are many types of homologies and we'll only define \emph{simplicial homologies} in this course.

\subsection{Simplices and stuff}

\begin{definition}
  A finite set \(V \subseteq \R^n\) is in \emph{general position} if the smallest affine subspace containing \(V\) is of dimension \(|V| - 1\).
\end{definition}

This is quite an abstract definition, but there are a few equivalent notions. For example, if \(V = \{v_0, \dots, v_n\}\) then for any \(t_0, \dots t_n\) such that \(\sum_{i = 0}^n t_i = 0\), if \(\sum_{i = 0}^n t_iv_i = 0\) then \(t_i = 0\) for all \(i\).

\begin{definition}[simplex]\index{simplex}
  For \(n \geq 0, V = \{v_0, \dots, v_n\} \subseteq \R^m\). The \emph{span} of \(V\) is
  \[
    \langle V \rangle = \{\sum_{i = 0}^n t_iv_i: t_i \geq 0, \sum_{i = 0}^n t_i = 1\}.
  \]

  If \(V\) is in general position, \(\sigma = \langle V \rangle\) is an \emph{\(n\)-simplex}.
\end{definition}

\begin{definition}[face]\index{face}
  Let \(V = \{v_0, \dots, v_n\}\) in general position. If \(U \subseteq V\) then \(\langle U \rangle\) is called a \emph{face} of \(\langle V\rangle\), write \(\langle U \rangle \leq \langle V \rangle\).

  If \(U \neq V\) then \(\langle U\rangle\) is called a \emph{proper} face.
\end{definition}

\begin{definition}[simplicial complex, dimension, skeleton]\index{simplicial complex}\index{dimension}\index{skeleton}
  A \emph{simplicial complex} is a finite set of simplices \(K\) in some \(\R^m\) satisfying the following condition:
  \begin{enumerate}
  \item if \(\sigma \in K\) and \(\tau \leq \sigma\) then \(\tau \in K\),
  \item if \(\sigma, \tau \in K\) then \(\sigma \cap \tau \leq \sigma\) and \(\sigma \cap \tau \leq \tau\).
  \end{enumerate}

  The \emph{dimension} of \(K\), denoted \(\dim K\), is the largest \(n\) such that \(K\) contains an \(n\)-simplex.

  The \emph{\(d\)-skeleton} of \(K\) is
  \[
    K_{(d)} = \{\sigma \in K: \dim \sigma \leq d\}.
  \]
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item If \(\sigma\) is a simplex then \(K = \{\tau: \tau \leq \sigma\}\) is a simplicial complex.
  \item If \(\sigma\) is a simplex then the set of proper faces of \(\sigma\), denoted \(\b \sigma\), is a simplicial complex. It is called the \emph{boundary}\index{boundary} of \(\sigma\). The set of points in \(\sigma\) not in a simplex of \(\b \sigma\) is called the \emph{interior}, denoted by \(\interior \sigma\).
  \end{enumerate}
\end{eg}

Note that if \(\sigma\) is a \(0\)-simplex then \(\interior \sigma = \sigma\).

\begin{definition}[realisation/polyhedron]\index{realisation}\index{polyhedron}
  The \emph{realisation} or \emph{polyhedron} of a simplicial complex \(K\) is the union of the simplices in \(K\), denoted by \(|K|\).
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item In \(\R^{n + 1}\), the standard basis \(\{e_0, \dots e_n\}\) is in general position. The simplex it spans \(\sigma_n = \langle e_0, \dots, e_n\rangle\) is called the \emph{standard \(n\)-simplex}.
  \item The \emph{standard (simplicial) \((n - 1)\)-sphere} is \(\b \sigma_n\).
  \end{enumerate}
\end{eg}

\begin{definition}[triangulation]\index{triangulation}
  A \emph{triangulation} of a space \(X\) is a homeomorphism \(h: |K| \to X\).
\end{definition}

It's not hard to see that there is a triangulation \(h: |\b \sigma_n| \to S^{n - 1}\).

\begin{eg}
  Here is another way of triangulating \(S^n\). For now set \(n = 2\). The convex hull of \(\{\pm e_0, \pm e_1, \pm e_2\}\) is a surface of an octahedron, which is triangulation of \(S^2\). In general, let \(\{e_0, \dots, e_n\}\) be the standard basis for \(\R^{n + 1}\) and \(E = \{\pm e_0, \dots, \pm e_n\}\). Let
  \[
    E_0 = \{S \subseteq E: \text{ for all \(i\) exactly one of \(\pm e_i\) is in } S\}.
  \]
  Let \(K = \{\langle S \rangle: S \in E_0\}\). This is the \emph{octahedral \(n\)-sphere} and there exists a triangulation \(|K| \to S^n\).
\end{eg}

\begin{definition}[simplicial map]\index{simplicial map}\index{simplicial map!realisation}
  Let \(K, L\) be simplicial complexes. A \emph{simplicial map} \(f: K \to L\) is a map such that for all \(\langle v_0, \dots, v_n \rangle \in K\),
  \[
    f(\langle v_0, \dots, v_n \rangle) = \langle f(v_0), \dots, f(v_n) \rangle
  \]
  where \(f(\{v_i\}) = \{f(v_i)\}\).

  The \emph{realisation} of \(f: K \to L\) is the continuous map \(|f|: |K| \to |L|\) defined on \(\sigma = \langle v_0 , \dots, v_n \rangle\) to be
  \[
    f_\sigma \left( \sum_{i = 0}^n t_iv_i \right) = \sum_{i = 0}^n t_i f(v_i).
  \]
\end{definition}

Note that if \(\tau \leq \sigma\) then \(f_\tau = f_\sigma|_\tau\), so \(|f|\) is well-defined and continuous.
\begin{eg}
  (drawing)
\end{eg}

\subsection{Barycentric subdivision}

Realisaition of simplicial maps are piecewise linear and thus very rigid. On the other hand, the realisations of simplicial complexes, as topological spaces, are ``deformable''. Is every continuous map \(|K| \to |L|\) homotopic to a realisation of a simplicial map? For example for \(K = L = \b \sigma_2\), there are infinitely many homotopy classes of continuous maps, which are in bijection with \(\pi_1(S^1)\). On the other hand there are only finitely many simplicial map \(K \to L\), and thus at most that many realisations. To establish the correspondence, we need subdivision.

\begin{definition}[barycentre]\index{barycentre}
  If \(\sigma = \langle v_0, \dots, v_n \rangle\), the \emph{barycentre} of \(\sigma\) is
  \[
    \hat \sigma_n = \frac{1}{n + 1} \sum_{i = 0}^n v_i.
  \]
\end{definition}

\begin{definition}[barycentric subdivision]\index{barycentric subdivision}
  Suppose \(K\) is a simplicial complex. The \emph{barycentric subdivision} of \(K\) is \(K'\) with vertices \(\{\hat \sigma: \sigma \in K\}\). A collection of barycentres \(\{\hat \sigma_0, \dots, \hat \sigma_n\}\) spans a simplex in \(K'\) whenever \(\sigma_0 \leq \sigma_1 \leq \dots \leq \sigma_n\).
\end{definition}

\begin{lemma}
  \(K'\) is a simplicial complex and \(|K'| = |K|\).
\end{lemma}

\begin{proof}
  See online notes.
\end{proof}

\begin{definition}
  We define the \(r\)th barycentric subdivision to be
  \begin{align*}
    K^{(0)} &= K \\
    K^{(r)} &= (K^{(r - 1)})'
  \end{align*}
\end{definition}

\begin{definition}[mesh]\index{mesh}
  Let \(K\) be a simplicial complex. define the \emph{mesh} of \(K\) to be
  \[
    \mesh(K) = \max_{\langle v_0, v_1 \rangle \in K} \norm{v_0 - v_1}_2.
  \]
\end{definition}

Here the \(2\)-norm is just taken for the sake of convenience and concreteness.

\begin{lemma}
  If \(\dim K = n\) then
  \[
    \mesh(K^{(r)}) \leq \left(\frac{n}{n + 1}\right)^r \mesh(K).
  \]
  In particular
  \[
    \lim_{r \to \infty} \mesh(K^{(r)}) = 0.
  \]
\end{lemma}

\begin{proof}
  \(\dim K' = \dim K = n\) so by induction it suffices to show that
  \[
    \mesh(K') \leq \frac{n}{n + 1} \mesh(K).
  \]
  A \(1\)-simplex in \(K'\) is of the form \(\langle \hat \tau, \hat \sigma \rangle\) where \(\tau \leq \sigma\). Note that \(K'\) is a finite set and mesh is realised by some pairs of vertices. By a bit geometric reasoning this is achieved by some vertex. We may thus assume that \(\hat \tau = v_0\), a vertex of \(\sigma = \langle v_0, \dots, v_m\rangle\). Thus
  \begin{align*}
    \norm{\hat \tau - \hat \sigma}
    &= \norm*{v_0 - \frac{1}{m + 1} \sum_{i = 0}^m v_i} \\
    &= \norm*{\frac{m}{m + 1} v_0 - \frac{1}{m + 1} \sum_{i = 1}^m v_i} \\
    &= \frac{1}{m + 1} \norm*{\sum_{i = 1}^m (v_0 - v_i)} \\
    &\leq \frac{1}{m + 1} \sum_{i = 1}^m{v_0 - v_1} \\
    &\leq \frac{m}{m + 1} \mesh(K) \\
    &\leq \frac{n}{n + 1} \mesh (K)
  \end{align*}
\end{proof}

\subsection{Simplicial approximation theorem}

\begin{definition}[star]\index{star}
  Let \(v\) be a vertex of \(K\). The \emph{star} of \(v\) is
  \[
    \St_K(v) = \bigcup_{v \in \sigma \in K} \interior \sigma
  \]
\end{definition}

\begin{definition}[simplicial approximation]\index{simplicial approximation}
  Let \(\phi: |K| \to |L|\) be a continuous map. A simplicial map \(f: K \to L\) is a \emph{simplicial approximation} of \(\phi\) if for every vertex \(v\) of \(K\),
  \[
    \phi(\St_K(v)) \subseteq \St_L(f(v)).
  \]
\end{definition}

\begin{lemma}
  If \(f: K \to L\) is a simplicial approximation to \(\phi: |K| \to |L|\) then \(|f| \simeq \phi\).
\end{lemma}

\begin{proof}
  Suppose \(|L| \subseteq \R^m\) as usual. Consider the straightline homotopy \(H\) between \(|f|\) and \(\varphi\). We will prove that \(H\) stays inside \(|L|\). Let \(x \in \interior \sigma\) and let \(\phi(x) \in \interior \tau\). We'll show that \(f(\sigma) \leq \tau\). The result then follows because \(\tau\) is a convex subset of \(R^m\).

  Let \(\sigma = \langle v_0, \dots, v_n \rangle\). For each \(i\), \(x \in \St_K(v_i)\) so
  \[
    \phi(x) \in \phi(\St_K(v_i)) \subseteq \St_L(f(v_i))
  \]
  so \(f(v_i)\) is a vertex of \(\tau\). So \(f(\sigma) \tau\) as desired.
\end{proof}

\begin{theorem}[simplicial approximation theorem]\index{simplicial approximation theorem}
  Let \(K, L\) be simplicial complexes and \(\phi: |K| \to |L|\) a continuous map. For some \(r \in \N\) there is a implicial approximation to \(\phi\), \(f: K^{(r)} \to L\).
\end{theorem}

\begin{proof}
  Let
  \[
    U = \{\phi^{-1}(\St_L(u)): u \text{ a vertex of } L\}
  \]
  which is an open cover of \(|K|\). By Lebesgue number lemma there is \(\delta > 0\) such that for all \(x \in |K|\), there exists a vertex of \(L\) such that
  \[
    B(x, \delta) \subseteq \phi^{-1}(\St_L(u)).
  \]
  Choose \(r\) large enough such that \(\mesh(K^{(r)}) < \delta\). Then for any vertex \(v\) of \(K^{(r)}\),
  \[
    \St_{K^{(r)}}(v) \subseteq B(v, \delta) \subseteq \phi^{-1}(\St_L(u))
  \]
  for some \(u\). Set \(f(v) = u\) for some such \(u\). Left to check this is a simplicial map, i.e.\ for all \(\sigma \in K^{(r)}, f(\sigma) \in L\). But as in the proof of the previous lemma, if \(x \in \interior \sigma\) and \(\phi(x) \in \interior \tau\) then \(f(\sigma)\) must be a face of \(\tau\).
\end{proof}

\section{Homology}

\subsection{Simplicial homology}

The analogue in simplices of a path is a \emph{chain}, which is a formal sum of simplices. If we interpret positive coefficient as copies of a simplex, what does it mean to have a negative simplex? To make sense of this we need the notion of \emph{oriented simplex}.

\begin{definition}[orientation]\index{orientation}
  Let \(V = (v_0, \dots, v_n)\) be an ordered set of points in general position in \(\R^M\). Consider the natural action of \(S_{n + 1}\) on \(V\). The subgroup \(A_{n + 1} \leq S_{n + 1}\) has 2 orbits on \(V\), as long as \(n \geq 1\). An \emph{orientation} on \(\sigma = \langle V \rangle\) is a choice of \(A_{n + 1}\)-orbit under the action on \(V\).

  We will abuse notation and write \(\langle v_0, \dots, v_n \rangle\) for the simplex \(\langle v_0, \dots, v_n \rangle\) equipped with the orientation which is the \(A_{n + 1}\)-orbit of \((v_0, \dots, v_n)\).
\end{definition}

\begin{eg}
  Let \(V = \{v_0, v_1\}\). The two possible orientations are \(\langle v_0, v_1 \rangle\) and \(\langle v_1, v_0\rangle\), which corresponds to ``arrows going in opposite directions''.
\end{eg}

\begin{eg}
  Let \(V = \{v_0, v_1, v_2\}\). There are two orientations, for exmaple \(\langle v_0, v_1, v_2 \rangle\) and \(\langle v_2, v_1, v_0 \rangle\) are two representatives.
\end{eg}

\begin{definition}[chain]\index{chain}
  Let \(K\) be a simplicial complex. The group of \emph{\(n\)-chains} on \(K\) is
  \[
    C_n(K) = \bigoplus_{\sigma \in K, \dim \sigma = n} \langle \sigma \rangle.
  \]
\end{definition}

In particular if there are no \(n\)-simplex (e.g.\ \(n > \dim K\) or \(n < 0\)) then \(C_n(K) \cong 0\). Arbitrarily choose orientations on the simplices of \(K\) and then identify \(-\sigma\) with the opposite oriented simplex. Note that this arbitrary choice isn't important --- it could be realised by an automorphism of \(C_n(K)\).

\begin{remark}
  Note that these groups are abelian, which is a huge advantage compared to homotopy groups if you actually want to do anything with them. On the other hand, it also means that there are things that a homotopy group can see but homology groups cannot.
\end{remark}

\begin{definition}[boundary homomorphism]\index{boundary homomorphism}
  The \emph{(\(n\)th) boundary homomorphism} \(\b_n\), usually just written as \(\b\), is defined by
  \begin{align*}
    C_n(K) &\to C_{n - 1}(K) \\
    \langle v_0, \dots, v_n \rangle &\mapsto \sum_{i = 0}^n (-1)^i \langle v_0, \dots, \hat v_i, \dots, v_n \rangle
  \end{align*}
  where \(\hat v_i\) means that the vertex \(v_i\) is omitted.
\end{definition}

Note this is well-defined.

\begin{eg}
  Let \(\sigma = \langle v_0, v_1 \rangle\). Then \(\b(\sigma) = \langle v_1 \rangle - \langle v_0 \rangle\).
\end{eg}

\begin{eg}
  Let \(\sigma = \langle v_0, v_1, v_2 \rangle\). Then
  \begin{align*}
    \b(\sigma)
    &= \langle v_1, v_2 \rangle - \langle v_0, v_2 \rangle + \langle v_0, v_1 \rangle \\
    &= \langle v_1, v_2 \rangle + \langle v_2, v_0 \rangle + \langle v_0, v_1 \rangle
  \end{align*}
\end{eg}

\begin{definition}[cycle, boundary]\index{cycle}\index{boundary}
  Let \(n \in \Z\). The group
  \[
    Z_n(K) = \ker \b_n \leq C_n(K)
  \]
  is the group of \emph{\(n\)-cycles}.

  The group
  \[
    B_n(K) = \im \b_{n + 1} \leq C_n(K)
  \]
  is the group of \emph{\(n\)-boundaries}.
\end{definition}

These are analogous to loops and homotopies respectively.

\begin{lemma}
  Every \(n\)-boundary is an \(n\)-cycle, i.e.
  \[
    B_n(K) \leq Z_n(K),
  \]
  i.e.
  \[
    \b_n \compose \b_{n + 1} = 0.
  \]
\end{lemma}

\begin{proof}
  Let \(\sigma = \langle v_0, \dots, v_n \rangle\). By definition
  \[
    \b(\sigma) = \sum_{i = 0}^n (-1)^i \langle v_0, \dots, \hat v_i, \dots, v_n \rangle
  \]
  so
  \begin{align*}
    \b \compose \b(\sigma)
    &= \sum_{i, j < i} (-1)^i (-1)^j \langle v_0, \dots, \hat v_j, \dots, \hat v_i, \dots, v_n \rangle \\
    &\quad+ \sum_{i, j > i} (-1)^i (-1)^{j - 1} \langle v_0, \dots, v_i, \dots, v_j, \dots, v_n \rangle \\
    &= \sum_{i, j < i} (-1)^{i + j} \langle v_0, \dots, \hat v_j, \dots, \hat v_i, \dots v_n \rangle \\
    &\quad- \sum_{i, j > i} (-1)^{i + j} \langle v_0, \dots, \hat v_i, \dots, \hat v_j, \dots, v_n \rangle
  \end{align*}
\end{proof}

\begin{definition}[homology group]\index{homology group}
  The \emph{\(n\)th homology group} of \(K\) is
  \[
    H_n(K) = Z_n(K) / B_n(K).
  \]
\end{definition}

\begin{remark}
  The homology we discuss in this course is simplicial homology, which has the advanatage that all the homology groups are finitely generated. Thus in principle, \(H_n(K)\) can always be computed using linear algebra. But except in the following few demonstrative examples, as a man of culture you should avoid it as much as possible.
\end{remark}

\begin{eg}
  Let \(K\) be the standard simplicial circle. The vertices of \(K\) are \(e_0, e_1, e_2\). Thus
  \begin{align*}
    C_0(K) &= \langle e_0 \rangle \oplus \langle e_1 \rangle \oplus \langle e_2 \rangle \cong \Z^3 \\
    C_1(K) &= \langle e_0, e_1 \rangle \oplus \langle e_1, e_2 \rangle \oplus \langle e_2, e_0 \rangle \cong \Z^3 \\
    C_n(K) &= 0 \text{ for } n > 1
  \end{align*}
  There is only one interesting boundary map \(\b = \b_1: C_1(K) \to C_0(K)\). Looking at the definitions, we can write down a matrix for \(\b\), in the bases we choose
  \[
    \begin{pmatrix}
      -1 & 0 & 1 \\
      1 & -1 & 0 \\
      0 & 1 & -1
    \end{pmatrix}
  \]
  After a bit of work we can put in Smith normal form
  \[
    \begin{pmatrix}
      1 & 0 & 0 \\
      0 & 1 & 0 \\
      0 & 0 & 0
    \end{pmatrix}
  \]
  so \(\im \b_1 \cong \Z^2\) (as a direct summand). \(\ker \b_1 \cong \Z\). Thus
  \begin{align*}
    H_0(K) &= Z_0(K)/B_0(K) = C_0(K)/\im \b_1 \cong \Z^3 / \Z^2 \cong \Z \\
    H_1(K) &= Z_1(K)/B_1(K) = \ker \b_1/0 \cong \Z \\
    H_n(K) &= 0 \text{ for } n > 1
  \end{align*}
  The fact that \(H_1(K) \cong Z\) is related to intuitive observation that there is a ``hole'' in the simplicial complex. Contrast this with the next example. (We'll interpret \(H_0(K)\) shortly)
\end{eg}

\begin{eg}
  Let \(L\) be the standard \(2\)-simplex \(K \cup \{\sigma_2\}\) where \(\sigma_2 = \langle e_0, e_1, e_2 \rangle\). We have (nontrivial) chain groups
  \begin{align*}
    C_0(L) &= C_0(K) \\
    C_1(L) &= C_1(K) \\
    C_2(L) &= \langle \sigma_2 \rangle
  \end{align*}
  The boundary map \(\b_1\) is same as before and for \(\b_2\), which is
  \[
    \b_2(\sigma_2) = \langle e_0, e_1 \rangle + \langle e_1, e_2 \rangle + \langle e_2, e_0 \rangle
  \]
  which has a particularly simple matrix \((1, 1, 1)\). In particular \(\b_2\) is injective so \(\ker \b_2 = 0\). We know \(\im \b_2 \subseteq \ker \b_1 \cong Z\). But we can see that \(\im \b_2\) is a direct summand of \(C_1(L)\) so \(\im \b_2 = \ker \b_1\). Thus the homology groups are
  \begin{align*}
    H_0(L) &= H_0(K) \cong \Z \\
    H_1(L) &= Z_1(L)/B_1(L) = \ker \b_1/\im \b_2 \cong 0 \\
    H_2(L) &= Z_2(L)/B_2(L) = \ker \b_2/0 \cong 0
  \end{align*}
  Alas! The first homology group has been killed.
\end{eg}

\begin{lemma}
  Let \(K\) be a simplicial complex. If \(d\) is the number of path components of \(|K|\) then
  \[
    H_0(K) \cong \Z^d.
  \]
\end{lemma}

\begin{proof}
  Let \(\pi_0(K)\) be the set of path components of \(|K|\). Let \(\Z[\pi_0(K)] \cong \Z^{|\pi_0(K)|}\) be the free abelian group generated by \(\pi_0(K)\). There is a natural map
  \begin{align*}
    q: C_0(K) &\to \Z[\pi_0(K)] \\
    \langle v\rangle &\mapsto [v]
  \end{align*}
  Because there is a vertex in every component of \(|K|\), \(q\) is surjective. Note that \(B_0(K) \subseteq \ker q\): \(B_0(K)\) is generated by elements \(\langle v \rangle - \langle u \rangle\) where \(\langle u, v \rangle\) is a \(1\)-simplex of \(K\). Since \(\langle u\rangle\) and \(\langle v\rangle\) are in the same path component, \(q(\langle v \rangle - \langle u\rangle) = 0\) so indeed \(B_0(K) \subseteq \ker q\).

  Because \(H_0(K) = Z_0(K)/B_0(K) = C_0(K)/B_0(K)\), \(q\) descends to a map
  \[
    H_0(K) \to \Z[\pi_0(K)].
  \]
  Left to check this is injective, i.e.\ \(\ker q \subseteq B_0(K)\). Note that \(\ker q\) is generated by terms of the form \(\langle v \rangle - \langle u\rangle\) where \([u] = [v]\). By simplicial approximation, there exists a ``simplicial path'' from \(u\) to \(v\)
  \[
    c = \langle v_0, v_1 \rangle + \langle v_1, v_2 \rangle + \dots + \langle v_{k - 1}, v_k\rangle
  \]
  where \(v_0 = u, v_k = v\). But \(\b_1(c) = \langle v \rangle - \langle u \rangle \in B_0(K)\) as required.
\end{proof}

\subsection{Chain complexes \& chain homotopies}

\begin{definition}[chain complex]\index{chain complex}
  A \emph{chain complex} \(C_\bullet\) is a sequence of abelian groups \((C_n)_{n \in \Z}\) with \(C_n = 0\) for \(n < 0\) and \emph{boundary homomorphisms} \(\b_n: C_n \to C_{n - 1}\) such that
  \[
    \b_{n - 1} \compose \b_n = 0
  \]
  for all \(n\).

  A \emph{chain map} \(f_\bullet: C_\bullet \to D_\bullet\) is a sequence of homomorphisms \(f_n: C_n \to D_n\) such that the following diagram commutes for all \(n\):
  \[
    \begin{tikzcd}
      C_n \ar[r, "f_n"] \ar[d, "\b_n"] & D_n \ar[d, "\b_n"] \\
      C_{n - 1} \ar[r, "f_{n - 1}"] & D_{n - 1}
    \end{tikzcd}
  \]
\end{definition}

\begin{note}
  Note that we suppress the notational distinction between the boundary homomorphisms of \(C_\bullet\) and \(D_\bullet\). This is a common practice as they have different domains and there is little room for confusion.
\end{note}

\begin{definition}[boundary, cycle, homology]\index{boundary}\index{cycle}\index{homology}
  If \(C_\bullet\) is a chain complex, then define \emph{boundaries} \(B_n\) and \emph{cycles} \(Z_n\)
  \begin{align*}
    B_n(C_\bullet) &= \im \b_{n + 1} \leq C_n \\
    Z_n(C_\bullet) &= \ker \b_n \leq C_n
  \end{align*}

  The \emph{\(n\)th homology} is defined as
  \[
    H_n(C_\bullet) = Z_n(C_\bullet) / B_n(C_\bullet).
  \]
\end{definition}

\begin{lemma}
  A chain map \(f_\bullet: C_\bullet \to D_\bullet\) induces a well-defined homomorphism
  \[
    f_*: H_n(C_\bullet) \to H_n(D_\bullet)
  \]
  for all \(n\).
\end{lemma}

\begin{proof}
  Trivial from commutativity of \(\b\) and \(f_n\).
\end{proof}

\begin{eg}
  If \(K\) is a simplicial complex then \((C_n)_{n \in \Z}\) form a chain complex \(C_\bullet(K)\).
\end{eg}

\begin{lemma}
  A simplicial map \(f: K \to L\) induces a chain map \(f_\bullet: C_\bullet(K) \to C_\bullet(L)\) by
  \begin{align*}
    f_n: C_n &\to D_n \\
    \sigma &\mapsto
             \begin{cases}
               f(\sigma) & \text{ if } \dim f(\sigma) = \dim \sigma \\
               0 & \text{ if } \dim f(\sigma) < \dim \sigma
             \end{cases}
  \end{align*}
  Therefore \(f\) induces homomorphisms \(f_*: H_n(K) \to H_n(L)\).
\end{lemma}

In other words, \(f_n\) does exactly what you would expect, and it simply forgets simplices that are ``crushed down''.

\begin{proof}
  Easy verification. See online notes for details.
\end{proof}

\begin{eg}
  Retraction of a standard \(2\)-simplex \(K\) to standard \(1\)-simplex \(L\).
\end{eg}

\begin{remark}
  The map is functorial, i.e.\ given simplicial maps \(K \xrightarrow{f} L \xrightarrow{g} M\), \((g \compose f)_* = g_* \compose f_*\). In addition \((\id_K)_* = \id_{H_n(K)}\).
\end{remark}

\begin{definition}[chain homotopy]\index{chain homotopy}
  Let \(f_\bullet, g_\bullet: C_\bullet \to D_\bullet\) be chain maps. A \emph{chain homotopy} \(h_\bullet\) between \(f_\bullet\) and \(g_\bullet\) is a sequence of homomorphisms \(h_n: C_n \to D_{n + 1}\) such that
  \[
    g_n - f_n = \b_{n + 1} \compose h_n + h_{n - 1} \compose \b_n
  \]
  for all \(n\). Write \(f_\bullet \simeq g_\bullet\) or \(f_\bullet \simeq_{h_\bullet} g_\bullet\).
\end{definition}

\begin{lemma}
  If \(f_\bullet \simeq g_\bullet: C_\bullet \to D_\bullet\) then
  \[
    f_* = g_*: H_n(C_\bullet) \to H_n(D_\bullet)
  \]
  for all \(n\).
\end{lemma}

\begin{proof}
  Consider \([c] \in H_n(C_\bullet)\) so \(c \in Z_n(C_\bullet) = \ker \b_n\). Then
  \[
    g_n(c) - f_n(c) = \b_{n + 1} \compose h_n(c) + \underbrace{h_{n - 1} \compose \b_n(c)}_{= 0} \in B_n(D_\bullet)
  \]
  so
  \[
    [g_n(c)] = [f_n(c)]
  \]
  so \(f_* = g_*\) as claimed.
\end{proof}

\begin{eg}
  Continuation of the previous example.
\end{eg}

\begin{definition}[cone]\index{cone}
  A simplicial complex \(K\) is a \emph{cone} if there is a vertex \(x_0\) such that for every \(\tau \in K\) there exists \(\sigma \in K\) such that \(x_0 \in \sigma\) and \(\tau \leq \sigma\).
\end{definition}

\begin{lemma}
  If \(K\) is a cone then it has the same homology as a point, i.e.
  \[
    H_n(K) =
    \begin{cases}
      \Z & n = 0 \\
      0 & n > 0
    \end{cases}
  \]
\end{lemma}

\begin{proof}
  Let \(x_0\) be a point as in the definition of a cone. Consider
  \begin{align*}
    i: \{\langle x_0 \rangle\} &\to K \\
    r: K &\to \{\langle x_0 \rangle\}
  \end{align*}
  the obvious inclusion and retraction. Clearly \(r \compose i = \id_{\{\langle x_0 \rangle\}}\) so \(r_* \compose i_* = \id_{H_n(\{\langle x_0 \rangle\})}\) for all \(n\). Thus left to show \(i_\bullet \compose r_\bullet \simeq \id_{C_\bullet(K)}\) as if so then \(i_* \compose r_* = \id_{H_n(K)}\) for all \(n\) so \(r_*\) is an isomorphism and the result follows.

  We write down the following chain homotopy
  \begin{align*}
    h_n: C_n(K) &\to C_{n + 1}(K) \\
    \langle v_0, \dots, v_n \rangle &\mapsto
                                      \begin{cases}
                                        \langle x_0, v_0, \dots, v_n \rangle & x_0 \notin \sigma \\
                                        0 & x_0 \in \sigma
                                      \end{cases}
  \end{align*}
  Now check directly that
  \[
    (\id_{C_n(K)} - i_n \compose r_n)(\sigma) = (\b_{n + 1} \compose h_n + h_{n - 1} \compose \b_n)(\sigma)
  \]
  for all \(\sigma \in K\). There are 4 cases depending on if \(x_0 \in \sigma\) and if \(n = 0\). We'll do the case \(x_0 \in \sigma, n \neq 0\). The others are similar but easier. Let \(\sigma = \langle v_0, \dots, v_n \rangle\) and suppose \(x_0 = v_j\). Now
  \begin{align*}
    (\b \compose h + h \compose \b)(\sigma)
    &= h \compose \b(\sigma) \\
    &= h(\sum_{i = 0}^n (-1)^i \langle v, \dots, \hat v_i, \dots, v_n \rangle) \\
    &= (-1)^j \langle x_0, v_0, \dots, v_{j - 1}, v_{j + 1}, \dots, v_n \rangle \\
    &= (-1)^j (-1)^j \langle v_0, \dots, v_{j - 1}, x_0, v_{j + 1}, \dots, v_n \rangle \\
    &= \sigma \\
    &= (\id_{C_n(K)} - i_n \compose r_n)(\sigma)
  \end{align*}
\end{proof}

\subsection{Homology of the simplex and the sphere}

\begin{eg}
  Let \(K = \{\tau \leq \sigma_n\}\) where \(\sigma_n\) is the standard \(n\)-simplex. By considering any vertex, \(K\) is obviously a cone so by the lemma
  \[
    H_n(K) \cong
    \begin{cases}
      \Z & n = 0 \\
      0 & n \geq 1
    \end{cases}
  \]
\end{eg}

\begin{eg}
  Let \(L = \b \sigma_n \subseteq K\) be the standard \((n - 1)\)-sphere where \(n \geq 2\). In other words \(L = K - \{\sigma_n\}\).
  \[
    \begin{tikzcd}[column sep=small]
      0 = C_{n + 1}(L) \ar[r] & C_n(L) = 0 \ar[r] \ar[d, hook] & C_{n -1}(L) \ar[r] \ar[d, equal] & C_{n - 2}(L) \ar[r] \ar[d, equal] & \cdots \ar[r] & C_1(L) \ar[r] \ar[d, equal] & C_0(L) \ar[r] \ar[d, equal] & 0 \\
      0 = C_{n + 1}(K) \ar[r] & C_n(K) = \langle \sigma_n \rangle \ar[r] & C_{n - 1}(K) \ar[r] & C_{n - 2}(K) \ar[r] & \cdots \ar[r] & C_1(K) \ar[r] & C_0(K) \ar[r] & 0
    \end{tikzcd}
  \]
  So for \(k \leq n - 2\), \(H_k(L) = H_k(K)\). The only interesting case is \(k = n - 1\). Because \(H_{n - 1}(K) \cong 0\), \(Z_{n - 1}(K) = B_{n - 1}(K)\) and similarly \(Z_n(K) = B_n(K) = 0\) so \(\b_n\) is injective. Because \(B_{n - 1}(L) \cong 0\),
  \begin{align*}
    H_{n - 1}(L)
    &= Z_{n - 1}(L) /B_{n - 1}(L) \cong Z_{n - 1}(L) \\
    &= Z_{n - 1}(K) \\
    &= B_{n - 1}(K) \\
    &= \im \b_n \\
    &\cong C_n(K) \\
    &\cong \Z
  \end{align*}
  so
  \[
    H_k(L) \cong
    \begin{cases}
      \Z & k = 0, n - 1 \\
      0 & k \geq 2
    \end{cases}
  \]
\end{eg}

Intuitively the homology groups detect \(n - 1\)-dimensional holes (compare to \(D^n\)). It also gives something that \(\pi_1\) fails to detect and gives us a way to differentiate \(S^{n - 1}\) for different \(n\). (?)

\subsection{Continuous maps and homotopies}

Question: if \(\phi: |K| \to |L|\) is continuous, does it induce some kind of map \(\phi_*: H_n(K) \to H_n(L)\)? The obvious idea to take simplicial approximation \(f: K^{(r)} \to L\) of \(\phi\) and set \(\phi_* = f_*: H_n(K^{(r)}) \to H_n(L)\). This brings two immediate problems: in general this \(r\) is not \(1\), and moreover \(\phi_*\) may depend on the choice of \(f\).

\begin{definition}[continguous]\index{contiguous}
  Two simplicial maps \(f, g: K \to L\) are \emph{continguous} if for every \(\sigma \in K\) there exists \(\tau \in L\) such that \(f(\sigma), g(\sigma) \leq \tau\).
\end{definition}

Informally this is the homotopy of simplicial maps.

\begin{remark}
  Look back at the proof of lemma 4.25, we proved that if \(f\) is a simplicial approxiamtion to \(\phi\) and if \(x \in \sigma, \phi(x) \in \interior \tau\) then \(f(\sigma) \leq \tau\). Therefore if \(f, g\) are both simplicial approximation to \(\phi\) then they are contiguous.
\end{remark}

\begin{lemma}
  If \(f, g: K \to L\) are contiguous then
  \[
    f_* = g_*: H_n(K) \to H_n(L)
  \]
  for all \(n\).
\end{lemma}

\begin{proof}
  Need to exhibit a chain homotopy between \(f_\bullet\) and \(g_\bullet\). Fix a total ordering \(<\) on th vertices of \(K\). Now for each simplex \(\sigma \in K\) we can write it in a unqiue way \(\sigma = \langle v_0, \dots, v_n \rangle\) such that
  \[
    v_0 < v_1 < \dots < v_n.
  \]
  Now define a chain homotopy
  \begin{align*}
    h_n: C_n(K) &\to C_{n + 1}(L) \\
    \langle v_0, \dots, v_n \rangle &\mapsto \sum_{j = 0}^n (-1)^j \langle f(v_0), \dots, f(v_j), g(v_j), \dots, g(v_n) \rangle
  \end{align*}
  \(\langle f(v_0), \dots, f(v_j), g(v_j), \dots, g(v_n) \rangle = 0\) if it is not an \((n + 1)\)-dimensional simplex.

  We can now check directly that this defines a chain homotopy. See online notes for details.
\end{proof}

\begin{lemma}
  Let \(K\) be a simplicial complex. A simplicial map \(s: K' \to K\) is a simplicial approximation to the identity if and only if \(s(\hat \sigma)\) is a vertex of \(\sigma\) for all \(\sigma \in K\). Futhermore such an \(s\) exists.
\end{lemma}

\begin{proof}
  In the setting, the definition of simplicial approximation tells us that
  \[
    \id_{|K|} (\St_{K'}(\hat \sigma)) = \interior \sigma \subseteq \St_K(s(\hat \sigma)),
  \]
  which hapens if and only if \(\sigma(\hat \sigma)\) is a vertex of \(\sigma\).
  % adjunction between star and barycentric subdivision?

  For all \(\sigma \in K\), choose any vertex of \(\sigma\) and assign \(s(\hat \sigma)\) to it. A simplex of \(K\) is the form \(\langle \hat \sigma_0, \dots, \hat \sigma_n \rangle\) such that \(\sigma_0 \leq \sigma_1 \leq \dots \leq \sigma_n\) so every \(s(\hat \sigma_i)\) is a vertex of \(\sigma_n\). Therefore \(\langle s(\hat \sigma_0), \dots, s(\hat \sigma_n) \rangle\) is a face of \(\sigma_n\), so \(s\) is a simplicial map.
\end{proof}

The choice of \(s\) induces a canonical homomorphism \(s_*: H_n(K') \to H_n(K)\).

\begin{proposition}
  \(s_*: H_n(K') \to H_n(K)\) is an isomorphism for all \(n\).
\end{proposition}

\begin{proof}
  Postponed until Mayer-Vietoris sequence.
\end{proof}

\begin{definition}
  Let \(\alpha: |K| \to X\) be a triangulation we define
  \[
    H_n(X) = H_n(K).
  \]
\end{definition}

Let \(\phi: X \to Y\) be continuous and \(\alpha: |K| \to X, \beta: |K| \to Y\) be triangulations. Let \(f: K^{(r)} \to L\) be a simplicial approximation to \(\beta^{-1} \compose \phi \compose \alpha\). Using simplicial approximation to the identity, we identify \(H_n(K^{(r)}) = H_n(K)\) for all \(r\). Now set
\[
  \phi_* = f_*: H_n(X) = H_n(K) = H_n(K^{(r)}) \to H_n(L) = H_n(Y).
\]
By results we have proven, \(\phi_*\) is independent of the choice of simplicial approximation. However, we want something stronger: we want homology to be a homotopy invariant.

\begin{theorem}
  If \(X, Y\) are triangulable spaces and \(\phi, \psi: X \to Y\) are homotopic. Then
  \[
    \phi_* = \psi_*.
  \]
\end{theorem}

\begin{proof}[Non-examinable]
  Sketch of proof. Let \(\alpha: |K| \to X, \beta: |L| \to Y\). By hypothesis
  \[
    \beta^{-1} \compose \phi \compose \alpha \simeq \beta^{-1} \compose \psi \compose \alpha: |K| \to |L|
  \]
  are homotopic. Let \(\Psi: |K| \times I \to |L|\) be such a homotopy. By example sheet 3 Q9 \(|K| \times I \cong |M|\) for some simplicial complex \(M\), such that the ``top'' and ``bottom'' \(K_0, K_1 \cong K\) and embeds in \(M\) via \(i: K \to M, j: K \to M\), and for all \(\sigma \in K\) there exists \(M_\sigma \subseteq M\) such that \(|M_\sigma| \cong \sigma \times I\). Note that
  \[
    |\b M_\sigma| = (\sigma \times \{0\}) \cup (\sigma \times \{1\}) \cup M_{\b \sigma}.
  \]
  Define a chain homotopy
  \begin{align*}
    h_n: C_n(K^{(r)}) &\to C_{n + 1}(M^{(r)}) \\
    \sigma &\mapsto \sum \cdots
  \end{align*}
  Interpreting the equation about \(\b M_\sigma\) as a statement about oriented simplices,
  \[
    \p \compose h(\sigma) = j(\sigma) - i(\sigma) - h \compose \b(\sigma)
  \]
  so
  \[
    j(\sigma) - i(\sigma) = \b \compose h(\sigma) + h \compose \b(\sigma).
  \]
  Note that \(F \compose i\) is a simplicial approximation to \(\phi = \Phi \compose i\) and \(F \compose j\) is a simplicial approximation to \(\tau = \Phi \compose j\). Thus
  \[
    F \compose j(\sigma) - F \compose i(\sigma)
    = F \compose \b \compose h(\sigma) + F \compose h \compose \b(\sigma)
    = \b \compose (F \compose h)(\sigma) + (F \compose h) \compose \b(\sigma)
  \]
  so \(F \compose h\) is a homotopy between \(F \compose i\) and \(F \compose j\). Thus
  \[
    \phi_* = (F \compose i)_* = (F \compose j)_* = \psi_*.
  \]
\end{proof}

\begin{lemma}
  If \(X, Y, Z\) are triangulable and \(X \xrightarrow{\phi} Y \xrightarrow{\psi} Z\) then
  \[
    (\psi \compose \phi)_* = \psi_* \compose \phi_*.
  \]
  Also \((\id_X)_* = \id_{H_n(X)}\).
\end{lemma}

\begin{proof}
  Omitted.
\end{proof}

\begin{corollary}
  If \(X, Y\) are triangulable and \(\phi: X \to Y\) is a homotopy equivalence then \(\phi_*: H_n(X) \to H_n(Y)\) is an isomorphism for all \(n\).
\end{corollary}

In other words, homology is a homotopy invariance.

\section{Homology calculations}

\subsection{Homology of spheres and applications}

\begin{eg}
  \(S^{n - 1} \cong |L|\) where \(L\) is the standard simplicial \((n - 1)\)-sphere. Therefore
  \[
    H_k(S^{n - 1}) \cong H_k(L) =
    \begin{cases}
      \Z & k = 0, n - 1 \\
      0 & \text{ otherwise}
    \end{cases}
  \]
  Two implications: first since
  \[
    H_{n - 1}(S^{n - 1}) \cong \Z \ncong 0 \cong H_{n - 1}(*)
  \]
  \(S^{n - 1}\) is not contractible. Secondly since
  \[
    H_{n - 1}(S^{n - 1}) \cong \Z \ncong 0 \cong H_{n - 1}(S^{m - 1})
  \]
  for \(m \neq n\) we see \(S^{n - 1} \nsimeq S^{m - 1}\) unless \(n = m\).
\end{eg}

\begin{theorem}[invariance of domain]\index{invariance of domain}
  If \(\R^m \cong \R^n\) then \(m = n\).
\end{theorem}

\begin{proof}
  Suppose \(\phi: \R^m \to \R^n\) is a homeomorphism. wlog \(\phi(0) = 0\). This induces a homeomorphism \(\R^m \setminus \{0\} \cong \R^n \setminus \{0\}\). But they are homotopy equivalent to \(S^{m - 1}\) and \(S^{n - 1}\) respectively. \(m = n\).
\end{proof}

\begin{theorem}[Brouwer fixed point theorem]\index{Brouwer fixed point theorem}
  Let \(D^n\) be the closed \(n\)-dimensional disk. Then any continuous map \(\phi: D^n \to D^n\) has a fixed point.
\end{theorem}

\begin{proof}
  Identical to the 2 dimensional case, substituting \(H_{n - 1}\) for \(\pi_1\).
\end{proof}

\subsection{Mayer-Vietoris theorem}

\begin{definition}[(short) exact sequence]\index{exact sequence}\index{short exact sequence}
  A sequence of homomorphism of abelian groups
  \[
    \begin{tikzcd}
      \cdots \ar[r] & A_{i + 1} \ar[r, "f_{i + 1}"] & A_i \ar[r, "f_i"] & A_{i - 1} \ar[r] & \cdots
    \end{tikzcd}
  \]
  is \emph{exact} at \(A_i\) if \(\ker f_i = \im f_{i + 1}\). The sequence is \emph{exact} if it is exact at every \(A_i\).

  A \emph{short exact sequence} is one of the form
  \[
    \begin{tikzcd}
      0 \ar[r] & A \ar[r] & B \ar[r] & C \ar[r] & 0
    \end{tikzcd}
  \]
\end{definition}

\begin{eg}\leavevmode
  \begin{enumerate}
  \item \(A \xrightarrow{f} B \to 0\) is exact at \(B\) if and only if \(f\) is surjective.
  \item \(0 \to A \xrightarrow{f} B\) is exact at \(A\) if and only if \(f\) is injective.
  \item A very short exact sequence
    \[
      \begin{tikzcd}
        0 \ar[r] & A \ar[r, "f"] & B \ar[r] & 0
      \end{tikzcd}
    \]
    is an isomorphism \(f: A \to B\).
  \end{enumerate}
\end{eg}

\begin{theorem}[Mayer-Vietoris]\index{Mayer-Vietoris theorem}
  \label{thm:Mayer-Vietoris}
  Let \(K = L \cup M\) with \(N = L \cap M\) be simplicial complexes. Consider the inclusion maps
  \[
    \begin{tikzcd}
      N \ar[r, hook, "i"] \ar[d, hook, "j"] & L \ar[d, hook, "\ell"] \\
      M \ar[r, hook, "m"] & K
    \end{tikzcd}
  \]
  then there exists \(\delta_*: H_n(K) \to H_{n - 1}(N)\) making this sequence exact.
  \[
    \begin{tikzcd}
      & \cdots \ar[r] & H_{n + 2}(K) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_{n + 1}(N) \ar[r, "i_* \oplus j_*"] & H_{n + 1}(L) \oplus H_{n + 1}(M) \ar[r, "\ell_* - m_*"] & H_{n + 1}(K) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_{n}(N) \ar[r, "i_* \oplus j_*"] & H_{n}(L) \oplus H_{n}(M) \ar[r, "\ell_* - m_*"] & H_n(K) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_{n - 1}(N) \ar[r, "i_* \oplus j_*"] & H_{n - 1}(L) \oplus H_{n - 1}(M) \ar[r, "\ell_* - m_*"] & H_{n - 1}(K) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_{n - 1}(N) \ar[r] & \dots
    \end{tikzcd}
  \]
\end{theorem}

The core of the theorem is a result in homological algebra.

\begin{definition}[exact chain map]\index{short exact sequence}
  A sequence of chain maps
  \[
    \begin{tikzcd}
      A_\bullet \ar[r, "f_\bullet"] & B_\bullet \ar[r, "g_\bullet"] & C_\bullet
    \end{tikzcd}
  \]
  is \emph{exact} at \(B_\bullet\) if
  \[
    \begin{tikzcd}
      A_n \ar[r, "f_n"] & B_n \ar[r, "g_n"] & C_n
    \end{tikzcd}
  \]
  is exact at \(B_n\) for all \(n \in \Z\).
\end{definition}

\begin{lemma}[snake lemma]\index{snake lemma}
  Let
  \[
    \begin{tikzcd}
      0 \ar[r] & A_\bullet \ar[r, "f_\bullet"] & B_\bullet \ar[r, "g_\bullet"] & C_\bullet \ar[r] & 0
    \end{tikzcd}
  \]
  be a short exact sequence of chain complexes. For any \(n \in \Z\) there is a homomorphism \(\delta_*: H_{n + 1}(C_\bullet) \to H_n(A_\bullet)\) such that
  \[
    \begin{tikzcd}
      & \cdots \ar[r, "g_*"] & H_{n + 1}(C_\bullet) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_n(A_\bullet) \ar[r, "f_*"] & H_n(B_\bullet) \ar[r, "g_*"] & H_n(C_\bullet) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_{n - 1}(A_\bullet) \ar[r, "f_*"] & \cdots
    \end{tikzcd}
  \]
\end{lemma}

\begin{proof}
  Consider the massive commutative diagram
  \[
    \begin{tikzcd}
      & \vdots \ar[d] & \vdots \ar[d] & \vdots \ar[d]  \\
      0 \ar[r] & A_{n + 1} \ar[r, "f_{n + 1}"] \ar[d, "\b_{n + 1}"] & B_{n + 1} \ar[r, "g_{n + 1}"] \ar[d, "\b_{n + 1}"] & C_{n + 1} \ar[r] \ar[d, "\b_{n + 1}"] & 0 \\
      0 \ar[r] & A_{n} \ar[r, "f_{n}"] \ar[d, "\b_{n}"] & B_{n} \ar[r, "g_{n}"] \ar[d, "\b_{n}"] & C_{n} \ar[r] \ar[d, "\b_{n}"] & 0 \\
      0 \ar[r] & A_{n - 1} \ar[r, "f_{n - 1}"] \ar[d, "\b_{n - 1}"] & B_{n - 1} \ar[r, "g_{n - 1}"] \ar[d, "\b_{n - 1}"] & C_{n - 1} \ar[r] \ar[d, "\b_{n + 1}"] & 0 \\
      & \vdots & \vdots & \vdots
    \end{tikzcd}
  \]
  Let's construct the map
  \begin{align*}
    \delta_*: H_{n + 1}(C_\bullet) &\to H_n(A_\bullet) \\
    [x] &\mapsto ?
  \end{align*}
  with \(x \in Z_{n + 1}(C_\bullet)\). Since \(g_{n + 1}\) is surjective, \(x = g_{n + 1}(y)\) for some \(y \in B_{n + 1}\). Consider \(\b_{n + 1}(y)\), by commutativity
  \[
    g_n \compose \b_{n + 1}(y) = \b_{n + 1} \compose g_n (y) = \b_{n + 1}(x) = 0
  \]
  as \(x \in Z_{n + 1}(C_\bullet)\). Thus \(\b_{n + 1}(y) \in \ker g_n = \im f_n\). Thus exists \(z \in A_n\) such that \(f_n(z) = \b_{n + 1}(y)\).

  We would like to check that \(z \in Z_n(A_\bullet)\). Consider \(\b_n(z)\),
  \[
    f_{n - 1} \compose \b_n(z) = \b_n \compose f_n(z) = \b_n \compose \b_{n + 1}(y) = 0.
  \]
  But \(f_{n - 1}\) is injective so \(\b_n(z) = 0\), and thus \(z \in Z_n(A_\bullet)\). Thus let \(\delta_*([x]) = [z]\).

  We have to check this is well-defined and \(\delta_*\) is a homomorphism. Finally we have to check exactness at \(H_n(A_\bullet), H_n(B_\bullet), H_n(C_\bullet)\). This is just a tedious exercise in diagram chasing.
\end{proof}

\begin{proof}[Proof of \nameref{thm:Mayer-Vietoris}]
  By the snake lemma it suffices to check that the following is an exact sequence of chain complex.
  \[
    \begin{tikzcd}
      0 \ar[r] & C_\bullet(N) \ar[r, "i_\bullet \oplus j_\bullet"] & C_\bullet(L) \oplus C_\bullet(M) \ar[r, "\ell_\bullet - m_\bullet"] & C_\bullet(K) \ar[r] & 0.
    \end{tikzcd}
  \]
  \begin{itemize}
  \item exactness at \(C_n(N)\): \(i_n\) induces \(C_n(N)\) as a direct summand in \(C_n(L)\) and similar for \(j_n\). Thus \(i_n \oplus j_n\) is injective.
  \item exactness at \(C_n(K)\): consider \(c \in C_n(K)\), have \(c = c_L + c_M\) where \(c_L, c_M\) are ``supported'' in \(L\) and \(M\) respectively. To make it precise, this means that they are respective images of \(\ell_n\) and \(m_n\), i.e.\ there exists \(b_L \in C_n(L), b_M \in C_n(M)\) such that \(c_L = \ell_n(b_L), c_M = m_n(b_M)\). Thus
    \[
      c = \ell_n(b_L) - m_n(-b_M) = (\ell_n - m_n)(b_L, -b_M).
    \]
  \item exactness at \(C_n(L) \oplus C_n(M)\): \((b_L, b_M) \in \ker(\ell_n - m_n)\) if and only if each simplex \(\sigma\) that appears in \(b_L\) also appears in \(b_M\) with the same coefficients, if and only if \((b_L, b_M) \in \im(i_n \oplus j_n)\).
  \end{itemize}
\end{proof}

\begin{lemma}[five lemma]\index{five lemma}
  Suppose the following diagram is commutative and the rows are exact:
  \[
    \begin{tikzcd}
      A \ar[r] \ar[d, "\alpha"] & B \ar[r] \ar[d, "\beta"] & C \ar[r] \ar[d, "\gamma"] & D \ar[r] \ar[d, "\delta"] & E \ar[d, "\varepsilon"] \\
      A' \ar[r] & B' \ar[r] & C' \ar[r] & D' \ar[r] & E'
    \end{tikzcd}
  \]
  if \(\alpha, \beta, \delta, \varepsilon\) are isomorphisms then so is \(\gamma\).
\end{lemma}

\begin{proof}
  Example sheet 4.
\end{proof}

Recall that we claimed before given a barycentric subdivision \(K'\) of a simplicial complex \(K\), the induced map \(s_*: H_n(K') \to H_n(K)\) is an isomorphism.

\begin{proof}\index{barycentric subdivision}
  Induction on the number of simplices of \(K\). If \(K = \{*\}\) then \(K = K'\) so obviously true. For inductive step, choose \(\sigma \in K\) with maximal dimension. Let
  \begin{align*}
    L &= K - \{\sigma\} \\
    M &= \{\tau \leq \sigma: \tau \in K\} \\
    N &= L \cap M = \b \sigma
  \end{align*}
  \(L, N\) have fewer simplices than \(K\). Because \(M, M'\) are both cones, \(s_*: H_n(M') \to H_n(M)\) is an isomorphism. Look at Mayer-Vietoris for \(K = L \cup_N M, K' = L' \cup_{N'} M'\).
  \[
    \begin{tikzcd}[column sep=small]
      H_{n + 1}(N') \ar[r] \ar[d, "s_*"] & H_{n + 1}(L') \oplus H_{n + 1}(M') \ar[r] \ar[d, "s_* \oplus s_*"] & H_{n + 1}(K') \ar[r] \ar[d, "s_*"] & H_n(N') \ar[r] \ar[d, "s_*"] & H_n(L') \oplus H_n(M') \ar[d, "s_* \oplus s_*"] \\
      H_{n + 1}(N) \ar[r] & H_{n + 1}(L) \oplus H_{n + 1}(M) \ar[r] & H_{n + 1}(K) \ar[r] & H_n(N) \ar[r] & H_n(L) \oplus H_n(M) \\
    \end{tikzcd}
  \]
  so the five lemma finishes the job.
\end{proof}

\subsection{Homology of compact surfaces}

Recall that classification of compact surfaces says there are two classes of surfaces there are two classes: \(\Sigma_g\) and \(S_g\). We are going to use Mayer-Vietoris to compute their homologies. Before that we have to know the homology of \(\Gamma_r\).

\begin{eg}
  \(\Gamma_r = \bigvee_{i = 1}^r S^1\). \(\Gamma_0 = *, \Gamma_1 \cong S^1\) and their homologies are known. Use standard simplicial \(1\)-sphere. There is a slight issue here that the way we set up simplicial complex makes it difficult to glue things. Instead we are going to use abstract simplicial complex.

  Let \(K\) be such that \(|K| \cong \Gamma_r\), \(L, M \subseteq K\) be such that \(|L| \cong \Gamma_{r - 1}, |M| \cong S^1\), and \(K = L \cup_N M\) where \(N = \{v_0\}\). By Mayer-Vietoris,
  \[
    \begin{tikzcd}
      H_1(N) \ar[r] & H_1(L) \oplus H_1(M) \ar[r] & H_1(K) \ar[dll, out=0, in=180, "\delta_*"] \\
      H_0(N) \ar[r] & H_0(L) \oplus H_0(M) \ar[r] & H_0(K) \ar[dll, out=0, in=180] \\
      0
    \end{tikzcd}
  \]
  which is
  \[
    \begin{tikzcd}
      0 \ar[r] & H_1(\Gamma_{r - 1}) \oplus \Z \ar[r] & H_1(\Gamma_r) \ar[dll, out=0, in=180, "\delta_*"] \\
      \Z \ar[r] & \Z \oplus \Z \ar[r] & \Z \ar[dll, out=0, in=180] \\
      0
    \end{tikzcd}
  \]
  and unfortunately we have to get out hands dirty to understand \(\delta_*\). The map \(H_0(N) \to H_0(L) \oplus H_0(M)\) sends generator to generators so is injective and thus by exactness at \(H_1(K)\), \(\im \delta_* = 0\). Thus we have a very short exact sequence
  \[
    \begin{tikzcd}
      0 \ar[r] & H_1(\Gamma_{r - 1}) \oplus \Z \ar[r] & H_1(\Gamma_r) \ar[r, "\delta_*"] & 0
    \end{tikzcd}
  \]
  so \(H_1(\Gamma_r) \cong \Gamma_1(\Gamma_{r - 1}) \oplus \Z\). Thus we conclude that
  \[
    H_n(\Gamma_r) =
    \begin{cases}
      \Z & n = 0 \\
      \Z^r & n = 1 \\
      0 & \text{otherwise}
    \end{cases}
  \]
  Note that \(H_1(\Gamma_r) \cong \langle [\alpha_1] \rangle \oplus \dots \oplus \langle [\alpha_r] \rangle\) where \([\gamma_i]\) is a generator for \(H_1(i\text{th circle})\).
\end{eg}

\begin{remark}
  Note that this proof does not assume anything other path-connectedness. Thus \(\delta_*: H_1(K) \to H_0(N)\) is always zero as long as the intersection \(N\) is connected. Then we don't have to worry about the last row of Mayer-Vietoris.
\end{remark}

\begin{eg}
  \(\Sigma_g = \Gamma_{2g} \cup_{\rho_g} D^2\) where
  \[
    \rho_g(1) = \alpha_1\beta_1\alpha_1^{-1}\beta_1^{-1} \cdots \alpha_g \beta_g \alpha_g^{-1} \beta_g^{-1}.
  \]
  Just as mapping cylinder, to compute the homology it's convenient to introduce a new space
  \[
    \Sigma_g^* = \Gamma_{2g} \cup_{2g} (S^1 \times [0, 1])
  \]
  with \((x, 0) \sim \rho_g(x)\) for all \(x \in S^1\). This is just \(\Sigma_g\) with \(D^2\) removed. Note that \(\Sigma_g^*\) deformation retracts to \(\Gamma_{2g}\).

  A bit of technical work: we can triangulate \(\Sigma_g^*\) by triangulating \(\Gamma_{2g}\) then taking a simplicial approximation to \(\rho_g\) and triangulating \(S^1 \times I\) in a way compactible with that.

  Next note that
  \[
    \Sigma_g = \Sigma_g^* \cup_i D^2
  \]
  where \(i: S^1 \to \Sigma_g^*\) is the map identifying \(\b D^2\) with \(S^1 \times I\). Choose a triangulation of \(D^2\) compatible with the induced triangulation of its boundary.

  Back to the actual computation.
  \[
    \begin{tikzcd}
      H_2(S^1) \ar[r] & H_2(\Sigma_g^*) \oplus H_2(D^2) \ar[r] & H_2(\Sigma_g) \ar[dll, out=0, in=180] \\
      H_1(S^1) \ar[r] & H_1(\Sigma_g^*) \oplus H_1(D^2) \ar[r] & H_1(\Sigma_g) \ar[dll, out=0, in=180] \\
      0
    \end{tikzcd}
  \]
  note that by the previous remark we don't have to write down the last row. Fill in information we already knew,
  \[
    \begin{tikzcd}
      0 \ar[r] & 0 \ar[r] & H_2(\Sigma_g) \ar[r] & \Z \ar[r, "i_*"] & \Z^{2g} \ar[r] & H_1(\Sigma_g) \ar[r] & 0
    \end{tikzcd}
  \]
  To figure out the two unknown groups we need to understand \(i_*\), which induced by \(\rho_g\). But since homology groups are abelian, we have
  \[
    i_*(1)
    = (\gamma_g)_*(1)
    = [\alpha_1] + [\beta_1] - [\alpha_1] - [\beta_1] + \dots + [\alpha_g] + [\beta_g] - [\alpha_g] - [\beta_j] = 0
  \]
  So we split that into two exact sequences
  \[
    \begin{tikzcd}
      0 \ar[r] & H_2(\Sigma_g) \ar[r] & \Z \ar[r] & 0
    \end{tikzcd}
    \begin{tikzcd}
      0 \ar[r] &  \Z^{2g} \ar[r] & H_2(\Sigma_g) \ar[r] & 0
    \end{tikzcd}
  \]
  so
  \[
    H_n(\Sigma_g) \cong
    \begin{cases}
      \Z & n = 0, 2 \\
      \Z^{2g} & n = 1 \\
      0 & \text{otherwise}
    \end{cases}
  \]
  which in particular implies that they are pairwise non-homotopy equivalent.
\end{eg}

\begin{eg}
  \(S_g = \Gamma_{g + 1} \cup_{\sigma_g} D^2\) where
  \[
    \sigma_g(1) = \alpha_0^2 \alpha_1^2 \cdots \alpha_g^2.
  \]
  By almost the same argument, we obtain a Mayer-Vietoris sequence
  \[
    \begin{tikzcd}
      0 \ar[r] & H_2(S_g) \ar[r, "\delta_*"] & \Z \ar[r, "i_*"] & \Z^{g + 1} \ar[r] & H_1(S_g) \ar[r] & 0
    \end{tikzcd}
  \]
  where this times \(i_*\) is induced by \(\sigma_g\), and
  \[
    i_*
    = (\gamma_g)_*(1) = 2[\alpha_0] + 2[\alpha_1] + \dots + 2[\alpha_g]
  \]
  which is injective so \(\delta_* = 0\). Thus \(H_2(S_g) = 0, H_1(S_g) \cong \Z^g \oplus (\Z/2\Z)\).
\end{eg}

\subsection{Rational homology and Euler characteristic}

Basically homology with coefficients in \(\Q\).

\begin{definition}[rational chain]\index{rational chain}
  Let \(K\) be a simplicial complex. The vector space of \emph{rational \(n\)-chain} \(C_n(K; \Q)\) is defined as the vector space over \(\Q\) with basis the \(n\)-simplices of \(K\).
\end{definition}

A typical element thus has the form \(\sum_i \lambda_i \sigma_i\) where \(\lambda_i \in \Q\) and \(\sigma_i\)'s are \(n\)-simplices. We can define the boundary map \(\b_n: C_n(K; \Q) \to C_n(K; \Q)\) as before and the condition \(\b \compose \b = 0\) is satisfied so we have another homology theory.

\begin{definition}[rational homology]\index{rational homology}
  Let \(K\) be a simplicial complex. We define
  \begin{align*}
    Z_n(K; \Q) &= \ker \b_n \\
    B_n(K; \Q) &= \im \b_{n + 1} \\
    H_n(K; \Q) &= Z_n(K; \Q)/B_n(K; \Q)
  \end{align*}
  If \(\alpha: |K| \to X\) is a triangulation then define
  \[
    H_n(X; \Q) = H_n(K; \Q).
  \]
\end{definition}

Rational homology encodes slightly less data but has the advantage of easier to compute (as \(\Q\) is a field). More specifically, it simply forgets the torsion elements:

\begin{lemma}
  Let \(K\) be a simplicial complex. If \(H_n(K) \cong \Z^k \oplus F\) where \(F\) is a finite group then
  \[
    H_n(K; \Q) \cong \Q^k.
  \]
\end{lemma}

\begin{proof}
  An exercise in commutative algebra. See online notes.
\end{proof}

\begin{eg}
  For all \(n\),
  \[
    H_n(\R P^2; \Q) \cong H_n(*; \Q).
  \]
\end{eg}

\begin{definition}[Euler characteristic]\index{Euler characteristic}
  Let \(X\) be a triangulable space and \(\alpha: |K| \to X\) a triangulation. Then the \emph{Euler characteristic} of \(X\) is
  \[
    \chi(X) = \chi(K) = \sum_{n \in \Z} (-1)^n \dim_\Q H_n(K; \Q).
  \]
\end{definition}

Note that this is obviously a topological invariant.

Given the way rational homology is defined, the nice thing about \(\chi(K)\) is that it is \emph{really} easy to compute.

\begin{lemma}
  Let \(K\) be a simplicial complex. Then
  \[
    \chi(K) = \sum_{n \in \Z} (-1)^n \#\{n\text{-simplicies in } K\}.
  \]

  In particular if \(K\) is \(2\)-dimensional, with \(V, E, F\) the number of \(0, 1\) and \(2\)-simplices then
  \[
    \chi(K) = V - E + F.
  \]
\end{lemma}

\begin{proof}
  The number of \(n\)-simplex is not a natural algebraic object so instead we use \(\dim_\Q C_n(K; \Q)\). Next, recall that we are working with vector spaces so we can apply rank-nullity theorem to
  \begin{align*}
    Z_n(K; \Q) &\twoheadrightarrow H_n(K; \Q) \\
    \b_n: C_n &\to B_{n - 1}
  \end{align*}
  to get
  \begin{align*}
    \dim Z_n &= \dim H_n + \dim B_n \\
    \dim C_n &= \dim B_{n - 1} + \dim Z_n
  \end{align*}

  Now
  \begin{align*}
    \sum_{n \in \Z} (-1)^n \dim_\Q C_n
    &= \sum_{n \in \Z} (-1)^n \dim B_{n - 1} + \sum_{n \in \Z} (-1)^n \dim Z_n \\
    &= - \sum_{n \in \Z} (-1)^n \dim B_n + \sum_{n \in \Z} (-1)^n \dim Z_n \\
    &= \sum_{n \in \Z} (-1)^n (\dim Z_n - \dim B_n) \\
    &= \sum_{n \in \Z} (-1)^n \dim H_n \\
    &= \chi(K)
  \end{align*}
\end{proof}

\begin{note}
  \begin{align*}
    \chi(\Sigma_g) &= 2 - 2g \\
    \chi(S_g) &= 1 - g
  \end{align*}
\end{note}

\subsection{Lefschetz fixed-point theorem}

\begin{definition}[Lefschetz number]\index{Lefschetz number}
  Let \(\phi: X \to X\) be a continuous map of triangulable space \(X\). The \emph{Lefschetz number} of \(\phi\) is
  \[
    L(\phi) = \sum_{n \in \Z} (-1)^n \tr(\phi_*: H_n(X; \Q) \to H_n(X; \Q)).
  \]
\end{definition}

\begin{note}
  \(L(\id_X) = \chi(X)\) so Lefschetz number generalises Euler characteristic.
\end{note}

\begin{lemma}
  If \(f: K \to K\) is a simplicial map then
  \[
    L(|f|) = \sum_{n \in \Z} (-1)^n \tr(f_*: C_n(K; \Q) \to C_n(K; \Q)).
  \]
\end{lemma}

\begin{proof}
  Consider the following commutative diagrams of linear maps with exact rows:
  \[
    \begin{tikzcd}
      0 \ar[r] & A \ar[r] \ar[d, "\alpha"] & B \ar[r] \ar[d, "\beta"] & C \ar[r] \ar[d, "\gamma"] & 0 \\
      0 \ar[r] & A' \ar[r] & B' \ar[r] & C' \ar[r] & 0
    \end{tikzcd}
  \]
  By linear algebra we can find bases for \(B, B'\) such that the matrix for \(\beta\) have has the form
  \[
    \begin{pmatrix}
      \gamma & * \\
      0 & \alpha
    \end{pmatrix}
  \]
  so in particular
  \[
    \tr \beta = \tr \gamma + \tr \alpha.
  \]
  What is left is an application of rank-nullity theorem, similar to the proof of Euler characteristic.
\end{proof}

\begin{theorem}[Lefschetz fixed point theorem]\index{Lefschetz fixed point theorem}
  Let \(X\) be a triangulable space and \(\phi: X \to X\) a continuous map. If \(L(\phi) \neq 0\) then \(\phi\) has a fixed point.
\end{theorem}

\begin{proof}[Non-examinable, sketch]
  Suppose \(\phi\) has no fixed point. Since \(X\) is compact, exists \(\delta > 0\) such that for all \(x \in X\), \(\norm{x - \phi(x)} > \delta\). Now choose a simplicial approximation \(K\) of \(X\) with \(\mesh(K) < \frac{\delta}{2}\). Let \(f: K^{(r)} \to K\) be a simplicial approximation to \(\phi\). Note that if \(v \in \sigma \in \sigma\) then \(f(v) \notin \sigma\). Let \(\iota_n: C_n(K; \Q) \to C_n(K; \Q)\) be the map inducing canonical isomorphism of homology groups. For any \(n\)-simplex \(\sigma \in K\), \(\iota_n(\sigma)\) is supported on simplices contained in \(\sigma\). Then \(f_n \compose \iota_n\) takes every simplex of \(K\) off itself, i.e.\ \(f_n \compose \iota_n (\sigma)\) does not contain \(\sigma\). Now
  \begin{align*}
    L(\phi)
    &= \sum_{n \in \Z} (-1)^n \tr(f_n \compose \iota_n: C_n(K; \Q) \to C_n(K; \Q)) \\
    &= \sum_{n \in \Z} (-1)^n \cdot 0 \\
    &= 0
  \end{align*}
\end{proof}

\printindex
\end{document}

% https://www.dpmms.cam.ac.uk/~hjrw2/teaching.html