Global solutions of nonlinear relativistic wave equations for the scalar quantum field