In defining a function by primitive recursion, the value of the next argument depends only on the value of the current argument . Definition of functions by course-of-values recursion, depends on value(s) of some or all of the preceding arguments . Two very basic examples of definition by course-of-values recursion are
(Fibonacci numbers). , and .
, and .
In the first example, we may write , where is the familiar addition function, a function of two arguments. In other words, value of the current argument of depends on the values of a fixed number of preceding arguments (in this case, ). In the second example, value of the current argument of depends on the values of all of the values of the preceding arguments. Suppose we write , where is the -ary addition function. This is different from in the sense that has a fixed arity, whereas the arity of depends on the argument of . In other words, as varies, a “different” is required! Is it possible to define via a fixed function as in the first example? Moreover, what is the relation between course-of-values recursion and primitive recursion?
The answer to the first question is yes. To get around the difficulty of “varying arity”, we employ the technique of encoding the entire sequence of values of the preceding arguments of by a “code number”, and come up with a function that depends on the this code number. then can be used to define .
as the code, or sequence number of the sequence , and if , we set if , and otherwise.
For this entry, we choose the multiplicative encoding of Gödel (see this entry (http://planetmath.org/ExamplesOfPrimitiveRecursiveEncoding) for more detail) because of its convenience. Then
where is the -th prime number, and .
Definition. For any function , define the course-of-values function of as follows: has the same arity as , and for any ,
For example, if is the -th Fibonacci number, then , , and , etc… It is evident that grows very rapidly.
Definition. A function is said to be defined by course-of-values recursion via function if, for any :
The two examples above are defined by course-of-values recursion:
, where .
, where .
The second question posed at the beginning can now be answered:
is primitive recursive iff is.
By definition, and using multiplicative encoding, we have , and
Thus, if is primitive recursive, so is by primitive recursion. Conversely, if is primitive recursive, so is . ∎
If is primitive recursive, so is defined by course-of-values recursion via .
From the proof of the proposition above, we see that
Thus, as is primitive recursive, so is by primitive recursion, and hence is primitive recursive by the previous proposition. ∎
Remark. If the value of the next argument of depends on values of a fixed set of prior arguments, then the primitive recursiveness of can be proved via mutual recursion. For example, suppose . By setting for , we see that
So the are defined by mutual recursion, and if is primitive recursive, so is each .
|Date of creation||2013-03-22 19:06:13|
|Last modified on||2013-03-22 19:06:13|
|Last modified by||CWoo (3771)|