1 Introduction

One of several models for \((\infty ,1)\)-categories, a central topic of study in recent years (see, e.g., [4]) is the category of simplicial categories; that is, (small) categories Y enriched in simplicial sets. If the object set of Y is \(\mathcal {O}\), we say it is an \(({\mathcal {S}}\!,\!\mathcal {O})\)-category.

One may analyze a topological space (or simplicial set) X by means of its Postnikov tower\((P^{n} X)_{n=0}^{\infty }\), where the n-th Postnikov section\(P^{n}X\) is an n-type (that is, has trivial homotopy groups in dimension greater than n). The successive sections are related through their k-invariants: cohomology classes in \(H^{n+1}(P^{n-1}X; \pi _{n}X)\).

Since the Postnikov system is functorial (and preserves products), one can also define it for a simplicial category Y: \(P^{n}Y\) is then a category enriched in n-types, and its k-invariants are expressed in terms of the \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology of [11].

A long-standing open problem is to find a purely “algebraic” description of Postnikov systems, both for spaces and for simplicial categories. For the Postnikov sections, there are various algebraic models of n-types—and thus of categories enriched in n-types—in the literature, using a variety of higher categorical structures. However, the problem of finding an algebraic model for the k-invariants is largely open. For this purpose, we need first an algebraic formulation of the cohomology theories used to define the k-invariants. This leads us to look for an algebraic description of the cohomology of a category enriched in a suitable algebraic model of n-types.

We here realize the first step of this program, for track categories—that is, categories enriched in groupoids. In the future we hope to extend this to the cohomology of n-track categories—that is, those enriched in the n-fold groupoidal models of n-types developed by the authors in [6] and [17].

In [5] the authors introduced a cohomology theory for track categories (which generalizes the Baues–Wirsching cohomology of categories—see [3]), and showed that it coincides, up to indexing with the corresponding \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology. This was then used to describe the first k-invariant for a 2-track category.

A direct generalization of this approach is problematic, because of the difficulty of defining a full and faithful simplicial nerve of weak higher categorical structures. Instead, we use a version of André–Quillen cohomology, also known as comonad cohomology, since we use a comonad to produce a simplicial resolution of our track category (see [1]). We envisage a generalization to higher dimensions, using the n-fold nature of the models of n-types in [6] and [17].

Our main result (see Corollaries 5.6 and 5.8) is that under mild hypotheses on a track category X (always satisfied up to 2-equivalence), the comonad cohomology of X (Definition 5.4) coincides, up to a dimension shift, with its \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology. This follows from Theorem 5.5, which states that any track category X has a long exact sequence relating the comonad cohomology of X, its \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology and the \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology of the category \(X_{0}\) of objects and 1-arrows of X. When the track category X is a 2-groupoid, its \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology coincides with the cohomology of its classifying space.

1.1 Notation and conventions

Denote by \(\varDelta \) the category of finite ordered sets, so for any \(\mathcal {C}\), \([\varDelta ^{{\text {op}}},\mathcal {C}]\) is the category of simplicial objects in \(\mathcal {C}\), while \([\varDelta ,\mathcal {C}]\) is the category of cosimplicial objects in \(\mathcal {C}\). In particular, we write \(\mathcal {S}\) for the category \([\varDelta ^{{\text {op}}},\mathsf {Set}]\) of simplicial sets. We write \(c({A})\in [\varDelta ^{{\text {op}}},\mathcal {C}]\) for the constant simplicial object on \(A\in \mathcal {C}\).

For any category \(\mathcal {C}\) with finite limits, we write \(\mathsf {Gpd}\,\mathcal {C}\) for the category of groupoids internal to \(\mathcal {C}\)—that is, diagrams in \(\mathcal {C}\) of the form

satisfying the obvious identities making the composition m associative and every ‘1-cell’ in \(X_{1}\) invertible.

