Solution (source code)

= Solution

The perturbative expansion of $Z[J]$ contains arbitrary <Feynman diagrams>, including disconnected products. The <linked-cluster theorem> gives
$$
Z[J]=Z[0]\exp\left(\sum_{C\ \text{connected}}C[J]\right),
$$
because the factorials from repeated connected components reproduce the exponential series. Therefore $W[J]=-\hbar\log Z[J]$ is the sum of <connected Feynman diagrams>.

The Legendre transform removes diagrams that disconnect upon cutting one internal line. Equivalently, every connected diagram is a tree whose vertices are exact one-particle-irreducible vertices and whose edges are exact propagators. Thus
$$
\boxed{\Gamma[\Phi]=S[\Phi]+\text{the sum of loop-level one-particle-irreducible diagrams},}
$$
and its functional derivatives are the <one-particle-irreducible correlation functions>. Algebraically, differentiating the Legendre relations gives
$$
\int d^dz\,
\frac{\delta^2\Gamma}{\delta\Phi(x)\delta\Phi(z)}
\frac{\delta^2W}{\delta J(z)\delta J(y)}
=-\delta^{(d)}(x-y),
$$
so an exact <quantum field theory propagator> joining two proper vertices is precisely the inverse <Hessian matrix> needed to reconstruct connected diagrams.