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 continuity 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 continuity.
QED.
Is my answer correct? Thanks.
 A: 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)$.
A: To prove the $ ϵ-δ$ definition implies the open set definition, we proceed as follows:
Let $ U⊆R $ be open in the range $ R$. By the definition of openness in metric spaces, there exists for each $y∈U$ some $ϵ_y>0$ such that $B(ϵ_y,y)⊆U$.
It is clear that
$$U=⋃_{y∈U}B(ϵ_y,y) . \; \; \; \; \; (*)$$
We claim that $f^{-1} (U)$ is open in the domain $R$.
Suppose that $x_0∈f^{-1} (U)$. Then $f(x_0 )∈U$, so $f(x_0 )∈B(ϵ_{y_0},y_0 )$ for some $y_0∈U$ by (*). Then, $|f(x_0 )-y_0 |=d(f(x_0 ),y_0 )<ϵ_{y_0} $.
Define
$$ξ≡ϵ_{y_0}-|f(x_0 )-y_0 |  \; \; \; \; \; (**)$$
We have by the ϵ-δ definition of continuity, for the positive number $ξ$, there exists some $δ>0$ such that if $x∈R$ (domain) and $|x-x_0 |=d(x,x_0 )<δ$,
then $|f(x)-f(x_0 )|=d(f(x),f(x_0 ))<ξ$.
Let $x∈B(δ,x_0 )$, that is, $|x-x_0 |=d(x,x_0 )<δ$,
so that $|f(x)-f(x_0 )|=d(f(x),f(x_0 ))<ξ$.
The triangle inequality and (**) imply that
$$|f(x)-y_0 |≤|f(x)-f(x_0 )|+|f(x_0 )-y_0 |≤ϵ_{y_0}.$$
Hence, $f(x)∈B(ϵ_{y_0},y_0 )$ so that $x∈f^{-1} (U)$. Then, $B(δ,x_0 )⊆f^{-1} (U)$.
It follows that $f^{-1} (U)$ is open.
