Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
This identity holds for arbitrary cochains, not only for cocycles. (As I wrote, $a\in C^n(G,M)$.) As a consequence, in the particular case when $a\in Z^n(G,M)$, we get $sa-a-db=c=0$ so $sa=a+db$, which implies $s[a]=[a]$, so we get an alternative proof of the fact that $G$ acts trivially on $H^n(G,M)$. However, this is not the reason why I need this result. I need it for arbitrary cochains, not for cocycles. (And only for $n=1$ or $2$ and $G$ commutative.) I know how to prove it, but if it is already somewhere, I would rather quote it than write it down. (It's a reference request.)
Sorry, I'm new to this and I didn't know that posting the same thing on math.stackexchange and mathoverflow is considered cross-posting. I thought they are separate things for different audiences (math.stackexchange for general public, mathoverflow forresearchers).