[proofplan]
The forward direction shows that if $f$ is $\varepsilon$-$\delta$ [continuous](/page/Continuity) at every point, then the preimage of any [open set](/page/Open%20Set) is open: for each preimage point, the $\varepsilon$-$\delta$ condition produces a ball mapping into the target open set. The reverse direction applies the preimage condition to the open ball $B(f(a), \varepsilon)$ to recover the $\varepsilon$-$\delta$ condition at each point $a$.
[/proofplan]
[step:Show that pointwise continuity implies preimages of open sets are open]
Let $V \subseteq X'$ be [open](/page/Open%20Set) and let $x \in f^{-1}(V)$, so $f(x) \in V$. Since $V$ is open, there exists $\varepsilon > 0$ with $B(f(x), \varepsilon) \subseteq V$. By [continuity](/page/Continuity) of $f$ at $x$, there exists $\delta > 0$ with $d'(f(y), f(x)) < \varepsilon$ whenever $d(y, x) < \delta$. Then $B(x, \delta) \subseteq f^{-1}(B(f(x), \varepsilon)) \subseteq f^{-1}(V)$. Since $x \in f^{-1}(V)$ was arbitrary, $f^{-1}(V)$ is open.
[guided]
We need to show $f^{-1}(V)$ is open in $X$, i.e., every point of $f^{-1}(V)$ has an open ball contained in $f^{-1}(V)$. The argument chains together two $\varepsilon$-$\delta$ statements: one from openness of $V$, one from continuity of $f$.
Let $x \in f^{-1}(V)$. Then $f(x) \in V$. Since $V$ is open in $X'$, there exists $\varepsilon > 0$ with $B(f(x), \varepsilon) \subseteq V$. This $\varepsilon$ quantifies how far $f(x)$ is from the boundary of $V$.
Now apply the $\varepsilon$-$\delta$ definition of continuity of $f$ at $x$: for this $\varepsilon > 0$, there exists $\delta > 0$ such that $d(y, x) < \delta$ implies $d'(f(y), f(x)) < \varepsilon$. In other words, $f(B(x, \delta)) \subseteq B(f(x), \varepsilon)$.
Combining the two inclusions: for every $y \in B(x, \delta)$, we have $f(y) \in B(f(x), \varepsilon) \subseteq V$, which means $y \in f^{-1}(V)$. Therefore $B(x, \delta) \subseteq f^{-1}(V)$.
Since $x \in f^{-1}(V)$ was arbitrary, every point of $f^{-1}(V)$ is an interior point, and $f^{-1}(V)$ is open.
[/guided]
[/step]
[step:Show that the open-preimage condition implies pointwise continuity]
Fix $a \in X$ and $\varepsilon > 0$. The open ball $V = B(f(a), \varepsilon)$ is [open](/page/Open%20Set) in $X'$. By hypothesis, $f^{-1}(V)$ is open in $X$. Since $f(a) \in V$, we have $a \in f^{-1}(V)$. Since $f^{-1}(V)$ is open, there exists $\delta > 0$ with $B(a, \delta) \subseteq f^{-1}(V)$. For any $x$ with $d(x, a) < \delta$, $x \in f^{-1}(V)$, so $f(x) \in V = B(f(a), \varepsilon)$, giving $d'(f(x), f(a)) < \varepsilon$. This is the $\varepsilon$-$\delta$ condition at $a$.
[guided]
We want to recover the $\varepsilon$-$\delta$ definition of continuity from the preimage condition. Fix $a \in X$ and $\varepsilon > 0$. We need to find $\delta > 0$ such that $d(x, a) < \delta$ implies $d'(f(x), f(a)) < \varepsilon$.
The key observation is to reformulate the target condition set-theoretically. The condition $d'(f(x), f(a)) < \varepsilon$ is the same as $f(x) \in B(f(a), \varepsilon)$, which is the same as $x \in f^{-1}(B(f(a), \varepsilon))$. So we need $B(a, \delta) \subseteq f^{-1}(B(f(a), \varepsilon))$.
The open ball $B(f(a), \varepsilon)$ is an open set in $X'$. By the preimage hypothesis, $f^{-1}(B(f(a), \varepsilon))$ is open in $X$. Moreover, $a$ belongs to this preimage because $f(a) \in B(f(a), \varepsilon)$ (every point is in its own open ball).
Since $f^{-1}(B(f(a), \varepsilon))$ is open and contains $a$, the definition of openness gives $\delta > 0$ with $B(a, \delta) \subseteq f^{-1}(B(f(a), \varepsilon))$.
Any $x$ with $d(x, a) < \delta$ then lies in $f^{-1}(B(f(a), \varepsilon))$, meaning $f(x) \in B(f(a), \varepsilon)$, i.e., $d'(f(x), f(a)) < \varepsilon$. This is the $\varepsilon$-$\delta$ condition for continuity at $a$.
[/guided]
[/step]