Bialgebraic approach to rack cohomology

We interpret the complexes defining rack cohomology in terms of a certain differential graded bialgebra. This yields elementary algebraic proofs of old and new structural results for this cohomology theory. For instance, we exhibit two explicit homotopies controlling structure defects on the cochain level: one for the commutativity defect of the cup product, and the other one for the"Zinbielity"defect of the dendriform structure. We also show that, for a quandle, the cup product on rack cohomology restricts to, and the Zinbiel product descends to quandle cohomology. Finally, for rack cohomology with suitable coefficients, we complete the cup product with a compatible coproduct.


Introduction
A quandle X is an algebraic structure whose axioms describe what survives from a group when one only looks at the conjugacy operation. Quandles have been intensively studied since the 1982 work of D Joyce [14] and S Matveev [19], who showed how to extract powerful knot invariants from them. But the history of quandles goes back much further. Racks, which slightly generalize quandles, can be traced back to an unpublished 1959 correspondence between J Conway and G Wraith; keis, or involutive quandles, appeared in 1943 in an article of M Takasaki [29], and other related structures were mentioned as early as the end of the 19th century. A thorough account, focusing on topological aspects through the rack space, can be found in R Fenn, C Rourke and B Sanderson [13]. Other viewpoints and various applications to algebra, topology, and set theory are treated, for instance, in Andruskiewitsch and Graña [1], Dehornoy [8], Elhamdadi and Nelson [9], Kinyon [15] and Przytycki [21].
Rack cohomology H R .X/ was defined by Fenn, Rourke and Sanderson in 1993 [11]. It strengthened and extended the applications of racks. The cup product^on H R .X / was first described in topological terms by F Clauwens [5]. Later S Covez proposed a cubical interpretation, which allowed him to refine the cup product to a dendriform structure using shuffle combinatorics, and further to a Zinbiel 1 product^using acyclic models [6; 7]. This yields in particular the commutativity of^.
Rack cohomology is a particular case of the cohomology of set-theoretic solutions to the Yang-Baxter equation, as constructed by J S Carter, M Elhamdadi and M Saito [2]. This very general cohomology theory still belongs to the cubical context. It thus carries a commutative cup product, explicitly described by M Farinati and J García Galofre [10]. V Lebed [17] gave it two new interpretations: in terms of M Rosso's quantum shuffles [26], and via graphical calculus. She gave a graphical version of an explicit homotopy on the cochain level, which controls the commutativity defect of^.
Our purpose is to study a differential graded bialgebra B.X / that is attached to any rack X, and governs the algebraic structure of its cohomology. This construction was first unveiled in [10]. We show that B.X / is graded cocommutative up to an explicit homotopy, which implies the commutativity of the cup product^on H R .X /. This yields a purely algebraic version of the diagrammatic construction from [17]. On a quotient B.X/ of B.X /, we refine the coproduct to a dg codendriform structure. Even better, this codendriform structure is co-Zinbiel up to another explicit homotopy, which has not been described before. As a result, the associative commutative cup product on H R .X/ stems from a Zinbiel product^, which coincides with the one from [7]. Both the rack cohomology H R .X / and our dg bialgebra B.X / can be enriched with coefficients. For finite X and suitably chosen coefficients, we completê with a compatible coassociative coproduct. Here again our bialgebraic interpretation considerably simplifies all verifications.
The rack cohomology of a quandle received particular attention, starting from the work of Carter, Jelsovsky, Kamada, Langford and Saito [3] and R A Litherland and S Nelson [18]. It is known to split into two parts, called quandle and degenerate: H R D H Q˚HD . The degenerate part H D is far from being empty, since it contains (a shifted copy of) H Q as a direct factor: H D D H Q OE1˚H L . However, as an abelian group, it does not carry any new information. As shown by J Przytycki and K Putyra [23], it is completely determined by H Q . We recover these cohomology decompositions at the bialgebraic level, and show that the cup product on rack cohomology restricts to H Q . This result is new, to our knowledge. Rather unexpectedly, our proof heavily uses the Zinbiel product^refining^, even though^does not restrict to H Q . What we show is that^induces a Zinbiel product on H Q ; for this we need to regard H Q as a quotient rather than a subspace of H R . Our results suggest the questions: (i) Does H D allow one to reconstruct H Q as a Zinbiel, or at least associative, algebra?
(ii) In the opposite direction, does H Q determine the whole rack cohomology H R as a Zinbiel, or at least associative, algebra?

