Primitive recursive functions can simulate every single step of a Turing machine. In order to prove this, one has to see that a function defined by state table is primitive recursive.
Simply speaking, a partial function $f\colon \mathbb{N} \to \mathbb{N}$ with finite domain is always primitive recursive. That is, if-else and switch-case constructs (in programming languages) can be represented by appropriate primitive recursive functions. How to prove this property?
- So do you mean that $f(c,x,y) = P_3^4(c-1, f(c-1,x,y), x, y) = x$, that is, the iteration of the recursion is just projection to third argument?
- How do you go around when you want condition different from $c = 0$, say, $c = 42$ or $c =
$?
– mathemage Nov 04 '13 at 21:35