$\newcommand{\sig}{\sigma}$
$\newcommand{\tr}{\operatorname{tr}\_{\eta}}$
$\newcommand{\al}{\alpha}$
$\newcommand{\be}{\beta}$
$\newcommand{\til}{\tilde}$


Let $E$ be a smooth vector bundle over a manifold $M$. Suppose $E$ is equipped with a metric $\eta$ and with a compatible metric connection $\nabla$. Note that $\nabla$ induces a connection on $E \otimes E$.


Let $\sig \in \Omega^k(M,E \otimes E)$ be an $E \otimes E$-valued differential form of degree $k$.


We denote by $d\_{\nabla}$ the corresponding *covariant exterior derviative* on $E \otimes E$-valued forms:


$$ d\_{\nabla}:\Omega^k(M,E \otimes E) \to \Omega^{k+1}(M,E \otimes E) $$


**Now we can apply contraction and exterior differentiation in two orders:**


(1) Let $\sigma \in \Omega^k(M,E \otimes E)$; $\, \,d\_{\nabla} \sig \in \Omega^{k+1}(M,E \otimes E)$, so $\tr(d\_{\nabla} \sig) \in \Omega^{k+1}(M)$ (a real valued form).


(2) $\tr(\sig) \in \Omega^{k}(M) \Rightarrow d\left(\tr(\sig)\right) \in \Omega^{k+1}(M)$ ($d$ is the standard exterior derivative of course)


**Question:** Is it true that $\tr(d\_{\nabla} \sig) =d\left(\tr(\sig)\right)$ ?


I tried to prove this via induction on the degree of the form, but I am unable to finish the proof (see details below).


I suspect there is a more general commuting property hiding in the shadows, i.e commutation between exterior derivative and contraction for $E^\* \otimes E$-valued forms. 


I would be happy to find a reference (or a self-contained proof, of course).


**Here is an attempt to prove this by induction on the degree:**


$k=0$: $\sig \in \Omega^0(M,E \otimes E)=\Gamma(E \otimes E)$. Let $X \in \Gamma(TM)$.


$$ d\_{\nabla} \sig \,(X)=\nabla\_x^{E \otimes E} \sig \in \Gamma(E \otimes E)$$


Since the assertion is local, we can assume $\sig=\al \otimes \be$, where $\al ,\be \in \Gamma(E)$. So, on the one hand


$$ (\*) \tr(d\_{\nabla} \sig) (X) = \tr \left(d\_{\nabla} \sig \left(X\right )\right) = \tr(\nabla\_x^{E \otimes E} \left (\al \otimes \be\right))=\tr(\nabla\_x^E \al \otimes \be) + \tr( \al \otimes \nabla\_x^E \be)$$


$$
=\widetilde{\nabla\_x^E} \al \,(\be) + \til \al (\nabla\_x^E \be)
$$


where given a section $\gamma \in \Gamma(E)$, we denote by $ \til \gamma \in \Gamma(E^\*)$ its corresponding section obtained using the metric $\eta$. 


On the other hand,


$$ \tr(\sig) =\tr(\al \otimes \be)= \til \al (\be)= \langle \al , \be \rangle\_{\eta} \in \Omega^0(M)=C^{\infty}(M),$$ hence


$$ (\*\*) \, d\left(\tr(\sig)\right) (X)= X \cdot \langle \al , \be \rangle\_{\eta} = \langle \nabla\_X^E \al , \be \rangle\_{\eta} + \langle \al , \nabla\_X^E \be \rangle\_{\eta} =\widetilde{\nabla\_x^E} \al \,(\be) + \til \al (\nabla\_x^E \be)$$


Now $(\*), (\*\*)$ implies the desired equality.


**Now, let us assume the assertion holds for all $j$-forms when $j < k$.**
 (I am not sure how to proceed from here)



Commuting of exterior derivative and contraction (vector-valued forms)
The general version you are looking for is the following: Suppose that$\Phi:V\to W$ is a vector bundle map between two vector bundles $V$ and $W$ over $M$. Suppose that we have connections $\nabla^V$ and $\nabla^W$, which are compatible with $\Phi$ in the sense that $\nabla^V\_\xi \Phi(s)=\Phi(\nabla^W s)$ for all $s\in\Gamma(V)$ and for any vector field $\xi\in{\frak{X}}(M)$. Then $\Phi$ induces maps $\Phi\_\*:\Omega^k(M,V)\to\Omega^k(M,W)$ by acting on the values of forms. The general statement is that $\Phi\_\*$ is compatible with the covariant exterior derivatives, i.e. $d^{\nabla^W}(\Phi\_\*(\alpha))=\Phi\_\*(d^{\nabla^V}\alpha)$ for any $\alpha\in\Omega^k(M,V)$. The case you are looking at is $V=E\otimes E$ and $\nabla^V$ the induced connection from the metric connection $\nabla$ on $E$ and $W=M\times\mathbb R$ with the trivial connection (so the covariant exterior derivative becomes the exterior derivative) and $\Phi=tr\_{\eta}$. The compatibility of $tr\_{\eta}$ with the two connections essentially is the definition of a metric connection and it is verified your question. 


Now for the proof of the general version, you just need the "global formula" for the covariant exterior derivative: Take vector fields $\xi\_0,\dots,\xi\_k\in{\frak X}(M)$ and a form $\beta\in\Omega^k(M,W)$. Then you can write $(d^{\nabla^W}\beta)(\xi\_0,\dots,\xi\_k)$ as
$$
\sum\_i(-1)^i\nabla^W\_{\xi\_i}\beta(\xi\_0,\dots,\widehat{\xi\_i},\dots,\xi\_k)+\sum\_{i<j}(-1)^{i+j}\beta([\xi\_i,\xi\_j],\xi\_0,\dots,\widehat{\xi\_i},\dots,\widehat{\xi\_j},\dots,\xi\_k)
$$
with the hats denoting omission. If you insert $\beta=\Phi\_\*\alpha$, then in the second sum you simply get $\beta(\dots)=\Phi(\alpha(\dots))$. Doing a similar replacement in the first sum, you then use compatibility of $\Phi$ with the connections as 
$$
\nabla^W\_{\xi\_i}\Phi(\alpha(\xi\_0,\dots,\widehat{\xi\_i},\dots,\xi\_k))=
\Phi(\nabla^V\_{\xi\_i}\alpha(\xi\_0,\dots,\widehat{\xi\_i},\dots,\xi\_k)). 
$$
Hence you conclude that $(d^{\nabla^W}\Phi\_\*\alpha)(\xi\_0,\dots,\xi\_k)=\Phi(d^{\nabla^V}\alpha(\xi\_0,\dots,\xi\_k))$ which is exactly the claim $d^{\nabla^W}\Phi\_\*\alpha=\Phi\_\*d^{\nabla^V}\alpha$. 


**Edit**: As mentioned in the comment, the compatibility condition should read as $\nabla^W\_\xi \Phi(s)=\Phi(\nabla^V\_\xi s)$ for all $\xi$ and $s$. 


