Problem with example of $G_\delta$ set It was known that every closed set is a $G_\delta$ set. Now, I am trying to make an example about that.
This is my example:
$$[1,2]=\bigcap_{n=1}^\infty\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)$$
I just can show that by visualization on a real line. But, when I try to proof that mathematically, I get stuck. This is my attempt:

*

*$[1,2]\subseteq \bigcap_{n=1}^\infty\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)$. I think for this part is clear, because $[1,2]\subseteq \bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)$ for all $n\in\mathbb{N}$.

*Conversely, i.e. $\bigcap_{n=1}^\infty\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)\subseteq [1,2]$. I try to use contraposition method, take any $x\notin [1,2]$, so $x<1$ or $x>2$. Then I will proof that $x\notin \bigcap_{n=1}^\infty\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)$, that means $x\in \bigg(\bigcap_{n=1}^\infty\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)\bigg)^c=\bigcup_{n=1}^{\infty}\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)^c$. Because $x \in  \bigcup_{n=1}^{\infty}\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)^c$, there exists $n\in \mathbb{N}$ sucht that $x\in\bigg(1-\frac{1}{n},2+\frac{1}{n}\bigg)^c$, so $x\in\bigg(-\infty,1-\frac{1}{n}\bigg]$ or $x\in\bigg[2+\frac{1}{n},\infty\bigg)$. Take any $\varepsilon>0$, by Archimedian Property, we have $\frac{1}{n}<\varepsilon$, then
$$x\leq 1-\frac{1}{n}<1-\varepsilon<1$$
or $$x\geq2+\frac{1}{n}$$
I get stuck on inequality of $x\geq2+\frac{1}{n}$, because it's impossible that $x\geq2+\frac{1}{n}<2+\varepsilon$.
So, I am not sure about my attempt. Is there another way to prove that? Thanks for any help.

 A: Okay so there is a slight mistake in the last steps you made. By the Archimedean property you get that $1/n<\epsilon$ but this means when you switch signs that you get $-\epsilon<-1/n$ and so the sequence of inequalities should really be $x\leq 1-\epsilon<1-\frac{1}{n}<1$. Also it's not clear what purpose $\epsilon$ is supposed to have. I am taking the liberty to assume you meant it to be $\epsilon = min\{\vert x-1 \vert, \vert x-2\vert\}$. Intuitively speaking this is the distance that $x$ has compared to the the set $[1,2]$. Then you need to break the proof down into two cases. The first case is the one in which $x<1$ and the second one when $x>2$. The first case besides the small error works since you showed if $x<1$ then by the definition of $\epsilon$ $x\leq 1-\epsilon<1-\frac{1}{n}$ and so it's for some $n\in\mathbb{N}$ in the the set $(-\infty,1-\frac{1}{n}]$. For the second case you consider the case $x>2$ so by the definition of $\epsilon$ you have $x\geq 2+\epsilon>2+\frac{1}{n}$ and so $x\in [2+\frac{1}{n},+\infty)$. You need to be careful not to mix the inequalities that appear in one of the cases with the inequalities in the other case.
