# Relation between the notions connected and disconnect, confused

In the textbook "Topology without tears" I found the definition.

$(X, \tau)$ is diconnected iff there exists open sets $A,B$ with $X = A \cup B$ and $A \cap B = \emptyset$.

In Walter Rudin: Principles of Analysis, I found.

$E \subseteq X$ is connected iff it is not the union of two nonempty separated sets. Where two sets $A,B$ are separeted iff $A \cap \overline{B} = \emptyset$ and $\overline{A} \cap B = \emptyset$.

So I am confused, why is in the first defintion nothing about the concept of separted sets said, for these two definitions are not logical negates of one another????

Leb $X$ be disconnected as in the first sense. Then there are (nonempty) open sets $A$, $B$ in $X$ such that $X = A \cup B$ and $A \cap B = \emptyset$, that is $X\setminus A = B$. Now since $A$ is open in $X$, the set $B$ is the complement of an open set, so $B$ is closed and $\overline B = B$. Therefore, $A \cap B = \emptyset$ becomes $A \cap \overline B = \emptyset$. Do the same for $A$ and $\overline A \cap B$. So the space is the union of two separated sets and therefore not connected.
Let $X$ be not connected as in the second sense. Then there are (nonempty) separated sets $A$, $B$ in $X$ such that $X = A \cup B$. Since $A \cap \overline B = \emptyset$, you have $A = X\setminus \overline B$, so $A$ is open in $X$. Do the same for $B$. From $A \cap \overline B = \emptyset$ you also get $A \cap B = \emptyset$, since $B \subseteq \overline B$. Therefore, the space is the union of nonempty open sets, so the space is disconnected.
Now, the definition given by Rudin mentions subsets, but extending the first definition by calling a subset $E \subseteq X$ connected if $E$ is connected with respect to the subspace topology, and checking that $E \subseteq X$ is disconnected if and only if $E \subseteq E$ is disconnected with respect to the subspace topology, you see, that both notions are really the same.
First, note that one should (in both versions) add that $A,B$ should be nonempty.
If $A,B$ are open and disjoint, then also $\overline A$ and $B$ are disjoint as $\overline A$ is the intersection of all closed sets containing $A$, thus $\overline A$ is a subset of the closed set $X\setminus B$.