# An upper semi-continuous function from a compact metric space to $\mathbb R$ is bounded from above

Good evening, I'm trying to prove this theorem.

Let $$X$$ be a compact metric space and $$f:X \to \mathbb R$$ an upper semi-continuous function. Then $$f$$ is bounded from above.

Could you please verify whether my attempt is fine or contains logical gaps/errors? Any suggestion is greatly appreciated!

My attempt:

Assume the contrary that $$f$$ is not bounded from above. Then $$A_n := \{x \in X \mid f(x) \ge n \}$$ is nonempty and closed for all $$n \in \mathbb N$$. By Axiom of Countable Choice, there is a sequence $$(x_n)$$ such that $$x_n \in A_n$$ for all $$n \in \mathbb N$$.

Because $$X$$ is compact, there is a subsequence $$(x_{n_m})$$ of $$(x_n)$$ such that $$x_{n_m} \to a$$. It is easy to verify that almost all terms of this subsequence belong to every $$A_n$$. Because $$A_n$$ is closed for all $$n \in \mathbb N$$, $$a \in A_n$$ and thus $$f(a) \ge n$$ for all $$n \in \mathbb N$$, which is a contradiction. Hence $$f$$ is bounded from above.

• Hi @MariosGretsas, I think it is decreasing in the sense of inclusion. – Akira Oct 15 '19 at 22:06
• @Akira Even worse for your claim. – amsmath Oct 15 '19 at 22:07
• I'm so sorry for my bad english, but I don't understand what you meant @amsmath. – Akira Oct 15 '19 at 22:08
• Again the question: why does a.e. term belong to every $A_n$? – amsmath Oct 15 '19 at 22:09
• This does not prove your claim. Note BTW that if $x\in A_n$ for all $n$, then $f(x) = \infty$. – amsmath Oct 15 '19 at 22:17

Let $$A_n := \{x \in X \mid f(x) < n\}.$$ As $$f$$ is upper-semicontinuous, $$A_n$$ is an open set.

We have: $$X = \cup_{n \in \mathbb N} A_n.$$ $$X$$ is compact, therefore it has a finite subcover $$F \subset \mathbb N$$, i.e., $$X = \cup_{n \in F} A_n$$, which shows that $$f$$ is bounded from above by $$M = \max_{n \in F} n.$$

• Hi, could you please verify if my reasoning is correct? Given $N \in \mathbb N$, $f(x_{n_m}) \ge N$ for all $m \ge N$, so $x_{n_m} \in A_N$ for all $m \ge N$. As such almost all but finitely many terms of $(x_{n_m})$ belong to $A_N$. – Akira Oct 15 '19 at 22:28

Its a fact that if $$f$$ is an upper semicontinuous function $$f$$ on $$X$$ exists a decreasing sequence $$f_n$$ of continuous function such that $$f_n \to f$$ pointwise..

Then $$-f_n$$ is increasing and converges to $$-f$$. and since $$X$$ is compact we have that the convergence is uniform by Dini's theorem.

By compactness ,each $$-f_n$$ is bounded, so $$-f$$ is bounded thus $$f$$ is bounded.

So we proved that $$f$$ is bounded in general,not only bounded above.

• $f\le f_1$ -- done! – amsmath Oct 15 '19 at 22:15
• @amsmath I wanted to prove that the function is bounded,not only bounded above...my answer is an overkill but it will make the O.P search and look for the theorem of approximation if semicontinuos function,by continuous. – Marios Gretsas Oct 15 '19 at 22:17
• Hi, could you please verify if my reasoning is correct? Given any $N \in \mathbb N$, $f(x_{n_m}) \ge N$ for all $m \ge N$, so $x_{n_m} \in A_N$ for all $m \ge N$. As such almost all but finitely many terms of $(x_{n_m})$ belong to $A_N$ – Akira Oct 15 '19 at 23:05