'square'of Yang–Mills theory finds a natural interpretation in terms of homotopy algebras. We
significantly expand on our previous work arguing the validity of the double copy at the loop
level, and we give a detailed derivation of the double‐copied Lagrangian and BRST
operator. Our constructions are very general and can be applied to a vast set of examples.