# The Real line uniqueness …

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_{<a}=\{d \in D: d<a\}$ and $D_{>a}=\{d \in D: d>a\}$, since $R$ is connected $\exists r_a \in R$ $($$f(D_{<a}) < r_a < 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?

-

I don't think it's well defined yet, because you haven't argued that $r_a$ is unique. Also, you didn't use the fact that $X$ is connected, but rather the fact that $R$ is.
Connectedness of $X$ shouldn't be needed just to define the map $F : X \to R$. (After all, you can embed $Q$ in $R$ just fine.)
I would think the essential property of $R$ to use is its completeness (i.e. the least-upper-bound property). What if you define $F : X \to R$ by $$F(x) = \sup \{f(y) : y \in D, y \le x\}.$$ This should be well-defined, using the facts that $f$ is order preserving and $R$ is complete. It is also order preserving (this will use the density of $D$) and hence injective, and also continuous.
It is surjectivity where you will have to use connectedness of $X$: if $a \in R$ and $F^{-1}(a) = \emptyset$, then what can you say about $F^{-1}((-\infty, a))$ and $F^{-1}((a, \infty))$?