The cohomology of coalgebras in species

Aguiar and Mahajan introduced a cohomology theory for the twisted coalgebras of Joyal, with particular interest in the computation of their second cohomology group, which gives rise to their deformations. We use the Koszul duality theory between twisted algebras and coalgebras on the twisted coalgebra that gives rise to their cohomology theory to give a new alternative description of it which, in particular, allows for its effective computation. We compute it completely in various examples, including those proposed by Aguiar and Mahajan, and obtain structural results: in particular, we study its multiplicative structure and provide a K\"unneth formula.


Introduction
In their manuscript [3,Chapter 9], Aguiar and Mahajan began investigating a cohomology theory defined for the twisted coalgebras of Joyal [13,14], with the idea of producing certain deformations of them. Indeed, as it often happens, a 2-cocycle on a coalgebra can be used to construct an infinitesimal deformation of it and, conversely, infinitesimal deformations of coalgebras correspond to 2-cocycles, as in [12]. In particular, they defined the relevant complex computing their cohomology theory, and performed some low degree computations. Although the deformations of Aguiar and Mahajan are performed on coalgebras X, which the theory dictates should be studied by the Cartier cohomology groups [7,8,17] where we view X as a bicomodule over itself, the fact their deformations only modify coefficients imply simpler a cohomology theory is needed to fulfill their desideratum: one can instead fix one coalgebra, the exponential species E, over which all coalgebras considered by Aguiar and Mahajan are bicomodules over, and instead compute the Cartier cohomology groups H * (X, E). With this at hand, the cohomology group H 2 (X, E) is indeed in bijection with the infinitesimal deformations Aguiar and Mahajan seek to obtain. These infinitesimal deformations always integrate over a field of characteristic zero, as we observe in Theorem 5.1, although this statement is already implicit in [3]. In this article, we use a version of Koszul duality theory [21] for algebras and coalgebras in combinatorial species (called 'twisted (co)algebras' in the literature [5,14]) to provide a small Koszul complex that computes the groups H * (X, E), the observation we make is that E is a cocommutative cofree conilpotent coalgebra and, as such is Koszul. To do this, we compute the Koszul dual algebra E ! corresponding to E, and show (Theorem 3.2) that under mild homological conditions on the empty composition, and exactly one decomposition of each length n ∈ N 0 . If T is a subset of I and σ : I −→ J is a bijection, we let σ T : T −→ σ (T ) be the bijection induced by σ .

Algebras and coalgebras in species
The category of species. A combinatorial species over a category C is a covariant functor X : Set × −→ C, where Set × is the category of finite sets and bijections. In particular, for every finite set I we have a map which gives an action of the symmetric group with letters in I on X[I]. The category Set × is a grupoid, and it has as skeleton the full subcategory spanned by the sets [n] = {1, . . . , n} (in particular, [0] = ∅), and a species is determined, up to isomorphism, by declaring its values on the finite sets [n] and on every σ ∈ S n . We denote by Sp(C) the category Fun(Set × , C) of species over C, whose morphisms are natural transformations.
Our main interest will lie on species over sets or vector spaces. We write Sp for the category of species over Set, the category of sets and functions, and call its objects set species. If a species takes values on the subcategory FinSet of finite sets we call it a finite set species, and if X(∅) is a singleton, we say it is connected. We write Sp k for the category of species over Mod k , the category of modules over k, and call its objects linear species. If a species takes values on the subcategory of finite generated modules we call it a linear species of finite type, and we say it is connected if X(∅) is k-free of rank one. Denote by k[−] the functor Set −→ Mod k that sends a set X to the free k-module with basis X, which we will denote by kX, and call it the linearization of X. By postcomposition, we obtain a functor L : Sp −→ Sp k that sends a set species X to the linear species kX. The species in Sp k that are in the image of k[−] are called linearized species.
The Cauchy product. Let X and Y be linear species over k. The Cauchy product X · Y is the linear species such that for every finite set I the direct sum running through all decompositions of I of length two. This construction extends to produce a bifunctor − · − : Sp k × Sp k −→ Sp k . In what follows, whenever we speak of the category Sp k , we will view it as a monoidal category with the monoidal structure.
It is important to notice the construction of the Cauchy product in Sp k carries over to the category Sp(C) when C is any monoidal category [15] with finite coproducts which commute with its tensor product. The main example of this phenomenon happens when C is the category Set. If X and Y are set species, the species X · Y has so that a structure z of species X · Y over a set I is determined by a decomposition (S, T ) of I and a pair of structures (z 1 , z 2 ) of species X and Y over S and T , respectively.
Coalgebras and bialgebras in species. An associative algebra (X, µ, η) in the category Sp k of k-linear species will simply be called an algebra; if we need to make a clear distinction between usual algebras in Mod k and those in species, we will use the term 'twisted algebra' as in [5,Chapter 4]. Such an object is determined by a product µ : X · X −→ X and a unit η : 1 −→ X. Specifying the first amounts to giving its components at each decomposition (S, T ) of every finite set I, and specifying the latter amounts to a choice of the element η(∅)(1) ∈ X(∅), which we will denote by 1 if no confusion should arise. We think of the product as an operation that glues partial structures on I, and of the unit as an "empty" structure. Dually, a coassociative coalgebra (X, ∆, ε) in Sp k , which we call simply a coalgebra, is determined by a coproduct ∆ : X −→ X ⊗ X and a counit ε : X −→ 1. The coproduct has, at each decomposition (S, T ) of I, a component which we think of as breaking up a combinatorial structure on I into substructures on S and T , while the counit is a map of k-modules X[∅] −→ k. As usual, a bialgebra is an algebra in the category of coalgebras in species or, equivalently, a coalgebra in the category of algebras in species. We can also consider 'set-theoretic' analogues of the three objects above. For example, by a set algebra we mean a set species X 0 endowed with product maps one for each pair (S, T ) of (disjoint) finite sets, satisfying suitable associativity conditions. Similarly, by a set coalgebra we mean a set species X 0 endowed with product and coproduct maps satisfying suitable coassociativity conditions.
The exponential species. We write E for the k-linear species for which E[I] is one dimensional with basis the singleton {I}. For convenience, we write e I for the corresponding basis element.
We call this the exponential species, and observe that, by definition, it is a linearized species of the form kE 0 for the set species E 0 with E 0 [I] = {I} for each finite set I. The following proposition endows the exponential species with a bialgebra structure. Proposition 1.1 The linearized exponential species E is a bialgebra with product and coproduct with components at each decomposition (S, T ) of a finite set I such that µ(S, T )(e S ⊗ e T ) = e I and ∆(S, T )(e I ) = e S ⊗ e T and with unit and counit the morphisms ε : E −→ 1 and η : 1 −→ E such that ε(e ∅ ) = 1 and η(1) = e ∅ .
Proof. The verifications needed to prove this follow immediately from the fact that E 0 [I] is a singleton for every finite set I.
Although Aguiar and Mahajan are interested in coalgebras in species, the following proposition shows that, when such coalgebras arise from set coalgebras, they automatically become bicomodules over the exponential species. This allows us to work with a linear category of bicomodules, as opposed to a category of coalgebras, and to interpret Aguiar and Mahajan's cohomology theory as a derived functor in the category of E-bicomodules.

