PDF
Part IV25 pages

Higher-Categorical Natural Numbers Objects: Contractibility, \infty-Toposes, and Lurie's NNO

Download PDFHaskell CodeLean Proofs

1 Introduction

The natural numbers object (NNO) is among the most basic universal constructions of categorical logic. Lawvere’s 1964 axiomatisation of the elementary theory of the category of sets (ETCS) treats the NNO as an irreducible primitive on equal footing with the terminal object, the subobject classifier, and exponentials. In any cartesian closed category with a terminal object , an NNO is a triple such that for every there exists a unique morphism with and . Two NNOs are related by a unique isomorphism; the automorphism group of an NNO is trivial. In the NNO is the von Neumann set with successor; up to canonical isomorphism, “the natural numbers” is a property, not a choice of structure.

The HoTT version is finer. Working in the univalent universe , define where denotes the proposition that is initial in the type-theoretic category of pointed dynamical systems. Theorem 2.7 of Paper III1 (which we recapitulate in §2 as 7) and Theorem 4.4 of Paper V state that is contractible—a -type. The centre of contraction is where is the inductive type of natural numbers and is the canonical proof of initiality. Crucially, contractibility is strictly stronger than “unique up to unique iso”: it asserts that every two NNOs are connected by a path (an equivalence, by univalence), and that every two such paths are themselves connected by a -path, ad infinitum.

By Shulman’s theorem , every Grothendieck -topos models HoTT with univalence, and conjecturally so does every elementary -topos. Therefore the contractibility theorem transports internally: for each such there is an internal type of NNO structures in , and this type is contractible. Externalising the internal contractibility yields a strong -categorical statement: the space of NNO structures, formed in the -category , is a contractible Kan complex.

The aim of this paper is to make this transfer rigorous, and to compare it with the two existing definitions of -NNO available in the literature: Lurie’s parametrised NNO , formulated for presentable -toposes via a small-colimit-preserving recursion principle, and Rasekh’s NNO , which lives in any elementary -topos and is constructed from the loop space of . The first is convenient when one has Giraud-style axioms; the second is intrinsic to the elementary axiomatic and was the missing piece to certify that elementary -toposes are indeed natural homes for arithmetic.

Contributions

  1. We give a self-contained statement of contractibility of the type of NNOs in HoTT (§2, 7), recall Lambek’s theorem at the -categorical level, and explain how rigidity at this level becomes contractibility once one moves from sets-of-iso-classes to -groupoids.

  2. We give a precise account of Lurie’s parametrised NNO (§3, 12, 20) and prove its equivalence with the -categorical NNO when is the underlying -category of a -topos.

  3. We formalise the higher coherence problem (§4, 21) as the requirement that, for each , the comparison maps between two NNOs are coherent up to -homotopy.

  4. We prove our main theorem (§5, 23): in any -topos that admits a HoTT model, the space is contractible.

  5. We compare with Rasekh’s circle-construction (§6) and exhibit the natural map identifying the two NNOs.

  6. We discuss synthetic approaches via Riehl–Shulman simplicial type theory (§7) and list open problems (§10).

Outline

2 reviews the -categorical NNO, Lambek’s theorem, and the contractibility result of Paper III/V. 3 introduces Lurie’s parametrised NNO and Rasekh’s elementary -NNO. 4 formalises the higher-coherence tower. 5 contains the main contractibility theorem. 6 relates the construction to the loop-space-of- approach. 7 discusses synthetic approaches. 10 closes with open problems.

Conventions

We use for the -category of -categories and for the -category of -groupoids (“spaces”). For an -category , denotes the mapping space. We write for a terminal object. Throughout, “HoTT” refers to Martin-Löf type theory with , , identity types, finite coproducts, the natural numbers type, function extensionality, and the univalence axiom for at least one hierarchy of universes.

2 Background: 1-categorical NNO and contractibility

We begin by recalling the classical material in a form that will generalise cleanly to the -categorical setting.

2.1 Pointed endomorphisms and -NNO

Definition 1 (Pointed dynamical system). Let be a category with terminal object . The category has as objects triples , and morphisms are arrows in such that and .

Definition 2 (NNO). A natural numbers object in is an initial object of .

Equivalently, viewing the endofunctor given by (when coproducts exist), an NNO is an initial -algebra: a pair initial in .

Lemma 3 (Rigidity of initial objects). If are initial in any category, there is a unique isomorphism , and the automorphism group is trivial.

Proof. Initiality of gives a unique map , and dually a unique . The composites and are both morphisms ; since is initial, the hom-set has exactly one element, hence . Similarly . Applying the same argument with , every endomorphism of equals , so . ◻

Lemma 4 (Lambek). If is an initial -algebra, then is an isomorphism.

Proof. The map endows with the structure of an -algebra, denoted . By initiality of there is a unique -algebra homomorphism , that is, a morphism in with On the other hand, itself is an -algebra homomorphism , since trivially. Thus is an -algebra endomorphism, and by initiality (applied to as the source of a unique map to itself) it equals . We conclude . For the other composite, observe using functoriality of . Thus is two-sided inverse to , and is an isomorphism. ◻

