I have encountered this well-known result when reading about separable spaces.
Let $(E, \tau)$ be a separable topological space. Let $X \in \tau$ and $\tau_X$ its subspace topology. Then $(X, \tau_X)$ is separable.
Could you verify if my below proof is fine?
Let $D$ be a countable dense subset of $E$. This implies $\overline{D}^{\tau} = E$, or equivalently $$ \forall x \in E, \forall \text{ nbh } V \text{ of } x \text{ in } \tau, V\cap D \neq \emptyset. $$
Notice that if $x \in X$ and $V$ is a nbh of $x$ in $\tau$, then $V \cap X$ is also a nbh of $x$ in $\tau$. This implies $$ \forall x \in X, \forall \text{ nbh } V \text{ of } x \text{ in } \tau, (V \cap X)\cap (D \cap X) \neq \emptyset. $$
Hence $$ \forall x \in X, \forall \text{ nbh } V \text{ of } x \text{ in } \tau_X, V\cap (D \cap X) \neq \emptyset. $$
It follows that $D\cap X$ is countable and dense in $X$, i.e., $\overline{D}^{\tau_X} = X$.
