Tutorials › Real Analysis › Changing Functions on Null Sets

Lebesgue Integration · Tutorial 873 of 1000

Changing Functions on Null Sets

See why null-set changes leave integrals unchanged when the altered function is measurable, and why completeness matters for measurability.

Advanced 9 min read

What You'll Learn

  • Define a modification of a function on a measurable null set
  • Prove that completeness preserves measurability after an arbitrary null-set change
  • Identify why measurability can fail on an incomplete measure space
  • Establish that a measurable null-set modification preserves integrability and the integral
  • Distinguish integral invariance from preservation of pointwise properties

What Can Change on a Null Set?

In the previous tutorial, equality almost everywhere was treated as an equivalence relation, and we saw that equal-almost-everywhere integrable functions have the same integral. A natural next question is whether changing a function on a null set always produces another measurable, integrable function. The answer separates into two issues: measurability depends on the measure space, while the integral is unchanged once the altered function is measurable.

The distinction matters because measurability is a condition on preimages of Borel sets. Changing values on a null set can change those preimages by arbitrary subsets of that set. Completeness ensures that all such subsets are measurable. Without completeness, an arbitrary change need not preserve measurability.

Definition: Let \((X,\mathcal{F},\mu)\) be a measure space, and let \(N\in\mathcal{F}\) be a null set. A function \(g:X\to\mathbb{R}\) is a modification of \(f:X\to\mathbb{R}\) on \(N\) if \(g(x)=f(x)\) for every \(x\in X\setminus N\). The values of \(g\) on \(N\) may differ from those of \(f\).

This definition allows the functions to agree at some points of \(N\) as well. It only requires that every disagreement be contained in the specified null set. In the language of the previous tutorial, \(f=g\) almost everywhere.

Completeness Guarantees Measurability

A measure space is complete if every subset of every measurable null set belongs to \(\mathcal{F}\). Lebesgue measure is complete, as established in the Completeness of Lebesgue Measure theorem. On a complete space, the altered values can be arbitrary real numbers: even if they cause a preimage to acquire an arbitrary subset of \(N\), that subset remains measurable.

Theorem (Measurability Under Null-Set Modification): Let \((X,\mathcal{F},\mu)\) be a complete measure space. Suppose \(f:X\to\mathbb{R}\) is measurable, \(N\in\mathcal{F}\) is null, and \(g:X\to\mathbb{R}\) satisfies \(g=f\) on \(X\setminus N\). Then \(g\) is measurable.

Proof. Let \(B\subseteq\mathbb{R}\) be any Borel set. Since \(g=f\) outside \(N\), the preimage of \(B\) can be written as $$ g^{-1}(B) = \bigl((X\setminus N)\cap f^{-1}(B)\bigr) \cup \bigl(N\cap g^{-1}(B)\bigr). $$ The first set is measurable because \(f\) is measurable and \(X\setminus N\in\mathcal{F}\). The second set is a subset of \(N\). Since the space is complete and \(N\) is a measurable null set, that subset is measurable as well. Therefore \(g^{-1}(B)\in\mathcal{F}\) for every Borel set \(B\), which is precisely the measurability of \(g\).

Worked Example: Changing One Value of a Continuous Function

On \([0,1]\) with Lebesgue measure, let \(f(x)=x^2\), and define $$ g(x)= \begin{cases} 1000,&x=\frac13,\\ x^2,&x\ne\frac13. \end{cases} $$ The singleton \(N=\{\frac13\}\) is a null set. The function \(f\) is measurable, and Lebesgue measure is complete, so the theorem shows that \(g\) is measurable. Both functions are bounded on \([0,1]\), hence integrable.

They agree outside \(N\), so they are equal almost everywhere. Their common integral is $$ \int_{[0,1]}f\,d\lambda = \int_0^1x^2\,dx = \left[\frac{x^3}{3}\right]_0^1 = \frac13. $$ The changed value makes \(g\) discontinuous at \(1/3\), but it does not change the integral. This illustrates that null-set modifications preserve neither continuity nor pointwise values in general.

Why Completeness Cannot Be Omitted

On an incomplete space, the preimage argument still gives a useful formula, but it no longer guarantees that the second set is measurable. A subset of a null set may fail to belong to the sigma-algebra. Thus, a measurable function can have a nonmeasurable modification, even when the modification differs from it only on a measurable null set.

Worked Example: A Nonmeasurable Modification on an Incomplete Space

Let \(X=[0,1]\), let \(\mathcal{F}\) be the Borel sets of \([0,1]\), and let \(\mu\) be Lebesgue measure restricted to \(\mathcal{F}\). This measure space is not complete: the middle-thirds Cantor set \(C\) is Borel and has measure zero, but it has subsets that are not Borel. Choose such a subset \(S\subseteq C\), and define \(f(x)=0\) and \(g(x)=\mathbf{1}_S(x)\).

The function \(f\) is Borel measurable. The functions agree outside \(C\), so \(g\) is a modification of \(f\) on the measurable null set \(C\). But $$ g^{-1}(\{1\})=S, $$ which is not Borel. Therefore \(g\) is not measurable on this measure space. The obstruction is not the size of the set of changes; it is the failure of completeness.

