In the answer to this question, respectively in this post it is claimed that every analytic subset of $\Bbb{R}$ is the projection of a $G_\delta$ set.
My definition of an analytic set comes from Dudley, Real Analysis and Probability, Theorem 13.2.1. This theorem shows that for a Polish space $Y$ (e.g. $Y = \Bbb{R}$), the following conditions are equivalent (for $\emptyset \neq A \subset Y$):
- $A = f(\Bbb{N}^\infty)$ for some continuous $f$.
- $A = f(\Bbb{N}^\infty)$ for some Borel measurable $f$.
- $A = f(X)$ for some Polish space $X$ and continuous $f$.
- $A = f(X)$ for some Polish space $X$ and Borel measurable $f$.
- $A = f(B)$ for some Borel set $B$ in a Polish space $X$ and $f : B \to Y$ continuous.
- $A = f(B)$ for some Borel set $B$ in a Polish space $X$ and $f : B \to Y$ Borel measurable.
A set $A$ for which this is true is called an analytic subset $A$ of $Y$.
I can show that each analytic subset $\emptyset \neq A \subset \Bbb{R}$ is the projection of some Borel set $B \subset \Bbb{R}^2$, because we also know from Dudley, Theorem 13.1.1 that $\Bbb{N}^\infty$ is Borel-isomorphic to $\Bbb{R}$. Let $\Phi : \Bbb{R} \to \Bbb{N}^\infty$ denote the Borel-isomorphism.
So if $A = f(\Bbb{N}^\infty)$ for some Borel-measurable $f : \Bbb{N}^\infty \to \Bbb{R}$, then
$$ A = (f\circ \Phi)(\Bbb{R}) = \pi_2 (\mathrm{graph}(f \circ \Phi)). $$
But Lemma 13.2.2 in Dudley shows that the graph of a Borel-measurable function is a Borel-measurable subset of the product space.
However, this only shows that $A$ is the projection of a Borel-set $B\subset \Bbb{R}^2$, it does not show that we can take $B$ to be a $G_\delta$ set.
So my question is: Is it indeed true that each analytic subset of $\Bbb{R}$ (or more generally of any polish space $X$) is the projection of a $G_\delta$ subset $G \subset \Bbb{R} \times \Bbb{R}$ (or of $X \times X$)? If so, can you provide a (more or less) elementary proof or a hint to a location, where I might find such a proof?