The standard cochain complex
The bar resolution makes H^n(G, A) computable from an explicit cochain complex. An n-cochain is just a function f : G^n → A (with C^0 = A, the constants). The coboundary d : C^n → C^{n+1} alternates the action and the slots. The two formulas you actually use are these.
Cochains: C^0 = A, C^1 = { f: G -> A }, C^2 = { f: GxG -> A }.
d^0 : A -> C^1 (d^0 a)(g) = g.a - a
d^1 : C^1 -> C^2 (d^1 f)(g,h) = g.f(h) - f(gh) + f(g)
d^2 : C^2 -> C^3 (d^2 f)(g,h,k) = g.f(h,k) - f(gh,k) + f(g,hk) - f(g,h)
Definitions in degree 1:
Z^1 = ker d^1 = { f : f(gh) = f(g) + g.f(h) } (1-cocycles)
B^1 = im d^0 = { f : f(g) = g.a - a for some fixed a } (1-coboundaries)
H^1(G, A) = Z^1 / B^1.
Check d^1 . d^0 = 0: d^1(d^0 a)(g,h) = g(h.a - a) - (gh.a - a) + (g.a - a) = 0. OK.1-cocycles are crossed homomorphisms
Read the cocycle condition f(gh) = f(g) + g·f(h) again: it is the twisted Leibniz rule. A function satisfying it is exactly a crossed homomorphism (also called a derivation). When the action is trivial it collapses to f(gh) = f(g) + f(h), an ordinary homomorphism G → A. So H^1 generalizes Hom(G, A), correcting it for a nontrivial action.
A coboundary f(g) = g·a − a is the trivial kind of twisting: the function comes from moving a single element a around. So H^1 = (crossed homs) / (principal crossed homs) measures crossed homomorphisms up to that triviality. Two cocycles are cohomologous when their difference is a coboundary — this equivalence is the heartbeat of the whole subject.
A worked H^1
G = Z/2Z = {1, s}, A = Z[i] (Gaussian integers) as additive group,
action: s = complex conjugation, s.(a + bi) = a - bi.
Cyclic recipe with n = 2: N = 1 + s, g - 1 = s - 1.
N(a+bi) = (a+bi) + (a-bi) = 2a. ker N = { a+bi : 2a = 0 } = { bi : b in Z } = iZ.
(s-1)(a+bi) = (a-bi) - (a+bi) = -2bi. im(s-1) = { -2bi } = 2iZ.
H^1(Z/2Z, Z[i]) = ker N / im(s-1) = iZ / 2iZ = Z/2Z.
Sanity check by hand: the cocycle f with f(s) = i satisfies f(s^2)=f(1)=0 since
f(1) = f(s)+ s.f(s) = i + (-i) = 0. Good. It is NOT a coboundary: i is not of the
form (s-1).(a+bi) = -2bi (an even multiple of i). So [f] is the nonzero class.Notice the discipline: a cocycle is a function on G, not a number; equality in cohomology means equality up to a coboundary, never on the nose. Hold onto this — in the next guide the same coboundary bookkeeping classifies group extensions, and in Galois cohomology a cocycle that looks trivial as data will turn out to vanish because of Theorem 90.