8

I'm trying to prove rigorously the following:

$$\left\lfloor \frac{x}{ab} \right\rfloor = \left\lfloor \frac{\left\lfloor \frac{x}{a} \right\rfloor}{b} \right\rfloor$$ for integers $a,b \geq 1$ and real $x$.

So far I haven't gotten far. It's enough to prove this instead:

$$\left\lfloor \frac{z}{c} \right\rfloor = \left\lfloor \frac{\lfloor z \rfloor}{c} \right\rfloor$$ for integers $c \geq 1$ and real $z$

since we can just put $z=\lfloor x/a \rfloor$ and $c=b$.

4 Answers4

10

It is trivial when done universally, i.e. using the universal definition of floor

$\begin{align} k\,&\le\, \lfloor x\rfloor \color{#c00}{\iff} k\,\le\, x,\quad {\rm for\ all}\,\ k\in\Bbb Z\\[1em] {\bf Lemma}\qquad\quad\color{#0a0}{\lfloor r/n\rfloor}\,& =\, \lfloor{\lfloor r\rfloor}/n\rfloor\ \ {\rm for}\ \ 0<n\in\Bbb Z,\,\ r\in\Bbb R\\[.6em] {\bf Proof}\qquad\qquad\quad\ \ \ k \,&\le \lfloor{\lfloor r\rfloor}/n\rfloor\\[.4em] \color{#c00}\iff\quad k\ & \le\ \:{\lfloor r\rfloor}/n\\[.2em] \overset{\times\, n}\iff\ \ nk\ &\le\ \ \lfloor r\rfloor\qquad {\rm by}\,\ n>0\\[.4em] \color{#c00}\iff\ \ nk\ &\le\,\ \ \ r\qquad\ \ {\rm by}\,\ n\in\Bbb Z\\[.2em] \overset{\div\,n}\iff\ \ \ \ k\ &\le\:\ \ \ r/n\quad\ {\rm by}\,\ n>0\\[.4em] \color{#c00}\iff\ \ \ \ k\ &\le\ \ \color{#0a0}{\lfloor r/n\rfloor}\quad {\small\bf QED} \end{align}$

Yours is special case $\ r = x/a,\,\ n = b.$

Re: universality: see the links in comments below for more general (category-theoretic) viewpoints.

Bill Dubuque
  • 272,048
6

This theorem is not true if $b$ is not an integer. Take $x=b=1.5$ and take $a=1$.

If $b$ is an integer, this follows from the rule $$\left\lfloor \frac{y}{b}\right\rfloor = \left\lfloor \frac{\lfloor y \rfloor}b\right\rfloor$$

Setting $y=\frac x a$.

Showing this rule, then, suffices.

Let $y = \lfloor y \rfloor + \{y\}$, where $0\leq \{y\} < 1$.

Use division algorithm to write $\lfloor y \rfloor = qb + r$ with $0\leq r <b$.

The $\frac{\lfloor y \rfloor} b = q + \frac{r}{b}$, and $0\leq \frac{r}{b} <1$, so

$$\left\lfloor \frac{\lfloor y \rfloor}b\right\rfloor = q$$

On the other hand, since $[y]< (q+1)b$, since $0\leq\{y\}<1$, then $y = [y]+\{y\}<(q+1)b$.

So $q \leq \frac y b < q+1$ and again $$\left\lfloor \frac{y}{b}\right\rfloor = q $$

Thomas Andrews
  • 177,126
1

Let $\lfloor x/a \rfloor$ = c(say)=>x=ca+d 0≤d

Let $\lfloor c/b \rfloor$=e(say)=>c=be+f 0≤f

=>x=ca+d=(be+f)a+d=abe+af+d.

$\frac{x}{a}$=be+f+ $\frac{d}{a}$

$\frac{\frac{x}{a}}{b}$=e+$\frac{f}{b}$+$\frac{d}{ab}$

=>$\lfloor x/a/b \rfloor$ = e = $\lfloor c/b \rfloor$ = $\lfloor \lfloor x/a \rfloor /b \rfloor$

0

I think following approach is simple and straight-forward.

For real number $x ≥ 0$ and integers $a,b > 0$

Let n be some integer such that $n ≤ x/ab < n+1$.

This implies $n*b ≤ x/a < (n+1)*b$. (after multiplying every term by b)

Now,

LHS = $⌊/⌋ = n$

RHS = $⌊⌊/⌋/⌋ = ⌊(n*b)/⌋ = ⌊n⌋ = n$

LHS = RHS. Hence, proved.

jam
  • 61
  • 4