# Prove $\epsilon$-$\delta$ definition of continuity implies the open set definition for real function

I need to prove that the $\epsilon$-$\delta$ definition of continuity implies the open set definition continuity for a real function. Here's my attempt.

For any basis $V: (a, b)$ in the range, for each $f(x) \in V$,
let $\epsilon = \min(f(x) - a, b - f(x))$, then for any $x$ that $f(x) \in V$ according the $\epsilon-\delta$ definition of continuty there must exists a $\delta$ that the open set $U_x : (x - \delta, x + \delta) \subset f^{-1}((f(x) - \epsilon, f(x) + \epsilon)) \subset f^{-1}(V)$
In conclusion, $$f^{-1}(V) = \bigcup_{x \in f^{-1}(V)} U_x .$$ $f^{-1}(V)$ is an open set. Then for any open set $W$, $$f^{-1}(W) = \bigcup_{V \subset W} f^{-1}(V)$$ $f^{-1}(W)$ is an open set. So for any open $W$, $f^{-1}(W)$ is also an open set. This is exactly the open set definition of continuty. QED.

-
@Arturo Magidin: Thanks for your edit, the question is much cleaer. –  Jichao Sep 19 '11 at 1:47
Not every open set of the real line is of the form $(a,b)$; though it suffices to consider such sets, you need to argue why this is the case. In addition, a single element of $V$ need not be the image of a single $x$ in the domain; but you are considering only a single $x$. What if $f(x)=f(y)$ but $x\neq y$? You seem to only select a single $U_x$ for each element of $V$, so one of the two might be "left out". The main idea is right, but the devil is in the details, as usual. –  Arturo Magidin Sep 19 '11 at 1:52
$(a, b)$ is the basis for the usual topology of $\mathbb{R}$, and if for any basis there is an open set exists, it is true for any open set. This is a theorem proved in my textbook. Anyway, it is easy to prove this theorem. Because any open set is union of the basises, so $f^{-1}(V)$ is union of open sets that corresponing to each basis. –  Jichao Sep 19 '11 at 1:58
Like I said, you can certainly justify it and it is not hard, but you need to do so. Your first line simply reads "for any open set $V$", but not every open set is of this form. So one needs to explain why it is enough to consider open sets of that form. –  Arturo Magidin Sep 19 '11 at 1:59
(+1) for your continued involvement (as evidenced by comments above) –  The Chaz 2.0 Sep 19 '11 at 2:39

Since the OP's work was reviewed already in the comments, I collect together the entire argument in case future visitors find it useful.

If $f$ is $\varepsilon$-$\delta$-continuous, then it is open-set-continuous. Suppose $f : \mathbb R \to \mathbb R$ is continuous by the $\varepsilon$-$\delta$ definition; we want to prove that it is continuous by the open sets definition.

Take an arbitrary open set $V \subseteq \mathbb R$; we want to prove $f^{-1}(V)$ is open. This is true if $f^{-1}(V)$ is empty, so assume $x \in f^{-1}(V)$. Since $f(x) \in V$ and $V$ is open, there exists some $\varepsilon > 0$ such that $(f(x) - \varepsilon, f(x) + \varepsilon) \subseteq V$. By continuity at $x$, there exists some $\delta > 0$ such that $(x - \delta, x+ \delta) \subseteq f^{-1}(V)$. That is, $x$ is an interior point of $f^{-1}(V)$. Since this is true for arbitrary $x \in f^{-1}(V)$, it follows that $f^{-1}(V)$ is open.

If $f$ is open-set-continuous, then it is $\varepsilon$-$\delta$-continuous. Suppose $f : \mathbb R \to \mathbb R$ is continuous by the open sets definition; we want to prove that it is continuous by the $\varepsilon$-$\delta$ definition.

Fix $x \in \mathbb R$ and $\varepsilon > 0$. Then $(f(x) - \varepsilon, f(x) + \varepsilon)$ is an open set in $\mathbb R$ (containing $f(x)$). By continuity, $U = f^{-1}((f(x) - \varepsilon, f(x) + \varepsilon))$ is an open set in $\mathbb R$. It's easy to see that $U$ contains $x$; then $x$ is an interior point of $U$ by openness of $U$. That is, there exists $\delta >0$ such that $(x - \delta, x+\delta) \subseteq U = f^{-1}((f(x) - \varepsilon, f(x) + \varepsilon))$. Then it follows that $f((x - \delta, x+\delta)) \subseteq (f(x) - \varepsilon, f(x) + \varepsilon)$.

-