\section{Homotopy and CW-complexes}

This section demonstrates the importance of CW-complexes in
homotopy theory. The main results derived here are Whitehead
theorem and theorems on approximation of maps by cellular maps
and spaces by CW-complexes.

\begin{cislo}\label{HCWn}{\bf $n$-connectivity.} A space $X$ is
\emph{$n$-connected}\index{n-connected space} if $\pi_i(X,x_0)=0$
for all $0\le i\le n$ and  some base point
$x_0\in X$ (and consequently, for all base points).

A pair $(X,A)$ is called \emph{$n$-connected}\index{n-connected
pair} if each
component of path connectivity of $X$ contains a point from $A$
and $\pi_i(X,A,x_0)=0$ for all $x_0\in A$ and all $1\le i\le n$

We say that a map $f:X\to Y$ is an \emph{$n$-equivalence}
\index{n-equivalence} if $f_*:\pi_i(X,x_0)\to \pi_i(Y,f(x_0))$
is an isomorphism for all $x_0\in X$ if $0\le i<n$ and an
epimorphism for all $x_0$ if $i=n$.

\begin{ex*} Prove that a pair $(X,A)$ is $n$-connected if and
only if the inclusion $i:A\hookrightarrow X$ is an
$n$-equivalence.
\end{ex*}
\end{cislo}

\begin{cislo}\label{HCWcoml}{\bf Compression lemma} is an important technical tool
in what follows. 

\begin{lemma} [Compression lemma] Let $(X,A)$ be
a pair of CW-complexes and $(Y,B)$ a pair with $B\ne \emptyset$.
Suppose that $\pi_n(Y,B,y_0)=0$ for all $y_0\in B$ whenever
there is a cell in $X-A$ of dimension $n$. Then every $f:(X,A)\to
(Y,B)$ is homotopic rel $A$ with a map $g:X\to B$.
$$
\xymatrix{
A\ar[d]\ar[r]^-{f/A}
& B\ar[d]\\
X \ar[r]_-{f}\ar@{-->}[ru]^-{g}_-{\sim}
& Y
}
$$
If $n=0$, the condition $\pi_0(Y,B,y_0)=0$ means that $(Y,B)$ is
$0$-connected.
\end{lemma}

\begin{proof} By induction we will define maps $f_n:X\to Y$ such
that $f_n(X^n\cup A)\subseteq B$, and $f_n$ is homotopic to
$f_{n-1}$ rel $A\cup X^{n-1}$. Put $f_{-1}=f$. Suppose that we have $f_{n-1}$
and there is a cell $e^n$ in $X-A$. Let $\p:D^n\to X$ be its
characteristic map. Then $f_{n-1}\p:(D^n,\partial D^n)\to (Y,B)$
represents zero element in $\pi_n(Y,B)$. According to Proposition 10.2 %\ref{HOMrhg} 
it means that $f_{n-1}\p:(D^n,\partial D^n)\to (Y,B)$
is homotopic rel $\partial D^n$  to a map $h_n:(D^n,\partial D^n)\to
(B,B)$. Doing it for all cells of dimension $n$ in $X-A$ we
obtain a map $g_n:X^n\cup A\to B$ homotopic rel $A\cup X^{n-1}$ with $f_{n-1}$
restricted to $X^n\cup A$. Using the homotopy extension property
of the pair $(X,X^n\cup A)$ we can conclude that $g_n$ can be
extended to a map $f_n:X\to Y$ which is homotopic rel $A\cup X^{n-1}$ to
$f_{n-1}$. Now for $x\in X^n$ define $g(x)=f_{n}(x)=g_n(x)$. By the same
trick as in the proof of Theorem 2.7 %\ref{CWhep} 
we can construct a homotopy rel A between $f$ and $g$.
\end{proof}

The proof of the following extension lemma is similar but easier and hence left to the reader.

