See also: Arithmetical hierarchy § Relation to Turing machines
The statement of Post's theorem uses several concepts relating to definability and recursion theory. This section gives a brief overview of these concepts, which are covered in depth in their respective articles.
The arithmetical hierarchy classifies certain sets of natural numbers that are definable in the language of Peano arithmetic. A formula is said to be Σ m 0 {\displaystyle \Sigma _{m}^{0}} if it is an existential statement in prenex normal form (all quantifiers at the front) with m {\displaystyle m} alternations between existential and universal quantifiers applied to a formula with bounded quantifiers only. Formally a formula ϕ ( s ) {\displaystyle \phi (s)} in the language of Peano arithmetic is a Σ m 0 {\displaystyle \Sigma _{m}^{0}} formula if it is of the form
where ρ {\displaystyle \rho } contains only bounded quantifiers and Q is ∀ {\displaystyle \forall } if m is even and ∃ {\displaystyle \exists } if m is odd.
A set of natural numbers A {\displaystyle A} is said to be Σ m 0 {\displaystyle \Sigma _{m}^{0}} if it is definable by a Σ m 0 {\displaystyle \Sigma _{m}^{0}} formula, that is, if there is a Σ m 0 {\displaystyle \Sigma _{m}^{0}} formula ϕ ( s ) {\displaystyle \phi (s)} such that each number n {\displaystyle n} is in A {\displaystyle A} if and only if ϕ ( n ) {\displaystyle \phi (n)} holds. It is known that if a set is Σ m 0 {\displaystyle \Sigma _{m}^{0}} then it is Σ n 0 {\displaystyle \Sigma _{n}^{0}} for any n > m {\displaystyle n>m} , but for each m there is a Σ m + 1 0 {\displaystyle \Sigma _{m+1}^{0}} set that is not Σ m 0 {\displaystyle \Sigma _{m}^{0}} . Thus the number of quantifier alternations required to define a set gives a measure of the complexity of the set.
Post's theorem uses the relativized arithmetical hierarchy as well as the unrelativized hierarchy just defined. A set A {\displaystyle A} of natural numbers is said to be Σ m 0 {\displaystyle \Sigma _{m}^{0}} relative to a set B {\displaystyle B} , written Σ m 0 , B {\displaystyle \Sigma _{m}^{0,B}} , if A {\displaystyle A} is definable by a Σ m 0 {\displaystyle \Sigma _{m}^{0}} formula in an extended language that includes a predicate for membership in B {\displaystyle B} .
While the arithmetical hierarchy measures definability of sets of natural numbers, Turing degrees measure the level of uncomputability of sets of natural numbers. A set A {\displaystyle A} is said to be Turing reducible to a set B {\displaystyle B} , written A ≤ T B {\displaystyle A\leq _{T}B} , if there is an oracle Turing machine that, given an oracle for B {\displaystyle B} , computes the characteristic function of A {\displaystyle A} . The Turing jump of a set A {\displaystyle A} is a form of the Halting problem relative to A {\displaystyle A} . Given a set A {\displaystyle A} , the Turing jump A ′ {\displaystyle A'} is the set of indices of oracle Turing machines that halt on input 0 {\displaystyle 0} when run with oracle A {\displaystyle A} . It is known that every set A {\displaystyle A} is Turing reducible to its Turing jump, but the Turing jump of a set is never Turing reducible to the original set.
Post's theorem uses finitely iterated Turing jumps. For any set A {\displaystyle A} of natural numbers, the notation A ( n ) {\displaystyle A^{(n)}} indicates the n {\displaystyle n} –fold iterated Turing jump of A {\displaystyle A} . Thus A ( 0 ) {\displaystyle A^{(0)}} is just A {\displaystyle A} , and A ( n + 1 ) {\displaystyle A^{(n+1)}} is the Turing jump of A ( n ) {\displaystyle A^{(n)}} .
Post's theorem establishes a close connection between the arithmetical hierarchy and the Turing degrees of the form ∅ ( n ) {\displaystyle \emptyset ^{(n)}} , that is, finitely iterated Turing jumps of the empty set. (The empty set could be replaced with any other computable set without changing the truth of the theorem.)
Post's theorem states:
Post's theorem has many corollaries that expose additional relationships between the arithmetical hierarchy and the Turing degrees. These include:
The operation of a Turing machine T {\displaystyle T} on input n {\displaystyle n} can be formalized logically in first-order arithmetic. For example, we may use symbols A k {\displaystyle A_{k}} , B k {\displaystyle B_{k}} , and C k {\displaystyle C_{k}} for the tape configuration, machine state and location along the tape after k {\displaystyle k} steps, respectively. T {\displaystyle T} 's transition system determines the relation between ( A k , B k , C k ) {\displaystyle (A_{k},B_{k},C_{k})} and ( A k + 1 , B k + 1 , C k + 1 ) {\displaystyle (A_{k+1},B_{k+1},C_{k+1})} ; their initial values (for k = 0 {\displaystyle k=0} ) are the input, the initial state and zero, respectively. The machine halts if and only if there is a number k {\displaystyle k} such that B k {\displaystyle B_{k}} is the halting state.
The exact relation depends on the specific implementation of the notion of Turing machine (e.g. their alphabet, allowed mode of motion along the tape, etc.)
In case T {\displaystyle T} halts at time n 1 {\displaystyle n_{1}} , the relation between ( A k , B k , C k ) {\displaystyle (A_{k},B_{k},C_{k})} and ( A k + 1 , B k + 1 , C k + 1 ) {\displaystyle (A_{k+1},B_{k+1},C_{k+1})} must be satisfied only for k bounded from above by n 1 {\displaystyle n_{1}} .
Thus there is a formula φ ( n , n 1 ) {\displaystyle \varphi (n,n_{1})} in first-order arithmetic with no unbounded quantifiers, such that T {\displaystyle T} halts on input n {\displaystyle n} at time n 1 {\displaystyle n_{1}} at most if and only if φ ( n , n 1 ) {\displaystyle \varphi (n,n_{1})} is satisfied.
For example, for a prefix-free Turing machine with binary alphabet and no blank symbol, we may use the following notations:
For a prefix-free Turing machine we may use, for input n, the initial tape configuration t ( n ) = c a t ( 2 c e i l ( l o g 2 n ) − 1 , 0 , n ) {\displaystyle t(n)=cat(2^{ceil(log_{2}n)}-1,0,n)} where cat stands for concatenation; thus t ( n ) {\displaystyle t(n)} is a log ( n ) − {\displaystyle \log(n)-} length string of 1 − s {\displaystyle 1-s} followed by 0 {\displaystyle 0} and then by n {\displaystyle n} .
The operation of the Turing machine at the first n 1 {\displaystyle n_{1}} steps can thus be written as the conjunction of the initial conditions and the following formulas, quantified over k {\displaystyle k} for all k < n 1 {\displaystyle k<n_{1}} :
T halts on input n {\displaystyle n} at time n 1 {\displaystyle n_{1}} at most if and only if φ ( n , n 1 ) {\displaystyle \varphi (n,n_{1})} is satisfied, where:
This is a first-order arithmetic formula with no unbounded quantifiers, i.e. it is in Σ 0 0 {\displaystyle \Sigma _{0}^{0}} .
Let S {\displaystyle S} be a set that can be recursively enumerated by a Turing machine. Then there is a Turing machine T {\displaystyle T} that for every n {\displaystyle n} in S {\displaystyle S} , T {\displaystyle T} halts when given n {\displaystyle n} as an input.
This can be formalized by the first-order arithmetical formula presented above. The members of S {\displaystyle S} are the numbers n {\displaystyle n} satisfying the following formula:
∃ n 1 : φ ( n , n 1 ) {\displaystyle \exists n_{1}:\varphi (n,n_{1})}
This formula is in Σ 1 0 {\displaystyle \Sigma _{1}^{0}} . Therefore, S {\displaystyle S} is in Σ 1 0 {\displaystyle \Sigma _{1}^{0}} . Thus every recursively enumerable set is in Σ 1 0 {\displaystyle \Sigma _{1}^{0}} .
The converse is true as well: for every formula φ ( n ) {\displaystyle \varphi (n)} in Σ 1 0 {\displaystyle \Sigma _{1}^{0}} with k existential quantifiers, we may enumerate the k {\displaystyle k} –tuples of natural numbers and run a Turing machine that goes through all of them until it finds the formula is satisfied. This Turing machine halts on precisely the set of natural numbers satisfying φ ( n ) {\displaystyle \varphi (n)} , and thus enumerates its corresponding set.
Similarly, the operation of an oracle machine T {\displaystyle T} with an oracle O that halts after at most n 1 {\displaystyle n_{1}} steps on input n {\displaystyle n} can be described by a first-order formula φ O ( n , n 1 ) {\displaystyle \varphi _{O}(n,n_{1})} , except that the formula φ 1 ( n , n 1 ) {\displaystyle \varphi _{1}(n,n_{1})} now includes:
If the oracle is for a decision problem, O m {\displaystyle O_{m}} is always "Yes" or "No", which we may formalize as 0 or 1. Suppose the decision problem itself can be formalized by a first-order arithmetic formula ψ O ( m ) {\displaystyle \psi ^{O}(m)} . Then T {\displaystyle T} halts on n {\displaystyle n} after at most n 1 {\displaystyle n_{1}} steps if and only if the following formula is satisfied: φ O ( n , n 1 ) = ∀ m < 2 n 1 : ( ( ψ O ( m ) → ( O m = 1 ) ) ∧ ( ¬ ψ O ( m ) → ( O m = 0 ) ) ) ∧ φ O 1 ( n , n 1 ) {\displaystyle \varphi _{O}(n,n_{1})=\forall m<2^{n_{1}}:((\psi ^{O}(m)\rightarrow (O_{m}=1))\land (\lnot \psi ^{O}(m)\rightarrow (O_{m}=0)))\land {\varphi _{O}}_{1}(n,n_{1})}
where φ O 1 ( n , n 1 ) {\displaystyle {\varphi _{O}}_{1}(n,n_{1})} is a first-order formula with no unbounded quantifiers.
If O is an oracle to the halting problem of a machine T ′ {\displaystyle T'} , then ψ O ( m ) {\displaystyle \psi ^{O}(m)} is the same as "there exists m 1 {\displaystyle m_{1}} such that T ′ {\displaystyle T'} starting with input m is at the halting state after m 1 {\displaystyle m_{1}} steps". Thus: ψ O ( m ) = ∃ m 1 : ψ H ( m , m 1 ) {\displaystyle \psi ^{O}(m)=\exists m_{1}:\psi _{H}(m,m_{1})} where ψ H ( m , m 1 ) {\displaystyle \psi _{H}(m,m_{1})} is a first-order formula that formalizes T ′ {\displaystyle T'} . If T ′ {\displaystyle T'} is a Turing machine (with no oracle), ψ H ( m , m 1 ) {\displaystyle \psi _{H}(m,m_{1})} is in Σ 0 0 = Π 0 0 {\displaystyle \Sigma _{0}^{0}=\Pi _{0}^{0}} (i.e. it has no unbounded quantifiers).
Since there is a finite number of numbers m satisfying m < 2 n 1 {\displaystyle m<2^{n_{1}}} , we may choose the same number of steps for all of them: there is a number m 1 {\displaystyle m_{1}} , such that T ′ {\displaystyle T'} halts after m 1 {\displaystyle m_{1}} steps precisely on those inputs m < 2 n 1 {\displaystyle m<2^{n_{1}}} for which it halts at all.
Moving to prenex normal form, we get that the oracle machine halts on input n {\displaystyle n} if and only if the following formula is satisfied: φ ( n ) = ∃ n 1 ∃ m 1 ∀ m 2 : ( ψ H ( m , m 2 ) → ( O m = 1 ) ) ∧ ( ¬ ψ H ( m , m 1 ) → ( O m = 0 ) ) ) ∧ φ O 1 ( n , n 1 ) {\displaystyle \varphi (n)=\exists n_{1}\exists m_{1}\forall m_{2}:(\psi _{H}(m,m_{2})\rightarrow (O_{m}=1))\land (\lnot \psi _{H}(m,m_{1})\rightarrow (O_{m}=0)))\land {\varphi _{O}}_{1}(n,n_{1})}
(informally, there is a "maximal number of steps" m 1 {\displaystyle m_{1}} such every oracle that does not halt within the first m 1 {\displaystyle m_{1}} steps does not stop at all; however, for every m 2 {\displaystyle m_{2}} , each oracle that halts after m 2 {\displaystyle m_{2}} steps does halt).
Note that we may replace both n 1 {\displaystyle n_{1}} and m 1 {\displaystyle m_{1}} by a single number - their maximum - without changing the truth value of φ ( n ) {\displaystyle \varphi (n)} . Thus we may write: φ ( n ) = ∃ n 1 ∀ m 2 : ( ψ H ( m , m 2 ) → ( O m = 1 ) ) ∧ ( ¬ ψ H ( m , n 1 ) → ( O m = 0 ) ) ) ∧ φ O 1 ( n , n 1 ) {\displaystyle \varphi (n)=\exists n_{1}\forall m_{2}:(\psi _{H}(m,m_{2})\rightarrow (O_{m}=1))\land (\lnot \psi _{H}(m,n_{1})\rightarrow (O_{m}=0)))\land {\varphi _{O}}_{1}(n,n_{1})}
For the oracle to the halting problem over Turing machines, ψ H ( m , m 1 ) {\displaystyle \psi _{H}(m,m_{1})} is in Π 0 0 {\displaystyle \Pi _{0}^{0}} and φ ( n ) {\displaystyle \varphi (n)} is in Σ 2 0 {\displaystyle \Sigma _{2}^{0}} . Thus every set that is recursively enumerable by an oracle machine with an oracle for ∅ ( 1 ) {\displaystyle \emptyset ^{(1)}} , is in Σ 2 0 {\displaystyle \Sigma _{2}^{0}} .
The converse is true as well: Suppose φ ( n ) {\displaystyle \varphi (n)} is a formula in Σ 2 0 {\displaystyle \Sigma _{2}^{0}} with k 1 {\displaystyle k_{1}} existential quantifiers followed by k 2 {\displaystyle k_{2}} universal quantifiers. Equivalently, φ ( n ) {\displaystyle \varphi (n)} has k 1 {\displaystyle k_{1}} > existential quantifiers followed by a negation of a formula in Σ 1 0 {\displaystyle \Sigma _{1}^{0}} ; the latter formula can be enumerated by a Turing machine and can thus be checked immediately by an oracle for ∅ ( 1 ) {\displaystyle \emptyset ^{(1)}} .
We may thus enumerate the k 1 {\displaystyle k_{1}} –tuples of natural numbers and run an oracle machine with an oracle for ∅ ( 1 ) {\displaystyle \emptyset ^{(1)}} that goes through all of them until it finds a satisfaction for the formula. This oracle machine halts on precisely the set of natural numbers satisfying φ ( n ) {\displaystyle \varphi (n)} , and thus enumerates its corresponding set.
More generally, suppose every set that is recursively enumerable by an oracle machine with an oracle for ∅ ( p ) {\displaystyle \emptyset ^{(p)}} is in Σ p + 1 0 {\displaystyle \Sigma _{p+1}^{0}} . Then for an oracle machine with an oracle for ∅ ( p + 1 ) {\displaystyle \emptyset ^{(p+1)}} , ψ O ( m ) = ∃ m 1 : ψ H ( m , m 1 ) {\displaystyle \psi ^{O}(m)=\exists m_{1}:\psi _{H}(m,m_{1})} is in Σ p + 1 0 {\displaystyle \Sigma _{p+1}^{0}} .
Since ψ O ( m ) {\displaystyle \psi ^{O}(m)} is the same as φ ( n ) {\displaystyle \varphi (n)} for the previous Turing jump, it can be constructed (as we have just done with φ ( n ) {\displaystyle \varphi (n)} above) so that ψ H ( m , m 1 ) {\displaystyle \psi _{H}(m,m_{1})} in Π p 0 {\displaystyle \Pi _{p}^{0}} . After moving to prenex formal form the new φ ( n ) {\displaystyle \varphi (n)} is in Σ p + 2 0 {\displaystyle \Sigma _{p+2}^{0}} .
By induction, every set that is recursively enumerable by an oracle machine with an oracle for ∅ ( p ) {\displaystyle \emptyset ^{(p)}} , is in Σ p + 1 0 {\displaystyle \Sigma _{p+1}^{0}} .
The other direction can be proven by induction as well: Suppose every formula in Σ p + 1 0 {\displaystyle \Sigma _{p+1}^{0}} can be enumerated by an oracle machine with an oracle for ∅ ( p ) {\displaystyle \emptyset ^{(p)}} .
Now Suppose φ ( n ) {\displaystyle \varphi (n)} is a formula in Σ p + 2 0 {\displaystyle \Sigma _{p+2}^{0}} with k 1 {\displaystyle k_{1}} existential quantifiers followed by k 2 {\displaystyle k_{2}} universal quantifiers etc. Equivalently, φ ( n ) {\displaystyle \varphi (n)} has k 1 {\displaystyle k_{1}} > existential quantifiers followed by a negation of a formula in Σ p + 1 0 {\displaystyle \Sigma _{p+1}^{0}} ; the latter formula can be enumerated by an oracle machine with an oracle for ∅ ( p ) {\displaystyle \emptyset ^{(p)}} and can thus be checked immediately by an oracle for ∅ ( p + 1 ) {\displaystyle \emptyset ^{(p+1)}} .
We may thus enumerate the k 1 {\displaystyle k_{1}} –tuples of natural numbers and run an oracle machine with an oracle for ∅ ( p + 1 ) {\displaystyle \emptyset ^{(p+1)}} that goes through all of them until it finds a satisfaction for the formula. This oracle machine halts on precisely the set of natural numbers satisfying φ ( n ) {\displaystyle \varphi (n)} , and thus enumerates its corresponding set.
Rogers, H. The Theory of Recursive Functions and Effective Computability, MIT Press. ISBN 0-262-68052-1; ISBN 0-07-053522-1
Soare, R. Recursively enumerable sets and degrees. Perspectives in Mathematical Logic. Springer-Verlag, Berlin, 1987. ISBN 3-540-15299-7