Why an Indicator Function Needs Both Sides of a Set
An indicator function has only two values, but it need not be continuous: its value changes across the boundary of the set. Lusin’s theorem says that a measurable function can be made continuous after restricting it to a sufficiently large compact subset of its domain. For an indicator, the key is to choose compact pieces from both the set and its complement. On their union, the two values occupy separated pieces, so the restriction is continuous.
Throughout, \(m\) denotes Lebesgue measure on \(\mathbb{R}\), and all sets in this tutorial are Lebesgue measurable unless stated otherwise. Let \(A\subseteq\mathbb{R}\) satisfy \(m(A)<\infty\), and let \(E\subseteq A\). The domain of the function is \(A\), with its relative topology, and \(\chi_E:A\to\{0,1\}\) is defined pointwise by \(\chi_E(x)=1\) for \(x\in E\) and \(\chi_E(x)=0\) for \(x\in A\setminus E\). Continuity on a subset \(K\subseteq A\) means continuity of the restricted function \(\chi_E|_K\) in the relative topology on \(K\).
We use the compact inner-approximation property of Lebesgue measure: if \(S\subseteq\mathbb{R}\) is measurable with \(m(S)<\infty\), then for each \(\delta>0\) there is a compact set \(C\subseteq S\) such that \(m(S\setminus C)<\delta\). This property follows from the standard outer regularity of Lebesgue measure. The needed deduction is given below so that the measure losses in the construction are explicit.
Compact Inner Approximation
Proof. Choose \(R>0\) large enough that \(m(S\setminus[-R,R])<\delta/2\). Such an \(R\) exists because the sets \(S\cap[-R,R]\) increase to \(S\) as \(R\to\infty\), and measure is continuous from below. Put \(S_R=S\cap[-R,R]\) and \(T=[-R,R]\setminus S_R\). The set \(T\) is measurable and has finite measure. By outer regularity, there is an open set \(O\supseteq T\) with \(m(O\setminus T)<\delta/2\). Define \(C=[-R,R]\setminus O\). This set is closed and bounded, hence compact. Also, \(C\subseteq S_R\subseteq S\), since every point of \([-R,R]\setminus S_R\) belongs to \(T\subseteq O\). Finally, \(S_R\setminus C=S_R\cap O\subseteq O\setminus T\), so \(m(S\setminus C)\le m(S\setminus S_R)+m(S_R\setminus C)<\delta/2+\delta/2=\delta\). Thus \(C\) has the required properties. \(\square\)
The lemma applies separately to \(E\) and to \(A\setminus E\): both are measurable and have finite measure because they are subsets of \(A\). The compact approximations need not capture every point. What matters is that the total measure omitted from the two pieces can be made as small as desired.
The Indicator-Function Theorem
Proof. Apply the lemma to \(E\) and \(A\setminus E\), choosing compact sets \(K_1\subseteq E\) and \(K_0\subseteq A\setminus E\) such that \(m(E\setminus K_1)<\varepsilon/2\) and \(m((A\setminus E)\setminus K_0)<\varepsilon/2\). Let \(K=K_1\cup K_0\). It is compact as a finite union of compact sets, and it is contained in \(A\). The sets \(E\) and \(A\setminus E\) partition \(A\), while \(K_1\) and \(K_0\) lie in their respective parts. Therefore \(A\setminus K=(E\setminus K_1)\cup((A\setminus E)\setminus K_0)\). The two sets on the right are disjoint, so \(m(A\setminus K)<\varepsilon/2+\varepsilon/2=\varepsilon\).
It remains to prove continuity. On \(K_1\), the function \(\chi_E\) equals \(1\), and on \(K_0\), it equals \(0\). If both compact sets are nonempty, they are disjoint and have positive distance: the continuous function \((x,y)\mapsto |x-y|\) attains its minimum on the compact set \(K_1\times K_0\), and that minimum cannot be zero because the sets are disjoint. Thus \(K_1\) and \(K_0\) are separated in \(K\); each is both closed and open relative to \(K\). The inverse image under \(\chi_E|_K\) of any open subset of \(\mathbb{R}\) is one of \(\varnothing\), \(K_1\), \(K_0\), or \(K\), each open in \(K\). Hence \(\chi_E|_K\) is continuous. If either compact set is empty, the restriction is constant on \(K\), so it is continuous as well. This proves the theorem, including the cases where \(A\) or one of its two pieces is empty. \(\square\)
The theorem concerns the measure lost from the domain \(A\), not the measure of \(E\) alone. The compact set may contain points from both \(E\) and \(A\setminus E\). That is what allows the restricted indicator to retain both values without a discontinuity between them.
Worked Example: An Open Interval Inside a Compact Domain
Let \(A=[0,1]\), \(E=(1/4,3/4)\), and choose \(\varepsilon=1/4\). Construct a compact \(K\subseteq A\) with \(m(A\setminus K)<\varepsilon\) on which \(\chi_E\) is continuous.
Use the compact pieces \(K_1=[5/16,11/16]\subseteq E\) and \(K_0=[0,1/4]\cup[3/4,1]\subseteq A\setminus E\). Set \(K=K_1\cup K_0\), which is compact. The omitted parts of \(A\) are the intervals between \(1/4\) and \(5/16\), and between \(11/16\) and \(3/4\), with endpoint inclusion not affecting their Lebesgue measures. Each gap has length \(5/16-1/4=1/16\), respectively \(3/4-11/16=1/16\). Therefore \(m(A\setminus K)=1/16+1/16=1/8<1/4=\varepsilon\).
On \(K_1\), the indicator is \(1\); on \(K_0\), it is \(0\). The gap between \(1/4\) and \(5/16\), and the gap between \(11/16\) and \(3/4\), each have length \(1/16>0\). Thus the two compact pieces are separated, and the restriction is continuous. Check: \(m(K_1)=11/16-5/16=6/16\), while \(m(K_0)=1/4+1/4=8/16\). Their disjoint union has measure \(14/16\), so \(m(A\setminus K)=1-14/16=2/16=1/8\), in agreement with the direct gap calculation.
Worked Example: Removing a Dense Set of Measure Zero
Let \(A=[0,1]\) and \(E=\mathbb{Q}\cap[0,1]\). Given \(\varepsilon>0\), construct a compact \(K\subseteq A\) with \(m(A\setminus K)<\varepsilon\) on which \(\chi_E\) is continuous.
Enumerate \(E\) as \(\{q_n:n\ge1\}\). For each \(n\ge1\), take the open interval \(I_n=(q_n-\varepsilon/2^{n+2},q_n+\varepsilon/2^{n+2})\), and define \(K=[0,1]\setminus\bigcup_{n\ge1}I_n\). The union of the intervals is open, so \(K\) is closed in the compact interval \([0,1]\), hence compact. Every rational \(q_n\) belongs to \(I_n\), so \(K\cap E=\varnothing\). Consequently, \(\chi_E\) is identically \(0\) on \(K\) and is continuous there.
For each \(n\), the length of \(I_n\) is \(2(\varepsilon/2^{n+2})=\varepsilon/2^{n+1}\). Countable subadditivity gives \(m(A\setminus K)\le\sum_{n=1}^{\infty}\varepsilon/2^{n+1}=\varepsilon/2<\varepsilon\). Here the series equals \(\varepsilon/2\) because \(\sum_{n=1}^{\infty}2^{-(n+1)}=1/2\). Check: \(E\) is countable and each singleton has Lebesgue measure zero, so \(m(E)=0\). The construction nevertheless makes \(K\) cover all but less than \(\varepsilon\) of the domain, and the indicator on \(K\) is exactly zero.
Worked Example: A Set with Two Components
Let \(A=[0,1]\) and \(E=[0,1/3)\cup(2/3,1]\). Choose \(\varepsilon=1/5\). Construct compact pieces from \(E\) and its complement, and calculate the measure loss.
Take \(K_1=[1/24,7/24]\cup[17/24,23/24]\) and \(K_0=[1/3,2/3]\). Both intervals in \(K_1\) lie in \(E\), and \(K_0\subseteq A\setminus E\). These are compact sets, so \(K=K_1\cup K_0\) is compact and lies in \(A\). The omitted parts of \(A\) are four intervals: from \(0\) to \(1/24\), from \(7/24\) to \(1/3\), from \(2/3\) to \(17/24\), and from \(23/24\) to \(1\). Each has length \(1/24\): for the second, \(1/3=8/24\), so \(8/24-7/24=1/24\); for the third, \(2/3=16/24\), so \(17/24-16/24=1/24\); and the first and fourth also have length \(1/24\). Thus \(m(A\setminus K)=4/24=1/6<1/5=\varepsilon\).
The indicator equals \(1\) on \(K_1\) and \(0\) on \(K_0\). The neighboring pieces are separated by gaps of length \(1/24\), so the restriction is continuous. Check: each interval in \(K_1\) has length \(7/24-1/24=6/24\), so \(m(K_1)=12/24\). Also \(m(K_0)=2/3-1/3=8/24\). Hence \(m(K)=20/24\) and \(m(A\setminus K)=24/24-20/24=4/24=1/6\), as calculated from the four gaps.
A Common Pitfall: Keeping Only the Set
A compact subset of \(E\) alone does not in general make a large compact subset of the whole domain, and simply taking the closure of \(E\) may fail to give a subset of \(E\). For example, with \(A=[0,1]\) and \(E=(0,1/2)\), the closure \([0,1/2]\) is compact but is not contained in \(E\). Moreover, \(\chi_E|_{[0,1/2]}\) is not continuous: the points \(x_n=1/(n+2)\) belong to \(E\), satisfy \(x_n\to0\), and have \(\chi_E(x_n)=1\), whereas \(\chi_E(0)=0\).
Even when a chosen compact subset is valid, omitting the complement can leave too much of the domain out. For this same example, choosing only \(K_1=[1/8,3/8]\subseteq E\) gives a continuous restriction, but \(m(A\setminus K_1)=1-(3/8-1/8)=3/4\). It does not meet, for instance, the tolerance \(\varepsilon=1/4\). The theorem’s construction avoids both problems: compact approximation inside \(E\) retains the value \(1\), compact approximation inside \(A\setminus E\) retains the value \(0\), and their union covers all but a prescribed small measure of \(A\).
Check Your Understanding
Use the theorem and the two-piece construction to answer these questions.
- Why must the finite-measure assumption be stated for the domain \(A\) in the theorem?
- For \(A=[0,1]\) and \(E=[0,1/2]\), identify compact subsets of \(E\) and \(A\setminus E\) that make \(\chi_E\) continuous on their union.
- In the proof, why is it important that \(K_1\) and \(K_0\) are disjoint compact sets?
- Explain why taking the closure of a measurable set need not produce a compact subset of that set.
- For a given \(\varepsilon>0\), how should the two compact-approximation errors be chosen so their sum is less than \(\varepsilon\)?