# locally injective and continuous surjective function it´s homeomorphism

Let $f:M\to N$ be continuous and locally injective. If M is connected and exist a continuous function $g:N\to M$ such that $fg= id_N$ then f is a homeomorphism from M to N.

First clearly f is surjective, since exist a right inverse. But I don't know how to proceed. I don't know how to prove the injectivity.

This problem it's from a book of metric spaces, maybe the hyphotesis also holds for general topological spaces, I'm not sure.

-
For topological spaces, the result can only be true if $M$ is assumed Hausdorff. Else the projection of the real line with origin doubled onto the real line gives a counter-example. If $M$ is Hausdorff I think you can prove the result by first showing that $g$ is a local homeomorphism but I haven't written down a detailed proof, so I don't guarantee the result. –  Georges Elencwajg May 2 '12 at 18:28
can you guide me with the proof please >.<? –  Arkj May 2 '12 at 20:32
Dear Arkj, I would start with fixing a point $n\in N$ and consider an open neighbourhood $I$ of $g(n)$ on which $f$ is injective. By suitably shrinking $I$ to $I'$ I would try to show that $g$ restricts to a homeomorphism from $g^{-1}(I')$ to $I'$ (with inverse $f$ of course). The difficulty is to keep a precise book-keeping of the shrinkings... –  Georges Elencwajg May 2 '12 at 21:03