Integral of borel function wrt to measure Let $(\Omega,\mathscr{F},v)$ be some measure space. Consider the non-negative simple function $l:\Omega \rightarrow R$ given by:
$$l(\omega)=\sum _{i=1}^k a_i I_{A_{i}}(\omega)$$
Where $a_i\in R_+, A_i\in\mathscr{F}$, and $I_{A_{i}}$ is the indicator function for $A_i$
Definition 1: Integral of a non-negative simple function $l$ wrt to a measure $v$ is given by:
$$\int l~dv = \sum_{i=1}^k a_i v(A_i)$$
Definition 2: Integral of some non-negative Borel measurable function $f:\Omega\rightarrow R$ with respect to measure $v$ is given by:
$$\int f~dv= \sup\left\{\int l~dv: l \in S_f \right\}$$
Where $S_f$ is a collection of non-negative simple functions satisfying $l(\omega) \leq f(\omega)$ $\forall\omega\in\Omega$.
Consider some non-negative simple function $l'$. I am aware all simple functions as defined above are Borel measurable. So how do I reconcile definition 1 and 2? That is, how do I prove that:
$$\sup\left\{\int l~dv: l \in S_{l'} \right\} = \sum_{i=1}^{k'} a_i' v(A_i')$$
Where $l'(\omega)=\sum _{i=1}^{k'} {a_i'} I_{A_{i}'}(\omega), a_i'\in R_+, A_i'\in\mathscr{F}$ and $S_{l'}$ is the collection of non-negative simple functions satisfying $l(\omega)\leq l'(\omega)$ $\forall \omega\in \Omega$
 A: Hint: Supose you haev $l=\sum _{i=1}^k a_i I_{A_{i}}(\omega)$ and $l=\sum _{i=1}^m b_i I_{B_{i}}(\omega)$ with $l \leq l'$. Consider the collection $\{A_i\cap B_j : 1 \leq i \leq k, 1 \leq j \leq m\}$. Write this as $\{C_1,C_2,...,C_n\}$. Then we can write $l(\omega)=\sum _{i=1}^n c_i I_{C_{i}}(\omega)$ and $l'(\omega)=\sum _{i=1}^n d_i I_{C_{i}}(\omega)$ for some $c_i$'s and $d_i$'s. We now have $c_i \leq d_i$ for $1 \leq i \leq n$ and this gives $\sum _{i=1}^n c_i v(C_{i}) \leq \sum _{i=1}^n d_i v(C_{i})$. If $f=l'$ is  a simple function then supremum in the second definition is attained when $l=l'$.
A: Definition $1$ as stated in your answer should at least be accompanied with a proof that it is well-defined, i.e. that $\sum_{i=1}^ka_i1_{A_i}=\sum_{j=1}^mb_j1_{B_j}$ implies that $\sum_{i=1}^ka_i\nu(A_i)=\sum_{j=1}^mb_j\nu(B_j)$.
Let us go for a definition with the same strength that avoids that:
Let $l$ be a measurable function with finite range $\{a_1,\dots,a_k\}\subseteq\mathbb [0,\infty)$ where the $a_i$ are demanded to be distinct.
Then according to our new definition $1$: $$\int ld\nu:=\sum_{i=1}^ka_i\nu(A_i)\text{ where }A_i=l^{-1}(\{a_i\})\text{ for }i=1,\dots,k$$
If similarly $l'$ is a measurable function with finite range $\{b_1,\dots,b_m\}\subseteq\mathbb [0,\infty)$ where the $b_j$ are demanded to be distinct and moreover $l'(\omega)\leq l(\omega)$ for every $\omega\in\Omega$ then it is essential to prove in this context that $\int l'd\nu\leq\int ld\nu$.
For this observe that:$$\int l'd\nu=\sum_{j=1}^{m}b_{j}\nu\left(B_{j}\right)=\sum_{j=1}^{m}\sum_{i=1}^{k}b_{j}\nu\left(A_{i}\cap B_{j}\right)$$$$\leq\sum_{j=1}^{m}\sum_{i=1}^{k}a_{i}\nu\left(A_{i}\cap B_{j}\right)=\sum_{i=1}^{k}\sum_{j=1}^{m}a_{i}\nu\left(A_{i}\cap B_{j}\right)=\sum_{i=1}^{k}a_{i}\nu\left(A_{i}\right)=\int ld\nu$$
Here $B_j$ denotes the inverse image of $\{b_j\}$ w.r.t $l'$ and the inequality is justified by the fact that $b_{j}=l'\left(\omega\right)\leq l\left(\omega\right)=a_{i}$
whenever $\omega\in A_{i}\cap B_{j}$. If no such $\omega$ exists
then $A_{i}\cap B_{j}=\varnothing$ and consequently $\nu\left(A_{i}\cap B_{j}\right)=0$, and in that case the corresponding terms on both sides fall out.

Now it can easily be proved that the two definitions reconcile.