Cohomology of shelves and racks
We start with recalling the classical complexes defining rack homology and cohomology. They will be given a bialgebraic interpretation in Section 3. The consequences of this interpretation will be explored in the remainder of the paper.
A shelf is a set X together with a binary operation GW X X ! X given by .x; y/ 7 ! x G y (sometimes denoted by x G y D x y ) satisfying the self-distributivity axiom for all x; y; z 2 X. In exponential notation, it reads .
for all x 2 X, and a quandle if it is both a rack and a spindle. The fundamental family of examples of quandles is given by groups X with x G y D y 1 xy.
Define C n .X/ D ZX n to be the free abelian group with basis X n , and put C n .X / D Z X n Š Hom.C n .X /; Z/: Define the differential @W C .X / ! C 1 .X / as the linearization of where O x i means that x i was omitted. Here and below we denote by x 1 x n the element .x 1 ; : : : ; x n / of X n . For cohomology, the differential will be @ W C .X / ! C C1 .X /. These maps are of square zero (by direct computation or see Remark 11 later) and define, respectively, the rack 2 homology H R .X / and cohomology H R .X / of the shelf X.
In knot theory, a quandle Q can be used to color arcs of knot diagrams; a coloring rule involving the operation G is imposed at each crossing. The three quandle axioms are precisely what is needed for the number of Q-colorings of a diagram to depend on the underlying knot only. These Q-coloring counting invariants can be enhanced by Boltzmann-type weights, computed using a 2-cocycle of Q. Similarly, n-cocycles of Q yield invariants of .n 1/-dimensional surfaces knotted in R nC1 ; see [4; 24]. Now, together with arcs, one can color diagram regions. The colors can be taken from a Q-set, and the weights are given by cocycles with coefficients, which we will describe next.
Given a shelf X , an X-set is a set S together with a map JW S X ! S satisfying (3) .
for all x 2 S and y; z 2 X. The basic examples are (i) X itself, with G as the action map J; 2 The terminology is inconsistent here. Indeed rack (co)homology was originally defined for racks, and only later was it realized that it works and is interesting, more generally, for shelves. The same goes for the quandle (co)homology of spindles, considered in Section 8.
(ii) any set with the trivial action x J y D x; (iii) the structure monoid M.X / of X (denoted simply by M if X is understood), which is a quadratic monoid M.X / D hX W yx y D xy for all x; y 2 Xi; and where the action map J is concatenation in M .
An X-set can also be seen as a set with an action of the monoid M.X /.
More generally, an X -module is an abelian group R together with a map JW R X ! R (often written exponentially) which is linear in R, and obeys relation (3) for all x 2 R and y; z 2 X. In other words, it is an M.X /-module. The basic examples are the linearization ZS of an X -set S, or any abelian group with the trivial action.
Take a shelf X and an X-module R. Take the free R-module C n .X; R/ D RX n with basis X n , and put C n .X; R/ D Hom.C n .X; R/; Z/. The differential @ on C n is the linearization of and the differential on C n is the induced one. Again, these maps are of square zero and define, respectively, the rack homology H R .X; R/ and cohomology H R .X; R/ of the shelf X with coefficients in R. If R is the linearization of an X -set S , we use the notation C R .X; S/, H R .X; S / etc. Choosing S to be the empty set, one recovers the previous definitions. Another interesting coefficient choice is the structure algebra A.X / of X (often denoted simply by A), which is the monoid algebra of M.X /: A.X/ D ZM.X / Š ZhX i=hyx y xy W x; y 2 Xi: Declaring every x 2 X group-like, one gets an associative bialgebra structure on A. This coefficient choice is universal in the following sense. Any X -module R is a right M.X /-module, hence a right A.X /-module. Then one has an obvious isomorphism of chain complexes C n .X; R/ Š R˝A .X / C n .X; M.X //; where A acts on the first factor of C n .X; M / Š A˝Z ZX n by multiplication on the left, and the differential acts on the second factor of R˝A C n .X; M /.

