# A homeomorphism on a dense set in Hausdorff space

Let $X$ be a Hausdorff space, $D \subset X$ be a dense set, and $f:X \rightarrow Y$ be a continuous function such that $f|_D:D \rightarrow f(D)$ is a homeomorphism.

Show that $f(X \setminus D) \subset Y \setminus f(D)$.

Here is what I've managed to show so far:

1.

$f(D)$ is dense in $f(X)$: Let $V \subset f(X)$ be an open set. Then $f^{-1}(V)$ is also open by continuity of $f$. $D$ is dense in $X$. Hence, there exists $d \in D \cap f^{-1}(V)$. So $f(d) \in f(D) \cap V$.

2.

$f(D)$ has the Hausdorff (H) property: $D \subset X$ has H in it's topology. By Homeomorphism, $f(D)$ has H as well.

• I haven't thought it through, so this might be the totally wrong road to take: consider a proof by contradiction so that $E=f(X\setminus D)\cap f(D)\neq\varnothing$. Take $x\in E$, then by definition, there exists $y_1\in X\setminus D$ and $y_2\in D$ such that $f(y_1)=f(y_2)=x$. Now using the Hausdorff property, there exist $y_1\in U_1$ and $y_2\in U_2$ such that $U_1\cap U_2=\varnothing$ and $U_1,U_2$ are open. – Clayton Feb 13 '18 at 19:00
• Why does the Hausdorff property hold on $Y$? @user284331 – mibarg Feb 14 '18 at 7:28
• There is on $X$, $y_{1},y_{2}$ are elements in $X$. – user284331 Feb 14 '18 at 7:39
• Sorry, I've misread your comment. Why does this lead to a contradiction? @user284331 – mibarg Feb 14 '18 at 9:00

If $f(x)=f(y)$ for $x\in X-D$, $y\in D$, then $f(x_{\delta})\rightarrow f(x)$ for a net $(x_{\delta})\subseteq D$ such that $x_{\delta}\rightarrow x$, so $f(x_{\delta})\rightarrow f(y)$. Since $f|_{D}$ is a homeomorphism, then $x_{\delta}\rightarrow y$, but $X$ is Hausdorff, so $x=y$, a contradiction.