# If $\{f_n\}_{n=1}^\infty$ is a sequence of measurable functions, then $\sup_n f_n(x)$ is measurable

Suppose $$\{f_n\}_{n=1}^\infty$$ is a sequence of measurable functions defined on a subset $$E$$ of $$\mathbb{R}^d$$. Define $$\sup_n f_n(x)=\sup\{f_n(x)\}$$ where $$x\in E$$. In a proof of the statement that $$\sup_n f_n(x)$$ is measurable given in Stein and Shakarchi, the authors claim that $$\{x\in E\mid\sup_nf_n(x)>a\}=\bigcup_{n=1}^\infty\{x\in E\mid f_n(x)>a\}.$$

I am trying to understand why this is true. For the first inclusion, if we let $$x$$ be an element of the set on the left, then $$\sup_nf_n(x)>a$$. By definition of $$\sup$$, for every $$\epsilon$$, there exists an $$f_k\in\{f_n\}$$ such that $$\sup_nf_n(x)-\epsilon. But then $$a, and since $$\epsilon$$ was arbitrary, the result follows.

Is this correct? If not, what am I missing?

The end of your proof is incorrect. The problem is that you have proven that for each $$x$$ and $$\varepsilon$$ there is a $$k$$ with $$a < f_k(x) + \varepsilon$$. But that does not imply that there is a $$k$$ with $$a < f_k(x)$$. For example, consider the case where $$a = 0$$ and $$f_k \equiv 0$$ for all $$k$$. Then $$a < f_k(x) + \varepsilon$$ for every $$\varepsilon > 0$$, but there is no $$k$$ with $$f_k(x) > a$$.
Instead, you need to choose a particular value for $$\varepsilon$$. The trick is that because the supremum is strictly larger than $$a$$, there must be a $$k$$ such that $$f_k(x)$$ is squeezed between $$a$$ and the supremum. By choosing $$\varepsilon = \sup f_n(x) - a > 0$$ you obtain that there is a $$k$$ such that $$f_k(x) > \sup f_n(x) - a = \sup f_n(x) - (\sup f_n(x) - a) = a.$$