proof for the supremum of $[0, \sqrt{2}] ∩ Q$ I found a problem in calculus lecture notes where it is asked to find the supremum for the follownig set $X = [0, \sqrt{2}] ∩ Q$
I assumed that the $\sup X = \sqrt{2}$
Then I wrote (according to definition of supremum)

*

*For every x $\in X, x \leqslant \sqrt{2}$.

*For every $\varepsilon > 0$ There exists $x\varepsilon \in X$, such that $x\varepsilon > \sqrt{2} - \varepsilon$
Problem - Now I'm confused because I don't know which $x\varepsilon$ to choose so it would belong to to $X$ and be more than $\sqrt{2} - \varepsilon$. Is there anything wrong with what I wrote?
supplementary -  Also, could you please explain what would be in case of $X = [0, \sqrt{2}) ∩ I$?
 A: HINT
$\exists (q_n)\subseteq \mathbb{Q}$ s.t it is increasing and $q_n\to\sqrt{2}$
A: You are looking for a rational number $x_\varepsilon$ such that $\sqrt2-\varepsilon<x_\varepsilon<\sqrt2$.
Suppose $x_\varepsilon=p/q$ with $p,q\in \mathbb Z$. Then we shall have
$$
q(\sqrt2-\varepsilon)<p<q\sqrt2,
$$
or
$$
q(\sqrt2-\varepsilon)>p>q\sqrt2
$$
And such a $p$ exists if $q\sqrt2-q(\sqrt2-\varepsilon)=q\varepsilon>1$.
So when will $q\varepsilon>1$? When $q>1/\varepsilon$, i.e. when
$$
q>\lceil1/\varepsilon\rceil,
$$
where $\lceil x\rceil$ is the smallest integer greater than $x$.
Finally such a $q$ exists by Archimedes' principle.

The case of $X=[0,\sqrt2)\cap I$ is similar. We want to find an irrational number $x_\varepsilon$ such that $\sqrt2-\varepsilon<x_\varepsilon<\sqrt2$. Notice that $\delta\sqrt2$ is always irrational for any rational number $\delta\ne0$: if $\delta\sqrt2$ was rational, then so is $\delta^{-1}\delta\sqrt2=\sqrt2$, a contradiction.
So it suffices to find a rational number $\delta\ne0$ such that
$\sqrt2-\varepsilon<\delta\sqrt2<\sqrt2$, i.e.
$$
-\varepsilon<(\delta-1)\sqrt2<0,
$$
i.e.
$$
-\frac{\varepsilon}{\sqrt2}<(\delta-1)<0.
$$
So we proceed as above and find a rational number $\delta'$ such that
$-\frac\varepsilon{\sqrt2}<\delta'<0$. Then take $\delta=\delta'+1$ suffices.

Hope this helps.
A: Here's a more direct argument.

*

*Clearly if $x\in [0,\sqrt{2}]\cap \mathbb{Q}$, we have $x\in [0,\sqrt{2}]$, so $x\leq \sqrt{2}$.


*Now for all $\epsilon>0$, notice that $\sqrt{2}-(\sqrt{2}-\epsilon)>0$, so by Archimedean property there exists an integer $n\in\mathbb{N}$ large enough so
$$n(\sqrt{2}-(\sqrt{2}-\epsilon))>10.$$
(The choice of $10$ is quite arbitrary.) This implies that $n\sqrt{2}$ and $n(\sqrt{2}-\epsilon)$ are two numbers strictly greater than $10$ apart, so there must exist an integer $m$ strictly between them, i.e.
$$n\sqrt{2}> m> n(\sqrt{2}-\epsilon)$$
but this implies that
$$\sqrt{2}>\frac{m}{n}\geq \sqrt{2}-\epsilon$$
so $\mathbb{Q}\cap (\sqrt{2}-\epsilon,\sqrt{2})\neq \varnothing$ for all $\epsilon>0$, and we are done.
