## Monads in mathematics 4 : the bar and cobar constructions

The use of monads and comonads in homological algebra is as old as the theory: Godement’s standard construction refers to the use of monads in cohomology theory, and is said to be the first study of a general method for constructing acyclic resolutions. Later the theory was explored in greater depth by Eilenberg, Moore, Barr, Beck. The term bar resolution is now most commonly used to describe the process. Monads derived from operads were also studied by Lawvere, Mitchell, Bénabou, under the name of algebraic theories, with aim towards topoi and logic.

Bar resolutions (see J. Baez website and the LNM Seminar on Triples and Categorical Homology Theory) are a way to canonically (i.e. functorially) describe an arbitrary algebra over a monad using only free algebras. It is a particular case of definition with generators and relations which is often the only way to describe infinite mathematical objects with finite expressions (computer algebra systems usually deal with finitely generated objects, and use generators and relations to describe their elements), but bar resolutions somehow are the universal way of doing this.

Most cohomology theories fit in the framework of bar constructions, though in various apparently unrelated ways. However, a visible common denominator of most constructions is the use of simplicial methods. This makes them of some use in homotopical algebra: bar resolutions are used to define canonical cofibrant resolutions of objects, which explains their uses in definition of derived functors.

### The Godement monad and sheaf cohomology

Consider now some abelian category of sheaves on a topological space X and a open cover $f: U to X$ which is acyclic for the given category of sheaves (for example, locally constant sheaves and contractible covers, coherent sheaves and affine covers in algebraic geometry…).

Then $C = f_ast f^{-1}$ usually defines a monad on X, from adjunction. If U has connected components $U_i$, $Cmathcal F$ is the direct sum of sheaves $mathcal F_i$ which are restrictions of $mathcal F$ to the $U_i$‘s. Iterating the monad C, one gets a (co)simplicial complex
$mathcal F to Cmathcal F to C^2 mathcal F to cdots to C^k mathcal F to cdots$

The $C^kmathcal F$ sheaves are acyclic and their sections are what we usually call Čech n-cochains. The simple complex associated to the simplicial complex is the usual Čech complex. Since C is a monad, the transformations $C^2 to C$ provide arrows going the other way (a retraction of the simplicial complex): these express the gluing properties of sheaves on acyclic subsets.

This is an example of simplicial cobar resolution associated to a monad, which was first used by Godement, with a slight generalisation: replacing f by the inclusion $X_0 to X$ where $X_0$ is X with discrete topology, one still gets acyclic (flasque) resolutions of sheaves, called Godement resolutions. These resolutions can be used to compute sheaf cohomology.

### General simplicial resolutions by monads

If T is a monad, the associated bar construction aims to describe a T-algebra X using only free objects $TY_i$, hoping that these free objects will be acyclic for most functors of interest, or cofibrant for the appropriate model structure. Like in the case of Godement’s monad, generalised later by Eilenberg, Moore, and Beck, these constructions should give simplicial objects $BX$ with a homotopy equivalence property w.r.t. to X, and with nice behaviour (such as cofibrancy).

If X is a T-algebra, there are maps $partial^k_i: T^{k+1} X to T^k X$ defined using the transformation $TT to T$ for the i-th factor in $T^k$. These maps give $T_{>0} X = (T^k X)_{k>0}$ the structure of a simplicial complex of T-algebras, which is the definition of the bar construction.

Then $X to T_{>0} X to X$ is the identity, and $T_{>0} X to X to T_{>0}X$ is homotopic to the identity. This means there exists a morphism $T_{>0} X to T_{>1} X$ whose boundaries (w.r.t the simplicial structure) are the identity and the projection on X. Such a morphism is obtained using the natural morphism $X to TX$. For example, the morphism $TX to TTX$ has a boundary $TX xrightarrow{iota_{TX}} T(TX) to TX$ which is the identity, and another $TX xrightarrow{T(iota_X)} TTX to TX$ which is projection on X. For higher degrees, the homotopy property is expressed by somewhat more complicated identities.

This resolution is actually obtained by iterating T as a comonad (if Y is a T-algebra, there are natural morphisms of T-algebras $TY to Y$ and $T(iota_Y): TY to TTY$).

If X is an arbitrary object, there is also a cosimplicial object $T^{>0} X$ whose coboundary maps are given by iterating the monad $X to TX$. This is the cobar construction, which also works for
coalgebras for a comonad (a comonad U acts as a monad on coalgebras, which have morphisms $Y to UY$ and $UUY to UY$).

### Other cohomology theories coming from bar constructions

If A is an associative k-algebra, the free module monad is the monad $T = A otimes_k bullet$ on vector spaces: if M is a T-algebra, i.e. a A module, the associated bar construction is the simplicial A-module $B(A,M) = F_{>0} A otimes M$, where $F_{>0} A$ is the tensor algebra over A, with simplicial structure given by products of elements of A. This is exactly the Hochschild complex of M over A: it is used to generalise group cohomology with the formula $H^bullet(A, M) = mathrm{Ext}_{A otimes A^{mathrm{op}}}^bullet(B(A,A), M)$. Free modules are acyclic for this cohomology: if A is a group algebra, this is group cohomology.

André-Quillen cohomology deals with deformation theory, and generalises the notion of Kähler differentials. If k is a ring and A a k-algebra, $Omega^1_{A/k}$ is the universal A-module which is a target for derivations $d: A to M in mathrm{Der}(A,M)$, such that $d(ab) = adb+bda$. If A is a symmetric algebra $k[V]$ of a k-module V, $mathrm{Der}(A,M) = V^ast otimes_k M$ is exact in M. The definition of André-Quillen (co)homology $Omega^bullet(A, M)$ (generalised to the sheaf case by Illusie as the cotangent complex) is then based on the simplicial bar resolution $S_bullet A$ of A by the (co)monad of symmetric algebras (on the category of k-modules). The tangent complex of A is then defined as $L_bullet A = Rmathrm{Hom}(Omega^1(S_bullet A), A)$, and $Omega^bullet(A,M) = H^bullet(Omega^1(S_bullet A) otimes M)$.

Given an arbitrary collection $E=(E_n)$ of sets (with an action of the symmetric group $Sigma_n$), the free operad $T(E)$ is the operad of abstract compositions of elements of $E_n$ (viewed as n-ary operations), which can be represented as an operad of decorated trees. There is a natural way of making $T(E)$ a collection (involving a bit of group theory for symmetric operads). If each of these abstract compositions is mapped to an element of E, the collection has an operad structure. So operads do not only generate monads, but are themselves described by a monad!

The monad T acts as a cooperad on the category of operads (which are the T-algebras): an operad M has natural morphisms of operads $TM to M$ and $T(M) to T(TM)$. Operads are thus subject to the bar construction, giving a simplicial complex of free operads. These are called quasi-free operads and play a major role on the study of algebraic structures up to homotopy.