For an effective enumeration of unary partial computable functions, admit a length- string if it disagrees with every binary value of observed within steps for . The bounded halting predicate makes membership decidable, and the tests are prefix compatible. Its paths are exactly the binary diagonally noncomputable functions. The path space is nonempty and perfect because infinitely many indices of divergent programs leave arbitrarily late bits free; no path is computable. Dead ends in this decidable presentation are essential.
Every nonempty computably enumerable set is the range of a primitive recursive function . Choose , decode using a primitive recursive pairing function, and output if the recognizing machine halts within steps, or otherwise. The bounded halting predicate makes this function primitive recursive, and every member of occurs for a sufficiently large bound. The empty set is excluded because such a function is total.
For (1)(a), a primitive recursive function is obtained by a finite construction from the zero function, successor function and projection functions, using function composition in recursion theory and primitive recursion. The recursion rule, with parameters , is
Here have already been constructed. All these functions are total on nonnegative integers: the initial functions are total, composition preserves totality, and ordinary mathematical induction proves totality of each recursion.
For (1)(b), use a shifted hyperoperation sequence, beginning with addition. Define
and, for each fixed , define
The first three members are therefore addition, multiplication and exponentiation:
The exponentiation convention includes , hence . The next member iterates exponentiation, with ; there is no need for an exceptional domain restriction at .
For (1)(c), is a primitive recursive function by its displayed recursion. If is a primitive recursive function, then
are primitive recursive functions, using constants, projection functions and function composition in recursion theory. Primitive recursion applied to gives . Mathematical induction on the fixed rank proves every member of the sequence is primitive recursive. This does not assert that the joint three-variable evaluator is a primitive recursive function.
For (2), as written, the answer is no: the empty set is semidecidable, whereas a total computable function from to always has a nonempty range. This is the only obstruction. To prove the stronger useful statement, suppose is a nonempty computably enumerable set and choose . Fix a Turing machine which halts exactly on the inputs in . Its bounded halting predicate
is primitive recursive: encode configurations arithmetically, iterate its total single-step operation times by primitive recursion, and check the halt state. A halted configuration is kept fixed. This is a bounded simulation, not unbounded waiting.
Fix a primitive recursive pairing function with primitive recursive inverse coordinate functions. For example, the Cantor pairing function has inverses obtained by bounded minimization. Define
The two coordinate functions, the bounded predicate, and the finite case distinction are primitive recursive functions, so is a primitive recursive function. Its values always lie in . Conversely, if , its computation halts within some finite , and . Thus
The range need not be a computable set; deciding whether a value occurs anywhere in this total enumeration is an unbounded search.