Continuous Image of Separable Space is Separable

Definition
Let $T_1 = \left({X_1, \tau_1}\right), T_2 = \left({X_2, \tau_2}\right)$ be topological spaces.

Let $f: T_1 \to T_2$ be a continuous surjective mapping.

If $T_1$ is separable, then so is $T_2$.

Proof
From the definition of separable, $T_1 = \left({X_1, \tau_1}\right)$ is separable if there exists a countable subset $D \subset X_1$ which is everywhere dense.

We need to show that if there exists a mapping $f: T_1 \to T_2$ which is continuous, then $T_2$ is also separable.

That is, there exists a countable subset of $X_2$ which is everywhere dense.

Let $x_2 \in X_2$ be any point in $X_2$.

Let $U \in \tau_2$ be an arbitrary open set such that $x_2 \in U$.

Since $f$ is surjective there exists some $x_1 \in X_1$ with $f \left({x_1}\right) = x_2$.

Since $f$ is continuous, $f^{-1} \left[{U}\right]$ is open in $T_1$.

By definition of preimage, $x_1$ is in this set.

Since $D$ is dense in $X_1$ there is some $d \in D$ with $d \in f^{-1} \left[{U}\right]$.

Therefore $f \left({d}\right) \in U$.

Since $U$ was arbitrary, it follows that $f \left[{D}\right]$ is dense in $X_2$.

By Image of Countable Set under Mapping is Countable, $f \left[{D}\right]$ is countable.

Hence $T_2$ is separable.