CatDat

Natural numbers objects

The definition of a natural numbers object a priori only allows for recursively defined morphisms in which the next value Φ(s(n))\Phi(s(n)) depends only on the previous value Φ(n)\Phi(n). In many cases, however, we would also like to use nn itself to define Φ(s(n))\Phi(s(n)). This can be done in categories with finite products:

Lemma 1.

Let (N,z,s)(N,z,s) be a natural numbers object in a category with finite products. Then for every a:1Xa : 1 \to X and every g:N×XXg : N \times X \to X there exists a unique morphism Φ:NX\Phi : N \to X such that Φ(z)=a\Phi(z) = a and Φ(s(n))=g(n,Φ(n))\Phi(s(n)) = g(n, \Phi(n)).

Here, we use element notation to simplify the exposition. For example, the equation Φ(s(n))=g(n,Φ(n))\Phi(s(n)) = g(n,\Phi(n)) means that the following diagram commutes:

NsN(idN,Φ)ΦN×XgX \begin{CD} N @>{s}>> N \\ @V{(\id_N,\Phi)}VV @VV{\Phi}V \\ N \times X @>>{g}> X \end{CD}

Proof. Define the morphism b:1N×Xb : 1 \to N \times X by b(z,a)b \coloneqq (z,a) and the morphism h:N×XN×Xh : N \times X \to N \times X by h(n,x)(n,g(n,x))h(n,x) \coloneqq (n,g(n,x)). By the universal property of (N,z,s)(N,z,s), there is a unique morphism Ψ:NN×X\Psi : N \to N \times X such that:

  • Ψ(z)=b\Psi(z) = b
  • Ψ(s(n))=h(Ψ(n))\Psi(s(n)) = h(\Psi(n))

Write Ψ(n)=(Ψ0(n),Ψ1(n))\Psi(n) = (\Psi_0(n),\Psi_1(n)), where Ψ0:NN\Psi_0 : N \to N and Ψ1:NX\Psi_1 : N \to X. The two equations above then become:

  • Ψ0(z)=z\Psi_0(z) = z
  • Ψ0(s(n))=Ψ0(n)\Psi_0(s(n)) = \Psi_0(n)
  • Ψ1(z)=a\Psi_1(z) = a
  • Ψ1(s(n))=g(Ψ0(n),Ψ1(n))\Psi_1(s(n)) = g(\Psi_0(n),\Psi_1(n))

The uniqueness in the universal property of (N,z,s)(N,z,s) implies Ψ0=idN\Psi_0 = \id_N. Therefore, ΦΨ1\Phi \coloneqq \Psi_1 is the unique morphism Φ:NX\Phi : N \to X satisfying Φ(z)=a\Phi(z)=a and Φ(s(n))=g(n,Φ(n))\Phi(s(n)) = g(n,\Phi(n)). \square

The next result appears in Johnstone, Part A, Lemma 2.5.5. Our proof is slightly more concise because we have extracted Lemma 1.

Lemma 2.

Let (N,z,s)(N,z,s) be a natural numbers object in a category with finite products. Then 1zNsN1 \xrightarrow{z} N \xleftarrow{s} N is a coproduct cocone. Thus, N1NN \cong 1 \sqcup N.

Proof. Let a:1Xa : 1 \to X and b:NXb : N \to X be morphisms. We need to show that there is a unique morphism c:NXc : N \to X satisfying c(z)=ac(z) = a and c(s(n))=b(n)c(s(n)) = b(n). This follows by applying Lemma 1 to the morphism g:N×XXg : N \times X \to X defined by g(n,x)b(n)g(n,x) \coloneqq b(n). \square

Next, we will check when the terminal object 11 itself is a natural numbers object. In that case, z:11z : 1 \to 1 and s:11s : 1 \to 1 are necessarily equal to id1\id_1.

Lemma 3.

Let 11 be a terminal object in a category. Then (1,id1,id1)(1,\id_1,\id_1) is a natural numbers object if and only if for every endomorphism g:XXg : X \to X and every morphism a:1Xa : 1 \to X we have ga=ag \circ a = a. If the category has finite products, (1,id1,id1)(1,\id_1,\id_1) is a parametrized natural numbers object if and only if g=idXg = \id_X for every endomorphism g:XXg : X \to X, i.e. the category is one-way.

Proof. The first statement is immediate from the definition of a natural numbers object. For the second, (1,id1,id1)(1,\id_1,\id_1) is a parametrized natural numbers object if and only if, for all morphisms f:AXf : A \to X and all endomorphisms g:XXg : X \to X, there is a unique morphism Φ:AX\Phi : A \to X such that ΦidA=f\Phi \circ \id_A = f and ΦidA=gΦ\Phi \circ \id_A = g \circ \Phi. These equations simplify to Φ=f\Phi = f and f=gff = g \circ f. Since this must hold for every f:AXf : A \to X, we must have g=idXg = \id_X (by the Yoneda Lemma or by a direct argument). \square

Next, we prove a partial converse to the result that countably distributive categories have a parametrized natural numbers object.

Lemma 4.

