If X is a compact metric space and $\{x_n: n \in \mathbb{N}^+\}$ is dense in X . Let $a$ denote the diameter of X and $[0,a]^{\omega} $is the countable product under product topology.
Define f as above by $f(x)=(d(x,x_1),d(x,x_2),\ldots)$ . Now what can we say about $f$? Is it injective, surjective, continuous or homeomorphism?
Any hints will be appreciated.
Some details left to check:
$f$ is continuous as the metric is itself a continuous function and we use the product topology.
$f$ is injective because of the density of the set of $x_i$.
$f$ is clearly not surjective in general. It cannot be surjective for $X = \{0\} \cup \{\frac{1}{n}: n \in \mathbb{N}^+ \}$ as a subset of the reals, e.g. to just name a trivial example.
$f$ will thus (by compactness) be an embedding from $X$ into $[0,a]^\omega$ so $X$ is homeomorpic to $f[X]$ using $f$. It cannot be a homeomorphism from $X$ to $[0,a]^\omega$ in the many cases that $f$ is not surjective, obviously.