Prove $D$ is dense in $\mathbb{R}$ Let $D:={\{}p+q\sqrt2:p,q \in \mathbb{Z}  \}$. Prove that D is dense in $\mathbb{R} $
I have the solution to this problem but I was wondering if there is another way to prove it.
I remember seeing somewhere that a set $A$ is said to be dense in X iff $\overline A = X$. Does this (sketch of a) proof make any sense?
Let [a,b] be an interval, s.t. $a,b \in \mathbb{R}$ with $\pm \infty$ allowed.
Let $u_n := p^n + q^n\sqrt2$.  $u_n\in D^{\mathbb{N}}$ and then we prove that $u_n$ is not bounded above nor below, and since the only closed sets of $\mathbb{R}$ are closed intervals, we conclude that the smallest closed set (interval) $A$ s.t $D \subset A $ is $\mathbb{R}$, therefore $\overline D = \mathbb{R}$ ; D is dense in $\mathbb{R}$
 A: The fatal flaw is in this line:

the smallest closed set (interval) $A$ s.t $D \subset A $ is $\mathbb{R}$, therefore $\overline D = \mathbb{R}$

Not all closed sets are intervals, and therefore we need to be careful about which one we intend.

*

*If we intend "the smallest closed interval $A$ such that $D\subset A$ is $\Bbb R$", then that is a correct deduction from previous statements, but it does not imply $\overline D = \mathbb{R}$.

*If we intend "the smallest closed set $A$ such that $D\subset A$ is $\Bbb R$", then that does not follow from previous statements and is in fact false.

One possible red flag: your argument as written would show that any unbounded set is dense in $\Bbb R$...!
A: For $x\in\Bbb R$ let $[x]$ be the largest integer not exceeding $x.$ There is an old result that if $x\in\Bbb R\setminus \Bbb Q$ then $\{nx-[nx]:n\in\Bbb N\}$ is dense in $[0,1].$
For  $y\in\Bbb R$ and for $\epsilon>0,$ take $q\in\Bbb N$ such that $q\sqrt 2 -[q\sqrt 2]\in [0,1]\cap (y-[y]-\epsilon, y-[y]+\epsilon),$ and let $p=[y]-[q\sqrt 2].$ Then $|y-(p+q\sqrt 2\,)|<\epsilon.$
