Every open subspace of a separable topological space is separable 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$.
 A: The logic in your proof looks right to me! However, in my opinion, the way you structured it makes it a bit hard to follow. I think it would read better if you went backwards from how you wrote it.
More specifically, you're trying to prove $D \cap X$ is dense in $X$, which, as you noted, translates to:
$$ \forall x \in X,  \forall \text{ nbh } U \text{ of } x \text{ in } \tau_X,  \; U \cap (D \cap X) \neq \varnothing $$
Try proving this statement directly: choose $x$ and $U$, write $U = V \cap X$, and then use your argument about $V \cap X$ being a neighborhood of $x$ in $\tau$ to reach the conclusion you want.
A: $(E, \tau) $ separable and $X\in \tau$.
Claim: $(X, \tau_X) $ is separable.
Proof: $(E, \tau) $ separable. Let, $D\subset E$ be countable and $\tau$-dense .
Claim: $X\cap D$ is countable and $\tau_Y$-dense.
$X\cap D\subset D \implies D$ is countable.
Choose, $U\in \tau_X$ .
We have to show $U\cap(X\cap D) \neq \emptyset$
$U\in\tau_X\implies U=X\cap V $ for some $V\in \tau$
Then, $X\cap V\in \tau$ and $D$ is dense implies $(X\cap V) \cap D\neq\emptyset$
Hence, $(X\cap V)\cap(Y\cap D)\neq \emptyset$
$\implies U\cap(X\cap D) \neq \emptyset$
Hence, $X\cap D $ is $\tau_Y$ -dense.
