The unary primitive recursive functions can be defined in terms of a finite set of initial functions together with a finite set of unary and binary operations that are primitive recursive in their inputs. We reduce arity considerations, by show that two fixed unary operations suffice, and a single initial function can be chosen arbitrarily. The method works for many other classes of functions, including the unary partial computable functions. For this class of partial functions we also show that a single unary operation (together with any finite set of initial functions) will never suffice.
The set of primitive recursive functions is the smallest collection of multivariate functions on the natural numbers that is closed under substitution and recursion, and that contains a standard collection of initial functions (such as the projection functions, the multivariate zero functions, and the successor function). The partial computable functions are defined similarly, by adding another operation such as μ-minimization.
Julia Robinson [6,7] and Raphael Robinson [8,9] demonstrated how to eliminate multivariate considerations through the use of pairing strategies. Thus, we will likewise focus only on unary computable functions. In this setting, [7, Theorem 1] is quite striking. It says that all unary primitive recursive functions can be obtained from two certain (complicated) primitive recursive functions, and , under just two operations: (1) the binary operator of function composition, and (2) the unary operator where
is the n-fold composition of f evaluated at 0; this operation is sometimes called pure iteration.
This naturally raises the question: What is the simplest possible definitional scheme for unary primitive recursive functions?
Gladstone [3 ,4] and Georgieva [2] studied this question with a focus on different recursion schemes. The most recent work in this area seems to be that of Severin [10], who improved many previous results. In particular, he showed that one can take the successor function as the single initial function, if in addition to pure iteration and composition we adjoin the binary subtraction operation defined by
By [7, Theorem 3] (also see [11, Theorem 3]), a single initial function is insufficient if our operations are limited to composition and pure iteration.
In this paper, we are concerned with minimizing the “arity-complexity” of any definitional scheme. We construct two fixed unary operators that generate all the unary primitive recursive functions, using any initial function. The two unary operators can be replaced by a single fixed binary operator.
The proof works by simulating other operations using an encoding of functions along congruence classes. Due to the general nature of this construction, similar results hold for many other classes of functions, including the unary partial computable functions, and in that case we show that no single unary operator will suffice (for any finite set of initial functions).
Notations and conventions
Throughout, we will only work with finite definitional schemes. Clearly, if we allow ourselves infinitely many initial functions, then we don’t need any operations at all.
We treat each partial function as the ordered list of its outputs, rather than as a set of ordered pairs. For instance, the successor function is identified with the sequence . For convenience, if never terminates, we put the symbol ∞ as the nth term of f. Note that the unary operation can be implemented with the simple pseudo-code:
n:=UserInput,
If[n=0,
0,
Else
f(n-1)
]
In our definitional schemes, we will not allow arbitrary operations. Rather, an operation is allowable only if it is partial computable in its inputs. In other words, our operations can be performed by a Turing machine that can also make function calls on its inputs. (We may suppose that these function calls are instantly evaluated by an oracle, and if the symbol ∞ is ever returned, then the program immediately terminates and outputs ∞.) When working with primitive recursive functions (and elsewhere, when possible) an operation should be primitive recursive in its inputs.
For instance, the operation is primitive recursive in its input, as we see using the pseudo-code above, and hence it is allowed. The operations used in the definitional schemes of J. Robinson and Severin are also, clearly, allowed.
Not all operations are allowed. For instance, let be a uniformly computable list of all the unary partial computable functions. That such a list can be made, without repetitions, is due to work of Friedberg [1], but also see Kummer’s paper [5]. The operation A that takes will not be allowed, as the following argument shows.
Suppose, by way of contradiction, that A is partial computable in its input. First, consider the case that there exists some such that to evaluate we make no function calls to f. This would mean that , which is clearly nonsense, as the nth term of a computable function can become arbitrarily large. Thus, for each , when evaluating we must make at least one function call to f. Now letting k be the index such that , we have . □
In the proof above, we leveraged the fact that the empty partial function has very specific behavior under unary operations that are partial computable in their inputs. Similar ideas lead to the following strict lower bound on the arity-complexity of any definition of the unary partial computable functions.
Given finitely many unary partial computable functions,, and any unary operation, A, that is partial computable in its input, there is some unary partial computable function not expressible in those symbols.
First, consider the case when there exists some such that is computed without making any function calls to f. This means that does not depend on the function f (but could possibly equal ∞). The well-formed expressions from the symbols are exactly of the form for with . Thus, their values at n are among the finite set
It is easy to construct a unary (total) computable function whose value at n differs from these finitely many options.
We may now assume that, for each , to compute there must be at least one function call to f. Let be the number such that the first function call when evaluating is exactly . (The function is computable, since A is computable in its inputs, but we won’t need the full power of this fact.) Without loss of generality, expanding and renumbering our initial functions if necessary, we may assume that is the empty partial function. Note that .
Now, consider the case when is a proper subset of . Fixing some , for each we define
Each is a unary partial computable function. Further, from the fact that , we have that . Thus, for each of the finitely many j in the range , the sequence of functions
contains at most one of the (since, immediately after appears, the sequence is constantly ). Thus, at least one of the is not expressible in the symbols , as desired.
All that remains is to handle when . In that case, we see that for each function f we have
Write . Thus, for each j, the cardinalities
either each have a finite upper bound , or not, in which case we set . Letting , we see that there are only finitely many expressions G in such that . But there are infinitely many unary partial computable functions with that same property. □
As we will see in the next section, we have very different behavior when allowing two unary operations, or a single binary operation.
Simulating higher arity operations using two unary operations
As mentioned in the introduction, J. Robinson proved that every unary primitive recursive function can be expressed in the symbols , where and are specific initial functions. With access to a binary operator, one can define operations of higher arity; for instance, is a 3-ary operation. However, if we limit ourselves to unary operations, there is no way to define derived operations of higher arity. In particular, we have no way to define composition.
Instead, we will simulate composition in the following manner. Take and to be two arbitrary functions. If we can somehow construct the function , then we can simulate the composition of f and g by using computations on the single function h.
More generally, for any modulus , and functions , we write the m-tuple to denote the function
In other words, this is the function where each has been encoded along the congruence class .
Given an m-tuple of functions we will make use of the following unary operations.
Operation 1: Right rotation:
Operation 2: Switching the first two functions:
(Here, and hereafter, we use ∗ to denote an entry that is left unchanged.)
The symmetric group on m letters is always generated by the m-cycle and the transposition . Thus, with these two operations in place, we can permute the entries of any m-tuple arbitrarily.
Operation 3: Replace the first function with :
Operation 4: Replace the first function with :
Operation 5: Apply pure iteration to the first function:
Operation 6: Replace the first function with the composition of the first two functions:
Starting with the constant zero function , we use these operations to simulate the construction of any unary primitive recursive function. We illustrate this process by constructing . (We write compositions as concatenations to ease notation.)
Take ; any modulus at least as large as the number of instances of and will suffice. We then have
Of course, we also need a seventh operation, , that extracts our final answer from the class . All that remains are the technical details.
There exist two unary operations,and, each of which is primitive recursive in its input, and the closure under these operators using any single unary primitive recursive function,, is the set of all unary primitive recursive functions.
Let be the operation . When , define by the rule
Note that is the constant function .
Now, given any constructed function f, we claim that we can prepend any natural number. Clearly, the equality gives us our base case. Supposing, inductively, that has been constructed, then is also constructible. When plugging a function into , we will treat the first entry as a code which tells us how to proceed.
Let be an arbitrary function. For any , we define as follows. First, fix
The “” comes from the fact that has special cases when . The “” comes from the fact that we want our modulus to satisfy . The “7” comes from the fact that we have seven operations to encode. Thus, there are multiple cases to consider according to the value of c; the cases will naturally correspond to the operations discussed in the paragraphs preceding the statement of Theorem 3.1.
Case 1: . In this case, set
In other words, after dropping the initial coding number c from , we treat f as an m-tuple of functions, and apply the right shift operation.
Case 2: . Set
Case 3: . Set
Case 4: . Do exactly as in the previous case, except replacing with .
Case 5: . Set
where g is the function defined by the rule . (In other words, g is the function currently residing in the entries of f.)
Case 6: . Set
Case 7: . Set
We have now completely defined , on an arbitrary input, and it is primitive recursive in its input. Starting with the zero sequence, then by repeatedly prepending the proper number c, we can pass through these cases and simulate the formation of any expression in the symbols . Thus, we can form every unary primitive recursive function. Furthermore, since is primitive recursive in its input, as is , then starting with a primitive recursive function, , we can only construct primitive recursive functions this way. □
This theorem applies to many other classes, C, of unary computable functions, besides the primitive recursive functions. Indeed, as long as (1) the operation is C-computable in its input, (2) the class C allows for case analysis, (3) standard arithmetic operations are allowed, to handle passage in and out of congruence classes, and (4) the class C has some finite definitional scheme (using operations of any arity), then minor modifications of the proof above gives us a definitional scheme for C using two unary operations. In particular, adding a μ-minimization operation to the list of cases defining , we have:
There exist two unary operations,and, the first is primitive recursive in its input, the second is partial computable in its input, and the closure under these operators using any single unary partial computable function,, is the set of all unary partial computable functions.
Not surprisingly, replacing the two unary operations with a single binary operation is extremely easy.
There is a binary operation, A, primitive recursive in its inputs, such that the closure under this operator using any unary primitive recursive initial function,, is the set of all unary primitive recursive functions.
Define by the rule
The remaining details are left to the reader. □
Some care has to be taken when generalizing this proposition to the unary partial computable functions. An arbitrary initial function no longer suffices, due to issues with the output ∞. In particular, to currently evaluate we must be able to compute . One workaround is to take and redefine A by the rule
The “” in the next-to-last case lets us avoid noncomputability issues when defining compositions, as follows. First, we can construct the function . Thus, from any constructed function g we can construct , and then we can define for each , using the recursive formula . Thus, given a pair of constructed functions f and g, we can form . Note that this equality works even if f is undefined at 0.
(A more general collection of initial functions can be made to work in this case, by modifying A accordingly. Essentially, any function —except the empty partial function —will work, together with an appropriate binary operation, but that operation may now depend on .)
While the arity-complexity for unary partial computable functions is now fully understood, the case for unary primitive recursive functions is not quite settled. In particular, one cannot use the special properties of partial functions, as was done in Theorem 2.1. Thus, we ask:
Is there a definitional scheme for the unary primitive recursive functions that has only a single unary operation?
Another avenue for future research would be to see if the definitional schemes of J. Robinson or Severin could be simplified by adjoining the unary operation , as this operation proved very useful in the arguments of this paper.
Footnotes
Acknowledgements
I thank Andreas Blass and Noah Schweber for answering questions related to this work. I also thank the two anonymous referees for very careful reading of the manuscript, and for suggestions that improved the quality of this paper.
References
1.
R.M.Friedberg, Three theorems on recursive enumeration. I. Decomposition. II. Maximal set. III. Enumeration without duplication, J. Symbolic Logic23(3) (1958), 309–316. doi:10.2307/2964290.
2.
N.Georgieva, Another simplification of the recursion scheme, Arch. Math. Logik Grundlag.18(1) (1976/1977), 1–3.
3.
M.D.Gladstone, A reduction of the recursion scheme, J. Symbolic Logic32(4) (1967), 505–508. doi:10.2307/2270177.
4.
M.D.Gladstone, Simplifications of the recursion scheme, J. Symbolic Logic36(4) (1971), 653–665. doi:10.2307/2272468.
5.
M.Kummer, An easy priority-free proof of a theorem of Friedberg, Theoret. Comput. Sci.74(2) (1990), 249–251. doi:10.1016/0304-3975(90)90141-4.
6.
J.Robinson, General recursive functions, Proc. Amer. Math. Soc.1(6) (1950), 703–718. doi:10.1090/S0002-9939-1950-0038912-1.
7.
J.Robinson, A note on primitive recursive functions, Proc. Amer. Math. Soc.6(4) (1955), 667–670. doi:10.1090/S0002-9939-1955-0073536-6.
I.Szalkai, On the algebraic structure of primitive recursive functions, Z. Math. Logik Grundlag. Math.31(35–36) (1985), 551–556. doi:10.1002/malq.19850313503.