# If $\{f_{i}\}_{i\in I}$ are continuous functions $f_{i}:\, X\to\mathbb{R}$ then ${\displaystyle \sup_{i\in I}f_{i}}$ is measurable?

I saw the following exercise:

Prove or give a counterexample: If $\{f_{i}\}_{i\in I}$ are continuous functions $f_{i}:\, X\to\mathbb{R}$ then ${\displaystyle \sup_{i\in\mathbb{I}}f_{i}}$ is measurable.

I think that this claim is false, if $\{f_{i}\}_{i\in I}$ are continuous functions $f_{i}:\, X\to\mathbb{R}$ then ${\displaystyle \sup_{i\in\mathbb{I}}f_{i}}$ is lower semi-continuous but necessarily upper semi-continuous, plus the index set can be uncountable which is a good source for a counterexample.

I tried taking $X=\mathbb{R}$ with the Borel $\sigma$-algebra and some non-measurable set $K$ and tried to define $f_{i}$ s.t $$f^{-1}((0,\infty))=\cup_{i\in\mathbb{R}}f_{i}^{-1}((0,\infty))=\cup_{i\in k}\{i\}=K$$ but I failed doing so (I can do this if $f_{i}$ are not continuous).

-
Similar question showing that lower semicontinuous functions are measurable: Subset of the preimage of a semicontinuous real function is Borel –  user52660 Dec 11 '12 at 17:11
The correct spelling is "continuous"; also "counterexample" is one word. I edited accordingly. –  Nate Eldredge Dec 11 '12 at 17:45
@NateEldredge - thanks for the correction! –  Belgi Dec 11 '12 at 18:20
Didn't you just post this question? –  David Mitra Dec 11 '12 at 19:14
@DavidMitra - Yes, that post is the first part of a question I am trying to do (and I didn't want to ask about the other parts that I didn't try) and this is the third and last part of the question (I managed the second part doing something similir to what the answer to that post hinted for) –  Belgi Dec 11 '12 at 19:20

It depends on your $\sigma$-algebra on $X$. If you consider for example the trivial $\sigma$-algebra $\mathcal{A} := \{\emptyset,X\}$, then a continuous function $f:X \to \mathbb{R}$ is not necessarily measurable, in particular the supremum is not measurable. (For example $X=[0,1]$, $f(x) := x$.)

If you have some metric (or topology) on $X$ and you consider the Borel-$\sigma$-algebra (so the $\sigma$-algebra generated by the open sets) then it's true if $I$ is countable: Since $f_i: X \to \mathbb{R}$ are continuous, they are also measurable (pre-images of open sets are open!) and the supremum of (countable) measurable functions is again measurable. This follows from $$\{\sup_i f_i(x)>a\} = \bigcup_{i} \{f_i>a\}$$

-
You must be assuming that continuous functions are measurable, hence I will assume that the $\sigma$-algebra under consideration contains the Borel sets. You already observed that $f$ is lower semi-continuous (but not necessarily upper semi-continuous). By definition, this means that $E_a = \{x \in X : f(x) \gt a\}$ is open in $X$, hence it is Borel measurable. This means precisely that $f$ is Borel measurable.