Solution (source code)

= Solution

For a <Borel set> $B$ and $\epsilon>0$, <inner regularity> supplies a <compact set> $K\subseteq B$ with $\mu(B)-\mu(K)<\epsilon/2$. Independently, <outer regularity> supplies an <open set> $U\supseteq B$ with $\mu(U)-\mu(B)<\epsilon/2$. Because $K\subseteq U$ and the <measure> is finite,
$$
\mu(U\setminus K)=\mu(U)-\mu(K)<\epsilon.
$$
This creates an arbitrarily small measurable transition region between a compact inner approximation and an open outer approximation. The cutoff in the next step then approximates $\mathbf1_B$, rather than merely approximating the number $\mu(B)$.