3 Kan Complexes
Recall that a Kan complex is a simplicial set $X$ with the property that, for $n > 0$ and $0 \leq i \leq n$, any morphism of simplicial sets $\sigma _0: \Lambda ^ n_ i \rightarrow X$ can be extended to an $n$simplex of $X$ (Definition 1.1.9.1). Kan complexes play an important role in the theory of $\infty $categories, for three different (but closely related) reasons:
 $(a)$
Every Kan complex is an $\infty $category (Example 1.3.0.3). Conversely, every $\infty $category $\operatorname{\mathcal{C}}$ contains a largest Kan complex $\operatorname{\mathcal{C}}^{\simeq } \subseteq \operatorname{\mathcal{C}}$ (obtained from $\operatorname{\mathcal{C}}$ by removing all noninvertible morphisms; see Construction 4.4.3.1), which is an important invariant of $\operatorname{\mathcal{C}}$. Consequently, understanding the homotopy theory of Kan complexes can be regarded as a first step towards understanding $\infty $categories in general.
 $(b)$
Let $\operatorname{\mathcal{C}}$ be an $\infty $category. To every pair of objects $X,Y \in \operatorname{\mathcal{C}}$, one can associate a Kan complex $\operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$ which we will refer to as the space of maps from $X$ to $Y$ (see Construction 4.6.1.1). These mapping spaces are essential to the structure of $\operatorname{\mathcal{C}}$. For example, we will see later that a functor of $\infty $categories $F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{D}}$ admits a homotopy inverse if and only if it is essentially surjective at the level of homotopy categories and induces a homotopy equivalence $\operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y) \rightarrow \operatorname{Hom}_{\operatorname{\mathcal{D}}}( F(X), F(Y) )$ for every pair of objects $X,Y \in \operatorname{\mathcal{C}}$ (see Theorem 4.6.2.17).
 $(c)$
