Spacetime can be defined as a superposition of spin foams, which is a generalized Feynman diagram where instead of a graph, a higher-dimensional complex is used. In topology this sort of space is called a 2- complex. A spin foam is a particular type of 2- complex, with labels for vertices, edges and faces. The boundary of a spin foam is a spin network, just as in the theory of manifolds, where the boundary of an n-manifold is an (n-1)-manifold.