A dg bialgebra associated to a shelf
The algebraic objects introduced in this section are aimed to yield a simple and explicit description of a differential graded algebra structure on the complex .C .X /; @ / above, which is commutative, and in fact even Zinbiel, up to explicit homotopies.
Fix a shelf X . All the (bi)algebra structures below will be over Z, and will be (co)unital. Also, the tensor product A˝B of two graded algebras will always be endowed with the product algebra structure involving the Koszul sign where b 1 2 B and a 2 2 A are homogeneous of degree jb 1 j and ja 2 j, respectively. The Koszul sign also appears when A ˝B acts on A˝B. Similarly, by a (co)derivation on a graded (co)algebra we will always mean a super(co)derivation, and by commutativity we will mean supercommutativity.
Define B.X/ (also denoted by B) as the algebra freely generated by two copies of X with the relations B.X/ D Zhx; e y W x; y 2 X i=hyx y xy; ye x y e x y W x; y 2 Xi: The interest of this construction lies in the rich structure it carries: Theorem 1 For any shelf X , B.X / is a differential graded bialgebra and a differential graded A.X/-bimodule, where: The grading is given by declaring je x j D 1 and jxj D 0 for all x 2 X .
The differential d is the unique derivation of degree 1 determined by d.e x / D 1 x and d.x/ D 0 for all x 2 X: The comultiplication W B ! B˝B and the counit "W B ! k are defined on the generators by .e x / D e x˝x C 1˝e x ; ".e x / D 0; .x/ D x˝x; ".x/ D 1 for all x 2 X; and extended multiplicatively.
The A-actions W A˝B ! B and W B˝A ! B are defined by x b y D xby for all x; y 2 X and b 2 B: By differential graded bialgebra we mean that the differential is both a derivation with respect to multiplication, and a coderivation with respect to comultiplication.
Notice that B is neither commutative nor cocommutative in general.
As usual, from Theorem 1 one deduces dg algebra and dg A.X /-bimodule structures on the graded dual B .X / of B.X /.
Proof Since the relations are homogeneous, B is a graded algebra. In order to see that d is well defined, one must check that the relations yx y xy and ye x y e x y are compatible with d . The first relation is easier: For the second relation, one has d.ye x y e x y/ D yd.e x y / d.e x /y D y.1 x y / .1 x/y D y yx y y C xy D xy yx y : So the ideal of relations defining B is stable by d .
Since d is a derivation and d 2 vanishes on generators, we have d 2 D 0, hence a structure of differential graded algebra on B.
Next, we need to check that is well defined. The first relation is easy since all x 2 X are group-like in B: .xy yx y / D .x˝x/.y˝y/ .y˝y/.x y˝xy / D xy˝xy yx y˝y x y D xy˝.xy yx y / C .xy yx y /˝yx y : For the second relation, we check .ye x y e x y/ D .y˝y/.e x y˝x y C 1˝e x y / .e x˝x C 1˝e x /.y˝y/ D ye x y˝y x y C y˝ye x y e x y˝xy y˝e x y D .ye x y e x y/˝yx y C e x y˝.yx y xy/ C y˝.ye x y e x y/: So the ideal defining the relations is also a coideal.
Clearly, respects the grading.
Let us now check that d is a coderivation. It is enough to see this on generators: .d.e x // D .1 x/ D 1˝1 x˝x: The map " is also well defined, since ".xy yx y / D ".ye x y e x y/ D 0: An easy verification on the generators shows that it is indeed a counit.
Finally, the formula x b y D xby obviously defines commuting degree-preserving A-actions on B. By the definition of the differential d , one has d.xby/ D xd.b/y, thus d respects this bimodule structure.
Example 2 Let us compute .e x e y /. By definition, .e x e y / D .e x /.e y / in B˝B, and this is equal to .e x˝x C 1˝e x /.e y˝y C 1˝e y / D e x e y˝x y C e x˝x e y e y˝ex y C 1˝e x e y D e x e y˝x y C e x˝x e y e y˝y e x y C 1˝e x e y : Note the Koszul sign appearing in the product .1˝e x /.e y˝y / D e y˝ex y.
The structure on B.X/ survives in homology: Proposition 3 For any shelf X the homology H.X / of B.X / inherits a graded algebra structure. Moreover, the A.X /-actions on B.X / induce trivial actions on H.X /: x h y D h for all x; y 2 X and h 2 H: Dually, the cohomology H .X / of B.X / inherits a graded algebra structure and trivial A.X/-actions.
Here and below, by B.X/ we mean the graded dual of B.X /.
Proof The only nonclassical statement here is the triviality of the induced actions. Take x 2 X and b 2 B. By the definition of d , one has d.e If b is a cycle, this shows that x b D b modulo a boundary. Hence the induced left A-action on H is trivial. The cases of the right action and the actions in cohomology are analogous.
The proposition implies the following remarkable property of H : if b 2 B is a representative of some homology class in H , and if one lets an x 2 X act upon all the letters from X occurring in b (where the action is y 7 ! y x ), then one obtains another representative of the same homology class.
One can also define a version of the bialgebra B.X / with coefficients in any unital commutative ring k: B.X; k/ D khx; e y W x; y 2 Xi=hyx y xy; ye x y e x y W x; y 2 X i: In particular, all the tensor products should be taken over k. Theorem 1 and its proof extend verbatim to this setting. For suitable coefficients k, one can say even more: Proposition 4 For any shelf X and any field k, the homology H.X; k/ of B.X; k/ inherits a graded bialgebra structure. If , moreover, X is finite, then the cohomology H .X; k/ of B.X; k/ also inherits a graded bialgebra structure.
This results from the following general observation; it is surely known to specialists, however the authors were unable to find it in the literature: is a k-linear dg coassociative coalgebra, then induces a coproduct on the homology H of .C; d /.
is a k-linear dg algebra of finite dimension in each degree, then induces a coproduct on the cohomology H of .C ; d /.
Proof (i) The relation d D .d˝Id C Id˝d / implies that survives in the quotient C = Im.d /. To restrict it further to H D Ker.d /= Im.d /, we shall check that Since k is a field, the space K WD Ker.d / has a complement L in C , on which d is injective. Putting I WD Im.d /, one has .d˝Id/.L˝L/ D I˝L; .Id˝d /.L˝L/ D L˝I; .d˝Id C Id˝d /.K˝L/ D K˝I; .d˝Id C Id˝d /.L˝K/ D I˝K; .d˝Id C Id˝d /.K˝K/ D 0: Moreover, in the first two lines all the maps are bijective. Now, from and from the disjointness of L and K (and hence I ), one sees that .K/ cannot have components in L˝L, and its components from K˝L (resp. L˝K) necessarily lie in I˝L (resp. L˝I ).
(ii) Due to the finite dimension in each degree, the product on .C; d / induces a coproduct on .C ; d /, to which we apply the first statement.

