Solution (source code)

= Solution

A <connection on a vector bundle> is an $\mathbb R$-linear map
$$
\nabla:\Gamma(E)\longrightarrow\Omega^1(M;E)
$$
which satisfies $\nabla(fs)=df\otimes s+f\nabla s$ for every <smooth function> $f$ and section $s$. Here $\Omega^1(M;E)=\Gamma(T^*M\otimes E)$. Equivalently, writing $\nabla_Xs=(\nabla s)(X)$, it is linear over <smooth functions> in $X$, linear over $\mathbb R$ in $s$, and obeys
$$
\nabla_X(fs)=X(f)s+f\nabla_Xs.
$$
Choose a trivializing <open cover> and a <local frame> $e_{i1},\ldots,e_{ir}$ on each $U_i$. Differentiating the coefficient functions gives a local <connection on a vector bundle>:
$$
\nabla^i_X\left(\sum_a s^a e_{ia}\right)=\sum_a X(s^a)e_{ia}.
$$
No compatibility of these local connections is assumed. Choose a smooth locally finite <partition of unity> $\{\phi_i\}$ subordinate to the cover and define
$$
\boxed{\nabla_Xs=\sum_i\phi_i\nabla^i_X(s|_{U_i}),}
$$
extending each weighted term by zero outside $U_i$. Its support lies inside $U_i$, so each extension is smooth, and local finiteness makes the whole sum smooth. The operation is linear over <smooth functions> in $X$. For the Leibniz rule,
$$
\nabla_X(fs)=\sum_i\phi_i\bigl(X(f)s+f\nabla^i_Xs\bigr)
=X(f)s+f\nabla_Xs,
$$
using $\sum_i\phi_i=1$. This proves \b[every smooth <vector bundle> admits a connection] by the <construction of a vector bundle connection by a partition of unity>.