Solution (source code)

= Solution

A <principal connection> on $P$ is a $G$-equivariant smooth splitting
$$
T_pP=H_p\oplus V_p,
$$
where $V_p$ is tangent to the $G$-orbit. Equivalently, it is a $\mathfrak g$-valued one-form $\mathcal A$ satisfying $\mathcal A(\xi_P)=\xi$ and $R_g^*\mathcal A=\operatorname{Ad}_{g^{-1}}\mathcal A$. Its <curvature of a principal connection> is
$$
\mathcal F=d\mathcal A+\frac12[\mathcal A\wedge\mathcal A].
$$