Theorem 1.14 of *Complex and real analysis* by Rudin states: 
if $f\_n:X\to [-\infty, +\infty]$ is measurable for $n = 1,2,3...$ and: $$g=\sup\_{n\geq 1} f\_n,~~~~h=\limsup\_{n\to \infty} f\_n,$$
then $h$ and $g$ are measurable.

The first step is $$g^{-1}((\alpha, \infty]=\cup\_{n=1}^\infty f\_n^{-1}((\alpha, \infty])$$

Where does this come from?

I am pretty sure the question is a duplicate but I can't find the one I saw 2 or 3 months ago that had a nice answer with all the passages.