I have some problems about solving an exercise:
Prove that one function $f \colon [a,b] \to \mathbb{R}$ is lower semi-continuous if and only if, for all $x \in [a,b]$, we have $f(x)=\sup \{g(x) \mid g \in C[a,b] \text{ and } g \le f \text{ over } [a,b] \}\;.$
Assuming true that formula, I had no problems showing that $f^{-1}((t,\infty \ ])$ is open, using the property of supremum and the continuity of $g$'s.
I have difficulties proving the opposite implication. Beacuse $f \ge g$, we have that $f(x) \ge \sup{g(x)}$, but I am not able to show the other inequality.
Thank you.