# closure of inverse image is subset of inverse image of closure, given that $f$ is continuous

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.

• Isn't it that $a\in \overline{f^{-1}(X)}\Rightarrow \forall \delta>0: \, (a-\delta,a+\delta)\cap \overline{f^{-1}(X)}\neq 0$ ? Mar 5, 2016 at 15:02
• You have two many $\delta$s here. Moreover, your representation of $f^{-1}(\overline X)$ is false. We have $f^{-1}(\overline X) = \{x\in\mathbb R : f(x) = \overline X\}$. Thus, you have to show that $f(a)\in\overline X$. Mar 5, 2016 at 15:05
• @Svetoslav. No, that is not true. It is like I said. Mar 5, 2016 at 15:21

$\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)$.
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 $\delta_n=\frac{1}{n}$ and $x_n$ be an element in the intersection $]a-\delta_n,a+\delta_n[\cap f^{-1}(X)$. Thus $x_n \in ]a - \delta_n, a + \delta_n [$ and $x_n \in f^{-1}(X)$. It follows that $f(x_n) \in X\subset \overline X$. Because $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous at $a$ and $x_n\to a\Rightarrow f(x_n)\to f(a)$. But as $\{f(x_n)\}\subset \overline X$ then its limit is also in $\overline X$, i.e $f(a)\in\overline X$ which means that $a\in f^{-1}(\overline X)$.
• Yes, that what I wrote in my first comment is correct, but yours i also correct. I checked it. I mean that you are saying after "$|x-a| < \delta.$ Now we have " is not correct. Mar 5, 2016 at 17:58
• @Kamil The expression $f^{-1} (\overline{X}) = \left\{a \in \overline{X} \mid f(a) \in f(\overline{X}) \right\}$ that you wrote in your post is not correct. It should be $f^{-1} (\overline{X}) = \left\{a \in\mathbb R \mid f(a) \in \overline{X} \right\}.$ Mar 5, 2016 at 22:01