What is the relationship between chain homotopy and the Leibniz rule? Suppose that $f, g$ are chain maps between chain complexes,
and $P$ an operator that takes $k$-chains to $k+1$-chains.
Let $\partial$ be the usual boundary operator.
Then the condition
$$\partial P + P\partial = g - f$$
is that $P$ is a chain homotopy between $f$ and $g$.
This almost looks like a Leibniz rule. Is there any deeper connection here?
 A: If $P$ and $Q$ are cochain complexes, with differentials $d_P$ and $d_Q$, and if we write $\hom(P,Q)_n$ the abelian group of all morphisms of graded groups $P\to Q$ of degree $n$ (on which we do not impose any conditions involving the differentials), then there is a cochain complex, which we write $\hom(P,Q)_\bullet$, whose differential $\partial$ maps $f\in\hom(P,Q)_n$ to $d_Q\circ f+(-1)^nf\circ d_P\in\hom(P,Q)_{n+1}$.
With this notation in place, it is easy to check that a morphism of complexes $f:P\to Q$ is preciely an element of $\hom(P,Q)_0$ such that $\partial(f)=0$, that is, a $0$-cocycle in our complex $\hom(P,Q)_\bullet$. Moreover, two morphisms $f,g:P\to Q$ are homotopic precisely when the element $f-g$, which is a $0$-cocycle, is a $0$-coboundary in the compex $\hom(P,Q)_\bullet$.
Let us now consider the special case in which $Q=P$. Now $\hom(P,P)_\bullet$ is not only a cochain complex: it is also a ring, with respect to the composition of maps, and with respect to this ring structure the differential $\partial$ is a (graded) derivation, that is, it satisfies Leibniz's rule: $$\partial(f\circ g)=\partial(f)\circ g\pm f\circ\partial(g)$$ (for some choice of signs...)
