# Dini's Theorem - Proof.

I'd like to prove the following:

If $f_j$ are continuous functions on a compact set $K$, and $f_{1}(x) \leq f_{2}(x) \leq \dots$ for all $x \in K$, and the $f_j$ converge pointwise to a continuous function $f$ on $K$ then in fact the $f_j$ converge uniformly to $f$ on $K$.

Attempt:

Let $g_{j}(x) = f(x) - f_{j}(x)$ for all $j$. Then, since $f_j \rightarrow f$ pointwise, we see $g_j \rightarrow 0$ pointwise.

Now, let $\varepsilon > 0$ . And examine { $x \in K : g_{j}(x) < \varepsilon$ }.

I've been told that the next step should be to show that { $x \in K : g_{j}(x) < \varepsilon$ } is equal to the intersection of $K$ with some open set $U_j$. But I'm not certain why this is true?

If $h$ is a continuous function, what can you say about $h^{-1}(-\infty,\varepsilon)$? –  Davide Giraudo Feb 28 '12 at 22:14
You are almost there. What you need to do is to consider the sets $$H_j=\{x:\ g_j(x)<\varepsilon\},\ \ \ j\in\mathbb{N}.$$ These sets are increasing, i.e. $H_{j}\subset H_{j+1}$. The continuity of $f$ guarantees that $g_j$ is continuous for all $j$, and so $H_j$ is open, since $H_j=g_j^{-1}(-\infty,\varepsilon)$.
For any $x\in K$, $g_j(x)\to0$, so there exists $j$ such that $x\in H_j$. This means that $$K\subset\bigcup_j H_j,$$ so the $H_j$ make an open cover of $K$. By compactness, $K$ is contained in the union of a finite family $H_{j_1},\ldots,H_{j_r}$, $j_1<\ldots< j_r$. But then $$K\subset H_{j_1}\cup\cdots\cup H_{j_r} = H_{j_r}.$$ In other words, for any $x\in K$, for any $j\geq j_r$, $g_j(x)<\varepsilon$; so the convergence is uniform.