# Cohomology with local coefficients and obstruction theory

I'm reading about obstruction theory on Milnor & Stasheff and came across the following claim:

If $$p:E(\xi)\rightarrow B$$ is a vector bundle over a CW complex $$B$$ and $$V_k(\xi)$$ is the associated Stiefel bundle of $$k$$-frames then there exists a cross-section over the $$(n-k+1)$$-skeleton of $$B$$ if and only if a certain well-defined primary obstruction class in $$H^{n-k+1}(B;\{\pi_{n-k}V_k(F)\})$$ is zero. Here $$\{\pi_{n-k}V_k(F)\}$$ is local system of coefficients defined by the bundle of groups with fiber $$\pi_{n-k}V_k(p^{-1}(b))$$ over $$b\in B$$.

I'm trying to understand how such a class would be constructed. Here is what I have so far:

Suppose we have a section defined on the $$(n-k)$$-skeleton $$s: B_{n-k}\rightarrow V_k(\xi)$$ and I wish to extend it to the $$(n-k+1)$$-skeleton of $$B$$. For simplicity, I consider first the case that $$B_{n-k+1}$$ is obtained from $$B_{n-k}$$ by attaching a single $$(n-k+1)$$-cell $$D^{n-k+1}$$ via the attaching map $$\alpha:\partial D^{n-k+1} = S^{n-k}\rightarrow B_{n-k}$$. Then $$B_{n-k+1}$$ is the pushout of the inclusion $$\partial D^{n-k+1}\rightarrow D^{n-k+1}$$ along the attaching map and so a map $$\hat{s}:B_{n-k+1}\rightarrow V_k(\xi)$$ extending $$s$$ exists if and only if the restriction of $$s$$ to $$\partial D^{n-k+1} = S^{n-k}$$ can be extended to a map $$D^{n-k+1}\rightarrow V_k(\xi)$$, that is if $$s|_{S^{n-k}}$$ is nullhomotopic. So this ties the existence of an extension to the vanishing of an element of $$\pi_{n-k}V_k(\xi)$$.

My questions at this point are the following:

1) Where does cohomology with local coefficients come into play?

2) If the $$(n-k+1)$$-skeleton is obtained by adding more than a single cell how do we package all of that information into a single obstruction class?

Since the composite $$\partial D^{n-k+1} = S^{n-k}\rightarrow V_k(\xi)\rightarrow B$$ is just the attaching map $$\alpha$$, it must be nullhomotopic and so by the homotopy lifting property we can homotope the original map $$S^{n-k}\rightarrow V_k(\xi)$$ to lie within a single fiber giving us an element of $$\pi_{n-k}V_k(F_{b_0})$$ for some $$b_0\in B$$. Here we implicitly using the fact that $$\pi_1V_k(F) = 0$$ so as to not have to worry about a choice of basepoint in $$F_{b_0}$$. So what we have done is found a way to assign to each $$(n-k+1)$$-cell $$e_i^{n-k+1}$$ of $$B$$ an element of $$\pi_{n-k}V_k(F_{b_i})$$ for some $$b_i\in B$$. It remains to package all of this information together. If we can canonically identify these groups over any fiber then we are done and this gives us an element of ordinary cohomology $$H^{n-k+1}(B,\pi_{n-k}V_k(F))$$. However, this occurs if and only if $$\pi_1(B)$$ acts trivially on the fibers. In general, this will not happen and that is when we obtain an element of cohomology with local coefficients $$H^{n-k+1}(B,\{\pi_{n-k}V_k(F)\}$$.