Let $X$ be a topological space and $Y\subseteq X$ a subset. $Y$ is said to be dense in $X$ if $\overline{Y}=X$ (where $\overline{Y}$ denotes the closure of $Y$).
Now consider $X=\mathbb{R}$ (with the usual topology) and $Y=\mathbb{Q}$. In many text-books the fact that $\mathbb{Q}$ is dense in $\mathbb{R}$ is proved by showing that for every $a\in \mathbb{R}$ and $b\in \mathbb{R}$, $a<b$, there exists $q\in \mathbb{Q}$ such that $a<q<b$. Let us call ($\ast$) this property.
This is my proof that ($\ast$) implies $\overline{\mathbb{Q}}=\mathbb{R}$.
Proof. Let $x\in \mathbb{R}$ and let $I_n:= \left(x-\frac{1}{n},x-\frac{1}{n+1}\right)$ for $n\geq 1$. By ($\ast$), for every $n\geq 1$ there exists $q_n\in I_n\cap \mathbb{Q}$. The sequence $(q_n)_{n\geq 1}$ converges to $x$ as $n\rightarrow \infty$ since $\frac{1}{n+1}<x-q_n<\frac{1}{n}$ for every $n\geq 1$.
My questions are:
- Is my proof correct?
- There is a simpler way to see that ($\ast$) is enough to have $\overline{\mathbb{Q}}=\mathbb{R}$?
Your proof is almost correct. You should mention that each $q_n$ is rational.
(I prefer the intervall $I_n:= \left(x-\frac{1}{n},x+\frac{1}{n}\right)$.)