Verify that every cylinder set is clopen 
Let $X := Σ^{\mathbb N}$ be the set of all configurations over an alphabet $Σ$. Every word $w = w_1w_2 · · · w_n ∈ Σ^∗$ defines a subset of $X$ by
$C(w) :=$ {$x ∈ X : x_1x_2 · · · x_n = w_1w_2 · · · w_n$} .
This is called the cylinder set with base $w$ in $X$. Observe that $C(λ) = X$.


(a) Verify that the cylinder sets in $X$ form a basis for a topology on $X$.


(b) Let us equip $X$ with the topology generated by the cylinder sets.
Verify that every cylinder set is clopen (i.e., both open and closed) in $X$.

My attempts:
(a) I have to prove the 2 properties of a basis for a topology.

*

*Every $\lambda$ in $X$ is some base element because $X=C(\lambda)$, so one base element suffices.

*For any two elements $B_1 = C(w_1)$ and $B_2 = C(w_2)$ and any $x \in B_1 \cap B_2$, we must find some $B_3$ containing $x$ sitting inside this intersection. We know that $x=x_1=w_1=x_2=w_2$. And I don't know how to continue from there to find such a $B_3$.

(b) I don't know how to prove this. Any help please? Thank you
 A: In the second part of (a) you have to prove:

if $v,w\in\Sigma^*$, and $x\in B(v)\cap B(w)$, then there is a $u\in\Sigma^*$ such that $x\in B(u)\subseteq B(v)\cap B(w)$.

Let $v=v_1 v_2\ldots v_m$ and $w=w_1 w_2\ldots w_n$. Then $x_k=v_k$ for $k=1,\ldots,m$, and $x_k=w_k$ for $k=1\ldots n$. Without loss of generality we may assume that $m\le n$, so that $v_k=x_k=w_k$ for $k=1,\ldots,m$. I claim that $B(w)\subseteq B(v)$.
Suppose that $y\in B(w)$; then $y_k=w_k$ for $k=1,\ldots,n$, so in particular $y_k=w_k=v_k$ for $k=1,\ldots,m$, and therefore $y\in B(v)$. Thus, $B(w)\subseteq B(v)$, and therefore $x\in B(w)\subseteq B(v)\cap B(w)$. That is, you can take $u=w$.
For (b) you know that the cylinder sets are open by definition, so you need only prove that they are also closed. Let $w=w_1\ldots w_n\in\Sigma^*$. The most straightforward way to show that $B(w)$ is closed is to show that $X\setminus B(w)$ is open, which you can do by showing that it is a union of cylinder sets.

*

*Show that $x\in X\setminus B(w)$ if and only if there is a $k\in\{1,\ldots,n\}$ such that $x_k\ne w_k$.

*Show that there is a $k\in\{1,\ldots,n\}$ such that $x_k\ne w_k$ if and only if $$x\in\bigcup_{\sigma\in\Sigma\setminus\{w_k\}}B(\sigma)\,.$$

*Conclude that $$X\setminus B(w)=\bigcup_{k=1}^n\bigcup_{\sigma\in\Sigma\setminus\{w_k\}}B(\sigma)\,,$$ which is a union of cylinder sets.

A: Give $\Sigma$ the discrete topology, which has a base $\mathcal{B}= \{\{\sigma\}\mid \sigma \in \Sigma\}$.
Then the cilinder sets are the basic sets in the product topology on $\Sigma^{\Bbb N}$ derived from this component base $\mathcal{B}$, namely of the form $\prod_n U_n$ where we have some $N \in \Bbb N$ such that $U_n \in \mathcal{B}$ for $n \ge N$ and $U_n = \Sigma$ for $n > N$. So we have a base because we recognise it as a the standard topology on $\Sigma^{\Bbb N}$, topologically.
As all sets in $\mathcal{B}$ are clopen (as $\Sigma$ has the discrete topology) the same holds for the product base derived from them. This is quite clear if you know about product topologies; e.g $\overline{\prod_n U_n} = \prod_n \overline{U_n}$ is classical.
