# 8. Homotopy theory

In this chapter, we develop some homotopy theory within type theory^{}. We
use the *synthetic approach* to homotopy theory introduced in
\crefcha:basics: Spaces, points, paths, and homotopies^{} are basic
notions, which are represented by types and elements of types, particularly
the identity type. The algebraic structure^{} of paths and homotopies is
represented by the natural $\mathrm{\infty}$-groupoid^{}
structure^{} on types, which is generated
by the rules for the identity type. Using higher inductive types, as
introduced in \crefcha:hits, we can describe spaces directly by their
universal properties^{}.

There are several interesting aspects of this synthetic approach.
First, it combines advantages of concrete models (such as topological
spaces^{}
or simplicial sets)
with advantages of abstract categorical frameworks
for homotopy theory (such as Quillen model categories).
On the one hand,
our proofs feel elementary, and refer concretely to
points, paths, and homotopies in types. On the other hand, our approach nevertheless abstracts away from
any concrete presentation^{} of these objects — for example,
associativity of path concatenation is proved by path induction^{}, rather
than by reparametrization of maps $[0,1]\to X$ or by horn-filling conditions.
Type theory seems to be a very convenient way to study the abstract homotopy theory
of $\mathrm{\infty}$-groupoids: by using the rules for the identity type, we
can avoid the complicated combinatorics involved in many definitions of
$\mathrm{\infty}$-groupoids, and explicate only as much of the
structure as is needed in any particular proof.

The abstract nature of type theory means that our proofs apply automatically in a variety^{} of settings.
In particular, as mentioned previously, homotopy type theory has one interpretation^{} in
Kan simplicial sets,
which is one model for the homotopy theory of $\mathrm{\infty}$-groupoids. Thus,
our proofs apply to this model, and transferring them along the geometric
realization functor^{} from simplicial sets to topological spaces gives
proofs of corresponding theorems in classical homotopy theory.
However, though the details are work in progress, we can also
interpret type theory in a wide variety of other categories^{}
that look like the category of $\mathrm{\infty}$-groupoids, such as
$(\mathrm{\infty},1)$-toposes.
Thus, proving a result in type theory will show
that it holds in these settings as well.
This sort of extra generality is well-known as a property of ordinary categorical logic:
univalent foundations extends it to homotopy theory as well.

Second, our synthetic approach has suggested new type-theoretic
methods and proofs. Some of our proofs are fairly
direct transcriptions of classical proofs. Others have a more
type-theoretic feel, and consist mainly of calculations with
$\mathrm{\infty}$-groupoid operations^{}, in a style that is very similar^{} to how
computer scientists use type theory to reason about computer programs.
One thing that seems to have permitted these new proofs is the fact that type theory
emphasizes different aspects of homotopy theory than other approaches:
while tools like path induction and the universal properties of higher
inductives are available in a setting like Kan simplicial sets, type
theory elevates their importance, because they are the *only*
primitive tools available for working with these types. Focusing on
these tools had led to new descriptions of familiar constructions such
as the universal cover^{} of the circle and the Hopf fibration, using just the
recursion principles for higher inductive types. These descriptions are
very direct, and many of the proofs in this chapter involve
computational calculations with such fibrations^{}.
Another new aspect of our proofs is that they are constructive (assuming
univalence and higher inductives types are constructive); we describe an
application of this to homotopy groups of spheres in
\crefsec:moreresults.

Third, our synthetic approach is very amenable to computer-checked proofs in proof assistants such as Coq and Agda. Almost all of the proofs described in this chapter have been computer-checked, and many of these proofs were first given in a proof assistant, and then “unformalized” for this book. The computer-checked proofs are comparable in length and effort to the informal proofs presented here, and in some cases they are even shorter and easier to do.

Before turning to the presentation of our results, we briefly review some basic concepts and theorems from homotopy theory for the benefit of the reader who is not familiar with them. We also give an overview of the results proved in this chapter.

