examples of primitive recursive predicates
In this entry, we give some examples of primitive recursive predicates. In particular, we will show that the predicate βx is a prime numberβ is primitive recursive.
In the examples, we use to indicate a predicate (over the natural numbers ). First, two very simple examples:
-
1.
given by ββ for a fixed is primitive recursive. To see this, note that the set associated with is , and its associated characteristic function is primitive recursive by example 3(l) in this entry (http://planetmath.org/ExamplesOfPrimitiveRecursiveFunctions). As a result, is primitive recursive.
-
2.
given by ββ is primitive recursive. The associated set is whose characteristic function is , which is primitive recursive.
Before exhibiting more examples, we prove some basic facts about primitive recursive predicates:
Proposition 1.
If and are primitive recursive predicates, then so are (negation), (disjunction), and (conjunction).
Proof.
Let be the sets associated with the predicates and . We may assume that for some positive integer . Let and be the associated characteristic functions.
First, is the characteristic function of , which is the associated set of the predicate . Since is primitive recursive, so is .
Next, is the characteristic function of , which is the associated set of the predicate . Since is primitive recursive, so is .
Finally, the set associated with is , which is , which is primitive recursive. Hence is primitive recursive as well. β
In short, primitive recursiveness is preserved under Boolean operations on predicates. By induction, we also see primitive recursiveness is preserved under finite disjunction and finite conjunction.
Using this fact, we list three more examples:
-
3.
the predicate ββ is primitive recursive, since it is the conjunction of primitive recursive predicates ββ and ββ.
-
4.
the predicate ββ is primitive recursive, since it is the conjunction ββ and ββ, both of which are primitive recursive.
-
5.
the predicate ββ, where is a fixed finite set, is primitive recursive, as it is the disjunction of primitive predicates of the form ββ, where ranges over . Since the disjunction operation is finitary, ββ is primitive recursive also.
Hereβs another useful fact about primitive recursive predicates:
Proposition 2.
If is primitive recursive, so is , defined by simultaneous substitution of the variables in by -ary primitive recursive functions :
Proof.
Let be the characteristic function of (the set associated with) , then
is , the characteristic function of . Since , are primitive recursive, , obtained by functional composition, and hence , are primitive recursive too. β
Let us list two more examples:
-
6.
the predicate ββ is primitive recursive.
-
7.
the predicate ββ is primitive recursive.
Finite disjunctions and finite conjunctions of predicates can be thought of as special cases of bounded quantification (http://planetmath.org/BoundedQuantifier) on predicates. In view of this, we have the following facts:
Proposition 3.
If is primitive recursive, so are
Proof.
The set associated with is , which is just
For each fixed , let . Then by proposition 2, is primitive recursive. Let be the characteristic function of , and the function such that is if , and otherwise. So is primitive recursive (see this entry (http://planetmath.org/ExamplesOfPrimitiveRecursiveFunctions)). Now, define function by
So iff iff iff .
As a result, iff for all iff . In other words, is the characteristic function of . Since is obtained from by bounded product, is primitive recursive. This shows that is primitive recursive as well.
Next, since the characteristic function of is the same as the characteristic function of , we conclude that is primitive recursive by proposition 1 and what we have just proved. β
Our final example is the following:
-
8.
given by β is primeβ is primitive recursive. One way to characterize is the following: , and can not be written as a product of two natural numbers, both greater than . In other words,
where means βcan be characterized byβ (they share the same characteristic function). Observe that since , both and are in fact bounded by . Therefore,
As each of , and is primitive recursive, so are their conjunction:
the negation of which:
two successive applications of bounded universal quantifiers:
and finally its conjunction with the primitive recursive predicate , which is just . Therefore, is primitive recursive.
Remark. The empty set , corresponding to the predicate ββ, is clearly primitive recursive. However, as a function, is not primitive recursive.
Title | examples of primitive recursive predicates |
---|---|
Canonical name | ExamplesOfPrimitiveRecursivePredicates |
Date of creation | 2013-03-22 19:05:43 |
Last modified on | 2013-03-22 19:05:43 |
Owner | CWoo (3771) |
Last modified by | CWoo (3771) |
Numerical id | 9 |
Author | CWoo (3771) |
Entry type | Example |
Classification | msc 03D20 |
Related topic | ExamplesOfPrimitiveRecursiveFunctions |