We have $1\equiv u\left( p-r\right) \equiv u\left( -r\right)
=-ur\operatorname{mod}p$, so that $p\mid1+ur=ur+1$. Hence, $\left\lceil
\dfrac{ur}{p}\right\rceil =\dfrac{ur+1}{p}$.

We need to prove that $i\left\lceil \dfrac{ur}{p}\right\rceil \leq
r\left\lceil \dfrac{ui}{p}\right\rceil $. We transform this inequality equivalently:

$i\left\lceil \dfrac{ur}{p}\right\rceil \leq r\left\lceil \dfrac{ui}
{p}\right\rceil $

$\Longleftrightarrow\ i\cdot\dfrac{ur+1}{p}\leq r\left\lceil \dfrac{ui}
{p}\right\rceil $ (since $\left\lceil \dfrac{ur}{p}\right\rceil =\dfrac
{ur+1}{p}$)

$\Longleftrightarrow\ i\left( ur+1\right) \leq pr\left\lceil \dfrac{ui}
{p}\right\rceil $ (here, we have multiplied both sides of our inequality by
$p$).

$\Longleftrightarrow\ iur+i\leq pr\left\lceil \dfrac{ui}{p}\right\rceil $

$\Longleftrightarrow\ i\leq pr\left\lceil \dfrac{ui}{p}\right\rceil -iur$.

Now, $pr\left\lceil \dfrac{ui}{p}\right\rceil -iur\equiv
-iur=i\underbrace{\left( -ur\right) }_{\equiv1\operatorname{mod}p}\equiv
i\operatorname{mod}p$. Hence, the residue of $pr\left\lceil \dfrac{ui}
{p}\right\rceil -iur$ modulo $p$ is $i$ (because $0\leq i\leq p-1$). But this
residue must be $\leq pr\left\lceil \dfrac{ui}{p}\right\rceil -iur$ (because
$pr\underbrace{\left\lceil \dfrac{ui}{p}\right\rceil }_{\geq\dfrac{ui}{p}
}-iur\geq pr\cdot\dfrac{ui}{p}-iur=0$). Hence, we obtain $i\leq pr\left\lceil
\dfrac{ui}{p}\right\rceil -iur$. This proves the inequality in question.