Could someone explain to me why in the following proof $\bigcup Y_F=Y$ (is the bold text)?
$\forall i\in I$, if $X_i$ is connected, then $\prod_{i\in I} X_i$ is connected.
Proof. First prove that any finite product of connected spaces is connected. This can be done by induction on the number of spaces, and for two connected spaces $X$ and $Y$ we see that $X \times Y$ is connected, by observing that $X \times Y = (\cup_{x \in X} (\{x\} \times Y)) \cup X \times \{y_0\}$, where $y_0 \in Y$ is some fixed point. This is connected because every set $\{x\} \times Y$ is homeomorphic to $Y$ (hence connected) and each of them intersects $X \times \{y_0\}$ (in $(x,y_0)$), which is also connected, as it is homeomorphic to $X$. So the union is connected by standard theorems on unions of connected sets. Now finish the induction. So for every finite set $I$, $\prod_{i \in I} X_i$ is connected.
Now if $I$ is infinite, fix points $p_i \in X_i$ for each $i$, and define $$Y = \{ (x_i) \in \prod_i X_i: \{i \in I: x_i \neq p_i \} \text{ is finite }\}$$
Now for each fixed finite subset $F \subset I$, define $Y_F = \{ (x_i) \in \prod_i X_i: \forall i \notin F: x_i = p_i \}$. By the obvious homeomorphism, $Y_F$ is homeomorphic to $\prod_{i \in F} X_i$, which is connected by the first paragraph.So all $Y_F$ are connected, all contain the point $(p_i)_{i \in I}$ of $\prod_{i \in I} X_i$, and their union (over all finite subsets $F$ of $I$) equals $Y$. So again by standard theorems on the union of connected subsets of a space, $Y$ is a connected subspace of $\prod_{i \in I} X_i$.
Finally note that $Y$ is dense in $\prod_{i \in I} X_i$, because every basic open subset $O$ of the product depends on a finite subset of $I$, in the sense that $O = \prod_{i \in I} U_i$ where all $U_i \subset X_i$ are non-empty open and there is some finite subset $F \subset I$ such that $U_i = X_i$ for all $i \notin F$. Pick $q_i \in U_i$ for $i \in F$ and set $q_i = p_i $ for $i \notin F$. The $(q_i)_{i \in I}$ is in $O \cap Y_F \subset O \cap Y$, so every (basic) open subset of $\prod_{i \in I} X_i$ intersects $Y$.
Now use that the closure of a connected set is connected to conclude that $\prod_{i \in I} X_i$ is connected, also for infinite $I$.
This proof was made by Henno here Connected topological spaces, product is connected . I already asked Henno but I got more confused.