Remark 5. The Lambek square depicting the proof is \begin{tikzcd}[column sep=large, row sep=large] FI \arrow[r, "Fh"] \arrow[d, "\iota"'] & F(FI) \arrow[d, "F\iota"] \\ I \arrow[r, "h"'] & FI \end{tikzcd} which commutes by definition of as an -algebra homomorphism.

Theorem 6 (Universal property of NNO). Let be an NNO in . For every in there exists a unique in with and .

2.2 1-Categorical contractibility (rigidity of NNOs)

We use the standard truncation conventions: a -type is contractible, a -type is a (mere) proposition (a groupoid in which any two objects are connected by at most one morphism), and a -type is a set. A nonempty groupoid in which every hom-set is a singleton is contractible—a -type.

In , the NNO is . By 3 the groupoid of NNOs in has trivial automorphisms and a unique morphism between any two objects: it is a contractible groupoid, equivalently a -truncated space.

Theorem 7 (1-categorical contractibility of ). In any category with terminal object, the groupoid of NNO structures is either empty or contractible (i.e. a -type). Equivalently, the moduli space of NNOs in is a (mere) proposition: existence implies essential uniqueness, with no nontrivial automorphisms or higher cells (which are absent at the -categorical level).

Proof. 3 provides a unique isomorphism between any two NNOs and triviality of automorphisms. Hence the groupoid has a unique morphism between any pair of objects. When nonempty, such a groupoid is equivalent to the terminal groupoid , hence contractible. ◻

2.3 HoTT contractibility

In HoTT we go further. Let be a univalent universe. The result we recall here is stated as Theorem 2.7 in our companion paper  and as Theorem 4.4 in ; it is also implicit in the discussion of the natural numbers type in . Because those references rely on internal context (notation, intermediate lemmas), we restate the theorem and give a self-contained proof.

Definition 8 (Type of NNOs in HoTT). where

Note that is, by construction, an iterated -type whose body is of a -type; since is a (mere) proposition and of propositions is a proposition, is a proposition.

Theorem 9 (Contractibility of in HoTT ). The type is contractible. The centre of contraction is where is the inductive type of natural numbers and is the canonical witness of initiality given by the standard recursor together with its computation rules.

Proof. We must show , i.e. produce a centre and a continuous family of paths from to every point of .

Centre. Take . The proof is constructed as follows. Given , define . By the computation rules of the recursor we have judgmentally and , so the equations are witnessed by . Uniqueness: if also satisfies and , dependent induction on the type-family produces a homotopy . By function extensionality (provable from univalence ), . Combining existence and uniqueness, the type is contractible: together with the -witnesses of the equations is the centre, and the contraction is provided by the step above.

Contraction onto the centre. Take any . We must produce a path Apply to the pointed system : it yields a contractible type whose centre is a unique map with and . Apply to : a unique map with and . The composites and both satisfy the universal-property equations for ; uniqueness inside the contractible type of recursors forces via , and likewise via . Thus is an equivalence (with quasi-inverse ). Univalence () converts the equivalence into a path in . Transporting along produces for some witness . Since is a proposition, . Pairing yields the required path in .

The map is itself constructed by transport and is thus a continuous family of paths from , exhibiting as the centre of contraction. ◻

Remark 10 (The infinite tower). The proof of 9 bundles infinitely many coherences into the propositional fact . Path induction (the -rule) allows us to manipulate paths, -paths, -paths, and so on, with no extra effort: once we have , we automatically get for every , by general HoTT lemmas.

Remark 11 (Why this is stronger). 7 says “unique iso between any two NNOs”. 9 says, in addition, that the space of paths between any two equivalences is contractible, the space of -paths is contractible, and so on. In a -category these higher cells are trivially identities; in an -category they need to be checked. HoTT performs all of this with one-and-the-same proof, because is a mere proposition that already absorbs the entire tower.

3 The -categorical NNO

We now lift 2 to -categories. There are two natural lifts: a parametrised one due to Lurie, and an absolute one suitable for elementary -toposes.

3.1 Lurie’s parametrised NNO

Definition 12 (-NNO, Lurie). Let be a presentable -topos with terminal object . An NNO is an object together with morphisms and such that for every diagram in , the mapping space is contractible.

Here is the -category of pointed endomorphisms in . Concretely, an object of is a triple where , is a global element, and is an endomorphism. A morphism is a tuple where is a morphism in , is a -cell in , and is a -cell in , together with the higher cells provided by composing in . In symbols this is the -categorical limit (formally, an iterated comma object) parametrising pairs .

Remark 13. Equivalently, an -NNO is an initial object in , where “initial” is interpreted in the -categorical sense: the mapping space to every other object is contractible. Lurie phrases the definition via a small-colimit-preserving recursion functor; the equivalence is straightforward.

