[Math] Continuity of functions from Cantor sets

cantor setgeneral-topologymeasure-theory

I was asked as a homework problem to decide whether for an interval $[a,b]$ and measurable function $f:[a,b] \to \mathbb{C}$ there exists for every $\varepsilon>0$ a compact subset $K$ such that $\lambda([a,b]\backslash K)< \varepsilon$ and such that $f$ restricted to $K$ is continuous ($\lambda$ is the usual Lebesgue measure). I thought of attacking this problem by letting $K$ be a suitably dense fat Cantor set, the denseness depending on $\varepsilon$. My motivation is as follows:

The Cantor set (and unless I'm mistaken, all fat Cantor sets too) is totally disconnected, hence around every point in the set there is some small open neigborhood separating it from the rest of the set. Then any singleton consisting of a point in the Cantor set will be open in the subspace topology, and any function from the Cantor set will thus be forced to be continuous.

Thus, by just choosing a Cantor set fat enough, I will have proved the problem in the positive (and even skipped the measurability condition on the function $f$). The main question of this post is thus: does my reasoning above make sense? Or have I missed something?

Best Answer

Yes, the Cantor set is totally disconnected. It does not follow (and it's not true) that every point is isolated. Not every function defined on the Cantor set is continuous.

You could use a Cantor-set-ish construction. This being just a hint, suppose $0\le f < 1$. Let $A_0$ be the set where $0\le f<1/2$ and $A_1$ the set where $1/2\le f<1$.

Choose compact sets $K_j\subset A_j$ of almost full measure. Now let $A_{0,0}=\{x\in K_0:0\le f(x)<1/4\}$ and $A_{0,1}=\{x\in K_0:1/4\le f<1/2\}$...