Let $(S,\mathcal{A})$ be a measurable space and let $f,g:S\to \mathbb{R}$ be measurable functions.
Exercise: Show that $\{s\in S: f(s) = g(s)\}\in \mathcal{A}$ and $\{s\in S:f(s) < g(s)\}\in \mathcal{A}$.
Question: The fact that $f,g$ are measurable means that for any $B\in\mathcal{B}(\mathbb{R})$, we have that $f^{-1}(B) \in\mathcal{A}$ and $g^{-1}(B)\in\mathcal{A}$. We have that $f(s), g(s) \in\mathcal{B}(\mathbb{R})$, because $f(s),g(s)\in\mathbb{R}$. Now, $f^{-1}(f(s))\in \mathcal{A}$, because $s\in S$ and $f$ is measurable (the same holds for g). So isn't $\{s\in S:f(s)\in\mathbb{R}\}\in\mathcal{A}$ and $\{s\in S:g(s)\in\mathbb{R}\}\in\mathcal{A}$ in general?
Thanks in advance!
$\{s\in S: f(s) = g(s)\}=(f-g)^{-1}(\{0\})$. As $\{0\}\in\mathcal{B}(\mathbb{R})$, so $f-g$ being measurable $(f-g)^{-1}(\{0\})\in\mathcal{A}$. Also the set $\{s\in S: f(s) <g(s)\}=(f-g)^{-1}((-\infty,0])$ and $(-\infty,0]\in\mathcal{B}(\mathbb{R})$.