Proposition 1.2
The exponential species E 0 admits a unique structure of set-theoretic bialgebra so that if X 0 is a set-theoretic coalgebra in Sp, the linearization of the unique morphism of species X 0 −→ E 0 is a morphism of coalgebras. In particular, every coalgebra coming from a set-theoretic coalgebra is canonically an E-bicomodule.
Proof. If S is a singleton set and X is any set, there is a unique function X −→ S, and it follows from this, first, that the bialgebras structure defined on E is the only linearized bialgebra structure, and, second, that if X is a species in Sp, there is a unique morphism of species X −→ E. If X is a pre-coalgebra in Sp, the following square commutes because E[S] × E[T ] has one element: and, by the same reason, X −→ E is pre-counital. All this shows that the exponential species E is terminal in the category of linearized coalgebras. This completes the proof.
Representations of the exponential species. We will fix some useful notation to deal with coalgebras. Let X = kX 0 be a linearized species that is a coalgebra in Sp k . If z is an element of X 0 [I], we write with z S ⊗ z T denoting an element of X[S] ⊗ X[T ] à la Sweedler, not necessarily an elementary tensor. Consider now a left E-comodule X with coaction λ : can canonically be viewed as map X[I] −→ X[T ] which we denote by λ I T , and call the it the restriction from I to T to the right. In these terms, that λ be counital means λ I I is the identity for all finite sets I, and the equality 1 ⊗ λ • λ = ∆ ⊗ 1 • λ , which expresses the coassociativity of λ , translates to the condition that we have λ I A = λ B A • λ I B for any chain of finite sets A ⊆ B ⊆ I. Let us write FinSet inc for the category of finite sets and inclusions. This discussion leads to the following: These are usually called FI-modules in the literature, see for example [9]. When convenient, we will write z S for λ I S (z) without explicit mention to I, which will usually be understood from context. Using this notation, we can write the coaction on X as Of course the same consideration apply to a right E-comodule, and we write z T for ρ I T (z). If X is both a left and a right E-comodule with coactions λ and ρ, the compatibility condition for it to be an E-bicomodule is that, for any finite set I and pair of non-necessarily disjoint subsets S, T of I, we have ρ S S∩T λ I S = λ T S∩T ρ I T . In a completely analogous fashion, there is a category FinSet binc , and the category of E-bicomodules is equivalent to the category of pre-sheaves We leave its construction to the categorically inclined reader. There is a close relation between linearized coalgebras and linearized E-bicomodules, as described in the following proposition. In fact, all the bicomodules we are interested in arise from the construction in this proposition. Proposition 1.4 Let (Z, ∆) be a linearized coalgebra, and let f Z : Z −→ E be the unique morphism of linearized coalgebras described in Proposition 1.2. There is on Z an E-bicomodule structure so that the coactions λ : Z −→ E · Z and ρ : Z −→ Z · E are obtained from postcomposition of ∆ with f Z ⊗ 1 and 1 ⊗ f Z , respectively.
We refer the reader to [3, Chapter 8, §3, Proposition 29]. Remark that, with this proposition at hand, the notation introduced for bicomodules and that introduced for coalgebras is consistent.
2. For 0 < i < n+1, consider the map d i : C n (X, C) −→ C n+1 (X, C) induced by post-composition with the coproduct of C at the ith position. 3. For i = 0, n + 1, let d 0 , d n+1 : C n (X, C) −→ C n+1 (X, C) be the maps obtained post composing with the left and right comodule maps of X, respectively.
It is straightforward to check that, by virtue of the coassociativity of C and the bicomodule axioms, the maps above satisfy the usual cosimplicial identities. It follows that if for each n ∈ N we define the alternated sum δ n = ∑ n+1 i=0 (−1) i d i , we obtain a cohomologically graded complex (C * (X, C), δ * ).

