Let $\mathcal{C}$ be a category. We define a mapping $M:\Delta^{\text{op}}\rightarrow\textbf{Set}$ as follows. Write $M_0:=\text{Ob}(\mathcal{C})$ and for $n\geq 1$ let $M_n$ be the collection of $n$ composable morphisms $c_0\xrightarrow{f_1}c_1\rightarrow{}\dots\xrightarrow{f_n}c_n$, which we denote by $(f_1,\ldots,f_n)$. For $\alpha:[m]\rightarrow[n]\in\Delta$, we define $M_\alpha:M_n\rightarrow M_m$ as follows:
- If $n=0$ and $m\geq 1$, then $M_\alpha(c):=(1_c,\ldots,1_c)$ for all $c\in\text{Ob}(\mathcal{C})$.
- If $n\geq 1$ and $m=0$, then $M_\alpha(f_1,\ldots,f_n):=c_{\alpha(0)}$ for all $(f_1,\ldots,f_n)\in M_n$.
- If $n\geq 1$ and $m\geq 1$, let $M_\alpha(f_1,\ldots,f_n)=d_0\xrightarrow{g_1}d_1\rightarrow{}\dots\xrightarrow{g_m}d_m$, where for each $i\in\{1,\ldots,m\}$:
(a) if $\alpha(i)=\alpha(i-1)$, then $g_i=1_{c_{\alpha(i)}}$;
(b) if $\alpha(i-1)<\alpha(i)$, then $g_i=f_{\alpha(i)}\circ\ldots f_{\alpha(i-1)+1}$.
I want to show that $M$ is a functor. Let $[\ell]\xrightarrow{\beta}[m]\xrightarrow{\alpha}[n]\in\Delta$. I have managed to show that $M(\beta*\alpha)=M(\beta)\circ M(\alpha)$ for every case but where $m,n,\ell\geq1$. Suppose $\ell,m,n\geq 1$. Either $\beta(i)=\beta(i-1)$ or not. I have also proved it for the former; so let us assume $\beta(i)<\beta(i-1)$.
Notation: Let $c_0\xrightarrow{f_1}c_1\rightarrow{}\dots\xrightarrow{f_n}c_n\in M_n$. We will denote $M_{\beta*\alpha}(f_1,\ldots,f_n)$ by $d_0\xrightarrow{g_1}d_1\rightarrow{}\dots\xrightarrow{g_n}d_n$. Furthermore, denote $M_\alpha(f_1,\ldots,f_n)$ by $e_0\xrightarrow{h_1}e_1\rightarrow{}\dots\xrightarrow{h_m}e_m$ and $M_\beta(h_1,\ldots,h_m)$ by $b_0\xrightarrow{k_1}b_1\rightarrow{}\dots\xrightarrow{k_\ell}b_\ell$.
Since $\beta(i-1)<\beta(i)$, we must have that $k_i=h_{\beta(i)}\circ\ldots\circ h_{\beta(i-1)+1}$. Moreover, $\alpha(\beta(i-1))<\alpha(\beta(i))$ and $$g_i=f_{\alpha(\beta(i))}\circ\ldots\circ f_{\alpha(\beta(i-1))+1}.$$ The goal is to show $k_i=g_i$. Any ideas on how to complete the proof? (Do you foresee a lot of case analysis?)
One different way to prove this, which also generalises to other examples is to first define the functor: $$F:\Delta\rightarrow Cat$$
$F([n])$ is the category with $n$ objects $\{0,1,..,n-1\}$ with a single morphism from $i$ to $j$ whenever $i\leq j$, and taking order preserving maps to the evident functors between these simple categories.
Once you verify that this functor to $Cat$ is well defined, one simply composes the opposite $F^{op}$ with the representable functor $\hom_{Cat}(\_,C)$ to get a new functor from $\Delta^{op}$ to $Set$. Then one can check this is the nerve functor you were originally after.
This approach is a bit cleaner to verify functoriality, but also is useful because it pops up more generally, for any functor $\Delta\rightarrow C$ from the simplex category to any category $C$, we get a functor $C\rightarrow Sset$ by this construction. So the nerve is just one example with $C=Cat$, another example would be to take the “topological” realisation functor of the simplex category, the functor one gets out of that machine takes a space $X$ to it’s associated singular simplicial set $Sing(X)$.