\begin{lemma} [Extension lemma] Consider a pair $(X,A)$ of CW-complexes and a map $f:A\to Y$.
If $Y$ is path connected and $\pi_{n-1}(Y,y_0)=0$ whenever
there is a cell in $X-A$ of dimension $n$, then $f$ can be
extended to a map $X\to Y$.
\end{lemma}
\end{cislo}

\begin{cislo}\label{HCWwt}{\bf Whitehead Theorem.} The
compression lemma has two important consequences.

\begin{cor*} Let $h:Z\to Y$ be an $n$-equivalence and
let $X$ be a finite dimensional CW-complex. Then the induced
map $h_*:[X,Z]\to [X,Y]$ is
\begin{enumerate}
\item  a surjection if $\dim X\le n$,
\item  a bijection if $\dim X\le n-1$.
\end{enumerate}
\end{cor*}

\begin{proof} First, we will suppose that $h:Z\to Y$ is an inclusion and apply 
the compression lemma.
Put $B=Z$, $A=\emptyset$ and consider a map $f:X\to Y$. If $\dim X\le n$
then all the assumptions of the compression lemma are satisfied.
Consequently, there is a map $g:X\to Z$ such that $hg\sim f$.
Hence $h_*:[X,Z]\to [X,Y]$ is surjection.

Let $\dim X\le n-1$ and let $g_1,g_2:X\to Z$ be two maps
such that $hg_1\sim hg_2$ via a homotopy $F:X\times I\to Y$. Then
we can apply the compression
lemma in the situation of the diagram
$$
\xymatrix{
X\times\{0,1\}\ar[r]^-{g_1\cup g_2}\ar[d]
& Z\ar[d]^h \\
X\times I \ar[r]_-{F}\ar@{-->}[ru]_-{H}
& Y
}
$$
to get a homotopy $H:X\times I\to Z$ between $g_1$ and $g_2$.

If $h$ is not an inclusion, we use the mapping cylinder $M_h$. (See 1.5 %\ref{BNcon} 
for the definition and basic properties.)
Let $f:X\to Y$ be a map. Apply the result of the previous part
of the proof to the inclusion $i_Z:Z\hookrightarrow M_h$
and to the map $i_Yf:X\to Y\hookrightarrow M_h$ to get $g:X\to Z$
such that $i_Zg\sim i_Yf$.
$$
\xymatrix{
  &  &  Z \ar[dl]^-{h} \ar[d]^{i_Z}\ar[dr]^-{h} & \\
X\ar@{-->}[urr]^-{g}\ar[r]_-{f}
& Y\ar[r]_-{i_Y}
& M_h \ar[r]_-{p}
& Y
}
$$
Since the right triangle in the diagram commutes and the middle one commutes up to homotopy
and $p i_Y=\operatorname{id_Y}$, we get
$$hg=pi_Zg\sim pi_Yf= f.$$
The statement (2) can be  proved in a similar way.
\end{proof}

A map $f:X\to Y$ is called a \emph{weak homotopy equivalence}
\index{weak homotopy equivalence} if $f_*:\pi_n(X,x_0)\to
\pi_n(Y,f(x_0))$ is an isomorphism for all $n$ and all base
points $x_0$.


\begin{thm*}[Whitehead Theorem] If a map $h:Z\to Y$ between
two CW-complexes is a weak homotopy equivalence, then $h$ is a
homotopy equivalence.

Moreover, if $Z$ is a subcomplex of $Y$ and $h$ is an inclusion,
then $Z$ is even deformation retract of $Y$.
\end{thm*}

\begin{proof} Let $h$ be an inclusion. We apply the compression
lemma in the following situation:
$$
\xymatrix{
Z\ar[r]^-{\id_Z}\ar[d]_h
& Z\ar[d]^{h}\\
Y\ar[r]_-{\id_Y}\ar@{-->}[ru]^-{g}
& Y
}
$$
Then $gh\sim \id_Y$ rel $Z$ and consequently
$hg=\id_Z$. So $Z$ is a deformation retract of $Y$.
The proof in a general case again uses mapping cylinder $M_h$.
\end{proof}
\end{cislo}

