# Successor function

For other uses, see Successor.

In mathematics, the successor function or successor operation is a primitive recursive function S such that S(n) = n+1 for each natural number n. For example, S(1) = 2 and S(2) = 3.

The successor function is used in the Peano axioms which define the natural numbers. As such, it is not defined by addition, but rather is used to define all natural numbers beyond 0, as well as addition. For example, 1 is defined to be S(0), and addition on natural numbers is defined recursively by:

 m + 0 = m m + S(n) = S(m) + n

This yields e.g. 5 + 2 = 5 + S(1) = S(5) + 1 = 6 + 1 = 6 + S(0) = S(6) + 0 = 7 + 0 = 7

When natural numbers are constructed based on set theory, a common approach is to define the number 0 to be the empty set {}, and the successor S(x) to be x ∪ { x }. The axiom of infinity then guarantees the existence of a set ℕ that contains 0 and is closed with respect to S; members of ℕ are called natural numbers.[1]

The successor function is the level-0 foundation of the infinite hierarchy of hyperoperations (used to build addition, multiplication, exponentiation, tetration, etc.).

It is also one of the primitive functions used in the characterization of computability by recursive functions.