One Function, Several Measurable Formulas
A function may have a different formula on each of several parts of its domain. To prove that the combined function is measurable, it is not enough to check the formulas one at a time: the pieces must also fit together measurably. The key observation is that the preimage of a Borel set is obtained by taking the preimage on each piece and then forming a finite or countable union.
Measurability here is a property of a function between measurable spaces; it does not require a measure. Unless an example says otherwise, let \((X,\mathcal{M})\) be any measurable space, and let all functions in this tutorial be real-valued. A function \(f:X\to\mathbb{R}\) is measurable if \(f^{-1}(B)\in\mathcal{M}\) for every \(B\in\mathcal{B}_{\mathbb{R}}\), the Borel sigma-algebra on \(\mathbb{R}\). When \(X=\mathbb{R}\) and \(\mathcal{M}=\mathcal{L}\), this means Lebesgue measurable as a function on the Lebesgue measurable space; it does not assert that the domain sigma-algebra is \(\mathcal{B}_{\mathbb{R}}\).
The Partition Criterion
Proof. Suppose first that \(f\) is measurable. For any \(j\in J\) and any \(B\in\mathcal{B}_{\mathbb{R}}\), the relative preimage of \(B\) under \(f|_{A_j}\) is \(A_j\cap f^{-1}(B)\). Since \(A_j\in\mathcal{M}\) and \(f^{-1}(B)\in\mathcal{M}\), this intersection belongs to \(\mathcal{M}|_{A_j}\). Thus every restriction is measurable.
Conversely, suppose each \(f|_{A_j}\) is measurable on \(A_j\). Fix \(B\in\mathcal{B}_{\mathbb{R}}\). Because the pieces are disjoint and cover \(X\), every point of \(X\) belongs to exactly one \(A_j\), and therefore \(f^{-1}(B)=\bigcup_{j\in J}\bigl(A_j\cap f^{-1}(B)\bigr)\). Each set in this union is measurable in the relative sigma-algebra on \(A_j\), so it has the form \(A_j\cap E_j\) for some \(E_j\in\mathcal{M}\), and hence belongs to \(\mathcal{M}\). The union is finite or countable, so it belongs to \(\mathcal{M}\). This holds for every Borel \(B\), proving that \(f\) is measurable. \(\square\)
This criterion also covers the common situation in which each formula is given by a measurable function \(g_j:X\to\mathbb{R}\) on all of \(X\), and \(f(x)=g_j(x)\) for \(x\in A_j\). The restriction of \(g_j\) to the measurable subspace \(A_j\) is measurable, so the theorem applies. The formulas need not agree outside their assigned pieces; those values do not define the combined function.
Worked Example: Three Formulas on Intervals
On \((\mathbb{R},\mathcal{L})\), define \(f(x)=x+2\) for \(x<0\), \(f(x)=x^2\) for \(0\le x<2\), and \(f(x)=3\) for \(x\ge2\). Verify measurability and compute \(\{x:f(x)>1\}\).
The pieces \((-\infty,0)\), \([0,2)\), and \([2,\infty)\) are Borel sets, hence belong to \(\mathcal{L}\). On the first piece the formula \(x+2\) is continuous; on the second \(x^2\) is continuous; on the third the constant formula \(3\) is continuous. Their restrictions are measurable, so the partition criterion proves that \(f\) is Lebesgue measurable.
Now calculate the strict level set on each piece. On \(x<0\), \(x+2>1\) is equivalent to \(x>-1\), giving \((-1,0)\). On \(0\le x<2\), \(x^2>1\) is equivalent to \(x>1\), giving \((1,2)\). On \(x\ge2\), the value is \(3>1\), giving \([2,\infty)\). Thus
Check: substitution gives \(f(-1)=-1+2=1\), \(f(0)=0^2=0\), \(f(1)=1^2=1\), and \(f(2)=3\). The first three values do not satisfy the strict inequality \(f(x)>1\), while \(f(2)\) does. This confirms the open lower endpoint at \(1\) and the inclusion of \(2\) in the final interval.
Pieces Defined by Level Sets
The partition pieces need not be intervals. In particular, a measurable function itself can be used to define measurable pieces. If \(g:X\to\mathbb{R}\) is measurable on \((X,\mathcal{M})\), then its level sets \(\{g\le0\}\) and \(\{g>0\}\) are measurable. They are disjoint and their union is \(X\), so they form a two-piece measurable partition. The next example uses formulas that are different on those two pieces.
Worked Example: Branching at a Measurable Level Set
Let \(g:X\to\mathbb{R}\) be measurable on an arbitrary measurable space \((X,\mathcal{M})\), and define \(f(x)=g(x)^2\) when \(g(x)\le0\), and \(f(x)=\sqrt{g(x)}\) when \(g(x)>0\). Prove that \(f\) is measurable and find \(\{x:f(x)>1\}\).
The pieces \(A=\{g\le0\}\) and \(A^c=\{g>0\}\) are measurable by the level-set properties of real-valued measurable functions. On \(A\), the formula \(g^2\) is measurable; on \(A^c\), the formula \(\sqrt{g}\) is measurable because the square-root function is continuous on \([0,\infty)\) and \(g\) is positive there. The partition criterion therefore proves that \(f:X\to\mathbb{R}\) is measurable.
On \(A\), the inequality \(f>1\) means \(g^2>1\) together with \(g\le0\). These conditions are equivalent to \(g<-1\). On \(A^c\), the inequality \(\sqrt{g}>1\) is equivalent to \(g>1\). Consequently,
Both sets on the right are measurable level sets, providing a direct check of the strict level set used to test measurability. At the boundary values, \(g=-1\) gives \(f=1\), \(g=0\) gives \(f=0\), and \(g=1\) gives \(f=1\); none of these values belongs to \(\{f>1\}\). The two strict inequalities in the displayed answer are therefore necessary.
Countably Many Interval Pieces
For countably many pieces, the proof works for the same reason as for finitely many: a sigma-algebra is closed under countable unions. It is important that the pieces cover the whole domain and that every boundary point is assigned to exactly one piece. Half-open intervals are often useful for making this assignment explicit.
Worked Example: The Fractional Part on a Countable Partition
For each integer \(k\), set \(A_k=[k,k+1)\). These sets are pairwise disjoint and their union is \(\mathbb{R}\). Define \(f:\mathbb{R}\to\mathbb{R}\) by \(f(x)=x-k\) when \(x\in A_k\). Prove that \(f\) is Borel measurable and compute \(\{x:f(x)>1/2\}\).
Each \(A_k\) is Borel, and on \(A_k\) the function \(x\mapsto x-k\) is continuous. The countable partition criterion on \((\mathbb{R},\mathcal{B}_{\mathbb{R}})\) proves that \(f\) is Borel measurable. For a point in \(A_k\), the strict inequality \(f(x)>1/2\) becomes \(x-k>1/2\). Intersecting its solution with \(k\le x<k+1\) gives \(k+1/2<x<k+1\). Taking the union over all integers yields
Check: if \(x=k+1/2\), its assigned piece is \(A_k\) and \(f(x)=k+1/2-k=1/2\), so it is excluded. If \(x=k+1\), it belongs to \(A_{k+1}\), not \(A_k\), and \(f(x)=k+1-(k+1)=0\), so it is excluded as well. If \(x=k+3/4\), then \(f(x)=k+3/4-k=3/4>1/2\), so it is included in \((k+1/2,k+1)\). These substitutions verify the endpoints and the strict inequality.
Why the Partition Hypotheses Matter
A common mistake is to check that each branch formula is simple or continuous and then conclude that the piecewise function is measurable without checking the pieces. For example, on \(([0,1],\mathcal{L})\), take a non-Lebesgue-measurable set \(V\subseteq[0,1]\) and define \(f=1\) on \(V\) and \(f=0\) on \(V^c\). Both branch formulas are constant, but the partition is not measurable. The calculation \(\{x:f(x)>1/2\}=V\) shows that \(f\) is not Lebesgue measurable. The correction is to verify that each piece belongs to the domain sigma-algebra before applying the criterion.
There is a separate issue if the pieces overlap or fail to cover the domain. If two overlapping pieces prescribe different values at the same point, the rule does not define a function there. If a point lies in no piece, the rule leaves the function undefined at that point. A valid partition resolves both problems: it assigns every point to one and only one measurable piece.
Check Your Understanding
For each question, identify the partition and use preimages or the partition criterion to justify your conclusion.
- On \((\mathbb{R},\mathcal{L})\), define \(f(x)=x\) for \(x<1\) and \(f(x)=2\) for \(x\ge1\). Compute \(\{x:f(x)>1\}\), carefully checking \(x=1\).
- If \(g:X\to\mathbb{R}\) is measurable, prove that the pieces \(\{g\le a\}\) and \(\{g>a\}\) form a measurable partition for any real \(a\).
- Let \((A_j)\) be a countable measurable partition and suppose each \(f|_{A_j}\) is measurable relative to \(A_j\). Write the preimage of a Borel set \(B\) as a countable union and conclude that \(f\) is measurable.
- For \(A_k=[k,k+1)\) and \(f(x)=x-k\) on \(A_k\), compute \(\{x:f(x)\ge1/2\}\). How does the endpoint at \(k+1/2\) differ from the strict-inequality example?
- Explain why constant branch formulas alone do not prove measurability when the branch sets have not been shown to belong to the domain sigma-algebra.