Show that $A\cup \bigcup_{n\in\mathbb{N}}A_n$ is connected I have this exercise where we let $X$ be a topological space and $A_n\subseteq X$ $n\in\mathbb{N}$ connected subspaces. Suppose $A\subseteq X$ is another connected subspace satisfying $A\cap A_n\neq \emptyset$ for every $n\in\mathbb{N}$. Show that $A\cup \bigcup_{n\in\mathbb{N}}\subseteq X$ is connected.
I am thinking that I let B and C be open disjoint subsets. And I assume
$$A\cup \bigcup_{n\in\mathbb{N}}A_n=B\cup C$$
Then I want to show that $B=A\cup \bigcup_{n\in\mathbb{N}}A_n$ and $C=\emptyset$, but I am confused about how to do so.
Or the other way I am thinking I can do this is by contraction, so I'll assume that $A\cup \bigcup_{n\in\mathbb{N}}A_n$ is not connected, hence we'll have non-empty disjoint open subsets B and C such that $A\cup \bigcup_{n\in\mathbb{N}}A_n=B\cup C$. From this I am thinking I want to obtain either that A is not connected, there's exists a $n\in\mathbb{N}$ for which $A_n$ is not connected, or $A\cap A_n =\emptyset$, but I am confused about how to do so.
 A: The other answers are good, but I would like to present another solution, using a characterization of connected spaces which I find is often very useful :

Let $X$ be topological space. Then $X$ is connected if, and only if, every continuous function from $X$ to the discrete space $\{0,1\}$ is constant.

Then, let $f: A\cup \bigcup_n A_n \to \{0,1\}$ be continuous. Then $f$ is constant on $A$ and on each $A_n$. Since $A_n\cap A\neq \emptyset$, we see that $f$ is constant on $A\cup A_n$ and further on $A\cup \bigcup_n A_n$.
A: Your idea with such disjoint iopen sets $B,C$ is fine, just use that the given sets are connected.
As a generalization, we can replace $\Bbb N$ with an arbitrary non-empty index set $I$ (might be finite, might be much larger than $\Bbb N$)
Pick $i\in I$. Then $A_i\subseteq B$ or $A_i\subseteq C$ (or perhaps both). Wlog. $A_i\subseteq B$. Then $A\cap B$ is non-empty (contains $A\cap A_i$!), hence $A\not\subseteq C$. It follows that $A\subseteq B$. Then for each $j\in I$, $A_j\cap B$ is non-empty (contans $A\cap A_j$!). We conclude $A_j\subseteq B$. So ultimately
$$ A\cup\bigcup_{i\in I}A_i\subseteq B.$$
A: A more comparmentalized approach.
Lemma 1: If $X$ is a topological space, and $Y_1,Y_2$ are connected subspaces and $Y_1\cap Y_2\neq \emptyset$ then $Y_1\cup Y_2$ is connected.
Lemma 2: If $X$ is a topological space and $Y_1,Y_2,\dots$ are connected subspaces such that $Y_i\subseteq Y_{i+1}$ then $\bigcup Y_i$ is connected.

Once you have these two lemmas you have:
$$Y_N=A\cup \bigcup_{n=1}^{N} A_n$$
are all connected, using Lemma 1, by induction.
Then, since $Y_i\subseteq Y_{i+1},$ by Lemma 2:
$$\bigcup_{n=1}^{\infty} Y_n = A\cup \bigcup_{n=1}^{\infty} A_n$$
is connected.
So you just need to prove these two lemmas.

I’ll prove Lemma 2.
Assume $Y=\bigcup_i Y_i=U\cup V,$ with $U,V$ disjoint and open. Then
$$ Y =\bigcup_i (Y_i\cap U)\cup \bigcup_i (Y_i\cap V)$$
Let $m$ be a value such that $Y_m \neq \emptyset.$ Then one of $Y_m\cap U$ or $Y_m\cap V$ is non-empty. Assume it is $U.$
Then $Y_i\cap U\neq \emptyset$ for all $i\geq m.$ Bit this means $Y_i\cap V$ is empty for each $i\geq m.$ So $$V=\bigcup (Y_i\cap V)$$ is empty.
(If your definition of connected requires a non-empty space, $m=1.$ Otherwise, if there is no $m,$ then $Y$ is empty, so both $U,V$ are empty.)
A: You can easily use the definition to prove that $D=A\cup \bigcup_{n\in\mathbb{N}}A_n$ is connected, i.e., prove that $A\cup \bigcup_{n\in\mathbb{N}}A_n$ only has as open and closed subsets, simultaneously, the set itself and the empty set.
Consider a set $S\subset D$ that is open and closed and it is not the empty set. Therefore we want to prove that $S=D$, remember we are using the definition above.
As $S$ is not empty it has an element $s$ that must belong at $A$ or at some $A_j$ for some $j\in\mathbb{N}$.
If $s\in A$ then $S\cap A\neq\emptyset$ and $S\cap A$ is open and closed as $S$ and $A$ are both closed and open. As $A$ is connected then $S\cap A=A$ which means $A\subset S$. For every $n\in\mathbb{N}$ $A\cap A_n \neq \emptyset$ and so $S\cap A_n\neq \emptyset$. Using the same argument as above $A_n\subset S$ for every $n\in\mathbb{N}$. Conclusion $D \subset S$ as we wanted to prove.
If $s\in S\cap A_j $ for some $j\in\mathbb{N}$ the argument is similar.
