  The many-body problem is usually approached from one of two perspectives: the
first originates from an action and is based on Feynman diagrams, the second is
centered around a Hamiltonian and deals with quantum states and operators. The
connection between results obtained in either way is made through spectral (or
Lehmann) representations, well known for two-point correlation functions. Here,
we complete this picture by deriving generalized spectral representations for
multipoint correlation functions that apply in all of the commonly used
many-body frameworks: the imaginary-frequency Mastubara and the real-frequency
zero-temperature and Keldysh formalisms. Our approach is based on separating
spectral from time-ordering properties and thereby elucidates the relation
between the three formalisms. The spectral representations of multipoint
correlation functions consist of partial spectral functions and convolution
kernels. The former are formalism independent but system specific; the latter
are system independent but formalism specific. Using a numerical
renormalization group (NRG) method described in an accompanying paper, we
present numerical results for selected quantum impurity models. We focus on the
four-point vertex (effective interaction) obtained for the single-impurity
Anderson model and for the dynamical mean-field theory (DMFT) solution of the
one-band Hubbard model. In the Matsubara formalism, we analyze the evolution of
the vertex down to very low temperatures and describe the crossover from
strongly interacting particles to weakly interacting quasiparticles. In the
Keldysh formalism, we first benchmark our results at weak and infinitely strong
interaction and then reveal the rich real-frequency structure of the DMFT
vertex in the coexistence regime of a metallic and insulating solution.
