Let $f:\mathbb{R}\to [0,\infty]$ be a measurable function and $A\subset \mathbb{R}$. Then, show that
\begin{equation} \int\limits_{A}f=\int\limits_{\mathbb{R}}f{1}_A \tag{1} \end{equation}
where ${1}_A$ is the characteristic function of $A$ defined as
\begin{equation} {1}_A(x)=\begin{cases}1 & \text{if $x\in A$,} \\ 0 &\text{if $x\notin A$.} \end{cases} \tag{2} \end{equation}
and $\int\limits_{A}f$ is the Lebesgue integral of $f$ on $A$ defined as:
\begin{equation} \int\limits_{A}f=\sup\left\{\int\limits_{A}s:0\le s\le f\text{ and }s\text{ is simple}\right\} \tag{3} \end{equation}
I can easily prove this property for simple functions so take this for granted:
\begin{equation} \int\limits_{A}s=\int\limits_{\mathbb{R}}s{1}_A \tag{4} \end{equation}
where $s:\mathbb{R}\to [0,\infty]$ is a simple function. Thus to prove (1) we need to show that:
\begin{gather} %omg wall of text code - mixedmath \sup\left\{\int\limits_{A}s:0\le s\le f\text{ and }s\text{ is simple}\right\}=\sup\left\{\int\limits_{\mathbb{R}}s:0\le s\le f{1}_A\text{ and }s\text{ is simple}\right\}\notag\\ \sup\left\{\int\limits_{\mathbb{R}}s{1}_A:0\le s\le f\text{ and }s\text{ is simple}\right\}=\sup\left\{\int\limits_{\mathbb{R}}s:0\le s\le f{1}_A\text{ and }s\text{ is simple}\right\} \tag{5} \end{gather}
My question is how do we prove (5)?
PROOF: It can be easily shown that $\int\limits_{A}f=\int\limits_{A}f1_A$ and since $A\subset \mathbb{R}$, \begin{equation} \int\limits_{A}f=\int\limits_{A}f1_A\le \int\limits_{\mathbb{R}}f1_A \tag{6} \end{equation} We just have to show that \begin{equation} \int\limits_{A}f\ge\int\limits_{\mathbb{R}}f{1}_A \end{equation} The last inequality is proven in the answer given by Thomas.E
For a completely different approach you can look at my answer