User:Claritas/sandbox

In mathematics, the natural numbers (ℕ) are those used for counting and ordering.

Properties of the natural numbers related to divisibility, such as the distribution of prime numbers, are studied in number theory. Problems concerning counting and ordering, such as partition enumeration, are studied in combinatorics.

Peano axioms
The set of all natural numbers, $$\mathbb{N}$$, can be defined via Peano axioms:
 * 1) Zero is a natural number.
 * 2) The successor of a natural number is a natural number.
 * 3) Zero is not the successor of a natural number.
 * 4) Two natural numbers are equivalent iff they share the same successor.
 * 5) If a property holds for zero, and for the successor of any number for which it holds, it holds for all natural numbers.

Zermelo–Fraenkel definition
In Zermelo–Fraenkel (ZF) set theory the natural numbers are defined recursively by 0 = {} (the empty set) and n + 1 = n ∪ {n}. Then n = {0, 1, ..., n − 1} for each natural number n. The first few numbers defined this way are:
 * $$0 := \{\},$$
 * $$1 := \{0\} = \{ \{\} \},$$
 * $$2 := \{0, 1\} = \{ \{\}, \{ \{\} \} \},$$
 * $$3 := \{0, 1, 2\} = \{ \{\}, \{ \{\} \}, \{ \{\}, \{ \{\} \} \},$$
 * $$4 := \{0, 1, 2, 3\} = \{ \{\}, \{ \{\} \}, \{ \{\}, \{ \{\} \}, \{ \{\}, \{ \{\} \}, \{ \{\}, \{ \{\} \} \} \},$$
 * $$\mathrm{etc.}$$

Properties
The commonly known properties of the natural numbers can be derived from the Peano axioms.

Successorship
If $$n\in \mathbb{N}$$ and $$ n \ne 0 $$, then $$ n = Sm$$ for some m in $$ \mathbb{N}$$.

Proof
Define the property P for all n in $$\mathbb{N}$$ as
 * $$n = 0 \vee n = sm$$.

By application of induction (axiom 5) P is true for all n. $$\square$$

Generalizations
Two generalizations of natural numbers arise from the two uses:
 * A natural number can be used to express the size of a finite set; more generally a cardinal number is a measure for the size of a set also suitable for infinite sets; this refers to a concept of "size" such that if there is a bijection between two sets they have the same size. The set of natural numbers itself and any other countably infinite set has cardinality aleph-null ($$\aleph_0$$).
 * Linguistic ordinal numbers "first", "second", "third" can be assigned to the elements of a totally ordered finite set, and also to the elements of well-ordered countably infinite sets like the set of natural numbers itself. This can be generalized to ordinal numbers which describe the position of an element in a well-ordered set in general. An ordinal number is also used to describe the "size" of a well-ordered set, in a sense different from cardinality: if there is an order isomorphism between two well-ordered sets they have the same ordinal number. The first ordinal number that is not a natural number is expressed as $$\omega$$; this is also the ordinal number of the set of natural numbers itself.

Many well-ordered sets with cardinal number $$\aleph_0$$ have an ordinal number greater than ω (the latter is the lowest possible). The least ordinal of cardinality $$\aleph_0$$ (i.e., the initial ordinal) is $$\omega$$.

For finite well-ordered sets, there is one-to-one correspondence between ordinal and cardinal numbers; therefore they can both be expressed by the same natural number, the number of elements of the set. This number can also be used to describe the position of an element in a larger finite, or an infinite, sequence.

Hypernatural numbers are part of a non-standard model of arithmetic due to Skolem.

Other generalizations are discussed in the article on numbers.

Formal definitions
Historically, the precise mathematical definition of the natural numbers developed with some difficulty. The Peano axioms state conditions that any successful definition must satisfy. Certain constructions show that, given set theory, models of the Peano postulates must exist.

Peano axioms
The Peano axioms give a formal theory of the natural numbers. The axioms are:
 * There is a natural number 0.
 * Every natural number a has a natural number successor, denoted by S(a). Intuitively, S(a) is a + 1.
 * There is no natural number whose successor is 0.
 * S is injective, i.e. distinct natural numbers have distinct successors: if a ≠ b, then S(a) ≠ S(b).
 * If a property is possessed by 0 and also by the successor of every natural number which possesses it, then it is possessed by all natural numbers. (This postulate ensures that the proof technique of mathematical induction is valid.)

It should be noted that the "0" in the above definition need not correspond to the number zero. "0" simply means some object that when combined with an appropriate successor function, satisfies the Peano axioms. All systems that satisfy these axioms are isomorphic, the name "0" is used here for the first element (the term "zeroth element" has been suggested to leave "first element" to "1", "second element" to "2", etc.), which is the only element that is not a successor. For example, the natural numbers starting with one also satisfy the axioms, if the symbol 0 is interpreted as the natural number 1, the symbol S(0) as the number 2, etc. In fact, in Peano's original formulation, the first natural number was 1.

A standard construction
A standard construction in set theory, a special case of the von Neumann ordinal construction, is to define the natural numbers as follows:
 * Set 0 := { }, the empty set,
 * and define S(a) = a ∪ {a} for every set a. S(a) is the successor of a, and S is called the successor function.
 * By the axiom of infinity, the set of all natural numbers exists and is the intersection of all sets containing 0 which are closed under this successor function. This then satisfies the Peano axioms.
 * Each natural number is then equal to the set of all natural numbers less than it, so that
 * 0 = { }
 * 1 = {0} =
 * 2 = {0, 1} = {0, {0}} = {{ }, }
 * 3 = {0, 1, 2} = {0, {0}, {0, {0}}} ={{ },, {{ }, }}
 * n = {0, 1, 2, ..., n−2, n−1} = {0, 1, 2, ..., n−2,} ∪ {n−1} = {n−1} ∪ (n−1) = S(n−1)


 * and so on. When a natural number is used as a set, this is typically what is meant. Under this definition, there are exactly n elements (in the naïve sense) in the set n and n ≤ m (in the naïve sense) if and only if n is a subset of m.


 * Also, with this definition, different possible interpretations of notations like Rn (n-tuples versus mappings of n into R) coincide.


 * Even if the axiom of infinity fails and the set of all natural numbers does not exist, it is possible to define what it means to be one of these sets. A set n is a natural number means that it is either 0 (empty) or a successor, and each of its elements is either 0 or the successor of another of its elements.

Other constructions
Although the standard construction is useful, it is not the only possible construction. For example:
 * one could define 0 = { }
 * and S(a) = {a},
 * producing
 * 0 = { }
 * 1 = {0} =
 * 2 = {1} =, etc.
 * Each natural number is then equal to the set of the natural number preceding it.

It is also possible to define 0 =
 * and S(a) = a ∪ {a}
 * producing
 * 0 =
 * 1 = {{ }, 0} = {{ }, }
 * 2 = {{ }, 0, 1}, etc.

The oldest and most "classical" set-theoretic definition of the natural numbers is the definition commonly ascribed to Frege and Russell under which each concrete natural number n is defined as the set of all sets with n elements. This may appear circular, but can be made rigorous with care. Define 0 as (clearly the set of all sets with 0 elements) and define S(A) (for any set A) as {x ∪ {y} | x ∈ A ∧ y ∉ x} (see set-builder notation). Then 0 will be the set of all sets with 0 elements, S(0) will be the set of all sets with 1 element, will be the set of all sets with 2 elements, and so forth. The set of all natural numbers can be defined as the intersection of all sets containing 0 as an element and closed under S (that is, if the set contains an element n, it also contains S(n)). One could also define "finite" independently of the notion of "natural number", and then define natural numbers as equivalence classes of finite sets under the equivalence relation of equipollence. This definition does not work in the usual systems of axiomatic set theory because the collections involved are too large (it will not work in any set theory with the axiom of separation); but it does work in New Foundations (and in related systems known to be relatively consistent) and in some systems of type theory.