I've problem understanding some passages in the proof of the Chern-Weil homomorphism:
After defining what is an invariant polynomial $P$ on $\mathfrak{gl}_n(\Bbb C)$ we want to prove that given $K$ the curvature of a complex vector bundle $V$ over $M$ then $P(K)$ is a closed form, whose cohomology class is independent from the choice of the connection $\nabla$ on $V$.
The author says that it's equivalent to prove closeness and well-definedness for the form $$\log \det(1+q\Omega)$$ where $q$ is just a parameter and $\Omega$ is the curvature $2$-form associated to the frame bundle associated to $V$. ($\Omega=d\omega+\omega^2$, where $\omega$ is the connection $1$-form). He then assume that $\omega$ depends on another parameter $t$ (I guess in order to prove well-definedness since the space of connections is affine) and after some algebra he gets $$(*) \ \ \ \ \ \ \ \ \frac{d}{dt}\log \det(1+q\Omega)= d\sum_{l=0}^{\infty}(-1)^lq^{l+1}\text{tr}\{\Omega^l \omega'\}$$ where $\omega'$ is the derivative w.r.t. $t$ of $\omega$. He then push everything to $M$ (we were working on $E$ now) and it concludes by saying:
Now the result follows; for since any connection can be deformed locally to flatness, we see that $\log \det(1+q\Omega)$ is locally exact; that is closed; and since any two connections can be linked by a differentiable path, the cohomology class of $\log \det(1+q\Omega)$ is independent of the choice of connection
The independence I think is obtained by integrating w.r.t. the parameter $t$ equation (*) and then switch the integral sign with the exterior derivative on RHS (can we do it?)
Why do we have that the form is closed? where does flatness come into play?
Being closed is a local property. That is, a differential form $\alpha$ on a manifold $M$ is closed if and only if for every $p\in M$ there exists a neighborhood $U$ in which $\alpha$ is closed (as opposed to being exact, which is a global property).
Write $\alpha:=\log\det(1+q\Omega)$. Then by the above paragraph, it suffices to show that $M$ can be covered by open sets $U_i$, in every one of which $\alpha$ is closed. Cover $M$ by open sets $U_i$ such that the bundle $E$ becomes trivial when restricted to every $U_i$, and let us focus on a specific $U_i$. Consider the bundle $E|_{U_i}$. It is trivial. Hence, it admits a trivial connection, $\nabla^i$, which is in particular flat. Being flat means that the curvature form of $\nabla^i$ vanishes. As the original connection $\nabla$, when restricted to $U_i$, can be smoothly deformed to $\nabla^i$, Roe's computation shows that $\alpha|_{U_i}$ is exact, and in particular closed, as desired.
Remark: Once again, note the difference between being closed and exact. The former is local while the latter is global. This is why the above explanation does not mean $\alpha$ is exact.