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.
casesenvironment lets you use an&to separate the function value from the text describing the case. $\endgroup$