Let $\mathbb P^\infty$ be the infinite-dimensional complex projective space, which is a known $K(\mathbb Z, 2)$, and let $F$ be the functor that assigns to each cell complex $X$ the set of homotopy classes of maps $X \to \mathbb P^\infty$. I want to show that $F$ is naturally isomorphic to $H^2(-; \mathbb Z)$ without using a cell decomposition for $\mathbb P^\infty$. (Proofs that use a cell decomposition, which moreover work for any $K(G,n)$ with $G$ abelian, are easy to find in the literature.)
My strategy is as follows. Given two maps $f_0, f_1 : X \to \mathbb P^\infty$, attempt to construct a homotopy $f_t : X \to \mathbb P^\infty$ cell by cell. Notice that $f_t$ can always be constructed over $X$'s $1$-skeleton, but over the $2$-skeleton, we might get stuck. If we don't get stuck over the $2$-skeleton, then $f_t$ extends over all of $X$. This follows from $\mathbb P^\infty \simeq K(\mathbb Z, 2)$.
Think of $f_t$ as a single map $X \times I \to \mathbb P^\infty$, so that, when get stuck, we have a hollow homotopy $h : X^\square \to \mathbb P^\infty$, whose domain is the hollow cyclinder
$$X^\square = (X^1 \times I) \cup (X \times \{ 0, 1 \}).$$
Given a hollow homotopy $h$, define its difference cocycle
$$d(h) : C_2(X) \longrightarrow \pi_2(\mathbb P^2)$$
as follows. Let $e_\alpha$ be a $2$-cell of $X$. Then $e_\alpha \times I$ is a $3$-cell of $X \times I$, and its boundary is the image of $S^2$ under an attaching map $\phi : S^2 \to X^\square$. Pulling $h$ back under $\phi$, we get a map $S^2 \to \mathbb P^2$, whose homotopy class is $d(h)(e_\alpha)$. Then $f_t$ can be extended over $e_\alpha$ precisely when $d(h)(e_\alpha) = 0$.
Then I need to prove the following lemmas:
- $d(h)$ is indeed a cocycle. This follows from our assumption that $f_0, f_1$ extend over $X^3$.
- $d(h)$ is natural under cellular pullbacks. This follows from the naturality of the relative Hurewicz homomorphism.
- $d(h)$'s cohomology class depends only on $f_0$ and $f_1$, not on $h$.
- For every cocycle $\alpha$ in $d(h)$'s cohomology class, there exists another hollow homotopy whose difference cocycle is $d(h')$.
Unfortunately, I'm stuck with the third lemma.
My attempt was as follows. Given two hollow homotopies $h_0, h_1$ with the same endpoints $f_0, f_1$, construct a hollow homotopy of hollow homotopies $H : X^{\square \square} \to \mathbb P^\infty$. Define the difference cochain
$$d(H) : C_2(X \times I) \to \pi_2(\mathbb P^\infty)$$
in the same way as $d(h)$, although this time $d(H)$ isn't a cocycle. If we think of $X^{\square \square}$ as a subcomplex of $X \times I \times J$, where $J$ is another copy of the unit interval $I$, then the obstruction to extending $H$ over $(X \times I \times J)^3$ is a cocycle, which splits into three parts:
The obstruction to extending $H$ over $(X \times I)^3 \times \{ 0_J \}$, which is just $d(h_0) \times \overline I \times \overline 0_J$.
The obstruction to extending $H$ over $(X \times I)^3 \times \{ 1_J \}$, which is just $d(h_1) \times \overline I \times \overline 1_J$.
The obstruction to extending $H$ over $(X \times I)^2 \times J$, whicn is just $d(H) \times \overline J$.
Taking the coboundary of this obstruction cocycle, we obtain
$$0 = d(h_0) \times \overline I \times \overline J - d(h_1) \times \overline I \times \overline J + \delta d(H) \times \overline J.$$
Since the map $C^\bullet(X \times I) \to C^\bullet(X \times I \times J)$, $\alpha \mapsto \alpha \times J$ is injective, we obtain
$$\delta d(H) = d(h_1) \times \overline I - d(h_0) \times \overline I.$$
But I don't see how to deduce that $d(h_1) - d(h_0)$ is a coboundary from this. Any ideas?
I missed this simple obvious fact. If $h_0, h_1$ are hollow homotopies with the same endpoints $f_0, f_1$, then we may define $H$ as follows:
Then, there is no obstruction to extending $H$ over $M \times \{ 0_I, 1_I \} \times J$. Hence, $H$'s difference cochain has the form $d(H) = \beta \times \overline I$, for some $\beta \in C^1(M)$. Hence,
$$\delta d(H) = \delta \beta \times \overline I = d(h_1) \times \overline I - d(h_1) \times \overline I.$$
Since the map $C^\bullet(M) \to C^\bullet(M \times I)$, $\alpha \mapsto \alpha \times \overline I$ is injective, we obtain
$$\delta \beta = d(h_1) - d(h_0).$$
Hence, $d(h)$'s cohomology class depends only on $f_0$ and $f_1$, and the third lemma is proved.