I'm trying to show that if ${f_n}$ is a sequence of real functions that is continuous over all of $\mathbb{R}$ and that converges uniformly to $f$ over $\mathbb{Q}$, then it converges uniformly to $f$ over $\mathbb{R}$. The hint I'm given is to use the Cauchy criterion for uniform convergence.
I know that $f$ is continuous over $\mathbb{Q}$ and that $\mathbb{Q}$ is dense in $\mathbb{R}$, but using the definitions of continuity and denseness I'm still having trouble showing that $f_n$ is uniformly Cauchy.
Any help at all would be much appreciated!
Let $\varepsilon>0$ be given. Choose $x\in \mathbb{R}$ arbitrary and $q\in\mathbb{Q}$.Then
$$|f_n(x)-f_m(x)|=|f_n(x)-f_n(q)+f_n(q)-f_m(q)+f_m(q)-f_m(x)|$$ By the triangle inequality, this is less than $$ |f_n(x)-f_n(q)|+|f_n(q)-f_m(q)+|f_m(q)-f_m(x)|$$ Now choose $N$ such that for $n,m>N$ the term in the middle is $<\varepsilon/2$. By assumption this is possible indepently of $q$. Now for any given $n,m>N$, $f_n$ and $f_m$ are continous at $x$. So you can choose $q$ such that the first term and the last term are both less than $\varepsilon/2$ as well.
Edit: Note that in the last step the choice of $q$ depends on $n,m$ and $x$. The important point is that $N$ does not and that $\varepsilon$, in the beginning, was chosen arbitrarily.