# Dini's theorem

If $X$ is a compact topological space, and $(f_{n})_{n\in \mathbb {N} }$ is a monotonically increasing sequence (meaning $f_{n}(x)\leq f_{n+1}(x)$ for all $n\in \mathbb {N}$ and $x\in X$ ) of continuous real-valued functions on $X$ which converges pointwise to a continuous function $f\colon X\to \mathbb {R}$ , then the convergence is uniform. The same conclusion holds if $(f_{n})_{n\in \mathbb {N} }$ is monotonically decreasing instead of increasing. The theorem is named after Ulisse Dini.
Let $\varepsilon >0$ be given. For each $n\in \mathbb {N}$ , let $g_{n}=f-f_{n}$ , and let $E_{n}$ be the set of those $x\in X$ such that $g_{n}(x)<\varepsilon$ . Each $g_{n}$ is continuous, and so each $E_{n}$ is open (because each $E_{n}$ is the preimage of the open set $(-\infty ,\varepsilon )$ under $g_{n}$ , a continuous function). Since $(f_{n})_{n\in \mathbb {N} }$ is monotonically increasing, $(g_{n})_{n\in \mathbb {N} }$ is monotonically decreasing, it follows that the sequence $E_{n}$ is ascending (i.e. $E_{n}\subset E_{n+1}$ for all $n\in \mathbb {N}$ ). Since $(f_{n})_{n\in \mathbb {N} }$ converges pointwise to $f$ , it follows that the collection $(E_{n})_{n\in \mathbb {N} }$ is an open cover of $X$ . By compactness, there is a finite subcover, and since $E_{n}$ are ascending the largest of these is a cover too. Thus we obtain that there is some positive integer $N$ such that $E_{N}=X$ . That is, if $n>N$ and $x$ is a point in $X$ , then $|f(x)-f_{n}(x)|<\varepsilon$ , as desired.