TITLE: Why is cofiniteness included in the definition of direct sum of submodules?
QUESTION [10 upvotes]: In contrast to the possibility of taking  an arbitrary sequence of elements of submodules in the definition of direct product, the definition for the direct sum of submodules of a module requires the indexed elements to vanish cofinitely(i.e. except finitely many times).
More precisely, Let $R$ be a ring, and $\{M_i : i ∈ I\}$ a family of left $R-$modules indexed by the set $I$. The direct sum of ${M_i}$ is then defined to be the set of all sequences $(α_i)$ where $\alpha_i \in M_i$ and $α_i = 0$ for cofinitely many indices $i$. (The direct product is analogous but the indices do not need to cofinitely vanish.)(Source Wikipedia: Direct sum of modules.)We have similar definition for the sum of submodules.   
I have not yet understood what pathology would be incurred without assuming or what simplification (if any) would be gained in assuming cofiniteness. Can you please explain this in simple terms (possibly, with examples) ?
Thanks.

REPLY [8 votes]: To see an example of some pathology, while the direct sum of free modules is always free (with the obvious free basis), the direct product of free modules may fail to be free.
Take $R=\mathbb{Z}$; then $M = \mathop{\oplus}\limits_{n=1}^{\infty}\mathbb{Z}$ is free abelian, with basis given by the "obvious" elements $e_i$ (which have a $1$ in the $i$th coordinate and zeros elsewhere). However, $N = \prod\limits_{n=1}^{\infty} \mathbb{Z}$ is not free abelian. For example, Specker proved (Additive Gruppen von Folgen ganzer Zahlen, Portugaliae Math. 9 (1950) 131-140) that $N$ has only countably many homomorphisms onto $\mathbb{Z}$. But since $N$ is uncountable, if it were free it would be free in uncountably many generators, and hence would have uncountably many homomorphisms onto $\mathbb{Z}$ (at least the projections). In fact, if $X$ is any infinite set, then $\mathop{\oplus}_{x\in X}\mathbb{Z}$ is free abelian of rank $|X|$, but $\prod_{x\in X}\mathbb{Z}$ is never free abelian.
You have a related pathology with vector spaces (of course, every vector space is free, so that's not what the problem will be, but rather when you think about "free on what set?"). When working with finitely many vector spaces, you have that $\dim(V_1\times V_2) = \dim(V_1\oplus V_2) = \dim(V_1)+\dim(V_2)$ (in the sense of sum of cardinalities). However, once you have infinitely many vector spaces, the equality breaks down for the product, while it holds for the direct sum:
$$\dim\left(\bigoplus_{i=1}^{\infty} V_i\right) = \sum_{i=1}^{\infty}\dim(V_i)$$
but for products it need not hold: for a counterexample, take $V_i = \mathbb{Q}$ as a vector space over itself; the sum of dimensions is $\aleph_0$, but the direct product of denumerably many copies of $\mathbb{Q}$ is uncountable, so the dimension is $2^{\aleph_0}$ (so you have a "jump" in the dimension once you get to infinitely many elements).