[proofplan]
We first decompose the formal product $\prod_{j=1}^r Q(x_j)$ into homogeneous symmetric pieces and express each piece as a polynomial in the elementary symmetric functions. Substituting Chern-Weil Chern forms into these polynomials produces closed forms because the Chern forms are closed and exterior differentiation is a graded derivation. The de Rham class is identified by replacing each Chern form with the corresponding topological Chern class. Finally, for two connections, the [Chern-Weil homotopy formula](/theorems/9760) gives exact variation degree by degree, and [finite dimensionality](/theorems/1534) of $M$ ensures that only finitely many form degrees contribute.
[/proofplan]
[step:Express each homogeneous symmetric term as a polynomial in Chern variables]
Write
\begin{align*}
Q(z)=1+\sum_{m=1}^{\infty}a_m z^m
\end{align*}
with $a_m\in R$ for every $m\ge 1$. For each $n\ge 0$, let $S_{Q,n}(x_1,\dots,x_r)$ denote the homogeneous degree-$n$ part of the symmetric formal product $\prod_{j=1}^r Q(x_j)$. Since $S_{Q,n}$ is a symmetric polynomial in $x_1,\dots,x_r$ with coefficients in $R$, the [fundamental theorem of symmetric polynomials](/theorems/5179) over $\mathbb Z$ gives a unique polynomial $\Phi_{Q,n}\in R[e_1,\dots,e_r]$ such that
\begin{align*}
S_{Q,n}(x_1,\dots,x_r)=\Phi_{Q,n}(e_1(x),\dots,e_r(x)).
\end{align*}
The integral form of the theorem is what preserves the coefficient ring $R$: the rewriting from symmetric polynomials to elementary symmetric polynomials uses universal integer polynomials, so coefficients originally lying in $R$ remain in $R$.
[guided]
The formal product
\begin{align*}
\prod_{j=1}^r Q(x_j)
\end{align*}
is symmetric in the variables $x_1,\dots,x_r$ because permuting the variables only permutes the factors. Its homogeneous degree-$n$ component, denoted
\begin{align*}
S_{Q,n}(x_1,\dots,x_r),
\end{align*}
is therefore a symmetric polynomial with coefficients in $R$. The coefficient ring matters: the theorem defines a characteristic class with coefficients in $R$, so we must know that no coefficients outside $R$ are introduced when we rewrite in elementary symmetric functions.
The fundamental theorem of symmetric polynomials over $\mathbb Z$ says that every symmetric polynomial with coefficients in a commutative ring is uniquely expressible as a polynomial in the elementary symmetric functions, and that this expression is obtained by universal integer operations. Applying it to $S_{Q,n}$ gives a unique polynomial
\begin{align*}
\Phi_{Q,n}\in R[e_1,\dots,e_r]
\end{align*}
satisfying
\begin{align*}
S_{Q,n}(x_1,\dots,x_r)=\Phi_{Q,n}(e_1(x),\dots,e_r(x)).
\end{align*}
Thus the formal multiplicative sequence has well-defined degree-$n$ polynomial data over the original coefficient ring $R$.
[/guided]
[/step]
[step:Substitute Chern-Weil Chern forms into the symmetric polynomials]
For the connection $\nabla^E$, let
\begin{align*}
\Theta_{\nabla^E}:=\frac{F_{\nabla^E}}{2\pi i}\in\Omega^2(M;\operatorname{End}(E))
\end{align*}
denote the normalized curvature. Let $c_k(\nabla^E)\in\Omega^{2k}(M;\mathbb C)$ be the $k$-th Chern-Weil Chern form obtained from $\Theta_{\nabla^E}$, as in [[Chern-Weil Construction of Chern Classes](/theorems/9769)][citetheorem:9769]. For each $n\ge 0$, define
\begin{align*}
K_{Q,n}(\nabla^E):=\Phi_{Q,n}(c_1(\nabla^E),\dots,c_r(\nabla^E))\in\Omega^{2n}(M;\mathbb C).
\end{align*}
Then
\begin{align*}
K_Q(\nabla^E)=\sum_{n\ge 0}K_{Q,n}(\nabla^E)
\end{align*}
is a well-defined even differential form, because $K_{Q,n}(\nabla^E)=0$ whenever $2n>\dim M$.
[/step]
[step:Prove that the substituted form is closed]
By [Chern-Weil Construction of Chern Classes][citetheorem:9769], each Chern form $c_k(\nabla^E)$ is closed. Fix $n\ge 0$. The polynomial $\Phi_{Q,n}$ is a finite $R$-linear combination of monomials in $e_1,\dots,e_r$. After substitution, $K_{Q,n}(\nabla^E)$ is therefore a finite $\mathbb C$-linear combination of wedge products of the closed forms $c_k(\nabla^E)$. Since the [exterior derivative](/theorems/1525) $d$ is a graded derivation and $d c_k(\nabla^E)=0$ for every $k$, each such wedge product is closed. Hence
\begin{align*}
dK_{Q,n}(\nabla^E)=0
\end{align*}
for every $n\ge 0$. Since only finitely many $K_{Q,n}(\nabla^E)$ are nonzero as differential forms on $M$, we obtain
\begin{align*}
dK_Q(\nabla^E)=0.
\end{align*}
[/step]
[step:Identify the de Rham class with the multiplicative characteristic class]
Again by [Chern-Weil Construction of Chern Classes][citetheorem:9769], the de Rham class of $c_k(\nabla^E)$ is the image of the topological Chern class $c_k(E)$ under the coefficient map to complex de Rham cohomology. Since the de Rham comparison map is a graded ring homomorphism, for every $n\ge 0$ it sends
\begin{align*}
\Phi_{Q,n}(c_1(E),\dots,c_r(E))
\end{align*}
to
\begin{align*}
\left[\Phi_{Q,n}(c_1(\nabla^E),\dots,c_r(\nabla^E))\right]_{\mathrm{dR}}.
\end{align*}
Summing over the finitely many degrees that can contribute on $M$ gives
\begin{align*}
[K_Q(\nabla^E)]_{\mathrm{dR}}
\end{align*}
as the image of
\begin{align*}
K_Q(E)=\sum_{n\ge 0}\Phi_{Q,n}(c_1(E),\dots,c_r(E)).
\end{align*}
This proves the asserted cohomological identification.
[guided]
The point of the Chern-Weil construction is that the differential forms $c_k(\nabla^E)$ are not merely closed forms: they represent the topological Chern classes. More precisely, [Chern-Weil Construction of Chern Classes][citetheorem:9769] gives
\begin{align*}
[c_k(\nabla^E)]_{\mathrm{dR}}=\operatorname{comp}(c_k(E)),
\end{align*}
where $\operatorname{comp}:H^{2k}(M;R)\to H^{2k}_{\mathrm{dR}}(M;\mathbb C)$ denotes the coefficient and de Rham comparison map after including $R\subset\mathbb C$.
Now fix $n\ge 0$. The expression $\Phi_{Q,n}$ is a polynomial in $r$ variables with coefficients in $R$. Because the comparison map is compatible with cup products in cohomology and wedge products of closed differential forms, it carries the polynomial expression in topological Chern classes to the same polynomial expression in their Chern-Weil representatives:
\begin{align*}
\operatorname{comp}\left(\Phi_{Q,n}(c_1(E),\dots,c_r(E))\right)=\left[\Phi_{Q,n}(c_1(\nabla^E),\dots,c_r(\nabla^E))\right]_{\mathrm{dR}}.
\end{align*}
This is exactly the degree-$2n$ component of the desired statement. Since $\dim M<\infty$, the terms with $2n>\dim M$ vanish as differential forms and in de Rham cohomology. Therefore the degreewise identities sum to
\begin{align*}
\operatorname{comp}(K_Q(E))=[K_Q(\nabla^E)]_{\mathrm{dR}}.
\end{align*}
[/guided]
[/step]
[step:Apply the Chern-Weil homotopy formula to compare two connections]
Let $\nabla_0^E$ and $\nabla_1^E$ be smooth complex-linear connections on $E$. Define
\begin{align*}
A:=\nabla_1^E-\nabla_0^E\in\Omega^1(M;\operatorname{End}(E))
\end{align*}
and, for $t\in[0,1]$, define the affine path of connections
\begin{align*}
\nabla_t^E:=\nabla_0^E+tA.
\end{align*}
For each $n\ge 0$, the polynomial $\Phi_{Q,n}$ determines an invariant polynomial in the normalized curvature variables, so the Chern-Weil homotopy formula [Chern-Weil Homotopy Formula][citetheorem:9760] gives a form $T_{Q,n}(\nabla_0^E,\nabla_1^E)\in\Omega^{2n-1}(M;\mathbb C)$, with $T_{Q,0}=0$, such that
\begin{align*}
K_{Q,n}(\nabla_1^E)-K_{Q,n}(\nabla_0^E)=dT_{Q,n}(\nabla_0^E,\nabla_1^E).
\end{align*}
Since $K_{Q,n}(\nabla_i^E)=0$ for $2n>\dim M$ and $i\in\{0,1\}$, only finitely many terms contribute. Define
\begin{align*}
T_Q(\nabla_0^E,\nabla_1^E):=\sum_{n\ge 0}T_{Q,n}(\nabla_0^E,\nabla_1^E)\in\Omega^{\mathrm{odd}}(M;\mathbb C).
\end{align*}
Then
\begin{align*}
K_Q(\nabla_1^E)-K_Q(\nabla_0^E)=dT_Q(\nabla_0^E,\nabla_1^E).
\end{align*}
Thus the difference is exact.
[/step]
[step:Conclude closedness, class identification, and connection independence]
The preceding steps prove that $K_Q(\nabla^E)$ is closed, that its de Rham cohomology class is the image of $K_Q(E)$ under the coefficient map to complex de Rham cohomology, and that two choices of connection give representatives differing by an exact form. These are precisely the three assertions of the theorem.
[/step]