Before stating the claim, let my define all the objects which I need: To start with, let me fix notation:
- Let $P$ be a principal $G$-bundle over a (smooth, compact, oriented) manifold $\mathcal{M}$ (possibly with boundary) and $\mathfrak{g}$ be the Lie algebra of $G$. Furthemore, let us choose a connection $1$-form $A\in\Omega^{1}(P,\mathfrak{g})$.
- Let $(V,\rho)$ be a (finite-dimensional real/complex) representation of $G$ and $E:=P\times_{\rho} V$ be the associated vector bundle.
- Let $\langle\cdot,\cdot\rangle_{V}$ be a non-degenerate symmetric bilinear form on $V$. Then it is a general fact that this induces a bundle metric $\langle\cdot,\cdot\rangle_{E}\in\Gamma(E^{\ast}\otimes E^{\ast})$ on $E$ via $$\langle [p,v],[p,w]\rangle_{E_{x}}:=\langle v,w\rangle_{V}$$ for all $x\in\mathcal{M}$ and for all $[p,v],[p,w]\in E_{x}\cong P_{x}\times_{\rho}V$.
Furthermore, I need two further definitions: First of all, the wedge-product $\mathrm{tr}(\cdot\wedge\cdot):\Omega^{k}(\mathcal{M},E)\times\Omega^{l}(\mathcal{M},E)\to\Omega^{k+l}(\mathcal{M})$ is defined in the obvious way, i.e. $$\mathrm{tr}(\alpha\wedge\beta)_{x}(v_{1},\dots,v_{k+l}):=\frac{1}{k!l!}\sum_{\sigma\in\mathfrak{S}^{k+l}}\mathrm{sgn}(\sigma)\langle \alpha_{x}(v_{\sigma(1)},\dots,v_{\sigma(k)}),\beta_{x}(v_{\sigma(k+1)},\dots,v_{\sigma(k+l)})\rangle_{E_{x}}$$ for all $x\in\mathcal{M}$ and for all $v_{1},\dots,v_{k+l}\in T_{x}\mathcal{M}$. Secondly, I need the "exterior covariant derivative induced by a connection 1-form $A$", which is the exterior covariant derivative induced by a connection $\nabla^{A}$ on $E$, whose definition is not so important right now. This is a map $\mathrm{d}_{A}:\Omega^{k}(\mathcal{M},E)\to\Omega^{k+1}(\mathcal{M},E)$ defined using a local frame $\{e_{a}\}_{a}\subset\Gamma(U,E)$ defined on some open set $U\subset\mathcal{M}$ via $$\mathrm{d}_{A}\alpha\vert_{U}:=\sum_{a}(\mathrm{d}\alpha^{a}e_{a}+(-1)^{k}\alpha^{a}\wedge\nabla^{A}e_{a})$$ where $\alpha\vert_{U}=\sum_{a}\alpha^{a}e_{a}$ for coordinates $\alpha^{a}\in\Omega^{k}(U)$. (Strictly speaking, I should write $\alpha^{a}\otimes e_{a}$, but let me keep notation simple)
Now I would like to prove the following:
$$\mathrm{d}(\mathrm{tr}(\alpha\wedge\beta))=\mathrm{tr}(\mathrm{d}_{A}\alpha\wedge\beta)+(-1)^{k}\mathrm{tr}(\alpha\wedge\mathrm{d}_{A}\beta)$$
I have to say that I am not sure if this is actually true in this form. It is rather an educated guess. For context, the reason for this is that something like this is implicitely used on page $4$ of arXiv:gr-qc/9905087 in the proof of invariance of the BF-action under translational symmetry. (In this context, the bundle $E$ is given by the adjoint bundle $\mathrm{Ad}(P)$). In this paper, the authors used "integration by parts" for an expression of the type $\mathrm{tr}(\mathrm{d}_{A}\eta\wedge F)$, where $\eta\in\Omega^{d-3}(\mathcal{M},\mathrm{Ad}(P))$ and where $F\in\Omega^{2}(\mathcal{M},\mathrm{Ad}(P))$ denotes the curvature of $A$.
Now my attempt is the following: I think it is easier to proof this in the local frame on $U$. Let us write $\alpha\in\Omega^{k}(\mathcal{M},E)$ and $\beta\in\Omega^{l}(\mathcal{M},E)$ in this frame, i.e. $$\alpha\vert_{U}=\sum_{a}\alpha^{a}e_{a}\hspace{1cm}\text{and}\hspace{1cm}\beta\vert_{U}=\sum_{a}\beta^{a}e_{a}$$ for real-valued coordinate forms $\alpha^{a}\in\Omega^{k}(U)$,$\beta^{a}\in\Omega^{l}(U)$. Then the above defined trace-wedge product is in coordinates given by $$\mathrm{tr}(\alpha\wedge\beta)\vert_{U}=\sum_{a,b}(\alpha^{a}\wedge\beta^{b})\langle e_{a},e_{b}\rangle_{E}$$
where $\langle e_{a},e_{b}\rangle_{E}$ is defined in the obious way, i.e. $\langle e_{a},e_{b}\rangle_{E}(x):=\langle e_{a}(x),e_{a}(x)\rangle_{E_{x}}$. With this, the left-hand side of the conjectured equation is given by $$\mathrm{d}(\mathrm{tr}(\alpha\wedge\beta))\vert_{U}=\sum_{a,b}(\mathrm{d}\alpha^{a}\wedge\beta^{b}+(-1)^{k}\alpha^{a}\wedge\mathrm{d}\beta^{b})\langle e_{a},e_{b}\rangle_{E}$$ where we just used the standard Leibniz rule for real-valued forms. Now for the right-hand side, let us firstly write $\nabla^{A}e_{a}$ in terms of local connection $1$-forms ${\omega^{i}}_{j}\in\Omega^{1}(U)$ via $$\nabla^{A}e_{a}=\sum_{b}{\omega^{b}}_{a}e_{b}.$$ With this, we have that
$$\mathrm{d}_{A}\alpha\vert_{U}:=\sum_{a}(\mathrm{d}\alpha^{a}e_{a}+(-1)^{k}\sum_{c}(\alpha^{a}\wedge{\omega^{c}}_{a})e_{c})=\sum_{a}(\mathrm{d}\alpha^{a}+(-1)^{k}\sum_{c}(\alpha^{c}\wedge{\omega^{a}}_{c}))e_{a}$$
Now we know how the coordinate forms of $\mathrm{d}_{A}\alpha$ look like and hence we can compute the right-hand side: First of all, we have that
$$\mathrm{tr}(\mathrm{d}_{A}\alpha\wedge\beta)\vert_{U}=\sum_{a,b}(\mathrm{d}\alpha^{a}\wedge\beta)\langle e_{a},e_{b}\rangle_{E}+(-1)^{k}\sum_{a,b,c}(\alpha^{c}\wedge{\omega^{a}}_{c}\wedge\beta^{b})\langle e_{a},e_{b}\rangle_{E}$$
Completely analogues, we find that
$$\mathrm{tr}(\alpha\wedge\mathrm{d}_{A}\beta)\vert_{U}=\sum_{a,b}(\alpha^{a}\wedge\mathrm{d}\beta^{b})\langle e_{a},e_{b}\rangle_{E}+(-1)^{l}\sum_{a,b,c}(\alpha^{a}\wedge\beta^{c}\wedge{\omega^{b}}_{c})\langle e_{a},e_{b}\rangle_{E}$$
Hence, if the above formula is true, we must have that
$$\sum_{a,b,c}(\alpha^{c}\wedge{\omega^{a}}_{c}\wedge\beta^{b}+(-1)^{l}\alpha^{a}\wedge\beta^{c}\wedge{\omega^{b}}_{c})\langle e_{a},e_{b}\rangle_{E}\stackrel{!}{=}0$$
I can't see why this is the case. Again, I should stress that I am not even sure if the claimed equality is true. Maybe it is false, or maybe the factor $(-1)^{k}$ is different. Furthemore, in the paper cited above this is only used for the case $E=\mathrm{Ad}(P)$, $k=d-2$ and $l=2$, where $d=\mathrm{dim}(\mathcal{M})$, so maybe it is only true in this specific case. Any help and comment is appreciated!