How to assume something exists not within a set? I was trying to solve Munkres' Topology, Section 24, Exercise 4:

Let $X$ be an ordered set in the order topology. Show that if $X$ is connected, then $X$ is a linear continuum.

My proof went:

Least upper bound property: Proof by contradiction. Let $A$ be a subset of $X$, where an upper bound exists in $X$. Suppose $\sup A \notin X$. Then $(-\infty, \sup A) = \bigcup\{(-\infty, x) : x \in X \land x < \sup A\}$ and $(\sup A, \infty) = \bigcup\{(x, \infty) : x \in X \land \sup A < x\}$ form a separation of $X$. This is a contradiction.
Existence of intermediate value: Proof by contradiction. Let $x, y \in X$, where $x < y$. Suppose $(x,y) = \emptyset$. Then $(-\infty, y)$ and $(x, \infty)$ form a separation of $X$. This is a contradiction.

I'm not happy with the first proof. It makes sense to assume an element within a set. But this proof assumes something exists, but it is outside of the set. How is this consistent with the modern set theory? How can I make this proof more rigorous?
 A: Yeah, this is not legit.  The negation of "$A$ has a least upper bound in $X$" isn't "the least upper bound of $A$ is not in $X$", but rather "there is no element of $X$ which is a least upper bound of $A$".  In other words, "for every upper bound of $A$ there is another one which is lesser."
So instead, you could suppose that $A$ is a set that is bounded above but has no least upper bound.  Try considering the set $U$ of all the upper bounds of $A$, which is intuitively the set of "everything greater than the nonexistent sup", but makes better sense.  You should be able to show that $U$ and $X \setminus U$ are both open and nonempty.
Note that this is not really a proof by contradiction, but rather a contrapositive, since the statement being "contradicted" is precisely the original hypothesis.
A: One intuitive way to do this is to divide $X$ into two sets: $X_1$ will consist of all $x\in X$ such that we can find an $a\in A$ with the property that $x\le a$ and we let $X_2:=X_1^c$. Now, $X_1$ is non-empty for it contains $A$. And, by hypothesis, $A$ has an upper bound $z$, which cannot be in $A$ so $z>a$ for each $a\in A$, that is $z\in X_1^c$ so $X_1^c$ is also non-empty.
$(1).\ X_1$ is open: let $x\in X_1.$ Then, there is an $a\in A$ such that $x\le a$. If $x<a$ there is nothing to do. If $x=a$, then since $a\in A$ and $A$ has no least upper bound in $X$ there must be an $a_1\in A$ such that $x<a_1$. It follows that $X_1$ is open.
$(2).\ X_1^c$ is open: if $x\in X_1^c,$ then  $x>a$ for all $a\in A$, but by hypothesis it can't be the least upper bound so there is an $y\in X$ such that $a<y<x$.
We now have found a disconnection of $X$, and a so contradiction.
