I am reading "Measure, Integration & Real Analysis" by Sheldon Axler.
I am afraid that my question is stupid.
Definitions in this book:
3.1 Definition $\mathcal{S}$-partition
Suppose $\mathcal{S}$ is a $\sigma$-algebra on a set $X.$ An $\mathcal{S}$-partition of $X$ is a finite collection $A_1,\dots,A_m$ of disjoint sets in $\mathcal{S}$ such that $A_1\cup\dots\cup A_m=X.$
3.2 Definition lower Lebesgue sum
Suppose $(X,\mathcal{S},\mu)$ is a measure space, $f:X\to [0,\infty]$ is an $\mathcal{S}$-measurable function, and $P$ is an $\mathcal{S}$-partition $A_1,\dots,A_m$ of $X.$ The lower Lebesgue sum $\mathcal{L}(f,P)$ is defined by $$\mathcal{L}(f,P)=\sum_{j=1}^m \mu(A_j)\inf_{A_j} f.$$
3.3 Definition integral of a nonegative function
Suppose $(X,\mathcal{S},\mu)$ is a measure space and $f:X\to [0,\infty]$ is an $\mathcal{S}$-measurable function. The integral of $f$ with respect to $\mu$, denoted $\int f d\mu$, is defined by $$\int f d\mu=\sup\{\mathcal{L}(f,P):P\text{ is an }\mathcal{S}\text{-partition of }X\}.$$
I wonder why the author requires $f$ is an $\mathcal{S}$-measurable function.
We can define the integral of $f:X\to [0,\infty]$ which is not an $\mathcal{S}$-measurable funtion.
I guess if $f$ is not an $\mathcal{S}$-measurable funtion, then the integral of $f$ doesn't have nice properties.