# Which 2-coskeletal simplicial sets is the nerve of a category?

Let ${\mathrm{tr}}_2$ be the truncation functor that takes a simplicial set and restricts it to dimensions at most 2. Its right adjoint is the 2-coskeleton functor. NLab says that the nerve of a small category is a 2-coskeletal simplicial set.

In a category, composition is defined only if two morphisms abut. Precisely, the composite $g\circ f$ is defined if the target of $f$ is the source of $g$. This translates to saying the nerve of a category is a simplicial set such that every inner horn of a 2-simplex has a filler.

My question is: Does this extension condition characterize those 2-coskeletal simplicial sets that is a nerve of a category? If not, is there a necessary and sufficient condition?

EDIT: Thanks Tyler for your comment. Can we identify a "category" with a "simplicial set truncated in dimension 2 such that every inner horn of a 2-simplex has a unique filler"? How does this account for the associativity of composition?

-
The filler has to be unique. – Tyler Lawson Sep 24 '12 at 4:50
ALL inner horns must be unique. – Spice the Bird Sep 24 '12 at 5:53
An n-simplex has an inner horn only if n is at least 2. For a simplicial set truncated at dimension 2, "all inner horns" and "all inner horns of a 2-simplex" is the same thing. – user2529 Sep 24 '12 at 9:28

It's not good enough to check inner $2$-horns. Let $K$ be a $2$-coskeletal simplicial set. It follows that for $m>3$ and any $k$, every map $\Lambda_{k}^m\rightarrow K$ admits a unique extension to $\Delta ^{m}$. On the other hand, $K$ is the nerve of a category if and only if for any $m > 1$ and $k$ for which $0<k<m$, every map $\Lambda_{k}^m\rightarrow K$ admits a unique extension to $\Delta ^{m}.$ Since this is automatic for $m>3$ it follows that a $2$-coskeletal $K$ is the nerve of a category if and only if for $m=2,3$ and $0<k<m$, every map $\Lambda_{k}^m\rightarrow K$ admits a unique extension to $\Delta ^{m}$. An example of a $2$-coskeletal simplicial set that fails to be the nerve of a category is $\partial \Delta ^{2}$. For a more interesting example where every map $\Lambda_{1}^2\rightarrow K$ admits a unique extension, but $K$ still fails to be the nerve of a category, consider the following. Let $K$ be the union of $\Lambda_{1}^3$ and $\Delta^2$ with the edges from $0$ to $2$ and $2$ to $3$ on $\Lambda_{1}^3$ glued to the edges from $0$ to $1$ and $1$ to $2$ on $\Delta^2$, respectively. Then $K$ is $2$-coskeletal, and every inner $2$ horn admits a unique extension, but the inclusion $\Lambda_{1}^3\rightarrow K$ does not.

-