uniform convergence of a function on a set $A$ if the function is uniformly convergent on every $A\cap [a,b]$ I am stuck with the following problem from a book.
It asks whether or not $f_n \rightarrow f$ converges uniformly on $A$ if for every $[a,b], f_n\rightarrow f$ uniformly on $A\cap [a,b]$.
The statement seems false to me (i.e. not necessarily true) because of this intuition I had:
If $A$ is not compact then it does not have a finite subcover. I can then construct open intervals which cover $A$. In turn, these open intervals contain closed intervals on which $f_n \rightarrow f$ uniformly on $ A\cap [x,y]$. Consequently because obtaining the maximum of an infinite number of elements is tricky (i.e. no finite subcover), we cannot conclude uniform convergence. [The maxima I am pertaining to is the maxima of $N$ such that $n>N$].
How should I proceed? Suggestions very welcome
 A: Take $A=\mathbb{R}$ and consider the sequence
$f_{n}(x)=\chi_{(n,n+1)}(x)$.
Consider any $[a,b]$. Then for all but finitely many $n$ we have $f_{n}=0$ on $A\cap[a,b]$. So $f_{n}$ uniformly converges on $A\cap[a,b]$ to $0$. Since $[a,b]$ are arbitrary then this holds in general. But $f_{n}$ does not converge uniformly on $\mathbb{R}$.
A: Write $A$ (say non-negative real numbers) as a infinite union of closed sets (say intervals) $A_j$, denote the (maximal) distance from limit on $A_j$ down to $f_i$ as $D(i,j)$. We know already $\forall\epsilon>0,\forall j, \exists N(j,\epsilon):i>N(j,\epsilon)\Rightarrow D(i,j)<\epsilon$. We don't whant $\forall\epsilon>0,\exists N(\epsilon):i>N(\epsilon)\Rightarrow D(i,j)<\epsilon$.
There are two viewpoints.


*

*Take $N(j,\epsilon)$ minimal. Fix an $\epsilon$, let $N(j,\epsilon)\rightarrow \infty$ as $j\rightarrow\infty$. This is your intuition. And an example is in the above answer.

*Suppose there is an $N(\epsilon)$, let $D(i,j)\rightarrow\infty$ when $i>N$ and $j\rightarrow \infty$, thus getting a contradition. This produces something like on $(n,n+1)$, $f_i=n/i$.

