# Continuity of functions from Cantor sets

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?

• Probably the intention is that you take a look at Lusin's theorem. Mar 9, 2016 at 13:12
• Ok, thanks for the hint. Mar 9, 2016 at 13:13
• Oh, upon looking up Lusin's theorem, it literally says exactly what was asked for in the problem…shucks… Mar 9, 2016 at 13:27

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\}$...
• @A.Sh, map $0$ to $0$ and everything else to $1$. Mar 9, 2016 at 13:20
• @A.Sh What Carsten said. Look, you know that $0$ is in the Cantor set and that $1/3^n$ is also in the Cantor set for $n=1,2,\dots$. So $0$ is not an isolated point (in fact sort of the whole point to the Cantor set is it's totally disconnected with no isolated point). Mar 9, 2016 at 13:22