To define the function $f(x)=|[x]|$ where $|[x]|$ is the greatest integer that is less or equal to $x$, we need to prove that indeed such an integer exists. In other words,
$$\forall x\in \mathbb{R} \;\;\exists !\, n\in\mathbb{Z}\;\;:\;\;n\leq x<n+1.$$
My first attempt is by defining the set $A=\{y\in\mathbb{Z}| y\leq x\}$. Since $\mathbb{N}$ is not bounded above then $\exists n\in \mathbb{N}(n>-x)$. Then $\exists n'\in \mathbb{Z}(n'<x)$, namely $n'=-n$. Therefore $A\neq\emptyset$. Also $A$ is bounded above by $x$. Then $\sup(A)$ exists.
**Here my problem is how to prove that $\sup(A)\in A$.
Also my question is that I'm not sure if this is enough because $sup(A)$ is unique or do I still need to prove uniqueness.
EDIT:
After all the hints in the answers, chich I appreciate so much, I have arrived to this attempts of solution, please feel free to comment and help me saying if something is wrong:
First approach: considering tree cases ($x<0, x=0, x>0$).
1) If $x=0$ then I can think of $n=0$.
2) If $x>0$ then I can think of the set $B=\{y\in \mathbb{N}|x\leq y\}$. By using the well-ordering principle then $\min(B)-1<x\leq \min(B)$ and then if $x=\min(B) $ I can make $n=\min(B)$; if $\min(B)-1<x<\min(B)$ then $n=\min(B)-1$.
3) if $x<0$ then $-x>0$ and therefore $\exists m \in \mathbb{N}(m\leq -x < m+1)$. Then $\exists n'\in \mathbb{Z}(-n'<x\leq-n'-1)$, namely $n'=m+1$. Again, if $x=-n'-1$ then I can make $n=-n'-1$. If $-n'<x\leq-n'-1$ then $n=-n'$.
Second approach. Since $\mathbb{N}$ is not bounded above then let $x_{0}\in \mathbb{N}$ be such that $x_{0}>\sup(A)$. Let's consider the set $B=\{x_{0}-y: y\in A\}$. Since $B\subseteq \mathbb{N}$ then, by the well ordering principle, $\min(B)$ exists. Moreover $\exists y_{0}\in A\forall y\in A(\min(B)=x_{0}-y_{0}\leq x_{0}-y)$. This means that $\exists y_{0}\in A\forall y\in A (y\leq y_{0})$. Therefore $\max(A)=y_{0}$. In this case I can make $n=\max(A)$.
Hint: Rather than dealing with $A=\{y\in\mathbb{Z}\mid y<x\}$, try dealing with $B=\{y\in\mathbb{Z}\mid y\leq x\}$.
Why? In general, it is not true that $\sup A\in A$; it is true whenever $x\notin\mathbb{Z}$, but it is false when $x\in\mathbb{Z}$.
Now, think about it this way: let $S:=\sup B$. Since $S$ is the supremum, it must be the case that there is $n\in B$ such that $S-1<n\leq S$.
Can you show that $S\leq x$? If so, you'll have that $n\leq x$. For the other side, note that $S-1<n$ implies $S<n+1$, which implies that $n+1\notin B$; hence $n+1>x$.