In a book that I’m reading, the author presents two versions of Lusin’s theorem:
Let $X$ be a topological space with a regular measure $\mu$, and $Y$ to be second countable (i.e., admits a countable family $(B_i)_i$ Of open sets such that for any open set $B \subset Y$, we can represent $B$ as an union of $B_i$’s).
Weak Lusin - Under the above assumptions, if $f: X \to Y$ is measurable, then, for every $\epsilon>0$ there exists a compact set $K\subset X$ s.t $\mu(K^c) <\epsilon$ and $f \mid_K $ is continuous.
Strong Lusin - Under the same assumptions, if $f:X\to \mathbb R^d$ measurable, then for every $\epsilon>0$ there exists a compact set $K\subset X$ and a continuous function $g:X\to \mathbb R^d$ s.t $\mu(K^c) <\epsilon$ and $f=g$ on $K$.
The thing is, these two seem very similar to me. I can’t quite comprehend how the existence of a function $g$ coinciding with a function $f$ on $K$, differs from having a continuous function $f$ only on $K$. Is the different mainly due to the fact that exists a function $g$ continuous? Another different seems to be the change in the space $Y$. The strong version is restricted to $\mathbb R^d$.
Can anyone clarify the difference in this two versions? Perhaps present a counterexample.