Proof of floor and ceiling functions

3k Views Asked by At

By definition:

$ \lfloor {x}\rfloor = i \Rightarrow i \le x \lt i + 1 $ (floor function)

and

$ \lceil {x} \rceil = j \Rightarrow j - 1 \lt x \le j $ (ceiling function)

So, how is the proof that these properties are true for all integers?

$(n−1)/2 ≤ ⌊n/2⌋ ≤ n/2$

$n/2 ≤ ⌈n/2⌉ ≤ (n+1)/2$