Discontinuous function whose restriction on closed sets is continuous

952 Views Asked by At

Let $X$ a metric space, $\{U_i\}$ a collection of non-empty closed sets whose union is all of $X$. Give an example of a function $f:X\rightarrow \mathbb{R}$ such that the restriction $f|_{U_i}$ is continuous for all $i$ but $f$ is not continuous.

I was thinking for a step function and consider $X=[0,1]\subset \mathbb{R}$ with the induced metric, $U_i=[i/n,(i+1)/n]$ for $i=0,\dots,n-1$, but it seems that this type of example doesn't work.

2

There are 2 best solutions below

0
On BEST ANSWER

For $X=\mathbb{R}$ take the closed sets $U_0=(-\infty,0]$ and $U_i=[\frac{1}{i},\infty)$ where $i$ is a positive integer.

Take the function prescribed by $x\mapsto1$ if $x>0$ and $x\mapsto0$ otherwise.

The restricted functions are even constant (so continuous for every topology on $\mathbb R$) and if $\mathbb R$ is equipped with e.g. its usual metrizable topology then the function is evidently not continuous at $0$.

0
On

As $X$ is a metric space, the points are closed, so take $X=\mathbb{T}$ for example, any non-countinuous function $f$ and let $U_x = \{x\}$ for all $x\in X$. It is trivial that the restrictions are continuous but $f$ is not.