Show that sup $f_n$ and inf $f_n$ are measurable if {$f_n$} is a sequence of measurable functions Let {$f_n$} be a sequence of measurable functions E -> $\mathbb{R} \cup \infty$. Show that the functions sup$f_n$ and inf$f_n$ are measurable.
I've started by defining f(x) = sup{$f_n(x) | n \in \mathbb{N}$}, but I don't know what to do from here.  I've seen a bunch of proofs online, but they all seem to just state $$
\left\{ x \mid g(x) > a \right\} = \bigcup_{n=1}^{\infty} \left\{ x \mid f_n (x) > a \right\}
$$ 
How are those equivalent to f(x)?
We have two definitions for a function f being measurable and they are
i) the preimage of every open set is measurable and preimages of $\infty$ and -$\infty$ are measurable.
ii) preimage of every interval of the form (c, $\infty$]
I think here using (ii) makes more sense
 A: Putting $f(x) = \sup\{f_n(x) : n \in \mathbb N\}$ and taking $a \in \mathbb R$, we seek to prove that $$\{x : f(x) > a\} = \bigcup_{n \in \mathbb N}\{x : f_n(x) > a\}.$$ Indeed, take $y \in \{x : f(x) > a\}$. Then $f(y) > a$. If $f_n(y) \le a$ for all $n$, then $a$ is an upper bound for $\{f_n(y)\}_{n \in \mathbb N}$ and so, since $f(y)$ is the least upper bound for that set, we would have $f(y) \le a$. Since this doesn't hold, we must have $f_m(y) > a$ for some $m \in \mathbb N$ and so $y \in \{x : f_m(y) > a\}$. Then $$y \in \bigcup_{n \in \mathbb N} \{x : f_n(x) > a\}.$$ Thus we have shown that $\{x: f(x) > a\} \subseteq \bigcup_{n \in \mathbb N} \{x : f_n(x) > a\}.$ 
Now take $z \in \bigcup_{n\in \mathbb N} \{x : f_n(x) > a\}$. Then $z \in \{x: f_k(x) > a\}$ for some $k \in \mathbb N$. This means that $f_k(z) > a$. However since $f(z)$ is the supremum, we have $f(z) \ge f_k(z) >a$ and so we conclude that $z \in \{x : f(x) > a\}$. This shows that  $\bigcup_{n \in \mathbb N} \{x : f_n(x) > a\} \subseteq \{x: f(x) > a\}.$ 
Since we have the conclusion in both directions, we get $$\{x : f(x) > a\} = \bigcup_{n \in \mathbb N}\{x : f_n(x) > a\}.$$
Now it is trivial that $\{x: f(x) > a\}$ is measurable since it is a countable union of measurable sets. Since $a$ was arbitrary, this shows that $f$ is measurable.