There is no contradiction with the earlier result that subsets of null sets are measurable for Lebesgue measure on \(\mathbb{R}\). That result uses completeness. In this example, the sigma-algebra contains only the Borel sets, and the restricted measure does not automatically include every subset of every Borel null set.

Measurable Null-Set Changes Preserve Integrability

Once the altered function is known to be measurable, the integral behaves as expected. In fact, the functions have the same absolute value outside the exceptional null set. The Monotonicity Under Almost-Everywhere Order theorem, applied in both directions, then gives equality of the integrals of their absolute values. This establishes integrability of the modification; the Invariance of the Integral Under Almost-Everywhere Equality theorem then identifies their integrals.

Theorem (Integrability and Integral Under Null-Set Modification): Let \(f,g:X\to\mathbb{R}\) be measurable functions on a measure space. If \(f\) is integrable and \(f=g\) almost everywhere, then \(g\) is integrable and $$ \int_X g\,d\mu=\int_X f\,d\mu. $$

Proof. Since \(f=g\) almost everywhere, \(|f|=|g|\) almost everywhere. Both absolute-value functions are nonnegative and measurable. Thus \(|f|\leq |g|\) almost everywhere and \(|g|\leq |f|\) almost everywhere. Applying Monotonicity Under Almost-Everywhere Order to each inequality gives $$ \int_X |f|\,d\mu\leq\int_X |g|\,d\mu \quad\text{and}\quad \int_X |g|\,d\mu\leq\int_X |f|\,d\mu. $$ Consequently, $$ \int_X |g|\,d\mu=\int_X |f|\,d\mu<\infty. $$ The finiteness criterion for integrability now shows that \(g\) is integrable. Since both functions are integrable and equal almost everywhere, Invariance of the Integral Under Almost-Everywhere Equality gives $$ \int_Xg\,d\mu=\int_Xf\,d\mu. $$ This proves the result.

Worked Example: An Unbounded Modification on the Cantor Set

Let \(C\subseteq[0,1]\) be the middle-thirds Cantor set, which has Lebesgue measure zero, and choose \(c_0\in C\). Define $$ g(x)= \begin{cases} 0,&x=c_0,\\ \frac{1}{|x-c_0|},&x\in C\setminus\{c_0\},\\ x^2,&x\in[0,1]\setminus C. \end{cases} $$ This is a finite-valued function at every point. It is measurable: on \(C\setminus\{c_0\}\), it is the restriction of the Borel function \(x\mapsto1/|x-c_0|\), and the pieces in the definition are Borel sets. Because points of \(C\) distinct from \(c_0\) can be chosen arbitrarily close to \(c_0\), \(g\) is unbounded.

Nevertheless, \(g=f\) outside \(C\) for \(f(x)=x^2\). The function \(f\) is integrable, and the theorem shows that \(g\) is integrable with the same integral: $$ \int_{[0,1]}g\,d\lambda = \int_{[0,1]}x^2\,d\lambda = \frac13. $$ Unboundedness alone does not prevent integrability. Here the large values occur only on a null set, so they do not affect the integral.

What Null-Set Invariance Does—and Does Not—Say

There are two logically separate conclusions. Completeness guarantees that an arbitrary real-valued change on a measurable null set preserves measurability. Given measurability, equality almost everywhere guarantees that integrability and the integral are preserved. On a noncomplete space, one may still use the second conclusion whenever the modified function is independently known to be measurable; completeness is not needed for the integral theorem itself.

A common pitfall is to conclude that every function obtained by changing a measurable function on a null set is measurable. That assertion requires completeness. Another is to conclude that a null-set modification preserves all useful properties of a function. The examples show otherwise: a modification can destroy continuity or boundedness while leaving the integral unchanged. The integral ignores null-set differences, but pointwise properties need not.

In Lebesgue integration, completeness makes it safe to choose convenient representatives of an almost-everywhere equivalence class: arbitrary finite values may be assigned on an exceptional null set without losing measurability. For integration, those representatives are interchangeable once they are measurable. This is the practical content of changing functions on null sets.

Key takeaway: On a complete measure space, every real-valued modification of a measurable function on a measurable null set remains measurable. If the modified function is measurable and the original is integrable, then the modified function is integrable and has the same integral, even if pointwise properties such as continuity or boundedness change.

Check Your Understanding

Use the measurability and integrability results in this tutorial to answer the following questions.

  1. In the proof of measurability under null-set modification, why is the part of a preimage inside \(N\) measurable on a complete space?
  2. Which step in the example on the Borel sigma-algebra fails if one tries to prove that \(g\) is measurable?
  3. Why does a measurable modification of an integrable function remain integrable?
  4. Can a null-set modification turn a bounded function into an unbounded one without changing its integral? Explain using the Cantor-set example.
  5. Does completeness need to be assumed in order to conclude equal integrals once both functions are integrable and equal almost everywhere?