Let $X\subseteq \mathbb R$ be a metric space. I'm trying to prove that if a subset $I$ is non connected, it implies that $\exists a,b \in I$, $a<b$, $\exists x, a<x<b$ such that $x\notin I$.
I am trying it, using the following definition of non connectedness:
$I$ is not connected iff $\exists A,B\subseteq X$ such that
- $A\cap B = \emptyset$
- $A\cup B = I$
- $A,B$ are open in $X$
So, starting with $I$ is not connected, there exists $A,B$ verifying the three above-mentioned points.
Pick $a\in A$ and $b\in B$ and suppose WLOG that $a<b$ (you can exchange them otherwise).
Now, I only need to pick a suitable $x$ that verifies $x \notin A\cup B$.
But for that I think that I'll need to prove the lemma:
If $A,B⊆X⊆\mathbb R$, $A\cap B=∅$ and $A,B$ open then $\sup A<\inf B$
I know that after proving the lemma I will be able to pick $x= \frac{\sup A + \inf B}{2}$.
I feel like this lemma is above my math skills, if anyone can give me hints in order to prove it I would be grateful.
Thanks in advance.