How do I make a primitive recursive function that does division? I am trying to define a primitive recursive function that does division. I looked at this answer but it seems wrong to me, because according to Wikipedia:

The primitive recursive functions are among the number-theoretic functions, which are functions from the natural numbers (nonnegative integers) {0, 1, 2, ...} to the natural numbers

So the inequality x−t⋅y≥0 will always be true and the function will always keep adding +1. The function given in the answers seems right but only assuming that I have negative numbers. Now how could I build a PRF with just natural numbers?
EDIT: I found a way to either make a division that always rounds up or always rounds down. But I haven't found one yet that always does the correct thing. So far:
Div(x,y,0) = 0
Div(x,y,S(m) = A(Div(x,y,m),V(D(x,M(y,S(m)))))

where S(m) is successor, A is addition, V is 0 if 0 and 1 otherwise, D is subtraction and M is multiplication.
Now the above always rounds down and the next one always rounds up:
Div(x,y,0) = 0
Div(x,y,S(m) = A(Div(x,y,m),V(D(x,M(y,m))))


Definition by cases is a valid, derived principle of definition for primitive recursive functions. So is subtraction, and so is equality. I will therefore use them freely.
Moreover, it is a good idea to define not just integer division $d(m,n)$ but also the remainder function $r(m,n)$. One can then write
\begin{align}
r(0,n) & = 0 \\
r(m+1,n) & = \begin{cases} 0 & \text{if}\; n-1 = r(m,n) \\ r(m,n) + 1 &\text{otherwise} \end{cases}
\end{align}
and define integer division by
\begin{align*}
d(0,n) & = 0 \\
d(m+1,n) & = \begin{cases} d(m,n) + 1 & \text{if}\; r(m,n) = n-1 \\
d(m,n) & \text{otherwise} \end{cases}
\end{align*}
