I understand the intuition behind the epsilon-delta definition of continuity when working in $\mathbb{R}$: Given a point $a$, all points within a little distance of $a$ are also within a little distance (and $0$ counts as "little" :)) from $f(a)$. But I'm having difficulty understanding the intuition behind the equivalent definition: a function f is continuous if $f^{-1}$ pulls open sets to open sets—i.e., V open in the image of f implies $f^{-1}$(V) open.
(Note: It turns out that my definition is wrong: I need to say "$V$ open in the co-domain implies $f^{-1}(V)$ open." See below.)
Consider the function $f(x)$ = {x when x $\le$ 0, x + 1 when x $\gt$ 0}. Using the epsilon-delta approach, the function is discontinuous at 0 because the point $\frac 14$ is close to 0, but the point f($\frac 14$) = $\frac 54$ is miles away from $f(0) = 0$.
Here's what I can't figure out: what is the open set $V$ in the image of f such that $f^{-1}$($V$) is not open?
(Note: It turns out that this particular question is answered well here by Ben West. The open set $V$ needs to be in the co-domain of $f$, not the image of $f$. In this case, the codomain of f is $\mathbb R$, so the restriction I created below was needless.
In addition, it looks like I could have just I just chosen my open set in the codomain of $f$ to be $V_2 = \mathbb R$ and note that $f^{-1}(\mathbb R)$ is no longer an open set.
Edit: I see now that this reasoning is wrong, as $f^{-1}(V_2)$ is just $\mathbb R$.
My prior (false) reasoning is below, in case anyone finds it useful. I've also followed it with one more question.)
Here's what I tried and rejected. $V_1$ = {y = f(x), -1/2 $\lt$ y $\lt$ 1/2}. I rejected this choice for the open set we want because it doesn't seem to me that {0 $\lt$ y $\lt$ 1/2} is in the image of f. The part of $V_1$ that is in the image of f is the half open interval {-1/2 $\lt$ y $\le$ 0}. If this set $V_1$ did qualify, we could use a similar argument to "prove" that {$g(x) = -x\ when\ x \le 0, \mathrm{undefined\ otherwise}$} was discontinuous at $0$.
Question: Take the function g above. Do we just say that $\mathbb R^+$ is not in its codomain?
(1). If $f(x)=x$ when $x\leq 0$ and $f(x)=x+1 $ when $x>0$ then $f^{-1}(-\infty,1/2)=(-\infty,0]$ is not open.
(2). For any $f:\Bbb R \to \Bbb R$ let $f''\Bbb R=\{f(x): x\in \Bbb R\}.$ This is a notation used in Set Theory. Then for any $S\subset \Bbb R$ we have $f^{-1}S=f^{-1}(S\cap f''\Bbb R)$.
(3). For any $f:\Bbb R \to \Bbb R$: If $S$ is an open subset of $\Bbb R$ then $S\cap f''\Bbb R$ is an open subset of the space $f''\Bbb R.$ And if $f^{-1}S$ is not open in $\Bbb R$ then neither is $f^{-1}(S\cap f''\Bbb R)$ because it's the same set.
(4). So for the $f$ in the question let $S=(-\infty,1/2)$ and $T=S\cap f''\Bbb R=(-\infty,0]$. We have $S\cap f''\Bbb R=T,$ which is open in $f''\Bbb R.$
And $f^{-1}T=$ $f^{-1}(S\cap f''\Bbb R)=$ $f^{-1}S=$ $(-\infty,0],$ which is not open in the domain, $\Bbb R.$
Note: In general, any $f:X\to Y$ is continuous iff ... (i)... $f:X\to Y'$ is continuous for all $Y'$ such that $f''X\subset Y'\subset Y,$...(ii)... iff $f:X\to Y'$ is continuous for at least one $Y'$ such that $f''X\subset Y'\subset Y, $...(iii)...iff $f:X\to f''X$ is continuous.
Footnote: When $A\subset$ dom($f)$ then $f''A$ (read $f$-double-prime-$A$) is $\{f(a):a\in A\}. $ Set theorists prefer this to $f(A)$ for the image of $A$ because a subset $A$ of dom($f$) could also be a member of the domain of $f$, which would make $f(A)$ ambiguous.