Remark 6
The dg bialgebra B.X / admits a variation B 0 .X /, where one adds the inverses x 1 of the generators x 2 X , with jx 1 j D 0, d.x 1 / D 0, .x 1 / D x 1˝x 1 and ".x 1 / D 1. One obtains a dg Hopf algebra, with the antipode defined on the generators by and extended superantimultiplicatively, in the sense of s.ab/ D .
for homogeneous a and b. Indeed, one easily verifies that this map is well defined, that is, compatible with the defining relations of B 0 .X /; is of degree 0, that is, js.b/j D jbj for all homogeneous b; yields the inverse of Id in the convolution algebra, that For the square of the antipode, one computes s 2 .e x / D xe x x 1 . In a spindle it equals e x , yielding s 2 D Id. In general s need not be of finite order; for the rack X D Z with x y D x C 1, one has s 2 .e x / D e x 1 . In a rack, one simplifies The map x 7 ! x Q G x plays an important role in the study of racks; see for instance [28]. Finally, in the computation

The bialgebra encodes the cohomology
We will now show that the dg bialgebra B.X / knows everything about the homology .C ; @/ and the cohomology .C ; @ / of our shelf X, and about its variations .C M ; @/ and .C M ; @ / with coefficients in the structure monoid M.X /.
First, we need to modify B slightly: The following data define a dg coalgebra and a right dg A-module: .Z˝A B; Id Z˝d ; Id Z˝ ; Id Z˝" ; Id Z˝ /: Here the grading is the one induced from B, and the A-action on Z is the trivial one: x D for all x 2 X and 2 Z.
The dg coalgebra from the lemma will be denoted by B D B.X /. It has obvious variants B.X; k/ with coefficients in any unital commutative ring k.
Proof On the level of abelian groups, one has The grading survives in this quotient since jxj D 0, and the degree 1 differential so induces a coproduct on B compatible with the grading and the differential. For the counit, we have ".xb/ D ".x/".b/ D ".b/. Finally, the right A-action also descends to B, as .xb/ y D xby D x.by/ by D b y.
Remark 8 Observe that we lose the product in the quotient B. Indeed, for all x; y 2 X we have y 1, but e x y D e x y D ye x y e x y oe e x D e x 1. Both maps are clearly A-equivariant, and are mutually inverse.
Proof The preceding lemma yields isomorphisms of abelian groups B Š C M and B Š ZhXi D C ; and their k-versions.
To compute the differential induced on this by d , we use that d is a derivation: Using the relation e x y D ye x y , one gets We thus recover the differential (4). In the quotient B, the last computation simplifies as e x x i and we recover the differential (2).

Remark 11
This proposition provides a very simple proof that @ 2 D 0 in C .X; M.X // and its versions.
From the proof of Lemma 9 one deduces the useful fact:

Lemma 12
The map A ! B given by x 7 ! x is an injective algebra morphism.
In what follows we will often identify A with its isomorphic image in B.
The isomorphisms in Proposition 10 allow one to transport the structure from B and B to rack (co)homology: Theorem 13 Take a shelf X and a field k. Then (i) the chain complex .C .X /; @/ carries a coassociative coproduct, (ii) the cochain complex .C .X /; @ / carries an associative product, (iii) the chain complex .C .X; M.X //; @/ carries a bialgebra structure, (iv) the cochain complex .C .X; M.X //; @ / carries an associative product, enriched to a bialgebra structure when X is finite.
This induces (iv) an associative product on H .X; kM.X //, which is completed to a bialgebra structure for finite X .
The product in cohomology is called the cup product, and is denoted by^.
Example 14 Take f; g 2 C 2 .X /. To compute f^g, one needs to compute the summands in .e x e y e z e t / with two tensors of type e u in each factor. Using the computation from Example 2 .e x e y e z e t / D .e x e y /.e z e t / D .e x e y˝x y C 1˝e x e y C e x˝x e y e y˝y e x y / .e z e t˝z t C 1˝e z e t C e z˝z e t e t˝t e z t / D e x e y˝x ye z e t C e z e t˝ex e y zt e x e z˝x e y ze t C e x e t˝x e y t e z t C e y e z˝y e x y ze t e y e t˝y e x y t e z t C ; where the dots hide terms on which f and g vanish. Pushing the e u to the right and the elements of X to the left, we get e x e y˝x ye z e t C e z e t˝z xe x zt e y zt e x e z˝x ze y z e t C e x e t˝x t e y t e z t C e y e z˝y ze x yz e t e y e t˝y t e x yt e z t C ; so finally .f^g/.e x e y e z e t / is equal to f .e x e y /g.e z e t / C f .e z e t /g.e x zt e y zt / f .e x e z /g.e y z e t / C f .e x e t /g.e y t e z t / C f .e y e z /g.e x yz e t / f .e y e t /g.e x yt e z t /: This formula is to be compared with (23) of [5]. A full explanation of this agreement is given in the next section.
The last piece of structure to be extracted from Proposition 10 is the A-action: Proposition 15 For a shelf X , the complex .C .X /; @ / is a left A.X /-module, with where f 2 C n .X/ and x; x 1 ; : : : ; x n 2 X. The induced A.X /-action in cohomology is trivial.
Proof This directly follows from Propositions 3 and 10.
This property of rack cohomology was first noticed by Przytycki and Putyra [22]. In our bialgebraic interpretation it becomes particularly natural.

