Given $g : N \to \mathbb{R}$ is continuous $\iff$ $g \circ f: M \to \mathbb{R}$ is continuous, Show $f : (M,d) \to (N, \rho)$ is a homeomorphism.

continuitygeneral-topologymetric-spacesreal-analysissolution-verification

I am currently finishing up a the chapter on homeomorphisms in my textbook for a class on metric spaces and before I start the next section, I wanted to have my work checked on the following problem. Note that $(M, d)$ and $(N, \rho)$ are metric spaces and $f:(M, d) \to (N, \rho)$ is bijective:

Given $g : N \to \mathbb{R}$ is continuous $\iff$ $g \circ f: M \to \mathbb{R}$ is continuous, Show $f : (M,d) \to (N, \rho)$ is a homeomorphism.

My work:


Given that $g \circ f$ is continuous, we know that this implies $g$ is continuous. Also, we know that that $f$ is continuous just by the definition of what it means for $g \circ f$ to be continuous in the first place. By the continuity of $f$, given $(x_n)$ in $M$ and a point $x \in M$: $x_n \to x$ in $M \implies$ $f(x_n) \to f(x)$ in $N$. Therefore, by continuity of $g \circ f$, $g(f(x_n)) \to g(f(x))$ in $\mathbb{R}$. However, by knowing that for every real valued continuous function on a metric space $(M,d)$, if $g(f(x_n)) \to g(f(x))$ in $\mathbb{R}$ $\implies$ $x_n \to x$ in $M$. So we get that $g(f(x_n)) \to g(f(x)) \iff x_n \to x$. So putting $f(x_n) \to f(x) \implies$ $x_n \to x$ together with $x_n \to x \implies f(x_n) \to f(x)$ (what we started with) we get $x_n \to x \iff f(x_n) \to f(x)$. So $f$ is a homeomorphism.

Is this conclusion correct? I feel as if I may have used a little too much "hand waiving", but I wanted to make sure.

Best Answer

Let $C$ be closed in $N$. Then let $g: N \to \Bbb R$ be the continuous function $g(x)=d(x,C)$. We know that $g \circ f$ is continuous and $f^{-1}[C] = (g \circ f)^{-1}[\{0\}]$ because $C = g^{-1}[\{0\}]$ and so $f^{-1}[C]$ is closed in $M$. This shows continuity of $f$. To see closedness of $f$ (which finishes the proof as $f$ is a bijection by assumption), try to apply the same idea to the inverse function of $f$.