The collection of all Kan complexes can be organized into an $\infty $category, which we will denote by $\operatorname{\mathcal{S}}$ and refer to as the $\infty $category of spaces (Construction 5.4.1.1). The $\infty $category $\operatorname{\mathcal{S}}$ plays a central role in the general theory of $\infty $categories, analogous to the role of $\operatorname{Set}$ in classical category theory. This can be articulated in several different ways:
To any $\infty $category $\operatorname{\mathcal{C}}$, one can associate a functor $h: \operatorname{\mathcal{C}}\rightarrow \operatorname{Fun}( \operatorname{\mathcal{C}}^{\operatorname{op}}, \operatorname{\mathcal{S}})$ called the Yoneda embedding, which is given informally (and up to homotopy equivalence) by the construction $C \mapsto \operatorname{Hom}_{\operatorname{\mathcal{C}}}( \bullet , C)$ (see Construction ). Like the classical Yoneda embedding, the functor $h$ is fully faithful: that is, it induces an equivalence on mapping spaces (Theorem ).
The $\infty $category $\operatorname{\mathcal{S}}$ has a pointed variant $\operatorname{\mathcal{S}}_{\ast }$, whose objects are pointed Kan complexes (Construction 5.4.3.1). This $\infty $category is equipped with a forgetful functor $\operatorname{\mathcal{S}}_{\ast } \rightarrow \operatorname{\mathcal{S}}$, given on objects by the construction $(X,x) \mapsto X$. This forgetful functor is an example of a left fibration of $\infty $categories (see Definition 4.2.1.1). In fact, it is a universal left fibration in the following sense: for any $\infty $category $\operatorname{\mathcal{C}}$, the construction
\[ ( F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}) \mapsto (u: \operatorname{\mathcal{C}}\times _{\operatorname{\mathcal{S}}} \operatorname{\mathcal{S}}_{\ast } \rightarrow \operatorname{\mathcal{C}}) \]induces a bijection from the set of isomorphism classes of functors $F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{S}}$ to the set of equivalence classes of left fibrations $\overline{\operatorname{\mathcal{C}}} \rightarrow \operatorname{\mathcal{C}}$ having essentially small fibers (Corollary 5.6.3.14).
The $\infty $category $\operatorname{\mathcal{S}}$ admits small colimits (Proposition ). Moreover, if $\operatorname{\mathcal{C}}$ is any other $\infty $category which admits small colimits, then evaluation on the Kan complex $\Delta ^{0} \in \operatorname{\mathcal{S}}$ induces an equivalence of $\infty $categories
\[ \operatorname{LFun}( \operatorname{\mathcal{S}}, \operatorname{\mathcal{C}}) \rightarrow \operatorname{\mathcal{C}}\quad \quad F \mapsto F( \Delta ^0), \]where $\operatorname{LFun}( \operatorname{\mathcal{S}}, \operatorname{\mathcal{C}})$ denotes the full subcategory of $\operatorname{Fun}(\operatorname{\mathcal{S}}, \operatorname{\mathcal{C}})$ spanned by those functors which preserve small colimits (Theorem ). In other words, the $\infty $category $\operatorname{\mathcal{S}}$ is freely generated under small colimits by the Kan complex $\Delta ^{0}$.
Our goal in this chapter is to give an exposition of the homotopy theory of Kan complexes. We begin in §3.1 by developing the basic vocabulary of simplicial homotopy theory. In particular, we introduce the notions of Kan fibration (Definition 3.1.1.1), anodyne morphism (Definition 3.1.2.1), and (weak) homotopy equivalence between simplicial sets (Definitions 3.1.6.1 and 3.1.6.11), and establish some of their basic formal properties.
Recall that, to any Kan complex $X$, we can associate a set $\pi _0(X)$ of connected components of $X$ (Definition 1.1.6.8). In §3.2, we associate to each base point $x \in X$ a sequence of groups $\{ \pi _{n}(X,x) \} _{n > 0}$, which we refer to as the homotopy groups of $X$ (Construction 3.2.2.4 and Theorem 3.2.2.10), and establish some of their essential properties. In particular, we prove a simplicial analogue of Whitehead's theorem: a morphism of Kan complexes $f: X \rightarrow Y$ is a homotopy equivalence if and only if it induces a bijection $\pi _{0}(X) \rightarrow \pi _0(Y)$ and isomorphisms $\pi _{n}(X,x) \rightarrow \pi _{n}(Y, f(x) )$, for every choice of base point $x \in X$ and every positive integer $n$ (Theorem 3.2.7.1).
A general simplicial set $X$ need not be a Kan complex. However, one can always find a weak homotopy equivalence $f: X \rightarrow Y$, where $Y$ is a Kan complex; in this case, we refer to $Y$ as a fibrant replacement for $X$ (in the case where $X$ is an $\infty $category, one can think of $Y$ as another $\infty $category obtained from $X$ by formally adjoining inverses of all morphisms: see Proposition 6.3.1.18). The existence of fibrant replacements has an easy formal proof (a special case of Quillen's small object argument; see §3.1.7), which gives very little information about the structure of the Kan complex $Y$. In §3.3, we outline another approach (due to Kan) which associates to each simplicial set $X$ a Kan complex $\operatorname{Ex}^{\infty }(X) = \varinjlim _{n \geq 0} \operatorname{Ex}^{n}(X)$ which is defined using combinatorics of iterated subdivision (Construction 3.3.6.1). The functor $X \mapsto \operatorname{Ex}^{\infty }(X)$ has many useful properties: for example, it preserves Kan fibrations (Proposition 3.3.6.6) and commutes with finite limits (Proposition 3.3.6.4). As an application, we show that a Kan fibration of simplicial sets $f: X \rightarrow Y$ is a weak homotopy equivalence if and only if it is a trivial Kan fibration (Proposition 3.3.7.4), and that a monomorphism of simplicial sets $i: A \hookrightarrow B$ is a weak homotopy equivalence if and only if it is anodyne (Corollary 3.3.7.5).
Let $\operatorname{Set_{\Delta }}$ denote the category of simplicial sets, and let $\operatorname{Kan}\subset \operatorname{Set_{\Delta }}$ denote the full subcategory spanned by the Kan compexes. We let $\mathrm{h} \mathit{\operatorname{Kan}}$ denote the homotopy category of Kan complexes (Construction 3.1.5.10), which can be obtained from $\operatorname{Kan}$ by identifying morphisms which are homotopic. Beware that the category $\mathrm{h} \mathit{\operatorname{Kan}}$ is somewhat illbehaved: for example, it admits neither pullbacks or pushouts. In §3.4, we address this point by introducing the notions of homotopy pullback and homotopy pushout diagrams of simplicial sets (which can be regarded as homotopytheoretic counterparts for the classical categorical notion of pullback and pushout diagrams), and establishing their basic properties. We will later see that these diagrams can be interpreted as pullback and pushout squares in the $\infty $category $\operatorname{\mathcal{S}}$ (see Propositions and ), rather than its homotopy category $\mathrm{h} \mathit{\operatorname{Kan}} \simeq \mathrm{h} \mathit{\operatorname{\mathcal{S}}}$.
Recall that, for every topological space $Y$, the singular simplicial set $\operatorname{Sing}_{\bullet }(Y)$ is a Kan complex (Proposition 1.1.9.8). In §3.5, we show that every Kan complex arises in this way, at least up to homotopy equivalence. More precisely, we show that the unit map $u_{X}: X \rightarrow \operatorname{Sing}_{\bullet }(X )$ is a homotopy equivalence for any Kan complex $X$ (and a weak homotopy equivalence for any simplicial set $X$; see Theorem 3.5.4.1). Using this fact, we show that the geometric realization functor $X \mapsto X$ induces a fully faithful embedding of homotopy categories $\mathrm{h} \mathit{\operatorname{Kan}} \hookrightarrow \mathrm{h} \mathit{\operatorname{Top}}$, whose essential image consists of those topological spaces having the homotopy type of a CW complex (Theorem 3.5.0.1). In other words, the (combinatorially defined) homotopy theory of Kan complexes studied in this section is essentially equivalent to the (topologically defined) homotopy theory of CW complexes.
Structure

Section 3.1: The Homotopy Theory of Kan Complexes
 Subsection 3.1.1: Kan Fibrations
 Subsection 3.1.2: Anodyne Morphisms
 Subsection 3.1.3: Exponentiation of Kan Fibrations
 Subsection 3.1.4: Covering Maps
 Subsection 3.1.5: The Homotopy Category of Kan Complexes
 Subsection 3.1.6: Homotopy Equivalences and Weak Homotopy Equivalences
 Subsection 3.1.7: Fibrant Replacement

Section 3.2: Homotopy Groups
 Subsection 3.2.1: Pointed Kan Complexes
 Subsection 3.2.2: The Homotopy Groups of a Kan Complex
 Subsection 3.2.3: The Group Structure on $\pi _{n}(X,x)$
 Subsection 3.2.4: The Connecting Homomorphism
 Subsection 3.2.5: The Long Exact Sequence of a Fibration
 Subsection 3.2.6: Contractibility
 Subsection 3.2.7: Whitehead's Theorem for Kan Complexes
 Subsection 3.2.8: Closure Properties of Homotopy Equivalences

Section 3.3: The $\operatorname{Ex}^{\infty }$ Functor
 Subsection 3.3.1: Digression: Braced Simplicial Sets
 Subsection 3.3.2: The Subdivision of a Simplex
 Subsection 3.3.3: The Subdivision of a Simplicial Set
 Subsection 3.3.4: The Last Vertex Map
 Subsection 3.3.5: Comparison of $X$ with $\operatorname{Ex}(X)$
 Subsection 3.3.6: The $\operatorname{Ex}^{\infty }$ Functor
 Subsection 3.3.7: Application: Characterizations of Weak Homotopy Equivalences
 Subsection 3.3.8: Application: Extending Kan Fibrations
 Subsection 3.3.9: Towers of Kan Fibrations

Section 3.4: Homotopy Pullback and Homotopy Pushout Squares
 Subsection 3.4.1: Homotopy Pullback Squares
 Subsection 3.4.2: Homotopy Pushout Squares
 Subsection 3.4.3: Mather's Second Cube Theorem
 Subsection 3.4.4: Mather's First Cube Theorem
 Subsection 3.4.5: Digression: Weak Homotopy Equivalences of Semisimplicial Sets
 Subsection 3.4.6: Excision
 Subsection 3.4.7: The Seifert vanKampen Theorem

Section 3.5: Comparison with Topological Spaces
 Subsection 3.5.1: Digression: Finite Simplicial Sets
 Subsection 3.5.2: Exactness of Geometric Realization
 Subsection 3.5.3: Weak Homotopy Equivalences in Topology
 Subsection 3.5.4: The Unit Map $u: X \rightarrow \operatorname{Sing}_{\bullet }(X)$
 Subsection 3.5.5: Comparison of Homotopy Categories
 Subsection 3.5.6: Serre Fibrations