Discrete math - The ceiling of a real number x, denoted by$ ⌈⌉$, is the unique integer that satisfies the inequality I have a discrete math question below with a solution written by my teacher. I'm really lost as to what answers I'm trying to find exactly. I don't understand how the teacher got 1 and -1 for the first two values, and I also don't understand how and why the last line turns $⌈(. − ⌈.⌉)⌉$ into $⌈. − ⌉ = ⌈.⌉ = $
I would appreciate it if someone could walk me through the solution.

 A: You just need to know that $\lceil{x}\rceil$ is the smallest integer that is greater than or equal to $x$.
Let $x = 0.1$. 
Is $0 ≥ x$? No.
Is $1 ≥ x$? Yes.
Is $2 ≥ x$? Yes. However, it is not the smallest integer as $1$ also satisfies this condition.
Try this procedure with $x = -1.7$ and note that $-1.7 \color{red}{≤} -1$.
A: A drawing of the function $f(x)=\lceil x\rceil$ can help:

Taking for granted what the drawing says it's very easy to check any of the substitutions (e.g. clearly $\lceil 2.4\rceil=\lceil 2.15\rceil=\lceil 2.836\rceil=3$ simply reading it)
You can too check the truth of the substitutions right into the inequalities. E. g. $\lceil1.7\rceil=2$ satisfies $2-1<1.7\leq2$
Finally, the very name helps: for a number some integer is its ceiling.
A: Let there be an integer valued function $f$ such that $$f(x)-1 < x \leq f(x),\ \forall x \in \Bbb R.$$ Then we have $$x \leq f(x) < x+1,\ \forall x \in \Bbb R.$$ Now two cases may arise which are 
$(1)$ $x \in \Bbb Z.$
$(2)$ $x \notin \Bbb Z.$
If $x \in \Bbb Z$ then since $f$ is an integer valued function with $f(x) \in [x,x+1)$ it follows that $f(x) = x.$ But then we have $f(x) = \lceil f(x) \rceil = \lceil x \rceil.$
Now if $x \notin \Bbb Z$ then $\exists$ a unique integer $n$ with $x<n<x+1.$ So $n$ is the least integer just exceeding $x.$ Therefore $$\lceil x \rceil = n.\ \ \ \ (1)$$ On the other hand since $f$ is integer valued with $f(x) \in [x,x+1)$ and the only integer in the interval $[x,x+1)$ is $n$ so it also follows that $$f(x)=n.\ \ \ \ (2)$$ Combining $(1)$ and $(2)$ it follows that $$f(x) = \lceil x \rceil$$ as required. 
This proves the uniqueness of the ceiling function $\lceil x \rceil.$
