Most recursive definitions have two foundations: a base case (basis) and an inductive clause. The difference between a
circular definition and a recursive definition is that a recursive definition must always have
base cases, cases that satisfy the definition
without being defined in terms of the definition itself, and that all other instances in the inductive clauses must be "smaller" in some sense (i.e.,
closer to those base cases that terminate the recursion) — a rule also known as "recur only with a simpler case". In contrast, a circular definition may have no base case, and even may define the value of a function in terms of that value itself — rather than on other values of the function. Such a situation would lead to an
infinite regress. That recursive definitions are valid – meaning that a recursive definition identifies a unique function – is a theorem of set theory known as the
recursion theorem, the proof of which is non-trivial. Where the domain of the function is the natural numbers, sufficient conditions for the definition to be valid are that the value of (i.e., base case) is given, and that for , an algorithm is given for determining in terms of , f(0), f(1), \dots, f(n-1) (i.e., inductive clause). More generally, recursive definitions of functions can be made whenever the domain is a
well-ordered set, using the principle of
transfinite recursion. The formal criteria for what constitutes a valid recursive definition are more complex for the general case. An outline of the general proof and the criteria can be found in
James Munkres'
Topology. However, a specific case (domain is restricted to the positive
integers instead of any well-ordered set) of the general recursive definition will be given below.
Principle of recursive definition Let be a set and let be an element of . If is a function which assigns to each function mapping a nonempty section of the positive integers into , an element of , then there exists a unique function h : \Z_+ \to A such that : \begin{align} h(1) &= a_0 \\ h(i) &= \rho \left(h|_{\{1,2,\ldots,i-1\}}\right) \text{ for } i>1. \end{align} ==Examples of recursive definitions==