Are “locally continuous” functions continuous

continuitygeneral-topology

Let $A$ and $B$ be topological spaces and $f : A \rightarrow B$ be a function.

I call $f$ locally continuous if every $a \in A$ has an open neighborhood $U \subseteq A$ with the property that $f : U \rightarrow B$ is continuous.

Obviously, if $f$ is continuous, then it is locally continuous: if $X \subseteq B$ is open, then $f^{-1}(X) \subseteq A$ is open, and so is $f^{-1}(X) \cap U$ for any open set $U \subseteq A$.

Is every locally continuous function also continuous?

Best Answer

YES.

It suffices to show that if $W\subset B$ is open in $B$ then $f^{-1}[W]$ is open in $A$.

We know that, for every $x\in A$, there exists an open $U_x\subset A$, $x\in U_x$, such that $f^{-1}[W]\cap U_x$ is open in $U_x$ and hence it is open in $A$. But $\bigcup_{x\in A}U_x=A$ and hence $$ f^{-1}[W]=\bigcup_{x\in A} f^{-1}[W]\cap U_x. $$ The right hand side is an union of open sets, and hence open.