Show that $\{m\in X:f(m)\ge g(m) \}$ is measurable Show that if $f$ and $g$ are two (extended) measurable functions over ($X,\sigma(X),\mu$), then $\{m\in X:f(m)\ge g(m) \}$ is measurable.
I know that in order to have $f:X\rightarrow \Bbb R \bigcup \{\infty,-\infty \}$ as a measurable function, {$x: f(x)\gt \alpha$} $\in \sigma(x)$
 for all $\alpha \in \Bbb R$. I also know how to prove $af+bg,fg$ ($a,b \in \Bbb R$) and so on are measurable, but not sure how to prove the above condition. Could someone provide a proof please? Thanks.

Define
$$ \phi(x,y) = \begin{cases}x - y &\text{ if } x \geq y \\ 0 &\text{ if } x = \infty \lor y = -\infty \\ -1 &\text{ if } x = -\infty \land y =\infty \end{cases}
$$
Then $S = \{x \in X\mid f(x) \geq g(x)\} = \{x \in X\mid \phi(f(x),g(x)) \geq 0\}$.
It remains to prove that $\phi$ is $(\sigma(X)^2,\mathcal{B}(\overline{\mathbb{R}}))$-measurable.
To show this, you can use the fact that for any measurable space $(X,\Sigma)$, $f:X \to \overline{\mathbb{R}}$ is measurable if and only if $f^{-1}[\{\pm\infty\}] \in \Sigma$ and $f$ is measurable on $f^{-1}[\mathbb{R}]$. The latter is implied by continuity.
