in our lecture we were told that a function $f$ is said to be continuous $\iff$ $\forall A$ open set in the range of the function it is verified that its inverse image $f^{-1}(A)$ is continuous. We were given to show as an exercise that $f$ is continuous $\implies$ $f^{-1}(A)$ is open for each open set $A$.
Here is my attempt:
Let $y_0$ be an element of the range of the function, and $V$ be an open set that contains $y_0 = f(x_0)$, then by definition of open set, $y_0$ is an inner point of $V$, which means that there exists a positive radius $r>0$ such that $B_r(y_0)\subset V$ ( $B_r(y_0)$ is a ball of radius $r$ with center in $y_0$).
We have that
$\forall\;y_0 = f(x_0)\in V\;\;\exists\;r>0\;\lvert\; B_r(y_0) \subset V$
By applying $f^{-1}$ to it we have that
$\forall\;x_0 \in f^{-1}(V)\;\;\exists\;r>0\;\lvert\; f^{-1}(B_r(y_0)) \subset f^{-1}(V)$
By the fact that $x_0$ is arbitrary we have that $f^{-1}(V)$ is an open set.
Am I correct?