Solution (source code)

= Solution

For a section represented by a column $u$, expand the <covariant exterior derivative> using the graded <Leibniz rule>:
$$
\begin{aligned}
D^2u
&=d(du+Au)+A\wedge(du+Au)\\
&=(dA)u-A\wedge du+A\wedge du+(A\wedge A)u.
\end{aligned}
$$
Therefore the <Cartan curvature matrix equation> is
$$
\boxed{\Theta=dA+A\wedge A,\qquad
(A\wedge A)_{ij}=\sum_k A_{ik}\wedge A_{kj}.}
$$
The product includes <endomorphism> composition; it need not vanish for a matrix-valued one-form. For a scalar frame change $g$, $A'=A+g^{-1}dg$ and $d(g^{-1}dg)=0$, confirming that the line-bundle two-forms $dA$ patch globally.