I was reading [these notes](http://www.math.jussieu.fr/~keller/publ/emalca.pdf) by Keller. On the page 19 he defines the Gerstenhaber bracket on the Hochschild cochain complex. But first of all he defines the operation $\bullet$ on the cochains by 
$$
\small
(f\bullet g)(a\_1,\dots,a\_{p+q-1})=\sum\limits\_{i=0}^{p} (-1)^{i(q+1)} f(a\_1,\dots,a\_i,g(a\_{i+1},\dots,a\_{i+q}),a\_{i+q+1},\dots,a\_{p+q-1})
$$
where $f$ is a $p$-cochain and $g$ is a $q$-cochain. After that he defines the Gerstenhaber bracket by $[f,g]\_G=f\bullet g-(-1)^{(p-1)(q-1)}g\bullet f$.


I have noticed that the summands in the operation $\bullet$ look a lot like the partial composition in operads, as if $f$ was an element of arity $p$ and $g$ was an element of arity $q$ in some operad. So my question is, **is it just a coincidence, or there is indeed some way to see $f,q$ as operations in some operad?** Or maybe **is there a way to see the operation $\bullet$ coming from some operadic context?**


I am a complete novice in these things, so I am sorry if my question is silly. Anyways I would be happy if someone would explain that to me.


Thank you for your help!



Is the definition of Gerstenhaber bracket related to operads?
Yes, absolutely. I really think the best place for learning this is the book by Loday and Vallette.


This example fits more generally into the following context. Let $P$ be a Koszul operad and $A$ a $P$-algebra. There is attached to $P$ a cohomology theory for $P$-algebras. The two most well known examples is that when $P = \mathsf{Lie}$ we get ordinary Lie algebra cohomology, and that when $P = \mathsf{Ass}$ we get Hochschild homology. This is in general defined by the chain complex 
$$ \mathrm{Hom}\_{\mathbb S}(P^!,\mathrm{End}(A)) $$
i.e. maps of $\mathbb S$-modules from the Koszul dual co-operad of $P$ to the endomorphism operad of $A$. This chain complex sits inside $$ \mathrm{Hom}\_{\mathbb k}(P^!,\mathrm{End}(A)), $$
i.e. maps which are not necessarily equivariant. The latter space is itself in a natural way the sum of all components of an operad, the *convolution operad*. Convolution gives an operad structure on maps from any co-operad to an operad. 


Now on the sum of all components of an operad there is a pre-Lie structure given by operadic composition. This is the operation you called $\bullet$, and as you say, it is just given by composition. Antisymmetrizing this gives an honest Lie bracket. This bracket on $$ \mathrm{Hom}\_{\mathbb k}(P^!,\mathrm{End}(A)), $$ leaves $$ \mathrm{Hom}\_{\mathbb S}(P^!,\mathrm{End}(A)) $$ invariant, giving a Lie bracket on the chain complex for the operadic cohomology. When $P = \mathsf{Ass}$ and $A$ is an associative algebra we have defined the Gerstenhaber bracket on the Hochschild complex. This is what you are seeing.


There are some degree shifts involved here (as one sees from your formulas) that I'm not going to try to work out.


