Solution (source code)

= Solution

This is the <Gibbs--Bogoliubov--Feynman inequality>. In units with $k_BT=1$, $H$ is the exact dimensionless Hamiltonian, here the full interacting free-energy functional, and $H_0$ is a freely chosen trial Hamiltonian. Its <partition function> and free energy are
$$
Z_0=\int\mathcal D\phi\,e^{-H_0[\phi]},
\qquad
F_0=-\log Z_0.
$$
The notation
$$
\langle X\rangle_0
=Z_0^{-1}\int\mathcal D\phi\,X[\phi]e^{-H_0[\phi]}
$$
means an expectation in the trial Gibbs ensemble. The bound is therefore
$$
F=-\log\int\mathcal D\phi\,e^{-H}
\leq F_0+\langle H-H_0\rangle_0.
$$