For and , choose . The Yang-Mills gauge transformation is
which ensures . Since
conjugating this commutator immediately gives
Thus the gauge field strength is gauge covariant.
For the convention in the question, a finite Yang-Mills gauge transformation acts covariantly on the field strength:
or with and exchanged if the opposite convention is used for . Cyclicity of the matrix trace gives
so the Yang-Mills theory Lagrangian is gauge invariant.
The quadratic gauge-field operator has zero directions along each gauge orbit. It therefore has no inverse on the full field space. Gauge fixing removes this degeneracy and produces a propagator, while the Faddeev-Popov determinant accounts for the corresponding Jacobian.
The boundary four-form is . To derive the identity, put and . The variations of the three polynomial terms in are respectively , , and . Their sum gives the identity because . For variations in a Lie algebra with basis , the bulk field equations are , not necessarily the unprojected matrix equation . Conjugation of both the Lie algebra and the gauge curvature proves covariance of these equations under Yang-Mills gauge transformations.