For a fixed set \(\mathcal {O}\), we denote by \({\mathsf {Cat}_{\mathcal {O}}}\) the category of small categories with object set \(\mathcal {O}\) (and functors which are the identity on \(\mathcal {O}\)). In particular, a category \(\mathcal {Z}\) enriched in simplicial sets with object set \(\mathcal {O}\) will be called an \(({\mathcal {S}}\!,\!\mathcal {O})\)-category, and the category of all such will be denoted by \({({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\). Equivalently, such a category \(\mathcal {Z}\) can be thought of as a simplicial object in \({\mathsf {Cat}_{\mathcal {O}}}\). This means \(\mathcal {C}\) has a fixed object set \(\mathcal {O}\) in each dimension, and all face and degeneracy functors the identity on objects.

More generally, if \((\mathcal {V},\otimes )\) is any monoidal category, a \(({\mathcal {V}}\!,\!\mathcal {O})\)-category is a small category \(\mathcal {C}\in {\mathsf {Cat}_{\mathcal {O}}}\) enriched over \(\mathcal {V}\). The category of all such categories will be denoted by \({({\mathcal {V}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\). Examples for \((\mathcal {V},\otimes )\) include \(\mathcal {S}\), \(\mathsf {Top}\), \(\mathsf {Gp}\), and \(\mathsf {Gpd}\), with \(\otimes \) the Cartesian product. When \(\mathcal {V}=\mathsf {Gpd}\), we call \(\mathcal {Z}\) in \({\mathsf {Track}_{\mathcal {O}}}:={(\mathsf {Gpd},\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) a track category with object set \(\mathcal {O}\) (see Sect. 4.1 below).

Another example is pointed simplicial sets \(\mathcal {V}=\mathcal {S}_{*}\), with \(\otimes =\wedge \) (smash product). We can identify an \(({\mathcal {S}_{*}}\!,\!\mathcal {O})\)-category with a simplicial pointed \(\mathcal {O}\)-category.

1.2 Organization

Section 2 provides some background material on the Bourne adjunction (Sect. 2.1), internal arrows (Sect. 2.2), modules (Sect. 2.3), \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology (Sect. 2.4) and simplicial model categories (Sect. 2.5). Section 3 sets up a short exact sequence associated to certain internal groupoids (Proposition 3.5), and Sect. 4 introduces the comonad used to define our cohomology, and shows its relation to \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology (Theorem 4.9 and Corollary 4.10). Section 5 defines the comonad cohomology of track categories, and establishes the long exact sequence relating the \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomologies of X and of \(X_{0}\) and the comonad cohomology of X (Theorem 5.5). Section 6 specializes to the case of a 2-groupoid, showing that in this case \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology coincides with that of the classifying space (Corollary 6.4). The long exact sequence of Corollary 6.5 recovers [16, Theorem 13].

2 Preliminaries

In this section we review some background material on the Bourne adjunction, the internal arrow functor, modules, \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology, and simplicial model categories.

2.1 The Bourne adjunction

Let \(\mathcal {C}\) be a category with finite limits and let \(\mathsf {Spl\,}\mathcal {C}\) be the category whose objects are the split epimorphisms with a given splitting:

(1)

Define \(R:\mathsf {Gpd}\,\mathcal {C}\rightarrow \mathsf {Spl\,}\mathcal {C}\) by

Let \(H:\mathsf {Spl\,}\mathcal {C}\rightarrow \mathsf {Gpd}\,\mathcal {C}\) associate to the object

of \(\mathsf {Gpd}\,\mathcal {C}\), where \(A\overset{q}{\times }A\) is the kernel pair of q, \(\varDelta =({\text {Id}}_A,{\text {Id}}_A)\) is the diagonal map, and

$$\begin{aligned} m=({\text {pr}}_{0},{\text {pr}}_{2}):A\overset{q}{\times }A\overset{q}{\times }A\cong (A\overset{q}{\times }A){\times }_{A}(A\overset{q}{\times }A)\rightarrow A\overset{q}{\times }A \end{aligned}$$

with \({\text {pr}}_{i} m={\text {pr}}_{i}\pi _{i}\) (\(i=0,1\)), where \(\pi _{i}\), \({\text {pr}}_{i}\) are the two projections. Note that \(HY\) is an internal equivalence relation in \(\mathcal {C}\) with \(\varPi _{0}(HY)=B\). Consider the following diagram

(2)

where \({\text {Aug}}[\varDelta ^{{}^{{\text {op}}}},\mathcal {C}]\) is the category of augmented simplicial objects in \(\mathcal {C}\), \(+\) is the functor that forgets the augmentation, the décalage functor \({\text {Dec}}\) ( obtained by forgetting the last face operator) is its right adjoint, and nX is the nerve of the internal equivalence relation associated to X, augmented over itself, with \({\text {Ner}}H = +n\).

Diagram (2) commutes up to isomorphism—that is, there is a natural isomorphism \(\alpha :{\text {Dec}}{\text {Ner}}\cong nR\). Since \(+ \dashv {\text {Dec}}\), this implies that \(H \dashv R\) (see [7, Theorem 1]).

Given \(X\in \mathsf {Spl\,}\mathcal {C}\) as in (1), we have The unit \(\eta :X\rightarrow R H X\) of the adjunction \(H \dashv R\) is given by

(3)

where \(t_{1}\) is determined by

so that

$$\begin{aligned} pr_{0} t_{1} = tq,\quad {\text {pr}}_{1} t_{1} = {\text {Id}},\quad \text {and}\quad t_{1} t=(t,t)=\varDelta t. \end{aligned}$$
(4)

This show that \(\eta =(t,t_{1})\) is a morphism in \(\mathsf {Spl\,}\mathcal {C}\).

Finally, if \(\mu \) is the counit of the adjunction \(H \dashv R\), and \(\mu '\) that of \(+ \dashv {\text {Dec}}\), then for any \(X\in \mathsf {Gpd}\,\mathcal {C}\) the following diagram commutes:

Thus \(\mu =P {\text {Ner}}\mu \) where \(P \dashv {\text {Ner}}\).

2.2 The internal arrow functor

Let \(U:\mathsf {Gpd}\,\mathcal {C}\rightarrow \mathcal {C}\) be the arrow functor, so \(UY=Y_{1}\) for \(Y\in \mathsf {Gpd}\,\mathcal {C}\), and assume \(\mathcal {C}\) is (co)complete with commuting finite coproducts and pullbacks. For any \(X\in \mathcal {C}\) let \(X_s,X_t\) be two copies of X, with \(F:X_s\textstyle {\,\coprod \,}X_t \rightarrow X\) the fold map and \(LX\in \mathsf {Gpd}\,\mathcal {C}\) the corresponding internal equivalence relation, so \((LX)_{0}=X_s\textstyle {\,\coprod \,}X_t\) and \((LX)_{1}=(X_s\textstyle {\,\coprod \,}X_t)\overset{F}{\times }(X_s\textstyle {\,\coprod \,}X_t)\). Then is an object of \(\mathsf {Spl\,}\mathcal {C}\) and

(5)

(cf. Sect. 2.1), where \(i_{1}\) is the coproduct structure map. Therefore,

$$\begin{aligned} \begin{aligned}&(X_s\textstyle {\,\coprod \,}X_t)\overset{F}{\times } (X_s\textstyle {\,\coprod \,}X_t)\\&\quad =(X_s{\times }_{X}X_s)\textstyle {\,\coprod \,}(X_s{\times }_{X}X_t)\textstyle {\,\coprod \,}(X_t{\times }_{X}X_s)\textstyle {\,\coprod \,}(X_t{\times }_{X}X_t) \!= \!X_{ss}\textstyle {\,\coprod \,}X_{st}\!\textstyle {\,\coprod \,}\!X_{ts}\textstyle {\,\coprod \,}X_{tt} \end{aligned} \end{aligned}$$
(6)

where \(X_{ss}=X_{s}{\times }_{X}X_s\), \(X_{st}=X_{s}{\times }_{X}X_t\), \(X_{ts}=X_{t}{\times }_{X}X_s\), and \(X_{tt}=X_{t}{\times }_{X}X_t\). Under the identification (6) the face and degeneracy maps of \(LX\) are as follows:

\(s_{0}\) includes \(X_s\textstyle {\,\coprod \,}X_t\) into \(X_{ss}\textstyle {\,\coprod \,}X_{tt}\); \(d_{0}\) sends \(X_{ss}\) and \(X_{st}\) to \(X_s\), and \(X_{ts}\) and \(X_{tt}\) to \(X_t\); and \(d_{1}\) sends \(X_{ss}\) and \(X_{ts}\) to \(X_s\), and \(X_{st}\) and \(X_{tt}\) to \(X_t\).

To see that L is left adjoint to U, given \(f:X\rightarrow Y_{1}=UY\), its adjoint \(\tilde{f}:LX\rightarrow Y\) is given by \(\tilde{f}_{1}:X_{ss}\textstyle {\,\coprod \,}X_{st}\textstyle {\,\coprod \,}X_{ts}\textstyle {\,\coprod \,}X_{tt}\rightarrow Y_{1}\) (determined by \(s'_{0} d'_{0} f: X_{ss} \rightarrow Y_{1}\), \(f: X_{st} \rightarrow Y_{1}\), \(f\,\circ \tau : X_{ts} \rightarrow Y_{1}\), and \(s_{0} d_{0} f : X_{tt} \rightarrow Y_{1}\)), and \(\tilde{f}_{0}:X_s\textstyle {\,\coprod \,}X_t\rightarrow Y_{0}\) (determined by \(d'_{0} f:X_s \rightarrow Y_{0}\) and \(d'_{1} f:X_t\rightarrow Y_{0}\)). Here \(\tau : X_{ts}\rightarrow X_{st}\) is the switch map, with \(\tau \circ \tau = {\text {Id}}\).

Conversely, given \(g:LX \rightarrow Y\) with \(g_{1}:X_{ss}\textstyle {\,\coprod \,}X_{st}\textstyle {\,\coprod \,}X_{ts}\textstyle {\,\coprod \,}X_{tt}\rightarrow Y_{1}\) and \(g_{0}:X_s\textstyle {\,\coprod \,}X_t\rightarrow Y_{0}\), its adjoint \(\hat{g}:X\rightarrow Y_{1}\), has \(\hat{g}_{0}\) determined by \(d_{0} f:X_s \rightarrow Y_{0}\) and \(d_{1} f:X_t \rightarrow Y_{0}\), while \(\hat{g}_{1}\) is determined by \(s_{0} d_{0} f: X_{ss}\rightarrow Y_{1} \) and \(s_{0} d_{1} f: X_{tt}\rightarrow Y_{1}\) (where \(f:X_{st}\rightarrow Y_{1}\) is the composite \(X_{st} \xrightarrow {i} X_{ss}\textstyle {\,\coprod \,}X_{st}\textstyle {\,\coprod \,}X_{ts}\textstyle {\,\coprod \,}X_{tt} \xrightarrow {g_{1}}Y_{1}\)).

2.3 Modules

Recall that an abelian group object in a category \(\mathcal {D}\) with finite products is an object G equipped with a unit map \(\sigma :*\rightarrow G\) (where \(*\) is the terminal object), and inverse map\(i:G\rightarrow G\), and a multiplication map\(\mu :G\times G\rightarrow G\) which is associative, commutative and unital. We require further that

$$\begin{aligned} \mu \circ ({\text {Id}},i)\circ \varDelta ~=~\sigma \circ c_{*}, \end{aligned}$$
(7)

where \(\varDelta :G\rightarrow G\times G\) is the diagonal, and \(c_{*}\) the map to \(*\).

Definition 2.1

Given an object \(X_{0}\) in a category \(\mathcal {C}\), we denote by \((\mathsf {Gpd}\,\mathcal {C},X_{0})\) the subcategory of \(\mathsf {Gpd}\,\mathcal {C}\) consisting of those Y with \(Y_{0}=X_{0}\) (and groupoid maps which are the identity on \(X_{0}\)). For \(X\in (\mathsf {Gpd}\,\mathcal {C},X_{0})\), an X-module is an abelian group object M in the slice category \((\mathsf {Gpd}\,\mathcal {C}, X_{0})/X\). Since the terminal object of \(\mathcal {D}=(\mathsf {Gpd}\,\mathcal {C},X_{0})/X\) is \({\text {Id}}_X:X\rightarrow X\), and the product of \(\rho :M\rightarrow X\) with itself in \(\mathcal {D}\) is \(\rho p_{1}=\rho p_2:M\overset{\rho }{\times }M\rightarrow X\), a unit map for \(\rho :M\rightarrow X\) is given by a section \(\sigma :X\rightarrow M\) (with \(\rho \sigma ={\text {Id}}\)), and the multiplication and inverse have the forms

respectively. Note that (7) applied to \(\rho :M\rightarrow X\) implies that

$$\begin{aligned} \mu ({\text {Id}},i)\circ \varDelta _M~=~\sigma \rho , \end{aligned}$$
(8)

for diagonal \(\varDelta _M:M\rightarrow M\overset{\rho }{\times }M\) and \(\sigma :X\rightarrow M\) the zero map of \(\rho :M\rightarrow X\).

Remark 2.2

Suppose that \(X=HY\), for \(H:\mathsf {Spl\,}\mathcal {C}\rightarrow \mathsf {Gpd}\,\mathcal {C}\) as in Sect. 2.1 and

(9)

Thus \(X_{1}=X_{0}\overset{q}{\times }X_{0}\), and an X-module \(M\rightarrow X\) is given by

with \(\rho _{1}=(d_{0},d_{1})\). Note that the fiber \(M(a,b)\) of \(\rho _{1}\) over each \((a,b)\in X_{0}\overset{q}{\times }X_{0}\) is an abelian group, with zero \(\sigma _{1}(a,b)\), and the zero map \(\phi :X\rightarrow M\) is given by

with \(\rho _{1}\phi _{1}={\text {Id}}\). Thus for Y as in (9), the adjoint \(\hat{\phi }\in {\text {Hom}}_{{\mathsf {Spl\,}(\mathcal {C})/RH Y}}\left( Y, R(M)\right) \) is the composite

where \(\eta =(t_{1},t)\) is the unit of the adjunction \(H \dashv R\), as in (3).

Definition 2.3

The idempotent map in \(\mathsf {Spl\,}\mathcal {C}\)

induces an idempotent \(e = H(tq): X=H(Y)\rightarrow X\) in \(\mathsf {Gpd}\,\mathcal {C}\) (for Y as in (9)).

Note that \(e_{0}=tq\) and \(e_{1}=(e_{0},e_{0})\). We therefore obtain an idempotent operation \(\underline{e}\) on \({\text {Hom}}_{\mathsf {Gpd}\,\mathcal {C}/X}(X,M)\), taking \(f:X\rightarrow M\) to \(fe:X\rightarrow M\). We write \(fe=\underline{e}(f)\). This sends \((a,b)\in X_{0}{\times }_{q}X_{0}\) to \(f(tqa,tqb)\). Let \(e^{*} M\) be the pullback

(10)

in \(\mathsf {Gpd}\,\mathcal {C}\). If we denote the fiber of \(\rho '\) at \((a,b)\in X_{1}\) by \((e^{*}M)_{1}(a,b)\), we have \((e^{*}M)_{1}(a,b)=(a,b){\times }_{(ta,tb)}M_{1}(ta,tb)\), which is isomorphic under \(r_{1}(a,b)\) to \(M_{1}(ta,tb)\). The unit map \(\sigma '\) of \(e^{*}M\) is given

(11)

where is the unit of \(\rho :M\rightarrow X\), so in particular

$$\begin{aligned} \sigma _{1}\varDelta _{X_{0}} = s_{0}:X_{0}\rightarrow M_{1}. \end{aligned}$$
(12)

Thus for each \((a,b)\in X_{1}\) we have \(\sigma '(a,b)=((a,b),(\sigma e)(a,b))=((a,b),\sigma (tqa,tqb))\).

The multiplication \((e^{*} M)_{1}{\times }_{X_{1}}(e^{*} M)_{1} \xrightarrow {\mu '_{1}}(e^{*} M)_{1}\) on \(((a,b),m),((a,b),m')\) by

$$\begin{aligned} \mu '_{1}(((a,b),m),((a,b),m'))=((a,b),\mu _{1}(m,m')), \end{aligned}$$
(13)

so identifying \((e^{*} M)_{1}{\times }_{X_{1}}(e^{*} M)_{1}\) with \(X_{1}{\times }_{X_{1}}(M_{1}{\times }_{X_{1}}M_{1})\), we have \(\mu '_{1}=({\text {Id}},\mu _{1})\).

Finally, the zero map of \(e^{*} M\) is given on \(((a,b),m)\in (e^{*} M)_{1}\) by

$$\begin{aligned} \sigma '_{1}\rho '_{1}((a,b),m)=\sigma '_{1}(a,b)=\{(a,b),\sigma (tqa,tqb)\}=\{(a,b), \sigma \rho _{1}(m)\} \end{aligned}$$

since \(\rho _{1}(m)=(tqa,tqb)\). Thus \(O_{(e^{*} M)_{1}}=\sigma '_{1}\rho '_{1}=({\text {Id}},\sigma \rho )=({\text {Id}},O_{M_{1}})\).

2.4 \({({\mathcal {S}}\!,\!\mathcal {O})}\)-Categories

In [9, §1], Dwyer and Kan define a simplicial model category structure on \({({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\), also valid for \({({\mathcal {S}_{*}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) (see Sect. 1.1 and [15, Prop. 1.1.8]), in which a map \(f:\mathcal {X}\rightarrow \mathcal {Y}\) is a fibration (respectively, a weak equivalence) if for each \(a,b\in \mathcal {O}\), the induced map \(f_{(a,b)}:\mathcal {X}(a,b)\rightarrow \mathcal {Y}(a,b)\) is such.

The cofibrations in \({{({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}}\) or \({{({\mathcal {S}_{*}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}}\) are not easy to describe. However, for any \(\mathcal {K}\in {\mathsf {Cat}_{\mathcal {O}}}\), the constant simplicial category \(c({\mathcal {K}})\in [\varDelta ^{{}^{{\text {op}}}},{\mathsf {Cat}_{\mathcal {O}}}]\cong {({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) has a cofibrant replacement defined as follows:

Recall that a category \(Y\in {\mathsf {Cat}_{\mathcal {O}}}\) is free if there exists a set S of non-identity maps in Y (called generators) such that every non-identity map in Y can uniquely be written as a finite composite of maps in S. There is a forgetful functor \(U:{\mathsf {Cat}_{\mathcal {O}}}\rightarrow {\mathsf {Graph}_{\mathcal {O}}}\) to the category of directed graphs, with left adjoint the free category functor \(F:{\mathsf {Graph}_{\mathcal {O}}}\rightarrow {\mathsf {Cat}_{\mathcal {O}}}\) (see [13] and compare [9, §2.1]). Both U and F are the identity on objects.

Similarly, an \(({\mathcal {S}}\!,\!\mathcal {O})\)-category \(X\in [\varDelta ^{{}^{{\text {op}}}},{\mathsf {Cat}_{\mathcal {O}}}]=({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\) is free if for each \(k\in \varDelta \), \(X_k\in {\mathsf {Cat}_{\mathcal {O}}}\) is free, and the degeneracy maps in X send generators to generators. Every free \(({\mathcal {S}}\!,\!\mathcal {O})\)-category is cofibrant (cf. [9, § 2.4]). Moreover, for any \(\mathcal {K}\in {\mathsf {Cat}_{\mathcal {O}}}\), a canonical cofibrant replacement \(\mathcal {F}_{\bullet }\mathcal {K}\) for \(c({\mathcal {K}})\) in \(({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,=[\varDelta ^{{}^{{\text {op}}}},{\mathsf {Cat}_{\mathcal {O}}}]\) (Sect. 1.1) is obtained by iterating the comonad \(FU:{\mathsf {Cat}_{\mathcal {O}}}\rightarrow {\mathsf {Cat}_{\mathcal {O}}}\) (so \(\mathcal {F}_{n}\mathcal {K}:=(FU)^{n+1}\mathcal {K}\)). The augmentation \(\mathcal {F}_{\bullet }\mathcal {K}\rightarrow \mathcal {K}\) induces a weak equivalence \(\mathcal {F}_{\bullet }\mathcal {K}\simeq c({\mathcal {K}})\) in \([\varDelta ^{{}^{{\text {op}}}},{\mathsf {Cat}_{\mathcal {O}}}]\cong {({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\). If \(\mathcal {K}\) is pointed, \(\mathcal {F}_{\bullet }\mathcal {K}\) is a \(({\mathcal {S}_{*}}\!,\!\mathcal {O})\)-category.

More generally, if X is any \(({\mathcal {S}}\!,\!\mathcal {O})\)-category, thought of as a simplicial object in \({\mathsf {Cat}_{\mathcal {O}}}\), its standard Dwyer–Kan resolution is the cofibrant replacement given by the diagonal \({\text {Diag}}\overline{\mathcal {F}}_{\bullet }X\) of the bisimplicial object \(\overline{\mathcal {F}}_{\bullet }X\in [\varDelta ^{{2}^{{\text {op}}}},{\mathsf {Cat}_{\mathcal {O}}}]\) obtained by iterating \(FU\) in each simplicial dimension.

Definition 2.4

The fundamental track category of an \(({\mathcal {S}}\!,\!\mathcal {O})\)-category Z is obtained by applying the fundamental groupoid functor \(\hat{\pi }_{1}:\mathcal {S}\rightarrow \mathsf {Gpd}\) to each mapping space \(\mathcal {Z}(a,b)\) (see [12, §I.8]. When Z is fibrant, \(\varLambda :=\hat{\pi }_{1}Z\) has a particularly simple description: for each \(a,b\in \mathcal {O}\), the set of objects of \(\varLambda (a,b)\) is \(Z(a,b)_{0}\), and for \(x,x'\in Z(a,b)_{0}\), the morphism set \((\varLambda (a.b))(x,x')\) is \(\{\tau \in Z(a,b)_{1}~:\ d_{0}\tau =x,d_{1}\tau =x'\}/\!\!\sim \), where \(\sim \) is determined by the 2-simplices of X. Since \(\hat{\pi }_{1}\) commutes with cartesian products for Kan complexes, it extends to \({({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) (after fibrant replacement).

A module over a track category \(\varLambda \in {(\mathsf {Gpd},\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) is an abelian group object M in \({(\mathsf {Gpd},\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}/\varLambda \) (see Sect. 2.3). For example, given a (fibrant) \(({\mathcal {S}}\!,\!\mathcal {O})\)-category Z, for each \(n\ge 2\) we obtain a \(\hat{\pi }_{1}Z\)-module by applying \(\pi _{n}(-)\) to each mapping space of Z.

For each track category \(\varLambda \in {(\mathsf {Gpd},\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\), \(\varLambda \)-module M and \(n\ge 1\), we have a twisted Eilenberg–Mac Lane \(({\mathcal {S}}\!,\!\mathcal {O})\)-category \(E=E^{\varLambda }({M},{n})\) over \(\varLambda \), with \(\pi _{n}E\cong M\) and \(\pi _{i}E\cong 0\) for \(2\le i\ne n\) (see [10, §1] and [11, §1.3(iv)]).

Given \(\varLambda \in {(\mathsf {Gpd},\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\), a \(\varLambda \)-module M, and an object \(Z\in {({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) equipped with a twisting map\(p:\hat{\pi }_{1}Z\rightarrow \varLambda \), the n-th \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology group of Zwith coefficients in M is

$$\begin{aligned} H^{n}_{{\text {SO}}}({Z/\varLambda };{M}):= & {} [Z,E^{\varLambda }({M},{n})]_{{{({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}}/B\varLambda }\\= & {} \pi _{0}{\text {map}}_{{{({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}}/B\varLambda }(Z,E^{\varLambda }({M},{n})), \end{aligned}$$

where \({\text {map}}_{{{({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}}/A}(Z,Y)\) is the sub-simplicial set of \({\text {map}}_{{{({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}}}(Z,Y)\) consisting of maps over a fixed base A (cf. [11, §2]) Typically, \(\varLambda =\hat{\pi }_{1}Z\), with p a weak equivalence; if in addition \(Z\simeq B\varLambda \), we denote \(H^{n}_{{\text {SO}}}({Z/\varLambda };{M})\) simply by \(H^{n}_{{\text {SO}}}({\varLambda };{M})\).

2.5 Simplicial model categories

Recall that a simplicial model category \(\mathcal {M}\) is a model category equipped with functors \(X\mapsto X\otimes K\) and \(X\mapsto X^K\), natural in \(K\in \mathcal {S}\), satisfying appropriate axioms (cf. [14, Definition 9.1.6]).

For example, \(\mathcal {S}\) itself is a simplicial model category, with \(X\otimes K:=X\times K\) and \(X^K:={\text {map}}(K,X)\), where \({\text {map}}(K,X)\in \mathcal {S}\) has \({\text {map}}(K,X)_{n}:={\text {Hom}}_{\mathcal {S}}(K\times \varDelta [n],X)\). Similarly, \(({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\) is also a simplicial model category (see [9, Proposition 7.2]).

Definition 2.5

Let \(\mathcal {M}\) be a simplicial model category. The realization\(|X|\) of \(X\in [\varDelta ^{{}^{{\text {op}}}},\mathcal {M}]\) is defined to be the coequalizer of the maps

where on the summand indexed by \(\sigma :[n]\rightarrow [k]\), \(\phi \) is the composite of \(\sigma ^{*}\otimes 1_{\varDelta [k]}:X_{k}\otimes \varDelta [n]\rightarrow X_{n}\otimes \varDelta [n]\) with the inclusion into the coproduct, and \(\psi \) is the composite of \(1_{X_{k}}\otimes \sigma _{*}:X_{k}\otimes \varDelta [n]\rightarrow X_{k}\otimes \varDelta [k]\) with the same inclusion (see [12, §VII.3]).

Similarly, if \(X\in [\varDelta ,\mathcal {M}]\) is a cosimplicial object in \(\mathcal {M}\), its total object\({\text {Tot}}X\) is the equalizer of

with \(\phi \) and \(\psi \) defined dually (cf. [14, Def. 18.6.3]).

The following is a straightforward generalization of [8, XII 4.3]:

Lemma 2.6

If \(\mathcal {M}=[\varDelta ^{{}^{{\text {op}}}},\mathcal {D}]\) is a simplicial model category and \(X\in [\varDelta ^{{}^{{\text {op}}}},\mathcal {M}]\cong [\varDelta ^{{2}^{{\text {op}}}},\mathcal {D}]\), then \({\text {Diag}}X\cong |X|\) and \({\text {map}}_{\mathcal {M}}({\text {Diag}}X,K)\cong {\text {Tot}}\, {\text {map}}_{\mathcal {M}}(X,K)\).

3 Short exact sequences

We now associate to any internal groupoid of the form \(X=HY\) (cf. Sect. 2.1) and X-module M a certain short exact sequence of abelian groups (see Proposition 3.5). When \(\mathcal {C}={\mathsf {Cat}_{\mathcal {O}}}\), this can be rewritten in a more convenient form (see Proposition 5.3); however, in this section we present it in a more general context, which may be useful in future work. A similar short exact sequence appears in [19, Theorem 3.5] for \(\mathcal {C}\) an algebraic category (with a different description of the third term). When \(\mathcal {C}=\mathsf {Gp}\), it reduces to [16, Lemma 6], though the method of proof there is different.

Definition 3.1

Let the discrete internal groupoid on \(X_{0}\). We define \(j:{\text {d}} X_{0} \rightarrow X\) to be the map

in \((\mathsf {Gpd}\,\mathcal {C}, X_0)\). Consider the pullback

(14)

in \(\mathsf {Gpd}\,\mathcal {C}/X\), where \(d_{0}=d_{1}=\lambda _{1}:(j^{*} M)_{1} \rightarrow X_{0}\), since \({\text {d}} X_{0}\) is discrete. Because (14) induces

(15)

(a pullback in \(\mathcal {C}\)), we shall denote \((j^{*} M)_{1}\) by \(j_{1}^{*} M_{1}\).

We shall use the following abbreviations for the relevant \({\text {Hom}}\) groups:

$$\begin{aligned} {\left\{ \begin{array}{ll} {\text {Hom}}(\pi _{0},\,t^{*} j_{1}^{*}M_{1})~:=&{}~ {\text {Hom}}_{\mathcal {C}/\pi _{0}}\,((\pi _{0}\xrightarrow {{\text {Id}}}\pi _{0} ),\ (t^{*}j_{1}^{*}M_{1}\xrightarrow {r_{1}}\pi _{0})),\\ {\text {Hom}}(X_{0},\,j_{1}^{*} M_{1})~:=&{}~ {\text {Hom}}_{\mathcal {C}/X_{0}}\,((X_{0}\xrightarrow {tq}X_{0})),\ (j_{1}^{*}M_{1}\xrightarrow {\lambda _{1}}X_{0})),\\ {\text {Hom}}(X_{1},e^{*}M_{1})~:=&{}~ {\text {Hom}}_{\mathcal {C}/X_{1}}\,((X_{1}\xrightarrow {{\text {Id}}}X_{1})),\ (((e^{*}M)_{1}\xrightarrow {\rho _{1}}X_{1}))),\\ {\text {Hom}}(X,e^{*}M)~:=&{}~ {\text {Hom}}_{{\mathsf {Gpd}}\, \mathcal {C}/X}\,((X\!\xrightarrow {{\text {Id}}}\!X),\ (e^{*}M\xrightarrow {\rho '}X)). \end{array}\right. } \end{aligned}$$
(16)

Definition 3.2

In the situation described in Sect. 3.1, given a map we have \( \rho _{1} k_{1} f=\varDelta _{X_{0}}\lambda _{1}f =\varDelta _{X_{0}}e_{0}=e_{1} \varDelta _{X_{0}}\), since the square

(17)

commutes. Now let \(v:X_{0} \rightarrow (e^{*} M)_{1}\) be given by

(18)

where \(\rho _{1} k_{1} f=\varDelta _{X_{0}}\lambda _{1} f=\varDelta _{X_{0}} e_{0}=e_{1}\varDelta _{X_{0}}=e_{1}e_{1}\varDelta _{X_{0}}\) by (14) and (17).

Since \(e_{0}=tq\), the following diagram commutes:

(19)

so v induces \((v,v): X_{1} = X_{0}{\times }_{q}X_{0} \rightarrow (e^{*} M)_{1}{\times }_{X_{1}}(e^{*} M)_{1}\). In the notation of (16), we may therefore define \(\vartheta : {\text {Hom}}(X_{0},\,j_{1}^{*} M_{1})\rightarrow {\text {Hom}}(X_{1},e^{*}M_{1})\) by letting \(\vartheta _{1}(f):X_{1}\rightarrow (e^{*} M)_{1}\) be the composite

$$\begin{aligned} X_{1}\xrightarrow {(v,v)}(e^{*} M)_{1}{\times }_{X_{1}}(e^{*} M)_{1} \xrightarrow {({\text {Id}},i_{1})}(e^{*} M)_{1}{\times }_{X_{1}}(e^{*} M)_{1} \xrightarrow {\mu _{1}} (e^{*} M)_{1} \end{aligned}$$
(20)

where \(i:e^{*} M\rightarrow e^{*} M\) is the inverse map for the abelian group structure on \(e^{*}M\).

Lemma 3.3

The map \(\vartheta =(e_{0},\vartheta _{1})\) lands in \({\text {Hom}}(X,e^{*}M)\), for \(e_{0}=tq\) and \(\vartheta _{1}\) as in (20).

Proof

By (8) we have \(\sigma '_{1} \rho '_{1} = \mu '_{1}({\text {Id}},i'_{1})\varDelta _{(e^{*} M)_{1}}\), so

(21)

commutes, as does

(22)

so by (21), (22), (12), and the definition of \(\vartheta _{1}(f)\) we see that

$$\begin{aligned} \vartheta _{1}(f)\varDelta _{X_{0}}= \mu _{1}({\text {Id}},i_{1})(v,v)\varDelta _{X_{0}}=\sigma '_{1} e_{1}\varDelta _{X_{0}}=\sigma '_{1}\varDelta _{X_{0}}e_{0}=s'_{0} e_{0} \end{aligned}$$
(23)

By (13), for each \((a,b)\in X_{0}{\times }_{q}X_{0}\) (with \(tqa=tqb\)) we have

$$\begin{aligned} \vartheta _{1}(f)(a,b)= ((tqa,tqa),\mu _{1}(k_{1} f a, i_{1} k_{1} f b)), \end{aligned}$$
(24)

so \(d'_{0}\vartheta _{1}(f)(a,b)=tqa=e_{0}{\text {pr}}_{0}(a,b)\) and \(d'_{1}\vartheta _{1}(f)(a,b)=tqb=e_{0}{\text {pr}}_{1}(a,b)\). Thus

$$\begin{aligned} d_i\vartheta _{1}(f)=e_{0}{\text {pr}}_i \end{aligned}$$
(25)

for \(i=0,1\). Thus (23) and (25) show that

(26)

commutes. Now, given \((a,b,c)\in X_{0}{\times }_{q}X_{0}{\times }_{q}X_{0}\) (with \(tqa=tqb=tqc\)), we have

$$\begin{aligned} c'(\vartheta _{1}(f)(a,b)\times \vartheta _{1}(f)(b,c))= ((tqa,tqa),\mu _{1}(k_{1} f a,i_{1} k_{1} fb)\circ \mu _{1}(k_{1} f b, i_{1} k_{1} f c)) \end{aligned}$$

while \(\vartheta _{1}(f)c''(a,b,c)=\vartheta _{1}(f)(a,c)=((tqa,tqa),\mu _{1}(k_{1} fa,i_{1} k_{1} f c))\), where we denoted by \(c'':X_1 {\times }_{X_0}X_1 \rightarrow X_1\) and \(c':(e^*M)_1 {\times }_{X_0} (e^*M)_1\) the compositions.

Since \(\mu _{1}\) is a map of groupoids, by the interchange rule we see that

$$\begin{aligned} \mu _{1}(k_{1} f a,i_{1} k_{1} f b)\circ \mu _{1}(k_{1} f b,i_{1} k_{1} f c)=\mu _{1}(k_{1} f a,i_{1} k_{1} f c) \end{aligned}$$

where \(\circ \) the groupoid composition.

Finally, \(\rho '_{1}\circ \vartheta _{1}(f)=e_{1}\), so \((e_{0},\vartheta _{1}(f))\) is indeed a morphism in \(\mathsf {Gpd}\,\mathcal {C}/X\). \(\square \)

Definition 3.4

The pullback

(27)

in \(\mathsf {Gpd}\,\mathcal {C}/d\pi _{0}\) gives rise to a pullback

(28)

in \(\mathcal {C}\), so we may define

$$\begin{aligned} \xi :{\text {Hom}}(\pi _{0},\,t^{*} j_{1}^{*}M_{1})\rightarrow {\text {Hom}}(X_{0},\,j_{1}^{*} M_{1}) \end{aligned}$$
(29)

by sending to the map \(\xi (f)\) given by

(30)

Proposition 3.5

Given \(X=H(Y)\in \mathsf {Gpd}\,\mathcal {C}\) as in (9) and \(M\in [(\mathsf {Gpd}\,\mathcal {C},X_{0})/X]_{{\text {ab}}}\), there is a short exact sequence of abelian groups

$$\begin{aligned} 0~\rightarrow ~{\text {Hom}}(\pi _{0},\,t^{*} j_{1}^{*}M_{1})~\xrightarrow {\xi }~ {\text {Hom}}(X_{0},j^{*}M_{1})~\xrightarrow {\vartheta }~{\text {Hom}}(X,e^{*}M)~\rightarrow ~0, \end{aligned}$$

in the notation of (16), where \(\xi \) is as in (29) and \(\vartheta \) is as in Lemma 3.3.

Proof

We first show that \(\mathrm {Im}\,\xi \subseteq \mathrm {\ker }\vartheta \): Given \(f':\pi _{0} \rightarrow t^{*} j_{1}^{*} M_{1}\) in \({\text {Hom}}(\pi _{0},\,t^{*} j_{1}^{*}M_{1})\), the map \(\xi (f')\in {\text {Hom}}(X_{0},j^{*}M_{1})\) is given by the composite \(X_{0} \xrightarrow {q} \pi _{0} \xrightarrow {f'} t^{*} j_{1}^{*} M_{1} \xrightarrow {l_{1}} j_{1}^{*} M_{1}\)

By (24) and (30), for each \((a,b)\in X_{1}\) we have

$$\begin{aligned} \vartheta _{1}(\xi (f'))(a,b)=\{(tqa,tqb),\mu _{1}(k_{1} l_{1} f' q(a),i_{1} k_{1} l_{1} f' q(b))\}. \end{aligned}$$

Since \(q(a)\!=\!q(b)\), we have \(\vartheta _{1}(\xi (f'))(a,b)\!=\!((tqa,tqb),0)\), which is the zero map of \({\text {Hom}}_{{\mathsf {Gpd}}\,\mathcal {C}/X}(X, e^{*} M)\). This shows that \(\mathrm {Im}\;\xi \subseteq \ker \vartheta \).

Given \(g': X_{0} \rightarrow j_{1}^{*} M_{1} \) (as in (30)) in \(\ker \vartheta _{1}\), for all \((a,b)\in X_{1}\) we have

$$\begin{aligned} \vartheta (g')(a,b)= \{(tqa,tqa),\mu _{1}(k_{1} g'(a), i_{1} k_{1} g'(b)\}= \{(tqa,tqb),0\}. \end{aligned}$$

Thus \(k_{1} g' pr_{0}(a,b)=k_{1} g' a =k_{1} g' b = k_{1} g' pr_{1}(a,b)\), so that

$$\begin{aligned} k_{1} g' pr_{0} = k_{1} g' pr_{1}. \end{aligned}$$
(31)

Since is a coequalizer, it follows from (31) that there is a map \(f:\pi _{0} \rightarrow M_{1}\) with \(f q=k_{1} g'\), and thus \(f=fqt=k_{1} g' t\), so \(\rho _{1} f=\rho _{1} k_{1} g' t=\varDelta _{X_{0}}\lambda _{1} g' t = \varDelta _{X_{0}}t q t=\varDelta _{X_{0}}t\). Hence there is \(\overline{f}:\pi _{0} \rightarrow j_{1}^{*} M_{1}\) defined by \(f\top t:\pi _{0}\rightarrow M_{1}\times X_{0}\) into the pullback (15). Since \(\lambda _{1} \overline{f}=t\), there is also a map \(f':\pi _{0} \rightarrow t^{*} j_{1}^{*} M_{1}\) defined by \(\overline{f}\top {\text {Id}}:\pi _{0}\rightarrow j^{*}_{1}M_{1}\times \pi _{0}\) into the pullback (28).

By (31) and the above we have \(k_{1} g' = fq = k_{1} \overline{f} q\). Since \(k_{1}\) is monic, this implies that \(g'=\overline{f}q\), and since \(\overline{f}= l_{1} f'\), also \(g' = l_{1} f' q = \vartheta _{1}(f')\). This shows that \(\ker \vartheta \subseteq \mathrm {Im}\,\xi \). In conclusion, \(\ker \vartheta = \mathrm {Im}\,\xi \).

To show that \(\xi \) is monic, assume given \(f, g \in {\text {Hom}}(\pi _{0},\,t^{*} j_{1}^{*}M_{1})\) with \(\xi f=\xi g\). Then \(l_{1} f q = l_{1} g q\), which implies that

$$\begin{aligned} l_{1} f~=~l_{1} g, \end{aligned}$$
(32)

since q is epic. Also, \(\rho _{1} k_{1} l_{1} f = \varDelta _{X_{0}} t s_{1} f\) and \(\rho _{1} k_{1} l_{1} g = \varDelta _{X_{0}} t s_{1} g\), so by (32) we have \(\varDelta _{X_{0}}t s_{1} f = \varDelta _{X_{0}} t s_{1} g\) and therefore \(s_{1} f = q pr_{0} \varDelta _{X_{0}} t s_{1} f = q pr_{0} \varDelta _{X_{0}} t s_{1} g = s_{1} g\). By the definition of \(t^{*} j_{1}^{*} M_{1}\) as the pullback (28), together with (32) this implies that \(f=g\). Thus \(\xi \) is a monomorphism.

To show that \(\vartheta \) is onto, assume given \(\phi \in {\text {Hom}}_{\mathsf {Gpd}\,\mathcal {C}/X}(X, e^{*} M)\) (so that \(\rho '\circ \phi =e\)). The adjoint of \(\phi \) in \({\text {Hom}}_{{\mathsf {Spl\,}\mathcal {C}} /Y} (Y,\,R(e^{*} M))\), for Y as in (9), is given by a commuting triangle in \(\mathsf {Spl\,}\mathcal {C}\):

(33)

The adjoint \(\phi \) of \((g,t)\) is given by postcomposing with the counit of \(H \dashv R\), so \(\phi \) is the horizontal composite in:

(34)

By Sect. 2.1, the counit \(\mu \) is \(\mu _{1}\{((a,b),m),((a,b),m')\}= ((a,b),m\circ m')\). Since \(t_{1} tq=\varDelta tq\) by (4),) by (33) we have \(\rho '_{1} g= t_{1} tq = \varDelta tq = \varDelta e_{0}\).

We have a map \(g:X_{0}\rightarrow (e^{*}M)_{1}\) into the pullback square of (18) given by \(\sigma _{1} j_{1}\top t_{1} tq:X_{0}\rightarrow M_{1}\times X_{1}\). This in turn defines \(g':X_{0} \rightarrow j^{*}(e^{*} M)_{1}\), given by another pullback:

We define \(g'_{M_{1}}:X_{0}\rightarrow j^{*}M_{1}\) into the pullback (15) by \(\sigma _{1} j_{1}\top tq:X_{0}\rightarrow M_{1}\times X_{0}\), since \(\varDelta _{X_{0}}tq=\rho _{1}\sigma _{1} j_{1}\). By the definitions of g, \(g'_{M_{1}}\), and \(\vartheta \), for each \((a,b)\in X_{1}\) we have \(\vartheta (g'_{M_{1}})(a,b)=\{(tqa,tqb),\mu _{1}(g'_{M_{1}}(a), i_{1} k_{1} g'_{M_{1}}(b))\}\), while by (34) we have:

$$\begin{aligned} \begin{aligned} \phi (a,b)&= \{(tqa, tqb),\eta _{1}((tqa,tqb), k_{1} g'_{M_{1}}(a), (tqa,tqb), k'_{1} g'_{M_{1}}(b)\} \\&= ((tqa,tqb), g'_{M_{1}}(a)\circ i_{1} k_{1} g'_{M_{1}}(b)), \end{aligned} \end{aligned}$$

with \(g'_{M_{1}}(a)\circ i_{1} k_{1} g'_{M_{1}}(b)\in M_{1}(tqa,tqb)\). By the Eckmann–Hilton argument, the abelian group structure on \(M_{1}(tqa,tqb)\) is the same as the groupoid structure, so \(g'_{M_{1}}(a)\circ i_{1} k_{1} g'_{M_{1}}(b)=\mu _{1}(k_{1}g'_{M_{1}}(a),\)\( i_{1} k_{1} g'_{M_{1}}(b))\). We conclude that \(\vartheta (g')(a,b) = \phi (a,b)\) for each \((a,b)\in X_{1}\), so \(\vartheta (g')=\phi \), as required. \(\square \)

We now rewrite the map \(\vartheta \) of Proposition 3.5 in a different form (see Lemma 3.7). This will be used in Proposition 5.3 in the case \(\mathcal {C}={\mathsf {Cat}_{\mathcal {O}}}\):

Definition 3.6

Given \(X=H(Y)\in \mathsf {Gpd}\,\mathcal {C}\) as in (9), we define a map

$$\begin{aligned} \vartheta ':{\text {Hom}}_{\mathcal {C}/X_{0}}(X_{0},\,j_{1}^{*} M_{1})\rightarrow {\text {Hom}}_{{\mathsf {Gpd}}\, \mathcal {C}/X}(X,M) \end{aligned}$$
(35)

as follows: the pullback square (15) implies that a map \(X_{0}\rightarrow j_{1}^{*} M_{1}\) is given by \(f:X_{0}\rightarrow M_{1}\) with \(\rho _{1} f=\varDelta _{X_{0}}\). We then define \({\bar{\vartheta }}(f):X_{1}\rightarrow M_{1}\) by \({\bar{\vartheta }}(f)(a,b)=\sigma (a,b)\circ f(b)-f(a)\circ \sigma (a,b)\), where \(\circ \) is the groupoid composition in M and the subtraction is that of the abelian group object M. This gives rise to a map

in \(\mathsf {Spl\,}\mathcal {C}\), where for each \((a,b)\in X_{1}\), with \(d_{0}\bar{\vartheta }(f)(a,b)=({\text {Id}}\circ p_{0})(a,b)=a\) we have

$$\begin{aligned} {\bar{\vartheta }}(f) \varDelta _{X_{0}}(a)={\bar{\vartheta }}(f)(a,a)=\sigma (a,a) f(a)-f(a)\sigma (a,a) = O_M=\sigma (a,a)=s_{0}(a). \end{aligned}$$

Here \(\sigma \varDelta _{X_{0}}= s_{0}: X_{0}\rightarrow M_{1}\) because \((\sigma ,{\text {Id}}):X\rightarrow M\) is a map of groupoids. Thus we have a map in \({\text {Hom}}_{{\mathsf {Spl\,}}\mathcal {C}/RHY}(Y,\, R (M))\) given by the composite

By Sect. 2.1 this corresponds to the map \(\vartheta '(f){ in}{\text {Hom}}_{{\mathsf {Gpd}}\mathcal {C}/X}(X,M)\) with \(\vartheta '(f)_{0}={\text {Id}}\). and \(\vartheta '(f)_{1}={\bar{\vartheta }}(f)\). We define

$$\begin{aligned} \phi : {\text {Hom}}_{{\mathsf {Gpd}}\, \mathcal {C}/X} ((X\!\xrightarrow {{\text {Id}}}\! X),(M\!\xrightarrow {\rho }\!X))\rightarrow {\text {Hom}}_{{\mathsf {Gpd}}\, \mathcal {C}/X} ((X\!\xrightarrow {e}\!X),(e^{*} M\!\xrightarrow {\rho '}\!X)) \end{aligned}$$
(36)

as follows. By Sect. 2.1, an element of \({\text {Hom}}_{{\mathsf {Gpd}}\, \mathcal {C}/X} ((X\!\xrightarrow {{\text {Id}}}\! X),(M\!\xrightarrow {\rho }\!X))\) is determined by the map

(37)

in \(\mathsf {Spl\,}\mathcal {C}\). We associate to this another map in \(\mathsf {Spl\,}\mathcal {C}\):

(38)

where \(\widetilde{\phi }(g)\) into the pullback square of (18) is given by \(\psi _g\top e_{1}:X_{1}\rightarrow M_{1}\times X_{1}\), with \(\psi _g(a,b)=\sigma (tqa,a)g(a,b)\sigma (b,tqb)\). Note that, since \(\rho _{1}(m)=(\partial _{0} m,\partial _{1} m)\):

$$\begin{aligned} \rho _{1} \psi _{g}(a,b)=\rho _{1}\sigma _{1}(tqa,a)\rho _{1} g(a,b)\rho _{1}\sigma (b,tqb)=(tqa,a)(a,b)(b,tqb)=e_{1}(a,b). \end{aligned}$$

We may check the commutativity of (38), using (11). The map \((e_{0}, {\widetilde{\phi }}(g))\) in (38) then defines an element \(\phi (g)\) in \({\text {Hom}}_{{\mathsf {Gpd}}\, \mathcal {C}/X} ((X\!\xrightarrow {e}\!X),(e^{*} M\!\xrightarrow {\rho '}\!X))\).

Lemma 3.7

For \(\vartheta '\) as in (35) and \(\phi \) as in (36), the diagram

figure i

commutes, with vertical isomorphisms, where \((tq)^{*}({\text {Id}},f)=(tq,{\hat{f}})\) for \(({\text {Id}},f)\in {\text {Hom}}_{\mathcal {C}/X_{0}}(X_{0},j_{1}^{*} M_{1})\) and \({\hat{f}}(a)=\sigma (tqa,a)f(a)\sigma (a,tqa)\).

Proof

For each \((a,b)\in X_{1}\) we have \(\theta '({\text {Id}},f)(a,b)=\sigma (a,b)f(b)-f(a)\sigma (a,b)\), so

$$\begin{aligned} \begin{aligned} \phi \vartheta '({\text {Id}},f)(a,b)=\,\,&\sigma (tqa,a)\{\sigma (a,b)f(b)-f(a)\sigma (a,b)\}\sigma (tqb,b) \\ =\,\,&\sigma (tqa,a)\sigma (a,b)f(b)\sigma (b,tqb)-\sigma (tqa,a)f(a)\sigma (a,b)\sigma (b,tqb) \\ =\,\,&\hat{f}(b)-\hat{f}(a)=\vartheta ({\hat{f}})(a,b)=\vartheta (tq)^{*}({\text {Id}},f)(a,b) \end{aligned} \end{aligned}$$

Thus (39) commutes. The map \((tq)^{*}\) is an isomorphism, with inverse sending \((tq,g):X_{0}\rightarrow e^{*} j_{1}^{*} M_{1}\) to \(({\text {Id}},\widetilde{g} ): X_{0}\rightarrow j_{1}^{*} M_{1}\), where \(\widetilde{g}(a)=\sigma (a,tqa)g(a)\sigma (tqa,a)\). The map \(\phi \) is an isomorphism by construction. \(\square \)

4 Comonad resolutions for \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology

We now define the comonad on track categories which is used to construct functorial cofibrant replacements, yielding a formula for computing the \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology of a track category. This will provide crucial ingredients (Theorem 4.9 and Corollary 4.10) for our main result, Theorem 5.5.

4.1 Track categories

Track categories, the objects of \({\mathsf {Track}_{\mathcal {O}}}=\mathsf {Gpd}({\mathsf {Cat}_{\mathcal {O}}})\) of Sect. 1.1, are strict 2-categories X with object set \(\mathcal {O}\) (and functors which are identity on objects) such that for each \(a,b \in \mathcal {O}\) the category \(X(a,b)\) is a groupoid. The double nerve functor provides an embedding \(N_{(2)}:{\mathsf {Track}_{\mathcal {O}}}\hookrightarrow [\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]\)

The lower right corner of \(N_{(2)}X\) (omitting degeneracies), appears as follows, with the vertical direction groupoidal, and the horizontal categorical:

There is a functor \(\varPi _{0}:{\mathsf {Track}_{\mathcal {O}}}\rightarrow {\mathsf {Cat}_{\mathcal {O}}}\) given by dividing out by the 2-cells: that is,\((\varPi _{0}X)_{0} = \mathcal {O}\) and \((\varPi _{0}X)_{1} = q X_{1}\), where \(X_{1}\) is the groupoid of 1- and 2-cells in X and \(q:\mathsf {Gpd}\rightarrow \mathsf {Set}\) is the connected component functor.

Definition 4.1

We say \(X\in {\mathsf {Track}_{\mathcal {O}}}\) is homotopically discrete if, for each \(a,b\in \mathcal {O}\), the groupoid X(ab) is an equivalence relation, that is, a groupoid with no non-trivial loops.

Remark 4.2

By taking nerves in the groupoid direction we define

$$\begin{aligned} I:{\mathsf {Track}_{\mathcal {O}}}=\mathsf {Gpd}({\mathsf {Cat}_{\mathcal {O}}})\rightarrow [\varDelta ^{{}^{{\text {op}}}},{\mathsf {Cat}_{\mathcal {O}}}]=({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\end{aligned}$$
(40)

If \(F:X\rightarrow Y\) in \({\mathsf {Track}_{\mathcal {O}}}\) is a 2-equivalence (so for each \(a,b\in \mathcal {O}\), \(F(a,b)\) is an equivalence of groupoids), \(IF\) is a Dwyer–Kan equivalence of the corresponding \(({\mathcal {S}}\!,\!\mathcal {O})\)-categories. In particular, if \(X\in {\mathsf {Track}_{\mathcal {O}}}\) is homotopically discrete, and \(d\,\varPi _{0}X\) is a track category with only identity 2-cells), this holds for the obvious \(F:X\rightarrow {\text {d}}\varPi _{0}X\).

4.2 The comonad \({\mathcal {K}}\)

Taking \(\mathcal {C}={\mathsf {Cat}_{\mathcal {O}}}\) in Sect. 2.2 yields a pair of adjoint functors

$$\begin{aligned} L:{\mathsf {Cat}_{\mathcal {O}}}\leftrightarrows \mathsf {Gpd}({\mathsf {Cat}_{\mathcal {O}}})={\mathsf {Track}_{\mathcal {O}}}: U. \end{aligned}$$

Let \({\mathsf {Graph}_{\mathcal {O}}}\) be the category of reflexive graphs with object set \(\mathcal {O}\) and morphisms which are identity on objects (where a reflexive graph is a diagram with \(d_{0} s_{0}=d_{1} s_{0}={\text {Id}}\)). There are adjoint functors \(F:{\mathsf {Graph}_{\mathcal {O}}}\rightleftarrows {\mathsf {Cat}_{\mathcal {O}}}:V\), where V is the forgetful functor and F is the free category functor. By composition, we obtain a pair of adjoint functors

$$\begin{aligned} LF:{\mathsf {Graph}_{\mathcal {O}}}\rightleftarrows {\mathsf {Track}_{\mathcal {O}}}: VU, \end{aligned}$$
(41)

and therefore a comonad \((\mathcal {K}, \varepsilon , \delta ),\,\mathcal {K}= LFVU:{\mathsf {Track}_{\mathcal {O}}}\rightarrow {\mathsf {Track}_{\mathcal {O}}}\), where \(\varepsilon \) is the counit of the adjunction (41), \(\delta =LF(\eta )VU\), and \(\eta \) the unit of the adjunction (41). For each \(X\in {\mathsf {Track}_{\mathcal {O}}}\) we obtain a simplicial object \(\mathcal {K}_{\bullet }X\in [\varDelta ^{{}^{{\text {op}}}},{\mathsf {Track}_{\mathcal {O}}}]\) with \(\mathcal {K}_{n} X= \mathcal {K}^{n+1}X\) and face and degeneracy maps given by

$$\begin{aligned} \partial _i=\mathcal {K}^i\varepsilon \mathcal {K}^{n-i}: \mathcal {K}^{n+1}X\rightarrow \mathcal {K}^{n}X\quad \text {and}\quad \sigma _i=\mathcal {K}^i\delta \mathcal {K}^{n-i}: \mathcal {K}^{n+1}X\rightarrow \mathcal {K}^{n+2}X. \end{aligned}$$

The simplicial object \(\mathcal {K}_{\bullet }X\) is augmented over X via \(\varepsilon :\mathcal {K}_{\bullet }X\rightarrow X\), and \(\mathcal {K}_{\bullet }X\) is a simplicial resolution of X (see [20]).

Remark 4.3

The augmented simplicial object \(VU(\mathcal {K}_{\bullet }X)\xrightarrow {VU\varepsilon } VUX\) is aspherical (see for instance [20, Proposition 8.6.10]).

Remark 4.4

Given \(X\in {\mathsf {Cat}_{\mathcal {O}}}\) by (5) we see that \(LX\) is a homotopically discrete track category (Definition 4.1), with \(\varPi _{0}LX = X\). There are two canonical splittings \(\varPi _{0}LX =X\rightarrow (LX_{0})=X_s\textstyle {\,\coprod \,}X_t\), given by the inclusion in the s or in the t copy of X. Since \(\mathcal {K}Y=L(FVUY)\) for each \(Y \in {\mathsf {Track}_{\mathcal {O}}}\), the same holds for \(\mathcal {K}Y\).

Furthermore, since \(FVUY\) is a free category, so is \(\varPi _{0}\mathcal {K}Y=FVUY\). Since F preserves coproducts (being a left adjoint), \((\mathcal {K}Y)_{0}=FVUY\textstyle {\,\coprod \,}FVUY = F(VUY \textstyle {\,\coprod \,}VUY)\) and, using (6), \((\mathcal {K}Y)_{1}=F(VUY \textstyle {\,\coprod \,}VUY \textstyle {\,\coprod \,}VUY \textstyle {\,\coprod \,}VUY)\). Thus both \((\mathcal {K}Y)_{0}\) and \((\mathcal {K}Y)_{1}\) are free categories. Similarly, \((\mathcal {K}Y)_r\) is a free category for each \(r >1\).

4.3 The comonad resolution

Let \(\overline{I}:[\varDelta ^{{}^{{\text {op}}}},{\mathsf {Track}_{\mathcal {O}}}]\rightarrow [\varDelta ^{{}^{{\text {op}}}},({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,]\) be the functor obtained by applying the internal nerve functor I of (40) levelwise in each simplicial dimension—so for \(X\in {\mathsf {Track}_{\mathcal {O}}}\), \(\overline{I}\mathcal {K}_{\bullet } X\in [\varDelta ^{{}^{{\text {op}}}},({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,]\). Similarly, \(\overline{N}:({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\rightarrow [\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]\) is obtained by applying the nerve functor in the category direction; applying this levelwise to \( \overline{I}\mathcal {K}_{\bullet } X\) yields

$$\begin{aligned} W=\overline{N}\, \overline{I}\mathcal {K}_{\bullet } X \in [\varDelta ^{{3}^{{\text {op}}}},\mathsf {Set}]. \end{aligned}$$
(42)

Below is a picture of the corner of W, in which the horizontal simplicial direction is given by the comonad resolution, the vertical is given by the nerve of the groupoid in each track category, and the diagonal is given by the nerve of the category in each track category.

(43)

Note that the augmentation \(\epsilon :\mathcal {K}_{\bullet } X\rightarrow X\) induces a map in \([\varDelta ^{{3}^{{\text {op}}}},\mathsf {Set}]\):

$$\begin{aligned} W \rightarrow \overline{N}\, \overline{I}cX. \end{aligned}$$
(44)

Now let \(Z=W^{(2)}\) be W thought of as a simplicial object in \([\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]\) along the direction appearing diagonal in the picture, that is

$$\begin{aligned} Z\in [\varDelta ^{{}^{{\text {op}}}},[\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]], \end{aligned}$$
(45)

with \(Z_{0}\) the constant bisimplicial set at \(\mathcal {O},\,Z_{1}\) given by

with

$$\begin{aligned} Z_{k}\cong Z_{1}{\times }_{Z_{0}}\overset{k}{\cdots }{\times }_{Z_{0}}Z_{1}, \end{aligned}$$
(46)

for each \(k\ge 2\).

By applying the diagonal functor \({\text {Diag}}: [\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]\rightarrow [\varDelta ^{{}^{{\text {op}}}},\mathsf {Set}]\) dimensionwise to Z (viewed as in (45)), we obtain \(\overline{{\text {Diag}}}Z\in [\varDelta ^{{}^{{\text {op}}}},[\varDelta ^{{}^{{\text {op}}}},\mathsf {Set}]]\).

To show that \(\overline{{\text {Diag}}}Z\) is an \(({\mathcal {S}}\!,\!\mathcal {O})\)-category, we must show that it behaves like the nerve of a category object in simplicial sets in the outward simplicial direction: this means that \((\overline{{\text {Diag}}}Z)_{0}\) is the “simplicial set of objects”—and indeed it is the constant simplicial set at \(\mathcal {O}\). Similarly, \((\overline{{\text {Diag}}}Z)_{1}\) is the “simplicial set of arrows”.

Since \({\text {Diag}}\) preserves limits, by (46) we have

$$\begin{aligned} \begin{aligned} (\overline{{\text {Diag}}}Z)_k&\cong {\text {Diag}}Z_k \cong {\text {Diag}}Z_{1}{\times }_{{{\text {Diag}}}Z_{0}}\overset{k}{\cdots }{\times }_{{{\text {Diag}}}Z_{0}}{\text {Diag}}Z_{1}\\&= (\overline{{\text {Diag}}}Z)_{1}{\times }_{({\overline{{\text {Diag}}}}Z)_{0}}\overset{k}{\cdots }{\times }_{({\overline{{\text {Diag}}}}Z)_{0}}(\overline{{\text {Diag}}}Z)_{1}. \end{aligned} \end{aligned}$$

for each \(k\ge 2\). Thus \(\overline{{\text {Diag}}}Z\) is 2-coskeletal, with unique fill-ins for inner 2-horns (the composite) so it is indeed in \(({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\), and the map (44) induces a map \(\alpha :\overline{{\text {Diag}}}Z \rightarrow I X\) for I as in (40).

Lemma 4.5

For Z and \({\text {Diag}}Z\) as above, \(\alpha :\overline{{\text {Diag}}}Z \rightarrow I X\) is a Dwyer–Kan equivalence in \(({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\).

Proof

We need to show that, for each \(a,b\in \mathcal {O}\)

$$\begin{aligned} (\overline{{\text {Diag}}}Z)(a,b)\rightarrow X(a,b) \end{aligned}$$
(47)

is a weak homotopy equivalence. Note that \((\overline{{\text {Diag}}}Z)(a,b)\) is the diagonal of

(48)

and we have a map from (48) to the horizontally constant bisimplicial set

(49)

inducing the map (47) on diagonals.

We shall show that this map of bisimplicial sets from (48) to (49) is a weak equivalence of simplicial sets in each vertical dimension. The corresponding map of diagonals (47) is then a weak equivalence by [12, Prop.1.7].

Consider first vertical dimension 1. We must show that the map of simplicial sets

$$\begin{aligned} (\mathcal {K}_{\bullet } X)_{11}(a,b) \rightarrow c X_{11}(a,b) \end{aligned}$$
(50)

is a weak equivalence, where \(c X_{11}(a,b)\) denotes the constant simplicial set at \(X_{11}(a,b)\). Note that \(W_{11}=(V U W)_{1}\) for each \(W\in {\mathsf {Track}_{\mathcal {O}}}\), where U is the internal arrow functor and V is the underlying graph functor (with \((VY)_{1}=Y_{1}\) for each \(Y\in {\mathsf {Cat}_{\mathcal {O}}}\)), so \(W_{11}(a,b)=(V U W)_{1}(a,b)\) and thus \( (\mathcal {K}_{\bullet } X)_{11}(a,b)=(V U \mathcal {K}_{\bullet } X)_{1}(a,b)\) for each \(a,b\in \mathcal {O}\).

By Remark 4.3, the simplicial object \(VU\mathcal {K}_{\bullet }X\) is aspherical, so \((V U \mathcal {K}_{\bullet }X)_{1}(a,b)\) is, too, and is thus weakly equivalent to \(c (VUX)_{1}(a,b)=cX_{11}(a,b)\). Thus (50) is a weak equivalence.

In vertical dimension 0, from the vertical simplicial structure of (48) we see

$$\begin{aligned} (\mathcal {K}_{\bullet } X)_{10}(a,b) \rightarrow c X_{10}(a,b) \end{aligned}$$
(51)

is a retract of (50), so it is also a weak equivalence.

In vertical dimension 2, we must show that

(52)

is a weak equivalence. This is the induced map of pullbacks of the diagram

(53)

in \(\mathcal {S}\). By the above discussion, the vertical maps in (53) are weak equivalences.

By definition of \(\mathcal {K}\) there is a pullback

(54)

in \(\mathcal {S}\), where

$$\begin{aligned} \nabla :(\mathcal {K}_{\bullet }X)_{10}(a,b) = \varPi _{0}(\mathcal {K}_{\bullet }X)_{10}(a,b) \textstyle {\,\coprod \,}\varPi _{0}(\mathcal {K}_{\bullet }X)_{10}(a,b)\rightarrow \varPi _{0}(\mathcal {K}_{\bullet }X)_{10}(a,b). \end{aligned}$$

is the fold map. To see that \(\nabla \) is a fibration, let \(Y_{\bullet }=\varPi _{0}(\mathcal {K}_{\bullet }X)_{10}(a,b)\). For any commuting diagram

in \(\mathcal {S}\), \(\alpha \) factors through \(i_t:Y_{\bullet }\hookrightarrow Y_{\bullet }\textstyle {\,\coprod \,}Y_{\bullet }\) (\(t=1,2\)), since \(\varLambda ^k[n]\) is connected, so

commutes, and thus \(\nabla i_t \beta = \beta \) and \(i_t \beta j=i_t \nabla \alpha = i_t \nabla i_t \alpha ' = i_t \alpha ' = \alpha \).

The maps \(\partial _{0}^{\bullet }\) and \(\partial _{1}^{\bullet }\) are fibrations, since they are pullbacks of such by (54). The bottom horizontal maps in (53) are fibrations since their target is discrete. We conclude that the induced map of pullbacks (52) is a weak equivalence.

Vertical dimension \(i>2\) is completely analogous. \(\square \)

Lemma 4.6

For any \(X\in {\mathsf {Track}_{\mathcal {O}}}\), \(\overline{{\text {Diag}}}\overline{N}\,\overline{I}\mathcal {K}_{\bullet }X\) is a free \(({\mathcal {S}}\!,\!\mathcal {O})\)-category (see Sect. 2.4).

Proof

By Remark 4.4, for each track category \(\mathcal {K}_{r} X\) the nerve in the groupoid direction is a free category in each simplicial degree. Thus for \(Z:= \overline{N}\,\overline{I}\mathcal {K}_{\bullet }X\), \(\overline{{\text {Diag}}}Z\) is also a free category in each simplicial degree. By Sect. 4.2, the degeneracies \(\sigma _i :\mathcal {K}^{n+1}X \rightarrow \mathcal {K}^{n+2}X\) are given by \(\sigma _i =\mathcal {K}^{i}LF(\eta )VU\mathcal {K}^{n-i}\), where \(\eta : {\text {Id}}\rightarrow V U L F\) is the unit of the adjunction. Therefore, \(\sigma _i\) sends generators to generators and so the same holds for the degeneracies of \(\overline{{\text {Diag}}}Z\), so it is a free \(({\mathcal {S}}\!,\!\mathcal {O})\)-category. \(\square \)

Corollary 4.7

For any \(X\in {\mathsf {Track}_{\mathcal {O}}}\), \(\overline{{\text {Diag}}}\overline{N}\,\overline{I}\mathcal {K}_{\bullet }X\) is a cofibrant replacement of \(I X\) in \(({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\).

Proof

By Lemma 4.5, the map \(\overline{{\text {Diag}}}Z\rightarrow I X\) is a weak equivalence. \(\square \)

We now show how to use the comonad resolution of a track category to compute its \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology:

Proposition 4.8

For \(X\in {\mathsf {Track}_{\mathcal {O}}}\), let \(Z=\overline{N}\,\overline{I}\mathcal {K}_{\bullet }X\) and let M be a Dwyer–Kan module over X. Then

$$\begin{aligned} H^{n-i}_{{\text {SO}}}({I X};{M})~=~\pi _{i} {\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/IX} (\overline{{\text {Diag}}}Z,\mathcal {K}_{X}(M,n)). \end{aligned}$$
(55)

Proof

Let \(\phi :{\text {Diag}}\overline{\mathcal {F}}_{\bullet }X\rightarrow IX\) be the Dwyer–Kan standard free resolution of Sect. 2.4. Then, by definition,

$$\begin{aligned} H^{n-i}_{{\text {SO}}}({I X};{M})~=~\pi _{i} {\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/IX}({\text {Diag}}\overline{\mathcal {F}}_{\bullet }X,\,\mathcal {K}_{X}(M,n)), \end{aligned}$$
(56)

where \(\mathcal {K}_{X}(M,n)\) is the twisted Eilenberg–Mac Lane \(({\mathcal {S}}\!,\!\mathcal {O})\)-category of Sect. 2.4.

By Corollary 4.7, \(\alpha :\overline{{\text {Diag}}}Z\rightarrow IX\) is a cofibrant replacement for \(IX\), so given a commuting diagram

there is a lift \(\psi :\overline{{\text {Diag}}}Z\rightarrow {\text {Diag}}\overline{\mathcal {F}}_{\bullet }X\) with \(\phi \psi =\alpha \) and \(\psi \) a weak equivalence. Hence

$$\begin{aligned} \pi _{i}{\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/IX}(\overline{{\text {Diag}}}Z,\mathcal {K}_{X}(M,n))\cong \pi _{i}{\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/IX}({\text {Diag}}\overline{\mathcal {F}}_{\bullet }X,\mathcal {K}_{X}(M,n))\ \end{aligned}$$

Thus (55) follows from (56). \(\square \)

Theorem 4.9

Let \(X\in {\mathsf {Track}_{\mathcal {O}}}\), and M a module over X; then for each \(s\ge 0\), \(H^{s}_{{\text {SO}}}({I X};{M})=\pi ^{s}C^{\bullet }\) for the cosimplicial abelian group

$$\begin{aligned} C^{\bullet }~:=~\pi _{1} {\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/X}(\overline{I}\mathcal {K}_{\bullet }X,M). \end{aligned}$$
(57)

Proof

Since \(\overline{{\text {Diag}}}Z={\text {Diag}}\overline{I}\mathcal {K}_{\bullet } X\), by Proposition 4.8 and Lemma 2.6 we have

$$\begin{aligned} \begin{aligned} H^{n-i}_{{\text {SO}}}({IX};{M})&=\pi _{i}{\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/IX}(\overline{{\text {Diag}}}Z,\mathcal {K}_{X}(M,n)\\&= \pi _{i}{\text {Tot}}\,{\text {map}}_{[\varDelta ^{{2}^{{\text {op}}}},{{\mathsf {Cat}_{\mathcal {O}}}}]/IX}(\overline{I}\mathcal {K}_{\bullet } X,\mathcal {K}_{X}(M,n)). \end{aligned} \end{aligned}$$
(58)

the homotopy spectral sequence of the cosimplicial space

$$\begin{aligned} W^{\bullet }={\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}}(\overline{I}\mathcal {K}_{\bullet }X,\mathcal {K}_{X}(M,n)) \end{aligned}$$

(see [8, X6]) has \(E^{s,t}_{2}=\pi ^{s}\pi _{t} W^{\bullet }\Rightarrow \pi _{t-s}{\text {Tot}}\,W^{\bullet }\) with

$$\begin{aligned} E^{s,t}_{1}~=~\pi _{t} {\text {map}}(I\mathcal {K}^{s} X,\mathcal {K}_{X}(M,n))=H^{n-t}_{{\text {SO}}}({I \mathcal {K}^{s} X};{M}). \end{aligned}$$

Here we used the fact that \(I\mathcal {K}^{s} X\) is a cofibrant \(({\mathcal {S}}\!,\!\mathcal {O})\)-category, since it is free in each dimension and the degeneracy maps take generators to generators.

By Remark 4.4, \(I\mathcal {K}^{s} X\) is homotopically discrete, so \(I \mathcal {K}^{s} X \rightarrow I{\text {d}}\varPi _{0}\mathcal {K}^{s} X\) is a weak equivalence. Hence \(I \mathcal {K}^{s} X\) is a cofibrant replacement of \(I{\text {d}}\varPi _{0}\mathcal {K}^{s} X\), and so

$$\begin{aligned} H^{n-t}_{{\text {SO}}}({I \mathcal {K}^{s} X};{M})=H^{n-t}_{{\text {SO}}}({I{\text {d}}\varPi _{0}\mathcal {K}^{s} X};{M}). \end{aligned}$$
(59)

Recall from [2, Theorem 3.10] that \(H^{s}_{{\text {SO}}}({{\text {d}}\mathcal {C}};{M})=H^{s+1}_{{\text {BW}}}(\mathcal {C},M)\) for any category \(\mathcal {C}\) and \(s>0\), where \(H^{\bullet }_{{\text {BW}}}\) is the Baues–Wirsching cohomology of [3]. Hence if \(\mathcal {C}\) is free, \(H^{s}_{{\text {SO}}}({{\text {d}}\mathcal {C}};{M})=0\) for each \(s>0\), by [3, Theorem 6.3].

If \(n\ne t\), it follows from by (59) that \(E^{s,t}_{1}=H^{n-t}_{{\text {SO}}}({I\mathcal {K}^{s} X};{M})=0\), since \(\varPi _{0}I\mathcal {K}^{s} X\) is a free category, so the spectral sequence collapses at the \(E_{1}\)-term, and

$$\begin{aligned} H^{s}_{{\text {SO}}}({IX};{M})~=~\pi _{n-s}{\text {Tot}}\,W^{\bullet }~=~ \pi ^{s}\pi _{n} {\text {map}}(\overline{I}\mathcal {K}_{\bullet }X,\mathcal {K}_{X}(M,n)). \end{aligned}$$
(60)

Since \(\pi _{n}{\text {map}}(\overline{I}\mathcal {K}_{\bullet }X,\mathcal {K}_{X}(M,n))=H^{0}_{({\mathcal {S}}\!,\!\mathcal {O})}(I{\text {d}}\varPi _{0}\mathcal {K}_{\bullet }X,M)\), this is independent of n. We deduce from (60) that \(H^{s}_{{\text {SO}}}({IX};{M})=\pi ^{s} C^{\bullet }\) for \(C^{\bullet }\) as in (57). \(\square \)

Corollary 4.10

For any \(X\in {\mathsf {Track}_{\mathcal {O}}}\), X-module M, and \(s\ge 0\) we have

$$\begin{aligned} H^{s}_{{\text {SO}}}({I {\text {d}} X_{0}};{j^{*} M})~\cong ~\pi ^{s}\widehat{C}^{\bullet }, \end{aligned}$$
(61)

where \(\widehat{C}^{\bullet }\) is the cosimplicial abelian group \(\pi _{1} {\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/X}(\overline{I}(\mathcal {K}_\bullet X)_{0},j^{*} M)\).

Proof

Let \(Z=N \overline{I}{\text {d}}(\mathcal {K}_\bullet X)_{0}\). Then \(\overline{{\text {Diag}}}Z \rightarrow IX_{0}\) is a cofibrant replacement, by Corollary 4.7. Therefore, by Lemma 2.6:

$$\begin{aligned} \begin{aligned} H^{n-i}_{{\text {SO}}}({(I {\text {d}} X_{0}};{j^{*} M})&= \pi _{i}{\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}/I {\text {d}} X_{0}}(\overline{{\text {Diag}}}Z,\mathcal {K}_{X_{0}}(j^{*} M,n))\\&=\pi _{i}{\text {Tot}}{\text {map}}_{[\varDelta ^{{2}^{{\text {op}}}},{{\mathsf {Cat}_{\mathcal {O}}}}]}(\overline{I}d (\mathcal {K}_{\bullet }X)_{0}, j^{*} M). \end{aligned} \end{aligned}$$

The homotopy spectral sequence for \(W^{\bullet }={\text {map}}_{({\mathcal {S}}\!,\!\mathcal {O})\text {-}{\mathsf {Cat}\,}}(\overline{I}\!{\text {d}}\, (\mathcal {K}_{\bullet }X)_{0},\mathcal {K}_{X_{0}}(j^{*} M,n))\) again collapses at the \(E_{1}\)-term, since \((\mathcal {K}^{s} X)_{0}\) is a free category, yielding (61). \(\square \)

5 \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology of track categories and comonad cohomology

We now use the comonad of Sect. 4.2 to define the comonad cohomology of a track category, rewrite the short exact sequence of Proposition 3.5 for \(\mathcal {C}={\mathsf {Cat}_{\mathcal {O}}}\), in terms of mapping spaces, and use it to prove our main result, Theorem 5.5.

5.1 Mapping spaces

Given maps \(f:A\rightarrow B\) and \(g:M\rightarrow B\) in a simplicial model category \(\mathcal {C}\), we let \({\text {map}}_{\mathcal {C}/B}(A, M)\) be the homotopy pullback

If A is cofibrant and g is a fibration, so is \(g_{*}\). Moreover, if \(h:B\rightarrow D\) is a trivial fibration, so is \(h_{*}:{\text {map}}(A,B) \rightarrow {\text {map}}(A,D)\).

Thus we obtain a map \(\bar{h}_{*}:{\text {map}}_{\mathcal {C}/B}(A,M) \rightarrow {\text {map}}_{\mathcal {C}/D}(A,M)\) defined by

Since \(h_{*}\) is a weak equivalence, so is \(\bar{h}_{*}\) .

When \(\mathcal {C}={\mathsf {Track}_{\mathcal {O}}}\), we will use this construction several times for \(X=H Y\) as in (9) and \(e^{*}M\), \(j^{*} M\), and \(t^{*} j^{*} M\) be as in (10), (14), and (27), respectively:

  1. (i)

    The diagram

    induces a map \(\bar{q}_*:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}}\pi _{0}}(X, M)\), where M is a track category over \({\text {d}}\pi _{0}\) via the map \(q:X\rightarrow {\text {d}}\pi _{0}\), which is a weak equivalence (since X is homotopically discrete) and a fibration (since \({\text {d}}\pi _{0}\) is discrete). Hence \(\bar{q}_{*}\) is a weak equivalence.

  2. (ii)

    The diagram

    induces \(\bar{t}^{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}({\text {d}} X_{0}, j^{*} M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}}\pi _{0}}({\text {d}}\pi _{0},\, t^{*} j^{*} M)\).

    Since \(q^{*} t^{*}=e^{*}\), we have a diagram

    inducing \(\bar{q}^{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}/{\text {d}}\pi _{0}}}({\text {d}}\pi _{0},\, t^{*} j^{*} M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}/{\text {d}}\pi _{0}}}({\text {d}}\pi _{0}, e^{*} j^{*} M)\).

  3. (iii)

    The diagram

    induces \(\bar{{\textit{j}}}^{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}({\text {d}} X_{0}, j^{*} M)\).

  4. (iv)

    The diagram

    induces \(\bar{t}^{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/d\pi _{0}}(X, M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/d \pi _{0}}(d \pi _{0}, t^{*} j^{*} M)\). Since \(t^{*}\) is a trivial fibration, \(\bar{t}^{*}\) is a weak equivalence.

  5. (v)

    The diagram

    induces \(\bar{e}^{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X, e^{*} M)\). Moreover, \(e:X\rightarrow X\) is a weak equivalence (since X is homotopically discrete), so \(\bar{e}^{*}\) is, too.

  6. (vi)

    Using the fact that \(q_{*}e^{*}=q_{*}\) (since \(qe=qtq=q\)), we have

    which induces \(\bar{q}'_{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,e^{*} M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}}\pi _{0}}(X, M)\), and

    (62)

    commutes, since \(\bar{q'}_{*} e^{*}=q_{*}\).

  7. (vii)

    Finally, the diagram

    induces \((\bar{{\textit{j}}}')^{*}:{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,e^{*} M) \rightarrow {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}({\text {d}} X_{0}, e^{*} j^{*} M)\).

Lemma 5.1

For any map \(f:A\rightarrow B\) in \({\mathsf {Cat}_{\mathcal {O}}}\), with A free, there is an isomorphism

$$\begin{aligned} \pi _{1} {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/B}(A,M)=H^{0}_{{\text {SO}}}({A};{M}) \cong {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/B}(A,M_{1}). \end{aligned}$$

Proof

Since A is free, \(c({A})\in s{\mathcal {O}}\text {-}{\mathsf {Cat}\,}={({\mathcal {S}}\!,\!\mathcal {O})}\text {-}{\mathsf {Cat}\,}\) is cofibrant, and is its own fundamental track category. A module M, as an abelian group object in \({\mathsf {Track}_{\mathcal {O}}}/B\), is an Eilenberg–Mac Lane object \(E^{B}({M_{1}},{1})\), which explains the first equality. By [18, II, §2], the n-simplices of the cosimplicial abelian group \({\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/B}(A,M)\) are maps of categories over B of the form \(\sigma :A\otimes \varDelta [n]\rightarrow M_{n}\) where \(A\otimes \varDelta [n]\) is the coproduct in \({\mathsf {Cat}_{\mathcal {O}}}\) of one copy of A for each n-simplex of \(\varDelta [n]\). Since \(M_{0}=B\), \({\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/B}(A,M)_{0}\) is the singleton \(\{f\}\). The non-degenerate part of \({\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/B}(A,M)_{1}\) is \({\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}}(A,M_{1})\), so the 1-cycles are \( {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/B}(A,M_{1})\). Since M, and thus \({\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/B}(A,M)\), is a 1-Postnikov section, the 1-cycles are equal to \(\pi _{1} {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/B}(A,M)\). \(\square \)

Lemma 5.2

For \(X\in {\mathsf {Track}_{\mathcal {O}}}\) of the form \(HY\) and M an X-module, the diagram

figure k

commutes, and there is an isomorphism

$$\begin{aligned}&\omega : {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}}((X_{0}\xrightarrow {e_{0}}X_{0}),\ (e^{*} j_{1}^{*} M_{1}\xrightarrow {\lambda _{1}}X_{0}))\\&\quad \rightarrow ~ {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}}\,(X_{0}\xrightarrow {e_{0}}X_{0}),\ j_{1}^{*} M_{1}\xrightarrow {\lambda _{1}}X_{0})) \end{aligned}$$

such that \(\omega q^{*}=\xi \), for \(\xi \) as in (29).

Proof

We have a commuting diagram

(64)

in which the vertical maps are weak equivalences by Sect. 5.1. Applying \(\pi _{1}\) yields

(65)

with vertical isomorphisms. By Lemma 5.1,

$$\begin{aligned} \begin{aligned} \pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}({\text {d}} X_{0}, j^{*} M)\cong&{\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}} (({\text {d}} X_{0}\xrightarrow {{\text {Id}}}{\text {d}} X_{0}),\ (j_{1}^{*} M_{1}\xrightarrow {\lambda _{1}}{\text {d}} X_{0})) \\ \pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/d \pi _{0}}(d \pi _{0}, t^{*} j^{*} M)\cong&{\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/\pi _{0}}(\pi _{0},t^{*} j_{1}^{*} M_{1}), \\ \pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}({\text {d}} X_{0}, e^{*} j^{*} M)\cong&{\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}}(X_{0}, q^{*}t^{*} j_{1}^{*} M_{1}). \end{aligned} \end{aligned}$$

Hence from (65) we obtain

The right vertical map \(\chi \) in (65) sends \({\bar{f}}:X_{0} \rightarrow j_{1}^{*} M_{1}\) to \({\bar{f}} e:X_{0} \rightarrow e^{*} j_{1}^{*} M_{1}\), where \({\bar{f}}\) is given by \({\text {Id}}\top f\) into the pullback (15) defining \(j^{*}M_{1}\). We now rewrite

$$\begin{aligned}&\chi : {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}} ((X_{0}\!\xrightarrow {{\text {Id}}}\!X_{0}),(j_{1}^{*} M_{1}\rightarrow X_{0}))\\&\quad \rightarrow {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}} ((X_{0}\!\xrightarrow {e_{0}}\!X_{0}),(e^{*} j^{*} M\xrightarrow {\lambda _{1}}X_{0})) \end{aligned}$$

in a different form, in order to show that it is an isomorphism. Note that the map of groupoids \(\rho =(\rho _{1},{\text {Id}}):M\rightarrow X\) satisfies \(\rho _{1}(m)=(\partial _{0}(m),\partial _{1}(m))\) for all \(m\in M_{1}\), where Thus the map \({\bar{f}}={\text {Id}}\top f\) into (15) has \(\rho _{1} f=j=\varDelta _{X_{0}}\) so \(\rho f(a)=(a,a)=(\partial _{0} f(a),\partial _{1} f(a))\), and thus f takes \(X_{0}\) to \(\coprod \nolimits _{a\in X_{0}}^{}M(a,a)\). Similarly, a map \(\bar{g}:X_{0}\rightarrow e^{*} j^{*}M_{1} \) into the pullback defining \(e^{*} j^{*}M_{1} \) is given by \(g\top e_{0}:X_{0}\rightarrow M_{1}\times X_{0}\) with \(\varDelta _{X_{0}}e_{0}e_{0}=\varDelta _{X_{0}}e_{0}=\rho _{1} g\), so \(g:X_{0} \rightarrow \coprod \nolimits _{a\in X_{0}}^{}M(tqa,tqa)\). For each \(a\in X_{0}\) there is an isomorphism \(\omega : M(a,a) \rightarrow M(tqa,tqa)\) taking \(m\in M(a,a)\) to \(\sigma (tqa,a)\circ m \circ \sigma (a,tqa)\), whose inverse \(\omega ^{-1}: M(tqa,tqa) \rightarrow M(a,a)\) takes \(m'\) to \(\sigma (a,tqa)\circ m' \circ \sigma (tqa,a)\).

Given \(f:X_{0} \rightarrow \coprod \nolimits _{a}^{}M(a,a)\), there is a commuting diagram

so that \(\chi ({\bar{f}})=(e_{0},f e_{0})=(e_{0},\omega f)\). Thus \(\chi \) is an isomorphism with inverse given by \(\chi ^{-1}(g)=({\text {Id}},\omega ^{-1}g)\).

Finally, the isomorphism

$$\begin{aligned} \omega :\! {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}} (({\text {Id}}_{X_{0}}),\,(q^{*} t^{*} j_{1}^{*} M_{1}\xrightarrow {\lambda ''_{1}}X_{0}))\!\rightarrow \! {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}} ((tq),\,(j_{1}^{*} \!M_{1}\xrightarrow {\lambda _{1}}X_{0})) \end{aligned}$$

sends h to \(\omega (h)=l_{1} v_{1} h\), where the maps \(l_{1}\) and \(v_{1}\) are given by

(66)

Define \(f'\) in \({\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}}((X_{0}\xrightarrow {tq}X_{0}),\ (j^{*} M\xrightarrow {\lambda _{1}}X_{0}))\) by \(tq\top f\) into the pullback (15). Thus \(\rho _{1} f=\varDelta _{X_{0}}tq\), which also implies \(\rho _{1} f=\varDelta _{X_{0}}(tq)(tq)\). It follows that there is a map \(f''\) making the following diagram commute

We claim that \(f'=l_{1} v_{1} f''=\omega (f'')\). In fact, \(k_{1} f'=f=k_{1} l_{1} v_{1} f''\), while by (66) we have \(\lambda _{1} f'=tq=tq\,tq=tq\lambda ''_{1} f''=t\lambda '_{1} v_{1} f''= \lambda _{1} l_{1} v_{1} f''\). Together these imply that \(f'=l_{1} v_{1} f''\), as claimed. Thus \(\omega \) is surjective.

Assume given \(h,g\in {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}}(X_{0},\, q^{*} t^{*} j_{1}^{*} M_{1})\) with \(\omega (h)=\omega (g)\), (i.e., \(l_{1} v_{1} h=l_{1} v_{1} g\)). Then \(k_{1} l_{1} v_{1} h=k_{1} l_{1} v_{1} g\) and \(\lambda ''_{1} h=tq = \lambda ''_{1} g\), so \(h=g\). This shows that \(\omega \) is injective, and thus an isomorphism.

To see that \(\omega q^{*}=\xi \), Let \(h\in {\text {Hom}}_{{{\mathsf {Cat}_{\mathcal {O}}}}/X_{0}}(\pi _{0}, t^{*} j_{1}^{*} M_{1})\) be given by \(f\top {\text {Id}}:\pi _{0}\rightarrow M_{1}\times \pi _{0}\) in the pullback (27). Then \(k_{1} l_{1} h=f\) and \(\lambda '_{1} h={\text {Id}}\), and so \(\rho _{1} fq = \rho _{1} k_{1} l_{1} h q=\varDelta _{X_{0}} t \lambda '_{1} h q=\varDelta _{X_{0}}tq=\varDelta _{X_{0}}(tq)(tq)\). Hence there is a map \(h'\) making

commute, and \(h'=q^{*}h\), so that \(\omega (q^{*}h)=\omega (h')=l_{1} v_{1} h'\). Moreover, \(k_{1} l_{1} v_{1} h'=fq=k_{1} l_{1} h q\) and

$$\begin{aligned} \varDelta _{X_{0}} t \lambda '_{1} v_{1} h' = \varDelta _{X_{0}} \lambda _{1} l_{1} v_{1} h' = \rho _{1} k_{1} l_{1} v_{1} h' = \rho _{1} f q= \varDelta _{X_{0}}tq\,tq=\varDelta _{X_{0}}tq \end{aligned}$$

so \(\lambda '_{1} v_{1} h' =q \varDelta _{X_{0}}t \lambda '_{1} v_{1} h'= q\varDelta _{X_{0}}tq=q=\lambda '_{1} h q\), since \(q\varDelta _{X_{0}}t={\text {Id}}\) and \(\lambda '_{1} h={\text {Id}}\). This implies that \(v_{1} h' = h q\). We deduce that \(\omega q^{*}(h)=l_{1} h q=\xi (h)\), so \(\omega q^{*}=\xi \). \(\square \)

Proposition 5.3

For any \(X=HY\) as in (9) and X-module M, there is a short exact sequence

$$\begin{aligned} \begin{aligned} 0\rightarrow \pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,M)&\xrightarrow {j^{*}} \pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}(dX_{0},j^{*} M)\\&\xrightarrow {\vartheta '} {\text {Hom}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(X,M)\rightarrow 0 \end{aligned} \end{aligned}$$
(67)

Proof

This follows by taking \(\mathcal {C}={\mathsf {Cat}_{\mathcal {O}}}\) in Proposition 3.5, together with (39) and the top right corner of (63) identified with \(\pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}(dX_{0},j^{*} M)\). \(\square \)

Let \(X\in {\mathsf {Track}_{\mathcal {O}}}\) and \(M\in [({\mathsf {Track}_{\mathcal {O}}},X_{0})/X]_{{\text {ab}}}\) and

$$\begin{aligned} {\bar{I}} \mathcal {K}_{\bullet } X\in [\varDelta ^{{}^{{\text {op}}}},({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,/IX] \end{aligned}$$

be as in Sect. 4.3. Note that the augmentation \(\varepsilon :\mathcal {K}_{\bullet } X\rightarrow X\) can be thought of as a map to the constant simplicial object, so a compatible sequence of maps \(\varepsilon _{n}:\mathcal {K}_{n} X\rightarrow X\) in \({\mathsf {Track}_{\mathcal {O}}}\) allowing us to pull back M to \(\varepsilon ^{*}_{n} M\).

Definition 5.4

For each \(X\in {\mathsf {Track}_{\mathcal {O}}}\) and \(M\in [({\mathsf {Track}_{\mathcal {O}}},X_{0})/X]_{{\text {ab}}}\), the comonad cohomology of X with coefficients in M is defined by

$$\begin{aligned} H^{s}_{{\text {C}}}(X,M)=\pi ^{s} {\text {Hom}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(\mathcal {K}_{\bullet }X,M). \end{aligned}$$

Theorem 5.5

Assume given \(X\in {\mathsf {Track}_{\mathcal {O}}}\) and \(M\in [({\mathsf {Track}_{\mathcal {O}}},X_{0})/X]_{{\text {ab}}}\). Then there is a long exact sequence of abelian groups

$$\begin{aligned} \begin{aligned} \cdots \rightarrow H^{n}_{{\text {SO}}}({I X};{M})\rightarrow&H^{n}_{{\text {SO}}}({I {\text {d}} X_{0}};{j^{*} M})\rightarrow H^{n}_{{\text {C}}}(X,M)\rightarrow \\&\rightarrow H^{n+1}_{{\text {SO}}}({I X};{M})\rightarrow \cdots \end{aligned} \end{aligned}$$

Proof

By Remark 4.4. \(\mathcal {K}_{n}X\) is homotopically discrete for each n, and we can choose a splitting \(\varPi _{0}\mathcal {K}_{n} X\xrightarrow {t_{n}}\mathcal {K}_{n} X\) to \(\mathcal {K}_{n} X\xrightarrow {q_{n}}\varPi _{0}\mathcal {K}_{n} X\), because \(\mathcal {K}_{n} X=LA\) with \(A=FUV X_{n-1}\) and \(q_{n}:A_{s}\textstyle {\,\coprod \,}A_{t} \rightarrow A\) (see Sect. 2.2). By Proposition 5.3 there is a short exact sequence of cosimplicial abelian groups

$$\begin{aligned} \begin{aligned} 0\rightarrow&\pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(I\mathcal {K}_{\bullet }X,M)\xrightarrow {j^{*}}\pi _{1} {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/dX_{0}}(I\!{\text {d}}\,(\mathcal {K}_{\bullet }X)_{0},j^{*} M)\rightarrow \\&\rightarrow {\text {Hom}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(\mathcal {K}_\bullet X,M)\rightarrow 0 \end{aligned} \end{aligned}$$

where we use the augmentation \(\varepsilon _\bullet :\mathcal {K}_\bullet X\rightarrow X\) to pull back M to \(\varepsilon _\bullet M\).

We therefore obtain a corresponding long exact sequence

$$\begin{aligned} \begin{aligned} \rightarrow \pi ^{s}\pi _{1}{\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(\mathcal {K}_{\bullet }X,M)&\xrightarrow {j_{*}} \pi ^{s}\pi _{1} {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/dX_{0}}({\text {d}}\,(\mathcal {K}_{\bullet }X)_{0},j^{*} M)\rightarrow \\&\rightarrow \pi ^{s}{\text {Hom}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(\mathcal {K}_\bullet X,M)\rightarrow \cdots . \end{aligned} \end{aligned}$$

By definition, \(\pi ^{s} {\text {Hom}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}(\mathcal {K}_\bullet X,M)=H^{s}_C(X,M)\), with

$$\begin{aligned} \pi ^{s}\pi _{1} {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/X}({\bar{I}}\mathcal {K}_{\bullet }X,M)= H^{s}_{{\text {SO}}}({I X};{M}) \end{aligned}$$

and \(\pi ^{s}\pi _{1} {\text {map}}_{{{\mathsf {Track}_{\mathcal {O}}}}/{\text {d}} X_{0}}({\text {d}}\,(\mathcal {K}_\bullet X)_{0},j^{*} M)=H^{s}_{{\text {SO}}}({I\!{\text {d}} X_{0}};{j^{*} M})\) by Theorem 4.9 and Corollary 4.10. \(\square \)

Corollary 5.6

For \(X\in {\mathsf {Track}_{\mathcal {O}}}\) with \(X_{0}\) a free category and \(M\in [({\mathsf {Track}_{\mathcal {O}}},X_{0})/X]_{{\text {ab}}}\)

$$\begin{aligned} H^{n+1}_{{\text {SO}}}({IX};{M})\cong H^{n}_{{\text {C}}}(X,M) \end{aligned}$$
(68)

for each \(n\ge 1\).

Proof

Recall from [2, Theorem 3.10] that \( H^{n}_{{\text {SO}}}({I\!{\text {d}} X_{0}};{j^{*}M})\cong H_{{\text {BW}}}^{n+1}(I X_{0},j^{*} M)\), and, since \(X_{0}\) is free, \(H_{{\text {BW}}}^{n+1}(IX_{0},j^{*}M)=0\) by [3, Theorem 6.3]. Thus the long exact sequence of Theorem 5.5 yields (68) for each \(n\ge 1\). \(\square \)

Lemma 5.7

There is a functor \(S:{\mathsf {Track}_{\mathcal {O}}}\rightarrow {\mathsf {Track}_{\mathcal {O}}}\) such that \((s_X)_{0}\) is a free category, for each \(X\in {\mathsf {Track}_{\mathcal {O}}}\), with a natural 2-equivalence \(s_X:S(X)\rightarrow X\)

Proof

Given \(X\in \mathsf {Gpd}\;\mathcal {C}\) and a map \(f_{0}:Y_{0}\rightarrow X_{0}\) in \(\mathcal {C}\), consider the pullback

(69)

in \(\mathcal {C}\). Then there is \(X(f_{0})\in \mathsf {Gpd}\,\mathcal {C}\) with \((X(f_{0}))_{0}=Y_{0}\) and \(X(f_{0}))_{1}=Y_{1}\), such that \((f_{0},f_{1}):X(f_{0})\rightarrow X\) is an internal functor.

Now let \(\varepsilon _{X_{0}}:FV X_{0} \rightarrow X_{0}\) be the counit of the adjunction \(F\dashv V\) of Sect. 4.2, and let \(SX:=X(\varepsilon _{X_{0}})\), where \((\varepsilon _{X_{0}})\in {\mathsf {Track}_{\mathcal {O}}}\) is the construction (69). Then \((SX)_{0}=FVX_{0}\) is a free category, and there is a map \(s_X:SX\rightarrow X\) in \({\mathsf {Track}_{\mathcal {O}}}\). We wish to show that it is a 2-equivalence.

Since \(s_X\) is the identity on objects, to it suffices to show that for each \(a,b\in \mathcal {O}\), the map \(s_X(a,b):S(X)(a,b)\rightarrow X(a,b)\) is an equivalence of categories. The pullback

(70)

in \(\mathsf {Cat}\,\) induces a pullback of sets

Thus for each \((c,d)\in \{FVX_{0}(a,b)\times FVX_{0}(a,b)\}_{1}\), the map \(\{s_X(a,b)\}(c,d)\) is a bijection. Thus \(s_X(a,b)\) is fully faithful. Since \((FVX_{0})_{1}\rightarrow X_{01}\) is surjective, as is \((FVX_{0})(a,b)\rightarrow X_{0}(a,b)\), \(s_X(a,b)\) is surjective on objects, so it is an equivalence of categories. \(\square \)

We finally use our previous results to conclude that the \(({\mathcal {S}}\!,\!\mathcal {O})\)-cohomology of a track category can always be calculated from a comonad cohomology.

Corollary 5.8

For \(X\in {\mathsf {Track}_{\mathcal {O}}}\), and M an X-module, \(H^{n+1}_{{\text {SO}}}({IX};{M})\cong H^{n}_C(S(X),M)\) for each \(n>1\), where S(X) is as in Lemma 5.7.

Proof

By Lemma 5.7 the map \(s_X:S(X)\rightarrow X\) is a 2-equivalence in \({\mathsf {Track}_{\mathcal {O}}}\), since \((s_X)_{0}=\varepsilon _{X_{0}}\) is bijective on objects. Hence \(Is_X\) is a Dwyer–Kan equivalence in \(({\mathcal {S}}\!,\!\mathcal {O})\text {-}\mathsf {Cat}\,\), so \(H^{n}_{{\text {SO}}}({IX};{M})\cong H^{n}_{{\text {SO}}}({IS(X)};{M})\). By Lemma 5.7, \(SX\) satisfies the hypotheses of Corollary 5.6, so also \(H^{n+1}_{{\text {SO}}}({IS(X)};{M})\cong H^{n}_{{\text {C}}}(S(X),M)\). \(\square \)

6 The groupoidal case

A 2-groupoid is a special case of a track category in which all cells are (strictly) invertible. The category of such is denoted by \(2\text {-}\mathsf {Gpd}_{\mathcal {O}}=\mathsf {Gpd}(\mathsf {Gpd}_{\mathcal {O}})\), with \(i:2\text {-}\mathsf {Gpd}_{\mathcal {O}}\hookrightarrow {\mathsf {Track}_{\mathcal {O}}}\) the full and faithful inclusion.

For \(X\in 2\text {-}\mathsf {Gpd}_{\mathcal {O}}\) and \(W=\overline{N}\,\overline{I}\mathcal {K}_\bullet X\in [\varDelta ^{{3}^{{\text {op}}}},\mathsf {Set}]\) as in Sect. 4.3, let \(S=W^{(1)}\in [\varDelta ^{{}^{{\text {op}}}},[\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]]\) be W thought of as a simplicial object along the horizontal direction. Thus for each \(i\ge 0\), \(S_i\) is the bisimplicial set

Applying \({\text {Diag}}:[\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]\rightarrow [\varDelta ^{{}^{{\text {op}}}},\mathsf {Set}]=\mathcal {S}\) dimensionwise to \(W^{(1)}\) we obtain \(\overline{{\text {Diag}}}S\in [\varDelta ^{{}^{{\text {op}}}},[\varDelta ^{{}^{{\text {op}}}},\mathsf {Set}]]\), with

$$\begin{aligned} {\text {Diag}}\!^{(3)}W={\text {Diag}}\overline{{\text {Diag}}}S={\text {Diag}}\overline{{\text {Diag}}}Z \end{aligned}$$
(71)

for \(Z:=W^{(2)}\in [\varDelta ^{{}^{{\text {op}}}},[\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]]\) as in (45).

Definition 6.1

The classifying space of \(X\in 2\text {-}\mathsf {Gpd}_{\mathcal {O}}\) is \(BX={\text {Diag}}N_{(2)}X\), where \(N_{(2)}:2\text {-}\mathsf {Gpd}_{\mathcal {O}}\rightarrow [\varDelta ^{{2}^{{\text {op}}}},\mathsf {Set}]\) is the double nerve functor.

Remark 6.2

By Lemma 4.5, \(\overline{{\text {Diag}}}Z\rightarrow IX\) is a Dwyer–Kan equivalence, where we think of \(\overline{{\text {Diag}}}Z\) as an \(({\mathcal {S}}\!,\!\mathcal {O})\)-category by the discussion preceding the Lemma 4.5. Conversely, we may also think of \(IX\) as a bisimplicial set (implicitly, by applying the nerve functor in the category direction), with \((\overline{{\text {Diag}}}Z)_{0}=(IX)_{0}=c(\mathcal {O})\) (cf. Sect. 1.1). Moreover, \((\overline{{\text {Diag}}}Z)_{j}\rightarrow (IX)_{j}\) is a weak homotopy equivalence for all \(j\ge 0\). Hence \(\overline{{\text {Diag}}}Z\rightarrow IX\) induces a weak homotopy equivalence of diagonals \({\text {Diag}}\overline{{\text {Diag}}}Z\simeq {\text {Diag}}IX\). Since \({\text {Diag}}IX={\text {Diag}}N_{(2)}X=BX\), by (71) we have

$$\begin{aligned} BX\simeq {\text {Diag}}\!^{(3)}W. \end{aligned}$$
(72)

The cohomology groups of \(X\in 2\text {-}\mathsf {Gpd}_{\mathcal {O}}\) with coefficients in an X-module M are defined to be \(H^{n-t}(BX,M)=\pi _{t}{\text {map}}_{[\varDelta ^{{}^{{\text {op}}}},{\mathsf {Set}}]}(BX,\mathcal {K}(M,n))\). By (72) this can be written as

$$\begin{aligned} \pi _{t} {\text {map}}_{[\varDelta ^{{}^{{\text {op}}}},{\mathsf {Set}}]}({\text {Diag}}\!^{(3)}W,\mathcal {K}(M,n)){.} \end{aligned}$$

Lemma 6.3

Given \(\mathcal {C}\in {\mathsf {Cat}_{\mathcal {O}}}\), with \(N\mathcal {C}\in \mathcal {S}\) viewed as a discrete \(({\mathcal {S}}\!,\!\mathcal {O})\)-category, and M be a \(\mathcal {C}\)-module, we have \(H^{n}(B\mathcal {C},M)\cong H^{n}_{{\text {SO}}}({N\mathcal {C}};{M})\) for each \(n\ge 0\).

Proof

Since \(N\mathcal {C}\) is a discrete \(({\mathcal {S}}\!,\!\mathcal {O})\)-category, we see that \({\text {map}}_{{({\mathcal {S}}\!,\!\mathcal {O})}\text {-}\mathsf {Cat}\,}(N\mathcal {C},\mathcal {K}(M,n))\), is \({\text {map}}_{\mathcal {S}}(N\mathcal {C},\mathcal {K}(M,n))\), so \(H^{n}_{{\text {SO}}}({\mathcal {C}};{M})= \pi _{0} {\text {map}}_{\mathcal {S}}(N\mathcal {C},\mathcal {K}(M,n))=H^{n}(B\mathcal {C},M)\). \(\square \)

Proposition 6.4

For \(X\in 2\text {-}\mathsf {Gpd}_{\mathcal {O}}\) and M an X-module, \(H^{s}(BX,M)=H^{s}_{{\text {SO}}}({X};{M})\) for any \(s\ge 0\)

Proof

By (71) and Lemma 2.6

$$\begin{aligned} \begin{aligned} {\text {map}}_{\mathcal {S}}({\text {Diag}}\!^{(3)}W,\mathcal {K}(M,n))&={\text {map}}_{\mathcal {S}}({\text {Diag}}\overline{{\text {Diag}}}S,\mathcal {K}(M,n))\\&\cong {\text {Tot}}\,{\text {map}}_{\mathcal {S}}(\overline{{\text {Diag}}}S,\mathcal {K}(M,n)). \end{aligned} \end{aligned}$$

Therefore, the homotopy spectral sequence for \(W^{\bullet }={\text {map}}_{{[\varDelta ^{{}^{{\text {op}}}},\mathsf {Set}]}}(\overline{{\text {Diag}}}S,\mathcal {K}(M,n))\), with \(E^{s,t}_{2}=\pi ^{s}\pi _{t} W^{\bullet } \Rightarrow \pi _{t-s}{\text {Tot}}W^{\bullet }\), has \(E^{s,t}_{1} = \pi _{t} {\text {map}}((\overline{{\text {Diag}}}S)_{s},\mathcal {K}(M,n))\). But \((\overline{{\text {Diag}}}S)_{s}={\text {Diag}}I\mathcal {K}^{s+1}X\simeq I\varPi _{0}\mathcal {K}^{s+1}X\), since \(\mathcal {K}^{s+1}X\) is homotopically discrete, so

$$\begin{aligned} E^{s,t}_{1}= H^{n-t}(BI\varPi _{0}\mathcal {K}^{s+1}X,M)=H^{n-t}_{{\text {SO}}}({I\varPi _{0}\mathcal {K}^{s+1}X};{M}), \end{aligned}$$

by Lemma 6.3. Since \(\mathcal {K}^{s+1}X\) is free, by [2, Theorem 3.10] we have

$$\begin{aligned} E^{s,t}_{1}=H^{n-t}_{{\text {SO}}}({I\varPi _{0}\mathcal {K}^{s+1}X};{M})=H^{n-t+1}_{{\text {BW}}}(I\varPi _{0}\mathcal {K}^{s+1}X,M)=0 \end{aligned}$$

for \(n\ne t\). Thus the spectral sequence collapses at the \(E_{1}\)-term and

$$\begin{aligned} H^{s}(BX,M)=\pi _{n-s}{\text {Tot}}W^{\bullet }=\pi ^{s}\pi _{n} W^{\bullet } =\pi ^{s}\pi _{n}{\text {map}}_{\mathcal {S}}(\overline{{\text {Diag}}}S,\mathcal {K}(M,n)). \end{aligned}$$
(73)

Since \((\overline{{\text {Diag}}}S)_{s}\rightarrow I\varPi _{0}\mathcal {K}^{s+1}X\) is a weak equivalence for all \(s\ge 0\),

$$\begin{aligned} \pi _{n}{\text {map}}_{{[\varDelta ^{{}^{{\text {op}}}},\mathsf {Set}]}}(\overline{{\text {Diag}}}S,\mathcal {K}(M,n))= H^{0}(B\,\overline{{\text {Diag}}}S,M)\cong H^{0}(B\,I\, \varPi _{0}\mathcal {K}_{\bullet }X,M) \end{aligned}$$

Thus \(H^{s}(BX,M)=\pi ^{s} H^{0}(B\,I\, \varPi _{0}\mathcal {K}_{\bullet } X,M)\) by (73). On the other hand, in the proof of Theorem 4.9 we showed that \(H^{s}_{{\text {SO}}}({X};{M})=\pi ^{s} H^{0}_{{\text {SO}}}({I\, \varPi _{0}\mathcal {K}_{\bullet } X};{M})\), while by Lemma 6.3 we have \(H^{0}(B\,\varPi _{0}\mathcal {K}_{\bullet } X,M)=H^{0}_{{\text {SO}}}({I\,\varPi _{0}\mathcal {K}_{\bullet }X};{M})\). It follows that \(H^{s}(BX,M)=H^{s}_{{\text {SO}}}({X};{M})\). \(\square \)

From Theorem 5.5 and Proposition 6.4 we deduce:

Corollary 6.5

Any \(X\in 2\text {-}\mathsf {Gpd}_{\mathcal {O}}\) and X-module M have a long exact sequence

$$\begin{aligned} \rightarrow H^{n}(BX,M)\rightarrow H^{n}(BX_{0},j^{*} M)\rightarrow H^{n}_C(X,M)\rightarrow H^{n+1}(BX,M)\rightarrow \cdots . \end{aligned}$$

Remark 6.6

A 2-groupoid with a single object is an internal groupoid in the category of groups, equivalent to a crossed module. It can be shown that in this case the long exact sequence of Corollary 6.5 recovers [16, Theorem 13].