Simple function (source code)

= Simple function
{title2=$s=\sum_{j=1}^m a_j\mathbf1_{A_j}$}
{wiki}

A simple function is a <measurable function> whose <image> is a <finite set>. Its value sets $A_j=\{x:s(x)=a_j\}$ form a finite <measurable partition>. For nonnegative $a_j$, its <Lebesgue integral> is $\sum_ja_j\mu(A_j)$, with the convention $0\cdot\infty=0$. The pieces need not be intervals, or even <connected> <sets>. See https://ocw.mit.edu/courses/18-102-introduction-to-functional-analysis-spring-2021/ebbbc59aa40252dff3d4ec766c057451_MIT18_102s21_lec10.pdf[MIT lecture 10, Definitions 100 and 106].

For example, on $[0,1]$ let $s$ be $2$ on $[0,1/4)$, $1$ on $[1/4,3/4)$, and $0$ on $[3/4,1]$. Its <Lebesgue integral> is $2(1/4)+1(1/2)=1$. Its <superlevel sets> have <Lebesgue measure> $3/4$ for $0\leq t<1$, $1/4$ for $1\leq t<2$, and $0$ thereafter. The <layer cake representation> gives the same answer: $(3/4)(1)+(1/4)(1)=1$. These two calculations are the building blocks of the general <Lebesgue integral>.