TITLE: Uniformly convergence in compact sets
QUESTION [7 upvotes]: (Theorem 7.13 in Baby Rudin) Suppose $K$ is compact, and
(a) $\{f_n\}$ is a sequence of continuous functions on $K$,
(b) $\{f_n\}$ converges pointwise to a continuous function $f$ on $K$,
(c) $f_n(x) \ge f_{n+1}(x)$ for all $x \in K, n = 1, 2, 3, \cdots$.
Then $f_n \to f$ uniformly on $K$.
I was reading this theorem in Baby Rudin, but the proof uses a trick that is not easy for me to come up with. What I had in mind was to work in the compact spaces (since $K$ compact and $f_n$ continuous) $f_1(K), f_2(K), \cdots$ directly, instead of in the domain $K$.
I understand that (a) can give me a set of compact spaces $f_1(K), f_2(K), \cdots$; and (b) can help me construct a convergence sequence (but not sure in what space, since union of countably many compact sets is not necessarily compact); and (c) can give me a monotone function (again, not sure in what space).
I got stuck at the point where a warning sign says: "be careful about the union/intersection of countably many compact sets."
Any hint to proceed?

REPLY [4 votes]: This is known as Dini's theorem. Since $f_n$ and $f$ are continuous, so is $g_n=f_n-f$, $g_n\geq 0$ and $g_n\to 0$ monotonically. Thus, it suffices to prove the claim when $f_n\to 0$. Fix $\epsilon >0$. Define $$\mathcal O_n=\{x:f_n(x)<\epsilon\}=f_{n}^{-1}(-\infty,\epsilon)$$
By continuity, these are open. Moreover, beacuse $f_{n+1}\leq f_n$, if $x\in \mathcal O_{n}$ then $x\in \mathcal O_{n+1}$, so  $\mathcal O_{n}\subseteq \mathcal O_{n+1}$. We claim $\{\mathcal O_n:n\in\Bbb N\}$ covers $K$: since the sequence goes to $0$; for each $x\in K$ there is $N$ such that $f_N(x)<\epsilon$, so $x\in\mathcal O_N$. Thus, there must be a finite cover $\{\mathcal O_{n_1},\ldots,\mathcal O_{n_k}\}$. But if $N'=\max\{n_1,\ldots,n_k\}$ $$\bigcup_{i=1}^k O_{n_i}=O_{N'}\supset K$$
What can you say about $\mathcal O_{N'}$ that relates to $$\sup_{x\in K}|f_{n}(x)|\;\; ;\;\; n\geq N'\text{ ? }$$