Every $G_\delta$ subset of a Polish space is Polish Notation: $X$ is a Polish space if $X$ is  separable and completely metrizable by a metric $d.$
I am studying this set of notes and come across the following theorem at page $11.$

Theorem: Every $G_{\delta}$ subset of a Polish space is a Polish space with the subspace topology.

However, the author does not provide any proof to the above theorem.
So i try to prove it myself.
My attempt:
Let $G$ be a $G_\delta$ subset of a Polish space $(X,d).$
Then
$$G = \bigcap_{i=0}^\infty U_i$$
where $U_i$ is an open set in $X$ for all $i\geq 0.$
It is shown in the notes that open subset of a Polish space is Polish.
Therefore, $U_i$ is a Polish space and we let $d_i$ be a metric which completely metrizable $U_i$ for all $i\geq 0.$
The product space $\prod_{i=0}^\infty U_i$ is complete with metric
$$\hat{d}(f,g) = \sum_{i=0}^\infty \frac{1}{2^{i+1}}d_i(f(i),g(i))$$
where $f,g\in \prod_{i=0}^\infty U_i.$
Now, we consider the map
$$G\to \prod_{i=0}^\infty U_i$$
with
$$x\mapsto f_x$$
where $f_x(i) = x$ for all $i\geq 0.$ (that is, $f_x$ is a 'constant' sequence)
Define a metric $d_G$ on $G$ given by
$$d_G(x,y) = \hat{d}(f_x,f_y).$$
We claim that $(G,d_G)$ is complete.
Suppose that $(x_n)_{n=0}^\infty$ is a Cauchy sequence in $G$ with respect to $d_G.$
This means that the sequence $(f_{x_n})_{n=0}^\infty$ is Cauchy in $\prod_{i=0}^\infty U_i$ with respect to $\hat{d}.$
By completeness of $\prod_{i=0}^\infty U_i,$ there exists $f\in\prod_{i=0}^\infty U_i$ such that $(f_{x_n})_{n=0}^\infty$ converges to $f$ in $\hat{d}.$
Now, we want to show that $f(i) = x$ for some $x\in U_i$ for all $i\geq 0.$
However, we couldn't show that $f$ is a 'constant' sequence.
Any hint would be appreciated.
 A: To show that $f$ is constant you must  use the fact that  $X$ is Hausdorff. There is an example of a non-Hausdorff $T_1$ space  with two completely metrizable sub-spaces $U_1, U_2$ such that $U_1\cap U_2$ is not completely metrizable.
By contradiction: If $f$ is not constant, suppose $f(i)\ne f(j).$ Then there are disjoint open subsets $S,T$ of $X$ such that $f(i)\in S$ and $f(j)\in T.$  Now $S\cap U_i$ is open in $U_i$ and $T\cap U_j$ is open in $U_j.$ So the set $$C=\prod_{k=0}^{\infty}A_k$$ is open in the product space $P,$ where $A_k=U_k$ if $i\ne k\ne j$ and $A_i=U_i\cap S$ and $A_j=U_j\cap T.$
Now $(f_{x_n})_n$  converges in $P$ to $f,$ and $f\in C,$ with $C$ open in $P$. So for all but finitely many $n$ we have $f_{x_n}\in C .$  
But if $f_{x_n} \in C$ then $f_{x_n}(i)\ne f_{x_n}(j)$... (because $f_{x_n}(i)\in U_i\cap S\subset S, $ and $f_{x_n}(j)\in U_j\cap T\subset T,$ while $S\cap T=\phi.$....).  This  contradicts the hypothesis that every $f_{x_n}$ is a constant function.
Remarks. (I). I like this proof. There is a small flaw: You should let $e_i$ be a complete metric for $U_i$ and let $d_i=\min (1,e_i).$ Otherwise $\hat d(f,g)$ might be infinite for some $f,g.$
(II). This holds  for any completely metrizable $X,$ separable or not. And from the proof we also see that the only property of $X$  used is the $T_2$ property, so we can say that if $F$ is a countable family of completely metrizable subspaces of a $T_2$ space $X$ then $G=\cap F$ is completely metrizable.
(III). A generalization of the converse to the result in the Q also holds: If $X$ is any  metrizable space and  $Y$ is a completely metrizable subspace of $X$ then $Y$ is $G_{\delta}$ in $X.$ Hence, combined with the result in your Q, a subspace $Y$ of a completely metrizable $X$ is also completelty metrizable  if and only if $Y$ is $G_{\delta}$ in $X.$  
