# How to categorically represent natural numbers and connection between them only if their difference is 1?

How can one categorically represent natural numbers (as objects) with connection between each two of them only if their difference is 1? Obviously the above mentioned connection(relationship) can not be a morphism because it wouldn't compose (or maybe I'm wrong). So is there a way to represent it in category theory and if not, does that mean there are simple mathematical structures that can not be defined using category theory?

• Category theory doesn't study things by making categories out of them. Most mathematical structures aren't instances of categories. We don't study differentiable manifolds with category theory by turning each differentiable manifold into a category. – Derek Elkins May 11 at 19:07
• @Derek So if that is the case then how come that Homotopy Type Theory which is related and in correspondence to category theory is trying to be the language of the mathematics foundation? Am I missing some point here? – al pal May 11 at 19:37
• Why do you think that is even relevant? Most categorists don't do anything with HoTT. Heck, category theory is 50 years older than HoTT. While related to category theory, HoTT isn't "in correspondence" with it. HoTT also doesn't turn mathematical objects into categories. At best you could say there's an interpretation that interprets the types(-in-context) of HoTT as $(\infty,1)$-groupoids, but a) $(\infty,1)$-groupoids are technically not (1-)categories, b) there can be other interpretations, c) you don't need any interpretation to use HoTT. – Derek Elkins May 11 at 20:02
• @DerekElkins I am not an expert on these matters. But I wonder, if there may be usefulness to say realizing natural numbers as a category. Usefulness in the sense that it can be used as a tool. For example, it can be used to define sequence of composable maps as functor from $\mathbb{N}$ into an arrow category. Then one can study relationship b/w sequences of maps. One may prove, for example, any finite sequence of maps upon composing gives rise to exactly one map by using induction on $\mathbb{N}$. – jaspreet May 11 at 20:52
• @alpal You seem to have made a guess about how category theory works. It's not an unreasonable guess, but instead of asking, "hey, does category theory work this way," you seem to have decided that your guess is right based on, apparently, random sentences pulled out of context. Instead of looking for evidence that confirms your theory about how category theory works, I would recommend looking for evidence that would refute it. An introductory text on category theory (e.g. Awodey's) will quickly make it clear that viewing mathematical objects as categories is not what is typically done. – Derek Elkins May 11 at 23:48

Let's go to a bit more general setting first: take $$(P, \leq)$$ a poset. That is , $$P$$ is a set with a (partial) order relation $$\leq$$. Then, we can associate $$P$$ a category (which I will also name $$P$$). We define $$\operatorname{ob}(P) = P$$. Then, $$\operatorname{mor}(x,y)$$ will have a unique arrow $$x \to y$$ iff $$x \leq y$$ and none otherwise.

In the case of $$\mathbb{N}$$, the objects are the natural numbers, and we have an arrow $$n \to m$$ iff $$n \leq m$$. Of course this gives more arrows than just $$n \to n+1$$ for each $$n$$. This is, in a way, inevitable: if you desire to have an arrow $$n \to n+1$$ and another one $$n+1 \to n+2$$, the category axioms force you to define a composition from $$n$$ to $$n+2$$ in some way. However, any arrow $$n \to m$$ can be written as a composition

$$n \to n + 1 \to n+2 \to \cdots \to m-1 \to m,$$

so for most things it suffices to consider only these 'elementary' arrows.

For example, suppose I have abelian groups $$G_1,G_2, \dots$$ and functions $$f_{i,i+1} : G_i \to G_{i+1}$$. This is like assigning each natural $$i$$ a group $$G_i$$ and each arrow $$i \to i+1$$ a function $$G_i \to G_{i+1}$$. If we now define

\begin{align} G : \mathbb{N}& \to \mathsf{Ab}\\ &n \mapsto G_n\\ &\downarrow \quad \downarrow{g_{n,m}}\\ &m \mapsto G_m \end{align}

with $$g_{n,m} = g_{n,n+1}\circ g_{n+1,n+2} \circ \cdots \circ g_{m-1,m}$$, this yields a functor.

• I am saying that, if you want to have arrows $n \to n+1$ for each $n$, by composition you will have to define more arrows than that. But still, in a very loose sense, the first arrows "generate" the others – Guido A. May 11 at 18:21
• Assigning meaning to anything is subjective, mathematical or otherwise, so I don't know what you mean by that. – Guido A. May 11 at 18:22
• @alpal please excuse this interjection, but I think studying group theory before studying category theory would be very beneficial but to each their own, of course! – Nap D. Lover May 11 at 18:43
• Yes, in essence, the 'problem' here is that the relation $nRm$ iff $|n-m| =1$ is not transitive. So you wont be able to construct this as a category (in the sense of the post, at least). – Guido A. May 11 at 18:48
• That statement is not formal, and so I can't give you a remotely objective answer. Also, I only know the basics of the subject so I can't speak about the big picture. As Derek Elkins pointed out in the comments, you could be trying to formalize this the wrong way. For example, your idea can be stated as a relation on $\mathbb{N}$ and this is an object on the category of relations. I'd suggest you study a bit of abstract algebra or topology. That will shed some light on what 'categorial thinking' means. – Guido A. May 11 at 20:57

The successor function $$\mathsf{inc}:\mathbb{N}\rightarrow\mathbb{N}$$ sends each number to the one after it $$(n\mapsto n+1)$$. It is a morphism which captures the relationship you describe.

And you can define $$\mathsf{inc}$$ in a categorical way:

• There is a functor $$F:\mathbf{Set}\rightarrow \mathbf{Set}$$ which appends a new element to each set: $$X\mapsto X+1$$. (On morphisms, it maps the new element of the domain onto the new element of the codomain.)
• As with any functor from a category to itself, you can form a new category consisting of all morphisms of the form $$f:F(A)\rightarrow A$$, where composition of morphisms makes the relevant square commute properly. This category is called an F-algebra.

• This particular F-algebra has an initial element. You can prove that the inital element is $$[\mathsf{zero}, \mathsf{inc}]: 1+\mathbb{N} \rightarrow \mathbb{N}$$. The function $$\mathsf{zero}:1\rightarrow \mathbb{N}$$ picks out the first element $$0\in \mathbb{N}$$. The function $$\mathsf{inc}:\mathbb{N}\rightarrow \mathbb{N}$$ maps each number onto its successor.

• And so we have a categorical definition of this relation. It neatly introduces the natural numbers, and zero, and the successor function, as universal constructs.