Solution (source code)

= Solution

Let $E$ have rank $r\geq1$, let $p:\mathbb P(E)\to X$ be its <projectivization of a real vector bundle>, and let $\lambda\subset p^*E$ be its <tautological bundle>. Put $u=w_1(\lambda)\in H^1(\mathbb P(E);\mathbb F_2)$. The <Projective bundle definition of Stiefel–Whitney classes> starts from the isomorphism
$$
\bigoplus_{j=0}^{r-1}H^{*-j}(X;\mathbb F_2)
\xrightarrow{\ \cong\ }H^*(\mathbb P(E);\mathbb F_2),\qquad
(a_0,\ldots,a_{r-1})\longmapsto\sum_{j=0}^{r-1}p^*a_j\smile u^j.
$$
In particular, $p^*$ is injective. Expand $u^r$ uniquely in this basis. The coefficients define the <Stiefel–Whitney classes> through the relation
$$
\boxed{u^r+p^*w_1(E)u^{r-1}+\cdots+p^*w_r(E)=0.}
$$
Set $w_0(E)=1$ and $w_i(E)=0$ for $i>r$; for a rank-zero <vector bundle> set $w(E)=1$. Uniqueness also proves naturality of the <Stiefel–Whitney classes> under a <pullback vector bundle>.

To prove the <Whitney product formula for Stiefel–Whitney classes>, apply the <splitting principle for real vector bundles> simultaneously to $E$ and $E'$. Its injective pullback on mod-two <cohomology> follows by iterating the <Projective bundle definition of Stiefel–Whitney classes>. It suffices to compute for a split <vector bundle> $E=\bigoplus_{i=1}^r L_i$. Put $x_i=w_1(L_i)$.

On $\mathbb P(E)$, the coordinate projections of the tautological inclusion $\lambda\hookrightarrow p^*E$ give sections of the <real line bundles> $\lambda^*\otimes p^*L_i$ with no common zero. The <mod-two Euler class of a real line bundle> is its first <Stiefel–Whitney class>, and the <First Stiefel–Whitney class of a tensor product of real line bundles> gives $u+p^*x_i$. Multiplication of <Euler classes> under a <direct sum>, and vanishing of the <Euler class of a vector bundle> with a nowhere-zero section, therefore give
$$
\prod_{i=1}^r(u+p^*x_i)=0.
$$
Comparing with the unique monic relation defining the <Stiefel–Whitney classes> shows that $w_j(E)$ is the $j$th <elementary symmetric polynomial> in the $x_i$. Thus $w(E)=\prod_i(1+x_i)$. A <direct sum> joins the two lists, so injectivity of the splitting pullback gives
$$
\boxed{w(E\oplus E')=w(E)w(E'),\qquad
w_k(E\oplus E')=\sum_{i+j=k}w_i(E)\smile w_j(E').}
$$

For the <immersion> obstruction, use the notation $g=(f,f)$: the printed $f\times f$ here means the map from one copy of <Real projective space> into the product. Write $x=w_1(\gamma_{\mathbb R})$ and let $z$ be the mod-two reduction of $c_1(\gamma_{\mathbb C}^*)$. The <mod-two cohomology ring of real projective space> and the <cohomology ring of complex projective space> give
$$
H^*(\mathbb{RP}^{2k+1};\mathbb F_2)=\mathbb F_2[x]/(x^{2k+2}),\qquad
H^*(\mathbb{CP}^k;\mathbb F_2)=\mathbb F_2[z]/(z^{k+1}),\qquad
|x|=1,\quad |z|=2.
$$
Nontriviality in degree two forces $f^*z=x^2$. Necessarily $k\geq1$, since the degree-two <cohomology> of $\mathbb{CP}^0$ vanishes.

The standard <tangent bundle> identities for <Real projective space> and <Complex projective space> are
$$
T\mathbb{RP}^{2k+1}\oplus\mathbb R\cong(2k+2)\gamma_{\mathbb R},\qquad
T\mathbb{CP}^k\oplus\mathbb C\cong(k+1)\gamma_{\mathbb C}^*.
$$
For the underlying real <vector bundle> of a <complex line bundle>, its total <Stiefel–Whitney class> is $1+c_1\bmod2$. Hence
$$
w(T\mathbb{RP}^{2k+1})=(1+x)^{2k+2},\qquad
w(T\mathbb{CP}^k)=(1+z)^{k+1}.
$$
If $g$ is <homotopic> to an <immersion> $j$, its <normal bundle> $\nu$ has rank $4k-(2k+1)=2k-1$, and
$$
T\mathbb{RP}^{2k+1}\oplus\nu\cong j^*T(\mathbb{CP}^k\times\mathbb{CP}^k).
$$
The <Whitney product formula for Stiefel–Whitney classes> and <homotopy invariance of cohomology> yield
$$
w(\nu)=\frac{(1+x^2)^{2k+2}}{(1+x)^{2k+2}}
=(1+x)^{2k+2}.
$$
The division is legitimate in the truncated <cohomology ring>, since $1+x$ is a unit. The degree-$2k$ component is
$$
w_{2k}(\nu)=\binom{2k+2}{2k}x^{2k}
=(k+1)(2k+1)x^{2k}=(k+1)x^{2k}.
$$
It must vanish because $2k>\operatorname{rank}\nu$, while $x^{2k}\ne0$. Therefore \b[$k$ must be odd].