An explicit expression for the cup product in cohomology
To give an explicit formula for the cup product in rack cohomology, we need to compute .e x 1 e x n / for any x 1 ; : : : ; x n in the rack X, generalizing Example 2. For this we will introduce some notation. First, for any n 1 and for any i 2 f1; : : : ; ng we define two maps ı 0 i ; ı 1 i W X n ! X n 1 by ı 0 i .x 1 ; : : : ; x n / D .x 1 ; : : : ; x i 1 ; x i C1 ; : : : ; x n /; ı 1 i .x 1 ; : : : ; x n / D .x 1 G x i ; : : : ; x i 1 G x i ; x iC1 ; : : : ; x n /: The above identification of B with A˝ZhXi given by ae x 1 e x n $ a˝x 1 x n allows one to transport ı 0 i and ı 1 i to A-linear endomorphisms of B: A straightforward computation using self-distributivity yields Algebraic & Geometric Topology, Volume 23 (2023) for any i < j and any "; Á 2 f0; 1g. Identities (7) are the defining axioms for -sets [27]; see also [5; 12]. Now, the boundary (2) can be rewritten as For any finite subset S of N and for " 2 f0; 1g, we denote by ı " S the composition, in increasing order, of the maps ı " a for a 2 S.

Proposition 16
Given a rack X , the coproduct in B.X / can be computed by the formula (9) .ae x 1 e x n / D X S f1;:::;ng for all a 2 hXi and x i 2 X. Here S c D f1; : : : ; ng n S, and .S / is the signature of the unshuffle permutation of f1; : : : ; ng which puts S c on the left and S on the right.
We use the canonical form ae x 1 e x n of a monomial in B.X /.
Proof Since .a/ D a˝a, we can omit this part of our monomial. Let us then proceed by induction on n, the case n D 1 being immediate: .e Proof This is immediate by comparing (9) with [5, (32)]. The overall sign . 1/ km in [5] is the Koszul sign.

The cup product is commutative
In the preceding section we established that our cup product on rack cohomology coincides with Clauwens's product. The latter comes from the cohomology of a topological space, and is thus commutative (where, as usual, we mean supercommutative). We will now give a direct algebraic proof based on an explicit homotopy argument. This homotopy is a specialization of the graphically defined map, constructed for solutions to the Yang-Baxter equation by Lebed [17].
Let us start with a low-degree illustration: Example 18 Take f; g 2 C 1 .X /, identified with A-linear maps from B to Z (also denoted by f and g) determined by the values f .e x / WD f .x/ and g.e x / WD g.x/ for x 2 X , and vanishing in degrees other than 1. Then the cup product f^g 2 C 2 .X / is defined by f .e x /g.xe y / C f .e y /g.ye x y / D f .e x /g.e y / C f .e y /g.e x y /: Note the Koszul sign . 1/ jgjje x j D 1, and similarly in the second term. So the product is in general not commutative. On the other hand, the cocycle condition @ g D 0 means precisely g.e x / D g.e x y / for all x and y, so the cup product restricted to 1-cocycles is commutative.
Now, take f; g 2 C 1 .X; M.X //, identified with maps B ! Z vanishing in degrees other than 1. Then, for monomials a 2 A and x; y 2 X , one computes .f^g/.ae x e y / D f .ae x /g.axe y / C f .ae y /g.ae where W B˝B ! B˝B is the signed flip .a˝b/ D . 1/ d.a/d.b/ b˝a for homogeneous a and b. Then for any homogeneous b 1 ; b 2 2 B we have Also, h induces a map B ! B˝B.
The induced map will still be denoted by h.
Proof Using the fact that both and are algebra morphisms, one rewrites the definition of h as Finally, h survives in the quotient B since its X-equivariance reads h.ae x 1 e x n / D .a˝a/h.e x 1 e x n / h.e x 1 e x n /; with the usual notation.

