TITLE: Clopen subsets of $A^\Bbb N$ for finite $A$
QUESTION [8 upvotes]: Let $A$ be a finite set with the discrete topology and let $X = A^\Bbb N$ be the product space. Let 
$$
  \pi_n:X\to A^n
$$
be the projection map, i.e. $\pi_n(x_1,\dots,x_{n},x_{n+1},\dots) = (x_1,\dots,x_n)$. Each such map induces a partition of $X$ which we denote as $[x]_n=:\pi_n^{-1}(\pi_n(x))$. Such sets $[x]_n$ are the cylinders of the product topology on $X$. As it has been pointed out here, for each $x$ and $n$ the cylinder $[x]_n$ is clopen in $X$ and hence those are finite unions of cylinders.
My question is the following: is it true that clopen subsets of $X$ are exactly finite unions of cylinders - otherwise I am interested in a counterexample. Does the situation change in case $A$ is countable?
I guess this question is also related, but I am not sure whether answers there apply directly here.

REPLY [4 votes]: Just to add a bit about $A^\mathbb{N}$ where $A$ is infinite, consider just $\mathbb{N}^\mathbb{N}$.
Note that $$U = \bigcup_{i \in \mathbb{N}} [ \langle 2i \rangle ]$$ is a union of infinitely many cylinders whose complement $$V = \bigcup_{i \in \mathbb{N}} [ \langle 2i+1 \rangle ]$$ is also a union of infinitely many cylinders.  Therefore both of these are clopen.  So the situation does change in the infinite case.
Of course, you can copy examples of infinite unions of cylinders in $\{0,1\}^\mathbb{N}$ which are not clopen in this case, as well.  For example, if for each $i \in \mathbb{N}$ we denote by $\sigma_i$ the sequence $\langle 0 \cdots 0 1 \rangle$ of length $i+1$, then while $$W = \bigcup_{i \in \mathbb{N}} [ \sigma_i ]$$ is clearly open, it is not closed as the constant zero sequence is in the closure of the set.