8. Homotopy theory
In this chapter, we develop some homotopy theory within type theory. Weuse the synthetic approach to homotopy theory introduced in\\crefcha:basics: Spaces, points, paths, and homotopies
are basicnotions, which are represented by types and elements of types, particularlythe identity type. The algebraic structure
of paths and homotopies isrepresented by the natural -groupoid
structure
on types, which is generatedby the rules for the identity type. Using higher inductive types, asintroduced in \\crefcha:hits, we can describe spaces directly by theiruniversal properties
.
There are several interesting aspects of this synthetic approach.First, it combines advantages of concrete models (such as topologicalspacesor simplicial sets)with advantages of abstract categorical frameworksfor homotopy theory (such as Quillen model categories).On the one hand,our proofs feel elementary, and refer concretely topoints, paths, and homotopies in types. On the other hand, our approach nevertheless abstracts away fromany concrete presentation
of these objects — for example,associativity of path concatenation is proved by path induction
, ratherthan by reparametrization of maps or by horn-filling conditions.Type theory seems to be a very convenient way to study the abstract homotopy theoryof -groupoids: by using the rules for the identity type, wecan avoid the complicated combinatorics involved in many definitions of-groupoids, and explicate only as much of thestructure 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
inKan simplicial sets,which is one model for the homotopy theory of -groupoids. Thus,our proofs apply to this model, and transferring them along the geometricrealization functor
from simplicial sets to topological spaces givesproofs of corresponding theorems in classical homotopy theory.However, though the details are work in progress, we can alsointerpret type theory in a wide variety of other categories
that look like the category of -groupoids, such as-toposes.Thus, proving a result in type theory will showthat 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-theoreticmethods and proofs. Some of our proofs are fairlydirect transcriptions of classical proofs. Others have a moretype-theoretic feel, and consist mainly of calculations with-groupoid operations, in a style that is very similar
to howcomputer scientists use type theory to reason about computer programs.One thing that seems to have permitted these new proofs is the fact that type theoryemphasizes different aspects of homotopy theory than other approaches:while tools like path induction and the universal properties of higherinductives are available in a setting like Kan simplicial sets, typetheory elevates their importance, because they are the onlyprimitive tools available for working with these types. Focusing onthese tools had led to new descriptions of familiar constructions suchas the universal cover
of the circle and the Hopf fibration, using just therecursion principles for higher inductive types. These descriptions arevery direct, and many of the proofs in this chapter involvecomputational calculations with such fibrations
.Another new aspect of our proofs is that they are constructive (assumingunivalence and higher inductives types are constructive); we describe anapplication of this to homotopy groups of spheres in\\crefsec:moreresults.
Third, our synthetic approach is very amenable to computer-checkedproofs in proof assistants such as Coq and Agda.Almost all of the proofsdescribed in this chapter have been computer-checked, and many of theseproofs were first given in a proof assistant, and then “unformalized”for this book. The computer-checked proofs are comparable in length andeffort to the informal proofs presented here, and in some cases they areeven shorter and easier to do.
Before turning to the presentation of our results, we briefly review somebasic concepts and theorems from homotopy theory for the benefit of the reader who is not familiar with them.We also give an overview of theresults 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 questionhomotopy theorists investigate is how to tell whether two spaces are thesame, where “the same” means homotopy equivalence(continuousmaps back and forth that compose to the identity
up to homotopy—thisgives the opportunity to “correct” maps that don’t exactly compose tothe identity). One common way to tell whether two spaces are the sameis to calculate algebraic invariants associated with a space,which include its homotopy groups
and homology
andcohomology 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 provideglobal information about a space, which can be used to tell spacesapart, and complements the local information provided by notions such ascontinuity. For example, the torus locally looks like the -sphere, but ithas a global difference
, because it as a hole in it, and this differenceis visible in the homotopy groups of these two spaces.
The simplest example of a homotopy group is the fundamental groupof a space, which is written ): Given a space and apoint in it, one can make a group whose elements are loops at (continuous paths from to ), considered up to homotopy, with thegroup operations given by the identity path (standing still), pathconcatenation, and path reversal. For example, the fundamental group ofthe -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 theidentity, because its inside can be filled in. In contrast, a loop onthe torus that goes through the donut’s hole is not homotopic to theidentity, so there are non-trivial elements in the fundamental group.
The higher homotopy groups provide additional information about aspace. Fix a point in , and consider the constant path. Then the homotopy classes of homotopies between and itself form a group , which tells us something aboutthe two-dimensional structure of the space. Then ) is thegroup of homotopy classes of homotopies between homotopies, and so on.One of the basic problems of algebraic topology iscalculating the homotopy groups of a space , which meansgiving a group isomorphism between and some more directdescription of a group (e.g., by a multiplication table orpresentation). Somewhat surprisingly, this is a very difficultquestion, even for spaces as simple as the spheres. As can be seen from\\creftab:homotopy-groups-of-spheres, some patterns emerge in thehigher homotopy groups of spheres, but there is no general formula, andmany 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 | |||||||||
\\addlinespace[3pt] \\midrule | \\colorboxxG | \\colorboxxF | \\colorboxxE | \\colorboxxD | \\colorboxxC | \\colorboxxB | \\colorboxxA | ||
\\addlinespace[3pt] | \\colorboxxH | \\colorboxxG | \\colorboxxF | \\colorboxxE | \\colorboxxD | \\colorboxxC | \\colorboxxB | ||
\\addlinespace[3pt] | \\colorboxxH | \\colorboxxG | \\colorboxxF | \\colorboxxE | \\colorboxxD | \\colorboxxC | |||
\\addlinespace[3pt] | \\colorboxxI | \\colorboxxH | \\colorboxxG | \\colorboxxF | \\colorboxxE | \\colorboxxD | |||
\\addlinespace[3pt] | \\colorboxxI | \\colorboxxH | \\colorboxxG | \\colorboxxF | \\colorboxxE | ||||
\\addlinespace[3pt] | \\colorboxxJ | \\colorboxxI | \\colorboxxH | \\colorboxxG | \\colorboxxF | ||||
\\addlinespace[3pt] | \\colorboxxJ | \\colorboxxI | \\colorboxxH | \\colorboxxG | |||||
\\addlinespace[3pt] | \\colorboxxK | \\colorboxxJ | \\colorboxxI | \\colorboxxH | |||||
\\addlinespace[3pt] | \\colorboxxK | \\colorboxxJ | \\colorboxxI | ||||||
\\addlinespace[3pt] | \\colorboxxL | \\colorboxxK | \\colorboxxJ | ||||||
\\addlinespace[3pt] | \\colorboxxL | \\colorboxxK | |||||||
\\addlinespace[3pt] | \\colorboxxM | \\colorboxxL | |||||||
\\addlinespace[3pt] | \\colorboxxM | ||||||||
\\addlinespace[3pt]\\bottomrule |


