Is every subset of $\mathbb{R}$ a $G_\delta$ set? The following seems to indicate that every subset of $\mathbb{R}$ a $G_\delta$ set:
Let $A$ be a subset of $\mathbb{R}$.
Let $A_n=\bigcup\limits_{a\in A}(a-\frac{1}{n},a+\frac{1}{n})$.
$\forall n\in\mathbb{N}$, $A_n$ is an open set.
$A=\bigcap\limits_{n=1}^\infty A_n$, so $A$ is the intersection of a countable no. of open sets
i.e. $A$ is $G_\delta$ set.
I'm pretty sure I've made a mistake, but I can't see where I went wrong.
 A: The other answers address the flaw in the OP's proof, but there is a quick cardinality argument that has the advantage that it avoids Baire. Since $\mathbb R$ has a countable base for its standard topology, the cardinality of its open sets (which are unions of basis elements) is $2^\omega$. Then, using the definition of the $G_{\delta}$ sets, there can be at most $(2^\omega)^\omega=2^\omega$ of them.So there must be subsets of $\mathbb R$ that are not $G_{\delta}$ sets.
A: Yes, you made a mistake.
For example, let $A=(0, 1)$, then $A_n=(-\frac1n, 1+\frac1n)$.
So $\bigcap\limits_{n=1}^\infty A_n$ is...

$\bigcap\limits_{n=1}^\infty A_n=[0, 1]$

For example which is not $G_\delta$-set but subset of $\mathbb R$ is $\mathbb Q$, this can be seen to be true by Baire category theorem.
A: As indicated in the comments, $\bigcap\limits_{n=1}^\infty A_n \subset A$ is not necessarily true. This is the false step in your reasoning.
For example, Let $A=\{1,\,1/2,\,1/3,\,\dots\}$. Then we see that $$0 \in\bigcap\limits_{n=1}^\infty A_n, \;\;\;A \not\ni 0.$$
For we set $n=j$, fixed; now look at the interval $(\frac{1}{2j}-\frac{1}{j},\,\frac{1}{2j}+\frac{1}{j})$.
A: It is well known that $\mathbb{R}$ is a Baire space. That means (definition) that every countable intersection of open dense sets is dense.
Take the set of the irrational numbers and consider $B_{n}=\left\{q_{n} \right\}^{c}$ where $q_{n}$ is the sequence of rational numbers.
It is clear that each $B_{n}$ is open and $A=\bigcap\,B_{n}$ where A the set of irrationals.
Therefore the set of irrationals is a $G_{\delta}$ set.
Now we prove that the set of rationals is NOT $G_{\delta}$. Assume it is.
Then it can be written as $\bigcap\,A_{n}$ where $A_{n}$ are open sets.
But since $A_{n}\supset\,\mathbb{Q}$ we get that each $A_{n}$ is dense in $\mathbb{R}$.
So we get by the two constructions that $\mathbb{Q}\bigcap\,A=\varnothing$ is a countable intersection of open dense sets which implies that $\varnothing$ is a dense set, clearly a contradiction.
Therefore $\mathbb{Q}$ is a subset of $\mathbb{R}$ which is not $G_{\delta}$.
