If $X$ is separable, $Y$ is $T_2$ and $f: X \to Y$ is continuous, then $f$ is decided by the values of a countable dense set

general-topologyseparable-spaces

The Question is to prove that if $X$ is a separable space, $Y$ is a $T_2$ space, and $f: X \to Y$ is a continuous function, then $f$ is decided by the values of a countable dense set.

I tried something like this:

Since $X$ is separable, then there is a countable dense set $A \subset X$ which is both countable, $A =$ {$a_1, a_2, a_3, \ldots $}, and dense in $X$, meaning $\bar A = X$.

I want to show that if $f,g: X \to Y$ are two continuous functions that satisfy $f|_A = g|_A$ then $f=g$.

I negatively assume that $f|_A = g|_A$ but there is $x \in X$ such as $f(x) \neq g(x)$.
This means $f(x) = y, g(x) = z$ for $y, z \in Y$ and $y \neq z$.

Since $Y$ is a $T_2$ space, then there are open sets $U, V$ such that $y \in U, z \in V$ and $U \cap V = \emptyset$.

Now, since $f$ is continuous then $f^{-1}(U)$ and $g^{-1}(V)$ are open and also $f^{-1}(U) \cap g^{-1}(V) = \emptyset$ , since $U \cap V = \emptyset$.

Now, I want to somehow use the fact that $A$ is dense to get a contradiction, but not exactly sure how to do it.

Since $A$ is dense in $X$, then there is $a \in A$ such that $a \in f^{-1}(U)$ which means $f(a) \in U$ and so $g(a) \in U$, since $g|_A = f|_A$.

From here I am not sure how to continue, so help would be appreciated.

Best Answer

Since $f^{-1}(U)$ and $g^{-1}(V)$ are open in $X,$ so is $f^{-1}(U)\cap g^{-1}(V).$ Therefore using $A$ is dense we obtain $$A\cap( f^{-1}(U) \cap g^{-1}(V)) \neq \emptyset.$$

(Edit: Since $x \in f^{-1}(U) \cap g^{-1}(V)$, so $f^{-1}(U) \cap g^{-1}(V) \neq \emptyset.$)

Thus there exists $u \in A\cap( f^{-1}(U) \cap g^{-1}(V)).$ So $f(u)\in U$ and $g(u)\in V.$ Moreover $f \mid_A=g \mid_A,$ so $f(u)=g(u).$ This means $U \cap V \neq \emptyset,$ which is a contradiction.

Related Question