I encountered the following definition of not connected in a metric space:
Let $(X, d)$ be a metric space. A set $E \subseteq X$ is NOT connected if and only if there exist open sets $A, B \subseteq X$ with $E \subseteq A \cup B$ such that $A \cap B = \emptyset, E \cap A \neq \emptyset, E \cap B \neq \emptyset$.
I want to negate this iff, is the following negation correction?
A set $E \subseteq X$ is connected if and only if for all open sets $A, B \subseteq X$ with $E \subseteq A \cup B$, either $A \cap B \neq \emptyset$ or $E \cap A = \emptyset$ or $E \cap B = \emptyset$.
Is this right?
Your answer is correct.
However, when $E$ is an open set, in fact the criteria can be "improved" to if $E = A \cup B$, then either ... (as in your question above) . Can you see why this is true? I am actually used to the latter definition with $=$, since normally open sets are checked for connectivity, at least basic examples. Of course, your definition is better, since it deals with any subset.