Step 1 (Truncation). For each natural number nā„1 define gnā:Xā[0,ā] by gnā(x)=min(g(x),n). Each gnā is measurable in the sense of that definition: for real a, {gnā>a}={g>a} if a<n and {gnā>a}=ā
if aā„n. The sequence (gnā)nā is nondecreasing pointwise with supnāgnā(x)=g(x) for every x (if g(x)<ā then gnā(x)=g(x) for all nā„g(x); if g(x)=ā then gnā(x)=nāā). By the monotone convergence theorem, ā«Xāgnādμāā«Xāgdμ<ā.
Step 2 (Small tail). Define hnā:Xā[0,ā] by hnā(x)=g(x)āgnā(x), with the convention āān=ā; then hnā is measurable in the same sense, since for aā„0 we have {hnā>a}={g>n+a} and for a<0 we have {hnā>a}=X. Pointwise g=gnā+hnā, so by additivity of the integral for nonnegative measurable functions (Linearity and Monotonicity of the Lebesgue Integral),
ā«Xāgdμ=ā«Xāgnādμ+ā«Xāhnādμ.
All three integrals are finite (the first is finite by hypothesis and the others are dominated by it, using monotonicity from Linearity and Monotonicity of the Lebesgue Integral), so ā«Xāhnādμ=ā«Xāgdμāā«Xāgnādμā0 by Step 1.
Step 3 (Conclusion of the main claim). Let ε>0. Choose nā„1 with ā«Xāhnādμ<ε/2 and set Ī“=ε/(2n). Let AāF with μ(A)<Ī“; the product 1Aāg is measurable by the computation recorded in the statement. We claim the pointwise bound
1Aā(x)g(x)Ā ā¤Ā n1Aā(x)+hnā(x)(xāX).
Indeed, if g(x)ā¤n then 1Aā(x)g(x)ā¤n1Aā(x) and hnā(x)=0; if g(x)>n then gnā(x)=n, so 1Aā(x)g(x)ā¤g(x)=n+hnā(x)ā¤n1Aā(x)+hnā(x) when xāA, while for xā/A the left side is 0. By monotonicity and additivity (Linearity and Monotonicity of the Lebesgue Integral), and since n1Aā is a simple function with integral nμ(A),
ā«Xā1Aāgdμ ā¤Ā nμ(A)+ā«Xāhnādμ <Ā nĪ“+ε/2Ā = ε.
Step 4 (Interval form). Now let Ī», a<b, and g be as in the second claim. The function gā²=1(a,b]āg is measurable ({gā²>u}=(a,b]ā©{g>u} for uā„0, and {gā²>u}=R for u<0; the interval (a,b] is a Borel set) and has finite integral by hypothesis. Apply the main claim on the measure space (R,B(R),Ī») to gā² and ε, obtaining Ī“>0. For aā¤sā¤tā¤b with tās<Ī“, the set A=(s,t] is Borel with Ī»(A)=tās<Ī“ by Existence of Lebesgue Measure on the Real Line (Lebesgue measure assigns to an interval its length). Since (s,t]ā(a,b], we have 1(s,t]āg=1Aāgā² pointwise, and therefore
ā«Rā1(s,t]āgdĪ»=ā«Rā1Aāgā²dĪ»<ε.ā”