# Floor function proof (probably easy)

• Aug 26th 2013, 04:13 PM
euphony
Floor function proof (probably easy)
I want to know if my attempt is anywhere near being correct...

I'm supposed to prove that floor(n + m) = n + floor(m) where n is an integer and m is a real number. I'll write this as [n + m] = n + [m].

[n + m] can be rewritten as floor( ( n + [m] ) + ( m - [m] ) ).

By definition, [m] is the largest integer not greater than m. Therefore the absolute value of ( m - [m] ) is less than 1.

n is an integer and [m] is an integer, so ( n + [m] ) is also an integer because the set of integers is closed under addition.

So floor( ( n + [m] ) + ( m - [m] ) ) or floor(n + m) is equal to the integer ( n + [m] ), because this is the largest integer not greater than (n + m).

Therefore [n + m] = n + [m].

Thank you!
• Aug 26th 2013, 04:33 PM
johng
Re: Floor function proof (probably easy)
Hi,
In proofs involving floor, the following characterization is often useful. Namely, for x a real,
$\displaystyle \lfloor x\rfloor$ is the unique integer n with $\displaystyle n\leq x<n+1$.

For your problem, let $\displaystyle j=\lfloor m\rfloor$. Then clearly $\displaystyle j+n$ is an integer with
$\displaystyle j+n\leq m+n<j+n+1$. QED.

Similarly, ceiling(x) = $\displaystyle \lceil x\rceil$, is the unique integer with $\displaystyle \lceil x\rceil\geq x>\lceil x\rceil-1$