= Solution
The gauge-invariant Yang-Mills and matter part $\mathcal L_0$ is BRST invariant because a BRST variation is a gauge transformation with ghost-valued parameter. For the <gauge-fixing fermion>
$$
\Psi=\bar c^a\left(G^a(A)-\frac{\xi}{2}B^a\right),
$$
the graded Leibniz rule gives
$$
Q\Psi
=B^aG^a-\frac{\xi}{2}B^aB^a
-\bar c^a\frac{\delta G^a}{\delta A_\mu^b}D_\mu^{bc}c^c,
$$
up to the common sign convention used to define the ghost term. This is precisely the gauge-fixing, auxiliary-field, and ghost sector of the displayed Lagrangian. Therefore
$$
\mathcal L=\mathcal L_0+Q\Psi,
\qquad
Q\mathcal L=Q\mathcal L_0+Q^2\Psi=0.
$$
Back to article page