Repeated Smith normal form puts a chain complex of finitely generated free abelian groups into its elementary decomposition of a finite free chain complex: one-term summands and two-term summands . Applying reverses a two-term summand but keeps the same multiplication by . Reading its homology gives the universal coefficient theorem for cohomology
split noncanonically. Thus if with finite, then
The universal coefficient theorem for homology with coefficients gives
If the middle group vanishes for every prime , so does the tensor term. Any nonzero free summand survives for every , and any nonzero finite summand survives for a prime dividing its order. Since integral homology is finitely generated, it must vanish in every degree. This is detection of integral acyclicity modulo primes.
For the displayed complex, write
Using , one obtains
Thus is the mapping cone of in this sign convention. Its long exact sequence in homology shows that is an isomorphism exactly when . If is an isomorphism with coefficients for every prime, then is acyclic for every . Prime-field detection makes integrally acyclic, so the integral long exact sequence gives
The Smith normal form of an integer matrix is a diagonal matrix
for which
with and . It exists and is unique.
The structure theorem for finitely generated modules over a principal ideal domain, specialized to , says that every finitely generated abelian group has a unique invariant-factor decomposition
Equivalently, its finite part is a direct sum of cyclic groups of prime-power order.
At the generic point of , the functions are units and the equation gives . Taking as a uniformizer yields
At , the functions are units and , so . Symmetrically, .
The complement of the three lines is , with
This unique factorization domain has trivial divisor class group, so part b says that generate . The units on are scalar multiples of , and their boundary valuation vectors are generated by
The resulting integer matrix has Smith normal form . Consequently
. The class of has order , so has torsion and is not free. A unimodular change of basis (Smith normal form, using ) gives .
Map to using its degree-two generator. The homotopy fibre is the total space of the corresponding circle bundle, is 2-connected, and has equal to that of . Over its total space is , with . The four-cell bundle is trivial; its relative degree-four generator has boundary , the lifted attaching map. The long exact sequence in relative homology and Hurewicz theorem therefore give . Smith normal form gives the displayed expression when , including .