We have $(X,d)$ a metric space. The problem I want to prove is quite long so I'll just put what I need to get it:
- if $X$ is compact then is separable
- if $X$ is separable then is second countable
I've already proved the first one, but I'm having a trouble trying to prove the second. What I've been doing is, we take a dense set $A\subset X$, and because of the hypothesis we know is countable, I want to build the countable base from it. Lets take $p\in A$ fixed and an open set $U$ given by the topology induced by the metric $d$ and $p\in U$. But now things get confusing for me, on the one hand the topology given by $d$ is generated in terms of a base, on the second hand we have the countability of $A$, but I can't work this in a proper way. Is my approach wrong? Something tells me there is an easier way.