\begin{cislo}\label{HCWsal}{\bf Simplicial approximation lemma.}
The following rather technical statement will play an important role
in proofs of approximation theorems in this section and in the
proof of homotopy excision theorem in the next section.
Under convex polyhedron we mean an
intersection of finite number of halfspaces in $\R^n$ with
nonempty interior.


\begin{lemma*}[Simplicial approximation lemma]
Consider a map $f:I^n\to Z$. Let $Z$ be a space
obtained from a space $W$ by attaching a cell $e^k$. Then  $f$
is rel $f^{-1}(W)$ homotopic to $f_1$ for which
there is a simplex $\Delta^k\subset e^k$ with $f_1^{-1}(\Delta^k)$
a union (possibly empty) of finitely many convex polyhedra
such that $f_1$ is the restriction of a linear surjection
$\R^n\to \R^k$ on each of them.
\end{lemma*}
The proof is elementary but rather technical and we omit it. See [Hatcher], %\cite{Ha}, 
 Lemma 4.10, pages 350--351.
\end{cislo}

\begin{cislo}\label{HCWca}{\bf Cellular approximation.}
We recall that a map $g:X\to Y$ between two CW-complexes is
called cellular, if $g(X^n)\subseteq Y^n$ for all $n$.

\begin{thm*}[Cellular approximation theorem]
If $f:X\to Y$ is a map between CW-complexes, then it is homotopic
to a cellular map. If $f$ is already cellular on a subcomplex
$A$, then $f$ is homotopic to a cellular map rel $A$.
\end{thm*}

\begin{cor} $\pi_k(S^n)=0$ for $k<n$.
\end{cor}

\begin{cor} Let $(X,A)$ be a pair of CW-complexes such that
$X-A$ contains only cells of dimension greater then $n$. Then
$(X,A)$ is $n$-connected.
\end{cor}

\begin{proof}[Proof of the cellular approximation theorem] By induction we
will construct maps $f_n:X\to Y$ such that $f_{-1}=f$, $f_n$ is
cellular on $X^n$  and $f_n\sim f_{n-1}$ rel $X^{n-1}\cup A$.
Then we can define $g(x)=f_n(x)$ for $x\in X^n$ and by the same
trick as in the proof of Theorem 2.7 %\ref{CWhep} 
we can construct homotopy rel $A$ between $f$ and $g$.

Suppose we have already $f_{n-1}$ and there is a cell $e^n$ such
that $f_{n-1}(e^n)$ does not lie in $Y^n$. Then $f(e^n)$ meets a
cell $e^k$ in $Y$ of dimension $k>n$. According to the simplicial
approximation lemma $f_{n-1}$ restricted to $\overline{e^n}$ is homotopic rel $\partial
e^n$ to $h:\overline{e^n}
\to Y$ with the property that there is a simplex
$\Delta^k\subset e^k$ and $h(e^n)\subset Y-\Delta^k$.
(Since $n<k$, there is no linear surjection $\R^n\to \R^k$.)
$\partial e^k$ is a deformation retract of $\overline{e^k}-\Delta^k$
and that is why $h$ is homotopic rel $\partial e^n$ to a map
$g:\overline{e^n}\to Y-e^k$. Since $f(e^n)$ meets only a finite number
of cells, repeating the previous step we get a map $f_n$ defined
on $\overline{e^n}$ such that $f_n(e^n)\subseteq Y^n$ and homotopic rel
$\partial e^n$ to $f_{n-1}/\ \overline{e^n}$. In the same way we can define
$f_n$ on $A\cup X^{n}$ homotopic to $f_{n-1}/A\cup X^{n}$
rel $A\cup X^{n-1}$. Then using homotopy extension property 
for the pair $(X, A\cup X^n)$ we
obtain $f_n:X\to Y$ homotopic to $f_{n-1}$ rel $A\cup X^{n-1}$.
\end{proof}
\end{cislo}

