Solution (source code)

= Solution

Products below combine <matrix multiplication> with the <wedge product of differential forms> of <differential forms>. Differentiate the <projection> identity $p^2=p$ to get
$$
(dp)p+p\,dp=dp,\qquad\boxed{p\,dp=dp(1-p)}.
$$
Multiplying by $p$ on both sides also gives $p\,dp\,p=0$; applying the same argument to $1-p$ gives $(1-p)dp(1-p)=0$. Thus at each point $dp$ is off-diagonal relative to $\operatorname{im}p\oplus\ker p$, whereas $(dp)^2$ is diagonal and commutes with $p$. For $\omega=p(dp)^2$,
$$
\omega^k=p(dp)^{2k}\quad(k\geq1),\qquad d\omega=(dp)^3,
$$
because $d(dp)=0$.

The <graded Leibniz rule> and cyclicity of the <matrix trace> give, since $\omega$ has even degree,
$$
d\operatorname{tr}(\omega^k)=k\operatorname{tr}\bigl((d\omega)\omega^{k-1}\bigr).
$$
Here $(d\omega)\omega^{k-1}$ is off-diagonal: $(dp)^3$ is off-diagonal and every power of $\omega$ is diagonal. Its <matrix trace> is zero. Hence $\boxed{d\operatorname{tr}(\omega^k)=0}$ for every $k\geq1$; for $k=0$ the trace is the constant matrix size.

For the <determinant>, work over the commutative algebra of even <differential forms>. If $f(0)=1$, write $f(\omega)=I+N$, where $N$ has strictly positive degree and is nilpotent for dimensional reasons. The finite <power series> identity
$$
\det f(\omega)=\exp\bigl(\operatorname{tr}\log(I+N)\bigr),\qquad
\log(I+N)=\sum_{j\geq1}\frac{(-1)^{j+1}}jN^j
$$
holds over this algebra, as follows either from the formal determinant identity over characteristic-zero commutative rings or by differentiating $\det(I+sN)$ in the scalar variable $s$. Each $N^j$ is a linear combination of positive powers of $\omega$. The <matrix trace> of the logarithm is therefore a <closed differential form>, and its finite exponential is closed by the <graded Leibniz rule>. Thus $\boxed{d\det f(\omega)=0}$. The <projection connection> interprets $\omega$ as the curvature of $p\,d$ on $\operatorname{im}p$, but the proof above directly establishes both closedness claims.