Is this proof that intervals are connected correct? First of all, the definition of conectedness I'm using here is: let $A\subset \mathbb{R}$, a split of $A$ is a pair $(A_1,A_2)$ of open subsets of $\mathbb{R}$ such that $A\subset A_1\cup A_2$ and $A_1\cap A_2=\emptyset$. The split is said to be trivial if $A_1\cap A = \emptyset$ or $A_2\cap A = \emptyset$. The set $A$ is said to be connected if it admits just trivial splits.
Now, with this in mind, my proof that every interval is connected is as follows:
Let $I\subset \mathbb{R}$ be an interval and suppose $I$ is not connected. Then there is a non-trivial split $(A,B)$ of $I$. In that case there is $a\in A\cap I$ and $b\in B\cap I$ and since $A\cap B = \emptyset$ then certainly $a\neq b$. Without loss of generality suppose $a < b$. Since $A$ and $B$ are open the following sets are not empty
$$S_1 = \{\epsilon \in \mathbb{R} : (a-\epsilon,a+\epsilon) \subset A\}, \\ S_2 = \{\epsilon \in \mathbb{R} : (b-\epsilon,b+\epsilon)\subset B\}.$$
They are also both clearly bounded above by $|b-a|$. In that case there exists the numbers $\epsilon_1 = \sup S_1$ and $\epsilon_2 = \sup S_2$. It is also clear that $a + \epsilon_1 \leq b - \epsilon_2$. Because of that we can consider the midpoint
$$x = \dfrac{(a+\epsilon_1)+(b-\epsilon_2)}{2}.$$
This element is such that $a + \epsilon_1 \leq x \leq b-\epsilon_2$. But by definition of $\epsilon_1,\epsilon_2$ this means that $x\notin A$ and $x\notin B$ so that $x\notin A\cup B$. Now, $I\subset A\cup B$, hence $x\notin I$, and still, $a < x< b$ with $a,b\in I$, contradicting the fact that $I$ is an interval. In that case $I$ is connected.
I'm a little unsure of this proof becuase of the way I picked $\epsilon_1$ and $\epsilon_2$. Is the proof correct? Is something I've missed along the way?

Hint: your argument doesn't work, as you can see by taking $I = (0, 1)$, $A = (0, 1/4)$, $B = (1/4, 1)$, $a = 1/10$ and $b = 9/10$. You will get $\epsilon_1 = \epsilon_2 = 1/10$ and $x = 1/2 \in B$. This is because you are looking at intervals contained in $A$ (resp. $B$) that are symmetric around $a$ (resp. $b$). Instead, try assuming (without loss of generality) that $a < b$ and consider the supremum of the $\alpha$ such that  $(a, a + \alpha) \subseteq A$ and the supremum of the $\beta$ such that $(b - \beta, b) \subseteq B$.
