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].
Re: Floor function proof (probably easy)
In proofs involving floor, the following characterization is often useful. Namely, for x a real,
is the unique integer n with .
For your problem, let . Then clearly is an integer with
Similarly, ceiling(x) = , is the unique integer with