How to prove that interval $(x-1,x]$ contains exactly one integer? The exersise says that &quot;Show that for any real number x, the interval $(x-1,x]$ contains exactly one integer&quot;, though there's a hint which says that consider three separately cases : $x\in \mathbb{Z}$,$(x \in \mathbb{R\setminus Z})\wedge(x&gt;0)$, $(x \in \mathbb{R\setminus Z})\wedge(x&lt;0)$, I don't know how to write them explicitly.
My attempt are belows:
Step1: try to prove the uniqueness.
If there are two integers $t$,$s$ and $t$ is not equal to $s$. So, |s-t|&gt;=1, but distance between every two real numbers in (x-1,x] should strictly less than 1, it's contradict, so at most one integer in (x-1,x].
Step2: try to prove the existance.
Think about set S={$s \in \mathbb{Z}$|s&lt;=x}, due to archimedian's property, we can conclude that S is not empty.And S has an upper bound x, so due to &quot;maximum exists in subset of $\mathbb{Z}$&quot;, S has a maximum $l \in \mathbb{Z}$. Now I try to prove that l is contained in (x-1,x]. From definition of S, we know that $l$&lt;=$x$.Now we try to prove that $l$&gt;$x-1$. If not, that is $l$&lt;=$x-1$, so $l+1$&gt;=$l$,and $l+1$&lt;=$x$, so $l+1 \in S$, it contradicts that $l$ is the maximum.
Can anyone tell me if my proof is true? Or if there some place where need to improve?
I can not explicitly write the solution in Logic notation but I have the answer.
Existence of the integer: Suppose $x$ is not an integer. Take $[x]$ as the greatest integer function. Clearly $x-1&lt;[x]&lt;x$ so the existence is justified.
Uniqueness of the integer: Clearly there is no integer between $x$ and $[x]$ as then it would contradict the definition of greatest integer function and also there can not be any integer between $x-1$ and $[x]$ (why? Because if there is an integer $y$ such that $x-1&lt;y&lt;[x]&lt;x$ then we have $0&lt;[x]-y&lt;x-y&lt;1$, now the difference between two integers can never be non-integer! hence it is a contradiction).
This completes the proof.
For every $y,z \in (x-1,x]$ we have $|y-z|&lt;1$ because size of this interval is $1$ and you can't take elements on it's edge. For every two integers $n,m$ we have $|n-m|\geq 1$ so it would be contradiction if they were both in this interval.