For example, an easy computation gives
h.e x e y / D .xe y C e x /˝e x e y e x e y˝. e x y C e y /;

which in B becomes
h.e x e y / D .e y C e x /˝e x e y e x e y˝. e x y C e y /:

Proposition 20
The map h is a homotopy between and : (12) .
Of course, h remains a homotopy in B as well.
Proof We will use the shorthand notation dh WD .d˝Id B C Id B˝d /h. If x is a degree zero generator of B then .dhChd /.x/ D 0 and .x/ D x˝x D . /.x/, hence (12) holds. Now, for a degree one generator e x we have The proof can then be carried out by induction on the degree, using (11): Theorem 21 For a shelf X, the map h induces a homotopy between the cup product and its opposite version^o p WD^ on C .X / and C .X; M.X //.
Using a standard argument we obtain an elementary algebraic proof of the commutativity of the cup product on the rack cohomologies H R .X / and H R .X; M.X //. The same result holds for the more general cohomologies H R .X; k/ and H R .X; kM.X //.
Proof The cup product of two cochains f and g is given by the convolution product where the coproduct is taken in B, and is the multiplication in Z. Hence for any homogeneous x 2 B of degree jf j C jgj we have We use Sweedler's notation for .

Rack cohomology is a Zinbiel algebra
To better understand the coproduct on B.X /, we now refine it to an (almost) dg codendriform structure. That is, in positive degree it decomposes as D C ! , the two parts and ! being compatible. Moreover, we establish the relation ! D (where is as usual the signed flip), up to an explicit homotopy N h. This homotopy is inspired by the homotopy h from Section 6, and is, to our knowledge, new. We thus recover the Zinbiel product on rack cohomology, first described by Covez in [7].
Coalgebras need not be unital in this section. General definitions are given over a unital commutative ring k; in particular, all the tensor products are taken over k here.
In the case when the 0-degree part C 0 is empty, one recovers the familiar (co)dendriform and (co)Zinbiel structures. One can play with this idea further, and extend a positively graded codendriform coalgebra .C C ; C ; / be a C-codendriform coalgebra. Denote by "W C ! C C and ÃW C C ! C the obvious projection and inclusion, where C C WD L i >0 C i . Put C WD ."˝"/Ã, C WD ."˝"/ Ã and The proof is straightforward. These observations explain our choice of the name. In the literature there exist alternative approaches to such "almost codendriform" structures.
Finally, one easily checks that a C-codendriform structure refines a coassociative one: Lemma 24 In a (dg) C-codendriform coalgebra, the coproduct is necessarily coassociative. It is also compatible with the differential : writing .b/ D P i a i˝ci for a given b 2 C , with all the a i homogeneous, one has Let us now return to shelves and their associated dg bialgebras.
Proposition 25 Let X be a shelf. Define two maps W B.X / C ! B.X / C˝B .X / and where as usual we use the canonical form of monomials in B.X /, and extend this definition by linearity. These maps and the coproduct yield a C-codendriform structure on B.X/.
Proof Put 2 D .˝Id/ D .Id˝/. Then both sides of (13) act on a canonical monomial as follows: Similarly, both sides of (14) and (15) act by ae x 1 e x n 7 ! .a˝a˝ae x 1 / 2 .e x 2 e x n / and ae x 1 e x n 7 ! .a˝ae x 1˝a x 1 / 2 .e x 2 e x n /; respectively. Thus our maps satisfy relations (13)- (15). Finally, in positive degree their sum clearly yields , and in degree 0 the coproduct is coassociative.
The maps above are not compatible with the differential in general, since d.e x e y / D e y˝y xe y˝x y e x˝x C e x y˝xy; .d˝Id/ C .Id˝d / .e x e y / D e y˝x y xe y˝x y e x˝x C e x y˝xy C1˝xe y x˝xe y : As usual, the solution is to work in the quotient B.X/. Indeed, and ! descend to maps B.X/ C ! B.X/ C˝B .X / and B.X / C ! B.X /˝B.X / C , still denoted by and ! , and one has: .e x 1 e x n / D .e x 1˝1 /.e x 2 e x n /; ! .e x 1 e x n / D .1˝e x 1 /.e x 2 e x n /: Also, it turns (5) into d.e x 1 e x n / D e x 1 d.e x 2 e x n /: (19) We can now establish relation (16) .e x 1 e x 2 e x n / .e x 1 e x 2 e x n /; as desired.
As usual, using Lemma 9 one deduces from Proposition 25 a C-dendriform structure on the complex defining rack cohomology, and from Proposition 27 a C-Zinbiel product on the rack cohomology. Lemma 23 then yields dendriform and Zinbiel structures in positive degree: Theorem 28 For a shelf X, the complex L n>1 C n .X /; @ admits a dendriform structure, which is Zinbiel up to a homotopy induced by N h. The rack cohomology of X thus receives a strictly Zinbiel product.

