The primitive recursive functions are defined by Godel as:
- $z() = 0$
- $s(x) = x+1$
- $\pi_i(x_1, \dots, x_k) = x_i$
Plus closure under
- Composition: $h(x_1, \dots, x_m) = f(g_1(x_1, \dots, x_m), \dots, g_k(x_1, \dots, x_m)$
- Primitive Recursion: $h(0, x_1, \dots, x_m) = f(x_1, \dots, x_m)$ and $h(y+1, x_1, \dots, x_k) = g(y, h(y, x_1, \dots, x_m), x_1, \dots, x_m)$
It is well known that the set of Primitive Recursive functions contains $ELEMENTARY$, so it definitely contains the discrete log function $L(x) = \lfloor \log_2(x) \rfloor$. But it's also not too hard to see that $L$ can't be implemented in a way that intuitively takes polynomial time (that is, $\log_2(x)^{O(1)}$), even though this is possible on a Turing Machine.
My question:
Is there a simple (subjective) function/closure property that we can add to these primitive recursive atoms that will give Discrete Log a polytime PR definition?
Thanks!