Understanding continuity and Dense sets

46 Views Asked by At

Let $f$ and $g$ be continuous mappings of metric space X into metric space Y, and let E be dense in X. Prove $f(E)$ is dense in $f(X)$. If $g(p)=f(p)$ for all $p \in E$, prove $g(p)=f(p)$ for all $p\notin E$

My Attempt

For Rudin a set $E\subset X$ is dense if, for all points in X, that is a limit point of E or a point of E or both.

Take $f(x) \in f(X)\setminus f(E)$. Since $E$ is dense, there exists some sequence of $x_n$ such that $\{x_n\} \subset E$ and $x_n \to x$. By continuity, we see $f(x_n) \to f(x)$. Since $f(x_n) \in f(E)$, we have any point in $f(X)$ is a limit point of $f(E)$ or in $f(E)$.

I'm pretty sure the second part has been asked on MSE before, but I'd like to give my attempt to allow for critique.

Assume otherwise that $\exists p \notin E$ such that $g(p) \neq f(p)$. We can construct a sequence $p_n$ such that $\{p_n\} \subset E$ and $p_n \to p$. By continuity, we see $f(p_n) \to f(p)$ and $g(p_n) \to g(p)$. By assumption, $\lim_{n\to\infty} f(p_n) \neq \lim_{n\to\infty} g(p_n)$. However, $f(p_n) = g(p_n)$ for every $n$ which yields a contradiction.

Is my approach correct? Is there a more concise way of stating either part?