Definition 2.1
The cohomology of X with values in C is the cohomology of the cochain complex (C * (X, C), δ * ), and we denote it by H * (X, C).
The homologically inclined reader will notice that these cohomology groups are equal to the groups Ext * (X, C) with the Ext taken in the category of C-bicomodules [11]. In the following we will mainly consider the case in which C is the exponential species, but will make it clear when a certain result can be extended to other coalgebras. Usually, it will be necessary that C is linearized and with a linearized bialgebra structure, and we will usually require that C be connected. Because of the plethora of relevant examples of such bialgebras found in [3] and other articles by the same authors, such as [4], there is no harm in restricting ourselves to such species.
The theory for the exponential species. Fix an E-bicomodule X. The complex C * (X, E), which we will denote more simply by C * (X), has in degree q the collection of morphisms of species α : X −→ E ·q . Such a morphism is determined by a collection of k-linear maps α(I) : one for each finite set I, which is equivariant, in the sense that for each bijection σ : I −→ J between finite sets, and every z ∈ X[I], the equality σ (α(I)(z)) = α(J)(σ z) holds. More generally: . . , Y r are linear species, a map of species α : X −→ Y 1 · . . . · Y r determines and is determined by a choice of equivariant k-module maps one for each finite set I, where the direct sum runs through decompositions (S 1 , . . . , S r ) of length r of the finite set I.
The map α(I) is specified uniquely by its components at each decomposition S = (S 1 , . . . , S r ), which we denote α(S 1 , . . . , S r ) without further mention to the set I which is implicit. Moreover, it suffices to specify α I for I the sets n with n ∈ N 0 . This said, we will usually define a map α : X −→ Y 1 · . . . · Y r by specifying its components at each decomposition of I of length r. For each finite set I, the space E ·q [I] is a free k-module with basis the tensors of the form F 1 ⊗ · · · ⊗ F q with F = (F 1 , . . . , F q ) a decomposition of I; for simplicity, we use the latter notation for such basis elements. In terms of this basis, we can write Observe that the equivariance condition says that, for a bijection σ : I −→ J, and (F 1 , . . . , F q ) a decomposition of I, we have for each z ∈ X[I]. Now fix a q-cochain α : X −→ E ·q in C * (X). By the remarks in the last paragraph, to determine the (q + 1)-cochain δ α : X −→ E ·(q+1) it is enough to determine its components.
Lemma 2.1 For each decomposition F = (F 0 , . . . , F q ) of a set I, then the component of the ith coface d i α at F is given, for z ∈ X[I], by Proof. Indeed, let us follow the prescription above and compute each coface map explicitly. If z ∈ X[I], to compute d 0 α(z), we must coact on z to the left and evaluate the result at α, that is . The same argument gives the last coface map. Now consider 0 < i < q + 1, so that we must take z ∈ X[I], apply α, and then comultiply the result at coordinate i. Concretely, write and pick a decomposition F = (F 0 , . . . , F q ) into q + 1 blocks of I. There exists then a unique F q I such that 1 i−1 ⊗ ∆ ⊗ 1 q−i (F) = F , to wit, F = (F 0 , . . . , F i ∪ F i+1 , . . . , F q ), and in this way we obtain the formulas of Equation (2).
Since E is counital, the complex above admits codegeneracy maps, which are much easier to describe: they are obtained by inserting an empty block into a decomposition. Concretely, for each j ∈ {0, . . . , q + 1}, As a consequence of this, a cochain α : if its components are such that α(F)(z) = 0 ∈ k whenever F contains an empty block. Alternatively, we can construct a (non-unital) coalgebra E with E(∅) = 0 and E[I] = E[I] whenever I is nonempty, and describe the normalized complex C * (X) as the complex of maps X −→ E · * with differential induced by the alternating sum of the coface maps we just described.
is always nonzero. This observation will be useful in Section 3.
The cobar complex and cup products. Since the coalgebra E is, in fact, a cocommutative Hopf algebra, we can endow the complex C * (X) with the structure of a dga algebra and hence produce on the cohomology groups H * (X, E) a structure of an associative algebra, as follows. First, let us give an alternative way of constructing the complex C * (X).
Let Ω * (E) denote the cobar construction on the coalgebra E (see [16,Chapter 3] for the case of usual associative algebras). This is a dg algebra which is freely generated by s −1 E, the shift of the species E without the counit, and whose differential is induced from the coproduct of E: it is the unique coderivation extending the map We can then form the space which, as a graded vector space, coincides with the normalized complex for C * (X, E): the way we shifted E makes sure that maps X −→ E ⊗n live in degree n. Observe, moreover, that this hom-set above inherits a differential δ 1 by post-composition with the differential and this coincides in fact with the internal sum of the coface maps above, omitting the endpoints 0 and n + 1. To obtain the full differential δ , we consider the canonical degree −1 injection τ : E −→ Ω * (E) and the differential δ 2 obtained by the following composition where p is the degree of ϕ : X −→ E ⊗p : A perhaps tedious but straightforward computation shows that δ 1 − δ 2 coincides with δ , so that we obtain a new description of the complex C * (X, E) as a complex 'twisted' by τ (the summand δ 2 is the twist determined by τ):

