nLab
natural numbers object

Natural numbers object

Idea

Recall that a topos is a category that behaves likes the category Set of sets.

A natural numbers object (NNO) in a topos is an object that behaves in that topos like the set of natural numbers does in Set; thus it provides a formulation of the “axiom of infinity” in structural set theory (such as ETCS). The definition is due to William Lawvere.

Definition

In a topos

A natural numbers object in a topos (or any cartesian closed category) E with terminal object is

1 z s q u u A f A\array{ 1 &\stackrel{z}{\to}& \mathbb{N} &\stackrel{s}{\to}& \mathbb{N} \\ & {}_q\searrow & \downarrow^{u} && \downarrow^{u} \\ && A &\stackrel{f}{\to} & A }

All this may be summed up by saying that a natural numbers object is an initial algebra for the endofunctor X1+X. Equivalently, it is an algebra for the endo-profunctor Hom E(1,=)×Hom E(,=).

By the universal property, the natural numbers object is unique up to isomorphism.

In a general category with finite products

Note that this definition actually makes sense in any category E having finite products. However, if E is not cartesian closed, then it is better to explicitly assume a stronger version of this definition “with parameters” (which follows automatically when E is cartesian closed, such as when E is a topos). What this amounts to is demanding that (,z,s) not only be a natural numbers object (in the above, unparametrized sense) in E, but that also, for each object A, this is preserved by the free coalgebra functor into the Kleisli category of the comonad XA×X (which may be thought of as the category of maps parametrized by A). (Put another way, the finite product structure of E gives rise to a canonical self-indexing?, and we are demanding the existence of an (unparametrized) NNO within this indexed category?, rather than just within the base E).

The functions which are constructable out of the structure of a category with finite products and such a “parametrized NNO” are precisely the primitive recursive? ones. Specifically, the unique structure-preserving functor from the free such category F into Set yields a bijection between Hom F(1,) and the actual natural numbers, as well as surjections from Hom F( m,) onto the primitive recursive functions of arity m for each finite m. With cartesian closure, however, this identification no longer holds, since non-primitive recursive functions (such as the Ackermann function?) become definable as well.

Finite colimit characterization

In a topos, the natural numbers object is uniquely characterized by the following colimit conditions due to Peter Freyd?: a triple (,0:1,s:) is a natural numbers object if and only if

  1. The morphism (0,s):1+ is an isomorphism;

  2. The diagram

    1s1\mathbb{N} \stackrel{\overset{s}{\to}}{\underset{1}{\to}} \mathbb{N} \to 1

    is a coequalizer.

The necessity of the first condition holds in any category with binary coproducts and a terminal object, and the necessity of the second holds in any category whatsoever.

Proof of necessity

For a category C with binary coproducts and 1, the natural numbers object can be equivalently described as an initial algebra structure (0,s):1+ for the endofunctor F(c)=1+c defined on C. Then condition 1 is a special case of Lambek's theorem, that the algebra structure map of an initial algebra is an isomorphism.

As for condition 2, given f:X such that f=fs, the claim is that f factors as

!1xX\mathbb{N} \overset{!}{\to} 1 \overset{x}{\to} X

for some unique x, in fact for x=f(0). Uniqueness is clear since !:1, being a retraction for 0:1, is epic. On the other hand, substituting either f or f(0)! for g in the diagram

1 0 s f(0) g g X 1 X X\array{ 1 & \overset{0}{\to} & \mathbb{N} & \overset{s}{\to} & \mathbb{N} \\ & f(0) \searrow & \downarrow g & & \downarrow g \\ & & X & \underset{1_X}{\to} & X }

this diagram commutes, so that f=f(0)! by the uniqueness clause in the universal property for .

Proof of sufficiency

To be filled in. For a topos in which there is an isomorphism α:F(X)X, it should be possible to construct a natural numbers object as the intersection of all F-subalgebras of (X,α). On the other hand, there are no nontrivial subalgebras of any such algebra satisfying condition 2.

Examples

In any Grothendieck topos E=Sh(C) the natural numbers object is given by the constant sheaf on the set of ordinary natural numbers, i.e. by the sheafification of the presheaf C opSet that is constant on the set .

There are interesting cases in which such sheaf toposes contain objects that look like they ought to be natural numbers objects but do not satisfy the above axioms: for instance some of the models described at Models for Smooth Infinitesimal Analysis are sheaf toposes that contain besides the standard natural number object a larger object of smooth natural numbers that has generalized elements which are “infinite natural numbers” in the sense of nonstandard analysis.

Properties

Let (f *f *):Ff *f *E is a geometric morphism of toposes. If NE is a natural numbers object, then f *N is a natural numbers object in F. (Elephant, lemma 4.1.14).