# Closed subgroups of $\hat{\mathbb{Z}}\cong\prod_{p}\mathbb{Z}_{p}$ as subsets?

Some definitions and notation

A procyclic group $G$ is a profinite group with a dense cyclic subgroup, or equivalently, $G$ is isomorphic to an inverse limit of discrete finite cyclic groups.

We denote the profinite completion of the integers (resp. the $p$-adic integers) by \begin{equation} \hat{\mathbb{Z}}=\varprojlim\mathbb{Z}/n\mathbb{Z} \qquad\qquad\qquad\mathbb{Z}_{p}=\varprojlim\mathbb{Z}/p^{n}\mathbb{Z} \end{equation}

Question

I've learned the fact that a torsion-free procyclic group $G$ is (topologically) isomorphic to product \begin{equation} G\cong\prod_{p\in S}\mathbb{Z}_{p}, \end{equation} where $S$ is some set of rational prime numbers. In particular, that \begin{equation} \hat{\mathbb{Z}}\cong \prod_{p\in P}\mathbb{Z}_{p}, \end{equation} where $P$ is the set of all prime numbers.

There is also the fact that a closed subgroup $G\subseteq\hat{\mathbb{Z}}$ is procyclic, which then implies that $G$ is isomorphic to a product of $\mathbb{Z}_{p}$' s over some set $S$ of primes.

Now, we can take some closed subgroups of $\prod_{p\in P}\mathbb{Z}_{p}$ which are obviously isomorphic to such a product of $\mathbb{Z}_{p}$'s, for instance, all of the subgroups of the form \begin{equation} 2^{i_{2}}\mathbb{Z}_{2}\times 3^{i_{3}}\mathbb{Z}_{3}\times 5^{i_{5}}\mathbb{Z}_{5}\times\dots \end{equation} with $i_{p}$ ranging the positive $(\geq 0)$ integers (and $\infty$ to represent the $\{0\}$ subgroup of $\mathbb{Z}_{p}$), for each prime $p$.

(This is due to the fact that $\mathbb{Z}_{p}\cong p^{i}\mathbb{Z}_{p}$ for each $i\geq 0$.) Note that the $\{0\}$ factors just make the prime vanish.

So, my question is: Can we describe the closed subgroups of $\prod_{p\in P}\mathbb{Z}_{p}$ as subsets?

I guess they are all of the above form, but since subgroups of a direct product are not simply products of subgroups, I'm not sure how to prove this. Do we even know if this is true?

I'm trying to get a clearer picture on the 'structure-lattice' of $\hat{\mathbb{Z}}$.

Thanks for any help or references!

By Pontryagin duality, closed subgroups of $\hat{\mathbb{Z}}$ are in order-reversing bijection with subgroups of $\mathbb{Q}/\mathbb{Z}$. Explicitly, define a pairing $f:\hat{\mathbb{Z}}\times\mathbb{Q}/\mathbb{Z}\to\mathbb{Q}/\mathbb{Z}$ by $$f\left(x,\frac{m}{n}\right)=\frac{(x\text{ mod }n)\cdot m}{n}$$ where $(x\text{ mod }n)$ denotes any element of $\mathbb{Z}$ which has the same image in $\mathbb{Z}/n\mathbb{Z}$ as $x$ does. Then given any subgroup $A\subseteq\mathbb{Q}/\mathbb{Z}$, there is a closed subgroup $$A^\perp=\{x:f(x,a)=0\text{ for all }a\in A\}\subseteq\hat{\mathbb{Z}},$$ and in fact every closed subgroup of $\hat{\mathbb{Z}}$ has this form for a unique subgroup $A\subseteq\mathbb{Q}/\mathbb{Z}$.
So we are reduced to classifying subgroups of $\mathbb{Q}/\mathbb{Z}$. This is not so hard: given a subgroup $A\subseteq\mathbb{Q}/\mathbb{Z}$, then $A$ contains a fraction $\frac{m}{n}$ in lowest terms iff its contains all fractions with denominator $n$. So $A$ is determined by the set $S$ of positive integers $n$ such that $A$ contains $\frac{1}{n}$. Moreover, the subgroup generated by $\frac{1}{n}$ and $\frac{1}{m}$ is the subgroup generated by $\frac{1}{\operatorname{lcm}(m,n)}$. It follows that a set $S$ of positive integers corresponds to a subgroup of $A$ iff $S$ is closed under taking factors and taking LCMs. Considering one prime at a time, this just means that there is a sequence of numbers $i_p\in\mathbb{N}\cup\{\infty\}$, one for each prime $p$, such that $A$ is generated by the elements $\frac{1}{p^{i_p}}$ (in the case $i_p=\infty$, this means that $A$ contains $\frac{1}{p^n}$ for all $n$).
Let's now convert this back into subgroups of $\hat{\mathbb{Z}}$. Note that $f(x,\frac{1}{p^{i_p}})=0$ iff $x$ is divisible by $p^{i_p}$, which is true iff the component of $x$ in $\mathbb{Z}_p$ is divisible by $p^{i_p}$. So this says that if $A$ is the subgroup of $\mathbb{Q}/\mathbb{Z}$ generated by the fractions $\frac{1}{p^{i_p}}$ for some sequence $(i_p)$, then $A^\perp$ is just the subgroup $$\prod_p p^{i_p}\mathbb{Z}_p\subseteq\prod_p\mathbb{Z}_p=\hat{\mathbb{Z}}$$ (here I follow your convention in the case $i_p=\infty$).
That is, every closed subgroup of $\hat{\mathbb{Z}}$ is in fact one of the "obvious" examples you listed.