# The Supremum and Infimum of a sequence of measurable functions is measurable

I am reading through Folland's Real Analysis: Modern Techniques and Their Applications, and they have the following proposition and proof:

Proposition: If $\{f_{j}\}$ is a sequence of $\bar{\mathbb{R}}$- valued measurable functions on $(X, \mathcal{M})$, then the functions:

$$g_{1}(x)=\sup_{j} f_{j}(x)$$ $$g_{2}(x)=\inf_{j} f_{j}(x)$$ are measurable.

Proof:

We have

$$g_{1}^{-1}((a,\infty])= \bigcup_{j=1}^{\infty} f_{j}^{-1}((a,\infty])$$ $$g_{2}^{-1}([-\infty,a))= \bigcup_{j=1}^{\infty} f_{j}^{-1}([-\infty,a))$$

Where the result follows from the fact that $g_{1}^{-1}((a,\infty])\in \mathcal{M}$ for all $a \in \mathbb{R} \iff g$ is measurable, and $g_{2}^{-1}([-\infty,a))\in \mathcal{M}$ for all $a \in \mathbb{R} \iff g$ is measurable.

I understand the last part of the proof, but how do we know $g_{1}^{-1}((a,\infty])= \bigcup_{j=1}^{\infty}f_{j}^{-1}((a,\infty])$ and $g_{2}^{-1}([-\infty,a))=\bigcup_{j=1}^{\infty} f_{j}^{-1}([-\infty,a))$? I would appreciate any help with this.

This is the same as Augustin's answer, but to make it psychologically "more tautological"...

Think of unions as 'there exists' [and intersections as 'for all'].

Writing $\{\, P\, \}$ for $\{x\, | P(x) \}$ below:

$$\{\, \def\S {\sup_k\ f_k} \S >a\, \} = \bigcup_k\ \{\, f_k > a\, \}$$ is the statement that if $\S(x)>a$, then there exists a $k$ such that $f_k (x) >a$, and conversely: if there exists a $k$ such that $f_k (x) > a$, then ...
Likewise, (not what you are asking, but here for illustration) $$\{\, \inf_k f_k\ge a\, \} = \bigcap_k\ \{\, f_k \ge a \,\}$$ is the statement that $\inf_k f_k(x) \ge a$ if and only if $f_k(x) \ge a$ for all $k$.
Hint: $\sup_j f_j(x)\gt a\iff \exists j,\, f_j(x)\gt a$.