I have that $f: (E,\theta)\rightarrow (\mathbb{R},|.|)$ an application, if we have that for all $\lambda\in \mathbb{R}$ the two sets $A=\{x\in E, f(x)<\lambda\}$ and $B=\{x\in E, f(x)>\lambda\}$ are open.
How to prove that f is continuous?
Can I say that $A=f^{-1}(]-\infty,\lambda[)$ and $B=f^{-1}(]\lambda,+\infty[)$ then the preimage of an open sets is open so $f$ is continuous.
But why we have to use the two sets $A$ and $B$ ?
Thank you