Let C\C be a category with finite products, countable copowers denoted \otimes, and a parametrized natural numbers object 1zNsN1 \xrightarrow{z} N \xrightarrow{s} N. Then there is an isomorphism NN1N \cong \IN \otimes 1, and for every object AA the natural morphism α:NAA×(N1)\alpha : \IN \otimes A \to A \times (\IN \otimes 1) is an isomorphism.

Proof. We will use element notation extensively. In particular, for every element aAa \in A and nNn \in \IN, there is an element naNAn \otimes a \in \IN \otimes A, formally defined by the nnth coproduct inclusion. The morphism α\alpha is defined by α(na)=(a,n1).\alpha(n \otimes a) = (a,n \otimes 1).

In any category with a terminal object and countable copowers, we can construct the non-parametrized NNO N1\IN \otimes 1 with the element 01N10 \otimes 1 \in \IN \otimes 1 and the map s:N1N1,s(n1)(n+1)1.s : \IN \otimes 1 \to \IN \otimes 1, \quad s(n \otimes 1) \coloneqq (n+1) \otimes 1. See here for a detailed proof. Since, by assumption, 1zNsN1 \xrightarrow{z} N \xrightarrow{s} N is a parametrized NNO, it is also a non-parametrized NNO and is therefore isomorphic to the one just constructed. We may assume without loss of generality that they are equal and hence work with N=N1N = \IN \otimes 1.

Next, apply the parametrized universal property of the NNO to the diagram AfNAgNAA \xrightarrow{f} \IN \otimes A \xrightarrow{g} \IN \otimes A defined by f(a)0af(a) \coloneqq 0 \otimes a and g(na)(n+1)ag(n \otimes a) \coloneqq (n+1) \otimes a. It gives a morphism Φ:A×NNA\Phi : A \times N \to \IN \otimes A satisfying Φ(a,01)=0a,Φ(a,s(m))=g(Φ(a,m)).\Phi(a,0 \otimes 1) = 0 \otimes a, \quad \Phi(a,s(m)) = g(\Phi(a,m)). For mn1Nm \coloneqq n \otimes 1 \in N, where nNn \in \IN, the second equation becomes Φ(a,(n+1)1)=g(Φ(a,n1)).\Phi(a,(n+1) \otimes 1) = g(\Phi(a,n \otimes 1)). By induction on nNn \in \IN, it follows that Φ(a,n1)=na,\Phi(a,n \otimes 1) = n \otimes a, which is exactly the statement that Φα=idNA\Phi \circ \alpha = \id_{\IN \otimes A}.

It remains to prove αΦ=idA×N\alpha \circ \Phi = \id_{A \times N}. We first observe that αg=(idA×s)α\alpha \circ g = (\id_A \times s) \circ \alpha as morphisms NAA×(N1)\IN \otimes A \to A \times (\IN \otimes 1). Indeed, for every naNAn \otimes a \in \IN \otimes A, α(g(na))=α((n+1)a)=(a,(n+1)1),\alpha(g(n \otimes a)) = \alpha((n+1) \otimes a) = (a, (n+1) \otimes 1), while (idA×s)(α(na))=(idA×s)(a,n1)=(a,(n+1)1).(\id_A \times s)(\alpha(n \otimes a)) = (\id_A \times s)(a, n \otimes 1) = (a, (n+1) \otimes 1). The universal property applied to the diagram A(idA,z)A×NidA×sA×NA \xrightarrow{(\id_A,z)} A \times N \xrightarrow{\id_A \times s} A \times N shows that there is a unique morphism Ψ:A×NA×N\Psi : A \times N \to A \times N satisfying Ψ(idA,z)=(idA,z)\Psi \circ (\id_A,z) = (\id_A,z) and Ψ(idA×s)=(idA×s)Ψ,\Psi \circ (\id_A \times s) = (\id_A \times s) \circ \Psi, namely idA×N\id_{A \times N}. Thus, it suffices to verify that αΦ:A×NA×N\alpha \circ \Phi : A \times N \to A \times N satisfies these two equations. We have α(Φ(a,z))=α(0a)=(a,01)=(a,z),\alpha(\Phi(a,z)) = \alpha(0 \otimes a) = (a, 0 \otimes 1) = (a,z), and hence αΦ(idA,z)=(idA,z)\alpha \circ \Phi \circ (\id_A,z) = (\id_A,z). Moreover, αΦ(idA×s)=αgΦ=(idA×s)αΦ.\alpha \circ \Phi \circ (\id_A \times s) = \alpha \circ g \circ \Phi = (\id_A \times s) \circ \alpha \circ \Phi. This finishes the proof. \square

Remark. Actually, the mentioned result and Lemma 4 can be combined into an equivalent characterization as follows: In a category with finite products and countable copowers, the NNO (which exists, see here) is a parametrized NNO if and only if for all objects AA the canonical morphism nNA=nN(A×1)A×nN1\textstyle \coprod_{n \in \IN} A = \coprod_{n \in \IN} (A \times 1) \to A \times \coprod_{n \in \IN} 1 is an isomorphism. This is the precise connection to countable distributivity.

Context

This page is referenced by the following categories.

This page is referenced by the following category implications.