Can someone explain to me the definition of natural numbers in Category Theory in an easy-to-understand language with little to no prior knowledge of the theory if at all possible?
I checked this Wikipedia page but unfortunately couldn't understand.
Can someone explain to me the definition of natural numbers in Category Theory in an easy-to-understand language with little to no prior knowledge of the theory if at all possible?
I checked this Wikipedia page but unfortunately couldn't understand.
$\require{AMScd}$You can define natural numbers as follows (or in a similar programming language that supports the same structures you need; I'm using Haskell because this comes from a lecture I gave):
You don't have to really understand what's going on, if you are not familiar with Haskell. This is just the way you tell Haskell that a new data type, called
Ncontains terms ("elements") of two possible kinds: eitherZ(zero, of course), or an element of the formSuc nfor another $n\in \mathbb N$.This defines the type of natural numbers: there is nothing else inside $\mathbb N$ other than $0,1=Suc\; 0,2=Suc\; (Suc\; 0),\dots$; from this it follows basically everything you know about the natural numbers. For example, the
plusfunction can be defined "by induction", because in order to definen m +you only have to tell me what is0 m +and what is(Suc n) m +; all else follows. So:This works: for example,
1 1 + = 2:So far so good. We can define things using induction. But what happened exactly? Category theory is helpful to understand it.
Define a category $\textsf{Dyn}$ whose objects are triples $(X, t : X \to X,x : X)$, i.e. diagrams $$ \begin{CD} 1 @>>x> X @>>t> X \end{CD} $$ and morphisms between $(X,t,x)$ and $(Y,g,y)$ consist of functions $u : X \to Y$ such that $u(x)=y$ and $u\circ t=g\circ u$, i.e. of commutative diagrams $$ \begin{CD} 1 @>>x> X @>>t> X \\ @| @VuVV @VVuV \\ 1 @>>y> Y @>>g> Y \end{CD} $$ The object $\mathbf{N}=(\mathbb{N}, \text{s} : \mathbb N \to \mathbb N, 0 : \mathbb N)$, or rather the type
Nof the type declaration above, belongs to this category if we let $\text{s}$ be the functionSuc :: N -> Nsending a natural number to its successor.Let $\mathbf{X} = (X,t,x)$ be any object of $\sf Dyn$; then, there is an arrow $u : \mathbf N \to\mathbf X$ in $\sf Dyn$ such that $$ \begin{CD} 1 @>>z> \mathbb N @>>> \mathbb N \\ @| @VuVV @VVuV \\ 1 @>>x> X @>>t> X \end{CD} $$ This means that given an initial value $u(0)=x$ and any endomorphism of the set $X$, there is a unique possible way to define a sequence of element $u(n)$ of $X$ recursively, by setting $u(0) = x$ and $u(n+1) = t(u(n))$.
Moreover, such a function $u$ is unique with respect to this property; if there is another sequence $v : \mathbb N \to X$ with the same property, the equality of $u,v$ can be assessed ``by induction'' using $t$: $u(0)=v(0)=x$, and $u(n+1)=t(u(n))=t(v_n)=v(n+1)$. This means precisely that $\bf N$ is an initial object of the category $\textsf{Dyn}$.
The category $\sf Dyn$ models the notion of a discrete dynamical system: a set $X$ and an initial state $x : X$ are given, together with a function $t : X \to X$ mapping evolution of the system in discrete time, according to the function $t$.
This universal property amounts exactly to the request you see in the Wikipedia page.