$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!