Example 14. When , the NNO is the constant functor at . Its existence and contractibility of the mapping space is the homotopy-coherent version of the Set-theoretic recursion principle.

Example 15. For the -category of presheaves of spaces on a small -category , the NNO is the constant presheaf at , .

Example 16. For the -topos of sheaves on a topological space , the NNO is the constant sheaf .

3.2 Existence in presentable -toposes

Theorem 17 (Existence in presentable case). Every presentable -topos has an NNO.

Sketch. Presentability ensures small colimits and a small generating set. Build as the sequential colimit where adds a new copy of . Equivalently, . Verification of the universal property uses the universal property of sequential colimits and contractibility of the relevant mapping spaces. ◻

3.3 Elementary -toposes and Rasekh’s NNO

A more delicate question is whether every elementary -topos has an NNO; here we follow the axiomatic of Rasekh . Elementary -toposes are axiomatised by:

  1. finite limits,

  2. locally cartesian closure,

  3. subobject classifier,

  4. object classifier (a univalent universe of small types),

  5. finite colimits.

They need not be presentable.

Theorem 18 (Rasekh ). Every elementary -topos has an NNO. In particular, the existence of the NNO does not need to be added as a separate axiom: it is derivable from the other axioms of an elementary -topos.

Sketch of Rasekh’s argument. The circle exists in any elementary -topos as a higher inductive type (or, more carefully, as the geometric realisation of the simplicial circle). Rasekh shows that the loop space has a -action and that its connected component of the basepoint (or, in pointed form, the universal cover) functions as an NNO. The argument uses descent, locality, and classification of univalent maps. ◻

Remark 19. Rasekh’s proof is striking because it derives a discrete, -truncated, NNO from a manifestly -truncated object, , via genuinely -categorical machinery. There is no -categorical analogue: in the -topos of sets is a singleton.

3.4 Equivalence with the -NNO when is a -topos

Theorem 20 (Comparison). Let be a -topos with NNO , and let be its embedding as a -category, viewed as an -category. Then is an -NNO of in the sense of 12.

Proof. The mapping spaces in are -truncated (sets). The mapping space is therefore a set, and is the hom-set of 1. By the universal property in , this set has exactly one element, hence is contractible. ◻

4 Higher coherences

Why is the -NNO “more delicate”? The naive answer is: in a -category, “unique map” is a single condition. In an -category, “unique map” must be promoted to “unique up to coherent homotopy”. Concretely, given two NNOs in , we need a comparison map together with the homotopies filling the squares \begin{tikzcd}[column sep=large, row sep=large] \mathbf{1} \arrow[r, "0_{1}"] \arrow[dr, "0_{2}"'] & N_{1} \arrow[d, "u"] \arrow[r, "s_{1}"] \arrow[dr, phantom, "\Downarrow\,\beta", near start] & N_{1} \arrow[d, "u"] \\ & N_{2} \arrow[r, "s_{2}"'] & N_{2} \end{tikzcd} Filling the upper-left triangle is a -cell , and filling the right-hand square is a -cell . Beyond these, we need:

  1. compatibilities of these homotopies (i.e. -cells filling in the obvious squares),

  2. compatibilities of those compatibilities (-cells),

  3. and so on, ad infinitum.

Proposition 21 (Initiality absorbs the entire coherence tower). The initiality of an -NNO already encodes, in a single property, the entire infinite tower of coherence data sketched above. Concretely, for any two -NNOs and in an -category , the mapping space is contractible.

Proof. By definition of -NNO, both and are initial objects of . Initial objects in any -category have contractible mapping spaces to every object, in particular to each other. Contractibility of is equivalent to existence of a -cell (the comparison map and the homotopies ), uniqueness up to a contractible space of -cells (the next-level coherences), uniqueness of those up to a contractible space of -cells, and so on inductively at every level . ◻

Remark 22. The content of 21 is that contractibility of is equivalent to:

  • : existence and uniqueness up to homotopy of the comparison map;

  • for all : triviality of all higher loop spaces, i.e. the entire tower of compatibilities.

4.1 Truncation level of

Define as the full subspace of the -groupoid (the maximal sub--groupoid of ) on objects that are initial.

Theorem 23 (Contractibility of the -NNO space). For any -topos in which an NNO exists, the space is contractible.

Proof. The full sub--groupoid of an -category on the initial objects is either empty or contractible: this is the -categorical analogue of 3. Spelling this out: given any two initial objects , the mapping space is contractible by 21; in particular it is inhabited, so the sub--groupoid of initial objects is connected. The automorphism space of any initial object is also contractible (apply 21 with ), which forces all loop spaces to be contractible, hence trivial. A connected -groupoid with trivial loop spaces is, by Whitehead’s theorem, contractible. ◻

5 The main theorem: contractibility for -NNOs

5.1 Statement and proof

We now combine the HoTT contractibility result with Shulman’s interpretation theorem to give an internal-to-external argument for 23, and to compare it with Rasekh’s circle-construction.

