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).
Can someone please help with this exercise?