I have encountered a problem which I think is troublesome.
Let $g_n,g \in C^0 [a,b],n \ge 1$ such that $g_n,g$ are monotonically increasing functions. Let $X \subset [a,b]$ be an arbitrary dense subset of the interval $[a,b]$. Assume $a,b \in X$ and $$ \lim_{n \to \infty} g_n (x) =g(x)$$ for any $x \in X$.Prove that $g_n$ converges to g uniformly on $[a,b]$.
This is a question that asks us to prove uniform convergence from pointwise convergences. The problem will be mistaken if we do not let $g$ be continuous. Consider $g_n = x^n$ on interval $[0,1]$, this is not true because $g(x)=\delta _{x1}$ and $g_n$ does not converges uniformly.
However, $g$ is continuous and i did not know where to start. Please help.
This was supposed to be a hint ... but by the time I made this picture, I forgot exactly how. Hope it help anyway :)
(Re your proposed counterexample, your $g$ is not continuous, and it is supposed to be.)