I am going over a the proof that $\mathbb{Q}$ is dense In $\mathbb{R}$ but there is one unjustified move that I try to understand.
$\mathbb{Q}$ is dense In $\mathbb{R}$ , which means that for all $r_1<r_2$ in $\mathbb{R}$ there is $q\in \mathbb{Q}$ s.t $r_1<q<r_2$
Proof:
We will find $m,n \in \mathbb{Z}$ such that $r_1<\frac{m}{n}<r_2$ and $n>0$, so that $nr_1<m<nr_2$
Let there be $r_1<r_2\Rightarrow 0<r_2-r_1$ by Archimedean property there is $n\in \mathbb{N}$ such that $1<n(r_2-r_1)\Rightarrow 1<nr_2-nr_1\Rightarrow 1+nr_1<nr_2$
Now, let $m=\max\{k\in \mathbb{Z}:k<nr_2\}$ Therefore(?) $nr_2-m\leq 1\Rightarrow -1\leq m-nr_2$
Adding $1+nr_1<nr_2$ to $-1\leq m-nr_2$ we get $nr_1<m$ and overall $nr_1<m<nr_2$
Which claim is used in the bold therefore?
I thought that by the Least Upper Bound Axiom (the axiom is true to $\mathbb{R}$ but not for $\mathbb{Q}$ can we say it is true for $\mathbb{Z}$?) we can say that if $m<nr_2$ then $nr_2<m+1$ but then why we have $\le$ and not $<$ in the proof
The least upper bound principal definitely applies to integers (just think about it) but shame on the text for assuming so without pointing out the assumption.
Suppose $x\in \mathbb R$ and wolog assume $x > 0$. Then by archemedian property if $r = 1$ there is an integer $n$ so that $n > x > 0$. By induction we test $k=1$ to $k=n$ and test to see whether $k < x$ or $k \ge x$. When we must find such a value as $n$ itself is $> x$ and by well-ordered principal we must find a first such element $k+1 > x$ and a last such element $k \le x$.
So for every $x \in \mathbb R$ there is unique integer $k$ so that $k \le x < k+1$. (Actually we haven't proved this integer is unique. By if $k' \le x < k'+1$ and $k \le x < k+1$ then if $k'<k$ we get $k'+1 \le k \le x$ and if $k'> k$ then $k+1\le k' \le x$ and those are contradictions.)
As a consequence every non-empty bounded set of integers will have a maximum element. Say $K$ is a set of integers bounded above. Let $a =\sup K$. Then there is a unique integer $n$ so that $n\le a < n+1$. So $n-1 < a$ and $n-1$ is not an upper bound and there is an $m \in K$ so that $n-1 < m < a < n+1$. The only such integer is $m=n$ and thus $n\in K$ and $n$ is the maximum element in $K$.