Group cohomology (source code)

= Group cohomology
{title2=$H^n(G,M)$}
{wiki}

For a <group> $G$ acting on an abelian <group> $M$, <group cohomology> consists of the groups $H^n(G,M)$ obtained from the standard <cochain complex> of maps $G^n\to M$. In degree zero it gives the invariant <subgroup> $M^G$. In degree one it gives <one-cocycles> modulo <group coboundaries>.

If the action is trivial, the one-cocycle identity becomes $f(gh)=f(g)+f(h)$ and all one-coboundaries vanish, so $H^1(G,M)=\operatorname{Hom}(G,M)$. Degree two encodes group extensions with the prescribed action on the kernel. This explains why cohomology naturally measures whether local multiplication data can be assembled into a globally associative extension.