Q:

a question on profinite group

Assume that a profinite group $G$ is generated by $X$ as abstract group. Here $X$ is assumed to be a closed subset of $G$ such that $X=X^{-1}$ and $1\in X$. 
For each $n$ let $X_n$ be the set of all finite products $x_1^{\pm 1}\cdots x_{n}^{\pm 1}$ where $x_1,\cdots, x_n\in X$. It is clear that
$$G=\bigcup_{n=1}^nX_n$$

How to prove that each $X_n$ is closed in $G$?

I think that it should be simple but I have not got an answer yet.
Thankssssss.

A:

Note that $X_n$, for $n > 1$, is the product of $X$, which is closed by assumption, and $X_{n-1}$, which we may assume to be closed by induction. (Here as usual the product of two subsets $A$ and $B$ of a group is the set $\{ a b : a \in A, b \in B\}$.)
Now in a topological group the product of two closed subsets need not be closed. A nice example is the sum of the subgroups $\mathbf{Z}$ and  $\sqrt{2} \, \mathbf{Z}$ of $\mathbf{R}$. 
But if one of the two subsets is compact, then the product is closed. 
Since a profinite group is compact, its closed subsets are compact, and we are done.

