Is the proposition “$A$ is separable and $B \subset A$ then $B$ is separable” in metric spaces true for A, B arbitrary sets

general-topologymetric-spaces

In the book Linear functional analysis by Rynne and Youngson, Second edition:

THEOREM 1.43.

Suppose that $(M, d)$ is a metric space and $A \subset M$.

(a) If $A$ is compact then it is separable.

(b) If $A$ is separable and $B \subset A$ then $B$ is separable

Is there something wrong in (b) of this theorem? From the statement A and B are just sets, not necessarily metric spaces but, if so, (b) would be wrong. So to proof that B is separable I have to find a countable set that is dense in A. If the proposition is true for $M=A=\mathbb{R}$ and B any subset of A, for instance a singleton $\{x\}$, which is clearly not dense in $\mathbb{R}$, it would read that the singleton set B is separable , but I don't think so, because for that, $B=\{x\}$ should be dense in $A=\mathbb{R}$
So should I assume A and B are metric spaces instead of just sets?

Best Answer

$A \subseteq M$ so $A$ is automatically treated as a metric space (and hence topological space too). To $B \subseteq A$ this also applies. We also consider $B$ as a metric space.

That the total space $M$ is metric is important because if it were only a topological space and $A,B$ would get the standard subspace topologies, the result would not necessarily hold anymore. But for metric spaces being separable is the same as having a countable base and that property is hereditary, whereas in general separability need not be.