Union of closure of sets is the closure of the union: true for finite, false for infinite unions
Solution 1:
To prove the true statements we'll make use of the following facts:
- If $A \subseteq B$, then $\overline{A} \subseteq \overline{B}$.
- $x \in \overline{A}$ iff $U \cap A \neq \varnothing$ for every open neighbourhood $U$ of $x$. (This is in the more general context of general topological spaces. For metric spaces it suffices to restrict the $U$s to the open $\varepsilon$-balls centred at $x$.)
To see that $\bigcup_{i=1}^n \overline{A_i} \subseteq \overline{B_n}$ observe that $A_i \subseteq B_n$ for each $i \leq n$, and apply the first fact above.
To see that $\overline{B_n} \subseteq \bigcup_{i=1}^n \overline{A}_i$ note that this is equivalent to showing $X \setminus \bigcup_{i=1}^n \overline{A}_i \subseteq X \setminus \overline{B_n}$. If $x \in X \setminus \bigcup_{i=1}^n \overline{A_i}$, then by the second fact above it follows that for each $i \leq n$ there is an open neighbourhood $U_i$ of $x$ which is disjoint from $A_i$. Now note that $U := U_1 \cap \cdots \cap U_n$ is an open neighbourhood of $x$ which is disjoint from $B_n$.
Note that the first fact above also shows that $\bigcup_{i=1}^\infty \overline{A_i} \subseteq \overline{\bigcup_{i=1}^\infty A_i} = \overline{B}$.
To give an example of where the equality does not hold, just enumerate the set $\mathbb{Q}$ of rational numbers as $\{ a_i : i \in \mathbb{N} \}$, and for each $i$ define $A_i = \{ a_i \}$. Working in $\mathbb{R}$ with the usual (metric/order) topology, we can show that $$ {\textstyle \bigcup_{i=1}^\infty} \overline{A_i} = \mathbb{Q} \neq \mathbb{R} = \overline { {\textstyle \bigcup_{i=1}^\infty} A_i }. $$
Solution 2:
Hint 1: for $\overline{A_1}\cup\overline{A_2}\subset\overline{A_1\cup A_2}$
Suppose that $x\in\overline{A_1}$. This means that for any open $U$ containing $x$, $U\cap A_1\not=\varnothing$. Obviously, for any $U$ containing $x$, $U\cap(A_1\cup A_2)\supset U\cap A_1\not=\varnothing$. Thus, if $x\in\overline{A_1}$, then $x\in\overline{A_1\cup A_2}$; that is, $\overline{A_1}\subset\overline{A_1\cup A_2}$.
Hint 2: for $\overline{A_1\cup A_2}\subset\overline{A_1}\cup\overline{A_2}$
Suppose that $x\in\overline{A_1\cup A_2}$. This mean that for any open $U$ containing $x$, $U\cap(A_1\cup A_2)\not=\varnothing$. Suppose that $x\not\in\overline{A_1}$; that is, for some open $U_1$ containing $x$, we have that $U_1\cap A_1=\varnothing$, and that $x\not\in\overline{A_2}$; that is, for some open $U_2$ containing $x$, we have $U_2\cap A_2=\varnothing$. Consider $U=U_1\cap U_2$. Obviously, $U$ is open and $x\in U$. Find a contradiction.
Hint 3: for $\bigcup\limits_{i=1}^n\overline{A_i}=\overline{\bigcup\limits_{i=1}^nA_i}$
Use induction on $\overline{A_1}\cup\overline{A_2}=\overline{A_1\cup A_2}$.
Hint 4: for $\bigcup\limits_{i=1}^\infty\overline{A_i}\subset\overline{\bigcup\limits_{i=1}^\infty A_i}$
If $x\in\bigcup\limits_{i=1}^\infty\overline{A_i}$ then there is some $n$ so that $x\in\overline{A_n}$. Use Hint 3 to show $\overline{A_n}\subset\overline{\bigcup\limits_{i=1}^nA_i}$ and Hint 1 to show that $\overline{\bigcup\limits_{i=1}^nA_i}\subset\overline{\bigcup\limits_{i=1}^\infty A_i}$