Milnor's proof of cohomology of BO(n) In Milnor/Stasheff characteristic classes there is the proof that $H^*(BO(n);\mathbb{Z}_2)$ is the polynomial ring on the first n Stiefel-Whitney classes. I understand the part that the latter ring is contained in $H^*(BO(n);\mathbb{Z}_2)$, but for the other inclusion he writes:

Let $C^i(BO(n))$ represent the i-cochains of $BO(n)$ and $Z^i(BO(n))$ the i-cocycles. The dimension of $C^i(BO(n))$ as a vector space over $\mathbb{Z}_2$ is the number of i-dimensional cells [meaning CW-cells of $BO(n)$][...]

And then concludes that $H^i(BO(n);\mathbb{Z}_2)$ is already the degree-i part of $\mathbb{Z}_2[w_1,\dots,w_n]$ by a dimension argument.
However, why is $\text{dim}_{\mathbb{Z}_2}C^i(BO(n))$ the number of i-cells of the CW-complex $BO(n)$? I am assuming that he means the singular i-cochains. But can't that have huge dimension over the ground ring? Am I thinking of the wrong cochain complex?
Also, is there a more "modern" approach to the proof not using Serre's spectral sequence? Reference welcome.
 A: For your last question, there is a nice paper by Ed Brown, The Cohomology of $BSO_n$ and $BO_n$ with Integer Coefficients, Proc. AMS, ${\bf 85}$, No. 2 (1982), pp. 283-288. He starts by computing the mod $2$ cohomology, using the Thom isomorphism theorem and the relation between the Thom class and Steenrod squares. It takes a more work to lift this to a calculation with integral coefficients. There are no spectral sequences involved.
A: One approach is as follows.  All cohomology groups will be taken with coefficients $\mathbb{Z}/2$.


*

*Define $w_1(L)\in H^1(X)$ for real line bundles $L$ over $X$, and prove various properties.  (There are several ways to do this, which I will not summarise here.)

*Prove a real projective bundle theorem.  In more detail, for any $n$-dimensional real vector bundle $V$ over $X$, let $PV$ denote the associated bundle of projective spaces, let $L$ be the tautological line bundle over $PV$, and put $x=w_1(L)\in H^1(PV)$.  Define 
$$\alpha_X\colon\bigoplus_{i=0}^{n-1}H^{*-i}(X)\to H^*(PV)$$
by $\alpha_X(\underline{a})=\sum_ia_ix^i$.  If $V$ is trivialisable then $PV\simeq X\times\mathbb{R}P^{n-1}$ and it is easy to see that is an isomorphism.  An argument with the five-lemma and Mayer-Vietoris sequences shows that if $U,W\subseteq X$ and $\alpha_U,\alpha_W,\alpha_{U\cap W}$ are isomorphisms then $\alpha_U$ is also an isomorphism. Using this we deduce that $\alpha_X$ is an isomorphism whenever $X$ has a finite cover on which $V$ is trivialisable, and in particular when $X$ is compact.  Using the Milnor exact sequence we deduce that $\alpha_X$ is an isomorphism for all $X$.

*By considering $\alpha_X^{-1}(x^n)$ we see that there is a unique system of classes $w_i(V)\in H^i(X)$ (with $w_0(V)=1$) such that $x$ is a root of the polynomial $f_V(t)=\sum_{i=0}^nw_i(V)t^{n-i}$.  It follows that $H^*(PV)=H^*(X)[x]/f_V(x)$ as rings.

*It is now not hard to check that $w_i(V|_Y)=w_i(V)|_Y$ for all $Y\subseteq X$, and also that $w_i(U\oplus V)=\sum_{i=j+k}w_j(U)w_k(V)$.  Equivalently, we have $f_{V|_Y}(t)=f_V(t)|_Y$ and $f_{U\oplus V}(t)=f_U(t)f_V(t)$.

*Now let $T_n$ be the tautological bundle over $BO(n)$, and put $w_{n,i}=w_i(T_n)\in H^i(BO(n))$.  The claim is that $H^*(BO(n))=\mathbb{Z}/2[w_{n,1},\dotsc,w_{n,n}]$.  We can assume inductively that the corresponding thing is true for $BO(n-1)$.  It is also not hard to identify the projective bundle $PT_n$ over $BO(n)$ with $BO(n-1)\times BO(1)$, so the projective bundle theorem tells us that the ring
$$ H^*(BO(n-1))\otimes H^*(BO(1)) = \mathbb{Z}/2[w_{n-1,1},\dotsc,w_{n-1,n-1},x] $$
is freely generated by $\{1,\dotsc,x^{n-1}\}$ as a module over $H^*(BO(n))$.  Also, we see that $w_{ni}$ maps to $w_{n-1,i}+w_{n-1,i-1}x$ for $0<i<n$, and $w_{nn}\mapsto w_{n-1,n-1}x$.  From here it is a matter of pure algebra to check that $H^*(BO(n))=\mathbb{Z}/2[w_{n1},\dotsc,w_{nn}]$.

