Let be $I, J$ any intervals of the real line and $f: I \longrightarrow J$ a bijection such that $x < y \Longrightarrow f(x) < f(y)$. Prove that $f$ is continuous.
I would like to know if my attempt is correct. Thanks in advance!
My attempt:
We show that $f$ is continuous in $x_0 \in I$. Suppose that $f$ is descontinuous in $x_0 \in I$, this is, $\exists \epsilon > 0$, $\forall \delta > 0;$ $|x - x_0| < \delta$ e $|f(x) - f(x_0)| \geq \epsilon$. Let's look at two cases:
(1) $f(x) \geq f(x_0) + \epsilon$:
As $J$ is an interval, exists $a \in (x_0 - \delta,x_0 + \delta)$ such that $f(a) = f(x_0) + \epsilon$ and exists $c \in J$ tal que $f(x_0) < c < f(a)$, so exists $z \in I$ such that $f(z) = c$ and follows from the fact that $f$ is increasing that $x_0 < z < a$, so $z \in (x_0 - \delta,x_0 + \delta)$, which contradicts the discontinuity of $f$ in $x_0 \in I$.
(2) $f(x) \leq f(x_0) - \epsilon$:
As $J$ is an interval, exists $a \in (x_0 - \delta,x_0 + \delta)$ such that $f(a) = f(x_0) - \epsilon$ and exists $c \in J$ such that $f(a) < c < f(x_0)$, so exists $z \in I$ tal que $f(z) = c$ and follows from the fact that $f$ is increasing that $a < z < x_0$, so $z \in (x_0 - \delta,x_0 + \delta)$, which contradicts the discontinuity of $f$ in $x_0 \in I$.
Therefore $f$ is continuous in $x_0 \in I$.