Remark 29
The dendriform structures above are not surprising. In [16; 17], rack cohomology is interpreted in terms of quantum shuffle algebras, which are key examples of dendriform structures. The shuffle interpretation generalizes to the cohomology of solutions to the Yang-Baxter equation, where dendriform structures reappear as well. The Zinbiel structure in cohomology is on the contrary remarkable, and does not extend to the YBE setting. Shuffles also suggest that, for B.X / C , the codendriform structure and the associative product are compatible, in the sense of [25]. However, this does not seem to yield Zinbiel-coassociative structures on rack cohomologies. If we choose to work without coefficients (ie in B.X / C ), the dendriform structure is compatible with the differential but the coproduct is lost. If we take coefficients kM.X / (ie we work in B.X/ C ), where k is a field and X is finite, the coproduct is preserved but the dendriform structure does not survive in cohomology.

Quandle cohomology inside rack cohomology
If X is a spindle (eg a quandle), then the complex C .X; k/ has a degenerate subcomplex In other words, it is the linear envelope of all monomials with repeating neighbors. Carter et al [3] defined the quandle (co)homology of X via the complexes C Q .X; k/ WD C .X; k/=C D .X; k/ and C Q .X; k/ WD Hom.C Q .X; k/; k/: Litherland and Nelson [18] showed that in this case the complex C .X; k/ splits: The quandle (co)homology is then the (co)homology of the complement C N . We will now show that this decomposition is already visible at the level of the dg bialgebra B.X /. Moreover, in the bialgebraic setting it will be particularly easy to prove that the Zinbiel product on rack cohomology induces one on quandle cohomology but does not restrict to quandle cohomology, the associative cup product on rack cohomology restricts to quandle cohomology.
Proposition 30 Let X be a spindle. In B.X /, consider the ideal and the left sub-A.X/-module B N .X / generated by the elements 1 and (20) .e x 1 e x 2 /.e x 2 e x 3 / .e x n 1 e x n /e x n where n > 1 and all x i 2 X: Then B decomposes as a dg A-bimodule: To check that B N is a subcomplex of B, we need its alternative description: Lemma 31 B N .X/ is the left sub-A.X /-module generated by the elements 1 and (24) .e x 1 e y 1 /.e x 2 e y 2 / .e x n 1 e y n 1 /e x n where n > 1 and all x i ; y i 2 X: Proof It is sufficient to represent an element of the form (24) as a linear combination of elements of the form (20). This can be done inductively using the following observation: .e x e y /.e x 1 e x 2 /.e x 2 e x 3 / .e x n 1 e x n /e x n D .e x e x 1 /.e x 1 e x 2 /.e x 2 e x 3 / .e x n 1 e x n /e x n .e y e x 1 /.e x 1 e x 2 /.e x 2 e x 3 / .e x n 1 e x n /e x n : Now, for a 2 A and x 1 ; : : : ; x n 2 X, we have d.a.e x 1 e x 2 /.e x 2 e x 3 / .e x n 1 e x n /e x n / D ad.e x 1 e x 2 /.e x 2 e x 3 / .e x n 1 e x n /e x n a.e x 1 e x 2 /d..e x 2 e x 3 / .e x n 1 e x n /e x n / D a.x 2 x 1 /.e x 2 e x 3 / .e x n 1 e x n /e x n a.e x 1 e x 2 /d..e x 2 e x 3 / .e x n 1 e x n /e x n /: An inductive argument using the lemma shows that this lies in B N .
It remains to prove that , and ! send B N to B˝B N . In degree 0 everything is clear. In higher degree, from .e x e y / D e x˝x e y˝y C 1˝.e x e y / one sees that any of , and ! sends an expression of the form (24) to a linear combination of tensor products, where on the right one has a product of terms of the form z, e x e y and possibly an e u at the end. By Lemma 31, all these right parts lie in B N .
The proposition describes all the structure inherited from B by B D and B N . Indeed, B D is not a subcoalgebra, as follows from (23), B D is not a coideal in the dendriform sense, since (25) .e 2 x / D e 2 x˝x 2 C e x˝x e x ; B N is not a subalgebra of B, since e x 2 B N for any x 2 X, whereas e 2 x 2 B D , B N is not a subcoalgebra either, since one has (26) ..e x e y /e y / D e 2 y˝. x y/y C terms from B N˝B N ; and e 2 y˝. x y/y is a nonzero term from B D˝B N in general. In particular, there is no natural way to define a codendriform structure on B N . Passing to the quotient B does not solve this problem: B D is still not a codendriform coideal because of (25), and B N is not a subcoalgebra of B. Indeed, even if (26) implies ..e x e y /e y / 2 B N˝B N , things go wrong in degree 3, since ..e x e y /.e y e z /e z / D e 2 z˝. e X Y e X z e Y C e Y z / C terms from B N˝B N ; where X D x z and Y D y z . One gets a term from B D˝B N which does not vanish in general. However, since e X Y D e X D e X z and e Y z D e Y modulo the boundary, this term disappears in homology. More generally: Proposition 32 Let X be a spindle. The homology H .X / of B.X / decomposes as a graded abelian group: (27) H .X / D H N .X /˚H D .X /: If k is a field , then one obtains a decomposition (28) H .X; k/ D H N .X; k/˚H D .X; k/; with H D a coassociative coideal and H N a co-Zinbiel (and hence coassociative) coalgebra.
Dually, the cohomology H .X / of B.X / decomposes as The proof for the cohomology H is analogous.
Again, this proposition describes all the structure inherited by H D .X; k/: it is neither a subcoalgebra, nor a codendriform coideal. Indeed, computations (23) and (25) still yield counterexamples, since e 2 x and e x represent nontrivial classes in H D and H N , respectively. Now, in order to understand what our proposition means for quandle cohomology, we need to recall Lemma 9 and observe that the construction of B D precisely repeats that of the degenerate complex. This yields: Lemma 33 For any spindle X, one has isomorphisms of complexes .C Q ; @/ Š B N and .C Q ; @ / Š B N : Proposition 32 then translates as follows: Theorem 34 The rack cohomology of a spindle X decomposes into quandle and degenerate parts, so one has the isomorphism H R .X / ' H Q .X /˚H D .X / of graded abelian groups. Moreover, H Q is an associative subalgebra of H R and H D is an associative ideal , H D is a Zinbiel ideal , hence H Q carries an induced Zinbiel product.
The situation is rather subtle here. The Zinbiel product on rack cohomology does not restrict to the quandle cohomology; to get a Zinbiel product on H Q , we need to consider it as a quotient of H R . However, the associative product induced by the Zinbiel product does restrict to H Q .