Homotopy theory is a branch of algebraic topology, and uses tools from abstract algebra,
such as group theory, to investigate properties of spaces. One question
homotopy theorists investigate is how to tell whether two spaces are the
same, where “the same” means *homotopy equivalence ^{}*
(continuous
maps back and forth that compose to the identity

^{}up to homotopy—this gives the opportunity to “correct” maps that don’t exactly compose to the identity). One common way to tell whether two spaces are the same is to calculate

*algebraic invariants*associated with a space, which include its

*homotopy groups*and

^{}*homology*and

^{}*cohomology groups*. Equivalent

^{}^{}spaces have isomorphic

^{}homotopy/(co)homology groups, so if two spaces have different groups, then they are not equivalent. Thus, these algebraic invariants provide global information about a space, which can be used to tell spaces apart, and complements the local information provided by notions such as continuity. For example, the torus locally looks like the $2$-sphere, but it has a global difference

^{}, because it as a hole in it, and this difference is visible in the homotopy groups of these two spaces.

The simplest example of a homotopy group is the *fundamental group ^{}*
of a space, which is written ${\pi}_{1}(X,{x}_{0}$): Given a space $X$ and a
point ${x}_{0}$ in it, one can make a group whose elements are loops at
${x}_{0}$ (continuous paths from ${x}_{0}$ to ${x}_{0}$), considered up to homotopy, with the
group operations given by the identity path (standing still), path
concatenation, and path reversal. For example, the fundamental group of
the $2$-sphere is trivial, but the fundamental group of the torus is not,
which shows that the sphere and the torus are not homotopy equivalent.
The intuition is that every loop on the sphere is homotopic

^{}to the identity, because its inside can be filled in. In contrast, a loop on the torus that goes through the donut’s hole is not homotopic to the identity, so there are non-trivial elements in the fundamental group.

The *higher homotopy groups* provide additional information about a
space. Fix a point ${x}_{0}$ in $X$, and consider the constant path
${\mathrm{\U0001d5cb\U0001d5be\U0001d5bf\U0001d5c5}}_{{x}_{0}}$. Then the homotopy classes of homotopies between ${\mathrm{\U0001d5cb\U0001d5be\U0001d5bf\U0001d5c5}}_{{x}_{0}}$
and itself form a group ${\pi}_{2}(X,{x}_{0})$, which tells us something about
the two-dimensional structure of the space. Then ${\pi}_{3}(X,{x}_{0}$) is the
group of homotopy classes of homotopies between homotopies, and so on.
One of the basic problems of algebraic topology is
*calculating the homotopy groups of a space $X$*, which means
giving a group isomorphism between ${\pi}_{k}(X,{x}_{0})$ and some more direct
description of a group (e.g., by a multiplication table or
presentation). Somewhat surprisingly, this is a very difficult
question, even for spaces as simple as the spheres. As can be seen from
\creftab:homotopy-groups-of-spheres, some patterns emerge in the
higher homotopy groups of spheres, but there is no general formula^{}, and
many homotopy groups of spheres are currently still unknown.

xA\OPTcolormodel\OPTcolxA \definecolorxB\OPTcolormodel\OPTcolxB \definecolorxC\OPTcolormodel\OPTcolxC \definecolorxD\OPTcolormodel\OPTcolxD \definecolorxE\OPTcolormodel\OPTcolxE \definecolorxF\OPTcolormodel\OPTcolxF \definecolorxG\OPTcolormodel\OPTcolxG \definecolorxH\OPTcolormodel\OPTcolxH \definecolorxI\OPTcolormodel\OPTcolxI \definecolorxJ\OPTcolormodel\OPTcolxJ \definecolorxK\OPTcolormodel\OPTcolxK \definecolorxL\OPTcolormodel\OPTcolxL \definecolorxM\OPTcolormodel\OPTcolxM

\toprule | ${\mathbb{S}}^{0}$ | ${\mathbb{S}}^{1}$ | ${\mathbb{S}}^{2}$ | ${\mathbb{S}}^{3}$ | ${\mathbb{S}}^{4}$ | ${\mathbb{S}}^{5}$ | ${\mathbb{S}}^{6}$ | ${\mathbb{S}}^{7}$ | ${\mathbb{S}}^{8}$ |

