# Prove that a covering map is a homeomorphism

I got stuck in the following exercise:

Let $p:\widetilde{X}\rightarrow X$ be a covering map with $\widetilde{X}$ connected and $p^{-1}(x)$ finite, for every $x\in X$.

Show that if there exists a continuous map $f:\widetilde{X}\rightarrow\mathbb{R}$, injective in each fibre $p^{-1}(x)$ (that is, if $p(x)=p(y)$ and $f(x)=f(y)$ then $x=y$), then $p$ is a homeomorphism.

Clearly, we need to prove only that $p$ is injective, since it is already surjective, continuous and open.

-
As stated, I don't think this is true. Let $X = S^1, \tilde{X} = \mathbb{R}$, so $p : \tilde{X} \rightarrow X$ is the universal cover. Let $f : \tilde{X} \rightarrow \mathbb{R}$ be the identity. Then if $f(x) = f(y), p(x) = p(y)$, then $x = y$ trivially. –  A Blumenthal Feb 16 '13 at 18:25
@ABlumenthal: But in the hiphotesis we assume that the fibers $p^{-1}(x)$ are finite for every $x\in X$. In the universal cover of $S^1$ the fibers are infinite. –  Luiz Cordeiro Feb 16 '13 at 18:44
Note that if you need to show that $p$ is a homeomorphism, then you really just need to show that $p$ is a one-sheeted covering. I would start by assuming that the fiber $p^{-1}(x)$ has cardinality greater than one, and then try to reach a contradiction. –  Daniel Rust Feb 17 '13 at 13:34

Define $g : X \to \widetilde X$ by letting $g(x)$ be the point of $p^{-1}(x)$ on which $f$ is maximum. Since $f$ is injective on the fibres and the fibres are finite, $g(x)$ is well-defined. It is easy to see that $g$ is continuous, and so $g$ is a section of the covering map $p$. Since $\widetilde X$ is connected, this implies that $p$ is a homeomorphism (see this question for instance).
Question: Which topological spaces $Y$ have the property which $\mathbf R$ displays in this problem? I have no idea what the answer to this question might be, but it looks interesting. It breaks down to the property that every finite subset $S\subseteq Y$ has a "distinguished point" which varies continuously with $S$. For instance, does $Y=\mathbf R^2$ have this property?