Ceiling of Floor is Floor
Jump to navigation
Jump to search
Theorem
Let $x \in \R$ be a real number.
Let $\floor x$ denote the floor of $x$, and $\ceiling x$ denote the ceiling of $x$.
Then:
- $\ceiling {\floor x} = \floor x$
That is, the ceiling of the floor is the floor.
Proof
Let $y = \floor x$.
By Floor Function is Integer, we have that $y \in \Z$.
Then from Real Number is Integer iff equals Ceiling, we have:
- $\ceiling y = y$
So:
- $\ceiling {\floor x} = \floor x$
$\blacksquare$
Also see
Sources
- 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.2.4$: Integer Functions and Elementary Number Theory: Exercise $2$