The version of Lusin's theorem that I have in my book is the following:
Let $X$ be a locally compact Hausdorff space, and let $\mu^*:\mathcal{P}(X)\rightarrow [0, \infty]$ be a Radon outer measure. Let $u: X \rightarrow \mathbb{R}$ be a measurable function and let $E \subset X$ be a $\mu^*$-measurable set with finite measure. Then, for every $\varepsilon > 0$ there exists a compact set $K\subset X$ such that $$\mu^*(E \setminus K) < \varepsilon$$ and $u: K \rightarrow \mathbb{R}$ is continuous.
I am trying to understand if we really need local compactness. I think it is possible to imitate the proof in the book by Evans and Gariepy.
Sketch: Define $B_{ij}=[\frac{j}{i}, \frac{j + 1}{i})$ and let $E_{ij} = E \cap u^{-1}(B_{ij})$ for $i \in \mathbb{N}$ and $j \in \mathbb{Z}$. Since $E_{ij}$ is measurable and $\mu^*$ is a Radon outer measure there exists a compact set $K_{ij}$ such that $\mu^*(E_{ij}\setminus K_{ij}) < \frac{\varepsilon}{2^{i+j}}$. For fixed $i$, choose finitely many of the $K_{ij}$ so that $$\mu^*(E \setminus \bigcup_{j = 1}^{N(i)} K_{ij}) < \frac{\varepsilon}{2^i}.$$ Then, $K_i$ defined as the union $\bigcup_{j=1}^{N(i)}K_{ij}$ is compact. Now let $u_i: K_i \rightarrow \mathbb{R}$ be a function such that $u_i(x) = c_{ij} \in B_{ij}$ if $x \in K_{ij}$. Since we are in a Hausdorff space, disjoint compact sets can be separated by open sets and therefore, $u_i$ is continuous. Now let $$K = \bigcap_{i = 1}^{\infty}K_i$$ and notice that $\mu^*({E \setminus K}) < \varepsilon$. Furthermore, $K$ is compact because it is a closed subset of a compact set. Finally, the $u_i$ converge uniformly on $K$ to $u$. But then $u : K \rightarrow \mathbb{R}$ must be continuous.
I believe I haven't used local compactness in my proof. Can someone tell me if I am wrong?
https://en.wikipedia.org/wiki/Lusin%27s_theorem... there is some discussion of non-locally-compact case, where you get a closed subset rather than a compact subset. – GEdgar Jul 14 '22 at 18:06