Suppose that we can write $X = \bigcup_{i=1\cdots n} A_i$, where each $A_i$ is connected and for each $i = 2 \cdots n, A_i \cap A_{i-1} \neq \emptyset$ (means that consecutive $A_k$ are not disjoint). Prove that $(X, τ_X)$ is also connected.
The proof I was given starts like this :
Let $U$ and $V$ be two disjoint open subsets of $X$ such that $X = U \sqcup V$. Assume also that $U$ is non-empty. Note that since for each $i \in I, A_i$ is connected, either $A_i ⊆ U$ or $A_i ⊆ V$.
The last sentence (in bold) is not clear to me, it visually feels true but it is not proven rigorously here. What if $X$ is some subset of $\Bbb R$ and $U$ is some interval like $(\cdots,\frac12)$ and $V=[\frac12,\cdots)$ such that $X = U \sqcup V$, then if an $A_i$ is for example $(\frac12-\epsilon,\frac12+\epsilon)$ for some $\epsilon > 0$, we have that $A_i$ is connected but we do not have that $A_i ⊆ U$ or $A_i ⊆ V$.
Can someone explain why is the bold written sentence true ?
We have $A_i=(A_i\cap U)\sqcup (A_i\cap V)$ and these sets are open in the subspace topology of $A_i$.
Now using the definition of connectedness, we conclude that either $A_i\cap U$ or $A_i\cap V$ is empty and the statement follows.