\begin{cislo}\label{HCWcwa}{\bf Approximation by CW-complexes.}
Consider a pair $(X,A)$ where $A$ is a CW-complex.
An \emph{$n$-connected CW model}
\index{n-connected CW model} for $(X,A)$ is an $n$-connected pair of
CW-complexes $(Z,A)$ together with a map $f:Z\to X$ such that
$f/A=\id_{A}$  and $f_*:\pi_i(Z,z_0)\to \pi_i(X,f(z_0))$ is an
isomorphism for $i>n$ and a monomorphism for $i=n$ and all
base points $z_0\in Z$.

If we take $A$ a set containing one point from every
path component of $X$, then $0$-connected CW model
gives a CW-complex $Z$ and a map $Z\to X$ which is a weak
homotopy equivalence.

\begin{thma}[CW approximation theorem] For every $n\ge 0$ and for
every pair $(X,A)$ where $A$ is a CW-complex there exists
$n$-connected CW-model $(Z,A)$ with the additional property that
$Z$ can be obtained from $A$ by attaching cells of dimensions
greater than $n$.
\end{thma}

\begin{proof}
We proceed by induction constructing  $Z_n=A\subset
Z_{n+1}\subset Z_{n+2}\subset\dots$ with $Z_k$ obtained from
$Z_{k-1}$ by attaching cells of dimension $k$, and a map
$f:Z_k\to X$ such that $f/A=\id_A$ and $f_*:\pi_i(Z_k)\to
\pi_i(X)$ is a monomorhism for $n\le i<k$ and an epimorphism for
$n<i\le k$. For simplicity we will consider $X$ and $A$ path
connected with a fixed base point $x_0\in A$.

Suppose we have already $f:Z_k\to X$. Let $\p_{\alpha}:S^k\to Z_k$
be maps representing generators in the kernel of $f_*:\pi_k(Z_k)\to
\pi_k(X)$. Put
$$Y_{k+1}=Z_k\cup_{\p_{\alpha}}\bigcup_{\alpha}D^{k+1}_{\alpha}.$$
Since the map $f:Z_k\to X$ restricted to the boundaries of new
cells is trivial, it can be extended to a map $f:Y_{k+1}\to X$.

By the cellular approximation theorem $\pi_i(Y_{k+1})=\pi_i(Z_k)$
for all $i\le k-1$. Hence the new $f_*$ has the same properties
as the old $f_*$ on homotopy groups $\pi_i$ with $i\le k-1$.
Since the composion $\pi_k(Z_k)\to \pi_k(Y_{k+1})\to \pi_k(X)$
is surjective according to the induction assumptions, the homomorphism
$f_*:\pi_k(Y_{k+1})\to \pi_{k}(X)$ has to be  surjective as well.

Now we prove that it is injective. Let $[\p]\in\pi_k(Y_{k+1})$ and
let $f\p\sim 0$. By cellular approximation $\p:S^{k}\to Y_{k+1}$
is homotopic to $\widetilde \p:S^k\to Y^k_{k+1}=Z_k\subseteq Y_{k+1}$
and $[f\widetilde\p]= 0$
in $\pi_k(X)$. Hence $[\widetilde\p]\in\ker f_*$
is a sum of $[\p_{\alpha}]$, and consequenly, it is zero in
$\pi_k(Y_{k+1})$.

