# If $L(x)\le f(x) \le U(x)$ and $L(x)=U(x)$ almost everywhere, then $f$ is measurable?

I had some difficulty understanding Theorem 11.33 of Rudin's Principles of Mathematical Analysis. It has to do with the following question:

Suppose $L$ and $U$ are measurable functions on $X$. If $L(x)\le f(x) \le U(x)$, and $L(x)=U(x)$ almost everywhere, does this imply that $f$ is measurable?

Does the answer change if $X$ is a real interval $[a,b]$ and the measure is Lebesgue measure?

How do we prove these? (The answer to the second question is yes according to Rudin, and is used in the proof of Theorem 11.33, but it's not evident to me why this is true.) Thanks a lot!

• If $L(x)\le f(x)\le U(x)$ everywhere, and $L(x)=U(x)$ almost everywhere, then $f(x)=U(x)$ almost everywhere. If $U(x)$ is measurable, and $f(x)=U(x)$ almost everywhere, then $f(x)$ is measurable. – bof May 16 '17 at 3:11
• Sorry, I was thinking of Lebesgue measure. – bof May 16 '17 at 3:35
• Of course, if $L(x)\le f(x)\le U(x)$ everywhere, where $L(x)$ is identically zero, and $U(x)$ is the characteristic function of the Cantor set, then $f(x)$ does not have to be Borel measurable. – bof May 16 '17 at 3:39
• Thanks a lot, @bof, for the pointers! So it appears that the key for a positive answer to the 2nd question is the fact that every subset of a zero measure set is measurable and has zero measure, as explained in this post: math.stackexchange.com/questions/510289/…. – syeh_106 May 16 '17 at 3:56
• The issue with the first is that if a measure is not complete then a subset of a set of measure zero may not be measurable. The Lebesgue measure is complete hence, in this case, we know that $f$ is measurable. – copper.hat May 16 '17 at 5:17