$\Newextarrow{\xhookrightarrow}{10,10}{0x21AA}$
Corollary 1.5.7.9. Let $S$ be a simplicial set. Then $S$ is isomorphic to the nerve of a category if and only if it satisfies the following condition for every integer $n \geq 0$:
- $(\ast _ n)$
Every morphism of simplicial sets $\operatorname{Spine}[n] \rightarrow S$ extends uniquely to an $n$-simplex of $S$.
Proof.
Assume that $S$ satisfies condition $(\ast _ n)$ for each $n \geq 0$; we will show that $S$ is isomorphic to the nerve of a category (the reverse implication follows from Remark 1.5.7.8). By virtue of Proposition 1.3.4.1, it will suffice to show that for $0 < i < n$, every inner horn $\sigma : \Lambda ^{n}_{i} \rightarrow S$ can be extended to an $n$-simplex of $S$. Note that $\Lambda ^{n}_{i}$ contains the spine $\operatorname{Spine}[n]$. Applying condition $(\ast _ n)$, we deduce that there is a unique $n$-simplex $\sigma '$ of $S$ satisfying $\sigma '|_{ \operatorname{Spine}[n] } = \sigma |_{ \operatorname{Spine}[n] }$. We will complete the proof by showing that $\sigma = \sigma '|_{ \Lambda ^{n}_{i} }$. If $n = 2$, then $\Lambda ^{n}_{i} = \operatorname{Spine}[n]$ and there is nothing to prove. We may therefore assume that $n > 2$, so that $\Lambda ^{n}_{i}$ contains the $1$-skeleton of $\Delta ^ n$. For every pair of integers $0 \leq j \leq k \leq n$, let $e_{j,k}$ denote the corresponding edge of $\Delta ^ n$. Using condition $(\ast _{n-1})$, we are reduced to showing that $\sigma ( e_{j,k} ) = \sigma '( e_{j,k} )$ for every pair of integers $0 \leq j \leq k \leq n$. We proceed by induction on the difference $k - j$. If $k - j \leq 1$, then $e_{j,k}$ is contained in the spine $\operatorname{Spine}[n]$ and there is nothing to prove. Otherwise, we can choose an integer $\ell $ satisfying $j < \ell < k$. Let $\tau $ denote the $2$-simplex of $\Delta ^ n$ given by the triple $( j < \ell < k )$. Replacing $\ell $ by $i$ if necessary, we can arrange that $\tau $ is contained in the horn $\Lambda ^{n}_{i}$. Our inductive hypothesis guarantees that $\sigma $ and $\sigma '$ coincide on the edges $e_{j, \ell }$ and $e_{\ell ,k}$. Invoking $(\ast _2)$, we conclude that $\sigma \circ \tau = \sigma ' \circ \tau $, so that $\sigma $ and $\sigma '$ also agree on the edge $e_{j,k}$.
$\square$