Continuity at a point in metric spaces doesn't imply topological continuity? We proved in a lecture that the metric continuity at a point is equivalent to the topological continuity at that point:

A function $f\colon (X_1, d_1)\to (X_2, d_2)$ is continuous at $x\in X_1$ iff for every open ball $B$ centered around $f(x)$, there exists an open ball around $x$ that is mapped inside $B$ via $f$.


A function $f\colon (X_1, \tau_1)\to (X_2, \tau_2)$ is continuous at $x\in X_1$ iff for every open neighborhood $V$ of $f(x)$, we have that $f^{-1}(V)$ is open.

But then, consider $f\colon \mathbb R\to \mathbb R$ (both under the standard metric topology, so that the above result applies) given by
$$
f(x) := \begin{cases}
x, & x\ne -1\\
1, & x = -1
\end{cases}.
$$
Then $f$ is clearly metric continuous at $1$. But it's not topological continuous at $1$ since $(0, 2)$ is an open neighborhood of $f(1)$ and $f^{-1}((0, 2)) = (0, 2)\cup\{-1\}$ which is not open.
What is wrong with this "counterexample"?

It turns out that my definition for topological continuity is not quite "correct". The correct one is the one that Zerox proposed in the comments: $f$ is continuous at $x$ iff for every (open) neighborhood $V$ of $f(x)$, $f^{-1}(V)$ is a neighborhood (not necessarily open) of $x$. This implies that for every open neighborhood $V$ of $f(x)$, there exists an open neighborhood $U$ of $x$ such that $f(U)\subseteq V$.
The confusion crept in since I though that the above implies my definition for topological continuity, which is not the case. My "proof" went like this:
Let $V$ be an open neighborhood of $f(x)$. To show that $f^{-1}(V)$ is open, let $y\in f^{-1}(V)$, i.e., $f(y)\in V$. Since $V$ is an open neighborhood for $f(y)$ too, we can choose an open neighborhood $U$ of $y$ such that $f(U)\subseteq V$. Then $U\subseteq f^{-1}(f(U))\subseteq f^{-1}(V)$.
Then Zerox pointed out the flaw in my "proof" and everything fits perfectly now.
 A: A definition that avoids the use of the word "neighborhood" (so avoids a collision Munkres/Bourbaki).
$f:X\to Y$ is continuous at $x\in X$ if for every open set $U$ with $f(x)\in U$  an open set $V$ exists with $x\in V$ and $f(V)\subseteq U$.
Of course here you can replace $f(V)\subseteq U$ by the equivalent statement: $V\subseteq f^{-1}(U)$.
For $x=1$ and $U=(0,2)$ in your example e.g. $V=(0,2)$ does the job, and of course there are more choices for $V$.
A: The function f IS NOT CONTINUOUS everywhere. It is continuous on (0,2) and then you get $f^{-1}$(0,2)=(0,2) which is open! If you are interested in one point x=1 then the definition is :Let f be a function defined from topological space X to topological space Y, then f is said to be continuous at a point x∈X if for every neighborhood V of f(x), there exists a neighborhood U of x, such that f(U)⊆V ! It says THERE EXISTS it does not say for all neighborhoods of a. So 1 is certainly a continuity point because if V=(0,2) THERE EXISTS a U=(1-ε,1+ε) such that f(U)$\subseteq $ V=(0,2). I cant make it clearer!