\addlinespace[3pt] \midrule${\pi}_{1}$ | $0$ | $\mathbb{Z}$ | \colorboxxG $0$ | \colorboxxF $0$ | \colorboxxE $0$ | \colorboxxD $0$ | \colorboxxC $0$ | \colorboxxB $0$ | \colorboxxA $0$ |

\addlinespace[3pt] ${\pi}_{2}$ | $0$ | $0$ | \colorboxxH $\mathbb{Z}$ | \colorboxxG $0$ | \colorboxxF $0$ | \colorboxxE $0$ | \colorboxxD $0$ | \colorboxxC $0$ | \colorboxxB $0$ |

\addlinespace[3pt] ${\pi}_{3}$ | $0$ | $0$ | $\mathbb{Z}$ | \colorboxxH $\mathbb{Z}$ | \colorboxxG $0$ | \colorboxxF $0$ | \colorboxxE $0$ | \colorboxxD $0$ | \colorboxxC $0$ |

\addlinespace[3pt] ${\pi}_{4}$ | $0$ | $0$ | ${\mathbb{Z}}_{2}$ | \colorboxxI ${\mathbb{Z}}_{2}$ | \colorboxxH $\mathbb{Z}$ | \colorboxxG $0$ | \colorboxxF $0$ | \colorboxxE $0$ | \colorboxxD $0$ |

\addlinespace[3pt] ${\pi}_{5}$ | $0$ | $0$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{2}$ | \colorboxxI ${\mathbb{Z}}_{2}$ | \colorboxxH $\mathbb{Z}$ | \colorboxxG $0$ | \colorboxxF $0$ | \colorboxxE $0$ |

\addlinespace[3pt] ${\pi}_{6}$ | $0$ | $0$ | ${\mathbb{Z}}_{12}$ | ${\mathbb{Z}}_{12}$ | \colorboxxJ ${\mathbb{Z}}_{2}$ | \colorboxxI ${\mathbb{Z}}_{2}$ | \colorboxxH $\mathbb{Z}$ | \colorboxxG $0$ | \colorboxxF $0$ |

\addlinespace[3pt] ${\pi}_{7}$ | $0$ | $0$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{2}$ | $\mathbb{Z}\times {\mathbb{Z}}_{12}$ | \colorboxxJ ${\mathbb{Z}}_{2}$ | \colorboxxI ${\mathbb{Z}}_{2}$ | \colorboxxH $\mathbb{Z}$ | \colorboxxG $0$ |

\addlinespace[3pt] ${\pi}_{8}$ | $0$ | $0$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{2}^{2}$ | \colorboxxK ${\mathbb{Z}}_{24}$ | \colorboxxJ ${\mathbb{Z}}_{2}$ | \colorboxxI ${\mathbb{Z}}_{2}$ | \colorboxxH $\mathbb{Z}$ |

\addlinespace[3pt] ${\pi}_{9}$ | $0$ | $0$ | ${\mathbb{Z}}_{3}$ | ${\mathbb{Z}}_{3}$ | ${\mathbb{Z}}_{2}^{2}$ | ${\mathbb{Z}}_{2}$ | \colorboxxK ${\mathbb{Z}}_{24}$ | \colorboxxJ ${\mathbb{Z}}_{2}$ | \colorboxxI ${\mathbb{Z}}_{2}$ |

\addlinespace[3pt] ${\pi}_{10}$ | $0$ | $0$ | ${\mathbb{Z}}_{15}$ | ${\mathbb{Z}}_{15}$ | ${\mathbb{Z}}_{24}\times {\mathbb{Z}}_{3}$ | ${\mathbb{Z}}_{2}$ | \colorboxxL $0$ | \colorboxxK ${\mathbb{Z}}_{24}$ | \colorboxxJ ${\mathbb{Z}}_{2}$ |

\addlinespace[3pt] ${\pi}_{11}$ | $0$ | $0$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{15}$ | ${\mathbb{Z}}_{2}$ | $\mathbb{Z}$ | \colorboxxL $0$ | \colorboxxK ${\mathbb{Z}}_{24}$ |

