Absolute value of a measurable function is measurable Let $(X , \mathscr{M}, \mu)$ be a measure space. Prove that if $f$ is measurable, then $|f|$ is measurable. 


*

*A function $f$ is measurable if $f^{-1}((a , \infty)) = \{x : f(x) > a\} \in \mathscr{M}$ for every $a \in \mathbb{R}$.


Ok so this is what I have so far:
Consider two cases: $a < 0$ and $a \geq 0$. If $a < 0$, then we have $$|f|^{-1}((a , \infty)) = \{x : |f(x)| > a \} = X \in \mathscr{M}$$ since $\mathscr{M}$ is a $\sigma$-algebra. I am confused on how to prove the case when $a \geq 0$. If $a \geq 0$, we have $$|f|^{-1}((a , \infty)) = \{x : |f(x)| > a \} = ?$$ I am assuming we will have to use that fact that $f$ is measurable. 
Any help will be appreciated! 
 A: For every $a\in\Bbb R$, we know that 
$$|f|^{-1}((a,\infty))=\{x:|f(x)|>a\}.$$ Hence, we get
$$|f|^{-1}((a,\infty))=
\begin{cases}
X,& \text{ if } a<0\\
f^{-1}((a,\infty))\cup f^{-1}((-\infty,-a)),&\text{ if }a\geq 0. 
\end{cases}
$$
Clearly $X\in\mathscr{M}$. Because $f$ is a measurable function, it follows that  $f^{-1}((a,\infty)), f^{-1}((-\infty,-a))\in\mathscr{M}$ and hence, $$f^{-1}((a,\infty))\cup f^{-1}((-\infty,-a))\in\mathscr{M}.$$
Hope you are satisfied.
A: 
Proposition 0. Suppose $f : X \rightarrow \mathbb{R}$ is measureable, and that $g : \mathbb{R} \rightarrow \mathbb{R}$ is measureable. Then so too is $g \circ f$.

Proof. Consider $A \subseteq \mathbb{R}$ with $A$ Borel-measureable. Then $g^{-1}(A)$ is Borel-measureable. Hence $f^{-1}(g^{-1}(A))$ is measureable. Hence $(g \circ f)(A)$ is measureable. We deduce that $g \circ f$ is measurable.
So, it remains to prove:

Proposition 1. Let $g : \mathbb{R} \rightarrow \mathbb{R}$ denote the absolute value function. Then $g$ is measurable.
(Once again, all copies of $\mathbb{R}$ are viewed as measureable spaces with respect to the Borel $\sigma$-algebra in this theorem.)

Proof. Observe that:
$$g^{-1}(a,\infty) = (-\infty,-a)\cup (a,\infty)$$
So $g^{-1}(a,\infty)$ is clearly Borel-measurable. Hence $g$ is measurable.
A: $$\{x:|f(x)|\gt a\}=\{x:f(x)\gt a\}\cup\left(\mathbb R\setminus\bigcap_{n=1}^\infty\{x:f(x)\gt-a-\frac1n\}\right)$$
