A spin network is defined as a diagram like the Feynman diagram which makes a basis of connections between the elements of a differentiable manifold for the Hilbert spaces defined over them, and for computations of amplitudes between two different hypersurfaces of the manifold. Any evolution of the spin network provides a spin foam over a manifold of one dimension higher than the dimensions of the corresponding spin network. A spin foam is analogous to quantum history.