Prove that $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous iff $f^{-1}(O)$ is open for each open set $O$

246 Views Asked by At
  1. How would you proceed in the below, or have I led myself to a dead-end?

    • Let $O$ be an open set from $\mathbb{R}$. $O \subset \mathbb{R}$
    • Let $D \subseteq \mathbb{R}$, be the domain of $f$. i.e. $f : D \rightarrow \mathbb{R}$. For notation ease.
    • Then $f^{-1}(O) = \left\{ d \in D | f(d) \in O \right\}$
    • $f^{-1}(O)$ is open. Proof.
    • The above implies: $\forall x \in f^{-1}(O)$, there is a $r > 0$ s.t. $\left\{ y \in \mathbb{R} | |y-x| < r \right\} \subset f^{-1}(O)$

Now the above looks very similar to the $\epsilon-\delta$ definition of the continuity, but the statement is about the domain of function $f$. So I am stuck.

  1. How come there is a counter-example to this proof (I must be understanding it incorrectly)?

I know there is this question. But I am asking about my steps in 1.