[Math] closure of inverse image is subset of inverse image of closure, given that $f$ is continuous

continuitygeneral-topologyreal-analysis

Let $f : \mathbb{R} \rightarrow \mathbb{R}$ be a continuous function. Prove then that $$ \overline{f^{-1}(X)} \subset f^{-1} (\overline{X}) $$ for every $X \subset \mathbb{R}$.

Attempt at proof: Let $a \in \overline{f^{-1}(X)}$ be arbitrary. Then by definition we have $\forall \delta > 0$ that $$ ] a – \delta, a + \delta [ \cap f^{-1}(X) \neq \emptyset. $$ Let $x$ be an element in this intersection. Thus $x \in ]a – \delta, a + \delta [ $ and $x \in f^{-1}(X)$. It follows that $f(x) \in X$. Because $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous $a$, we can find $\forall \epsilon > 0$ a $\delta > 0$ such that $\forall x \in \mathbb{R}$ it holds that $$ | f(x) – f(a) | < \epsilon $$ if $| x – a | < \delta$. Now we have $$f^{-1} (\overline{X}) = \left\{a \in \overline{X} \mid f(a) \in f(\overline{X}) \right\}. $$ This means I have to show that $a \in \overline{X}$ and then show that $f(a) \in f(\overline{X})$. This is the part where I'm stuck.

Help would be appreciated.

Best Answer

$\overline{X}$ is a closed set and $f$ is a continuous function. Consequently $f^{-1}(\overline{X})$ is a closed set. It contains $f^{-1}(X)$ and - because it is closed - also contains the closure of $f^{-1}(X)$.