# Continuity and Uniform Continuity on Dense Subset Implies Uniform Continuity

Problem: Let $$(X,d_{1})$$ and $$(Y,d_{2})$$ be metric spaces. Suppose that $$A$$ is a dense subset of X, $$X\xrightarrow{f} Y$$ is continuous, and $$f$$ is uniformly continuous when restricted to $$A$$. Prove that $$f$$ is uniformly continuous.

My attempt: Suppose all of the above assumptions. Let $$\varepsilon>0.$$ Fix $$\delta>0$$ so that, for all $$a,b\in A,$$ $$d_2(fa,fb)<\varepsilon/3$$ when $$d_{1}(a,b)<\delta$$. Now let $$x,y\in X$$ satisfy $$d_{1}(x,y)<\delta$$. We’ll show that $$d_{2}(fx,fy)<\varepsilon.$$ Because A is a dense subset of metric space $$X$$, there must exist $$(x_n)$$,$$(y_n)\in$$ $$A^{\mathbb{Z^{+}}}$$ which converge to $$x$$ and $$y$$, respectively. By assumption of continuity, $$(fx_n)$$ and $$(fy_n)$$ converge to $$fx$$ and $$fy$$ respectively. So there must exist $$m_1$$ and $$m_2$$ such that, for all $$n_i>m_i,$$ $$d_2(fx_{n_1},fx),d_2(fy,fy_{n_2})<\varepsilon/3$$. Choose $$n>maxm_i$$ so that $$d_1(x_n,y_n)<\delta$$. Then by construction of $$\delta$$, $$d_2(fx,fy) Therefore $$f$$ is uniformly continuous. $$\blacksquare$$