# Why is this true in measure theory?

I don't understand something in proof of this implication:

$$\int f \mathbb{1}_A d\mu \leq \int g \mathbb{1}_A d\mu$$ for all $A \in \mathfrak{F} \Rightarrow f \leq g$ $\mu-$ almost everywhere.

Proof: Because f and g are $\mu$-integrable, $\int f \mathbb{1}_A d\mu$ and $\int g \mathbb{1}_A d\mu$ are finite for all $A \in \mathfrak{F}$. Furthermore, from claim f and g are measurable, thus $\left \{ f>g \right \}=\left \{ \omega \in \Omega | f(\omega) > g(\omega) \right \} \in \mathfrak{F}.$ We must show, that $\mu({f>g})=0.$

It holds, that

$$f\mathbb{1}_\left \{ f>g \right \} \geq g \mathbb{1}_\left \{ f > g > \right \}$$

then proof continues. But, my question is why this last step holds?

## 1 Answer

If $f(x) > g(x)$ for some $x$, then $\mathbb{1}_{\{f > g\}}(x) = 1$, so $$f(x) \mathbb{1}_{\{f > g\}}(x) = f(x) > g(x) = g(x) \mathbb{1}_{\{f > g\}}(x).$$ If $f(x) \leq g(x)$ for some $x$, then $\mathbb{1}_{\{f > g\}}(x) = 0$, so $$f(x) \mathbb{1}_{\{f > g\}}(x) = 0 = g(x) \mathbb{1}_{\{f > g\}}(x).$$ In either case, $f(x) \mathbb{1}_{\{f > g\}}(x) \geq g(x) \mathbb{1}_{\{f > g\}}(x)$, so $$f \mathbb{1}_{\{f > g\}} \geq g \mathbb{1}_{\{f > g\}}$$