Does the rank of homology and cohomology groups always coincide? Let $(C_i)_{i \in \mathbb{Z}}$ be a chain complex of free abelian groups. Does the rank of the homology and cohomology groups of $(C_i)_{i \in \mathbb{Z}}$ always coincide, i.e. is 
$$\operatorname{rank}(H_i(C_*))=\operatorname{rank}(H^i(C_*))$$
for every integer i?
If every homology group $H_i(C_*)$ is finitely generated, we can use a combination of the universal coefficients theorem and the fundamental theorem for finitely generated abelian groups to show this fact. 
But is it also true in the case where the homology groups are not finitely generated?
 A: Here is a counterexample: let
$$C_i = \begin{cases}
\bigoplus_{n \in \mathbb{N}} \mathbb{Z} & i = 0 \\
0 & i \neq 0 \end{cases}$$
with the zero differential. Then 


*

*$H_0(C)=\bigoplus_{n \in \mathbb{N}} \mathbb{Z}$ has countably infinite rank;

*$H^0(C) = \prod_{n \in \mathbb{N}} \mathbb{Z}$ has a rank $2^{\aleph_0}$ by a theorem of Nöbeling.



It's possible even when the $H_i$ have finite rank that the cohomology has bigger rank. Let:
$$C_i = \begin{cases}
\bigoplus_{n \in \mathbb{N}} \mathbb{Z} & i = 0,1 \\
0 & i \neq 0,1
\end{cases}$$
and the differential $d : C_1 \to C_0$ is given by multiplication by $2^n$ on the $n$th factor (so that $d(C_1) = \bigoplus 2^n \mathbb{Z}$). 


*

*$H_0(C) = \bigoplus_{n \in \mathbb{N}} \mathbb{Z}/2^n$, and $H_i(C) = 0$ elsewhere, so all homology groups have rank zero (because every element in $H_0$ is torsion);

*We can apply the universal coefficient theorem, because every $C_i$ and $d(C_i)$ is projective (and even free abelian). Therefore
$$H^1(C) = \operatorname{Ext}^1_\mathbb{Z}(H_0(C), \mathbb{Z}) = \prod_{n \in \mathbb{N}} \mathbb{Z}/2^n$$
(because $\hom(\mathbb{Z}/2^n, \mathbb{Z}) = 0$ and $\operatorname{Ext}$ sends arbitrary direct sums in the first factor to products). But this group has rank at least one (and probably even infinite), because $x = (1,1,1,\dots)$ has infinite order.

