Exercise 11, Section 30 of Munkres’ Topology 
Let $f \colon X \rightarrow Y$ be continuous. Show that if $X$ is Lindelof, or if $X$ has a countable dense subset, then $f(X)$ satisfies the same condition.

My attempt:
Approach(1): It’s easy to check, $A$ is lindelof $\iff$ Every open cover of $A$ in $X$ has countable subcover. Proof is very similar to lemma 26.1 of Munkres’ topology. Exercise 9, Section 30 of Munkres’ Topology. Let $U=\{ U_\alpha \in \mathcal{T}_Y| \alpha \in J\}$ be an open cover of $f(X)$ in $Y$. $f(X)\subseteq \bigcup_{\alpha \in J}U_\alpha$. So $X\subseteq f^{-1}(f(X))\subseteq f^{-1}(\bigcup_{\alpha \in J} U_\alpha)=\bigcup_{\alpha \in J} f^{-1}(U_\alpha)$. Thus $X= \bigcup_{\alpha \in J} f^{-1}(U_\alpha)$. Since $U_\alpha \in \mathcal{T}_Y$, $\forall \alpha \in J$ and $f$ is continuous, $f^{-1}(U_\alpha) \in \mathcal{T}_X$, $\forall \alpha \in J$. So $V=\{ f^{-1}(U_\alpha)| \alpha \in J\}$ is an open cover of $X$. Since $X$ is lindelof, $\exists \{f^{-1}(U_{\alpha_n})|n\in \Bbb{N}\}$ countable subcover of $V$. $X= \bigcup_{n\in \Bbb{N}} f^{-1}(U_{\alpha_n})$. So $f(X)=f( \bigcup_{n\in \Bbb{N}} f^{-1}(U_{\alpha_n}))=\bigcup_{n\in \Bbb{N}} f(f^{-1}(U_{\alpha_n}))\subseteq \bigcup_{n\in \Bbb{N}} U_{\alpha_n}$. Hence $\{U_{\alpha_n}|n\in \Bbb{N}\}$ is countable subcover of $U$.
Since $X$ is separable, $\exists D\subseteq X$ such that $\overline{D}=X$ and $D$ is countable. By Theorem 18.1 of Munkres’ Topology, $f(X)=f(\overline{D})\subseteq \overline{f(D)}$. Thus $f(X)=(\ \overline{f(D)})_{f(X)}$. Since $D$ is countable, $D=\{x_n \in X| n\in \Bbb{N}\}$. So $f(D)=\{ f(x_n)| n\in \Bbb{N}\}$ is countable. Hence $f(D)$ is countable dense subset of $f(X)$. Is this proof correct?
Approach(2): It’s easy to check, $X$ is lindelof $\iff$ If $\{ A_\alpha \subseteq X| A_\alpha$ is closed in $X$, $\alpha \in J\}$ have countable intersection property, then $\bigcap_{\alpha \in J} A_\alpha \neq \emptyset$. Proof is very similar to theorem 26.9 of Munkres’ topology or proposition 2.4 page no. 20. Let $U=\{ U_\alpha |\alpha \in J\}$ be an indexed family of closed subset of $f(X)$ such that $\bigcap_{i \in I}U_i \neq \emptyset$ for any countable subset $I\subseteq J$. By theorem 17.2, $U_\alpha = f(X) \cap C_\alpha$, where $C_\alpha$ is closed in $Y$, $\forall \alpha \in J$. So $\emptyset \neq \bigcap_{i \in I}U_i = \bigcap_{i \in I}(f(X) \cap C_i)=f(X)\cap (\bigcap_{i \in I}C_i)$, for any countable subset $I\subseteq J$. Since $ f(X)\cap (\bigcap_{i \in I}C_i) \neq \emptyset$ and $f(X)\cap (\bigcap_{i \in I}C_i)\subseteq f(X)$, we have $\emptyset \neq f^{-1}(f(X)\cap (\bigcap_{i\in I}C_i)) =X\cap (\bigcap_{i\in I} f^{-1}(C_i)) = \bigcap_{i\in I} f^{-1}(C_i)$, for any countable subset $I\subseteq J$. Since $f$ is continuous, $f^{-1}(C_\alpha)$ is closed in $X$, $\forall \alpha \in J$. Since $X$ is lindelof, $\bigcap_{\alpha \in J} f^{-1}(C_\alpha) \neq \emptyset$. So $\emptyset \neq f(\bigcap_{\alpha \in J}f^{-1}(C_\alpha)) \subseteq \bigcap_{\alpha \in J}f(f^{-1}(C_\alpha))\subseteq \bigcap_{\alpha \in J} C_\alpha$. Since $f(\bigcap_{\alpha \in J}f^{-1}(C_\alpha)) \subseteq f(X)$, we have $\emptyset \neq f(\bigcap_{\alpha \in J}f^{-1}(C_\alpha)) = f(\bigcap_{\alpha \in J}f^{-1}(C_\alpha)) \cap f(X) \subseteq (\bigcap_{\alpha \in J} C_\alpha) \cap f(X)=\bigcap_{\alpha \in J}U_\alpha$. Hence $\bigcap_{\alpha \in J}U_\alpha \neq \emptyset$. Our desired result. Is this proof correct?
 A: Let $f: X \rightarrow Y$ be continuous, where $X$ is Lindelöf. Let $\mathcal{A}$ be an open cover of $f(X)$; then $\left\{f^{-1}(A)\right\}_{A \in \mathcal{A}}$ is an open cover of $X$. Let $f^{-1}\left(A_{1}\right), f^{-1}\left(A_{2}\right), \cdots$ be a countable subcover of $X$. Then $A_{1}, A_{2}, \cdots$ is a countable subcover of $f(X)$. Since $\mathcal{A}$ was arbitrary, we conclude that $f(X)$ is Lindelöf.
Now let $f: X \rightarrow Y$ be continuous, where $X$ has a countable dense subset $A$. Let $g: X \rightarrow f(X)$ be the function obtained from $f$ by restricting its range. Then $g(A)$ is a countable subset of $f(X)$; we claim that it is dense in $f(X)$. Let $f(x) \in f(X)$, and let $V$ be a neighborhood in $f(X)$ of $f(x)$. Then, since $f$ is continuous, $g$ is as well, so $U=g^{-1}(V)$ is open. Since $g(x)=f(x) \in V$, we conclude that $x \in U$, and hence $U$ is a neighborhood of $x$. Since $A$ is dense in $X$, there exists some $a \in A \cap U$. Then $g(a) \in g(A) \cap V$; since $x$ and $V$ were arbitrary, we conclude that $g(A)$ is dense in $f(X)$, as claimed.
