4 The Homotopy Theory of $\infty $Categories
Let $q: X \rightarrow S$ be a morphism of simplicial sets. Recall that $q$ is a Kan fibration if and only if it has the right lifting property with respect to every horn inclusion $\Lambda ^{n}_{i} \hookrightarrow \Delta ^ n$ for $n > 0$ and $0 \leq i \leq n$. The theory of Kan fibrations can be viewed as a relativization of the theory of Kan complexes, which plays an essential role in the classical homotopy theory of simplicial sets (as in Chapter 3). In this chapter, we study several weaker notions of fibration, which will play an analogous role in the study of $\infty $categories:
We say that a morphism of simplicial sets $q: X \rightarrow S$ is an inner fibration if it has the right lifting property with respect to every inner horn inclusion $\Lambda ^{n}_{i} \hookrightarrow \Delta ^ n$, $0 < i < n$ (Definition 4.1.1.1). If this condition is satisfied, then for each vertex $s \in S$, the fiber $X_{s} = \{ s\} \times _{S} X$ is an $\infty $category (Remark 4.1.1.6). Consequently, the theory of inner fibrations can be regarded as a relative version of the theory of $\infty $categories, which we study in §4.1.
We say that a morphism of simplicial sets $q: X \rightarrow S$ is a left fibration if it has the right lifting property with respect to the horn inclusions $\Lambda ^{n}_{i} \hookrightarrow \Delta ^ n$ for $0 \leq i < n$, and a right fibration if it has the right lifting property with respect to the horn inclusions $\Lambda ^{n}_{i} \hookrightarrow \Delta ^ n$ for $0 < i \leq n$ (Definition 4.2.1.1). If either of these conditions are satisfied, then the fiber $X_{s} = \{ s\} \times _{S} X$ is a Kan complex for each vertex $s \in S$ (Corollary 4.4.2.3). We will see later that the construction $s \mapsto X_{s}$ is covariantly functorial when $q$ is a left fibration, and contravariantly functorial when $q$ is a right fibration (see §5.2.2). In §4.2, we develop some basic formal properties of left and right fibrations; we will carry out a more detailed analysis in Chapter 5.
We say that a morphism of simplicial sets $q: X \rightarrow S$ is an isofibration if it has the right lifting property with respect to every inclusion of simplicial sets $A \hookrightarrow B$ which is a categorical equivalence (Definition 4.5.5.5). This condition is primarily useful in the case where $X$ and $S$ are $\infty $categories, in which case it is equivalent to the requirement that $q$ is an inner fibration which satisfies a lifting property with respect to isomorphisms (Proposition 4.5.5.1). We study isofibrations between $\infty $categories in §4.4, and between general simplicial sets in §4.5.5).
If $q: X \rightarrow S$ is a morphism of simplicial sets, we have the following diagram of implications:
Beware that, in general, none of these implications is reversible.
In §4.3, we consider some prototypical examples of left and right fibrations which arise frequently in practice. Let $\operatorname{\mathcal{C}}$ be an $\infty $category. To each object $X \in \operatorname{\mathcal{C}}$, one can associate a simplicial set $\operatorname{\mathcal{C}}_{/X}$, whose $n$simplices are given by maps $\sigma : \Delta ^{n+1} \rightarrow \operatorname{\mathcal{C}}$ which carry the final vertex of $\Delta ^{n+1}$ to the object $X \in \operatorname{\mathcal{C}}$. In particular, vertices of $\operatorname{\mathcal{C}}_{/X}$ can be identified with morphisms $f: Y \rightarrow X$ in $\operatorname{\mathcal{C}}$ having target $X$, and edges of $\operatorname{\mathcal{C}}_{/X}$ can be identified with commutative diagrams
in the $\infty $category $\operatorname{\mathcal{C}}$ (see Notation 4.3.5.6 for a precise definition). The simplicial set $\operatorname{\mathcal{C}}_{/X}$ is itself an $\infty $category, which we will refer to as the slice $\infty $category of $\operatorname{\mathcal{C}}$ over the object $X$. Moreover, the evident forgetful functor $\operatorname{\mathcal{C}}_{/X} \rightarrow \operatorname{\mathcal{C}}$ (given on objects by the construction $(f: Y \rightarrow X) \mapsto Y$) is a right fibration (Proposition 4.3.6.1). A dual version of this construction produces another $\infty $category $\operatorname{\mathcal{C}}_{X/}$ whose objects are morphisms $f: X \rightarrow Y$ in the $\infty $category $\operatorname{\mathcal{C}}$, which we refer to as the coslice $\infty $category of $\operatorname{\mathcal{C}}$ under the object $X$. The slice and coslice constructions (and generalizations thereof) provide a rich supply of right and left fibrations between simplicial sets, and will play an essential role throughout this book.
Recall that an equivalence of categories is a functor $F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{D}}$ which admits a homotopy inverse: that is, for which there exists another functor $G: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ such that $G \circ F$ and $F \circ G$ are isomorphic to the identity functors $\operatorname{id}_{\operatorname{\mathcal{C}}}$ and $\operatorname{id}_{\operatorname{\mathcal{D}}}$, respectively. In §4.5, we study the $\infty $categorical counterpart of this notion. We say that a morphism of simplicial sets $F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{D}}$ is a categorical equivalence if, for every $\infty $category $\operatorname{\mathcal{E}}$, precomposition with $F$ induces a bijection
see Definition 4.5.3.1. If $\operatorname{\mathcal{C}}$ and $\operatorname{\mathcal{D}}$ are $\infty $categories, then this is equivalent to the requirement that $F$ admits a homotopy inverse $G: \operatorname{\mathcal{D}}\rightarrow \operatorname{\mathcal{C}}$ in the sense described above (see Example 4.5.3.3). In this case, we say that $F$ is an equivalence of $\infty $categories (Definition 4.5.1.10).
A functor $F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{D}}$ between ordinary categories is an equivalence if and only if it satisfies the following pair of conditions:
 $(1)$
