If $\lim_{n\to\infty} f_n(x_n)=f(x)$ then $f_n$ converges uniformly to $f$ in a compact set $X$

functional-analysisreal-analysisuniform-convergence

Let $X$ be a compact metric space, $\{f_n\}_{n=1}^{\infty}$ a sequence of continuous real-valued functions on $X$ and $f$ a continuous real-valued function on $X$. I want to show that if $\lim_{n\to\infty} f_n(x_n)=f(x)$ for any sequence $\{x_n \}_{n=1}^{\infty}\subseteq X$ converging to a point $x\in X$, then $f_n$ converges uniformly to $f$. By the way of contradiction, i.e., supposing $f_n$ does not converge uniformly to $f$ on $X$, I've proven that

$$|f_{\alpha(k)}(y_k)-f(y_k)|\geq\frac{\varepsilon_0}{2}, \: \forall \: k\in\mathbb{N}$$

where $\{\alpha(k)\}_{k=1}^{\infty}$ is an strictly increasing sequence of natural numbers (just a fancy way of saying that that inequality holds for an infinite number of indexes), $\varepsilon_0>0$ and $\{y_k\}_{k=1}^{\infty}$ is a sequence of points in $X$ converging to some point $y\in X$. Then I would like to have something of the form

$$|f_{\beta(k)}(y_{\beta(k)})-f(y)|\geq r$$ with $r>0$ for a strictly increasing sequence of natural numbers $\{\beta(k)\}_{k=1}^{\infty}$ and hence proving that $\lim_{k\to\infty} f_k(y_k)\neq f(y)$ for the sequence $y_k$ converging to $y$, contradicting the hypotesis, but I'm stuck at this point. I'm also not sure if the hypotesis of $f$ being continuous is necessary. Thanks in advice.

Best Answer

Take a convergent subsequence of $y_k$, say $y_{k_l} \to y$ for some $y \in X$. (You can do this because $X$ is a compact metric space.) Since $f$ is continuous, we can find $l_0$ such that $|f(y_{k_l}) - f(y)| < \frac{\epsilon_0}4$ for all $l \geq l_0$. Then $$|f_{\alpha(k_l)}(y_{k_l}) - f(y)| \geq |f_{\alpha(k_l)}(y_{k_l}) - f(y_{k_l})| - |f(y_{k_l}) - f(y)| > \frac{\epsilon_0}2 - \frac{\epsilon_0}4 = \frac{\epsilon_0}4.$$ Now let $z_{\alpha(k_l)} := y_{k_l}$ for all $l$, which makes sense since $(\alpha(k))_{k\in\mathbb N}$ is an increasing sequence. We have $\lim_{l\to\infty} z_{\alpha(k_l)} = \lim_{l\to\infty} y_{k_l} = y$. Since $\lim_{n\to\infty} f_n(y_n) = f(y)$ if $y_n \to y$, this holds over subsequences, and therefore $\lim_{l\to\infty} f_{\alpha(k_l)}(z_{\alpha(k_l)}) = f(y)$. But then $|f_{\alpha(k_l)}(y_{k_l}) - f(y)| < \frac{\epsilon_0}4$ for $l$ large, a contradiction.