Next, let maps $\ps_{\alpha}:S^{k+1}_{\alpha}\to X$ represent
generators of $\pi_{k+1}(X)$. Put
$$Z_{k+1}=Y_{k+1}\vee\bigvee_{\alpha}S^{k+1}_{\alpha}$$
and define $f=\ps_{\alpha}$ on new $(k+1)$-cells. It is clear
that $f_*:\pi_{k+1}(Z_{k+1})\to \pi_{k+1}(X)$ is a surjection. Using cellular
approximation it can be shown that $\pi_i(Z_{k+1}, Y_{k+1})=0$
for $i\le k$. From the long exact sequence of the pair $(Z_{k+1},Y_{k+1})$ we get that
$\pi_i(Y_{k+1})=\pi_i(Z_{k+1})$ for $i\leq k-1$. Consequently, $f_*:\pi_i(Z_{k+1})\to \pi_i(X)$ is an isomorphism for $n<i\le k-1$ and a monomorphism for $i=n$. The same long exact sequence implies that $\pi_k(Y_{k+1})\to \pi_k(Z_{k+1})$ is surjective. We have already proved that $f_*:\pi_k(Y_{k+1})\to \pi_k(X)$ is an isomorphism. From the diagram
$$
\xymatrix{
\pi_k(Y_{k+1})\ar[dr]_-{\text{iso}} \ar[r]^-{\text{epi}} & \pi_k(Z_{k+1})\ar[d]^-{f_*} \\
& \pi_k(X)
}
$$
we can see that $f_*:\pi_k(Z_{k+1})\to \pi_k(X)$ is also an isomorphism.
\end{proof}

\begin{cor*} If $(X,A)$ is an $n$-connected pair of
CW-complexes, then there is a pair $(Z,A)$ homotopy equivalent to
$(X,A)$ rel $A$ such that the cells in $Z-A$ have dimension
greater than $n$.
\end{cor*}

\begin{proof} Let $f:(Z,A)\to (X,A)$ be an $n$-connected model
for $(X,A)$ obtained by attaching cells of dimension $>n$ to $A$.
Then $f_*:\pi_j(Z)\to \pi_j(X)$ is a monomorphism for $j=n$ and
an isomorphism for $j>n$. We will show that $f_*$ is an
isomorphism also for $j\leq n$. Consider the diagram:
$$
\xymatrix{
A\ar[d]_{i_Z} \ar[rd]^-{i_X} & \\
Z\ar[r]_-{f} & X
}
$$
The inclusions $i_X$ and $i_Z$ are $n$-equivalences.
Consequently, $f_*{i_Z}_*={i_X}_*:\pi_j(A)\to\pi_j(X)$ is an
epimorphism for $j=n$. Hence so is $f_*$. Next, ${i_X}_*$ and
${i_Z}_*$ are isomorphisms for $j<n$, hence so is $f_*$.

Finally, according to Whitehead Theorem, the weak homotopy
equivalence $f$ between two CW-complexes is a homotopy
equivalence.
\end{proof}

\begin{thma} Let $f:(Z,A)\to (X,A)$ and $f':(Z',A')\to (X',Z')$
be two $n$-connected CW-models. Given a map $g:(X,A)\to (X',A')$
there is a map $h:(Z,A)\to (Z',A')$ such that the following
diagram commutes up to homotopy rel $A$:
$$
\xymatrix{
Z\ar[r]^-{f}\ar[d]_h
& X\ar[d]^g\\
Z'\ar[r]_-{f'}
& X'
}
$$
The map $h$ is unique up to homotopy rel $A$.
\end{thma}

\begin{proof} By the previous corollary we can suppose that $Z-A$
has only cells of dimension $\ge n+1$. We can define $h/A$ as
$g/A$.
$$
\xymatrix{
A\ar[r]^-{h/A}\ar[d] & Z'\ar[d]^{f'}\\
Z\ar[r]_-{gf} & X'
}
$$
Replace $X'$ by the mapping cylinder $M_{f'}$ which is homotopy
equivalent to $X'$. Since $f':Z'\to X'$ is an $n$-connected
model, from the long exact sequence of the pair $(M_{f'},Z')$ we get that $\pi_i(M_{f'},Z')=0$  for $i\ge n+1$.
According to compression lemma \ref{HCWcoml} there exists
$h:Z\to Z'$ such that the diagram
$$
\xymatrix{
A\ar[r]^-{h/A}\ar[d] & Z'\ar[d]\\
Z\ar[r]\ar@{-->}[ur]_-{h} & M_{f'}
}$$
commutes up to homotopy rel $A$. This $h$ has required
properties. The proof that it is unique up to homotopy follows
the same lines.
\end{proof}
\end{cislo}