# General Topology/Homotopy

Definition (homotopy):
Let $X,Y$ be topological spaces, and let $f,g:X\to Y$ be two continuous maps. A homotopy between $f$ and $g$ is a continuous map
    $H:[0,1]\times X\to Y$, such that: $\forall x\in X:H_{0}(x)=f(x),H_{1}(x)=g(x)$.
(Note that the first argument of $H$ is usually denoted in subscript.) In the case of the existence of such an $H$, the functions $f$ and $g$ are said to be homotopic to each other.
This means that $H$ is a "continuous transformation" of $f$ into $g$ or vice versa.
Definition (relative homotopy):
Let $X$ be a topological space, and let $A\subseteq X$ be a subset. If $Y$ is another topological space, and if $f,g:X\to Y$ are continuous functions, then $f$ and $g$ are said to be homotopic relative $A$ (in short: $f\simeq g\operatorname {rel} A$) if there exists a homotopy $H:I\times X\to Y$ between $f$ and $g$ such that $H_{t}(a)=f(a)=g(a)$ for all $(t,a)\in I\times A$.
Proposition (relative homotopy is an equivalence relation):
If $X$ is a topological space, $A\subseteq X$ a subset and $Y$ another topological space, then the relation
    $f\simeq g\operatorname {rel} A$
is an equivalence relation on ${\mathcal {C}}(X,Y)$.
Proof: First, note that by defining $H_{t}(x):=f(x)$ for $(t,x)\in [0,1]\times X$, that $H$ is continuous, since $H^{-1}(U)=[0,1]\times f^{-1}(U)$ for $U\subseteq Y$ open, from which we gain reflexivity as also $f(a)=H_{t}(a)$ whenever $a\in A$. Symmetry follows upon considering, given a homotopy $H$ from $f$ to $g$, the homotopy ${\overline {H}}_{t}(x):=H_{1-t}(x)$, which is continuous as the composition of $H$ with the continuous function $(t,x)\mapsto (1-t,x)$; indeed, the latter map is continuous since both of its components are; it is also a homotopy relative to $A$, since $H_{1-t}(a)=f(a)=g(a)$ for $a\in A$. Finally, note that transitivity holds, since if $f\sim g$ via the homotopy $H$ and $g\sim h$ via the homotopy $H'$, then $f\sim h$ via the homotopy
    $H*H'(t,x):={\begin{cases}H(2t,x)&t\leq {\frac {1}{2}}\\H'(2t-1,x)&t\geq {\frac {1}{2}}\end{cases}}$,
which is continuous since it is continuous on two closed sets that make up the whole space and relative to $A$ since both $H$ and $H'$ are relative to $A$. $\Box$
Definition (retract):
Let $X$ be a topological space and let $A$ be a subset of $X$. A retract of $X$ onto $A$ is a continuous function $r:X\to A$ so that $r|_{A}=\operatorname {Id} _{A}$, the identity.
Definition (deformation retraction):
Let $X$ be a topological space and let $A$ be a subset of $X$. A deformation retraction of $X$ onto $A$ is a continuous function $r:[0,1]\times X\to X$ so that $r_{0}(x)=x$ for all $x\in X$ (that is, $r_{0}=\operatorname {Id} _{X}$) and $r_{1}$ is a retract onto $A$.
Note that the first argument is denoted in the lower index, so that instead of $r(t,x)$ we write $r_{t}(x)$.
That is, a deformation retraction is a homotopy between the identity and a retract onto $A$.
Definition (homotopy equivalence):
Let $X$ and $Y$ be topological spaces. A homotopy equivalence between $X$ and $Y$ is a pair of continuous functions $f:X\to Y$ and $g:Y\to X$ so that $g\circ f\simeq \operatorname {Id} _{X}$ and $f\circ g\simeq \operatorname {Id} _{Y}$.
Proposition (deformation retraction induces homotopy equivalence):
Let $X$ be a topological space, let $A\subseteq X$ be a subset, and let $r:[0,1]\times X\to X$ be a deformation retraction of $X$ onto $A$. Then a homotopy equivalence $X\simeq A$ is given by the pair $r_{1}:X\to A$ and $\iota :A\to X$, $\iota (a)=a$ being the inclusion.
Proof: We have $r_{1}\circ \iota =\operatorname {Id} _{A}$, which is equal (and hence homotopic) to $\operatorname {Id} _{A}$. Further, a homotopy between $\operatorname {Id} _{X}$ and $\iota \circ r_{1}=r_{1}$ is given by $r$ itself. $\Box$
Definition (contractible):
Let $X$ be a topological space. $X$ is called contractible iff there exists a point $x_{0}\in X$ so that $X$ deformation retracts onto $\{X_{0}\}$.
Proposition (contractible spaces are path-connected):
Let $X$ be a contractible space, that contracts to a point $x_{0}\in X$. Then any two points $x,y\in X$ can be connected by a path that runs through $x_{0}$.
Proof: For any point $x\in X$, if $r:[0,1]\times X\to X$ is the deformation retraction of $X$ onto $\{x_{0}\}$, we get a path from $x$ to $x_{0}$ by the way of
    $\gamma :[0,1]\to X,\gamma (t):=r_{t}(x)$,
