Rigorous definition of the greatest integer function I am sorry, if the title wasn’t very clear and concise, but I would try to explain my question here more elaborately.
I am learning elementary number theory, which is when I came across this function.
The greatest integer function is defined as the greatest integer less than or equal to the given real number. That is if,
$\forall x \in \mathbb{R},$ if $ \forall k,r \in \mathbb{Z}$ are such that $ k \leq x < k+1$ and $ r \le x < r+1 $then we say that $ \max(k,r) $ ( assuming $k>r$ ) is the greatest integer less than or equal to $x$ and denote it as $k =  \lfloor x \rfloor$.
So, here is my question, although it is really obvious, how can we prove that such an integer $k$ will always exist ? The existance of $k$ is pretty obvious, as we deal with integers all the time, but how would we mathematically prove that it will always exist ?
Also, I was wondering how to write the above definition in symbolic form, so here is my attempt. Is it correct ? Or is some crucial detail in the definition is missing ?
$ \left( \space \forall x \in \mathbb{R} \space  \forall k ,r \in \mathbb{Z} , \space k \le x < k+1 \space , \space r \le x < r+1 \space , \space max(k,r)=k \space \right) \Leftrightarrow k = \lfloor x \rfloor$
I understand basic calculus, elementary number theory, and high school mathematics. Can I prove the existence of such an integer using the math that I know ?
The way I proceeded to prove it using contradiction. As there are infinitely many integers, and $x$ is a finite number, there must exist some integer less than that. If it didn’t, then there wouldn’t be infinitely many integers. Is my argument corrcet ? However, I wasn’t able to put this in a mathematical form. Can you please help me prove this ?
Also, how would we prove that, the integer $k$ would be unique ?
Thanks in advance.
 A: One should be more precise. The statement does not follow merely from the fact that there are infinitely many integers. We shall use some properties of the order relation on the set of real numbers. These properties are immediate from the construction of $\mathbb{R}$. Let $x\in \mathbb{R}$
Existence:
There exists a natural number $n\in \mathbb{N}$ such that $-n\leqslant x < n$ ($\mathbb{R}$ has the Archimedean property). Observe that $\{u\in \mathbb{R}|-n\leqslant u <n\}=\bigcup_{i=1}^{2n} \{v\in\mathbb{R}|i-n-1\leqslant v <i-n\}$. Hence, $x\in \{v\in\mathbb{R}|i-n-1\leqslant v <i-n\}$ for some $i\in \{1,2,\ldots,2n\}$. For such $i$, $\lfloor x \rfloor=i-n-1$
Uniqueness:
Suppose that $k,r \in \mathbb{Z}$ such that $k\leqslant x <k+1$ and $r\leqslant x <r+1$. If $k<r$, then $k+1 \leqslant r$ and we have that $k\leqslant x<k+1\leqslant r \leqslant x<r+1$. This is a contradiction (Because we get x<x). Since exactly one of the statements $k<r$, $k=r$ and $k>r$ is true, WLOG, we conclude that $k=r$.
In essence, the given definition is fine but it can be "simplified" this way: $(k\in\mathbb{Z},\;\; (k\leqslant x<k+1)) \Leftrightarrow (\lfloor x \rfloor = k)$ for all $x\in\mathbb{R}$.
