Showing that a set is primitive recursive.

600 Views Asked by At

I've been having a lot of difficulty even beginning this problem. I believe that I would have to use the min and max functions, but I'm not entirely sure how to actually write this down rigorously, or what such a proof would look like.

Let $f$ be a (primitive) recursive total function, and let $A$ be the set of all $n$ such that the value $f(n)$ is 'new' in the sense of being different from $f(m)$ for all $m<n$. Show $A$ is primitive recursive.

1

There are 1 best solutions below

0
On BEST ANSWER

Since $f$ is primitive recursive and the primitive recursive functions are closed under substitution of primitive recursive fuctions and identification of variables, then the predicate $B(m,n)\iff f(m)=f(n)$ is also primitive recursive. Then, we have $A(n)\iff \forall m<n \neg B(m,n)$. Since the primitive recursive functions are also closed under bounded quantification and negation, then the predicate $A$ is also primitive recursive.