# Exercise 1.5 from Big Rudin

$X$ is a measurable space; if $f:X\longrightarrow [-\infty, +\infty]$ and $g:X\longrightarrow [-\infty, +\infty]$ are two measurable functions, prove that the set $$\{x\in X\,: f(x)=g(x)\}$$ is measurable.

the proof is simple if the range of $f$ and $g$ is $\mathbb R$, infact $$\{x\in X\,: f(x)=g(x)\}=\{x\in X\,:f(x)-g(x)=0\}$$ but the last set is measurable because the difference of two measurable function is measurable and $\{0\}$ is a borelian. The problem is that in $[-\infty, +\infty]$ the function $f-g$ is not well defined!

-
I think there is an inevitable problem at points such as $\infty -\infty$, and to solve this problem, one may declare some values these points would take (i.e. $\infty -\infty=0$, same for other problematic values). Then proving f-g is measurable will be easy. – Idan Dec 26 '12 at 17:51

Note that $f(x) < g(x)$ if and only if there is $q \in \mathbb{Q}$ such that $f(x) < q < g(x)$. Thus we have $$\{f < g \} = \bigcup_{q \in \mathbb{Q}} (\{f < q\} \cap \{q < g\})$$ so $\{f < g\}$ is measurable since it is the countable union of measurable sets. Of course $\{ f \neq g\} = \{f < g\} \cup \{g < f\}$ and $\{ f = g\} = \{ f \neq g\}^c$ so the measurability follows.
$$\{f=g\}= \bigg(\{f-g=0\}\cap \{f<\infty\} \cap \{g<\infty\}\bigg) \cup \bigg(\{f=\infty\} \cap \{g=\infty\}\bigg) \cup \bigg(\{f=-\infty\} \cap \{g=-\infty\}\bigg)$$
where $\{g \in B\} := \{x \in X; g(x) \in B\}$ denotes the pre-image, for example $$\{g<\infty\} := \{x \in X; g(x)<\infty\}$$