Recognizing uppersemicontinuous function as a pointwise decreasing limit. Let $X$ be a compact metric space and $f:X\rightarrow \mathbb{R}$ be upper semicontinuous.  Then why is it that $f$ is the pointwise decreasing limit of continuous functions?
My attempt has been to use totally boundedness of $X$ to get a finite cover by $1/n$ radius balls $B_{i, n}$.  Then find a subordinate continuous partition of unity $\phi_{i, n}$ where i runs over a finite index set.  Then let $g_n=\sum_{i}sup f|_{B_{i,n}} * \phi_{i, n}$. 
$g_n$ is continuous and at least $f$.  Therefore, the same holds of $f_n=min(g_1, ... g_n)$.  Furthermore, the last sequence is decreasing.  Why does $f_n$ converge to f pointwise? (Or you can suggest a different method of proof entirely.)  Towards this I was hoping for perhaps a proof of some sort of "uniform upper semicontinuity" in analogy to uniform continuity which follows from continuity on $X$, but that seems hopeless.
 A: An upper semicontinuous function on a compact set is bounded above (consider the open cover of $X$ by open sets $\{f<n\}$). The argument given below works for any upper semicontinuous function that is bounded above, on any metric space.
For $n=1,2,\dots$ let $$f_n(x)=\sup_{y\in X} (f(y)-n\,d(x,y)) \tag1$$
The function $f_n$ is continuous, in fact $n$-Lipschitz. It satisfies $f_{n+1}\le f_n$ and $f\le f_n$ by construction (the latter because we can use $y=x$ in (1)). It remains to prove that $f_n\to f$ pointwise. 
Fix $x\in X$ and  $\epsilon>0$. There exists $\delta>0$ such that $f(y)\le f(x)+\epsilon$ whenever $d(x,y)< \delta$. Let $M=\delta^{-1} (\sup_X f-f(x))$. If $n>M$, then for every $y\in Y$ we have 
$$
f(y)-n\,d(x,y) \le \begin{cases} f(x)+\epsilon,\quad & \text{if }\ d(x,y)<\delta \\ 
\sup_X f-M\delta = f(x),\quad & \text{if }\  d(x,y)\ge \delta
 \end{cases}
$$
Hence $f_n(x)\le f(x)+\epsilon$ as desired. 

Concerning the argument you sketched: I don't see why $g_n\ge f$. The function $\phi_{i,n}$ will be less than $1$ somewhere in $B_{i,n}$, and the contribution of other terms is not guaranteed to offset that. 

Concerning "uniform upper semicontinuity": there is no such thing. If $\delta$ could be chosen independently of $x$ in "$f(y)\le f(x)+\epsilon$ whenever $d(x,y)< \delta$", then we  would reverse the roles of $x$ and $y$ and conclude that $f$ is uniformly continuous.
