Let $(X,d_x)$ and $(Y,d_y)$ be metric spaces. Furthermore, let $f:X \to Y$ be surjective and continuous. Furthermore: $S \subset X$ is dense in X.
Question: How to prove that $f(S) \subset Y$ is dense in Y?
I wrote down the definitions of continuity:
$\forall x \in X, \forall a \in \mathbb{R} : \exists \delta > 0 $ such that $\forall \epsilon > 0 : |x-a| < \delta \implies |(f(x) - f(a) | < \epsilon , $
and of $S \subset X$ being dense in X: $ \bar{S} = \{ x \in X | \forall \epsilon > 0 : \exists y \in S $ such that $d(x,y) < \epsilon \} = X $,
and of $f$ being surjective: $\forall p \in Y : \exists x \in X : f(x) = p $.
Using these definitions, I tried to prove: $\overline{f(S)} = \{ p \in Y | \forall \epsilon ' > 0 : \exists z \in f(S) $ such that $d(p,z) < \epsilon ' \} = Y.$
I couldn't figure it out, though. I tried proving this by contradiction, but to no avail. Could you please help me out?