Hochschild chain complex (source code)

= Hochschild chain complex
{c}

For a $k$-algebra $R$ and an $R$-$R$-<bimodule> $M$, the Hochschild chains are
$$
C_n(R,M)=M\otimes_kR^{\otimes_kn}.
$$
Their boundary is
$$
\begin{aligned}
b(m\otimes r_1\otimes\cdots\otimes r_n)
={}&mr_1\otimes r_2\otimes\cdots\otimes r_n\\
&+\sum_{i=1}^{n-1}(-1)^im\otimes r_1\otimes\cdots\otimes r_ir_{i+1}\otimes\cdots\otimes r_n\\
&+(-1)^nr_nm\otimes r_1\otimes\cdots\otimes r_{n-1}.
\end{aligned}
$$
Associativity and the bimodule axioms give $b^2=0$.