= Solution
Use $\mathbb F_2$ coefficients throughout. Write $h=c_1(\mathcal O(1))\bmod2$ on <Complex projective space> and $a=w_1(\gamma_d)$ on <Real projective space>. We use the standard <cohomology ring of complex projective space> $\mathbb F_2[h]/(h^{d+1})$, with $|h|=2$, and the real projective calculation from the preceding solution. The complex projective calculation follows, for example, from its one cell in each even dimension together with the fact that transverse <projective hyperplanes> represent the powers of $h$; $d$ such hyperplanes have one intersection point.
For the standard inclusion $i:\mathbb{RP}^d\hookrightarrow\mathbb{CP}^d$, the restricted complex tautological line is $\gamma_d\otimes_{\mathbb R}\mathbb C$. As a real <vector bundle> it is $\gamma_d\oplus\gamma_d$, whose total <Stiefel–Whitney class> is $(1+a)^2=1+a^2$. The <Stiefel–Whitney class of the underlying real bundle of a complex line> identifies its degree-two class with its <First Chern class> reduced modulo two. Passing to the dual line defining $h$ changes only a sign, which disappears modulo two. Thus <mod-two restriction from complex to real projective space> gives $i^*h=a^2$. In particular the answer for dimension two is the ring map
$$
\boxed{i^*:\mathbb F_2[h]/(h^3)\longrightarrow\mathbb F_2[a]/(a^3),\qquad h\longmapsto a^2.}
$$
It sends $1$ to $1$, is an <isomorphism> in degree two, and sends $h^2$ to zero.
Now assume $k\geq1$ and put $M=\mathbb{CP}^{2k}$, $N=\mathbb{RP}^{2k}$, $U=M\setminus N$, with inclusions $i:N\hookrightarrow M$ and $j:U\hookrightarrow M$. The real dimensions are $4k$ and $2k$, respectively. A <tubular neighborhood> and <excision> identify the <cohomology> of $(M,U)$ with that of the normal <disk bundle> relative to its <sphere bundle>. Every real <normal bundle> is oriented over $\mathbb F_2$, so the <Thom isomorphism theorem> gives
$$
H^q(M,U)\cong H^{q-2k}(N).
$$
Under this identification the relative-to-absolute map is the <cohomological Gysin map of an embedding> $i_!$. The <exact sequence> of the pair is therefore
$$
\cdots\longrightarrow H^{q-2k}(N)\xrightarrow{i_!}H^q(M)\xrightarrow{j^*}H^q(U)\xrightarrow{\delta}H^{q+1-2k}(N)\xrightarrow{i_!}H^{q+1}(M)\longrightarrow\cdots.
$$
Here $\delta$ denotes the ordinary <connecting homomorphism> followed by the inverse of the <isomorphism> supplied by the <Thom isomorphism theorem>.
To compute $i_!$, use mod-two <Poincare duality> and its evaluation formula
$$
\langle i_!b\smile z,[M]_2\rangle=\langle b\smile i^*z,[N]_2\rangle.
$$
For $0\leq r\leq k$, take $b=a^{2r}$ and $z=h^{k-r}$. The right side is $\langle a^{2k},[N]_2\rangle=1$. Since the target group is generated by $h^{k+r}$ and $\langle h^{2k},[M]_2\rangle=1$, this proves
$$
i_!(a^{2r})=h^{k+r}.
$$
Odd-degree classes have zero image because $M$ has no odd-degree <cohomology>. Exactness now gives
$$
H^q(U)\cong\begin{cases}\mathbb F_2,&q\text{ even and }0\leq q\leq4k-2,\\0,&\text{otherwise}.\end{cases}
$$
For precision, below degree $2k-1$ the restriction map is an <isomorphism>. In degree $2k-1$ the next map is $i_!:H^0(N)\to H^{2k}(M)$, an <isomorphism>, so the complement group is zero. In even degrees $2k+2r$, $0\leq r<k$, the preceding $i_!$ is an <isomorphism> and the following odd-degree $i_!$ is zero; consequently $\delta:H^{2k+2r}(U)\to H^{2r+1}(N)$ is an <isomorphism>. The intervening odd groups and the top group $H^{4k}(U)$ vanish.
It remains to establish multiplication. Put $x=j^*h$. Since $h^k=i_!1$, exactness gives $x^k=0$. Choose $y\in H^{2k}(U)$ with $\delta y=a$, which is possible by the just-computed <isomorphism>. Naturality of the relative <cup product>, and the module property of the <Thom isomorphism theorem>, give
$$
\delta(j^*z\smile v)=i^*z\smile\delta v.
$$
Thus $\delta(x^r y)=a^{2r+1}$ for $0\leq r<k$. Each class $x^r y$ is nonzero and generates its upper-half group, while $1,x,\ldots,x^{k-1}$ generate the lower-half groups. Also $y^2=0$ because $H^{4k}(U)=0$. These classes account for every group, so there are no further relations:
$$
\boxed{H^*(U;\mathbb F_2)\cong\mathbb F_2[x,y]/(x^k,y^2),\qquad |x|=2,\quad |y|=2k.}
$$
By the <field>-coefficient <Künneth theorem> this is precisely the <cohomology ring> of $\mathbb{CP}^{k-1}\times S^{2k}$. For $k=1$ the relation $x=0$ leaves the <sphere>'s ring. The calculation identifies rings and does not claim a <homotopy equivalence> of the spaces; $k=0$ is outside the expression involving $\mathbb{CP}^{k-1}$.
Back to article page