provide a counterexample and then state when the conclusion does hold.
Thought
Analyzing Lusin's theorem
Lusin's theorem says that for measurable functions with finite measure domains, for any ε, there exists a continuous function that approximates the original function almost everywhere, except potentially on a set of small measure. However, the Dirichlet function (which is the characteristic function of rationals) isn't continuous, but it is measurable. Its discontinuities are everywhere, yet it can still be approximated by continuous functions except on a measure-zero set. I need to make sure I have all these conditions properly accounted for.
Considering the Dirichlet function
I'm thinking through the Dirichlet function. It’s a bit tricky, but I think that for a continuous function g, the difference between f(x) and g(x) should only be nonzero on a measure-zero set. With the Dirichlet function, it’s 0 on irrationals (which have full measure) and 1 on rationals, which have measure zero. So, choosing g(x)=0 aligns with the theorem, and the function and g would coincide almost everywhere. Actually, this means it's not a valid counterexample! I need a different example.
Finding a function for Lusin's theorem
I need to find a function that's measurable but not equal almost everywhere to any continuous function. Continuous functions are Borel measurable and have the intermediate value property, so I need one that goes against that. I've tried functions like the Dirichlet function and Cantor set characteristic function, but they don't quite work as counterexamples. I consider functions with discontinuities, like a step function with a jump at 0. I wonder if a step function can work, where the continuous function differs only on a measure-zero set.
Designing a counterexample to Lusin's theorem
I'm trying to find a counterexample to Lusin's theorem. For any measurable function, I need to find a measurable function that differs from a continuous function on a set of positive measure, something not achievable with continuous functions. A step-function or characteristic function with discontinuities could work, but continuous functions like a Heaviside approximation don't fit here. I might use something involving sets like the Cantor set or Vitali set, but they don't quite match the conditions needed. This is tricky!
Exploring a counterexample for Lusin's theorem
I'm investigating whether certain measurable functions can be approximated by continuous functions. A key example is a step function, defined as 0 for negative values and 1 for positive values. This function can't have a continuous counterpart that matches it almost everywhere because of discontinuities at 0. The conclusion holds when the function is "essentially continuous" or its set of discontinuities has measure zero, but this classification is subtle and more complex than expected. I'll refine my understanding around functions like these.
Thought for 2m 41s
Answer
Counter‑example (the statement is false in general)
Define
f(x)={0,1,x≤0,x>0.
f is Lebesgue–measurable on R.
Assume there were a continuous g∈C(R) with
m({x∈R:∣f(x)−g(x)∣>0})=0,(∗)
i.e. f(x)=g(x) for a.e. x.
Because (−∞,0) and (0,∞) both have positive measure, (∗) forces
g(x)=0 for a.e. x<0;
g(x)=1 for a.e. x>0.
Choose sequences xn↑0 with xn<0 and yn↓0 with yn>0 that avoid the measure‑zero exceptional sets.
By continuity,
g(0)=n→∞limg(xn)=0,g(0)=n→∞limg(yn)=1,
a contradiction.
Hence no such g exists, so the conclusion fails for this simple “Heaviside” function.
When does a continuous representative exist?
A measurable f:R→R has a continuous representative g (that is, there is g∈C(R) with f=g a.e.) iff
there is a null set N⊂R such that
f is continuous on R∖N;
every point of N is a removable discontinuity, i.e. x→x0limf(x) exists and is finite for each x0∈N.
Indeed, if those two conditions hold, set
g(x)=⎩⎨⎧f(x),t→xlimf(t),x∈/N,x∈N,
then g is continuous on all of R and g=f outside the measure‑zero set N.
Conversely, if such a g exists, f equals a continuous function except on a null set, so f must already satisfy the two conditions above.
(A common phrasing is: f is “essentially continuous” – it can be made continuous by altering it on a set of measure 0 – iff it admits an a.e. continuous representative.)