In a previously asked question (Checking exercise on uniform convergence) (where I was trying to show that a sequence of functions did not converge uniformly) a user told me to use the following fact:
if $f_n \xrightarrow{n\to\infty} f$ uniformly on $X\subseteq\mathbb{R}$ then $|f_n(a_n)-f(a_n)|\xrightarrow{n\to\infty}0$ (where $(a_n)$ is a sequence of points belonging to $X$.)
What follows is my attempt to prove this fact; I would be grateful if someone could check if it is correct, thank you.
Suppose there is a sequence $(a_n)_{n=0}^{\infty}$ of points in $X$ such that $|f_n(a_n)-f(a_n)|\not\to 0$. Then there exists $\bar{\varepsilon} > 0$ such that for every $N$ there is $n\geq N$ such that $|f_n(a_n)-f(a_n)|\geq\bar{\varepsilon}$ so we can build an increasing subsequence by defining $A:=\{n: |f_n(a_n)-f(a_n)|\geq\bar{\varepsilon} \}$ and the sequence of natural numbers $n_0, n_1, n_2, \dots$ recursively by setting $n_j:=\min\{n\in A: n\neq n_i,\ i < j \}$ so we therefore have $|f_{n_j}(a_{n_j})-f(a_{n_j})|\geq \bar{\varepsilon}$ for all $n_j$. By the uniform convergence $f_n\to f$ we also have that there must be some $N_{\bar{\varepsilon}}$ such that $|f_n(x)-f(x)|<\bar{\varepsilon}$ for all $n\geq N_{\bar{\varepsilon}} $ and $x\in X$ but we also know that (since ($n_j)_{j=0}^{\infty}$ is a strictly increasing and not bounded above sequence, being $A$ infinite) there will eventually be an $n_J \geq N_{\bar{\varepsilon}} $ such that $|f_n(x)-f(x)|\geq\bar{\varepsilon}$, a contradiction. Thus we conclude that for every sequence $(a_n)$ in $X$ it must be $|f_n(a_n)-f(a_n)|\xrightarrow{n\to\infty} 0$, as desired.