[Math] Injective functions with intermediate-value property are continuous. Better proof

continuityreal-analysis

A function $f: \mathbb{R} \to \mathbb{R}$ is said to have the intermediate-value property if for any $a$, $b$ and $\lambda \in [f(a),f(b)]$ there is $x \in [a,b]$ such that $f(x)=\lambda$.

A function $f$ is injective if $f(x)=f(y) \Rightarrow x=y$.

Now it is the case that every injective function with the intermediate-value property is continuous. I can prove this using the following steps:

  1. An injective function with the intermediate-value property must be monotonic.
  2. A monotonic function possesses left- and right-handed limits at each point.
  3. For a function with the intermediate-value property the left- and right-handed limits at $x$, if they exist, equal $f(x)$.

I am not really happy with this proof. Particularly I don't like having to invoke the intermediate-value property twice.

Can there be a shorter or more elegant proof?

Best Answer

[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.