The functor $F$ is fully faithful. That is, for every pair of objects $X,Y \in \operatorname{\mathcal{C}}$, the functor $F$ induces a bijection $\operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y) \rightarrow \operatorname{Hom}_{\operatorname{\mathcal{D}}}( F(X), F(Y) )$.
 $(2)$
The functor $F$ is essentially surjective: that is, every object $Y \in \operatorname{\mathcal{D}}$ is isomorphic to $F(X)$, for some object $X \in \operatorname{\mathcal{C}}$.
This characterization is quite useful: in practice, it is often easier to verify conditions $(1)$ and $(2)$ than to explicitly describe a homotopy inverse of the functor $F$ (which might require some auxiliary choices). In §4.6, we establish an analogue of this characterization in the $\infty $categorical setting. To every pair of objects $X$ and $Y$ of an $\infty $category $\operatorname{\mathcal{C}}$, we associate a Kan complex $\operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Y)$ which we refer to as the space of morphisms from $X$ to $Y$ (Construction 4.6.1.1). We say that a functor of $\infty $categories $F: \operatorname{\mathcal{C}}\rightarrow \operatorname{\mathcal{D}}$ is fully faithful if it 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}}$ (Definition 4.6.2.1). In §4.6.2, we show that $F$ is an equivalence of $\infty $categories if and only if it is fully faithful and essentially surjective at the level of homotopy categories (Theorem 4.6.2.17).
Structure
 Section 4.1: Inner Fibrations

Section 4.2: Left and Right Fibrations
 Subsection 4.2.1: Left and Right Fibrations of Simplicial Sets
 Subsection 4.2.2: Fibrations in Groupoids
 Subsection 4.2.3: Left and Right Covering Maps
 Subsection 4.2.4: Left Anodyne and Right Anodyne Morphisms
 Subsection 4.2.5: Exponentiation for Left and Right Fibrations
 Subsection 4.2.6: The Homotopy Extension Lifting Property

Section 4.3: The Slice and Join Constructions
 Subsection 4.3.1: Slices of Categories
 Subsection 4.3.2: Joins of Categories
 Subsection 4.3.3: Joins of Simplicial Sets
 Subsection 4.3.4: Joins of Topological Spaces
 Subsection 4.3.5: Slices of Simplicial Sets
 Subsection 4.3.6: Slices of $\infty $Categories
 Subsection 4.3.7: Slices of Left and Right Fibrations
 Section 4.4: Isomorphisms and Isofibrations

Section 4.5: Equivalence
 Subsection 4.5.1: Equivalences of $\infty $Categories
 Subsection 4.5.2: Categorical Pullback Squares
 Subsection 4.5.3: Categorical Equivalence
 Subsection 4.5.4: Categorical Pushout Squares
 Subsection 4.5.5: Isofibrations of Simplicial Sets
 Subsection 4.5.6: Isofibrant Diagrams
 Subsection 4.5.7: Detecting Equivalences of $\infty $Categories
 Subsection 4.5.8: Application: Universal Property of the Join
 Subsection 4.5.9: Direct Image Fibrations

Section 4.6: Morphism Spaces
 Subsection 4.6.1: Morphism Spaces
 Subsection 4.6.2: Fully Faithful and Essentially Surjective Functors
 Subsection 4.6.3: Digression: Categorical Mapping Cylinders
 Subsection 4.6.4: Oriented Fiber Products
 Subsection 4.6.5: Pinched Morphism Spaces
 Subsection 4.6.6: Initial and Final Objects
 Subsection 4.6.7: Morphism Spaces in the Homotopy Coherent Nerve
 Subsection 4.6.8: Composition of Morphisms