\addlinespace[3pt] ${\pi}_{12}$ | $0$ | $0$ | ${\mathbb{Z}}_{2}^{2}$ | ${\mathbb{Z}}_{2}^{2}$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{30}$ | ${\mathbb{Z}}_{2}$ | \colorboxxM $0$ | \colorboxxL $0$ |

\addlinespace[3pt] ${\pi}_{13}$ | $0$ | $0$ | ${\mathbb{Z}}_{12}\times {\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{12}\times {\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{2}^{3}$ | ${\mathbb{Z}}_{2}$ | ${\mathbb{Z}}_{60}$ | ${\mathbb{Z}}_{2}$ | \colorboxxM $0$ |

\addlinespace[3pt] \bottomrule |

^{}of integers, and ${\mathbb{Z}}_{m}$ is the cyclic group

^{}of order $m$.

One way of understanding this complexity is through the correspondence
between spaces and $\mathrm{\infty}$-groupoids
introduced in \crefcha:basics.
As discussed in \crefsec:circle, the 2-sphere is presented by a higher
inductive type with one point and one 2-dimensional loop. Thus, one
might wonder why ${\pi}_{3}({\mathbb{S}}^{2})$ is $\mathbb{Z}$, when the type ${\mathbb{S}}^{2}$ has no
generators^{} creating 3-dimensional cells. It turns out that the
generating element of ${\pi}_{3}({\mathbb{S}}^{2})$ is constructed using the
interchange law described in the proof of \crefthm:EckmannHilton: the
algebraic structure of an $\mathrm{\infty}$-groupoid includes non-trivial
interactions between levels, and these interactions create elements of
higher homotopy groups.

Type theory provides a natural setting for investigating this structure, as we can easily define the higher homotopy groups. Recall from \crefdef:loopspace that for $n:\mathbb{N}$, the $n$-fold iterated loop space of a pointed type $(A,a)$ is defined recursively by:

${\mathrm{\Omega}}^{0}(A,a)$ | $=(A,a)$ | ||

${\mathrm{\Omega}}^{n+1}(A,a)$ | $={\mathrm{\Omega}}^{n}(\mathrm{\Omega}(A,a)).$ |

This gives a *space* (i.e. a type) of $n$-dimensional loops, which itself has
higher homotopies. We obtain the set of $n$-dimensional loops by
truncation (this was also defined as an example in
\autorefsec:free-algebras):

###### Definition 8.0.1 (Homotopy Groups).

Given $n\mathrm{\ge}\mathrm{1}$ and $\mathrm{(}A\mathrm{,}a\mathrm{)}$ a pointed type, we define the homotopy groups of $A$ at $a$ by

$${\pi}_{n}(A,a):\equiv {\parallel {\mathrm{\Omega}}^{n}(A,a)\parallel}_{0}$$ |

Since $n\ge 1$, the path concatenation and inversion operations on
${\mathrm{\Omega}}^{n}(A)$ induce operations on ${\pi}_{n}(A)$ making it into a group in
a straightforward way. If $n\ge 2$, then the group ${\pi}_{n}(A)$ is
abelian^{}, by the Eckmann–Hilton argument (\autorefthm:EckmannHilton).
It is convenient to also write ${\pi}_{0}(A):\equiv \parallel A{\parallel}_{0}$,
but this case behaves somewhat differently: not only is it not a group,
it is defined without reference to any basepoint in $A$.

This definition is a suitable one for investigating homotopy groups
because the (higher) inductive definition of a type $X$ presents $X$ as
a free type, analogous to a free $\mathrm{\infty}$-groupoid,
and this
presentation *determines* but does not *explicitly describe*
the higher identity types of $X$. The identity types are populated by
both the generators ($\mathrm{\U0001d5c5\U0001d5c8\U0001d5c8\U0001d5c9}$, for the circle) and the results of applying to them all of the groupoid
operations (identity, composition, inverses^{}, associativity, interchange,
…). Thus, the higher-inductive presentation of a space allows us
to pose the question “what does the identity type of $X$ really turn out
to be?” though it can take some significant mathematics to answer it.
This is a higher-dimensional generalization^{} of a familiar fact in type
theory: characterizing the identity type of $X$ can take some work,
even if $X$ is an ordinary inductive type, such as the natural numbers^{}
or booleans. For example, the theorem that ${0}_{\mathrm{\U0001d7d0}}$ is different
from ${1}_{\mathrm{\U0001d7d0}}$ does not follow immediately from the definition;
see \autorefsec:compute-coprod.

The univalence axiom plays an essential role in calculating homotopy
groups (without univalence, type theory is compatible^{} with an
interpretation where all paths, including, for example, the loop on the
circle, are reflexivity^{}). We will see this in the calculation of the
fundamental group of the circle below: the map from $\mathrm{\Omega}({\mathbb{S}}^{1})$ to $\mathbb{Z}$ is defined by mapping a loop on the circle to an
automorphism^{} of the set $\mathbb{Z}$, so that, for example, $\mathrm{\U0001d5c5\U0001d5c8\U0001d5c8\U0001d5c9}\text{centerdot}{\mathrm{\U0001d5c5\U0001d5c8\U0001d5c8\U0001d5c9}}^{-1}$ is sent to $\mathrm{\U0001d5cc\U0001d5ce\U0001d5bc\U0001d5bc\U0001d5be\U0001d5cc\U0001d5cc\U0001d5c8\U0001d5cb}\text{centerdot}\mathrm{\U0001d5c9\U0001d5cb\U0001d5be\U0001d5bd\U0001d5be\U0001d5bc\U0001d5be\U0001d5cc\U0001d5cc\U0001d5c8\U0001d5cb}$ (where
$\mathrm{\U0001d5cc\U0001d5ce\U0001d5bc\U0001d5bc\U0001d5be\U0001d5cc\U0001d5cc\U0001d5c8\U0001d5cb}$ and $\mathrm{\U0001d5c9\U0001d5cb\U0001d5be\U0001d5bd\U0001d5be\U0001d5bc\U0001d5be\U0001d5cc\U0001d5cc\U0001d5c8\U0001d5cb}$ are automorphisms of
$\mathbb{Z}$ viewed, by univalence, as paths in the universe^{}), and then applying
the automorphism to 0. Univalence produces non-trivial paths in the
universe, and this is used to extract information from paths in higher
inductive types.

In this chapter, we first calculate some homotopy groups of spheres,
including ${\pi}_{k}({\mathbb{S}}^{1})$ (\autorefsec:pi1-s1-intro), ${\pi}_{k}({\mathbb{S}}^{n})$ for $$ (\autorefsec:conn-susp,\autorefsec:pik-le-n), ${\pi}_{2}({\mathbb{S}}^{2})$ and ${\pi}_{3}({\mathbb{S}}^{2})$ by
way of the Hopf fibration (\autorefsec:hopf) and a long-exact-sequence
argument (\autorefsec:long-exact-sequence-homotopy-groups), and
${\pi}_{n}({\mathbb{S}}^{n})$ by way of the Freudenthal suspension theorem
(\autorefsec:freudenthal). Next, we discuss the van Kampen theorem^{}
(\autorefsec:van-kampen), which characterizes the fundamental group of
a pushout, and the status of Whitehead’s principle (when is a map that
induces an equivalence on all homotopy groups an equivalence?)
(\autorefsec:whitehead). Finally, we include brief summaries of
additional results that are not included in the book, such as
${\pi}_{n+1}({\mathbb{S}}^{n})$ for $n\ge 3$, the Blakers–Massey theorem, and a
construction of Eilenberg–Mac Lane spaces (\autorefsec:moreresults).
Prerequisites for this chapter include \autorefcha:typetheory,\autorefcha:basics,\autorefcha:hits,\autorefcha:hlevels as well as parts of \autorefcha:logic.

Title | 8. Homotopy theory |
---|---|

\metatable |