# uniformly convergence on compact metric space

Let $K$ be a compact metric space. Let $\{f_n\}_{n=1}^\infty$ be a sequence of continuous functions on $K$ such that $f_n$ converges to a function $f$ pointwise on $K$.

on Walt. Rudin's book Principles of mathematical analysis, 7.13, if we assume

(1). $f$ is continuous;

(2). $f_n(x)\geq f_{n+1}(x)$ for all $x\in K$ and all $n$;

then it is proved that $f_n$ converges to $f$ uniformly on $K$.

Is there counterexample satisfying (1) but not (2)? And satisfying (2) but not (1)?

If we assume (2) but not (1), then let $$f_n(x) = \begin{cases} 1 & \text{if } x = 0 \\ 1-nx & \text{if } 0 \le x \le \frac{1}{n} \\ 0 & \text{if } \frac{1}{n} \le x \end{cases}$$ $f_n$ is continuous, $f_n(x) \ge f_{n+1}(x)$, and $f_n$ and converges pointwise to the discontinuous characteristic function $\chi_{\{0\}}$. However, the convergence is not uniform because if $\epsilon < 1$, then for all $n$ there is a value of $x > 0$ with $f_n(x) > \epsilon$. Alternatively, you know the convergence cannot be uniform because the uniform limit of continuous functions is continuous.
If we assume (1) but not (2), then for $n \ge 2$ let $$f_n(x) = \begin{cases} nx & \text{if } 0 \le x \le \frac{1}{n} \\ 2 - nx & \text{if } \frac{1}{n} \le x \le \frac{2}{n} \\ 0 & \text{if } \frac{2}{n} \le x \end{cases}$$ The functions are continuous and converge to the continuous $0$, but the convergence is again not uniform.
$f_n(x)=x^n$ on $[0,1]$. Satisfies (2) but not (1).
$f_n(x)=nx(1-x)^n$ on $[0,1]$- satisfies 1 but not 2, and the convergence is not uniform.