Theory of the beam-plasma discharge