Connectedness at a one-sided contact point (source code)

= Connectedness at a one-sided contact point
{title2=$A,B\text{ connected},\ B\cap\overline A\ne\varnothing\implies A\cup B\text{ connected}$}

Two disjoint <connected sets> can have a connected union when one contains a contact point of the other's <closure>. To prove the displayed criterion, suppose the union had a separation into disjoint nonempty relatively <open sets> $P,Q$. Each connected set lies wholly on one side; if both lie on the same side, the other side is empty. Otherwise assume $A\subset P$ and $B\subset Q$. Choose $b\in B\cap\overline A$. Since $Q$ is relatively open in the union and contains $b$, some ambient <open set> containing $b$ meets the union only in $Q$. It must nevertheless meet $A$ by the definition of <closure>, a contradiction.

For example, the open unit disc centred at zero and the closed unit disc centred at two are disjoint, but their union contains the common contact point one through the second disc and is <connected>. In this example it is even <path-connected>: the real segment from zero to one lies in the first disc except for its endpoint, and that endpoint belongs to the second disc. Omitting the contact point from both discs instead gives a disconnected union.