Let $f:(a, b)\rightarrow R$. Prove that $f$ is continuous if only if ${f}^{-1}(A)\subset(a, b)$ is open Let $f:(a, b)\rightarrow R$. Prove that $f$ is continuous if only if ${f}^{-1}(A)\subset(a, b)$ is open for all $A\subset R$ open.
I can not see the continuity of $f$ in this open.
I can say that there is a neighborhood $V\ni x$, $ \forall x\in {f}^{-1}(A)$ such that $V\cap (a,b)\neq \emptyset$ ?Or does not it make sense to say so?
 A: $(\Rightarrow)$ Let us assume $f$ is continuous and let $A\subseteq\mathbb{R}$ be an open subset of $\mathbb{R}$. Since $A$ is open, for every $y\in A$ there is an $\epsilon_y>0$ such that:
$$I_y=(y-\epsilon_y,y+\epsilon_y)\subseteq A$$
It is then obious that:
$$A=\bigcup_{y\in A}I_y$$
So, let $x_0\in f^{-1}(A)$. To prove that $f^{-1}(A)$ is open, we shall find an open interval $I$ such that $x_0\in I\subseteq f^{-1}(A)$.
Since $x_0\in f^{-1}(A)$, by definition $f(x_0)\in A$, so $f(x_0)\in\bigcup\limits_{y\in A}I_y$. For $y_0=f(x_0)$, it is obvious that $y_0\in(y_0-\epsilon_{y_0},y_0+\epsilon_{y_0})\subseteq A$.
Since $f$ is continuous, there exists a $\delta=\delta(\epsilon_{y_0})>0$, such that:
$$|x-x_0|<\delta\Rightarrow|f(x)-y_0|<\epsilon_{y_0}$$
or, equvalently, that:
$$f((x_0-\delta,x_0+\delta))\subseteq(y_0-\epsilon_{y_0},y_0+\epsilon_{y_0})=I_{y_0}\subseteq A$$
So
$$f((x_0-\delta,x_0+\delta))\subseteq A\Rightarrow f^{-1}\left(f((x_0-\delta,x_0+\delta))\right)\subseteq f^{-1}(A)\Rightarrow(x_0-\delta,x_0+\delta)\subseteq f^{-1}(A)$$.
By setting $I=(x_0-\delta,x_0+\delta)$, it comes that $x\in I\subseteq f^{-1}(A)$.
Since $x_0$ was arbitrary, it comes that $f^{-1}(A)$ is open.
$(\Leftarrow)$ Let us now assume that, for every open subset $A$ of $\mathbb{R}$, $f^{-1}(A)$ is an open subset of $(a,b)$. Let $x\in(a,b)$ and $\epsilon>0$. Let, also
$$A=(f(x)-\epsilon,f(x)+\epsilon)$$
Obviously, $A$ is an open subset of $\mathbb{R}$ - as an open interval - and, due to our hypothesis, $f^{-1}(A)$ is also an open subset of $(a,b)$. 
Since $x\in f^{-1}(A)$, and $f^{-1}(A)$ is open, there exists a $\delta>0$ such that the open interval $(x-\delta,x+\delta)$ is subset of $f^{-1}(A)$, therefore:
$$(x-\delta,x+\delta)\subseteq f^{-1}(A)\Rightarrow f((x-\delta,x+\delta))\subseteq f\left(f^{-1}(A)\right)\Rightarrow f((x-\delta,x+\delta))\subseteq A$$.
In other words:
$$|y-x|<\delta\Rightarrow|f(y)-f(x)|<\epsilon$$
Since $x$ was arbitrary, $f$ is continuous on $(a,b)$.