Quandle cohomology vs rack cohomology
The rack cohomology of spindles and quandles shares a lot with the Hochschild cohomology of monoids and groups. This analogy suggests that the degenerate subcomplex C D can be ignored, and that the rack cohomology H R and the quandle cohomology H Q carry the same information about a spindle. Litherland and Nelson [18] showed this is not as straightforward as that: the degenerate part is highly nontrivial, and in particular contains the entire quandle part: L for > 2: Here C L .X/ WD ZX˝C D 1 .X / is the late degenerate subcomplex, which is the linear envelope of all monomials with repetition at some place other than the beginning. This refines the rack cohomology splitting from Theorem 34: Q˚H L for > 2: We will now recover this decomposition in our bialgebraic setting. However, our methods are not sufficient for coupling this decomposition with the algebraic structure on H R : Question 35 Do the cup product and the Zinbiel product on the rack cohomology of a spindle respect the decomposition (30) in any sense? In particular, can the quandle cohomology regarded as a Zinbiel algebra be reconstructed from the degenerate cohomology?
Now, even though H D is big, it is degenerate in a certain sense. Indeed, Przytycki and Putyra [23] showed the quandle cohomology H Q of a spindle to completely determine its rack cohomology H R , and hence H D , on the level of abelian groups. In light of the preceding section, the following question becomes particularly interesting: Question 36 Can Zinbiel and associative structures on the rack cohomology of a spindle be recovered from the corresponding structures on its quandle cohomology?
Let us now return to our dg bialgebra B.X /: Proposition 37 Let X be a spindle. Put B L .X / WD B C .X /˝A .X / B D .X /; where B C is the positive-degree part of B. One has the following isomorphism of graded A.X/-bimodules: (31) B D .X / ' B L .X /˚B Q 1 .X / for > 2: This results immediately from the following technical lemma: Lemma 38 Let X be a spindle. Define a map s W B C .X / ! B D .X / as follows: take any element from B C written using the generators of the form x and e y , and in each of its monomials replace the first letter of the form e y by e y e y . Then The map s yields the first degeneracy s 1 for the cubical structure underlying quandle cohomology, hence the notation.
Proof To show that s is well defined, one needs to check that it is compatible with the relation e x y D ye x y in B, that is, we should have e x e x y D ye x y e x y . This is indeed true: e x e x y D e x ye x y D ye x y e x y : As usual, decomposition (31) implies (32) B D .X / ' B L .X /˚B Q 1 .X / for > 2;

This map is
with obvious notation. And as usual this decomposition respects more structure than (31): Proposition 39 Let X be a spindle. Then (32) is an isomorphism of differential graded A.X /-bimodules.
Proof Let us check that the differential preserves B L . An element of B L is a linear combination of (the -equivalence classes of) terms of the form e