Proposition 2.2
The dg coalgebra Ω * (E) is in fact a dg bialgebra if we endow it with the shuffle product induced from the cocommutative coproduct of E, which we will denote by ∆ Ω * (E) .
Proof. This statement is completely dual to the classical statement (see for example Chapter 8 in [18]) that if A is a commutative algebra then the bar construction BA is a commutative algebra with the shuffle product induced from the commutative product of A. We remind the reader that it is crucial that A be commutative (and hence, in our case, that E be cocommutative) for this product to be compatible with the differential of BA.

Definition 2.2
We define the external product Note that we use the fact E is a Hopf algebra, which implies that the category of E-bicomodules admits an internal tensor product. Concretely, if X and Y are E-bicomodules, we endow the tensor product X ⊗ Y with the left and right diagonal actions coming from the product of E. In case we have a coproduct map ∆ : X −→ X⊗X making X into a coalgebra in the category of E-bicomodules, we can use this external product to obtain a cup product in C * (X), which we will write

Remark 2.2
In general, the algebra H * (X) will be non-commutative: for example, if X is concentrated in cardinal zero, then the datum of X really amounts to that of the coalgebra X[∅], a coalgebra in k-modules, and H * (X) is the algebra dual to it, which may very well be non-commutative.
If X is an E-bicomodule and ∆ : X → X · X a morphism of E-bicomodules, we write, for each I and each z ∈ X[I], à la Sweedler, with each summand z (S) ⊗ z (T ) appearing here standing for an element -not necessarily an elementary tensor-of the submodule X[S] ⊗ X[T ] of (X · X)[I], as in Equation (1). If α : X → E ·p and β : X → E ·q are a pand a q-cochain in the complex C * (X), then their product α β ∈ C p+q (X) has coefficients given by In what follows, we will usually consider every E-bicomodule whose underlying species is a linearization of a coalgebra in the way described in this proposition. In particular, in the notation we used in Equation (1) for coproducts of coalgebras and the notation we used for bicomodules in Equation (2), the term z S ⊗ z T corresponds to z (S) ⊗ z (T ) .

