Let be an increasing uniformly computable finite approximation to the diagonal halting set. For , colour the triple if , and otherwise. No infinite homogeneous set for a colouring can have colour , since the finitely many bits below its first element eventually stabilize. Every infinite homogeneous set of colour computes the diagonal halting set: choose in and read membership of in . Homogeneity and unboundedness make this answer final. Thus the colouring has no infinite computable homogeneous set.
There are incomparable Turing degrees strictly between the computable degree and the degree of the diagonal halting set. An oracle-assisted finite-extension construction alternately defeats each Turing functional in the two directions. Since the sets are computable in the halting oracle, their degrees are at most ; incomparability makes them nonzero and strictly below . This theorem does not require the constructed sets to be computably enumerable. The Friedberg–Muchnik theorem supplies that stronger conclusion.
Many-one completeness of the halting problem Created 2026-09-24 Updated 2026-09-24
Every recursively enumerable set many-one reduces to the diagonal halting set. If a program halts exactly on , the S-m-n theorem produces from an index for a unary program that ignores its input and performs that computation on . Then
Conversely, a computable preimage of a recursively enumerable set is recursively enumerable.
Build an infinite oracle as an increasing union of finite binary strings. With the diagonal halting set as an oracle, decide whether some finite extension makes a specified Turing functional halt with a binary output at a fresh input. In a yes case, preserve that finite computation and commit the opposing set's bit to the opposite value. In a no case, no subsequent infinite extension can yield a characteristic-function value there. Length growth makes the resulting sets computable in the halting oracle.
Take and fix a standard effective enumeration of the unary partial computable functions by program texts. Write
The diagonal halting set is not a computable set: a supposed decision procedure would give a program that halts on input exactly when , contradicting its own index. Each is finite and uniformly decidable by bounded simulation of a computation, and with union .
For , define the computable colouring
This is a two-part decidable set partition on three-element subsets: sort the three inputs and perform the two finite simulations. Here . The halting-stage colouring of triples cannot have an infinite homogeneous set for a colouring of colour . Indeed, fix its least element . The finitely many bits of eventually stabilize. Choose two later elements of the putative homogeneous set for a colouring beyond that stabilization stage; the corresponding triple has colour .
Now suppose is an infinite homogeneous set for a colouring of colour . Its membership oracle computes : to decide whether , search for with , and return whether . For every above , homogeneity gives . Since is unbounded, taking such arbitrarily large proves that this common finite set is . Thus
If were a computable set, the displayed Turing reduction would decide , a contradiction. The displayed decidable two-colouring has no infinite decidable homogeneous set.
For the second construction, let be the finite binary strings, with coordinates starting at , and define the computable binary tree
Membership is decided by finitely many tests using bounded simulation of a computation. It is a binary tree of finite strings: if a string satisfies the tests, each prefix satisfies its shorter and fewer tests. The infinite paths through a binary tree are exactly
This set is nonempty: at a coordinate whose diagonal computation halts with a binary value choose the other value, and choose either bit elsewhere. This is an existence argument, not a proposed computable decision procedure for convergence. No member is a total computable function. If were a total binary-valued function, the condition at would say . Thus each member is a binary diagonally noncomputable function.
Moreover, has no isolated point. There are arbitrarily large indices of programs that never halt: for example, distinct program texts with successively more unused instructions followed by an infinite loop provide infinitely many such indices in the usual syntactic program coding. At every one of these coordinates the bit is unrestricted. Given any and any prefix length , change its bit at one such index and leave all other bits unchanged. The resulting different path still belongs to and has the same length- prefix. Since a path space is closed in Cantor space, is decidable, is nonempty and perfect, and no infinite path is computable.
There is a definition issue with the adjective “perfect”. The preceding conclusion uses perfect path space, allowing finite dead ends in the decidable presentation. If “perfect tree” instead requires every node to have two incompatible extensions in the tree, the requested combination is impossible. Such a nonempty tree has no terminal nodes. Starting at the empty string, test the two immediate successors and choose the first that belongs to the tree; one always exists. This constructs a total computable function whose successive prefixes remain in the tree. Thus computable pruned binary trees have computable paths. Our necessarily has dead ends; its subtree consisting only of prefixes of infinite paths is perfect in the pruned sense but is not decidable. The construction therefore supplies the intended perfect closed path space and also resolves the stronger, inconsistent interpretation.
A function in intension is a finite description of a computation, such as a program or a formal construction expression. A function in extension is the resulting input-output map, including its domain if it is partial. Different descriptions may have the same extension: the programs that return directly and that compute describe the same function. Finite descriptions have Gödel numbers; equality of the resulting partial computable functions is a separate semantic question.
The primitive recursive functions are the smallest class of numerical functions containing the zero functions, the successor function and all projection functions, and closed under function composition in recursion theory and primitive recursion. More explicitly, from and the latter operation forms
For function composition in recursion theory, an -ary and -ary give . Zero functions of all allowed arities can be included, with nullary zero included if arity is part of the coding convention. Every resulting function is total: the initial functions are total, function composition in recursion theory preserves totality, and mathematical induction on verifies totality of primitive recursion. Applying structural induction for primitive recursive functions then covers all construction expressions.
Use a fixed effective Gödel numbering of finite tagged construction trees with decidable decoding. A node is tagged as zero, successor, projection, composition, or recursion. The primitive recursive syntax and arity checking algorithm first checks that the input decodes as a finite tree, then works upwards from its leaves. A projection tag is legal exactly when , with output arity . A composition node declares its output arity and is legal when its outer child has arity , there are exactly inner children, and each has arity ; its arity is . The declared arity also handles the case . A recursion node is legal when its base child has arity and its step child has arity ; its arity is . Zero and successor tags have their declared arities. Ill-formed nodes are rejected. The process terminates because there are only finitely many nodes. Thus, for each fixed ,
This is a syntactic assertion about functions in intension. It does not assert that arbitrary machine indices computing primitive recursive functions form a decidable set. That extensional property is nontrivial, hence undecidable by Rice theorem. For an explicit reduction, given a program construct a program that, on every input, waits for to halt and then returns . Its extension is a primitive recursive function if , and otherwise is nowhere defined and so is not a primitive recursive function. A decision procedure for this latter semantic set would decide the diagonal halting set.
Enumerate the decidable syntax set in increasing code order as . There are infinitely many such descriptions; iterating successor after a unary zero expression already supplies infinitely many. Let be the extension of a valid construction and define
To compute , find by the syntax test and interpret its finite construction tree. Evaluate function composition in recursion theory by evaluating the children, and evaluate primitive recursion by the prescribed finite loop of length equal to its final input. Termination follows from the totality argument above, so and are total computable functions.
If were a unary primitive recursive function, some construction would have extension . Then the diagonal argument gives
which is impossible. The displayed is total and computable but not primitive recursive. Repetitions of extensions in the enumeration cause no problem: every possible extension is represented, which is all the diagonal argument needs. The same argument shows that the two-variable interpreter cannot itself be primitive recursive.
For subsets , a many-one reduction is a total computable function such that
A Turing reduction is an oracle machine that, using membership queries to , halts on every input and computes the indicator function of . It may make several adaptive queries, and need not preserve the yes/no answer to a single query. A many-one reduction yields a Turing reduction by computing and querying once. Two sets have the same Turing degree when each is Turing reducible to the other. Write for the degree of the diagonal halting set .
We prove the Kleene–Post incomparability theorem by an oracle-assisted finite-extension construction. Fix an effective list of all Turing functionals. We shall build increasing finite binary strings whose unions are the indicator functions of . A finite oracle computation means that the computation halts with output and every oracle query is strictly below . Its answers are supplied by . By the finite oracle use property, every infinite oracle extending preserves this computation.
Here is the decision available from . Given and a finite string , consider
This predicate is semidecidable: enumerate all finite extensions of and dovetail their finite oracle simulations, stopping at the first halting binary output. There is a computably produced program which, on its own index as well as on every other input, performs this search and halts exactly if it succeeds. Membership of its code in therefore decides . In a yes case, running the search finds an actual witness . The decision oracle is essential in a no case; merely waiting would not produce a terminating construction.
Start with empty strings. At stage first ensure
Choose , which is not yet assigned in . Ask whether holds. If yes, find a witness , extend the current string to , and append the bit to the current string. If no, leave the current string unchanged and append to the current string. The yes case permanently forces disagreement at , since later strings extend both commitments. In the no case no final oracle extending the current string can give a binary output at : any such convergent computation would use finitely many bits and hence supply a forbidden finite witness. Thus it cannot be the indicator function of either, regardless of whether it diverges or returns a nonbinary value.
Next, using the strings just obtained, ensure
by the same procedure with the roles reversed. Choose equal to the current length of the string, ask the analogous extension question about the current string, and, if it has witness output , extend to that witness and append to . Otherwise append to . Finally pad both strings with zeros if necessary so that each length is at least , and call the resulting strings . Every operation is computable using the membership oracle and terminates. Earlier disagreements remain protected because no already fixed bit is ever changed.
Set and . The length condition makes these total binary functions. To compute either bit with oracle , run the construction through stage , when both strings have length at least , and read that bit. Consequently . Every Turing functional has been defeated in both directions, so
Neither set is computable, since a computable set is Turing reducible to every oracle. Neither can have degree : if , then , contrary to incomparability; the other case is symmetric. Therefore
This proves the requested theorem. The argument does not claim or is computably enumerable; it constructs sets computable in . Obtaining incomparable computably enumerable degrees is the stronger Friedberg–Muchnik theorem, which is not needed for the printed request.
For sets , many-one reducibility means there is a total computable function such that
Turing reducibility means that a Turing machine with oracle computes the indicator function , halting on every input. A many-one reduction supplies a Turing reduction by computing and making one membership query, so implies .
The Friedberg–Muchnik theorem states that there are computably enumerable sets with and . We prove this by a finite-injury priority construction. Fix an effective enumeration of the oracle Turing functionals and arrange the requirements in the order
A requirement owns a private witness, a success flag and a priority restraint on its oracle set. All witnesses ever chosen are distinct. An witness is reserved outside , and only may enumerate that number into ; an witness is treated symmetrically. A priority restraint forbids lower-priority requirements from adding numbers less than to the specified oracle set. Initializing a requirement abandons its witness, clears its success flag and sets its priority restraint to zero; enumeration into or is never undone.
At stage consider the first requirements and serve the highest-priority one requiring attention. An unsuccessful requirement requires attention if it has no witness, or its current witness has a stage- oracle computation with output zero, found within steps. If there is no such requirement, do nothing. When a requirement with no witness is served, choose a fresh number larger than , all previously chosen witnesses and all current higher-priority priority restraints. When an with a witness and observed computation is served, enumerate into , mark it successful, and restrain below the use of that computation. The use is one more than the largest queried oracle position, or zero if there were no queries. An acts in exactly the same way with interchanged. After either kind of service, initialize every currently assigned lower-priority requirement; the remaining lower priorities are already in their initial state.
This is an effective stage construction with finite sets , and , are computably enumerable. Every enumeration respects all higher-priority priority restraints: its private witness was selected above them, and any later service to a higher-priority requirement would have initialized it before it could act. We do not need to restrain a computation whose output is nonzero; a persistent nonzero output already disagrees with an unenumerated witness.
We verify the finite injury assertion by induction along the priority order. After the last service to requirements above a fixed requirement , the requirement is never initialized again. It can be served at most twice thereafter, once to choose its final witness and once to diagonalize. Whenever it needs attention it is eventually served, since the higher-priority requirements have ceased acting and each later stage considers a longer initial segment. Thus has a final witness and makes only finitely many actions; this proves the induction and justifies the assumed last service above it.
For a final witness , if the diagonalization occurs then , while preservation of a restrained oracle computation applies: its zero computation is preserved permanently because higher priorities no longer act and lower priorities respect the priority restraint. Thus . If it never occurs, then . Were , that convergent computation would use finitely many oracle answers. Because increases to , those finitely many answers eventually stabilize, and a sufficiently late stage would discover the zero computation and cause diagonalization. This contradicts its never occurring. So in this case is undefined or nonzero and again disagrees with . The identical argument verifies every .
All the requirements hold, proving the theorem. Both sets are noncomputable: a computable set is Turing reducible to every oracle. Moreover, every computably enumerable set is Turing reducible to the diagonal halting set , and neither nor can have its Turing degree, since that would make it compute the other set. Hence
This also gives many-one incomparability and answers the existence of intermediate computably enumerable Turing degrees.
Rice theorem: every nontrivial extensional property of programs computing partial computable functions has an undecidable index set. More precisely, take an acceptable effective enumeration of the unary partial computable functions. If contains some but not all of these functions, then
“Extensional” means that equality of partial functions, including their domains, preserves membership; no syntactic restriction on program codes is being considered.
We use two standard facts, stated explicitly. The diagonal halting set is undecidable. For the associated acceptable enumerations of -ary partial computable functions, with , the S-m-n theorem says that for every there is a total computable function such that
where means equality of defined values and equality of undefinedness. Thus fixed parameters in a program can be compiled into its index effectively.
Let be the nowhere-defined partial computable function. Choose a partial computable function whose membership in is opposite to that of ; this is possible by nontriviality. For each , construct the program
This is a uniform partial computation. Take an index for the binary partial computable function . The S-m-n theorem gives the total computable function with . Crucially,
Even when itself is undefined, the equality of partial functions remains correct. If , this gives a many-one reduction of to ; if , it gives a many-one reduction of to the complement of . A decision procedure for would therefore decide in either case, a contradiction.
The equivalent language formulation says that every nontrivial property of computably enumerable languages depending only on the recognized language has an undecidable index set. Apply the function formulation to the property of a partial computable function that its domain has the specified language property: every computably enumerable language occurs as such a domain.
With the diagonal halting set , define
If were computably enumerable, its odd-index inverse image would make computably enumerable. If were computably enumerable, its even-index inverse image would do the same. But a set and its complement being computably enumerable would make the set a recursive set: run the two enumerations in parallel until the input appears in one. This contradicts the undecidability of . Thus neither nor its complement is computably enumerable.
Fix an effective numbering of Turing machines and use the diagonal halting set
It is computably enumerable: dovetail all the computations and output each index when its computation halts. It is not a recursive set. Otherwise a machine could, on input , loop if the alleged decider says and halt otherwise. Applying this machine to its own index contradicts either answer. Hence is computably enumerable but not a recursive set.
Let be the diagonal halting set, which is undecidable. The pumping argument below actually holds for every subset ; nonregularity needs the stated convention, or at least a set of exponents whose unary language is nonregular.
The pumping lemma for regular languages holds with pumping length one. For an accepted nonempty word, pump its first symbol. A word containing only s remains in even if that symbol is deleted. If there is a zero and a nonempty prefix before its last zero, pumping the first symbol leaves the last zero and its following ones unchanged. If the word is , pumping its initial zero produces ; this is accepted for , and for it belongs to . In every case the pumped substring is nonempty and lies in the first position.
If were a regular language, closure under intersection would make
regular. A finite-state automaton for this intersection would decide membership of in the diagonal halting set by reading , a contradiction. Thus satisfies the pumping lemma but is not regular, under the usual meaning of . If were arbitrary, the printed conclusion would be false, for example for .
A many-one reduction is a total computable function with . A Turing reduction is an oracle machine which decides with oracle . It may make several adaptive queries and combine their answers. Every many-one reduction is a Turing reduction, by asking the single question . The converse fails: for the diagonal halting set , its complement is Turing-reducible to by reversing one oracle answer, but is not many-one reducible to . Such a reduction would make the complement computably enumerable, contradicting undecidability of the halting problem.
The Friedberg–Muchnik theorem asserts that there are computably enumerable sets with incomparable Turing degrees:
Here is a finite-injury priority construction proving it. Enumerate all Turing functionals and put the requirements in the priority order
Start with . Each requirement has a fresh witness, a waiting or acted status, and a restraint on the other set. A restraint forbids lower-priority strategies from enumerating numbers below into that oracle. Globally remember all previously chosen witnesses, including abandoned ones, and never choose any of them again.
For , choose an unused witness outside , larger than the stage and every current higher-priority restraint. Keep it out of . Wait until the bounded simulation converges with value zero. If this happens, enumerate into , put a restraint on , where is one more than the largest oracle query in the observed computation, and mark the strategy acted. For , interchange and .
At stage , consider the first requirements. Choose the highest-priority one needing a witness or waiting with an observed zero computation. Perform its indicated action, then initialize all lower-priority requirements: abandon their witnesses, clear their restraints, and reset their status. Do nothing if no requirement needs attention. Since witness selection respects higher restraints, and higher actions initialize every lower strategy, all protected computations are respected by lower-priority enumerations. Each stage is a finite effective calculation, so and are computably enumerable sets.
Verify by induction along the priority order that every requirement is initialized only finitely often and acts only finitely often. The highest requirement chooses one witness and can diagonalize at most once. After all higher requirements have finished acting, the next requirement is never again initialized; it obtains a final witness and can diagonalize at most once. This proves finite injury for every requirement and ensures that no requirement is permanently starved by higher attention.
Consider after its last initialization. If it acts, its witness belongs to , while the protected computation with oracle remains zero: higher strategies no longer act and lower ones respect its restraint. Thus . If it never acts, its private witness remains outside . Were , the computation on that witness would converge to zero with a finite oracle use. Since the increasing sets eventually agree with on this finite initial segment, a sufficiently late bounded simulation would detect that computation and make act, a contradiction. The symmetric argument verifies every .
Thus the two sets have incomparable Turing degrees. Both are noncomputable, since a computable set is Turing-reducible to every oracle. Both are also strictly below the degree of the halting problem: every computably enumerable set is Turing-reducible to , while completeness of one would make the other reducible to it. This supplies the intermediate degrees sought in Post problem.
Fix an effective enumeration of unary partial computable functions. The diagonal halting set is
It is a computably enumerable set: on input , simulate and accept if that computation halts.
Suppose were a computable set. A program could then halt on input exactly when the decider says . Let be its own index. If , the program does not halt, while if , it halts. Both alternatives contradict the definition of . Thus is computably enumerable but not computable.
Let be the diagonal halting set and put
If were a computably enumerable set, then would many-one reduce to , making the complement of computably enumerable. Together with the computable enumerability of , that would make a computable set, a contradiction.
Moreover
If this complement were computably enumerable, would again make computably enumerable. Thus neither nor its complement is computably enumerable.
The function is not partial computable. It is defined on every input, so if a register machine with code computed it, then and in particular would be defined. The first clause in the definition would give
which is impossible. This is the usual diagonal argument behind the noncomputability of the diagonal halting set.
The set
is the diagonal halting set. It is recursively enumerable by simulating the coded machine, but it is not recursive by the halting problem diagonal argument.
By contrast, is recursive: decode , reject it if it is not a program code, otherwise simulate the program on input for exactly steps and accept precisely if it has halted. This bounded computation always terminates. Thus