which is continuous as the composition of continuous functions, since the map $t\mapsto (t,x)$ is continuous, since the first component is the identity and the second the constant function. $\Box$
Definition (nullhomotopic):
Let $f:X\to Y$ be a continuous function between topological spaces. $f$ is said to be nullhomotopic iff it is homotopic to a constant function, that is, to a function $g:X\to Y$ such that there exists $y_{0}\in Y$ so that $g(x)=y_{0}$ for all $x\in X$.
Proposition (characterisation of contractibility):
Let $X$ be a topological space. The following are equivalent:
* $X$ is contractible
* The identity map on $X$ is nullhomotopic
* </math>X</math> is homotopy equivalent to a one-point space
* For every topological space $Z$, every continuous function $f:Z\to X$ is nullhomotopic
* For every topological space $Z$, any two continuous functions $f:Z\to X$ and $g:Z\to X$ are homotopic
Proof: Suppose first that $X$ is contractible, and let $r:[0,1]\times X\to X$ be the contraction. Then $r$ is simultaneously a homotopy between the identity and a constant map, where the latter has the value of the point onto which $X$ contracts. If the identity is homotopic to a constant map, and $H:[0,1]\times X\to X$ is the respective homotopy, then $H$ is also a deformation retraction and we conclude 3. since this deformation retraction induces a homotopy equivalence between a one-point space and $X$. Let now $Z$ be a topological space and $f:Z\to X$ a continuous function. Suppose further that $g:X\to \{x_{0}\}$ and $h:\{x_{0}\}\to X$ constitute a homotopy equivalence. Then in particular $h\circ g\simeq \operatorname {Id} _{X}$ via some homotopy $H$. But $h\circ g$ is a constant map. We then get $f\simeq h\circ g\circ f$ via the homotopy ${\tilde {H}}(t,z):=H(t,f(z)$, so that $f$ is nullhomotopic. Suppose now that $f:Z\to X$ and $g:Z\to X$ are two continuous functions. They will both be nullhomotopic, and if we can show that $X$ is path-connected and ${\tilde {f}}$ is the constant function to which $f$ is homotopic and $x_{0}:={\tilde {f}}(z)$ for any $z$, then they will both be homotopic to ${\tilde {f}}$, since ${\tilde {f}}$ is homotopic to any constant map via $H(t,x):=(z\mapsto \gamma (t))$, where $\gamma$ is a curve from $x_{0}$ to the point of the other constant map $Z\to X$. But $X$ is path-connected, since upon choosing $Z:=\{z_{0},z_{1}\}$, the two-point space with discrete topology, we get that the (continuous) function sending $z_{0}$ and $z_{1}$ to two points $x_{0},x_{1}\in X$ is nullhomotopic, and the homotopy $H$ yields a path between $x_{0}$ and $x_{1}$ by the way of
    $\gamma :=\rho _{0}*{\overline {\rho _{1}}}$, where $\rho _{0}(t):=H(t,z_{0})$ and $\rho _{1}(t):=H(t,z_{1})$.
Finally, if any two continuous functions from any space to $X$ are homotopic, we may as well choose $Z:=X$ and one map to be any constant map and the other one the identity; the homotopy between the two then yields the desired deformation retraction. $\Box$
Definition (homotopy extension property):
Let $X$ be a topological space and $A\subseteq X$ a subset. The pair $(X,A)$ is said to have the homotopy extension property if and only if for every topological space $Y$ and every continuous function $f:X\to Y$ such that $f|_{A}$ is homotopic to some other map $H_{1}$ via a homotopy $H$, there exists a homotopy ${\tilde {H}}$ so that ${\tilde {H}}_{0}=f$ and ${\tilde {H}}|_{[0,1]\times A}=H$.
Proposition (characterisation of the homotopy extension property via retraction):
Let $X$ be a topological space and $A\subseteq X$ a subset. $(X,A)$ has the homotopy extension property if and only if there exists a retraction from $[0,1]\times X$ onto $\{0\}\times X\cup [0,1]\times A$.
Proof: Suppose first that $(X,A)$ does have the homotopy extension property. Then pick $Y:=\{0\}\times X\cup [0,1]\times A$ and define $f:X\to Y$ by $f(x)=(0,x)$. Then $f|_{A}$ is homotopic to the function $g(a)=(1,a)$ via $H(t,x)=(t,x)$, and then by the homotopy extension property we get a homotopy ${\tilde {H}}$ of $f$ to some other function ${\tilde {H}}$. By the form of $H$, ${\tilde {H}}$ restricts to the identity on $\{0\}\times X\cup [0,1]\times A\subseteq [0,1]\times X$, and further it maps $[0,1]\times X$ to $\{0\}\times X\cup [0,1]\times A$, so that ${\tilde {H}}$ is a retraction. Suppose now that $\{0\}\times X\cup [0,1]\times A$ is a retract of $[0,1]\times X$ via the function $r:[0,1]\times X\to Y$, where we define $Y:=\{0\}\times X\cup [0,1]\times A$ to ease notation. Let $f:X\to Z$ (where $Z$ is some topological space) be a function and $H:[0,1]\times A\to A$ a homotopy so that $H_{0}=f|_{A}$. We define
    ${\tilde {H}}:[0,1]\times X\to Z,{\tilde {H}}(t,x):={\begin{cases}f(x)&r(t,x)\in \{0\}\times X\\{\tilde {H}}(r(t,x))&r(t,x)\in [0,1]\times A\end{cases}}$
and claim that it is continuous. Note that ${\tilde {H}}$ is the composition of $r$ (which is continuous) with the map
    $\eta :Y\to Z,\eta (t,x):={\begin{cases}f(x)&t=0\\H(t,x)&t>0\end{cases}}$,
so that it suffices to prove that $\eta$ is continuous. To this end, it will be sufficient to prove that whenever $U\subseteq Y$ is a set such that $U\cap \{0\}\times X$ and $U\cap [0,1]\times A$ are open, then $U$ itself is open; indeed, if this is the case, then whenever $V$ is an open subset of $Z$, we'll have that
    $\eta ^{-1}(V)=\eta ^{-1}(V)\cap \{0\}\times X\cup \eta ^{-1}\cap [0,1]\times A=\eta |_{\{0\}\times X}^{-1}(V)\cup \eta |_{[0,1]\times A}^{-1}(V)$
is open. So suppose that $U\subseteq Y$ has said property. We show that $U$ is open by fixing a $(t,x)\in U$ and finding an open neighbourhood of $(t,x)$ in $Y$ that is contained within $U$. If $(t,x)\in (0,1]\times A$, then we may just choose a suitable product neighbourhood since cylinders are a basis of the product topology and by the definition of the subspace topology. If $t=0$ and $x\notin {\overline {A}}$, we may just choose the set $U\cap \{0\}\times X$. The only remaining case is the case $x\in {\overline {A}}$ and $t=0$. If that is the case, suppose first that $s>0$, and consider the point $(s,x)\in [0,1]\times X$. We write the retraction $r:[0,1]\times X\to Y$ as $r(s,x)=(r_{1}(s,x),r_{2}(s,x))$. Since $x\in {\overline {A}}$ and $r_{1}(s,y)=s$ for all $y\in A$, we get that $r_{1}(s,x)=s$, since denoting the neighbourhood filter of $(s,x)$ by $N(s,x)$, we get that $r_{1}(N(s,x))$ converges to $r_{1}(s,x)$ by continuity of $r_{1}$ (which follows from the characterisation of continuity of functions to a space with initial topology), but $s$ is contained in each set $r_{1}(W)$, $W$ being a neighbourhood of $(s,x)$, since $W$, by definition of the product topology, always contains a point of the form $(s,y)$, where $y\in A$, and we conclude since $[0,1]$ is Hausdorff.
For each $n\in \mathbb {N}$, we define $O_{n}$ to be the maximal open subset of $X$ so that $[0,1/n)\times (O_{n}\cap A)\subseteq U$; a maximal such set exists since sets having this property are closed under union, and we take the union over all the sets having this property. Then define
    $O:=\bigcup _{n\in \mathbb {N} }O_{n}$;
$O$ is then an open subset of $X$. Now $x\in O$, since otherwise, for all $n\in \mathbb {N}$ we have $x\notin O_{n}$. However, then for arbitrary $s>0$ and $n\in \mathbb {N}$, we get that $r_{2}(s,x)\notin O_{n}$, since if $r_{2}(s,x)\in O_{n}$, then by continuity of $r_{2}$, we find $\epsilon >0$ and $V\subseteq X$ open with $x\in V$, so that $r_{2}((s-\epsilon ,s+\epsilon )\times V)\subseteq O_{n}$, which implies in particular that $r_{2}(\{s\}\times (V\cap A)\subseteq O_{n}$. However, for $v\in V\cap A$, we simply have $r_{2}(s,v)=v$ since $r$ is a retraction, and hence we get $r_{2}(\{s\}\times (V\cap A)=V\cap A$ and $V\cap A\subseteq O_{n}$. Hence, $V\subseteq O_{n}$ since $(V\cap A)\times [0,1/n)\subseteq (O_{n}\cap A)\times [0,1/n)$, and thus $x\in V$ implies $x\in O_{n}$. However, note that still $r_{2}(s,x)\in A$; indeed, by what was proven above, we have $r_{1}(s,x)=s>0$, and then, since $r$ is a retraction whence $r(s,x)\in Y$, we must have $r_{2}(s,x)\in A$. We conclude that $r_{2}(s,x)\in A\setminus O$ for all $s>0$. Now we observe that if $\pi _{X}$ is the projection from $I\times X$ to $X$, then $\pi _{X}(U\cap \{0\}\times X)\cap A\subseteq O$, since whenever $(x,0)\in U$ so that $x\in A$, we find an open $W\subseteq A$ and an $n\in \mathbb {N}$ such that $(x,0)\in [0,1/n)\times W\subseteq U$, and we then write $W=A\cap {\tilde {W}}$, where ${\tilde {W}}$ is open, and obtain $x\in {\tilde {W}}\subseteq O_{n}\subseteq O$. By continuity of $r_{2}(\cdot ,x)$, we then obtain $r_{2}(0,x)\notin U$, since the preimage of the complement of $O$ will be closed in $[0,1]$. But $r_{2}(0,x)=x$, so that in fact $x\notin U$, a contradiction.
Hence, choose $n\in \mathbb {N}$ so that $x\in O_{n}$; then the neighbourhood $[0,1/n)\times O_{n}\cap Y$ will do as an open neighbourhood of $(0,x)$ contained within $U$, using the definitions of the subspace and product topologies. $\Box$