A master functional for quantum field theory