This is a question about a remark someone said to me without giving much precision.
Suppose you have two nice spaces $X,Y$ and are trying to build a map $X\to Y$ with certain nice properties. Suppose for simplicity (no pun intended) that $Y$ is a simple space, that is $\pi_1(Y)$ acts trivially on $\pi_n(Y)$ for all $n$.
Then one way to do this is to decompose $Y$ into a Postnikov tower $\dots \to Y_2\to Y_1$. As $Y$ is simple, we can choose each $Y_{n+1}\to Y_n$ to be a principal fibration.
I was told that the "obstruction to the existence of a lift $f:X\to Y_n$ to $\tilde f : X\to Y_{n+1}$ is a cohomology class in $H^{n+2}(X,\pi_{n+1}(Y))$" and that the "obstruction to the uniqueness of such a lift lies in $H^{n+1}(X,\pi_{n+1}(Y))$".
I understand the first bit : indeed if we look at a delooping of the fibration $Y_{n+1}\to Y_n$ we see that it is of the form $X_{n+1}\to X_n \to K(\pi_{n+1}(X), n+2)$, therefore if we hace $f: X\to Y_n$, it lifts (up to homotopy) to $Y_{n+1}$ if and only if it is sent to $0$ in $[X, K(\pi_{n+1}(X), n+2)] = H^{n+2}(X, \pi_{n+1}(Y))$, so the obstruction is the class of the pushforward of $f$ in $H^{n+2}(X, \pi_{n+1}(Y))$.
I have more trouble with the second bit, though. I understand that it is related to the fact that the fiber of the fibration $Y_{n+1}\to Y_n$ is $K(\pi_{n+1}(Y), n+1)$, so if somehow I could "subtract" maps I would definitely get the obstruction where I was told it was; but without that I seem to be stuck :
I have two maps $f_1,f_2 : X\to Y_{n+1}$ that lift $f:X\to Y_n$, what do I do with them ? How do I extract a map $X\to $fiber ? Or perhaps $X\to \mathrm{hofib}$ ?
I thought of focusing on one of the two maps, say $f_1$, fixing $f$ and seeing that a homotopy $p\circ f_1\to f$ (where $p: Y_{n+1}\to Y_n$) gives me a map $X\to$ some space that looks like the homotopy fiber, but I can't make that precise (I would want something like "the homotopy fiber over a point that moves along with $X$")
So my question is :
What is meant by "the obstruction to uniqueness of lifing lies in $H^{n+1}(X,\pi_{n+1}(Y))$" ?
I'll write $B^n A$ for $K(A, n)$. Given that there exists a lift, the space of lifts is the space of homotopy sections of the homotopy pullback of the bundle $Y_{n+1} \to Y_n$ to $X$ (this follows just from the universal property of the homotopy pullback). The bundle $Y_{n+1} \to Y_n$ is a principal $B^{n+1} \pi_{n+1}(Y)$-bundle whose pullback to $X$ admits a section, hence which is trivializable over $X$. The space of sections of the trivial bundle is the space of functions $[X, B^{n+1} \pi_{n+1}(Y)]$, whose $\pi_0$ is $H^{n+1}(X, \pi_{n+1}(Y))$, and so the space of sections of any trivializable bundle is naturally a torsor over this space.
(This is a special case of a very general pattern that is straightforward when stated abstractly but surprisingly hard to spot: if $a, b$ are isomorphic, the space of isomorphisms between them is naturally a torsor over the automorphism group of either. "Trivializable" means isomorphic to the trivial bundle, and the space of sections of a principal bundle can be naturally identified with the space of isomorphisms to the trivial bundle.)