The open set criterion

I'm starting to study differential geometry and my starting point is the book "Introduction to Topological Manifolds". It seems to be an appropriate choice but it does not present any solutions so, if you are willing, I ask you to review my solution to Exercise A.16.

Exercise: Prove that

"A map $\displaystyle f:M_1\rightarrow M_2$ between metric spaces is continuous if and only if the inverse image of every open set is open."

Solution:

We start off with the definitions.

- Given any set $\displaystyle M$ and a distance function $\displaystyle d:M\times M\rightarrow\mathbb{R}_{\geq 0}$ satisfying the symmetry, positivity and the triangle inequality properties we say that the pair $\displaystyle (M,d)$ defines a metric space.

- A function is continuous if and only if

$\displaystyle \forall x\in M_1\ \forall\epsilon>0\ \exists\delta>0\ d_1(x,y)<\delta\implies d_2(f(x),f(y))<\epsilon$

- A set $\displaystyle U$ is open if and only if

$\displaystyle \forall x\in U\ \exists r>0\ d(x,y)<r\implies y\in U$

- Given a function $\displaystyle f:M_1\rightarrow M_2$, the inverse image of a set $\displaystyle W\subset M_2$ is given by $\displaystyle f^{-1}(W):=\{x\in M_1: f(x)=y\text{ for some }y\in W\}$

Let us first prove that if $\displaystyle f$ is continuous and $\displaystyle U_2\subset M_2$ is open then $\displaystyle U_1:=f^{-1}(U_2)\subset M_1$ is also open, i.e.

$\displaystyle \forall x\in U_1\ \exists\ r>0 d_1(x,y)<r\implies y\in U_1$

For any $\displaystyle x\in U_1$, there exists $\displaystyle \epsilon>0$ such that $\displaystyle d_2(f(x),f(y))<\epsilon\implies f(y)\in U_2$ because we assumed $\displaystyle U_2$ to be open. From the continuity of $\displaystyle f$ we conclude that there exists $\displaystyle \delta>0$ such that $\displaystyle d_1(x,y)<\delta\implies d_2(f(x),f(y))<\epsilon$. From the definition of $\displaystyle U_1$, we have that $\displaystyle y\in U_1$. Therefore, for $\displaystyle r=\delta$ we have that $\displaystyle d(x,y)<r\implies y\in U$.

Now, we prove that if $\displaystyle U_2\subset M_2$ is open and $\displaystyle U_1:=f^{-1}(U_2)\subset M_1$ is also open then $\displaystyle f$ is continuous. Suppose that it is not, then the following holds

$\displaystyle \exists x\in M_1\ \exists\epsilon>0\ \forall\delta>0\ d_1(x,y)>\delta\land d_2(f(x),f(y))\geq\epsilon$

Therefore, for each $\displaystyle y$ such that $\displaystyle d_1(x,y)<\delta$ we have that $\displaystyle y\in U_1$, because $\displaystyle U_1$ is an open set. From the definition of $\displaystyle U_1$ we conclude that there exists $\displaystyle z=f(y)\in U_2$. Take y=x, then $\displaystyle z = f(x)$ and $\displaystyle d_2(f(x),f(x))=0$ because of the properties of the distance function, but this contradicts $\displaystyle d_2(f(x),f(y))\geq\epsilon$ and thus $\displaystyle f$ must be continuous.