Union of Connected Sets with Non-Empty Intersections is Connected

Theorem
Let $$T$$ be a topological space.

Let $$I$$ be an indexing set.

For each $$i \in I$$, let $$A_i$$ be a connected subspace of $$T$$.

Suppose that $$\forall i, j \in I: A_i \cap A_j \ne \varnothing$$.

Then $$A = \bigcup_{i \in I} A_i$$ is connected.

Corollary
Let $$T$$ be a topological space.

Let $$I$$ be an indexing set.

For each $$i \in I$$, let $$C_i$$ be a connected subspace of $$T$$.

Let $$B$$ be a connected subspace of $$T$$ such that $$\forall i, j \in I: B \cap C_i \ne \varnothing$$.

Then $$B \cup \bigcup_{i \in I} C_i$$ is connected.

Proof
Let $$D = \left\{{0, 1}\right\}$$ be a discrete space.

Let $$f: A \to D$$ be continuous.

To show that $$A$$ is connected, we need to show that $$f$$ is not a surjection.

Since each $$A_i$$ is connected and the restriction $$f \restriction_{A_i}$$ is continuous, $$f \left({A_i}\right) = \left\{{\epsilon_i}\right\}$$ where $$\epsilon_i = 0$$ or $$1$$.

But $$\forall i, j \in I: A_i \cap A_j \ne \varnothing$$.

Hence $$\epsilon_i = \epsilon_j$$ and so $$f$$ is constant on $$A$$ as required.

Proof of Corollary
Put $$A_i = B \cup C_i$$ and use the main result twice.