First, the definition of a connected set:
Definition: A topological space is connected if, and only if, it cannot be divided in two nonempty, open and disjoint subsets, or, similarly, if the empty set and the whole set are the only subsets that are open and closed at the same time.
I don't understand some points in the following proof, that every interval $I \subset \mathbb{R}$ is connected.
Suppose $I = A \cup B$ and $A \cap B = \emptyset$, $A$ and $B$ are both non-empty and open in the subspace-topology of $I \subset \mathbb{R}$. Choose $a\in A$ and $b\in B$ and suppose $a < b$. Let $s := \mathrm{inf}\{ x \in B ~|~ a < x \}$. Then in every neighborhood of $s$ there are points of $B$ (because of the definition of the infimum), but also of $A$, then if not $s = a$, then $a < s$ and the open intervall $(a,s)$ lies entirely in $A$. And so $s$ cannot be an inner point of $A$ nor $B$, but this is a contradiction to the property that both $A$ and $B$ be open and $s \in A \cup B$.
With the bold part, I have a problem, why it follows that $(a,s)$ lies entirely in $A$ and it that case it must be that $A = (a,s)$, or not?