Theorem 24 (Main theorem). Let be an -topos that admits a model of HoTT + univalence (e.g. any Grothendieck -topos, by ). Then:

  1. There exists an -NNO in (12).

  2. The space is contractible (a -type).

  3. Any two -NNOs in are connected by an essentially unique equivalence.

  4. The automorphism -group of an -NNO is contractible.

Proof. By Shulman’s theorem, admits a model of HoTT in which is interpreted as the object classifier and the type of 8 is interpreted as an internal object of (more precisely, as the underlying object of an -groupoid object of , classified by ). By 9, this internal type is contractible (i.e. the proposition has a global element).

Externalisation. The functor , , is the global-sections functor. It preserves limits and (since is the unit of the model) takes the internal type to the external -groupoid . Internal contractibility of in the HoTT model is the global element of , which under externalisation becomes a global point of , witnessing that is contractible in . (For a detailed account of the internal-to-external transfer of contractibility statements, see .)

Existence (1) follows from 17 when is presentable, or from 18 when is elementary. Statement (2) is the externalisation just described. Statements (3) and (4) follow from (2) by standard arguments: a contractible -groupoid has a unique-up-to-contractible-choice path between any two points, and trivial loop spaces at every point. ◻

5.2 What “contractible” contributes beyond “unique iso”

Remark 25 (Higher coherence cancellation). 24 packages infinitely many layers of coherence into one statement. To see the gain concretely, consider the recursion principle: given in , we get in . In a -topos, this is a single morphism. In an -topos, comes equipped with:

  • a -cell witnessing ,

  • a -cell witnessing ,

  • -cells expressing that the choice of -cells is unique up to homotopy,

24 guarantees that the data above is recoverable up to a contractible space of choices. In HoTT, the work is done by pattern-matching on identity types and using -elimination.

5.3 Identification with Rasekh’s NNO

Theorem 26 (Rasekh  Lurie internally). Let be an elementary -topos. The NNO constructed by Rasekh from the loop space of coincides, up to a contractible space of equivalences, with any presentation-based -NNO in the sense of 12 (when both are defined).

Proof. By part (2) of 24, is contractible whenever an NNO exists. Both Rasekh’s NNO (18) and any Lurie-style NNO (12) are points of . Hence they are connected by a unique-up-to-contractible-choice equivalence. ◻

6 Rasekh’s circle-construction of the NNO

We now sharpen the discussion of Rasekh’s circle-construction.

6.1 The role of

In an elementary -topos , the circle is the higher inductive type generated by a point and a loop . (One must check that admits this HIT. Rasekh shows the relevant pushout exists using descent.) The loop space is a group object in in the homotopical sense.

Theorem 27 (Rasekh, in HoTT form). in any elementary -topos , where is the group object obtained from the type of integers in .

Idea. Use the encode–decode method (Licata–Shulman ) to construct a fibration where the loop acts as the successor equivalence . The total space of is contractible, and the fibre over is . ◻

Remark 28 (Recovery of from ). Once is constructed in (via 27), is obtained as the subobject of non-negative integers, which is isomorphic to the colimit construction in 17. The key point is that elementary -toposes have enough structure—specifically, locally cartesian closure plus a univalent universe—to internalise this construction.

6.2 Why this fails in -topos theory

In a -topos , every type is -truncated, so is the singleton (a single point with no nontrivial loops, since paths don’t exist). The encode–decode argument collapses, and we cannot recover or this way. The -categorical setting is therefore not just a technical generalisation: it makes essentially new constructions possible.

6.3 Higher inductive types in elementary -toposes

The construction of as a HIT in an elementary -topos is more delicate than the corresponding sheaf-theoretic construction. The required ingredient is the existence of geometric realisation of suitable diagrams; Rasekh’s approach is to encode as a particular pushout diagram and verify by descent that this pushout exists.

Remark 29 (Generalisation beyond ). The same strategy applies to higher spheres and Eilenberg–MacLane objects . In particular, the loop space in an elementary -topos has a canonical -action when (by suspension), giving a more conceptual route to and hence .

Proposition 30 (Universal cover viewpoint). In an elementary -topos , the universal cover has total space that, viewed as a discrete groupoid in , is the -torsor (with the -action given by deck transformations). Restricting to non-negative components yields .

Sketch. The universal cover of in is . In an elementary -topos, this becomes a fibration whose fibre is . The discrete object underlying the fibre is the type of integers, which the elementary axiomatic supplies via the object classifier and locally cartesian closure. ◻

6.4 Power objects vs object classifier

A subtle point in the elementary axiomatic is whether one assumes power objects (like -toposes) or an object classifier (Lurie’s -version). Power objects classify subobjects; the object classifier classifies all small maps.

Proposition 31 (Object classifier suffices). In an elementary -topos with object classifier , the NNO can be constructed without separate appeal to power objects.

Proof. The construction in 27 uses only and pushouts; no separate power-object axiom is invoked. ◻

7 Synthetic approaches via simplicial type theory

