I have a question in the following exercise: Let \langle X, <\rangle be a total ordering with no first or last element, connected in the order topology and separable.Show that \langle X,<\rangle is isomorphic to the reals,\langle R,< \rangle.
We know that every countable totally order set which has no first or last element and which is dense in itself is isomorphic to the rationals. What I want to do is to extend the isomorphism $f$ between $D$ ,which is the countable dense subset of X, and the rationals. To extend this isomorphism I used the hypothesis that the space is connected, but I'm not sure if my extended function is well-defined :
Let $a \in X$, D_{ and $D_{>a}=\{d \in D: d>a\}$, since $R$ is connected $\exists r_a \in R$ $(f(D_{a}))$ , so the extended function will be $F(a)=r_a$.
The thing is that I'm not sure if I use the "connected" hypothesis properly and if $F$ is well-defined. Can someone help me?