Dense Subsets: If $f|_D = g|_D$ then $f=g$ (proof)

66 Views Asked by At

Let $f,g : (X, \rho) \longrightarrow (Y,d)$ be continuous functions and $D$ a dense subset of $X$. Show that, if $f|_D = g|_D$ then $f=g$, where $\cdot |_D$ is the restriction to $D$.

Let $w = f - g$. Then, we have $$ w(z) \equiv 0, \, \forall z \in D $$

Also, the fact that $D$ is a dense subset of $X$ implies that $$ \exists y \in D, \, \forall x\in X, \, \forall \delta >0: \rho(x,y) < \delta $$ and because $w$ is a continuous function, we have
$$ d(w(x),w(y)) < \varepsilon \iff w(x) \longrightarrow w(y) \equiv 0 $$ Is this sufficient to show that $w$ is identically equal to zero?