Riehl–Shulman simplicial type theory (STT)  extends HoTT with a directed interval and a directed path type . The intent is to enable synthetic reasoning about -categories rather than -groupoids.

7.1 Brief review of STT

Riehl–Shulman simplicial type theory adds to the type-theoretic context a directed interval (an extension type with two endpoints and a unique non-identity directed path) and the corresponding hom-types Unlike the symmetric path types of HoTT, hom-types are inherently directed: and are not interchangeable in general. To talk about -categories synthetically, STT adds two predicates:

  • the Segal condition, asserting horn-filling for the inner -simplex , which encodes composition;

  • the Rezk condition (also called “completeness”), asserting that all isomorphisms in the category are paths.

A type satisfying both is a synthetic -category. The universe of Rezk-complete types is itself a Rezk-complete type and forms a synthetic -category of -categories.

7.2 An NNO in STT

In STT, one can define the type where uses directed mapping spaces. The contractibility of should follow once the universe is shown to be Rezk-complete in STT—a property partially proved by Gratzer–Weinberger–Buchholtz  for the universe of discrete types.

Remark 32 (Open). A complete contractibility result for in the universe of discrete types of  would give a synthetic proof of 24, internal to STT. We are not aware of a published proof.

7.3 Cubical type theory

Cubical type theory  provides a constructive interpretation of the univalence axiom: rather than postulating as an axiom, cubical type theory produces it as a defined term. The interpretation uses a primitive notion of path based on the cube category.

Remark 33. In cubical type theory, the contractibility of (9) becomes a constructive theorem: the centre of contraction can be computed, and the contraction map sends each to a concrete cube witnessing the path. This is the basis for a Cubical Agda formalisation; we leave such a formalisation to future work.

Remark 34 (Cubical NNO). The constructive content of Lambek’s theorem (4) is also more transparent in cubical type theory: the inverse of the structure map is computed by case analysis on vs , with the round-trip equations and holding judgmentally.

7.4 Comparing internal language flavours

  • HoTT internal language: -toposes (Shulman ); types are -groupoids.

  • STT internal language: -categories (Riehl–Shulman ). Types are general -spaces.

  • Cohesive HoTT: differential and geometric ambient toposes (Schreiber–Shulman ).

For the NNO, all three internal languages give equivalent answers when restricted to discrete types, but only the first two have published contractibility theorems.

8 Free pointed dynamical system on the empty set

A useful recasting of the NNO is as the free pointed dynamical system on the empty set.

Theorem 35 (NNO as left adjoint to a forgetful). The forgetful functor , , has a left adjoint . Moreover, , the NNO of .

Proof. Define where takes to and to . The unit is the inclusion of as the first summand. The counit extends on the -summand and applies to on the -summand. Verification of the triangle identities is straightforward.

For , since and the basepoint becomes , the shift becomes the successor. ◻

Corollary 36 (Hom characterisation). is naturally isomorphic to a singleton, expressing that is initial.

Proof. By adjunction . ◻

8.1 Lifting to -toposes

The same construction applies in any -topos with finite coproducts and pullbacks: where is the underlying-object functor. The image of the empty (initial) object under is the NNO of .

Remark 37. This is the cleanest abstract characterisation: the NNO is the value of the free-pointed-dynamical-system functor at the initial object. 9 then says that this functor is well-defined up to a contractible space of choices.

9 Lurie’s parametrised NNO in detail

Lurie’s actual definition in is somewhat more subtle than 12: it is parametrised over a base.

Definition 38 (Parametrised NNO ). Let be an -topos and let . A relative NNO over is an object in , equipped with and over , such that is the NNO of the slice .

The absolute case is recovered by taking .

Theorem 39 (Parametrisation is contractibly functorial). The assignment extends to a functor , valued in contractible spaces. Equivalently, the parametrised NNO is, up to a contractible space of choices, functorial in the base.

Sketch. Functoriality is a consequence of pullback functoriality of slices: a morphism in induces , which preserves the NNO universal property. Contractibility of each is 24 applied to the slice. The two together give a homotopy-coherent functor; the precise claim is that the space of such functors is itself contractible. ◻

Remark 40 (Globalness). Theorem 39 is the precise statement of “the NNO is uniquely determined globally, not just locally.” In a -topos this would be a single global iso between any two parametrised NNOs; in an -topos it is a contractible space of comparison data, which is the right -categorical strengthening.

9.1 Relation to spectra

In stable -categories (or more generally in -toposes with stable structure), the NNO can be seen as the truncation of a more refined object: the sphere spectrum , whose underlying space is .

Remark 41. The -truncation of the connective sphere spectrum is the discrete , whose non-negative part is the NNO. This relates the NNO to the homotopy theory of spectra and chromatic homotopy theory.

