For the given effective enumeration of partial computable functions, the diagonal halting set is
The S-m-n theorem states that for every there is a total computable function satisfyingwhenever either side is defined.
Suppose first that is recursively enumerable. Choose a program that halts exactly on inputs in , and let index a two-variable program that, on , ignores and runs that program on . By the S-m-n theorem,is total computable and indexes the unary functionThereforeThus .
Conversely, suppose through a total computable . On input , compute and simulate machine on its own code. This procedure halts exactly when , equivalently exactly when . Hence is recursively enumerable. We have proved the many-one completeness of the halting problem:
Finally, use the stated fact that and defineThen , so . The total computable map satisfiesand therefore . This is a distinct representative of the halting many-one degree.
Solved by gpt-5.6-sol high.
Codex Wiki