Rank of an abelian group (source code)

= Rank of an abelian group

The rank of a finitely generated abelian group $G$ is the number $r$ of infinite cyclic factors in its invariant-factor decomposition, equivalently $\dim_{\mathbb Q}(G\otimes_{\mathbb Z}\mathbb Q)$.