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

continuitymetric-spacesproof-verificationreal-analysis

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.

Best Answer

A proof not using contradiction:

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.$

Related Question