Question on the proof of a subspace of Polish space is Polish, iff it's a $G_\delta$ set. Suppose, $X$ is a Polish space, $Y$ is a Polish subspace of $X$. $\{U_n\}_{n \in \Bbb N}$ is a basis of open sets of $X$.
Let $A = \{ x \in \overline {Y} : \forall \epsilon \exists {n}(x \in U_n \land \operatorname{diam}{(Y \cap U_n)} < \epsilon) \}$
$\overline {Y}$ is the closure of $Y$. $\operatorname{diam}{(Y \cap U_n)}$ is the diameter of $Y \cap U_n$.
Why $A$ is different from $\overline {Y}$? 
Added: The proof is from an online note (page 11)about descriptive set theory. Since it's posted free online by the author, I take the liberty to paste a screenshot of it for convenience.
 
 A: Let's look at an example.  Let $X = \{1, 1/2, 1/3, \dots, 0\}$ with the Euclidean topology, and take $Y = X \setminus \{0\}$.  Then the discrete metric $d(x,y) = \delta_{xy}$ on $Y$ is complete and compatible with the subspace topology.  Now $0 \in \bar{Y}$.  However, if $U_n$ is any open neighborhood of 0 (in the topology of $X$), then it contains infinitely many points of $Y$; in particular, at least two points, so $\operatorname{diam}(U_n \cap Y) = 1$ (where the diameter is computed with respect to $d$).  Therefore $0 \notin A$, and we see explicitly that $\bar{Y} \ne A$.
A: I feel like there are two minor mistakes in the proof.
First, I think that it is $\overline A=\overline Y\cap\bigcap_{m=1}^{\infty}\bigcup\{U_n:\operatorname{diam}(Y\cap U_n)<1/p\}$, the intersection with $\overline Y$ is missing. Indeed, take for example $X=\mathbb R$, $Y=(0,1)$ and $(U_n)_{n\in\mathbb N}$ the set of open intervals with rational bounds. Then for all $n\in\mathbb N^*$, $2\in U_n$ where $U_n=(3/2,5/2)\cup(0,1/n)$ and $\operatorname{diam}(Y\cap U_n)=1/n$ but $2\notin\overline Y$.
It is no big deal because $\overline Y$ is closed in a metric space and is therefore a $G_\delta$ set, and the intersection of two $G_\delta$ sets is of course a $G_\delta$ set.
Second, I think there is a typo at the end of the proof in $\operatorname{diam}(Y\cap U_{n_m})<\varepsilon$. I think that $\varepsilon$ should be replaced by something like $1/m$.
