Injective functions with intermediate-value property are continuous. Better proof?

[I thought of another proof that uses the IVP and injectiveness once. Putting it as a community wiki answer.]

Assume on the contrary that $f$ is not continuous at $x$. Then there is a sequence $x_n$ converging to $x$ such that $f(x_n)$ does not converge to $f(x)$. Then there is $\epsilon>0$ and a subsequence $x_{n_k}$ such that $f(x_{n_k}) \notin (f(x)-\epsilon,f(x)+\epsilon)$.

There must either be a further subsequence $x_{n_j}$ such that $f(x_{n_j}) \leq f(x)-\epsilon$ or a subsequence $x_{n_q}$ such that $f(x_{n_q}) \geq f(x)+\epsilon$ (or both). Assume without loss of generality the former.

Since $f(x_{n_j}) \leq f(x)-\epsilon < f(x)$, by the IVP for every $j$ there is a $y_j$ such that $x_{n_j}\leq y_j < x$ and $f(y_j)=f(x)-\epsilon$.

Because $f$ is injective, all the $y_j$ must be the same, say $y$. Because $x_{n_j}$ converges to $x$, $y=x$ by the sandwich theorem. But $f(y)\neq f(x)$. Hence a contradiction.


I don't know if this is shorter or elegant, and in particular it does use the hypotheses more than once, but here's something.

Given your 1., assume WLOG that $f$ is increasing. Then for all $a\lt b$, $f(a,b)\subseteq (f(a),f(b))$, and thus $(a,b)\subseteq f^{-1}(f(a),f(b))$. Since each element of $(f(a),f(b))$ has a preimage point in $(a,b)$ and $f$ is injective, $f^{-1}(f(a),f(b))\subseteq (a,b)$. Combining, $f^{-1}(f(a),f(b))=(a,b)$. I'll show that this implies that the inverse image of each open interval is open, which implies continuity.

Let $x\lt y$ and suppose that $t$ is in $f^{-1}(x,y)$. Let $b>t$. Since $f^{-1}(f(t),f(b))=(t,b)$ and $f(t)\lt y$, there is a $b'$ with $t\lt b' \lt b$ and $f(b')\lt y$. Thus $f^{-1}(f(t),f(b'))=(t,b')$ is contained in $f^{-1}(x,y)$. Applying a similar argument on the other side, there is an $a'\lt t$ such that $(a',t)$ is contained in $f^{-1}(x,y)$. Together this implies that $t$ is in the interior of $f^{-1}(x,y)$.


As you note, f is injective and has the intermediate value property => f is monotonic. We may assume f is increasing.

Now for any x and any small* ε > 0, we have by the IVP

  • c in [x-1, x] such that f(c) = f(x)-ε and

  • d in [x, x+1] such that f(d)=f(x)+ε.

Then we choose δ=min(x-c,d-x). Since f is increasing, any point within δ of x maps to a point within ε of f(x); thus f is continuous.

*By "small" ε, I mean ε smaller than both f(x)-f(x-1) and f(x+1)-f(x), so that the condition of the IVP is satisfied.

I also invoke the IVP more than once. Perhaps the other Jonas will supply a proof with just one use of the IVP!