Nathanael Arkor

Nathanael Arkor is a postdoc researching [[category theory]] and [[type theory]]. Under the pseudonym *[varkor](https://github.com/varkor)* he is the author of the diagram editor *[[quiver (editor)|quiver]]*.

* [personal page](https://arkor.co/)

* [institute page](https://www.muni.cz/en/people/247504-nathanael-amariah-arkor)

## Selected writings

On [[monads]] and [[higher-order algebraic theories]]:

* {#Arkor22Thesis} [[Nathanael Arkor]], *Monadic and Higher-Order Structure*, PhD thesis, Cambridge (2022) [[doi:10.17863/CAM.86347](https://doi.org/10.17863/CAM.86347), [pdf](https://www.repository.cam.ac.uk/bitstreams/666be4fb-957b-4c2e-83fc-8124621f0c43/download), [[Arkor-MonadicAndHigherStructure.pdf:file]]]

On [[simple type theory]]:

* [[Nathanael Arkor]], [[Marcelo Fiore]], *Algebraic models of simple type theories: a polynomial approach*, Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science (2020) 88-101 [[doi:10.1145/3373718.3394771](https://doi.org/10.1145/3373718.3394771), [arXiv:2006.16949](https://arxiv.org/abs/2006.16949)]

On [[formal category theory|formal theory]] of [[relative monads]] via [[virtual equipments]]:

* [[Nathanael Arkor]], [[Dylan McDermott]], *The formal theory of relative monads* [[arXiv:2302.14014](https://arxiv.org/abs/2302.14014)]

* {#AM23b} [[Nathanael Arkor]], [[Dylan McDermott]], _Relative monadicity_ (2023) [[arXiv:2305.10405](https://arxiv.org/abs/2305.10405)]

* [[Nathanael Arkor]], *Relative monads and their many guises*, talk at *[[Category Theory Octoberfest]]* [2022](https://richardblute.ca/octoberfest-2022/) [slides:[pdf](https://richardblute.files.wordpress.com/2022/10/arkor-ofest.pdf), video:[mp4](https://richardblute.files.wordpress.com/2022/10/arkor-ofest-1.mp4)]

On [[higher-order logic|higher-order]] [[algebraic theories]]:

* [[Nathanael Arkor]], [[Dylan McDermott]], *Higher-order algebraic theories* ([pdf](https://arkor.co/files/Higher-order%20algebraic%20theories.pdf))

On the [[adjoint functor theorem]] in the context of [[lax-idempotent 2-monads]]:

* {#ALL23} [[Nathanael Arkor]], [[Ivan Di Liberti]], [[Fosco Loregian]], _Adjoint functor theorems for lax-idempotent pseudomonads_, [[arXiv:2306.10389](https://arxiv.org/abs/2306.10389)]

## Related entries

* [[formal category theory]]

category: people

[[!redirects varkor]]


Nathaniel Stapleton

[[!redirects Nat Stapleton]]

* [webpage](http://www.ms.uky.edu/~njst237/)

## Selected writings

Introducing the [[transchromatic character]]:

* {#Stapleton11} [[Nathaniel Stapleton]], _Transchromatic generalized character maps_, Algebr. Geom. Topol. 13 (2013) 171-203 ([arXiv:1110.3346](https://arxiv.org/abs/1110.3346), [euclid:agt/1513715495](https://projecteuclid.org/euclid.agt/1513715495))

* {#Stapleton13} [[Nathaniel Stapleton]], _Transchromatic twisted character maps_,  J. Homotopy Relat. Struct. 10, 29–61 (2015). ([arXiv:1304.5194](https://arxiv.org/abs/1304.5194), [doi:10.1007/s40062-013-0040-9](https://doi.org/10.1007/s40062-013-0040-9))

* [[Nathaniel Stapleton]], _Transchromatic generalized character maps (and more!)_ ([pdf](http://etale.site/livetex/saft/stapleton.pdf))

* [[Nathaniel Stapleton]], _An Introduction to HKR Character Theory_ ([pdf](http://homepages.uni-regensburg.de/~stn30788/papers/Characters.pdf))

category: people


natural bijection

A [[natural isomorphism]] of [[sets]], hence a natural [[bijection]].

[[!redirects natural bijections]]


natural bundle

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Bundles
+-- {: .hide}
[[!include bundles - contents]]
=--
#### Differential geometry
+--{: .hide}
[[!include synthetic differential geometry - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A type of [[fiber bundle]] (usually: [[vector bundle]]) over ([[smooth manifold|smooth]]) [[manifolds]] is called _natural_ if suitable homomorphisms of manifolds naturally lift to morphisms of the corresponding bundles covering them.

The archetypical example is the [[tangent bundle]] $T X$ of a manifold $X$. For $f \colon X \to Y$ any [[smooth function]] then push-forward of vector fields yields a fiberwise linear morphism $d f \colon T X \to T Y$ of tangent bundles which covers $f$, in that the [[diagram]]

$$
  \array{
    T X &\stackrel{d f}{\longrightarrow}& T Y
    \\
    \downarrow && \downarrow
    \\
    X &\stackrel{f}{\longrightarrow}& Y
  }
$$

[[commuting diagram|commutes]]. (This functoriality of the tangent bundle construction is incidentally also the incarnation of the [[chain rule]] (see there) of [[differentiation]]).

Formally, there is a [[category]] of fiber bundles over manifolds with [[morphisms]] the morphisms of bundles covering morphisms of the base spaces, and there is a projection functor from fiber bundles to their base manifolds. A natural bundle is a [[section]] of this projection functor.

Also "contravariantly natural" bundles such as bundle of [[covectors]] are sometimes referred to as natural bundles (e.g. [Kolář-Michor-Slovak](#KolarMichorSlovak)). But these are covariantly natural not with respect to all smooth functions between manifolds, but only for [[local diffeomorphisms]].

## Examples

* [[tractor bundle]]

* [[Schouten-Nijenhuis bracket]]

## References

Original discussion:

* [[Albert Nijenhuis]], _Geometric aspects of formal differential operations on tensor fields_, Proceedings of the International Congress of Mathematicians 1958, 463–469.  [PDF](https://www.mathunion.org/fileadmin/ICM/Proceedings/ICM1958/ICM1958.ocr.pdf).

* [[Albert Nijenhuis]], _Natural bundles and their general properties_, in: _Differential Geometry (in honor of Kentaro Yano)_, Kinokuniya, Tokyo, 1972, pp. 317–334.  [PDF](https://dmitripavlov.org/scans/nijenhuis-natural-bundles-and-their-general-properties.pdf).

* {#Terng78} [[Chuu-Lian Terng]], *Natural vector bundles and natural differential operators*, Amer. J. Math. **100** (1978) 775-828 [[doi:10.2307/2373910](https://doi.org/10.2307/2373910), [jstor:2373910](https://www.jstor.org/stable/2373910)]

Lecture notes and textbook accounts:

* [[Demeter Krupka]], [[Josef Janyška]], Part 2 of: _Lectures on differential invariants_, Univerzita J. E. Purkyně, Brno (1990) [ISBN:80-210-165-8, [researchgate](https://www.researchgate.net/publication/36792711_Lectures_on_Differential_Invariants)]

* {#KolarMichorSlovak} [[Ivan Kolář]], [[Peter Michor]], [[Jan Slovák]], section 14 of: _[[Natural operations in differential geometry]]_, Springer (1993) [[webpage](https://www.emis.de/monographs/KSM/), [doi:10.1007/978-3-662-02950-3](https://link.springer.com/book/10.1007/978-3-662-02950-3), [pdf](http://www.emis.de/monographs/KSM/kmsbookh.pdf)]

The example of the [[Schouten-Nijenhuis bracket]]:

* {#Michor87} [[Peter W. Michor]], *Remarks on the Schouten-Nijenhuis bracket*,  In: Bureš, J. and Souček, V. (eds.): *Proceedings of the Winter School "Geometry and Physics"* Circolo Matematico di Palermo, Palermo (1987) 207-215 [[dml:701423](https://dml.cz/handle/10338.dmlcz/701423), [pdf](https://dml.cz/bitstream/handle/10338.dmlcz/701423/WSGP_07-1987-1_21.pdf), [[Michor-SchoutenNijenhuisBracket.pdf:file]]]

[[!redirects natural bundles]]

[[!redirects natural vector bundle]]
[[!redirects natural vector bundles]]

[[!redirects natural operation]]
[[!redirects natural operations]]


natural deduction

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Deduction and Induction
+-- {: .hide}
[[!include deduction and induction - contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Foundations
+-- {: .hide}
[[!include foundations - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea
Formalization of mathematical reasoning can be presented in different forms. The framework of **natural deduction** describes a particular class of [[deductive systems]] which is supposed to be close to "natural" _[[deductive reasoning]]_ insofar it is based on the idea of _reasoning from assumptions_ in contrast to proof systems that reason from 'truths' in the tradition of Hilbertian axiomatics.  It is used particularly to present the [[syntax]] of formal [[logic]] and [[type theory]].

+-- {: .un_remark}
###### Remark
The phrase "natural deduction" is not always used to mean the same thing.  Some people use it semi-informally to refer to a "sort of reasoning" that involves making assumptions, perhaps formalized using hypothetical [[judgments]].  Other people take it to refer specifically to deductive systems which are presented using *introduction* and *elimination* rules, which is the meaning we adopt on this page.  There is significant overlap between the two meanings, but they are not identical.
=--

## Summary

### Introduction and elimination
 {#IntroductionAndElimination}

A system of *natural deduction* is a [[deductive system]] containing a class of [[judgments]] generated by some "constructor" operations, and for which each constructor comes with two relevant classes of rules:

* **[[term introduction|Introduction rules]]**, which allow us to conclude a judgment built using the constructor from simpler judgments; and

* **[[term elimination|Elimination rules]]**, which allow us to conclude some other judgment by using a judgment involving the constructor.

For instance, in a system of [[propositional logic]] whose judgments are the truth of [[propositions]], one such constructor might be the "conjunction" connective $\wedge$.  The introduction rule for $\wedge$ would be
$$ \frac{A \; true \qquad B\;true}{A\wedge B\; true}$$
while its elimination rules might be
$$ \frac{A\wedge B\; true}{A\;true} \qquad \frac{A\wedge B\;true}{B\;true}.$$
The introduction and elimination rules must fit together in an appropriate way, sometimes referred to as "harmony".

Similarly, in a system of [[type theory]], the relevant judgments are typing judgments of the form $a:A$, meaning that the [[term]] $a$ belongs to the [[type]] $A$.  In this case, an analogous constructor might be the cartesian [[product type]], whose rules are analogous, but keeping track of the specific terms involved (see [[propositions as types]]):
$$ \frac{a:A \qquad b:B}{(a,b):A\times B}$$
and
$$ \frac{p:A\times B}{\pi_1(p):A} \qquad \frac{p:A\times B}{\pi_2(p):B}.$$

### Formation and computation

In natural deduction systems for type theory, there are usually two other classes of rules:

* **[[type formation|Formation rules]]**, which declare on which basis a new [[type]] can be introduced; and

* **[[computation rule|Computation rules]]** or **conversion rules**, which constrain the result of combining term introduction with term elimination.

These two rules refer to different classes of judgments than the introduction and elimination rules: judgments that a certain thing is a type for the formation rules, and judgments that one term reduces to, or converts with, another, for the computation rules.

For instance, the cartesian product type would come with a formation rule
$$ \frac{A\;type \qquad B\;type}{A\times B\;type}$$
and computation rules such as [[beta-reduction]]
$$ \frac{a:A \qquad b:B}{\pi_1(a,b) \to_\beta a} \qquad \frac{a:A \qquad b:B}{\pi_2(a,b) \to_\beta b}$$
(and possibly [[eta-conversion]]).

Technically, the propositional logic system could also come with a formation rule involving a judgment "is a proposition":
$$ \frac{A\;prop \qquad B\;prop}{A\wedge B\;prop}$$
But it would not have a computation rule, as there are no terms inhabiting its propositions.  (It could, however, be embedded into a type theory via [[propositions as types]], where there would be terms inhabiting its propositions regarded as types).

More generally, natural deduction with computation rules gives a formulation of [[computation]].  See _[[computational trinitarianism]]_ for discussion of this unification of concepts.

On the other hand, in type theories that have a [[type of types]], there may be no need for a separate judgment "$A\;type$", as it can be replaced by a typing judgment "$A:Type$" that $A$ belongs to a type of types.

### Hypothetical reasoning

Natural deduction also generally involves *hypothetical judgments* or *[[deductive reasoning|reasoning]] from [[assumptions]]*.  For instance, the introduction rule for [[implication]] in a system of [[propositional logic]] says that if, *assuming* "$A$", we can derive "$B$", then we can derive "$A\Rightarrow B$".  This is sometimes written as
\[ \frac{\array{[A]\\ \vdots \\ B}}{A\Rightarrow B} \label{impintro} \]
(We now follow the common practice of writing the judgment "$A\;true$" as simply "$A$".)
Here the $\vdots$ indicate an arbitrary [[deduction|derivation]] tree, while the brackets around $A$ indicate that this assumption has been "discharged" and is no longer an assumption in the conclusion $A\Rightarrow B$.  To be precise, we should annotate each bracket somehow to indicate which rule discharged that assumption.

Another way to indicate hypothetical reasoning (which also allows it to fit once again within the general notion of [[deductive system]]) is to indicate in each judgment the hypotheses on which it depends.  Thus, we might write "$A\vdash B$" to mean a hypothetical judgment of $B$ assuming $A$.  With this notation, the introduction rule for $\Rightarrow$ can be written as:
$$\frac{A\vdash B}{\vdash A\Rightarrow B}.$$
The rule \eqref{impintro}, where $\vdots$ indicates an arbitrary [[deduction|derivation]], can then be written as
$$ \frac{\array{\frac{}{A\vdash A} \\ \vdots \\ A\vdash B}}{\vdash A\Rightarrow B}. $$
Here we have prefixed the entire derivation $\vdots$ in \eqref{impintro} by "$A\vdash$" to indicate that it is all performed with $A$ as an assumption, and the discharge of that assumption is indicated by removing this prefix from the final conclusion.  We also begin the deduction with the *axiom* $A\vdash A$ (the [[identity rule]]).

To be fully precise, we should now allow all rules to take place under arbitrary additional hypotheses; thus the introduction rule of $\Rightarrow$ should really be
$$\frac{\Gamma, A\vdash B}{\Gamma\vdash A\Rightarrow B}.$$
where $\Gamma$ denotes an arbitrary list of hypothesis truth judgments.
However, often this unchanged ambient context is unstated, but implicitly assumed to be present.

+-- {: .un_remark}
###### Remark
Hypothetical judgments of this sort are very similar to the [[sequents]] which appear in [[sequent calculus]], and are (as is evident) written with very similar notation.  However, the rules of natural deduction are different from the rules of sequent calculus, as are its formal properties.
=--

This treatment of hypothetical judgments applies also to type theories, where the individual judgments are typing judgments.  In this case, the assumed judgments on the left of the $\vdash$ are generally restricted to be of the form $x:A$ with $x$ a [[variable]] (rather than an arbitrary [[term]]), and these assumed judgments are referred to as the [[context]].  When the judgment on the right of the $\vdash$ may involve variables that occur to its left, one speaks of *generic judgments* rather than "hypothetical" ones.  Thus, a generic judgment is of the form
$$ (x : A) \;\vdash\; (b(x) : B) $$
to be read as

> In a context where we have a term $x$ of a type $A$, there is a term $b(x)$ of [[types in context|type]] $B$.

Thus, for instance, the introduction rule for the [[function type]] is
$$ \frac{(x:A) \;\vdash\; (b:B)}{\vdash (\lambda x.b:A\to B)}. $$

In natural deduction for [[dependent type theory]], we can also have type judgments with hypotheses, such as
$$ (x : A) \;\vdash\; B(x) \; type $$
to be read as

> For each $x$ in $A$ there is a type $B(x)$.  Or: $B$ is a _[[type in context]]_ $A$, a _[[dependent type|type dependent]]_ on $A$.

In a type theory with a [[type of types]], this judgment could be written as $(x:A)\;\vdash\;(B(x):Type)$.

+-- {: .un_remark}
###### Remark
So far, we have been considering hypothetical judgments such as $A\vdash B$ and generic judgments such as $(x:A)\vdash (b(x):B)$ to be "atomic" judgments in a particular [[deductive system]].  In particular, the turnstile symbol $\vdash$ has been simply another symbol that we use to build judgments according to a particular syntax, analogous to the colon $:$.  As remarked at [[deductive system]], this usage of $\vdash$ is *a priori* completely unrelated to its use to indicate provability of theorems in a particular deductive system (such as a system of natural deduction), and therefore perhaps ought to be denoted by a different symbol.

However, it is also possible to incorporate some "knowledge" about the meaning of hypothetical and generic judgments into the deductive system, and thereby bring the two meanings of $\vdash$ back into alignment.  See [[logical framework]] for a development of this idea.
=--

## Properties

### Relation to category theory

The four classes of rules of natural deduction combined give alternative specifications of [[universal constructions]] in [[category theory]]. In [[categorical semantics]] one considers categories which are such that their [[objects]] are regarded as [[types]] and their [[generalized elements]] as [[terms]], then the rules of natural deductions describe the possible construction of [[morphisms]] in that category.

For instance, the connectives of type theory are presentations of [[functors]], but their action on morphisms is not explicitly defined, because [[representability determines functoriality| the action is definable from the introduction and elimination rules]].

(...)

### Decidability

(...)

## Related concepts

* [[logical framework]], [[metalanguage]]

* [[deduction calculus]]

* [[intuitionistic type theory|intuitionistic]]$\;$[[dependent type theory|dependent]]$\;$[[type theory]]

  [[meaning explanation]]

* [[sequent calculus]]

* [[structural rule]]

* [[calculus of constructions]]

* [[definition]]

* [[congruence rule]]

## References

In a broad sense, the idea of natural deduction can be traced back to [[Aristotle]]'s **Prior Analytics** as classical work by J. Bacon, J. Corcoran and T. Smiley around 1970 has argued that his theory of [[syllogism]] can be viewed as a [[fragment]] of natural deduction. For more on this see e.g.

* J. Bacon, _Natural-deduction rules for syllogistic_ , JSL **31** (1966) pp.686-7.

* J. Corcoran, _Completeness of an ancient logic_ , JSL **37** (1972) pp.696-702.

* T. Smiley, _What is a syllogism_ , JPL **2** (1973) pp.136-154.

The next step to the modern conception was an observation by the Polish logician (and Aristotle scholar) J. Lukasiewicz in 1926 that the formalization of mathematical reasoning proposed by [[David Hilbert|D. Hilbert]] or *Principia Mathematica* fails to comply with the actual reasoning style of mathematicians. This was taken up by S. Jaskowski  who published a system of natural deduction in 1934:

* S. Jaskowski, _On the rules of suppositions in formal logic_ , Studia Logica **1** Warsaw 1934. ([pdf](http://www.logik.ch/daten/jaskowski.pdf))

At about the same time [[Gerhard Gentzen|G. Gentzen]] developed a system of natural deduction in his thesis[^Dummett] - a landmark of 20th century [[mathematical logic]] introducing proof systems for [[predicate logic]] (in both [[classical logic|classical]] and [[intuitionistic logic|intuitionistic]] versions) and the concept of [[cut-elimination]] - that was published as

* {#Gentzen} [[Gerhard Gentzen]], _Untersuchungen über das logische Schließen_, _Mathematische Zeitschrift_ **39** 1, Springer (1934-35) [[doi:10.1007/BF01201353](http://dx.doi.org/10.1007/BF01201353)]

and in English translation as :

* [[Gerhard Gentzen]], *Investigations into Logical Deduction*, in M. E. Szabo (ed.), *The Collected Papers of Gerhard Gentzen*, Studies in Logic and the Foundations of Mathematics **55**, Springer (1969) 68-131 [[ISBN:978-0-444-53419-4](https://www.sciencedirect.com/bookseries/studies-in-logic-and-the-foundations-of-mathematics/vol/55), [pdf](https://logic-teaching.github.io/prop/texts/Gentzen%201969%20-%20Investigations%20into%20Logical%20Deduction.pdf)]

[^Dummett]: *It can be said of Gentzen that it was he who first showed how proof theory should be done*. (M. Dummett, _Frege- Philosophy of Language_ , Harvard UP 1981$^2$. p.434)

In order to prove the famous *[[Gentzen's Hauptsatz|Hauptsatz]]* for proof normalization Gentzen invented the [[sequent calculus]] though he sketched a similar result for natural deduction in his later work on the [[consistency]] of [[arithmetics]]. Normalization for systems of natural deduction was established by D. Prawitz in his thesis in 1965:

* D. Prawitz, _Natural Deduction - A Proof-theoretical Study_ , Dover reprint New York 2006[1965].

Textbook accounts of proof systems in natural deduction format, sequent calculi or Hilbert-style systems:

* [[Anne Sjerp Troelstra]], [[Helmut Schwichtenberg]], _Basic Proof Theory_ , Cambridge University Press (2000, 2012) [[doi:10.1017/CBO9781139168717](https://doi.org/10.1017/CBO9781139168717)]

* Sara Negri, Jan von Plato, §1, §2 in: *Structural Proof Theory*, Cambridge University Press (2010) [[doi:10.1017/CBO9780511527340](https://doi.org/10.1017/CBO9780511527340), [§1 pdf](https://www.logicmatters.net/resources/pdfs/NegriPlato1.pdf), [§2 pdf](https://www.logicmatters.net/resources/pdfs/NegriPlato1.pdf)]

Inference rules in [[type theory]], for [[type formation]], [[term introduction]] and [[term elimination]]:

* [[Per Martin-Löf]], §4.3.4 in: *A Theory of Types*, unpublished note (1971) [[pdf](https://raw.githubusercontent.com/michaelt/martin-lof/master/pdfs/martin-loef1971%20-%20A%20Theory%20of%20Types.pdf), [[MartinLoef1971-ATheoryOfTypes.pdf:file]]]

Introductions:

* {#Girard89} [[Jean-Yves Girard]] (translated and with appendiced by [[Paul Taylor]] and [[Yves Lafont]]), §2 of: *Proofs and Types*, Cambridge University Press (1989) [[ISBN:978-0-521-37181-0](), [webpage](http://www.paultaylor.eu/stable/Proofs+Types.html), [pdf](https://www.paultaylor.eu/stable/prot.pdf)]

* {#MartinLoef96} [[Per Martin-Löf]], *On the Meanings of the Logical Constants and the Justifications of the Logical Laws*, Nordic Journal of Philosophical Logic, **1** 1 (1996) 11-60 [[pdf](http://docenti.lett.unisi.it/files/4/1/1/6/martinlof4.pdf), [[MartinLofOnTheMeaning96.pdf:file]]]

* [[Paul Downen]], [[Zena M. Ariola]], *A tutorial on computational classical logic and the sequent calculus*, Journal of Functional Programming **28** (2018) e3 [[doi:10.1017/S0956796818000023](https://doi.org/10.1017/S0956796818000023), [pdf](https://www.pauldownen.com/publications/sequent-intro.pdf)]

A formalization of the general [[logical framework]] of natural deduction is discussed in section 3 of

* [[Frank Pfenning]], _Logical frameworks -- A brief introduction_ ([pdf](http://www.cs.cmu.edu/~fp/papers/mdorf01.pdf))

A good account is at

* Wikipedia, _[Natural deduction](http://en.wikipedia.org/wiki/Natural_deduction)_

The standard rules for type-formation, term introduction/elimination and computation in [[dependent type theory]] are listed for instance in [part I](http://www.math.unipa.it/~ngambino/Research/Lectures/lecture1.pdf)  of

* [[Nicola Gambino]], _Lectures on dependent type theory_ ([pdf](http://www.cs.le.ac.uk/events/mgs2009/courses/gambino/lecturenotes-gambino.pdf))

Introductory textbook account:

* [[Simon Thompson]], §4.2  4.3 in: *[[Type Theory and Functional Programming]]*, Addison-Wesley (1991) [ISBN:0-201-41667-0, [webpage](http://www.cs.kent.ac.uk/people/staff/sjt/TTFP), [pdf](http://www.cs.kent.ac.uk/people/staff/sjt/TTFP/ttfp.pdf)]

[[!redirects natural deduction]]
[[!redirects natural deductions]]

[[!redirects term introduction]]
[[!redirects term introduction rule]]
[[!redirects term introduction rules]]
[[!redirects introduction rule]]
[[!redirects introduction rules]]

[[!redirects term constructor]]
[[!redirects term constructors]]


natural equivalence

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Equality and Equivalence
+-- {: .hide}
[[!include equality and equivalence - contents]]
=--
#### 2-Category theory
+-- {: .hide}
[[!include 2-category theory - contents]]
=--
#### Higher category theory
+-- {: .hide}
[[!include higher category theory - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Definition

Often, by a **natural equivalence** is meant specifically an [[equivalence]] in a [[2-category]] of [[2-functors]].

But more generally it is an [[equivalence]] between any kind of [[functors]] in [[higher category theory]]:

* In 1-[[category theory]] it is a [[natural isomorphism]].

 * In [[(∞,1)-category theory]] a natural equivalence is an [[equivalence in an (∞,1)-category]] in an [[(∞,1)-category of (∞,1)-functors]].

The components of a  natural equivalence  are [[equivalences]] between the [[objects]] in the codomain of the functors. This is what the term "natural equivalence" refers to: its a collection of equivalences between objects which are compatible ("natural") with the [[morphisms]] between these objects, and higher morphisms between those.

## Related concepts

* [[natural isomorphism]]

[[!redirects natural equivalences]]


natural homotopy

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Topos theory
+-- {: .hide}
[[!include topos theory - contents]]
=--
#### Homotopy Theory
+-- {: .hide}
[[!include homotopy - contents]]
=--
=--
=--

[[!redirects Natural homotopy]]
[[!redirects Natural Homotopy]]

#Contents#
* table of contents
{:toc}

##Idea

Viewing [[topos|toposes]] as generalized spaces, **natural homotopy** is an [[equivalence relation]] between [[geometric morphism|geometric morphisms]] generalizing the [[homotopy|homotopy relation]] between [[continuous map|continuous maps]].

This relation is "natural" in the metaphorical sense of being the most "basic" such relation and in the metonymical sense of being defined via [[natural transformation|natural transformations]].

The correspondance between [[geometric theory|geometric theories]] and (classifying) [[Grothendieck topos|Grothendieck toposes]] then induces an [[equivalence relation]] between theories finer than [[Morita equivalence]] that affords to define "homotopy theoretical" concepts for [[logic]], e.g. contractability of a [[theory]].

## Definition

+-- {: .num_defn }
###### Definition

Given two [[Grothendieck toposes]] $\mathcal{E},\mathcal{F}$, let $[\mathcal{E},\mathcal{F}]$ denote the class of [[connected category|connected components]] of their [[hom-category]] $Hom(\mathcal{E},\mathcal{F})$ in the [[2-category]] $GrTop$. Two [[geometric morphism|geometric morphisms]] $f,g:\mathcal{E}\to\mathcal{F}$ are called _naturally homotopic_ , denoted $f\sim g$, if $[f]=[g]$, or in other words, if there exists a zigzag of [[natural transformation|natural transformations]] $f^*\leftarrow\cdot\rightarrow\cdot \dots\cdot\leftarrow\cdot\rightarrow g^*$.

=--

**Remark.**
Under the identification $Hom(\mathcal{E},Set(\mathbb{T}))\cong \mathbb{T}-Mod(\mathcal{E})$ natural homotopy corresponds to an equivalence relation $\sim$ on $\mathbb{T}$-models in $\mathcal{E}$ given by zigzags of model homomorphisms.

## Properties and some homotopic concepts

Using the Godement calculus of [[natural transformation|natural transformations]] an induction over the number of zigzags $\cdot\leftarrow\cdot\rightarrow\cdot$ shows that $f\sim f'$ implies $h\circ f\circ k\sim h\circ f'\circ k$. From this it follows that for composable geometric morphisms $f\sim f'$, $g\sim g'$ implies $f\circ g\sim f'\circ g'$.

In particular, one can define a (partial) composition $[f]\circ[g]$ on natural homotopy equivalence classes via the composition of the representatives $[f\circ g]$. In this way, one obtains a [[homotopy category]] $\mathbf{Ho}(GrTop)$ with objects the Grothendieck toposes and morphisms the natural homotopy equivalence classes of geometric morphisms.

+-- {: .num_defn }
###### Definition
A geometric morphism $f:\mathcal{E}\to\mathcal{F}$ is called a _(natural) homotopy equivalence_ if there exists a geometric morphism $g:\mathcal{F}\to\mathcal{E}$ such that $f\circ g\sim id_{\mathcal{F}}$ and $g\circ f\sim id_{\mathcal{E}}$. In that case, $\mathcal{F}$ and $\mathcal{E}$ are said to be of the same _(natural) homotopy type_.
=--

Homotopy equivalences are closed under composition hence "being of the same homotopy type" is an equivalence relation on toposes. Toposes having the same homotopy type as $Set$, the "point" in $GrTop$, deserve to be singled out:

+-- {: .num_defn }
###### Definition
A Grothendieck topos $Set(\mathbb{T})\;$, respectively the [[geometric theory]] $\mathbb{T}$ it [[classifying topos|classifies]], is called _(naturally) contractible_ , if there exists a "constant" geometric morphism $c:Set(\mathbb{T})\to Set(\mathbb{T})$ i.e. one factoring through $Set$ as $Set(\mathbb{T})\overset{!}{\to}Set\overset{\bar{c}}{\to}Set(\mathbb{T})\;$, such that $c\sim id_{Set(\mathbb{T})}\;$.
=--

In other words, a topos is contractible if its identity map is homotopic to a constant map and a geometric theory $\mathbb{T}$ is contractible iff its classifying topos $Set(\mathbb{T})$ is.

Notice incidentally, that this requires by definition the existence of a [[point of a topos|point]] of $Set(\mathbb{T})$, or in other words, the existence of a "classical" i.e. $Set$-based $\mathbb{T}$-model. In particular, since there exist ([[Boolean topos|Boolean]]) [[point of a topos#toposes without points|toposes without points]] there exist (Boolean) geometric theories that are not contractible.

The correspondance between geometric theories and Grothendieck toposes together with the correspondance between their models and geometric morphisms similarly affords the transposition of other homotopic concepts to the realm of geometric logic.

Let us take a closer look at constant endomorphisms $c$ of $Set(\mathbb{T})\;$:

$$
Set(\mathbb{T})\overset{!}{\to}Set\overset{\bar{c}}{\to}Set(\mathbb{T})\;.
$$

Here $\bar{c}$ classifies a $\mathbb{T}$-model in $Set$ whereas $!$ classifies a model (which is unique up to isomorphism since $Set$ is [[terminal object|terminal]]) of some theory $\mathbb{S}$ classified by $Set$ whence $c$ classifies a $\mathbb{T}$-model that carries a $\mathbb{S}$-model structure as well.

Now, the [[inverse image functor|inverse image part]] of $!$ is $\Delta\;$, the [[constant sheaf|constant sheaf functor]]. Objects in the range of $\Delta$ are traditionally called "constant" whence we can think of the contractability $id_{Set(\mathbb{T})}\sim c$ of $\mathbb{T}$ as expressing the "almost constancy" of the generic model $\mathbf{M}_\mathbb{T}\sim \Delta(\bar{c}^*(\mathbf{M}_\mathbb{T}))$ i.e. as a structural similarity between $\mathbf{M}_\mathbb{T}$ and a constant $\mathbb{T}$-model.

## Example

Let $Set(\mathbb{D}_\infty)$ be the [[Schanuel topos]] that classifies the [[theory of infinite decidable objects|theory $\mathbb{D}_\infty$ of infinite decidable objects]] and $\mathbf{D}_\infty$ the generic infinite [[decidable object]].

+-- {: .num_prop }
###### Proposition (Joyal-Wraith)
$Set(\mathbb{D}_\infty)\;$, respectively the theory $\mathbb{D}_\infty\;$, are naturally contractible.
=--

**Proof.**

We argue on the logical side: $Set$ classifies the theory $\mathbb{S}$ of standard successor algebras whose models are [[natural number object|natural number objects]] (cf. the example section at [[geometric theory]]). But by generalities (that can be found e.g. in [[Handbook of Categorical Algebra|Borceux vol.3]]) a natural number object is both infinite and decidable and certainly the familiar set $\mathbb{N}$ of [[natural number|natural numbers]] in Set is.

Accordingly, we take $\bar{c}$ as the map that classifies $\mathbb{N}=\bar{c}^*(\mathbf{D}_\infty)$ as a model of $\mathbb{D}_\infty$ in Set. Then $!=\Delta\dashv\Gamma$ classifies $\Delta(\mathbb{N})$ as a model of $\mathbb{S}$ in $Set(\mathbb{D}_\infty)$ and the composite $\bar{c}\circ !$ classifies $\Delta(\mathbb{N})=\Delta(\bar{c}^*(\mathbf{D}_\infty))$ as a model of $\mathbb{D}_\infty$ in $Set(\mathbb{D})$.

Whence it suffices to exhibit a zigzag of homomorphisms in $\mathbb{D}_\infty-Mod(Set(\mathbb{D}_\infty))$ between the natural numbers object $\Delta(\mathbb{N})$ and the generic model $\mathbf{D}_\infty$ but the coproduct $\Delta(\mathbb{N})+\mathbf{D}_\infty$ is both infinite and decidable, hence in $\mathbb{D}_\infty-Mod(Set(\mathbb{D}_\infty))\;$, and the respective inclusions $\Delta(\mathbb{N})\rightarrow \Delta(\mathbb{N})+\mathbf{D}_\infty\leftarrow \mathbf{D}_\infty$ yield the desired zigzag of homomorphisms.$\qed$

## Topos homotopy via path spaces

The [[Sierpinski topos]] $Set^2$ is a connected, locally connected and local topos. As a result of [[Artin gluing]] along $Set\overset{id}{\to}Set$ it has two [[point of a topos|topos points]] (corresponding to the two points of the underlying [[Sierpinski space]]). It is [[exponentiable topos|exponentiable]] and, given a topos $\mathcal{E}$, we can accordingly view the exponential $\mathcal{E}^{Set^2}$ as a path space for $\mathcal{E}$ with respect to the abstract [[interval object]] $Set^2$.

(Cf. Beke [2000](#B00), p.11f)

## Related entries

* [[homotopy theory]]

* [[theory of model homomorphisms]]

* [[Sierpinski topos]]

* [[Eilenberg-Mac Lane space]]

* [[theory of presheaf type]]

## References

The concept originates with

* {#JW84}[[André Joyal]], [[Gavin Wraith]], _Eilenberg-Mac Lane Toposes and Cohomology_ , pp.117-131 in Cont. Math. **92** AMS 1984.

* {#W83}[[Gavin Wraith]], _Toposes and simplicial sets: the cohomological connection_ , pp.281-290 in _Category theoretic methods in geometry_ , no.**35** Aarhus Univ. Var. Publ. Ser. 1983.

An overview of homotopy theory done in this "toposophical" context is

* {#B00}[[Tibor Beke]], _Homotopoi_ , ms. University of Massachusetts Lowell (2000). ([dvi](http://faculty.uml.edu/tbeke/topos.dvi))

The following papers explore the topos of sheaves on the unit interval as abstract interval object

* {#MW86} [[Ieke Moerdijk]], [[Gavin Wraith]], _Connected locally connected toposes are path-connected_ , Trans. AMS **295** no.2 (1986) pp.849-859.

* [[Ieke Moerdijk]], *Path-lifting for Grothendieck toposes*, Proc. AMS **102** no.2 (1988) 2424-248 $[$[doi:10.2307/2045869](https://doi.org/10.2307/2045869)$]$

* [[Ieke Moerdijk]], *An addendum to "Path-lifting for Grothendieck toposes"*, Proc. AMS **125** no.9 (1997) 2815-2818 $[$[doi:2162060](https://www.jstor.org/stable/2162060)$]$

A proof of the homotopy equivalence of certain _petit_ and _gros_ toposes can be found on p.415f in

* {#MM94}[[Saunders Mac Lane]], [[Ieke Moerdijk]], _Sheaves in Geometry and Logic_ , Springer Heidelberg 1994.

A good source for the classical cohomology theory of toposes is chapter 8 of

* {#J77}[[Peter Johnstone]], _Topos Theory_ , Academic Press New York (1977). (Also available as Dover Reprint, Mineola 2014)


natural isomorphism

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Equality and Equivalence
+-- {: .hide}
[[!include equality and equivalence - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Definition

A __natural isomorphism__ $\eta\colon F \Rightarrow G$ between two [[functors]] $F$ and $G$

$$
  \array{
    &  \nearrow \searrow^{F}
    \\
    C &{}^{\simeq}\Downarrow^\eta& D
    \\
    & \searrow \nearrow_{G}
  }
$$

is equivalently

* a [[natural transformation]] with a two-sided [[inverse]];

* a natural transformation each of whose components $\eta_c : F(c) \to G(c)$ for all $c \in Obj(C)$ is an [[isomorphism]] in $D$;

* an [[isomorphism]] in the [[functor category]] $[C,D]$.

In this case, we say that $F$ and $G$ are __naturally isomorphic__. (Synonym: $F$ and $G$ are _isomorphic functors_; the naturality is understood when one says that two functors are isomorphic.)

Notably, especially in expositions and lectures, despite the third bullet point above, one does not need to define the concept of a [[functor category]] in order to define _isomorphic functors_. Authors sometimes make cautionary remarks about the category of all functors from $C$ to $D$ (cf. e.g. [Auslander (1971, p.9)](#Auslander1971))

If you want to speak of '[[the]]' functor satisfying certain conditions, then it should be unique up to unique natural isomorphism.

A natural isomorphism from a functor to itself is also called a _natural [[automorphism]]_.

## Some basic uses of isomorphic functors

### Defining the concept of equivalence of categories

A fundamental use of the concept of isomorphic functors is the usual definition of [[equivalent categories]] which involves functors isomorphic to [[identity functor|identity functors]].

### Re-defining isomorphism of objects in terms of isomorphism of functors

The [[Yoneda lemma]] implies that in any category $\mathcal{C}$, and for any objects $O$ and $O'$ of $\mathcal{C}$, the following are equivalent:

* $O$ and $O'$ are [[isomorphic]] in $\mathcal{C}$,

* the [[hom-functor|representable presheaves]] $\mathcal{C}(-,O)$ and $\mathcal{C}(-,O')$ are isomorphic functors,

* the [[hom-functor|representable copresheaves]] $\mathcal{C}(O,-)$ and $\mathcal{C}(O',-)$ are isomorphic functors.

## Related entries

* [[functor category]]

* [[limit]]

## References

* {#Auslander1971}[[M. Auslander]],  The representation dimension of artin algebras.
Queen Mary College Mathematics Notes (1971) Republished in: Selected works of Maurice Auslander. American Mathematical Society (1999)

## Related concepts

* [[natural equivalence]]

[[!redirects isomorphic functors]]

[[!redirects natural isomorphism]]
[[!redirects natural isomorphisms]]
[[!redirects naturally isomorphic]]
[[!redirects isomorphic functor]]
[[!redirects isomorphic functor]]
[[!redirects naturally isomorphic functor]]
[[!redirects naturally isomorphic functors]]

[[!redirects natural automorphism]]
[[!redirects natural automorphisms]]


natural model of homotopy type theory

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Homotopy theory
+-- {: .hide}
[[!include homotopy - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

On "natural" [[categorical model of dependent types|models]] ([Awodey 2016](#Awodey2016)) of [[homotopy type theory]]. For the moment see [there](categorical+model+of+dependent+types#NaturalModels).

## Related concepts

* [[categorical model of dependent type theory]]

## References

* {#Awodey2016} [[Steve Awodey]], *Natural models of homotopy type theory*, Mathematical Structures in Computer Science, **28** 2 (2016) 241-286 $[$[arXiv:1406.3219](https://arxiv.org/abs/1406.3219), [doi:10.1017/S0960129516000268](https://doi.org/10.1017/S0960129516000268)$]$

* Clive Newstead, *Algebraic models of dependent type theory* [[arXiv:2103.06155](https://arxiv.org/abs/2103.06155)]

[[!redirects natural models of homotopy type theory]]

[[!redirects natural model]]
[[!redirects natural models]]


natural number

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Arithmetic
+--{: .hide}
[[!include arithmetic geometry - contents]]
=--
=--
=--

# Contents
* table of contents
{: toc}

## Idea

A __natural number__ is traditionally one of the [[numbers]] $1$, $2$, $3$, and so on.  It is now common in many fields of mathematics to include $0$ as a natural number as well.  One advantage of doing so is that a natural number can then be identified with the [[cardinal number|cardinality]] of a [[finite set]], as well as a finite [[ordinal number]].  One can distinguish these as the __nonnegative integers__ (with $0$) and the __positive integers__ (without $0$), at least until somebody uses 'positive' in the semidefinite sense.  To a [[set theory|set theorist]], a natural number is essentially the same as an __[[integer]]__, so they often use the shorter word; one can also clarify with __unsigned integer__ (but this doesn\'t help with $0$). In school mathematics, natural numbers with $0$ are called __whole numbers__.

The set of natural numbers is often written $N$, $\mathbf{N}$, $\mathbb{N}$, $\omega$, or $\aleph_0$.  The last two notations refer to this set\'s structure as an [[ordinal number]] or [[cardinal number]] respectively, and they often (usually for $\aleph$) have a subscript $0$ allowing them to be generalised.  In the [[foundations]] of mathematics, the [[axiom of infinity]] states that this actually forms a set (rather than a proper class).  At a foundational level, it\'s completely irrelevant whether $0$ counts as a natural number or not; as [[sets]] (and even as [[natural numbers objects]]), the two options are equivalent, so we are really talking about the choice of additive [[semigroup]] structure (or [[inclusion map]] into the set of [[integers]], etc).

By default, our natural numbers always include $0$.

## Operations and relations

We define the standard [[arithmetic]] and [[metric]] operations and [[order]] relations of the [[natural numbers]] in [[dependent type theory]] using [[induction]] on the natural numbers.

### Addition

Addition is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m + n:\mathbb{N}$$

$$\vdash \beta_+^{0, 0}:0 + 0 =_\mathbb{N} 0$$

$$n:\mathbb{N} \vdash \beta_+^{0, s}(n):0 + s(n) =_\mathbb{N} s(n)$$

$$n:\mathbb{N} \vdash \beta_+^{s, 0}(n):s(n) + 0 =_\mathbb{N} s(n)$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_+^{s, s}(m, n):s(m) + s(n) =_\mathbb{N} s(s(m + n))$$

### Minimum function

The minimum function is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash \min(m, n):\mathbb{N}$$

$$\vdash \beta_\min^{0, 0}:\min(0, 0) =_\mathbb{N} 0$$

$$n:\mathbb{N} \vdash \beta_\min^{0, s}(n):\min(0, s(n)) =_\mathbb{N} 0$$

$$n:\mathbb{N} \vdash \beta_\min^{s, 0}(n):\min(s(n), 0) =_\mathbb{N} 0$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\min^{s, s}(m, n):\min(s(m), s(n)) =_\mathbb{N} s(\min(m, n))$$

### Maximum function

The maximum function is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash \max(m, n):\mathbb{N}$$

$$\vdash \beta_\max^{0, 0}:\max(0, 0) =_\mathbb{N} 0$$

$$n:\mathbb{N} \vdash \beta_\max^{0, s}(n):\max(0, s(n)) =_\mathbb{N} s(n)$$

$$n:\mathbb{N} \vdash \beta_\max^{s, 0}(n):\max(s(n), 0) =_\mathbb{N} s(n)$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\max^{s, s}(m, n):\max(s(m), s(n)) =_\mathbb{N} s(\max(m, n))$$

### Distance function

The distance function is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash \rho(m, n):\mathbb{N}$$

$$\vdash \beta_\rho^{0, 0}:\rho(0, 0) =_\mathbb{N} 0$$

$$n:\mathbb{N} \vdash \beta_\rho^{0, s}(n):\rho(0, s(n)) =_\mathbb{N} s(n)$$

$$n:\mathbb{N} \vdash \beta_\rho^{s, 0}(n):\rho(s(n), 0) =_\mathbb{N} s(n)$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\rho^{s, s}(m, n):\rho(s(n), s(n)) =_\mathbb{N} \rho(n, n)$$

### Absolute value

The absolute value is defined as the distance of a natural number from zero.

$$n:\mathbb{N} \vdash \vert n \vert:\mathbb{N}$$

$$n:\mathbb{N} \vdash \delta_{\vert-\vert}(n):\vert n \vert =_\mathbb{N} \rho(n, 0)$$

### Less than relation

The less than relation is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m \lt n \; \mathrm{type}$$

$$\vdash \beta_\lt^{0, 0}:0 \lt 0 \simeq \mathbb{0}$$

$$n:\mathbb{N} \vdash \beta_\lt^{0, s}(n):0 \lt s(n) \simeq \mathbb{1}$$

$$n:\mathbb{N} \vdash \beta_\lt^{s, 0}(n):s(n) \lt 0 \simeq \mathbb{0}$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\lt^{s, s}(n):s(m) \lt s(n) \simeq m \lt n$$

### Less than or equal to relation

The less than or equal to relation is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m \leq n \; \mathrm{type}$$

$$\vdash \beta_\leq^{0, 0}:0 \leq 0 \simeq \mathbb{1}$$

$$n:\mathbb{N} \vdash \beta_\leq^{0, s}(n):0 \leq s(n) \simeq \mathbb{1}$$

$$n:\mathbb{N} \vdash \beta_\leq^{s, 0}(n):s(n) \leq 0 \simeq \mathbb{0}$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\leq^{s, s}(n):s(m) \leq s(n) \simeq m \leq n$$

### Apart from relation

The apart from relation is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m \# n \; \mathrm{type}$$

$$\vdash \beta_\#^{0, 0}:0 \# 0 \simeq \mathbb{0}$$

$$n:\mathbb{N} \vdash \beta_\#^{0, s}(n):0 \# s(n) \simeq \mathbb{1}$$

$$n:\mathbb{N} \vdash \beta_\#^{s, 0}(n):s(n) \# 0 \simeq \mathbb{1}$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\#^{s, s}(n):s(m) \# s(n) \simeq m \# n$$

### Observational equality relation

The observational equality relation is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m \doteq n \; \mathrm{type}$$

$$\vdash \beta_\doteq^{0, 0}:0 \doteq 0 \simeq \mathbb{1}$$

$$n:\mathbb{N} \vdash \beta_\doteq^{0, s}(n):0 \doteq s(n) \simeq \mathbb{0}$$

$$n:\mathbb{N} \vdash \beta_\doteq^{s, 0}(n):s(n) \doteq 0 \simeq \mathbb{0}$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\doteq^{s, s}(n):s(m) \doteq s(n) \simeq m \doteq n$$

### Greater than relation

The greater than relation is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m \gt n \; \mathrm{type}$$

$$\vdash \beta_\gt^{0, 0}:0 \gt 0 \simeq \mathbb{0}$$

$$n:\mathbb{N} \vdash \beta_\gt^{0, s}(n):0 \gt s(n) \simeq \mathbb{0}$$

$$n:\mathbb{N} \vdash \beta_\gt^{s, 0}(n):s(n) \gt 0 \simeq \mathbb{1}$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\gt^{s, s}(n):s(m) \gt s(n) \simeq m \gt n$$

### Greater than or equal to relation

The greater than or equal to relation is inductively defined by double induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m \geq n \; \mathrm{type}$$

$$\vdash \beta_\geq^{0, 0}:0 \geq 0 \simeq \mathbb{1}$$

$$n:\mathbb{N} \vdash \beta_\geq^{0, s}(n):0 \geq s(n) \simeq \mathbb{0}$$

$$n:\mathbb{N} \vdash \beta_\geq^{s, 0}(n):s(n) \geq 0 \simeq \mathbb{1}$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\geq^{s, s}(n):s(m) \geq s(n) \simeq m \geq n$$

### Multiplication

Multiplication is inductively defined by induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash m + n:\mathbb{N}$$

$$n:\mathbb{N} \vdash \beta_\cdot^{0}(n):0 \cdot n =_\mathbb{N} 0$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_\cdot^{s}(m, n):s(m) \cdot n =_\mathbb{N} m \cdot n + n$$

### Exponentiation

Exponentiation is inductively defined by induction on the natural numbers

$$m:\mathbb{N}, n:\mathbb{N} \vdash n^m:\mathbb{N}$$

$$n:\mathbb{N} \vdash \beta_\cdot^{0}(n):n^0 =_\mathbb{N} 1$$

$$m:\mathbb{N}, n:\mathbb{N} \vdash \beta_{(-)^{(-)}}^{s}(m, n):n^{s(m)} =_\mathbb{N} n^m \cdot n$$

### Division and remainder

Given a natural number $n$, we define the division function $m \div n: \mathbb{N} \times \mathbb{N}_{+} \to \mathbb{N}$ such that

* for all $m:\mathbb{N}$ and $n:\mathbb{N}_{+}$, if $m \lt n$ then $m \div n = 0$
* for all $m:\mathbb{N}$ and $n:\mathbb{N}_{+}$, $(m + n) \div n = 1 + m \div n)$

and the remainder function

$$m\ \%\ n \coloneqq m - (m \div n) \cdot n$$

## Natural numbers objects

$\mathbf{N}$ is a [[natural numbers object]] in [[Set]]; indeed, it is the original example.  This consists of an initial element $0$ (or $1$ if $0$ is not used) and a successor operation $n \mapsto n + 1$ (or simply $n \mapsto n^+$; in [[computer science]], one often writes $n+$) such that, for a set $X$, an element $a: X$, and a [[function]] $s: X \to X$, there exists a unique function $f: \mathbf{N} \to X$ such that $f_0 = a$ and $f_{n+1} = s(f_n)$. This function $f$ is said to be constructed by __primitive recursion__. (Fancier forms of [[recursion]] are also possible.)

The basic idea is that we define the values of $f$ one by one, starting with $f_0 = a$, then $f_1 = s(a)$, $f_2 = s(s(a))$, and so on.  These are all both possible and necessary individually, but something must be put in the [[foundations]] to ensure that this can go on uniquely forever.

## Properties

### Minima of subsets of natural numbers

In [[classical mathematics]], any [[inhabited set|inhabited]] subset of the natural numbers possesses a minimal element. In [[constructive mathematics]], one cannot show this:

+-- {: .num_prop #BrouwerianCounterexample}
###### Proposition
**(a [[Brouwerian counterexample]])**

If every inhabited subset of the natural numbers possesses a minimal element, then the [[excluded middle|law of excluded middle]] holds.
=--

+-- {: .proof}
###### Proof

Let $\varphi$ be an arbitrary arithmetical formula. Then the subset
$$ U := \{ n \in \mathbb{N} \,|\, n = 1 \vee \varphi \} \subseteq \mathbb{N} $$
is inhabited. By assumption, it possesses a minimal element $n_0$. By discreteness of the natural numbers, either $n_0 = 0$ or $n_0 \gt 0$. In the first case, $\varphi$ holds. In the second case, $\neg\varphi$ holds.
=--

In this sense, the natural numbers are not complete, and it's fruitful to study their completion: For instance, the global sections of the completed natural numbers object in the [[category of sheaves|sheaf topos]] on a topological space $X$ are in one-to-one correspondence with upper semicontinuous functions $X \to \mathbb{N}$ (details at _[[one-sided real number]]_).

We can salvage the minimum principle in two ways:

+-- {: .num_prop}
###### Proposition

Any **[[decidable subset|detachable]]** inhabited subset of the natural numbers possesses a minimal element.
=--

+-- {: .num_prop}
###### Proposition

Any inhabited subset of the natural numbers does **not not** possess a minimal element.
=--

For instance, any finitely generated vector space over a [[field|residue field]] does _not not_ possess a finite basis (pick a minimal generating set, guaranteed to _not not_ exist). Interpreting this in the [[internal language]] of the sheaf topos of a [[reduced scheme]] $X$, one obtains the well-known fact that any $\mathcal{O}_X$-module locally of finite type over $X$ is locally free on a dense open subset.

### Decreasing sequences of natural numbers

Classically, any *weakly* decreasing sequence of natural numbers $(a_n)_n$ is eventually constant, i.e. admits an index $N$ such that $a_N = a_{N+1} = a_{N+2} = \cdots$. Constructively, one can only prove for each $M$ that there exists an index $N$ such that $a_N = a_{N+1} = \cdots = a_{N+M}$.  (One may prove this by induction on $a_0$; indeed, you can always find $N$ so that $N \leq a_0 M$.)  The classical principle is equivalent to the [[limited principle of omniscience]] for $\mathbb{N}$ (which follows already when $a_0 = 1$).

On the other hand, there can be no *strictly* decreasing sequence of natural numbers.  This is constuctively valid (proved by contradiction and induction on $a_0$).

This is relevant to [[constructive algebra]], as this shows that formulating chain conditions needs some care.  (It is easier to say 'weakly' than 'strictly' in the hypothesis, but then it\'s unclear how to state the conclusion.)

## Examples
 {#Examples}

* [[0]]

* [[1]]

* [[24]]

## Related concepts

* [[number]], [[natural number]], [[integer]], [[rational number]], [[algebraic number]], [[Gaussian number]], [[irrational number]], [[real number]], [[p-adic number]]

* [[natural numbers type]], [[natural numbers object]]

* [[decimal numeral representation of the natural numbers]]

* [[conatural number]]

* [[carrying]]

* [[currying]]

* [[numeral]]

* [[countable ordinal]]

## References

Origin of the [[Dedekind-Peano axioms]] for the [[natural numbers]]:

* [[Richard Dedekind]], *Was sind und was sollen die Zahlen?* (1888) [scan: [pdf](https://rcin.org.pl/Content/37485/WA35_52499_2264brosz_Was-sind.pdf), [doi:10.1007/978-3-663-02788-1](https://doi.org/10.1007/978-3-663-02788-1)]

* [[Richard Dedekind]] (transl. by W. Beman), _The nature and meaning of numbers_, Chapter II in: *Essays on the Theory of Numbers*, Chicago (1901) [[Project Gutenberg](http://www.gutenberg.org/ebooks/21016), [pdf](https://www.gutenberg.org/files/21016/21016-pdf.pdf)]

* [[Giuseppe Peano]], *Arithmetices principia, nova methodo exposita*, [[Wikipedia](https://en.wikipedia.org/wiki/Arithmetices_principia,_nova_methodo_exposita)]

Review:

* [[David E. Joyce]], *The Dedekind/Peano Axioms* (2005) [[pdf](http://aleph0.clarku.edu/~djoyce/numbers/peano.pdf)]

Broader historical review:

* [[Leo Corry]], *A Brief History of Numbers*, Oxford University Press (2015) [[ISBN:9780198702597](https://global.oup.com/academic/product/a-brief-history-of-numbers-9780198702597)]

[[!redirects whole number]]
[[!redirects whole numbers]]

[[!redirects natural number]]
[[!redirects natural numbers]]

[[!redirects nonnegative integer]]
[[!redirects nonnegative integers]]
[[!redirects positive integer]]
[[!redirects positive integers]]
[[!redirects unsigned integer]]
[[!redirects unsigned integers]]


natural numbers in SEAR

# Natural numbers in SEAR
* table of contents
{: toc}

## Idea

This page is a spin-off of the [[structural set theory]] described at [[SEAR]]. The aim is to define (individual) natural numbers in (a fragment of) SEAR without assuming the axiom of infinity. As a result, there should be a set with $n$ elements for all $n$, but we will not have a set of all natural numbers unless we assume the axiom of infinity.

The aim is to use as few axioms/results as possible, in particular, not the result that the category of SEAR sets is a topos. What we define in the first instance is along the lines of natural numbers a la von Neumann.

## Zero and one

Barring opinions whether zero should be a natural number, in SEAR we have sets $\empty$ and $\mathbf{1}$ with zero and one element respectively. These follow from axioms 0, 1 and 2 at [[SEAR]].

## Two and above

To define $\mathbf{2}$ we consider $P\mathbf{1}$. In a classical setting, this would be a two-element set, but not so for intuitionistic SEAR. We know that $\mathbf{1}$ has at least two subsets, namely $\empty$ and $\mathbf{1}$, so we let $\mathbf{2}$ be the subset of $P\mathbf{1}$ consisting of the corresponding elements. Continuing to higher numbers, we know that $\mathbf{n}$ has $n$ elements, so $n$ one-element subsets. Together with another \'obvious\' subset, this gives a set with $n+1$ elements.

More formally, let $\phi_2:\mathbf{1} \looparrowright P\mathbf{1}$ be the relation such that $\phi_2(*,empty)$ and $\phi_2(*,\mathbf{1})$. Then a tabulation $|\phi_2|$ has two elements. Let us fix one of these and call it $\mathbf{2}$.

Now assume we have defined a set $\mathbf{n}$ with $n$ elements, $1,\ldots,n$, where $n \geq 2$.  From axiom 3 we have a power set $P\mathbf{n}$. Let $\phi_{n+1}:\mathbf{1} \looparrowright P\mathbf{n}$ be a relation such that $\phi_{n+1}(*,u)$  whenever the subset $\{ i | \epsilon(i,u)\}$ of $\mathbf{n}$ has either exactly one element or is equal to all of $\mathbf{n}$.

+-- {: .query}
[[Mike Shulman]]: I think it's fine, though AN might object.  A more formal thing to say would be that $\phi_{n+1}(*,u)$ whenever the subset $\{ i | \epsilon(i,u)\}$ of $\mathbf{n}$ has either exactly one element or is equal to all of $\mathbf{n}$.

However, I don't think your definition works when $n=1$, since in that case, $\underline{1} = \mathbf{1}$!  Perhaps instead of $\phi(*,\mathbf{n})$ you want $\phi(*,\emptyset)$?

[[David Roberts]]: I've fixed the problem with $\mathbf{2}$, using Toby's original suggestion, incorporated the more formal suggestion you made for $\phi_{n+1}$ and added a new definition below.
=--

Then a tabulation of $\phi_{n+1}$ will have $n+1$ elements and we fix one of these as $\mathbf{n+1}$.

The construction on $\mathbf{1},\mathbf{2},\ldots$ only requires a fragment of SEAR, namely axioms 0,1,2 and 3, and even holds in the analogous fragment of bounded SEAR.

### Alternative definition

To avoid having to treat $\mathbf{2}$ as a special case, we can use another definition, again starting from $\mathbf{0},\mathbf{1}$ as before.

Assume we have defined $\mathbf{n}$ for $n \geq 1$. Then let $\psi_{n+1}:\mathbf{1} \looparrowright P\mathbf{n}$ be the relation such that $\psi_{n+1}(*,u)$ whenever the subset $\{ i | \epsilon(i,u)\}$ of $\mathbf{n}$ has either exactly one element or no elements. A tabulation $|\psi_{n+1}|$ has $n+1$ elements, and fixing one of these we denote it by $\mathbf{n+1}$.

This definition holds in the same fragment of (bounded) SEAR as described above.

+-- {: .query}
[[David Roberts]]: Does this remark (about collection/power sets) belong here or in the next section? Certainly, I haven't gotten rid of power sets and I hope I haven't included collection.

[[Mike Shulman]]: I think it belongs in the next section.

_Toby_:  Sorry, I put my remarks in the wrong place!  It was late ...
=--

## Replacing the power set axiom by something else

As suggested by Toby, one could take as an axiom the existence of $\mathbf{2}$, together with axioms 0,1,2 and 5 (collection) of SEAR, instead of powersets (axiom 3). From Collection and $\mathbf{2}$, we get binary coproducts, so we could define $\mathbf{n}$ as $\mathbf{1}\coprod(\mathbf{1} \coprod ( \ldots\coprod \mathbf{1})\ldots)$ ($n$ times). (DR: this needs spelling out better, with tabulations, but that's the general idea).

This definition also holds in the bounded fragment of SEAR.

## With the axiom of infinity

> based on [this blog post](http://golem.ph.utexas.edu/category/2009/09/towards_a_computeraided_system.html#c027061) and its predecessors

To construe elements $n \in \mathbb{N}$ as giving actual finite sets, we construct a "family" $\phi\colon F \to \mathbb{N}$ where each fiber $F_n$ is a set of cardinality $n$. For example, consider the function
$$ \phi\colon \mathbb{N} \times \mathbb{N} \to \mathbb{N}\colon (m,n) \mapsto m + n + 1 $$
Then, for each $n \geq 0$, the fiber $\phi^{-1}(n)$ is a set of cardinality $n$.

If you use the Axiom of Collection, then it will do this for you automatically; you don\'t need to come up with an ad hoc representation of the family.

## Discussion

+-- {: .query}
[[Mike Shulman]]: If you don't want to use powersets, then I'm pretty sure you'll need an axiom of coproducts.  Unless I'm mistaken, the collection of [[subsingleton]] sets satisfies Axioms 0, 1, and 2.

[[David Roberts]]: Actually what I probably mean is not use the result that $Set$ is a topos. I think you are correct on the subsingleton front, because it looks like we have no way of obtaining sets with more than one element without more axioms.

_Toby_:  If you want to be cute, you can make the existence of $\mathbf{2}$ an axiom and then get arbitrary binary coproducts using Collection.  On the other hand, if you\'re happy using power sets, then don\'t bother proving that $P\mathbf{1} = \mathbf{2}$ (which won\'t generalise to the intuitionistic case anyway); instead use Separation to carve out $\{ x \in P\mathbf{1} \;|\; x = \empty \;\vee\; x = \mathbf{1} \}$.  Then $\mathbf{3}$ is a subset of $P\mathbf{2}$, etc; or make $\mathbf{3}$ and $\mathbf{4}$ both subsets of $P\mathbf{2}$, with the general rule going logarithmically.
=--

[[!redirects natural number in SEAR]]
[[!redirects natural numbers in SEAR]]
[[!redirects number in SEAR]]
[[!redirects numbers in SEAR]]


natural numbers object

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Topos Theory
+-- {: .hide}
[[!include topos theory - contents]]
=--
#### Induction
+-- {: .hide}
[[!include induction - contents]]
=--
=--
=--

# Natural numbers object
* table of contents
{: toc}

## Idea

Recall that a [[topos]] is a [[category]] that behaves likes the category [[Set]] of [[set|sets]].

A **natural numbers object** (NNO) in a topos is an [[object]] that behaves in that topos like the set $\mathbb{N}$ of [[natural number|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]] ([1963](#Law63)).

## Definition

### In a topos or cartesian closed category {#CCC}

A **natural numbers object** in a [[topos]] (or any [[cartesian closed category]]) $E$ with [[terminal object]] $1$ is

* an [[object]] $\mathbb{N}$ in $E$

* equipped with

  * a [[morphism]] $z :1 \to \mathbb{N}$ from the [[terminal object]] $1$;

  * a [[morphism]] $s : \mathbb{N} \to \mathbb{N}$ (successor);

* such that for every other [[diagram]] $1 \stackrel{q}{\to}A \stackrel{f}{\to} A$ there is a unique morphism $u : \mathbb{N} \to A$ such that

\begin{center}
  \begin{tikzcd}
    1 \ar[r, "z"] \ar[rd, "q"']        &
    \mathbb{N} \ar[r, "s"] \ar[d, "u"] &
    \mathbb{N} \ar[d, "u"]             \\
    & A \ar[r, "f"'] & A
  \end{tikzcd}
\end{center}

All this may be summed up by saying that a natural numbers object is an [[initial algebra|initial]] [[algebra for an endofunctor|algebra for the endofunctor]] $X \mapsto 1 + X$ (the functor underlying the "[[maybe monad]]").
Equivalently, it is an initial [[algebra for an endo-profunctor|algebra for the endo-profunctor]]  $Hom_E(1,=) \times Hom_E(-,=)$.

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

+-- {: .num_prop}
###### Proposition
Let $C, D$ be cartesian closed categories, and suppose $D$ has a natural numbers object $(\mathbb{N}, z: 1 \to \mathbb{N}, s: \mathbb{N} \to \mathbb{N})$. If $L: D \to C$ is a [[left adjoint]] that preserves the terminal object, then $(L \mathbb{N}, L z, L s)$ is a natural numbers object in $C$.
=--

The proof is straightforward. It follows for example that the left adjoint part $f^\ast$ of a geometric morphism $f^\ast \dashv f_\ast: E \to F$ between toposes with natural numbers objects preserves the natural numbers object, and also that a [[Grothendieck quasitopos]] $Q$ presented by a [[site]] $(C, J)$ has a natural numbers object, since the [[reflective subcategory|reflection functor]] $L: Set^{C^{op}} \to Q$ preserves finite products and the terminal object in particular.

### In a closed symmetric monoidal category

One could generalize the above definition of a natural numbers object to any [[closed monoidal category|closed]] [[symmetric monoidal category]]: [[pointed objects in a monoidal category|pointed objects in a symmetric monoidal category]] are represented by morphisms out of the [[tensor unit]]. Thus, a natural numbers object in a closed symmetric monoidal category $C$ with [[tensor unit]] $1$ is

* an [[object]] $\mathbb{N}$ in $C$

* equipped with

  * a [[morphism]] $z :1 \to \mathbb{N}$ from the [[tensor unit]] $1$;

  * a [[morphism]] $s : \mathbb{N} \to \mathbb{N}$ (successor);

* such that for every other [[diagram]] $1 \stackrel{q}{\to}A \stackrel{f}{\to} A$ there is a unique morphism $u : \mathbb{N} \to A$ such that

\begin{center}
  \begin{tikzcd}
    1 \ar[r, "z"] \ar[rd, "q"']        &
    \mathbb{N} \ar[r, "s"] \ar[d, "u"] &
    \mathbb{N} \ar[d, "u"]             \\
    & A \ar[r, "f"'] & A
  \end{tikzcd}
\end{center}

### In a category with finite products
{#withparams}

Note that this definition actually makes sense in any category $E$ having finite [[product]]s, such as a [[pretopos]].  However, if $E$ is not [[cartesian closed category|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 $(\mathbb{N}, 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 cofree coalgebra functor into the [[Kleisli category]] of the [[comonad]] $X \mapsto A \times 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$).

To be explicit:

+-- {: .num_defn}
###### Definition
In a category with finite products, a _parametrized natural numbers object_ is an object $N$ together with maps $z: 1 \to N$, $s: N \to N$ such that given any objects $A$, $X$ and maps $f: A \to X$, $g: X \to X$, there is a unique map $\phi_{f, g}: A \times N \to X$ making the following diagram commute:

$$\array{
A & \stackrel{\langle 1_A, z \circ !\rangle}{\to} & A \times N & \stackrel{1_A \times s}{\leftarrow} & A \times N \\
 & \mathllap{f} \searrow & \downarrow \mathrlap{\phi_{f, g}} & & \downarrow \mathrlap{\phi_{f, g}} \\
 & & X & \underset{g}{\leftarrow} & X
}$$
=--

In the [[internal language]], commutativity of this diagram says that $\phi_{f,g}(a,z) = f(a)$ and $\phi_{f,g}(a,s(n)) = g(\phi_{f,g}(a,n))$.

It may seem odd that $A$ only appears in the domain of $f$ and not $g$.  However, this simplification is inessential, and indeed we are free to add $N$ to the domain of $g$ as well:

+-- {: .num_prop}
###### Proposition
If $(N,z,s)$ is a parametrized natural numbers object in a category with finite products, then for any objects $A$, $X$ with maps $f:A\to X$, $g:A\times N\times X \to X$, there is a unique map $\phi_{f,g} : A\times N \to X$ such that, in the [[internal language]], $\phi_{f,g}(a,z) = f(a)$ and $\phi_{f,g}(a,s(n)) = g(a,n,\phi_{f,g}(a,n))$ for all $n:N$.
=--
+-- {: .proof}
###### Proof
Let $X' = A\times N\times X$, and define $f':A\to X'$ by $f'(a) = (a,z,f(a))$ and $g':X'\to X'$ by

$$g'(a,n,x) = (a,n,g(a,n,x)).$$

Then the assumption gives $\phi': A\times N \to X'$ such that

$$\phi'(a,z) = f'(a) = (a,z,f(a)), \qquad \phi'(a,s(n)) = g'(\phi'(a,n)).$$

The composite $A \times N \xrightarrow{\phi'} X' \xrightarrow{\pi_1} A$ satisfies

$$\pi_1 \phi'(a,z) = \pi_1(a,z,f(a)) = a, \qquad \pi_1\phi'(a,s(n)) = \pi_1 g'(\phi'(a,n)) = \pi_1 \phi'(a,n).$$

Thus, by the uniqueness assumption, we have $\pi_1 \phi'(a,n) = a$ for all $a,n$.  By a similar argument, we have $\pi_2 \phi'(a,n) = n$ for all $a,n$.  Therefore, $\phi'(a,s(n)) = (a,n,g(a,n,\phi'(a,n)))$, and hence the composite $A\times N  \xrightarrow{\phi'} X' \xrightarrow{\pi_3} X$ is the desired $\phi_{f,g}$.
=--

The functions which are constructible out of the structure of a category with finite products and such a "parametrized NNO" are precisely the [[partial recursive function|primitive recursive]] ones. Specifically, the unique structure-preserving functor from the free such category $F$ into [[Set]] yields a bijection between $Hom_F(1, \mathbb{N})$ and the actual natural numbers, as well as surjections from $Hom_F(\mathbb{N}^m, \mathbb{N})$ onto the primitive recursive functions of arity $m$ for each finite $m$. With cartesian closure, however, this identification no longer holds, since some non-primitive recursive functions (such as the [[partial recursive function|Ackermann function]]) become definable as well.

In this context an important class is the class of [[pretopos|pretoposes]] with a parametrized NNO - the so called [[arithmetic pretopos|arithmetic pretoposes]].

### In a symmetric monoidal category

One could generalize the above definition of a parameterised natural numbers object to any [[symmetric monoidal category]]: [[pointed objects in a monoidal category|pointed objects in a symmetric monoidal category]] are represented by morphisms out of the [[tensor unit]]. Thus,

+-- {: .num_defn}
###### Definition
In a [[symmetric monoidal category]] with [[tensor unit]] $1$ and [[tensor product]] $(A, B) \mapsto A \otimes B$, a _parametrized natural numbers object_ is an object $N$ together with maps $z: 1 \to N$, $s: N \to N$ such that given any objects $A$, $X$ and maps $f: A \to X$, $g: X \to X$, there is a unique map $\phi_{f, g}: A \otimes N \to X$ making the following diagram commute:

$$\array{
A \otimes 1 & \stackrel{1_A \times z}{\to} & A \otimes N & \stackrel{1_A \times s}{\leftarrow} & A \otimes N \\
 \mathllap{\rho_A} \downarrow & & \downarrow \mathrlap{\phi_{f, g}} & & \downarrow \mathrlap{\phi_{f, g}} \\
 A & \underset{f}{\rightarrow} & X & \underset{g}{\leftarrow} & X
}$$

where $\rho_A:A \otimes 1 \cong A$ is the [[right unitor]] of the [[symmetric monoidal category]] $C$ for object $A$.
=--

### In type theory

For the moment see at _[[inductive type]]_ the section _[Examples - Natural numbers](inductive+type#NaturalNumbers)_

## Finite colimit characterization

In a topos, the natural numbers object $\mathbb{N}$ is uniquely characterized by the following [[colimit]] conditions due to [[Peter Freyd]]:

+-- {: .num_theorem #Freyd}
###### Theorem
In a topos, a triple $(\mathbb{N}, 0: 1 \to \mathbb{N}, s: \mathbb{N} \to \mathbb{N})$ is a natural numbers object if and only if

1. The morphism $(0, s): 1 + \mathbb{N} \to \mathbb{N}$ is an [[isomorphism]];

2. The diagram
$$\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}
###### Proof of theorem \ref{Freyd}: 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 + \mathbb{N} \to \mathbb{N}$ for the endofunctor $F(c) = 1 + c$ defined on $C$. Then condition 1 is a special case of [[initial algebra of an endofunctor|Lambek's theorem]], that the algebra structure map of an initial algebra is an isomorphism.

As for condition 2, given $f: \mathbb{N} \to X$ such that $f = f \circ s$, the claim is that $f$ factors as

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

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

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

this diagram commutes, so that $f = f(0) \circ !$ by the uniqueness clause in the universal property for $\mathbb{N}$.
=--

+-- {: .proof}
###### Proof of theorem \ref{Freyd}: sufficiency
Here we just give an outline, referring to [(Johnstone)](#Johnstone), section D.5.1, for full details. Let $N$ be an object satisfying the two colimit conditions of Freyd. First one shows (see the lemma \ref{Peano} below) that $N$ has no nontrivial $F$-subalgebras. Next, let $A$ be any $F$-algebra, and let $i: B \to N \times A$ be the intersection of all $F$-subalgebras of $N \times A$. One shows that $\pi_1 \circ i: B \to N$ is an ($F$-algebra) isomorphism. Thus we have an $F$-algebra map $f: N \to A$. If $g: N \to A$ is any $F$-algebra map, then the equalizer of $f$ and $g$ is an $F$-subalgebra of $N$, and therefore $N$ itself, which means $f = g$.
=--

+-- {: .num_lemma #Peano}
###### Lemma
Let $F$ be the endofunctor $F(X) = 1+X$. If $N$ satisfies Freyd's colimit conditions, then any $F$-subalgebra of $N$ is the entirety of $N$.
=--

+-- {: .proof}
###### Proof
Following [(Johnstone)](#Johnstone), we may as well show that the smallest $F$-subalgebra $N'$ of $N$ (the internal intersection of all $F$-subalgebras) is all of $N$. Let $S \hookrightarrow N \times N$ be the union of the relation $R = \langle 1, s \rangle: N \to N \times N$ and its opposite, so that $S$ is a symmetric relation. Working in the Mitchell-Bénabou language, one may check directly that the following formula is satisfied:

$$\forall x, y: N (\langle x, y \rangle \in S) \Rightarrow ((x \in N') \Leftrightarrow (y \in N'))$$

Let us say a term $w$ of type $P N$ is $S$-**closed** if the formula

$$\forall x, y: N (\langle x, y \rangle \in S) \Rightarrow ((x \in [w]) \Leftrightarrow (y \in [w]))$$

is satisfied. Now define a relation $T$ on $N$ by the subobject

$$\{\langle x, y \rangle \in N \times N: \forall w: P N (w \; is \; S closed) \Rightarrow ((x \in [w]) \Leftrightarrow (y \in [w])).$$

Observe that $T$ is an equivalence relation that contains $S$ and therefore $R$. It therefore contains the kernel pair of the coequalizer of $1$ and $s$; since this coequalizer is by assumption $N \to 1$, the kernel pair is all of $N \times N$. Also observe that since $N'$ is $S$-closed by definition, it is $T$-closed as well, and we now conclude

$$\forall x, y \in N: (x \in N') \Leftrightarrow (y \in N')$$

so that, putting $y = 0: 1 \to N'$, we conclude that $x \in N \Rightarrow x \in N'$, i.e., that $N'$ is all of $N$.
=--

+-- {: .un_remark}
###### Remark
A slightly alternative proof of sufficiency uses the theory of well-founded coalgebras, as given [here](http://ncatlab.org/toddtrimble/published/Initial+algebras+and+terminal+coalgebras). If $N$ is a fixpoint of the functor $F(X) = 1+X$, regarded as an $F$-[[coalgebra for an endofunctor|coalgebra]], then the internal union of well-founded subcoalgebras of $N$ is a natural numbers object $\mathbb{N}$. Then the subobject $\mathbb{N} \hookrightarrow N$ can also be regarded as a subalgebra; by the lemma, it is all of $N$. Thus $N$ is a natural numbers object.
=--

## Free constructions in a topos

In [[topos theory]] the existence of a natural numbers object (NNO) has a couple of far-reaching consequences.

Firstly, the existence of a NNO in a topos $\mathcal{S}$ is equivalent to the existence of [[free object|free]] unary systems in $\mathcal{S}$, unary systems being objects with an [[endomorphism]] in $\mathcal{S}$.

+-- {: .num_prop #free_object_with_endomorphism_in_topos}
###### Proposition
Let $\mathcal{S}$ be a topos and $\mathbf{unsys}(\mathcal{S})$ its category of internal unary systems. Then $\mathcal{S}$ has a NNO precisely if the forgetful functor $U:\mathbf{unsys}(\mathcal{S})\to \mathcal{S}$ has a left adjoint.
=--

Let $F:\mathcal{S}\to\mathbf{unsys}(\mathcal{S})$ be a left adjoint to the forgetful functor $U$, and let $1$ be a terminal object in $\mathcal{S}$.  Then $F(1)$ is a NNO in $\mathcal{S}$, by definition of an NNO.

Secondly, it is a theorem due to C. J. Mikkelsen that the existence of a NNO in a topos $\mathcal{S}$ is equivalent to the existence of [[free monoid|free monoids]] in $\mathcal{S}$:

+-- {: .num_prop #free_monoids_in_topos}
###### Proposition
Let $\mathcal{S}$ be a topos and $\mathbf{mon}(\mathcal{S})$ its category of internal monoids. Then $\mathcal{S}$ has a NNO precisely if the forgetful functor $U:\mathbf{mon}(\mathcal{S})\to \mathcal{S}$ has a left adjoint.
=--

For a proof see Johnstone ([1977](#JT77),p.190).

It then is a theorem due to [[Andreas Blass]] ([1989](#Blass)) that $\mathcal{S}$ has a NNO precisely if $\mathcal{S}$ has an [[classifying topos for the theory of objects|object classifier]] $\mathcal{S}[\mathbb{O}]$.

A consequence of this, discussed in sec. B4.2 of (Johnstone 2002,I p.431), is that [[classifying topos|classifying toposes]] for [[geometric theories]] over $\mathcal{S}$ exist precisely if $\mathcal{S}$ has a NNO.

So from a different perspective, in a topos the existence of free objects over various gadgets like e.g. [[algebraic theory|algebraic theories]] or [[geometric theory|geometric theories]] (often) hinge on the existence of free unary systems or monoids, the intuition being that the free unary systems and free monoids permit to construct a free model _syntactically_ by providing for the (syntactic) building blocks needed for this process.

Notice that algebraic theories can nevertheless have free algebras even if the ambient topos lacks a NNO. This may happen for algebraic theories that have the property that the free algebra on a finite set of generators has a finite carrier e.g. in the topos $FinSet$ of finite sets [[graphic category|free graphic monoids]] exist.

## Examples

There are many examples of natural numbers objects.

### In closed symmetric monoidal categories

\begin{example}
The [[natural numbers]] are the natural numbers object in the [[closed monoidal category|closed]] [[symmetric monoidal category]] [[Set]].
\end{example}

\begin{example}
In [[classical mathematics]], the [[extended natural numbers]] $\overline{\mathbb{N}} = \mathbb{N} + \{\infty\}$ are the [[natural numbers object]] in the closed symmetric monoidal category of [[pointed sets]] $Set_*$, with $z:\mathbb{2} \to \overline{\mathbb{N}}$ taking the [[boolean]] [[true]] to $\infty$ and [[false]] to $0$ and $s:\overline{\mathbb{N}} \to \overline{\mathbb{N}}$ taking natural numbers to its successor and $\infty$ to $\infty$. In [[constructive mathematics]], the extended natural numbers $\overline{\mathbb{N}}$ and the [[disjoint union]] $\mathbb{N} + \{\infty\}$ are no longer the same; it is $\mathbb{N} + \{\infty\}$ which remains the natural numbers object in $Set_*$.
\end{example}

\begin{example}
The underlying abelian group of the [[polynomial ring]] $\mathbb{Z}[X]$ is the natural numbers object in the closed symmetric monoidal category [[Ab]], with $z:\mathbb{Z} \to \mathbb{Z}[X]$ taking [[integers]] to [[constant polynomials]] and $s:\mathbb{Z}[X] \to \mathbb{Z}[X]$ multiplying polynomials by the indeterminant $X$.
\end{example}

\begin{example}
More generally, given a [[commutative ring]] $R$, the underlying $R$-module of the [[polynomial ring]] $R[X]$ is the natural numbers object in the closed symmetric monoidal category [[RMod]], with $z:R \to R[X]$ taking [[scalars]] to [[constant polynomials]] and $s:R[X] \to R[X]$ multiplying polynomials by the indeterminant $X$.
\end{example}

### In a sheaf topos
 {#ExamplesInASheafTopos}

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^{op} \to Set$ that is constant on the set $\mathbb{N}$.

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 element]]s which are "infinite natural numbers" in the sense of [[nonstandard analysis]].

## Properties

### Transfer along inverse images
 {#Transfer}

+-- {: .num_prop}
###### Proposition

Natural number objects are preserved by [[inverse images]]:

let $f = (f^* \dashv f_*) : \mathcal{E} \underoverset{f_*}{f^*}{\leftrightarrows} \mathcal{F}$ be a [[geometric morphism]] of toposes. If $\mathbb{N} \in \mathcal{F}$ is a natural numbers object, then its [[inverse image]] $f^* \mathbb{N}$ is a natural numbers object in $\mathcal{E}$.

=--

([Johnstone, lemma A.4.1.14](#Johnstone)). Of course, by the [finite colimit characterization](http://ncatlab.org/nlab/show/natural+numbers+object#finite_colimit_characterization_24), we need only the fact that inverse images preserve finite colimits and the terminal object.

+-- {: .num_example}
###### Example

If $\mathcal{E}$ is a [[sheaf topos]], then there is a unique [[geometric morphism]] $(\Delta \dashv \Gamma): \mathcal{E} \underoverset{\Gamma}{\Delta}{\leftrightarrows} Set$, the [[global section]] geometric morphism, with the [[inverse image]] being the [[locally constant sheaf]] functor, it follows that

$$
  \Delta(\mathbb{N}) \cong \Delta\left(\sum_{n: \mathbb{N}} 1\right) \cong \sum_{n: N} \Delta 1 \cong \sum_{n: \mathbb{N}} 1,
$$

with the evident successor and constant $0$, is the natural nunbers object in $\mathcal{E}$.

=--

+-- {: .num_example}
###### Example

If $\mathcal{E}$ is a topos and $X \in \mathcal{E}$ an object, then the [[slice topos]] sits by an [[etale geometric morphism]] over $\mathcal{E}$

$$
  \mathcal{E}_{/X}
  \stackrel{\overset{X^*}{\leftarrow}}{\underset{X_*}{\to}}

  \mathcal{E}
  \,,
$$

where the [[inverse image]] form the [[product]] with $X$. Hence for $\mathbb{N} \in \mathcal{E}$ a natural numbers object, the projection $(X \times \mathbb{N} \to X)$ is a natural numbers object in $\mathcal{E}_{/X}$.

=--

### Relation to rig objects

The initial [[rig]] object in a category with finite products, ($\mathbb{N},0:1\rightarrow\mathbb{N},1:1\rightarrow\mathbb{N},+:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N},\times:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N})$ with suitable commutative diagrams expressing the rig axioms and [[initial object|initiality]], has the structure of a natural numbers object given by the triple $(\mathbb{N}, 0:1\rightarrow\mathbb{N}, x+1:\mathbb{N}\rightarrow\mathbb{N})$.

### Relation to object of integers

Given a natural numbers object $\mathbb{N}$ in a [[pretopos]], we can construct an [[integers]] [[integers object|object]] as follows.  Let $a, b\colon E \to \mathbb{N} \times \mathbb{N}$ be the [[kernel pair]] of the addition map ${+}\colon \mathbb{N} \times \mathbb{N} \to \mathbb{N}$, and let $\pi_1, \pi_2\colon \mathbb{N} \times \mathbb{N} \to \mathbb{N}$ be the [[product]] projections. We define $\mathbb{Z}$ to be the [[coequalizer]] of the [[congruence]] $(\pi_1 \circ a, \pi_2 \circ b), (\pi_1 \circ b, \pi_2 \circ a)\colon E \to \mathbb{N} \times \mathbb{N}$.  A similar construction yields a [[rational numbers]] object $\mathbb{Q}$.

For a [[real numbers]] object, rather more care is needed; see [[real numbers object]].

## Related concepts

* [[natural numbers]]

* [[natural numbers type]]

* [[Peano arithmetic]]

* [[free monoid]]

* [[extended natural numbers object]]

* [[arithmetic pretopos]]

* [[integers object]]

## References

* {#Law63}[[F. William Lawvere]], _[[Functorial Semantics of Algebraic Theories]]_, Ph.D. thesis Columbia University 1963. (Published with an author's comment as: TAC Reprint no.5 (2004) pp 1-121. ([abstract](http://www.tac.mta.ca/tac/reprints/articles/5/tr5abs.html))

* {#Ben91}[[Jean Bénabou]], _Some Remarks on Free Monoids in a Topos_, pp.20-29 in LNM **1488** Springer Heidelberg 1991.

* {#Blass} [[Andreas Blass]], _Classifying topoi and the axiom of infinity_, Algebra Universalis **26** (1989) pp.341-345.

* {#JT77}[[Peter Johnstone]], _Topos Theory_, Academic Press New York 1977. (Dover reprint Minneola 2014, chap. 6)

* {#Johnstone}[[Peter Johnstone]], _[[Sketches of an Elephant]]_, Oxford UP 2002.

Natural numbers as a [[classifying space|classifying object]] for *dinatural numbers*:

* [[Robert Paré]] and [[Leopoldo Román]], _Dinatural numbers_, Journal of Pure and Applied Algebra, Vol. 128, No. 1, 1998, pp. 33-92. [<a href="https://doi.org/10.1016/S0022-4049(97)00036-4">doi:10.1016/S0022-4049(97)00036-4</a>]

In [[monoidal categories]]:

* [[Robert Paré]] and [[Leopoldo Román]], _Monoidal categories with natural numbers object_, Studia Logica, Vol. 48, 1989, pp. 361-376. [[doi:10.1007/BF00370829](https://doi.org/10.1007/BF00370829)]

In [[elementary (infinity,1)-toposes|elementary $(\infty,1)$-toposes]]:

* [[Nima Rasekh]], _Every Elementary Higher Topos has a Natural Number Object_, Theory and Applications of Categories **37** 13 (2021) 337-377.  ([arXiv:1809.01734](https://arxiv.org/abs/1809.01734), [tac:37-13](http://www.tac.mta.ca/tac/volumes/37/13/37-13abs.html))

[[!redirects natural numbers object]]
[[!redirects natural numbers objects]]
[[!redirects natural number object]]
[[!redirects natural number objects]]
[[!redirects natural-numbers object]]
[[!redirects natural-numbers objects]]
[[!redirects natural-number object]]
[[!redirects natural-number objects]]
[[!redirects NNO]]
[[!redirects NNOs]]

[[!redirects parametrized natural numbers object]]
[[!redirects parametrized natural numbers objects]]
[[!redirects parametrized natural number object]]
[[!redirects parametrized natural number objects]]
[[!redirects parametrized natural-numbers object]]
[[!redirects parametrized natural-numbers objects]]
[[!redirects parametrized natural-number object]]
[[!redirects parametrized natural-number objects]]
[[!redirects parametrized NNO]]
[[!redirects parametrized NNOs]]

[[!redirects parametrised natural numbers object]]
[[!redirects parametrised natural numbers objects]]
[[!redirects parametrised natural number object]]
[[!redirects parametrised natural number objects]]
[[!redirects parametrised natural-numbers object]]
[[!redirects parametrised natural-numbers objects]]
[[!redirects parametrised natural-number object]]
[[!redirects parametrised natural-number objects]]
[[!redirects parametrised NNO]]
[[!redirects parametrised NNOs]]


natural numbers structure

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Set theory
+-- {: .hide}
[[!include set theory - contents]]
=--
=--
=--

\tableofcontents

## Idea

Abstracting the von Neumann ordinals and the Zermelo ordinals, amongst other definitions of the [[natural numbers]], in [[material set theory]].

## Definition

Given a set $V$ with an [[extensional relation]] $\prec$, a **natural numbers structure** is an element $\mathbb{N} \in V$, an element $0 \in V$, and a function $s:V \to V$ such that

* $0 \prec \mathbb{N}$
* for all $x \in V$, if $x \prec \mathbb{N}$, then $s(x) \prec \mathbb{N}$
* for all $z \in V$, if $0 \prec z$ and for all $x \in V$, if $x \prec z$, then $s(x) \prec z$, then for all $x \in V$, $x \prec \mathbb{N}$ implies that $x \prec z$.

## Foundational concerns

Usually in [[material set theory]], $0$ is defined to be the [[empty set]] $\emptyset$, $\mathbb{N}$ is defined to be the [[von Neumann ordinal]] $\omega$, and $s$ is defined to be the operation $x \mapsto x \cup \{x\}$. However, there are alternative options, such as using the Zermelo ordinals, where the operation $s$ is given by $x \mapsto \{x\}$, amongst others.

One could avoid having to choose amongst the definitions and abstract it all by adding primitive constants $\mathbb{N}$ and $0$ and primitive unary operation $s$ to the set theory, satisfying the axiom

* $0 \in \mathbb{N}$; for all sets $x$, if $x \in \mathbb{N}$, then $s(x) \in \mathbb{N}$; and for all sets $z$, if $0 \in z$ and for all sets $x$, if $x \in z$, then $s(x) \in z$, then for all sets $x$, $x \in \mathbb{N}$ implies that $x \in z$.

## See also

* [[axiom of infinity]]
* [[pairing structure]]
* [[union structure]]
* [[powerset structure]]

* [[natural numbers]]
* [[natural numbers object]]
* [[natural numbers type]]
* [[induction]]