From Munkres
Theorem 18.1. Let $X$ and $Y$ be topological spaces; let $f : X \to Y$. Then the following are equivalent:
- $f$ is continuous.
- For every subset $A$ of $X$, one has $f ( \overline{A}) \subset \overline{f(A)}$.
- For every closed set $B$ of $Y$, the set $f^{-1}(B)$ is closed in $X$.
- For each $x \in X$ and each neighborhood $V$ of $f (x)$, there is a neighborhood $U$ of $x$ such that $f (U) \subset V$.
For 4 $\Rightarrow$ 1 the proof given is
(4) $\Rightarrow$ (1). Let $V$ be an open set of $Y$; let $x$ be a point of $f^{-1}(V)$. Then $f (x) \in V$, so that by hypothesis there is a neighborhood $U_x$ of $x$ such that $f (U_x ) \subset V$. Then $U_x \subset f^{-1}(V)$. It follows that $f^{-1}(V)$ can be written as the union of the open sets $U_x$, so that it is open.
I am not sure how the last statement follows. The mere fact that each $U_x \subset f^{-1}(V)$ need not imply that $f^{-1}(V)$ can be written as the union of those $U_x$ isnt it? What am I missing?
For each $x \in f^{-1} (V)$ there exists $U_x$ open such that $x\in U_x \subset f^{-1}(V)$. To show that $\cup_{x\in f^{-1}(V)} U_x=f^{-1}(V)$ verify that each side is contained in the other. Since each $U_x$ is contained in $f^{-1}(V)$ we get LHS contained in RHS. For the other way, if $y \in f^{-1}(V)$ then $U_y$ is one of the open sets whose union is LHS, so $y \in U_y \subset LHS$.