I am currently studying 'Classical Descriptive Set Theory' by Kechris, and I have some issues with the proof of theorem 4.14
Every separable metrizable space is homemorphic to a subspace of the Hilbert cube $\mathbb{I}^\mathbb{N}$. In particular, the Polish spaces are, up to homemorphism exactly the $G_\delta$ subspaces of the Hilbert cube.
The proof is given as follows:
Let $(X,d)$ be a seperable metric space with $d\leq 1$. Let $(x_n)$ be dense in $X$. Define $f: X\to \mathbb{I}^\mathbb{N}, f(x)=(d(x,x_n))_n$. Clearly, $f$ is continuous and injective. It remains to show that $f^{-1}: f(X)\to X$ is also continuous. Let $f(x^m)\to f(x)$, i.e., $d(x^m, x_n)\to d(x,x_n)$ for all $n$. Fix $\varepsilon >0$ and then let $n$ be such that $d(x,x_n)<\varepsilon$. Since $d(x^m, x_n)\to d(x,x_n)$, let $M$ be such that: $m\geq M\Rightarrow d(x^m, x_n)<\varepsilon$. Then if $m\geq M$, $d(x^m, x)<2\varepsilon$. So $x^m\to x$.
I want to understand why $f$ is injective, continuous, and the proof that $f^{-1}$ is continuous.
$f$ is injective:
Let $f(x)= f(y)$. Hence $(d(x,x_n))_n = (d(y,x_n))_n$ for every $n$. I have to show that $x=y$. So $d(x,y)=0$. Suppose $d(x,y)=D>0$. As the set $(x_n)$ is dense in $X$ we have that $B_{D/2}(x)\cap (x_n)\neq\emptyset$ and $B_{D/2}(y)\cap (x_n)\neq\emptyset$.
So we have a $z\in B_{D/2}(x)\cap (x_n)$ with $z\notin B_{D/2}(y)$ (as the distance of $x$ and $y$ is $D$, the open balls do not intersect).
Then $d(x,z)<D/2$ and $d(y,z)>D/2$. Then $d(x,y)\leq d(x,z)+d(y,z)<d(x,z)+D/2$ so $D<D/2+d(x,z)\Leftrightarrow d(x,z)>D/2$, which is a contradiction. So $D=0$ and $x=y$. So $f$ is indeed injective.
I am certain that I understand the proof that $f^{-1}$ is continuous, but I have the feeling that the author was kinda lazy writing it, why the proof reads weird.
Why is $f$ continuous?
I take a sequence $a_n\to a$ and have to show that $f(a_n)\to f(a)$. I am a little confused.
$f(a_n)=(d(a_n, x_n))_n$.
What kind of object is this? A sequence where every sequential is a sequence? How do I proof that $(d(a_n,x_n))_n\to (d(a,x_n))_n$.
For every $n$ it has to hold that $d(a_n,x_n)\to d(a,x_n)$.
I feel like I am lost in notation here. Can you give me a hint? I am certain that I am able to proof this myself.
Hints are appreciated. Thanks in advance.