10 Open problems

  1. Internal-to-external transfer. Make the externalisation step in the proof of 24 fully precise. This includes coherent strictification of the internal type to an external -groupoid.

  2. Elementary case (Rasekh). Prove 23 for elementary -toposes without invoking Shulman’s theorem. The latter is currently stated for Grothendieck -toposes; the elementary case is conjectural.

  3. Synthetic NNO contractibility in STT. Prove that is contractible in simplicial type theory, using only Rezk-completeness of the universe of discrete types.

  4. Course-of-values and primitive recursion. Develop the theory of course-of-values recursion (Paper III Prop. 6.3) at the -categorical level, including coherent dependent induction.

  5. Lurie’s parametrised NNO. Compare the parametrised version (over a base ) with the absolute version studied here. Show that the parametrisation is functorial up to contractible choice.

  6. Cubical Agda formalisation. Formalise 24 in Cubical Agda, using the existing development of -toposes-as-models (cf. Mortberg–Vezzosi).

  7. Univalent foundations of arithmetic. Use 24 to formalise basic arithmetic theorems—associativity and commutativity of , distributivity—at the -categorical level, with all coherences automatic.

11 Recursion principles at the -categorical level

The recursion principle generalises in several ways inside an -topos. In this section we collect those generalisations and explain the role played by contractibility in each.

11.1 Iteration vs primitive recursion

Definition 42 (Primitive recursion). Given , , and , primitive recursion produces with and .

Proposition 43 (Primitive recursion from iteration). Primitive recursion is reducible to iteration via the state-space pointed dynamical system with . The recursor for this system, post-composed with the projection , gives .

Proof. The recursor for satisfies and . Inductively, and , where is defined by the primitive-recursion equations. ◻

11.2 Course-of-values recursion

Definition 44 (Course-of-values recursion). Given and such that depends only on the values , course-of-values recursion produces a unique fixed point .

The standard reduction uses the history state space :

Proposition 45. Course-of-values recursion is reducible to iteration via the state space , where .

11.3 Dependent induction

In a locally cartesian closed -category, the NNO satisfies dependent induction.

Theorem 46 (Dependent induction from NNO). Let be locally cartesian closed with NNO . For any morphism , with and , there is a unique section with and .

Sketch. Apply iteration in the slice . The total space becomes a pointed dynamical system over , and the NNO universal property in the slice gives the section. Locally cartesian closure ensures the slice has the requisite structure. By contractibility (24), the section is unique up to a contractible space of choices. ◻

12 Worked examples

In this section we illustrate 24 on three concrete -toposes, in order of increasing geometric complexity.

12.1 The terminal -topos:

The -category of -groupoids (“spaces”) is the terminal -topos. By 17 it has an NNO; concretely, this is the discrete groupoid viewed as a -truncated space.

Example 47 (NNO in ). The space has as objects pairs where and is initial-data identifying with . By 24(2), is contractible. Concretely, every object can be connected to by a unique-up-to-contractible-choice path, and the higher-dimensional cells of are all contractible.

12.2 Presheaf -toposes

For a small -category , the -topos is presentable, hence by 17 has an NNO.

Proposition 48. The NNO of is the constant functor , with structure maps inherited pointwise. Its space of NNO structures is contractible.

Proof. Since the constant functor preserves limits (it is right adjoint to the colimit-evaluation), it sends the NNO to a pointed dynamical system in , denoted . The recursion principle for is verified pointwise. Contractibility follows from 24 applied to . ◻

Example 49 (Simplicial spaces). For , is the -topos of simplicial spaces; the NNO is the bisimplicial set whose every level is the discrete space .

12.3 Sheaves on a topological space

Example 50 (Sheaf -topos). For a topological space (or, more generally, a Grothendieck site ), the -topos has as NNO the constant sheaf , which assigns to each open the discrete space of locally constant -valued functions . Equivalently, . Its NNO-space is contractible by 24.

12.4 The cohesive case

When is a cohesive -topos , the NNO sits in the discrete sub--topos and remains contractible there. The cohesive structure adds geometric information (smooth, differential, supersmooth) but does not affect the discrete arithmetic; this is the modular composition pattern in action.

13 Comparison with classical Peano arithmetic

We pause to relate the universal-property NNO to Peano’s axioms, as a sanity check that all the abstract machinery agrees with the classical picture.

Theorem 51 (Equivalence NNO Peano in ). A triple in is an NNO iff it satisfies the Peano axioms:

  1. .

  2. is a function .

  3. for all .

  4. is injective.

  5. Induction: any subset with and closed under equals .

Sketch. () Suppose is an NNO. (P1)–(P2) are immediate. (P3): the recursor for produces with and ; injectivity of -valued recursion forces . (P4) is more subtle: a clever choice of pointed dynamical system (with carrier ) yields a left-inverse to , hence injectivity. (P5) is the universal property restricted to subsets, characteristic-functioned via . () Conversely, Peano’s axioms define a unique-up-to-iso initial pointed dynamical system; the iteration construction yields the recursor. ◻