An alternative description of cohomology
The objective of this chapter is to obtain an alternative and more useful description of the cohomology groups of an E-bicomodule X. We show that E is a Koszul coalgebra, compute its Koszul dual algebra and show that if X is weakly projective, that is, if for each non-negative integer j, the component X[ j] is a projective kS j -module, there is a Koszul complex that calculates H * (X), and which can be used for effective computations.
Koszul duality for coalgebras in species. Let us now consider the weight grading in E where we put E(n) in weight n. Then the algebra Ω * (E) admits a homological grading where (F 1 , . . . , With this grading at hand, the differential in Ω * (E) is of degree −1. In particular, H 0 (Ω * (E)) is a quotient of Ω * (E).
For j 1 and for each integer p −1, let Σ p ( j) be the collection of compositions of length p + 2 of [ j]. We will identify the elements of Σ j−2 ( j) with permutations of [ j] in the obvious way. There are face maps ∂ i : that make the sequence of sets Σ * ( j) = (Σ p ( j)) p −1 into an augmented semisimplicial set. We write kΣ * ( j) for the augmented semisimplicial k-module obtained by linearizing Σ * ( j), and kΣ * ( j) for the dual semicosimplicial augmented k-module. There is an action of S j on each Σ p ( j) by permutation, so that if τ ∈ S j and if (F 0 , . . . , F t ) is a composition of [ j], then τ(F 0 , . . . , F t ) = (τ(F 0 ), . . . , τ(F t )).
It is straightforward to check the coface maps are equivariant with respect to this action, so Σ * ( j) is, in fact, an augmented semisimplicial S j -set. Consequently, kΣ * ( j) and kΣ * ( j) have corresponding S j -actions compatible with their semi(co)simplicial structures. This complex Σ * ( j) is known in the literature as the Coxeter complex for the braid arrangement, and its cohomology can be completely described. We refer the reader to [2] and [6] for details.

Proposition 3.1
The complex associated to kΣ * ( j) computes the reduced cohomology of a ( j −2)sphere with coefficients in k, that is, The non-trivial term is the k-module freely generated by the class of the map ξ j : kΣ * ( j) −→ k such that ξ j (σ ) = δ σ =1 and the action of kS j on H j−2 (kΣ * ( j) ) is the sign representation.

Remark 3.1
In what follows, sgn j will denote the sign representation of kS j just described. Note that, when j = 1, S j−2 = ∅, and the reduced cohomology of such space is concentrated in degree −1, where it has value k.
We now observe that Ω * (E) is equivariantly isomorphic to the normalization of Σ * −2 , which immediately implies the following result: This theorem also allows us to identify E ! as an algebra. The signed exponential species [3, Section 9.3.1] is given by E − [I] = |I| k I . As such, it is one dimensional, and the action of S I on it is the sign representation. We define the a desuspension functor on symmetric sequences by It is clear how to extend this to a functor on (co)algebras.
One can in fact show that E is Koszul without resorting to the above geometrical considerations. Indeed, E is the cofree conilpotent cocommutative coalgebra over the unit species (that is, a single generator in degree zero) and, as such, it is immediately Koszul. Moreover, its Koszul dual is the commutative algebra over the suspension of the unit species (that is, a single generator in degree minus one). This is exactly the species Σ −1 E − above. Below, it will be important to note that E − carries signs in its product: for example, if e 1 and e 2 are generators corresponding to the singletons {1} and {2}, then e {1,2} = e 1 e 2 = −e 2 e 1 .

Remark 3.2
The previous paragraph shows us how the purely algebraic theory of Koszul duality can shed light into combinatorics: the observation above implies immediately that the Coxeter complex has the homology of a sphere, for example, and that the representation of this top homology group is the sign representation without doing any computation at all.
All the work done so far shows that the complex Hom(X, Ω(E)) computes the cohomology of X.
If we further assume that X is weakly projective, then the functor Hom(X, −) is exact so that it preserves quasi-isomorphisms. We deduce that: Theorem 3.2 If X is weakly projective, the Koszul complex K * (X) = Hom(X, E ! ) computes the cohomology groups H * (X). Explicitly, we have that for each p ∈ N, K p (X) = Hom S p (X[p], sgn p ) and the differential is given by and similarly for ϕ τ.
Moreover, we have the following computational result: It follows that if X is a linearization kX 0 , the value of d f (z) for f ∈ K p (X) and an element z ∈ X 0 (p + 1) depends only on data that is degree-wise finite if X is of finite type.
Proof. Let us write down τ ϕ explicitly. Given some z ∈ X[I], the definition of τ shows that the composition (τ ⊗ 1)ρ is obtained by keeping in ρ(z) only those summands where the left hand side is supported in cardinality one. This gives us the sum ∑ i∈I s i e i ⊗ z (I i). Multiplicative matters. We now describe how to exploit the Koszul complex to deduce a Künneth theorem for the Cauchy product.
Proposition 3.2 For each such p, q ∈ N there is an isomorphism Proof. This is readily described as follows. For each decomposition (S, T ) of n, let u = u S,T be the unique bijection that assigns S to [p] and T to [p + 1, p + q] in a monotone fashion, and given an where uz = z , uw = w and z ⊗ w ∈ X[S] ⊗ Y(T ). We claim this is S p+q -equivariant. Note that the sign of u is sch(S, T ). Indeed, if τ is a permutation of n and (S, T ) is a decomposition of n, we can write τ = ξ ρ where ρ = τ 1 × τ 2 is a shuffle of (S, T ) and ξ is monotone over S and over T . It is clear that if (S , T ) is the image of (S, T ) under τ and if u = u S ,T then u = u ξ . Moreover, note that u(τ 1 z ⊗ τ 2 w) is transported to u(z ⊗ w) by uρ −1 u −1 , which belongs to S p × S q , and we now compute where the signs cancel by virtue of the identities ξ ρ = τ and u ξ = u.
For each p, q ∈ N there are canonical maps that are all isomorphisms if k is a field and X or Y is finite in each arity, and they collect along with the maps φ to define a map Explicitly, given maps f p : X[p] −→ sgn p and g q : Y(q) −→ sgn q , we have for each decomposition where u = u S,T . We obtain now the main result of this section, a Künneth formula that allows us to compute the cohomology groups of a product in terms of its factors.
is such that for equivariant maps f : X[p] −→ sgn p and g : X[q] −→ sgn q , and z ∈ X(p + q), where the sum runs through decompositions of [p + q] with #S = p and #T = q.
Before giving the proof, we begin with a few preliminary considerations. First, consider a (p, q)shuffle (σ 1 , σ 2 ) of [p + q], with associated composition (S, T ), and let σ be the permutation of [p + q] obtained by concatenating σ 1 and σ 2 . Proof. Indeed, by counting inversions, it follows that the number of inversions in σ is precisely inv σ 1 + inv σ 2 + sch(S, T ), which proves the first assertion. The second claims follows from the first and the fact σ 1 σ 2 and σ 2 σ 1 differ by pq transpositions.
If α : X[p] −→ E ·p is a cochain, we associate to it the equivariant map f : Conversely, given such an equivariant map, we associate to it the cochain α : . We now proceed to the proof of Theorem 3.5.
Suppose now that X is a cosymmetric E-bicomodule. Then Theorem 3.3 proves the differential in K * (X) is trivial, while Lemma 3.1 along with Proposition 3.5 prove that the cup product in K * (X) is graded commutative. We have obtained the following result: Suppose that X is a cosymmetric E-bicomodule. Then K * (X) is isomorphic to the cohomology algebra H * (X). In particular, H * (X) is graded commutative.
Some computations. To illustrate the use of the Koszul complex we compute the cohomology groups of some of the coalgebras considered by Aguiar and Mahajan and, in doing so, try to convince the reader of the usefulness of the complex we obtained. To begin with, we include a new computation that is greatly simplified with the use of the small complex. We remark that, as far as the author knows, the only complete computation of such cohomology groups that was known before the methods in this paper were introduced, are H * (E) and the first two cohomology groups of H * (L), along with a single cohomology class in H 2 (L). Throughout, we will use the following fact: Observation 3.1 If k is not of characteristic two, then a functional f ∈ Hom S p (X[p], sgn p ) vanishes on every z ∈ X[p] that is fixed by an odd permutation.
Indeed, we see that if σ z = z and if σ is odd then − f (z) = f (σ z) = f (z), from where the claim follows.
The species of singletons and suspension. Define the species s of singletons so that for every finite set I, S[I] is trivial whenever I is not a singleton, and is k-free with basis I if I is a singleton. The species S admits a unique E-bicomodule structure. By induction, it is easy to check that, for each integer q 1, the species S ⊗q , which we write more simply by S q , is such that S q [I] is k-free of dimension q! if I has q elements with basis the linear orders on I, and the action of the symmetric group on I is the regular representation, while S q [I] is trivial in any other case. By convention, set S 0 = 1, the unit species. It follows that the sequence of species S = (S n ) n 0 consists of weakly projective species, and we can completely describe their cohomology groups. They are the analogues of spheres for species, its first property consisting of having cohomology concentrated in the right dimension: Proof. Fix n 0. By the remarks preceding the proposition, it follows that K q (S n ) always vanishes except when q = n, where it equals Hom S n (kS n , sgn n ), and this is one dimensional. Because each S n is weakly projective, K * (S n ) calculates H * (S n ), and the claim follows.
The above motivates us to check whether S · − acts as a suspension for H * (−). Assume that X is weakly projective, so we may use K * (X) to compute H * (X). We claim that K * (S · X) identifies with K * (X)[−1]. Indeed, for this it suffices to note, first, that (S · X)(n) is isomorphic, as an kS nmodule, to the induced representation k ⊗ X(n − 1) from the inclusion S 1 × S n−1 → S n , and second, that the restriction of the sign representation of S n under this inclusion is the sign representation of the subgroup S n−1 , so that: A bit more of a calculation shows the differentials are the correct ones. By induction, of course, we obtain that S j · X has the cohomology of X, only moved j places up.
Proposition 3.4 Assume X is weakly projective. For each j, the suspension s j X = S j · X is also weakly projective, and there is a natural suspension isomorphism H * (s j X) −→ s j H * (X) in cohomology groups.
The exponential species. Every structure on a set of cardinal larger than 1 over the exponential species E is fixed by an odd permutation: if I is a finite set with more than one element, there is a transposition I −→ I, and it fixes e I . It follows that K q (E) is zero for q > 1, and it is immediate that K 0 (E) and K 1 (E) are one dimensional, while we already know d = 0. Thus H q (E) is zero for q > 1 and is isomorphic to k for q ∈ {0, 1}. The cup product is then completely determined. This is in line with the computations done in the thesis [10] of J. Coppola: Proposition 3.5 (J. Coppola) The cohomology algebra of E is isomorphic to the exterior algebra k[t]/(t 2 ) in one generator.
The species of partitions. The species of partitions P assigns to each finite set I the collection P[I] of partitions X of I, that is, families {X 1 , . . . , X t } of disjoint non-empty subsets of I whose union is I. There is a left E-comodule structure on P defined as follows: if X is a partition of I and S ⊂ I, X S is the partition of S obtained from the non-empty blocks of {x ∩ S : x ∈ X}. We already noted there is an inclusion E −→ P. One can check that for any bicomodule X we have a cocycle κ : X −→ E such that κ(I)(z) = |I|e I , which we call the cardinality cocycle. In case X is cosymmetric, one can check this is not a boundary.
Proposition 3.6 The cohomology group H 0 (P) is free of rank one, and H 1 (P) is free of rank one generated by the cardinality cocycle. In fact, the inclusion E −→ P induces an isomorphism of commutative algebras K * (P) −→ K * (E).

Proof.
A partition of a set with at least two elements is fixed by a transposition, and this implies that K j (P) = 0 for j 2. On the other hand, K 0 (P) and K 1 (P) are both k-free of rank one, and we already know from Proposition 3.3 that the differential of K * (P) is zero. This proves both claims.
The species of linear orders. The set species of linear orders L 0 assigns to each finite set I set set L 0 [I] of linear (also called total) orders on I. It admits a cocommutative set coalgebra structure for which L 0 [I] −→ L 0 [S] assigns a linear order on I to its restriction on S ⊆ I. The resulting kS jmodule L[ j] is the regular representation of S j for each j 0, and it follows that the k-module Hom S j (L[ j], sgn j ) is k-free of rank one. Since L is cocommutative, by virtue of Theorem 3.3, the computation ends here: the differential on this Koszul complex is identically zero. Each K j (L) is one dimensional generated by the map f j : L[ j] −→ k that assigns σ −→ (−1) σ . A calculation, which we omit, shows the following. It is useful to note that the element f 1 corresponds to the cardinality cocycle of L and that f 2 corresponds to the Schubert cocycle defined by Aguiar and Mahajan [3, Section 9.7.1].
Proposition 3.7 The algebra K * (L) is generated by the elements f 1 and f 2 , so that if f p is the generator of K p (L), we have These relations exhibit H * (L) as a tensor product of a divided power algebra and an exterior algebra.
This in turn fixes a small error in the literature [3,Proposition 9.28], which claims there is another 2-cocycle in H 2 (L): unfortunately, the 'descent cocycle' defined there does not satisfy the cocycle equation. We will address the multiplicative structure of H * (L) below.
The species of compositions. The species of compositions C is the non-abelian analogue of the species of partitions P. Let us recall its construction: the species of compositions C assigns to each finite set I the set C[I] of compositions of I, that is, ordered tuples (F 1 , . . . , F t ) of disjoint non-empty subsets of I whose union is I. This has a standard left E-comodule structure such that if F = (F 1 , . . . , F t ) is a composition of I and S ⊆ I, F S is the composition of S obtained from the tuple (F 1 ∩ S, . . . , F t ∩ S) by deleting empty blocks. We view C as an E-bicomodule with its cosymmetric structure. Proof. It suffices that we prove the second claim, and, since K * (−) is a functor, that for a fixed integer q, the map K q (C) −→ K q (L) is an isomorphism of modules. This follows from the fact a decomposition F of a set I is fixed by a transposition as soon as it has a block with at least two elements, and therefore an element of K q (C) vanishes on every composition of [q], except possibly on those into singletons. Thus the surjective map K * (C) −→ K * (L) is injective and it is thus an isomorphism of commutative algebras.
The species of graphs. The species Gr of graphs that assigns to each finite set I the collection of graphs with vertices labeled by I admits a cosymmetric E-bicomodule structure obtained by restriction of graphs. We have the following result concerning the cohomology groups of Gr: If k is of characteristic zero then, for each non-negative integer p 0, dim k H p (Gr) equals the number of isomorphism classes of graphs on p vertices with no odd automorphisms, namely, 1, 1, 0, 0, 1, 6, 28, 252, 4726, 150324, . . .
Proof. Since the structure on Gr is cosymmetric, the differential of K * (Gr) vanishes, and since we are mapping to the sign representation, this tells us K q (Gr) has dimension as in the statement of the proposition. The tabulation of the isomorphism classes of graphs in low cardinalities can be done with the aid of a computer -we refer to Brendan McKay's calculation [19] for the final resultand then filter out those graphs with odd automorphisms.
We can exhibit cocycles whose cohomology classes generate H 1 (Gr) and H 4 (Gr): in degree one, we have the cardinality cocyle κ, and in degree four, the normalized cochain p 4 : Gr −→ E ⊗4 such that for a decomposition F 4 I, and a graph g with vertices on I, and ζ (i) ∈ F i for i ∈ [4]. One can check this cochain is in fact a cocycle, and it is normalized by construction. Even more can be said: our formula for the cup product and induction shows that for each n 1, the product f n is nonzero on the graph that is the disjoint union of n paths p 4 , so that H 4n is always non-vanishing for n 1. Hence the cohomology algebra H * (Gr) contains both an exterior algebra in degree 1 and a polynomial algebra in degree four.

Koszul duality for (twisted) coalgebras
Let us fix a (twisted) coalgebra C. The work done above carries over, mutatis mutandis, to the case C is Koszul. When this is the case, for every C-bicomodule we have available the Koszul complex to compute its cohomology groups H * (X, C). The structure of certain (co)algebras arising from combinatorial objects (such as polytopes) can be nicely understood through combinatorial methods, see for example [1]. We also remark that in the book [5, Chapter 4], V. Dotsenko and M. Bremner explain how apply methods of Gröbner bases to twisted algebras, which can then be effectively used to obtain results on the Koszulness of these. In particular, their formalism implies immediately that every free cocommutative (twisted) coalgebra is Koszul, by repeating, mutatis mutandis, the proof done in the classical case.
Remark 4.1 It very often happens that C is Koszul for trivial reasons: if C is a cocommutative connected (twisted) bialgebra, then by the Milnor-Moore theorem (see [4,Theorem 118] and [23,Theorem 11.3]) the underlying coalgebra of C is cocommutative cofree over the collection of its primitives.
We can apply this remark to the species L of linear orders to deduce the following result which should aid us in computing H * (−, L) in the category of L-bicomodules. With this at hand, we can prove the following result. Proof. The first equality follows by Koszul duality, since the algebra S(s −1 Lie) is Koszul dual to L and, as such equal to the homology of the cobar construction on L. For the second equality, all that we need to do is observe that for a finite set I of size p, an elementary tensor z 1 · · · z p−q ∈ S(s −1 Lie)[p] p−q of S(s −1 Lie) is in homological degree p − q and corresponds to the datum of an unordered partition of I into subsets (F 1 , . . . , F p−q ) with z i ∈ Lie[F i ]. On the other hand, for a finite set [n] we have a basis of Lie[n] indexed by permutations of n that fix 1. In this way, such an elementary tensor is indeed in bijection with a permutation of I with p−q disjoint cycles, which is what we wanted.
As pointed out to the author, the previous theorem computes the underlying k-spaces of the Koszul dual algebra H(Ω(L)) = L ! , but does not compute the symmetric group actions, which are necessary to carry out the computation of the Koszul complex Hom(X, L ! ). It would be interesting to obtain this description.

A word on deformations
Fix a coalgebra X in Sp k , with comultiplication ∆ : X −→ X · X and counit ε : X −→ 1, and set K = k t , the algebra of formal power series in k. We write X t for the coalgebra in Sp K obtained by extending scalars pointwise in X. By a weak deformation of X we mean a K-linear coalgebra structure ∆ t : X t −→ (X · X) t determined on generators by where ∆ i : X −→ E 2 and ∆ 0 = 1.
Remark 5.1 These deformation are weak in the sense we are only modifying the coefficients of our comultiplication by means of a power series coefficient and not modifying the higher order terms of the comultiplication: the terms z S ⊗ z T appearing in the formula above are the original ones appearing in the comultiplication of X.
As mentioned in the introduction, generic deformations require us to consider maps ∆ i : X −→ X ·2 that are cochains in C 2 (X, X), but we are only allowing for cochains in C 2 (X, E). The condition that ∆ t is associative is equivalent to the collection of equalities ∑ i+ j=n for n ∈ N 0 and (R, S, T ) an arbitrary decomposition of a finite set. The condition that ∆ t is counital es equivalent to each ∆ i being normalized for i 1. In particular (δ 1 ) says that ∆ 1 belongs to Z 2 (X, E), as expected. Thus, every weak deformation of X gives a corresponding 2-cocycle representing an element in H 2 (X, E) .
In turn, we define a Gerstenhaber bracket using the following formulas: With this at hand, we can write equation (δ n ) in the succinct form ∑ i+ j=n We say a 2-cocycle ∆ 1 is integrable if it arises in this way from a deformation of X. We note that from (δ 2 ) that if ∆ 1 is integrable, then its first obstruction σ 1 = ∆ 1 ∆ 1 must me a coboundary in C 3 (X, E). A lengthy calculation shows that the first obstruction σ 1 is a 3-cocycle. One can use every 2-cocycle to deform a coalgebra in the strong sense in characteristic zero which is, as we mentioned, the sense in which Aguiar and Mahajan intend to deform coalgebras in [3].
Theorem 5.1 Suppose k is of characteristic zero and let ∆ 1 be a normalized 2-cocycle X −→ E 2 . Then there exists a weak deformation X t of X corresponding to ∆ 1 .
Proof. We set, for each i ∈ N 0 and each decomposition (S, T ) of a finite set, Moreover, what we did above shows one can integrate a cocycle up to degree p − 1 when k is of characteristic p, and in such case the pth obstruction to the integrability of ∆ 1 is just as in [12, p. 70].