Is the set of all rationals with denominators less than $10^6$ closed in $\mathbb{R}$? I'm wondering if the set of all rationals with denominators less than $10^6$ is closed in the real number system. I think it is not, so that's what I've been trying to prove. I've tried looking at its complement and showing that it is open, but I didn't progress much. My last resort is to show that there is a sequence of rationals in my set converging to an irrational number (or to a rational whose denominator is greater than $10^6$). The problem is, how do I ensure that all simplified fractions in my sequence will have denominator less than $10^6$?
 A: Call our set $D$. We show that $D$ is closed by showing that the closure of $D$ is equal to $D$. 
Any bounded set $B$ contains only finitely many elements of $D$.  For suppose to the contrary that $B$ contains infinitely many elements of $D$. Since the number of denominators is finite, the number of numerators of elements of $B$ must be infinite, and therefore unbounded, making $B$ unbounded. 
So if we take any real number $x$ not in $D$, there is an open interval about $x$ which does not contain any element of $D$. Thus $x$ cannot be in the closure of $D$.
A: Note that $D= \displaystyle \bigcup_{n=1}^{10^6} \frac{1}{n}\mathbb{Z}$. Each element of this union is closed since $\mathbb{Z}$ is closed and the map $x \mapsto \frac{x}{n}$ is a homeomorphism for all $n \ne 0$, and a finite union of closed sets is closed.
A: Lemma: Suppose $X,Y\subseteq \mathbb R$, $X$ is finite and $Y$ is closed. Then the set $$X+Y:=\{x+y|x\in X, y\in Y\}$$
is closed.
Proof: Since $Y$ is closed, any sequence $(y_n)$ in $Y$ with limit in $\mathbb R$ has limit in $(y_n)$. For $x\in X$, any sequence in $\{x\}+Y$ is of the form $(x+y_n)$, and if $(x+y_n)$ has limit $x+y$ in $\mathbb R$ then $(y_n)$ has limit $y\in Y$, so $x+y\in \{x\}+Y$ hence $(x+y_n)$ has limit in $\{x\}+Y$. Thus $\{x\}+Y$ is closed. Since a finite union of closed sets is closed, it follows that $X+Y=\bigcup\limits_{x\in X} \{x\}+Y$ is closed.
Corollary: The set $\{a/b|a,b\in \mathbb Z, 0\leq b\leq 10^6\}$ is closed.
Proof: Note that 
$$\{a/b|a,b\in \mathbb Z, 0\leq b\leq 10^6\}=\{a/b|a,b\in \mathbb Z, 0\leq a\leq b\leq 10^6\}+\mathbb Z$$
and $\{a/b|a,b\in \mathbb Z, 0\leq a\leq b\leq 10^6\}$ is finite while $\mathbb Z$ is closed.
A: Hint: Let $N=\operatorname{lcm}\{1,2,3,\ldots,10^6\}$, and let our set be
$$S=\{\tfrac{a}{b}\in\mathbb{Q}\mid 1\leq b\leq 10^6\}.$$
Consider the homeomorphism $f:\mathbb{R}\to\mathbb{R}$ defined by $f(x)=Nx$. Then $f(S)\subseteq\mathbb{Z}$.
A: Of course it's closed. Just blow it up by a factor of $(10^6)!$, and all its elements are integers.
