Prove that [x/y] is a primitive recursive function

2.8k Views Asked by At

Prove that [x/y] is a primitive recursive function using this theorem: If $g(x_1,...,x_n)$ is primitive recursive, then $f(x_1,...,x_n)=\sum^{x_n}_{i=0}g(x_1,...,x_{n-1},i)$ is also a primitive recursive function. I've tried, but I couldn't come up with an idea.

1

There are 1 best solutions below

0
On

I am assuming that you are referring to integer division.

You can define $\lceil x/y \rceil$ by primitive recursion, like this:

$h(x,y,0) = 0$ , $h(x,y,t+1) = \begin{cases} h(x,y,t) + 1 & \mbox{$x - t\cdot y \geq 0$}\\ h(x,y,t)& \mbox{ow.} \end{cases} $

And so, $\lceil x/y \rceil = h(x,y,x)$

I used that $+,\cdot,-,\geq$ are all primitive recursive (with $-$ restricted to natural numbers in the canonical way) and that $\lceil x/0 \rceil = 0$.