  This is the fourth part of a series of papers developing a tensor product
theory of modules for a vertex operator algebra. In this paper, We establish
the associativity of $P(z)$-tensor products for nonzero complex numbers $z$
constructed in Part III of the present series under suitable conditions. The
associativity isomorphisms constructed in this paper are analogous to
associativity isomorphisms for vector space tensor products in the sense that
it relates the tensor products of three elements in three modules taken in
different ways. The main new feature is that they are controlled by the
decompositions of certain spheres with four punctures into spheres with three
punctures using a sewing operation. We also show that under certain conditions,
the existence of the associativity isomorphisms is equivalent to the
associativity (or (nonmeromorphic) operator product expansion in the language
of physicists) for the intertwining operators (or chiral vertex operators).
Thus the associativity of tensor products provides a means to establish the
(nonmeromorphic) operator product expansion.