Remark 52. In an arbitrary -topos, “injectivity” must be expressed via monomorphisms, “not equal” via disjointness in , and “induction over subsets” via the subobject classifier. The proof goes through with these modifications. In an -topos, induction must additionally be replaced by induction over -truncated maps; the contractibility theorem ensures this still gives an NNO.

13.1 Internal Peano in HoTT

In HoTT, Peano’s axioms are not separate theorems but are packaged into the inductive type together with the propositional uniqueness encoded by the recursion and induction principles. This is again an instance of the modular composition: each axiom emerges as a corollary of the universal property, hence of contractibility.

Proposition 53 (Disjointness of constructors). In HoTT, , and similarly .

Idea. Define by , . By , transport gives , contradicting ’s emptiness when combined with the inhabitant of . ◻

14 Discussion

14.1 Philosophical remarks

The contractibility theorem solves, at the -categorical level, a version of Benacerraf’s problem : “which set is the natural numbers?” becomes “which -groupoid is the natural numbers?” The answer is: any one of them, but they are all canonically the same—and the canonicality is itself part of the data. There is no genuine choice to be made beyond “the type of NNOs is contractible.”

14.2 Relationship to other modular foundations

In the modular framework adopted by the broader research programme, the NNO sits at the bottom of a tower:

  1. NNO (this paper): provides arithmetic.

  2. Real numbers HIIT: built on (Paper V §5).

  3. Coalgebraic transcendentals: built on streams over (Topic 1).

  4. -Langlands: built on (Topic 2).

  5. Higher inductive types of all kinds: built on the entire HoTT framework (Topic 6).

The contractibility of NNO at the -level ensures that everything built on top of NNO inherits a unique, canonical foundation. This is the modular composition principle: each layer is uniquely determined by the previous one, up to contractible choice.

14.3 Limitations

  • Shulman’s interpretation theorem currently covers Grothendieck -toposes, not all elementary ones. The full transfer of 9 to elementary -toposes therefore remains conjectural.

  • Higher coherence verification, while “automatic” in HoTT, requires actual computation in concrete models. We have not exhibited explicit cellular witnesses for, say, the bisimplicial set model.

  • The connection to Rasekh’s circle-construction is via contractibility: we know the two NNOs agree, but we do not give an explicit comparison map.

15 Conclusion

The natural numbers object is one of the simplest universal constructions in category theory; nonetheless, lifting it from the -categorical to the -categorical setting illustrates the full power of modern higher-categorical machinery. The key insight is that contractibility, as defined in HoTT (a single propositional condition), automatically encodes an infinite tower of homotopy coherences. This makes HoTT the ideal language to state and prove -categorical universal properties without the bookkeeping of explicit cell-by-cell verification.

We have presented:

  • the -categorical NNO and its contractibility (7);

  • Lurie’s parametrised -NNO (12) and its existence for presentable (17);

  • Rasekh’s circle-construction of an NNO in any elementary -topos (18);

  • the main contractibility theorem (24) showing is contractible whenever HoTT models in ;

  • a synthetic perspective via simplicial type theory.

The remaining open problems—particularly the synthetic STT proof and the Cubical Agda formalisation—are within reach of current methods. Once completed, they will close the gap between the conceptual “contractibility solves it” answer and the explicit cellular-coherent verification.

Acknowledgements

The author thanks the Magneton Research Collective for ongoing discussion, and acknowledges the foundational work of Lurie, Rasekh, Shulman, Riehl, and the HoTT community.

16 Operational verification in Haskell

The companion source tree at src/infinity-nno/ contains a Haskell encoding of the NNO universal property. The relevant types and functions are:

  • NNO.PtEndo a – a record type with fields ptBase :: a and ptStep :: a -> a, representing a pointed dynamical system on a Haskell type a.

  • NNO.rec :: PtEndo a -> Integer -> a – the recursor witnessing the universal property of . By construction rec pe 0 == ptBase pe and rec pe (n+1) == ptStep pe (rec pe n) for .

  • NNO.lambekIso :: Integer -> Bool – a property check that the structure map is invertible (Lambek’s theorem in operational form).

  • Properties.runChecks :: Bool – a battery of property checks combining prop_rec_zero, prop_rec_step, and prop_lambek.

  • Proofs.canonicalIsoIsId and Proofs.uniqueAutoIsId – operational counterparts of 3 and 7, demonstrating that the canonical iso between two NNOs is the identity and that the automorphism group is trivial.

The Main.hs module exhibits the universal property on concrete examples including factorial via primitive recursion (43).

17 Mechanised proof in Lean 4

The companion Lean file lean/infinity-nno/NNO.lean contains a self-contained mechanisation of the universal property and Lambek’s theorem, suitable for use with Mathlib4. Highlights:

  • InfinityNNO.PtEndo – a structure on a type with fields base : and step : .

  • InfinityNNO.rec – the recursor, defined by pattern matching on Nat.

  • InfinityNNO.recExists – existence half of the universal property: satisfying both equations.

  • InfinityNNO.recUnique – uniqueness, by induction on Nat.

  • InfinityNNO.recUniversal – combined statement: the recursor is the unique such function.

  • InfinityNNO.lambek – the structure map is bijective.

  • InfinityNNO.aut_is_id – any successor-preserving automorphism of fixing is the identity.

