A finitely generated abelian group has a finite generating set. Equivalently, it is the cokernel of a homomorphism between finitely generated free abelian groups.
Present a finitely generated abelian group as the cokernel of an integer matrix . Changing by the invertible row and column operations used in its Smith normal form does not change the isomorphism type of the cokernel. If
then
where factors with may be omitted. This is the Fundamental theorem of finitely generated abelian groups; the rank of an abelian group and invariant factors are unique.
Let be the surface with boundary obtained by deleting the interiors of the disks. By excision,
so and the other relative groups vanish. In the long exact sequence in relative homology, the map
sends an orientation class to , up to an overall choice of sign. It is therefore injective and has cokernel . Exactness gives and a short exact sequence
This sequence splits because its right-hand group is a free abelian group. Since is connected, we obtain