3
$\begingroup$

Let $S(i,x_1,\ldots, x_n)$ be a primitive recursive predicate. \begin{equation} f(i_1,i_2,x_1,\ldots, x_n) = \begin{cases} 1 &\text{ when for all i, }\; i_1 \le i \le i_2,\; S(i,x_1, \ldots, x_n)=1\\ 0 &\text{ otherwise} \end{cases} \end{equation}

Show that $f(i_1,i_2,x_1,\ldots, x_n)$ is also primitive recursive

I use Davis Computability and Complexity book. I get I need to write as described in this page. Show $x^y$ is a primitive recursive function

But how to do for predicates? Even a similar example which has predicates would be very helpful.

$\endgroup$
  • 1
    $\begingroup$ What have you tried? Where did you get stuck? We do not want to just hand you the solution; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so we can not begin to help. See here for tips on asking questions about exercise problems. If you are uncertain how to improve your question, why not ask around in Computer Science Chat? $\endgroup$ – Raphael Sep 24 '16 at 9:08
  • $\begingroup$ Hint: show that finite case distinction with primitive-recursive predicates is primitive recursive. Use this to complete your task. $\endgroup$ – Raphael Sep 24 '16 at 9:09
  • $\begingroup$ The cases environment lets you use an & to separate the function value from the text describing the case. $\endgroup$ – David Richerby Sep 24 '16 at 15:10
  • $\begingroup$ Yeah I was asking how to approach such a problem. How to begin, because I have seen no examples similar to this. Not a full answer. $\endgroup$ – David Hamide Sep 24 '16 at 21:39
  • 1
    $\begingroup$ Hint: $\forall i \leq n . S(i,x) = 1$ is calculated as $\prod_{i =0}^n S(i,x)$. $\endgroup$ – Andrej Bauer Sep 25 '16 at 9:25
2
$\begingroup$

Do not get confused by the word "predicate". It is actually quite common to show that a function is primitive recursive by using another function for which we already know that it is primitive recursive in its definition.

For example, in the proof that multiplication is primitive recursive one usually defines multiplication using addition, which is not a basic primitive recursive function.

If "predicate" confuses you check out its definition, e.g., wikipedia. It is just a function $f: \mathbb{N} \rightarrow \{0,1\}$. So you can use a primitive recursive predicate just as a primitive recursive function of that kind.

All you need to show is, as mentioned in the comments, that the bounded quantification is primitive recursive.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.