One way of understanding this complexity is through the correspondencebetween spaces and -groupoidsintroduced in \\crefcha:basics.As discussed in \\crefsec:circle, the 2-sphere is presented by a higherinductive type with one point and one 2-dimensional loop. Thus, onemight wonder why is , when the type has nogenerators creating 3-dimensional cells. It turns out that thegenerating element of is constructed using theinterchange law described in the proof of \\crefthm:EckmannHilton: thealgebraic structure of an -groupoid includes non-trivialinteractions between levels, and these interactions create elements ofhigher homotopy groups.
Type theory provides a natural setting for investigating this structure, aswe can easily define the higher homotopy groups. Recall from \\crefdef:loopspace that for , the-fold iterated loop space of a pointed type is definedrecursively by:
This gives a space (i.e. a type) of -dimensional loops, which itself hashigher homotopies. We obtain the set of -dimensional loops bytruncation (this was also defined as an example in\\autorefsec:free-algebras):
Definition 8.0.1 (Homotopy Groups).
Given and a pointed type, we define the homotopy groups of at by
Since , the path concatenation and inversion operations on induce operations on making it into a group ina straightforward way. If , then the group isabelian, by the Eckmann–Hilton argument (\\autorefthm:EckmannHilton).It is convenient to also write ,but this case behaves somewhat differently: not only is it not a group,it is defined without reference to any basepoint in .
This definition is a suitable one for investigating homotopy groupsbecause the (higher) inductive definition of a type presents asa free type, analogous to a free -groupoid,and thispresentation determines but does not explicitly describethe higher identity types of . The identity types are populated byboth the generators (, for the circle) and the results of applying to them all of the groupoidoperations (identity, composition, inverses, associativity, interchange,…). Thus, the higher-inductive presentation of a space allows usto pose the question “what does the identity type of really turn outto be?” though it can take some significant mathematics to answer it.This is a higher-dimensional generalization
of a familiar fact in typetheory: characterizing the identity type of can take some work,even if is an ordinary inductive type, such as the natural numbers
or booleans. For example, the theorem that is differentfrom does not follow immediately from the definition;see \\autorefsec:compute-coprod.
The univalence axiom plays an essential role in calculating homotopygroups (without univalence, type theory is compatible with aninterpretation where all paths, including, for example, the loop on thecircle, are reflexivity
). We will see this in the calculation of thefundamental group of the circle below: the map from to is defined by mapping a loop on the circle to anautomorphism
of the set , so that, for example, is sent to (where and are automorphisms of viewed, by univalence, as paths in the universe
), and then applyingthe automorphism to 0. Univalence produces non-trivial paths in theuniverse, and this is used to extract information from paths in higherinductive types.
In this chapter, we first calculate some homotopy groups of spheres,including (\\autorefsec:pi1-s1-intro), for (\\autorefsec:conn-susp,\\autorefsec:pik-le-n), and byway of the Hopf fibration (\\autorefsec:hopf) and a long-exact-sequenceargument (\\autorefsec:long-exact-sequence-homotopy-groups), and by way of the Freudenthal suspension theorem(\\autorefsec:freudenthal). Next, we discuss the van Kampen theorem(\\autorefsec:van-kampen), which characterizes the fundamental group ofa pushout, and the status of Whitehead’s principle (when is a map thatinduces an equivalence on all homotopy groups an equivalence?)(\\autorefsec:whitehead). Finally, we include brief summaries ofadditional results that are not included in the book, such as for , the Blakers–Massey theorem, and aconstruction 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.