# Say $X$ is $T_2$, $f: X \to Y$ is continuous, $D$ is dense in $X$ and $f|_D :D \to f(D)$ is a homeomorphism. Then $f(D) \cap f(X- D) = \emptyset$

I've been looking into the following question:

Show that $f(X - D) \cap f(D) = \varnothing$ with $f$ continuous in $X$, $D$ dense in $X$ and $f|_{D}$ homeomorphism

(It is also given that $X$ is Hausdorff)

I couldn't understand the answer given (I tried to ask in the comments, but it was many months ago so no one looks at it any more).

It is suggested that if $y \in f(D) \cap f(X\backslash D)$, then there are $x_1 \in D, x_2 \notin D$ such that $f(x_1) = f(x_2) = y$. Since $X$ is Hausdorff we can find open disjoint $V_1, V_2$ such that $x_1 \in V_1, x_2 \in V_2$. So far so good.

Then it is claimed that $y$ has an open neighbourhood $U_2$ such that $f(V_2 \cap D) = U_2 \cap f(D)$. I do understand that $f(V_2 \cap D)$ should be open in $f(D)$ - what I don't understand is why this $U_2$ is necessarily a neighbourhood of $y$.

• If you had waited a few more hours, I’d have answered your question. I simply wasn’t in a position to do so until now. Commented Jul 21, 2015 at 20:58
• I'm sorry, I wasn't sure that you've seen it. Commented Jul 22, 2015 at 7:39

Indeed, that cannot be the case. Since by assumption $f(x_1) = f(x_2) = y$, and $x_1 \in D\setminus V_2$, we necessarily have $y \notin f(D\cap V_2)$, so $f(D\cap V_2)$ cannot be a neighbourhood of $y$ in $f(D)$.
It all works out if you start from $x_1 \in D$: Since by assumption $f\lvert_D \colon D \to f(D)$ is a homeomorphism, we know that there is an open $U_1\subset Y$ with
$$f(D\cap V_1) = f(D)\cap U_1.$$
Now, by continuity of $f$ at $x_2$, there is a neighbourhood $W_2 \subset V_2$ of $x_2$ such that $f(W_2) \subset U_1$. By the denseness of $D$, we have $D\cap W_2 \neq \varnothing$, and thus $f(D\cap W_2)$ is a non-empty subset of $f(D) \cap U_1 = f(D\cap V_1)$, and so $f\lvert_D$ cannot be injective, contradicting the assumption.