Natural_number_object
In category theory, a natural numbers object (NNO) is an object endowed with a recursive structure similar to natural numbers. More precisely, in a category E with a terminal object 1, an NNO N is given by:
- a global element z : 1 → N, and
- an arrow s : N → N,
such that for any object A of E, global element q : 1 → A, and arrow f : A → A, there exists a unique arrow u : N → A such that:
In other words, the triangle and square in the following diagram commute.
The pair (q, f) is sometimes called the recursion data for u, given in the form of a recursive definition:
- ⊢ u (z) = q
- y ∈E N ⊢ u (s y) = f (u (y))
The above definition is the universal property of NNOs, meaning they are defined up to canonical isomorphism. If the arrow u as defined above merely has to exist, that is, uniqueness is not required, then N is called a weak NNO.