Closure of product equals product of closures

Theorem
Let $\set {X_i}_{i \mathop \in I}$ be an arbitrary family of topological spaces.

Let:
 * $A_i \subset X_i$

for each $i \in I$.

Let $X = \ds \prod_{i \mathop \in I} X_i$ have the product topology.

Then:
 * $\ds \prod_{i \mathop \in I} \overline{A_i} = \overline {\prod_{i \mathop \in I} A_i}$

Proof
We proceed by double inclusion.

Suppose:
 * $\ds \family {x_i}_{i \mathop \in I} \in \prod_{i \mathop \in I} \overline {A_i}$

This means:
 * $x_i \in \overline {A_i}$

for each $i \in I$.

Let $U$ be an open set containing $\family {x_i}_{i \mathop \in I}$.

Since:
 * $x_i \in \overline {A_i}$

we can choose:
 * $y_i \in U_i \cap A_i$

and then:
 * $\ds \family {y_i}_{i \mathop \in I} \in U \cap \prod_{i \mathop \in I} A_i$

But $U$ was arbitrary, hence:
 * $\ds \family {x_i}_{i \mathop \in I} \in \overline {\prod_{i \mathop \in I} A_i}$

Conversely, suppose:
 * $\ds \family {x_i}_{i \mathop \in I} \in \overline {\prod_{i \mathop \in I} A_i}$

We want to show that:
 * $x_j \in \overline {A_j}$ for all $j$

Fixed $j$, we take $V_j$ to be open set in $X_j$ such that:
 * $x_j \in V_j$

Since $\pi_j^{-1} \sqbrk {V_j}$ is open in $\ds \prod_{i \mathop \in I} X_i$, we can pick:
 * $\ds \family {y_i}_{i \mathop \in I} \in \prod_{i \mathop \in I} A_i$

Then:
 * $y_j \in V_j \cap A_j$

so it follows that:
 * $x_j \in \overline {A_j}$

namely:
 * $\family {x_i}_{i \mathop \in I} \in \prod_{i \mathop \in I} \overline{A_i}$