[Math] A function continuous on each set of a countable collection of closed subsets, whose union is the domain, may not be continuous

continuitygeneral-topology

Let $\{A_\alpha\}$ be a collection of subsets of some topological space $X$ s.t. $X=\cup_{\alpha}A_\alpha.$ Let $f:X\to Y$, where $Y$ is some other topological space. Suppose that $f|A_\alpha$ is continuous for each $\alpha$. Find an example where the collection $\{A_\alpha\}$ is countable and each $A_\alpha$ is closed, but $f$ is not continuous. [Munkres Topology 2/e, 18.9(b), section 18, exercise 9, page 112]

Best Answer

I think the following example also works [I would be glad to hear any feedback].

Let $X=[0, 1]$ be equipped with subspace topology inherited from the standard topology of $\mathbb{R}$. Let $A_{0}=\{0\}$, and $A_{n}=[\frac{1}{n}, 1]$ for each positive integer $n$. Note that $A_{i}$ is closed for each $i\geq 0$ and that $X=\bigcup_{n\geq 0} A_{n}$. Define $f: X\to\mathbb{R}$ by $$ f(x)=\begin{cases} 0 &\textrm{if } x=0 \\ 1 &\textrm{if } x\neq 0 \end{cases} $$ Then $f$ restricted to $A_{i}$ is continuous for each $i$ (Namely, for $i=0$, it is the constant function $0$, and for $i\neq 0$ it is the constant function $1$). On the other hand, $f$ is not continuous because inverse image of $(-\frac{1}{2},\frac{1}{2})$ under $f$ is $\{0\}$ which is not open in $X$.

Related Question