The Lean development is intentionally minimal. A more ambitious development would use Mathlib’s CategoryTheory.NaturalNumberObject formalisation and prove the universal property at the level of arbitrary categories with a terminal object.

18 Notation summary

For reference, we collect the principal symbols used in this paper.

  • – a (1- or -)topos.

  • – a terminal object of .

  • – the (1- or -)category of pointed dynamical systems in .

  • – an NNO: object, basepoint, successor.

  • – the recursor: the unique map given .

  • – in HoTT, the type of NNO structures (8).

  • – the external space of NNO structures in .

  • – the -category of -groupoids (“spaces”).

  • – the circle as a HIT.

  • – the mapping space in an -category .

  • , , – the standard truncation predicates.

  • – type-theoretic equivalence; – categorical isomorphism.

  • – the univalence axiom; – its inverse.

99

J. Lurie, Higher Topos Theory, Annals of Mathematics Studies, vol. 170, Princeton University Press, 2009. arXiv:math/0608040.

J. Lurie, Spectral Algebraic Geometry, manuscript, February 2018. https://www.math.ias.edu/~lurie/papers/SAG-rootfile.pdf.

N. Rasekh, A Theory of Elementary Higher Toposes, 2018. arXiv:1805.03805.

N. Rasekh, Every Elementary Higher Topos has a Natural Number Object, Theory and Applications of Categories 37, no. 13 (2021), 337–377. arXiv:1809.01734.

M. Shulman, All -toposes have strict univalent universes, 2019. arXiv:1904.07004.

The Univalent Foundations Program, Homotopy Type Theory: Univalent Foundations of Mathematics, Institute for Advanced Study, 2013. https://homotopytypetheory.org/book/.

D. R. Licata and M. Shulman, Calculating the fundamental group of the circle in homotopy type theory, LICS 2013, 223–232.

E. Riehl and M. Shulman, A type theory for synthetic -categories, Higher Structures 1 (2017), no. 1, 147–224. arXiv:1705.07442.

D. Gratzer, J. Weinberger, and U. Buchholtz, Directed univalence in simplicial homotopy type theory, 2024. arXiv:2407.09146.

U. Schreiber and M. Shulman, Quantum gauge field theory in cohesive homotopy type theory, EPTCS 158 (2014), 109–126.

J. Lambek, A fixpoint theorem for complete categories, Math. Z. 103 (1968), 151–161.

F. W. Lawvere, An elementary theory of the category of sets, PNAS 52 (1964), 1506–1511.

S. Awodey, Type theory and homotopy, in Epistemology versus Ontology, Springer, 2012, 183–201.

P. Benacerraf, What numbers could not be, Philosophical Review 74 (1965), 47–73.

V. Voevodsky, Univalent foundations, lecture notes, Institute for Advanced Study, 2011. https://www.math.ias.edu/vladimir/Site3/Univalent_Foundations.html.

P. Martin-Löf, Intuitionistic Type Theory, Bibliopolis, Naples, 1984.

C. Rezk, Toposes and homotopy toposes, lecture notes, University of Illinois at Urbana–Champaign, 2010. https://faculty.math.illinois.edu/~rezk/homotopy-topos-sketch.pdf.

A. Joyal, Notes on quasi-categories, manuscript, June 2008. https://www.math.uchicago.edu/~may/IMA/Joyal.pdf.

D.-C. Cisinski, Higher Categories and Homotopical Algebra, Cambridge Studies in Advanced Mathematics, vol. 180, Cambridge University Press, 2019.

YonedaAI, The Universal Property Perspective: Numbers as Initial Successor Structures, Magneton Research Collective, 2026.

YonedaAI, The HoTT Perspective: Numbers as Inductive Types up to Path Equivalence, Magneton Research Collective, 2026.

YonedaAI, The Univalent Correspondence: Synthesis, Magneton Research Collective, 2026.

K. Kapulkin and P. L. Lumsdaine, The simplicial model of univalent foundations (after Voevodsky), J. Eur. Math. Soc. 23 (2021), 2071–2126.

C. Cohen, T. Coquand, S. Huber, and A. Mörtberg, Cubical Type Theory: a constructive interpretation of the univalence axiom, TYPES 2015. arXiv:1611.02108.

E. Riehl, Synthetic perspectives on spaces and categories, 2025. arXiv:2510.15795.

The nLab, elementary -toposhttps://ncatlab.org/nlab/show/elementary+(infinity,1)-topos, accessed 2026.

The nLab, natural numbers objecthttps://ncatlab.org/nlab/show/natural+numbers+object, accessed 2026.


  1. Throughout, “Paper III”, “Paper V”, etc. refer to companion papers in the present author’s series The Univalent Correspondence, cited in the bibliography. The relevant statements and proofs are reproduced inline in this paper.↩︎