Does $\mathbb{Z}^{\omega}$ have a weird submodule with a nice basis? Surprisingly, I think this will be relevant for my algebraic topology work.

Give the module $\mathbb{Z}^{\omega}$ the product topology, and let $M$ be one of its closed submodules.

Let $\mathbf{0}$ be the additive identity element of those modules.

Suppose there exists a countably infinite subset $B$ of $M$ such that
for all functions $\: f : B\to \mathbb{Z} \:$, $\:$ if $\;\; \displaystyle\sum_{b\in B} \: (\:f(b) \cdot b) \; = \; \mathbf{0} \;\;$ then $\; f$ is identically zero
and
for all members $x$ of $M$, there exists a function $\: f : B\to \mathbb{Z} \:$ such that $\;\; \displaystyle\sum_{b\in B} \: (\:f(b) \cdot b) \; = \; x$
.


Does it follow that $M$ is homeomorphically isomorphic to $\:\mathbb{Z}^{\omega}\:$?

 A: Every closed submodule is homeomorphic to $\Bbb Z^\Bbb Z$ or to a $\Bbb Z^n$ for some $n$ :
Set $M_0 = 0, M^0 = M, B_0 = \emptyset$. $M_0$ is the closed submodule generated by $B_0$, $M = M_0 \oplus M^0$.
If $M^n \neq \{0\}$, pick the smallest $l_{n+1} \in \omega$ such that $\pi_{l_n}(M^n) = k\Bbb Z\neq \{0\}$, and pick an element $b_{n+1} \in M^n$ such that $(b_{n+1})_{l_{n+1}} = k$.
Now pick $B_{n+1} = B_n \cup \{b_{n+1}\}, M_{n+1} = M_n \oplus \Bbb Z b_{n+1}, M^{n+1} = \{ v \in M^n / v_{l_{n+1}} = 0\}$ .
We still have that $B_{n+1}$ generates $M_{n+1}$ and the decomposition $M = M_{n+1} \oplus M^{n+1}$
Repeat this as much as you can. If $M^n = 0$ for some $n$, then $M \approx M_n \approx \Bbb Z^n$.  
If not, then you have built a base $B = \{b_1, b_2 \ldots \}$, which looks triangular if you put it in matrix form. In particular, for any $l \in \omega$ there is only finitely many $n$ with $(b_n)_l \neq 0$, so the map $\varphi : f \in \Bbb Z^\Bbb Z \mapsto \sum f(n) b_n \in M$ is defined everywhere.
If $\varphi(f) = 0$ then you can show by induction on $n$ that $f(n) = 0$.
$\varphi$ is continuous because the first $l_n$ values of $\varphi(f)$ only depends on first $n$ values of $f$.
$\varphi$ is surjective : if $u \in M$, you have no choice, you have to choose $f(n)$ while looking at $u_{l_n}$, and the sum obtained cannot differ from $u$ from the way we picked the $l_n$.
$\varphi^{-1}$ is continuous, again because the first $n$ values of $f$ are determined by the first $l_n$ values of $\varphi(f)$
