Disconnectedness on the Real Line

Theorem. If a set $E \subset \mathbb{R}$ is disconnected, then there exist $x, y \in E$, and some $z \in \mathbb{R} \setminus E$ with $x < z < y$.

I want to prove this theorem using the following definition of disconnectedness:

Definition. A subset $E$ of a metric space $X$ is disconnected if there exist $U, V \subset X$ such that:

1. $U$ and $V$ are open relative to $X$ (meaning every point of $U / V$ has some neighborhood which is completely contained in $U / V$)
2. $E \subset U \cup V$
3. $E \cap U \neq \emptyset$ and $E \cap V \neq \emptyset$
4. $E \cap U \cap V = \emptyset$

Here's what I have so far:

There must be some $x \in E \cap U$, and some $y \in E \cap V$ (since they are nonempty), and we assume without loss of generality that $x < y$. Now let $z =$???

-
The "Theorem" you wish to prove is false as stated. Consider $E = (0,1) \cup \{ 2 \}$. This is a disconnected subset of $\mathbb{R}$, but for $x = \frac{1}{4}$ and $y = \frac{3}{4}$ there is no $x < z < y$ which is not in $E$. Perhaps you meant "... there are two points $x,y \in E$ and some $z \in \mathbb{R} \setminus E$ with $x < z < y$? – arjafi Mar 5 '12 at 19:21
Yes, I meant "there exist $x, y \in E$ such that..." Thanks for pointing out the typo! – jamaicanworm Mar 5 '12 at 19:23
Tricky problem-a good one for a take home problem set in either analysis or point-set topology. – Mathemagician1234 Mar 5 '12 at 19:46

First, for simplicitly, define $U'=E\cap U$ and $V'=E\cap V$.

Set $w=\sup( [x,y] \cap U')$ and then $v=\inf( [w,y] \cap V')$.

Finally take $z=\frac{w+v}{2}$. We must prove that that this $z$ can be in neither $U'$ nor $V'$.

If $v\ne w$, this is immediate, because then the entire interval $(w,v)$ must be disjoint from both $U'$ and $V'$.

On the other hand, if $v=w$, then $z=v=w$, and every neighborhood of $z$ must contain both points from $U'$ and points from $V'$. Because $U'$ is closed in $E$ and $U'\cap V'=\varnothing$, this means that $z$ cannot be in $U'$, and similarly $z\not\in V'$.

-
My apologies -- it was not necessarily true, and the question is a bit more involved than it seemed at first. I've extended the answer to something that is hopefully correct. – Henning Makholm Mar 5 '12 at 21:23
Do you mean $v = \inf([x, y] \cap V')$, or $v = \inf([w, y] \cap V')$ (what you wrote)? – jamaicanworm Mar 5 '12 at 22:26
I mean $[w,y]$ as written. Notice that later in the argument I depend on $v \ge w$ -- otherwise $(w,v)$ in the $w\ne v$ case wouldn't be an interval. – Henning Makholm Mar 5 '12 at 22:52