# Twisted simplicial distributions

Cihan<EMAIL_ADDRESS>Department of Mathematics, Bilkent
University, Ankara, Turkey Walker H<EMAIL_ADDRESS>Department of Mathematics, Bilkent University, Ankara, Turkey

###### Abstract

We introduce a theory of twisted simplicial distributions on simplicial
principal bundles, which allow us to capture Bell’s non-locality, and the more
general notion of quantum contextuality. We leverage the classical theory of
simplicial principal bundles, as well as structures on categories of such
bundles, to provide powerful computational tools for analyzing twisted
distributions in terms of both direct constructions in simplicial sets and
techniques from homological algebra. We use these techniques to analyze our
key examples: quantum distributions and operator-theoretic polytopes used in
the classical simulation of quantum computation.

###### Contents

  1. 1 Introduction
  2. 2 Simplicial principal bundles
    1. 2.1 Preliminaries
    2. 2.2 Simplicial principal bundles
    3. 2.3 The theory for a simplicial Abelian group
    4. 2.4 The case of an Abelian group
    5. 2.5 The tensor product of principal bundles
  3. 3 Twisted distributions
    1. 3.1 The category of $K$-bundle scenarios
    2. 3.2 The colimit decomposition
    3. 3.3 The polytope of twisted distributions
    4. 3.4 The convolution product
    5. 3.5 Equivariant distributions
  4. 4 Contextuality
    1. 4.1 Twisting and collapsing
    2. 4.2 The Mermin polytope
  5. A Monoidal categories and functors
  6. B Colimits and finite simplicial sets
  7. C Relative coskeletalness
  8. D Proofs by simplicial computations

##  1 Introduction

Bell’s notion of non-locality and its generalization quantum contextuality are
fundamental features of quantum theory [Bel64, KS67]. In [OKI23], the first
author introduced a new, simplicial approach for contextuality based on
simplicial distributions. This approach subsumes two earlier prominent
approaches: the sheaf-theoretic approach of Abramsky–Brandenburger [AB11] and
the cohomological approach of Okay et al. [ORBR17]. The theory of simplicial
distributions combines the sheaf-theoretic and cohomological approaches by
modeling measurements and their outcomes as simplicial sets. One novel feature
of the theory is that contextuality proofs can be done using arguments that
rely on topological intuition, such as gluing and extending distributions
[KIO23]. In this framework, contextuality can be characterized using homotopy
[KO23], and categorical methods can be easily applied [BKO23].

In this work, we introduce simplicial distributions that are “twisted” by
local algebraic constraints — a notion that has immediate applications to
studying naturally appearing twisted quantum probabilities. Our framework is
based on the theory of principal bundles from simplicial homotopy theory. The
simplicial theory is analogous to the topological theory, _but is in some ways
more computationally tractable_. It is also of interest to note that the
general simplicial principal bundles which appear in our work are also of
interest elsewhere in mathematical physics, as they provide explicit models of
principal $\infty$-bundles [NSS15]. Some of the many applications of principal
$\infty$-bundles to mathematical physics, particularly string theory, are
surveyed in [Bun23].

The theory of simplicial distributions introduced in [OKI23] models
contextuality by representing the measurements and outcomes of an experimental
setting by simplicial sets. A simplicial distribution is a simplicial set map

$p:X\to D(Y).$

Here, $D$ denotes the distribution monad [Jac10], which also lifts to the
category of simplicial sets [KO22]. Explicitly, an $n$-simplex of $D(Y)$ is
simply a probability distribution on $Y_{n}$. In effect, a simplicial
distribution is a collection of distributions $\\{p_{x}\in D(Y_{n}):x\in
X_{n}\\}_{n\geq 0}$ compatible under the simplicial structure maps. This
compatibility condition can be seen as a topological version of the physical
non-signaling conditions.

Twisted distributions are defined on principle $K$-bundles for a simplicial
group $K$. We will model principal bundles using twisted products. A twisting
$\eta$ consists of a collection of functions $\\{\eta_{n}:X_{n}\to
K_{n-1}\\}_{n\geq 0}$. The twisted product $K\times_{\eta}X$ has the same set
of simplices as the Cartesian product $K\times X$, and the simplicial
structure maps are the same, except that the $d_{0}$-face is twisted by
$\eta$. A typical case of interest is when $K$ is the nerve space $NH$ of an
Abelian group, in which case the twisting is completely determined by a
$2$-cocycle $\gamma:X_{2}\to H$. In dimension $2$ the twisting at the
$d_{0}$-face is given by

$d_{{0}}(h_{1},h_{2};x)=(h_{2}+\gamma(x),d_{0}(x)).$

Projecting a twisted product gives a principal bundle, denoted by
$\pi:K\times_{\eta}X\to X$. Following the interpretation in [BKO23], the base
space $X$ represents the space of measurements as before and the fiber
$x^{*}(E)$ over a simplex $x:\Delta^{n}\to X$ represents the space of outcomes
for the measurement $x$. A twisted simplicial distribution on $\pi$ is a
simplicial set map $p:X\to D(E)$ making the following diagram commute:

${D(E)}$${X}$${D(X)}$$\scriptstyle{D(\pi)}$$\scriptstyle{p}$$\scriptstyle{\delta}$

where $\delta:X\to D(X)$ sends a simplex to the delta-distribution on that
simplex. More explicitly, a twisted simplicial distribution $p$ consists of a
family of distributions $\\{p_{x}\in D(K_{n}):\,x\in X_{n}\\}_{n\geq 0}$
compatible with the face maps. In dimension $2$, the $d_{0}$-face will be
twisted as described above. To work out the effect of the twisting for higher
dimensions, we provide an explicit formula in Lemma 2.25. Writing
$\operatorname{sDist}_{\eta}(X)$ for the set of $\eta$-twisted distributions,
we show in Corollary 3.9 that this set has the structure of a convex polytope
with finitely many vertices under a mild finiteness condition on the
measurement space. Twisted distributions for higher dimensions and the
corresponding vertex enumeration problem are unexplored territory, including
quantum mechanical distributions and polytopes used in the classical
simulation of quantum computation. Key examples include, for instance, the
$\Lambda$ polytopes of [ZOR20] and the toy example [OCI23] studied in Section
4.2.

Principal bundles over $X$ with fiber $K$ can be assembled into a groupoid
$\mathsf{Bun}_{K}(X)$ whose morphisms are given by isomorphisms of bundles.
Moreover, given two bundles $E$ and $F$, there is a tensor product
$E\otimes_{K}F$, which equips the category with the structure of a symmetric
monoidal groupoid (Theorem 2.30). Moreover, this groupoid is a commutative
$2$-group, which means that every principal bundle has an inverse up to
isomorphism under the tensor product. For twisted products the inverse of
$K\times_{\eta}X$ is given by $K\times_{\eta^{-1}}X$. Using the tensor
product, we can define a convolution product of twisted distributions that
takes two distributions $p$ and $q$ on the bundles and produces a distribution
$p\ast q$ on their tensor product. The functor
$\operatorname{sDist}:\mathsf{Bun}_{K}(X)\to\mathsf{Set}$ which sends a
principal $K$-bundle to its set of simplicial distributions is lax symmetric
monoidal with respect to the tensor product of bundles and Cartesian product
of sets (Proposition 3.11). Then, a monoidal version of the Grothendieck
construction [MV20, HS] produces a symmetric monoidal category

$\int_{\mathsf{Bun}_{K}(X)}\operatorname{sDist}$

whose objects are twisted simplicial distributions on bundles with the
monoidal structure given by the convolution product (Corollary 3.12). In the
rest of the paper we heavily rely on the categorical structures identified on
bundles and distributions defined on them.

Our first key result is the identification of twisted distributions as
equivariant simplicial distributions (Theorem 3.25). We consider a measurement
space $X$ and an outcome space $Y$ both equipped with a $K$-action. Then
$D(Y)$ also inherits a $K$-action given by the convolution product. The set
$\operatorname{sDist}_{K}(X,Y)$ of $K$-equivariant simplicial distributions
consists of simplicial set maps $X\to D(Y)$ that are $K$-equivariant.

######  Theorem.

There is a convex bijection

$\operatorname{sDist}_{\eta}(X)\cong\operatorname{sDist}_{K}(K\times_{\eta^{-1}}X,K).$

The main examples of twisted distributions come from quantum distributions.
There is a quantum version of the probability monad where the semiring
$\mathbb{R}_{\geq 0}$ is replaced by projectors
$\operatorname{Proj}(\mathcal{H})$ on a finite-dimensional Hilbert space
$\mathcal{H}$. A projective measurement on a set $X$ is given by a function
$\Pi:X\to\operatorname{Proj}(\mathcal{H})$ with finite support that sums to
the identity operator. The Born rule of quantum theory provides a way to
extract probabilities from a projective measurement. In effect, this allows us
to represent quantum states as simplicial distributions
$P_{\mathcal{H}}(N\mathbb{Z}_{d})\to D(N\mathbb{Z}_{d})$ that are equivariant
with respect to a natural $N\mathbb{Z}_{d}$ action. Then, using the theorem
above, we can regard these equivariant distributions as twisted simplicial
distributions on a suitable quotient of $P_{\mathcal{H}}(N\mathbb{Z}_{d})$.

We introduce the notion of contextuality for twisted distributions in Section
4 following the bundle perspective of [BKO23]. A deterministic simplicial
distribution is of the form of a delta distribution peaked at a section of the
bundle. Non-contextual distributions are those that can be expressed as a
probabilistic mixture of deterministic distributions. Those that cannot are
called contextual. Therefore, this definition of contextuality is useful only
in the untwisted case, that is when the principal bundle is trivial. To remedy
this, we introduce a relative version of contextuality associated to a
trivializing morphism $U\to X$, i.e., a morphism such that the pullback of the
bundle along it is trivial. We discuss natural examples of such morphisms.
Twisting can be used as an effective tool to simplify the measurement space
for studying contextuality. More precisely, we have a “twist and collapse”
result (Theorem 4.5) with respect to a simplicial subset $i:Z\to X$. Let
$\varphi_{0}$ denote the zero section of the projection $K\times Z\to Z$.
Consider the set $\operatorname{sDist}_{\eta}(X,0)$ of simplicial
distributions that restrict to the delta distribution $\delta^{\varphi_{0}}$
on $Z$.

######  Theorem.

There is a convex isomorphism

$\operatorname{sDist}_{\eta}(X/Z)\cong\operatorname{sDist}_{\eta}(X,0).$

This result has important computational applications, mainly for the
computation of the vertices of the polytope of twisted distributions. In the
case of $2$-dimensional measurement spaces, such computations in the context
of non-signaling polytopes and their twisted versions, e.g., the Mermin
polytope, are provided in [Oka23].

The rest of the paper is organized as follows. In Section 2, we review the
classical theory of principal bundles of simplicial sets. We describe twisted
products in the case of an Abelian simplicial group in Section 2.3 and then
further specialize to the case where the simplicial group is the nerve of an
Abelian group in Section 2.4. Then, we turn to tensor products of principal
bundles and prove our main category-theoretic results. Twisted distributions,
the main objects of interest in this paper, are introduced and studied in
Section 3. The identification of twisted distributions with equivariant
distributions is proved in this section. As an application, quantum
distributions (Example 3.26) are realized as twisted distributions. The notion
of contextuality and its new relative variant are introduced in Section 4. Our
twisting and collapse theorem is proved in this section. As a concrete
example, we provide an in-depth analysis of the Mermin polytope in Section
4.2.

#### Acknowledgments.

This work is supported by the Air Force Office of Scientific Research under
award number FA9550-21-1-0002. The first author also acknowledges support from
the Digital Horizon Europe project FoQaCiA, GA no. 101070558.

##  2 Simplicial principal bundles

In this section, we will briefly recapitulate the theory of simplicial
principal bundles. In most cases the theory is wholly analogous to that of
principal bundles over a topological group, however, the details of
implementation often differ. We will attempt to make clear the parallels in
the general theory while presenting these details here. One important way in
which the presentation here differs from the original topological setting is
that we only consider _left_ actions, rather than the right actions more
common in the setting of topological principal bundles. In the Abelian setting
where much of our work will take place, this distinction evaporates, and so
the reader familiar with, e.g. [May67, §18] may safely read those later
sections without reference to these.

###  2.1 Preliminaries

Before embarking on our study of principal bundles, we briefly recall some of
the key definitions and notations from simplicial homotopy theory.

######  Definition 2.1.

The _simplex category_ $\Delta$ consists of

  * •

objects $[n]=\\{0,1,\cdots,n\\}$ where $n\geq 0$, and

  * •

morphism $\theta:[n]\to[m]$ given by order preserving functions, i.e.,
$\theta(i)\leq\theta(j)$ whenever $i\leq j$.

Given a category $\mathsf{C}$ a _simplicial object_ in this category is a
functor

${X:}$${\Delta^{\operatorname{op}}}$${\mathsf{C}.}$

The category $\mathsf{sC}$ of simplicial objects in $\mathsf{C}$ has morphisms
given by natural transformations. We will be primarily concerned with
simplicial sets, simplicial groups, and simplicial Abelian groups, that is,
the cases where $\mathsf{C}=\mathsf{Set}$, $\mathsf{C}=\mathsf{Grp}$, and
$\mathsf{C}=\mathsf{Ab}$, respectively. When working with simplicial _sets_ ,
we will use the notation $\Delta^{n}$ for the image of $[n]$ under the Yoneda
embedding, i.e., the functor
$\Delta(-,[n]):\Delta^{\operatorname{op}}\to\mathsf{Set}$. The simplicial sets
$\Delta^{n}$ are called the _standard $n$-simplices_. As a presheaf category,
the category of simplicial sets is complete and cocomplete, with limits and
colimits given pointwise.

######  Example 2.2.

Given a group $G$, we will denote by $NG$ the _nerve_ 333Using the usual
categorical definition of the nerve, this is the nerve of the one-object
groupoid $BG$. of the group $G$, which is the simplicial set with sets of
$n$-simplices given by

$NG_{n}=G^{n}.$

The face maps are given by

$d_{i}(a_{1},\cdots,a_{n})=\left\\{\begin{array}[]{ll}(a_{2},\cdots,a_{n})&i=0\\\
(a_{1},\cdots,a_{i}\cdot a_{i+1},\cdots,a_{n})&0<i<n\\\
(a_{1},\cdots,a_{n-1})&i=n\end{array}\right.$

and the degeneracy maps are given by

$s_{j}(a_{1},\cdots,a_{n})=(a_{1},\cdots,a_{{j}},1,a_{{j+1}},\cdots,a_{n}).$

Note that in the special case where $G$ is Abelian, the nerve $NG$ is a
simplicial Abelian group.

######  Definition 2.3.

Let $X$ and $Y$ be simplicial sets, and $f,g:X\to Y$ be maps of simplicial
sets. A _simplicial homotopy from $f$ to $g$_ from $f$ to $g$ is a morphism of
simplicial sets

${H:}$${X\times\Delta^{1}}$${Y}$

such that restricting $H$ to the simplicial subset $X\cong X\times\\{0\\}$
yields $f$, and restricting $H$ to the simplicial subset $X\cong
X\times\\{1\\}$ yields $g$. If there is a simplicial homotopy from $f$ to $g$,
we write $f\sim g$ and say that $f$ and $g$ are _(simplicially) homotopic_. We
denote the set of equivalence classes under simplicial homotopy by $[X,Y]$.

######  Remark 2.4.

One must be cautious when working with simplicial homotopy, as it is not, in
general, an equivalence relation on $\mathsf{sSet}(X,Y)$. In the case where
$Y$ is a so-called _Kan complex_ — for instance, the nerve of a group — this
difficulty evaporates. We will not define or discuss Kan complexes in this
work, however, some of the results from simplicial homotopy theory which we
cite will rest upon the fact that many of our constructions, most notably
$\overline{W}K$, are Kan complexes.

###  2.2 Simplicial principal bundles

Throughout this section, let $K$ denote a simplicial group, which may be
equivalently interpreted as a group object in $\mathsf{sSet}$, or as a
simplicial object in $\mathsf{Grp}$.

######  Definition 2.5.

Let $K$ be a simplicial group. A _$K$ -principal bundle_ is a simplicial set
$E$ equipped with a left444This is, as remarked above, the major difference
between this treatment and [May67]. We choose instead to follow the
conventions in [GJ09]. $K$-action $m$ which is _free_ , i.e., the diagram

${K\times
E}$${E}$${E}$${X}$$\scriptstyle{m}$$\scriptstyle{\operatorname{pr}_{2}}$$\scriptstyle{\pi}$$\scriptstyle{\pi}$

is pullback, where $\pi:E\to X$ is the quotient map. Note that this is
equivalent to each $E_{k}$ being a free $K_{k}$-set for every $k\geq 0$.

######  Definition 2.6.

A _morphism of principal $K$-bundles over $X$_ from $\pi_{E}:E\to X$ to
$\pi_{F}:F\to X$ is a $K$-equivariant map of simplicial sets $f:E\to F$ such
that the diagram

${E}$${F}$${X}$$\scriptstyle{\pi_{E}}$$\scriptstyle{f}$$\scriptstyle{\pi_{F}}$

commutes. It is immediate from the freeness of the action that every such
morphism is an isomorphism. We will denote by $\mathsf{Bun}_{K}(X)$ the
groupoid of principal $K$-bundles over $X$. We will write
$\operatorname{Prin}_{K}(X)=\pi_{0}(\mathsf{Bun}_{K}(X))$ for the set of
isomorphism classes of principal $K$-bundles over $X$.

As in the topological case, there are well-defined notions of classifying
spaces and universal bundles associated to simplicial groups. We will make
heavy use of one model for the universal bundle, denoted by
$WK\to\overline{W}K$, which we now recall.

######  Definition 2.7.

Let $WK$ be the simplicial set with

$WK_{n}:=K_{n}\times\cdots\times K_{0}$

with structure maps

$d_{i}(g_{n},\ldots,g_{0})=\begin{cases}(d_{i}g_{n},d_{i-1}g_{n-1},\ldots,(d_{0}g_{n-i})g_{n-i-1},g_{n-i-2},\ldots,g_{0})&i<n\\\
(d_{n}g_{n},\ldots,d_{1}g_{1})&i=n\end{cases}$

and

$s_{i}(g_{n},\ldots,g_{0})=(s_{i}g_{n},\ldots,s_{0}g_{n-i},1,g_{n-i-1},\ldots,g_{0})$

We denote by $\overline{W}K$ the quotient of $WK$ by the obvious left
$K$-action. More explicitly, $\overline{W}K$ has $n$-simplices given by

$\overline{W}K_{n}:=K_{n-1}\times\cdots\times K_{0}.$

and structure maps

$d_{i}(g_{n-1},\ldots,g_{0})=\begin{cases}(g_{n-2},\ldots,g_{0})&i=0\\\
(d_{i-1}g_{n-1},\ldots,(d_{0}g_{n-i})g_{n-i-1},g_{n-i-2},\ldots,g_{0})&0<i<n\\\
(d_{n-1}g_{n-1},\ldots,d_{1}g_{1})&i=n\end{cases}$

and

$s_{i}(g_{n-1},\ldots,g_{0})=\begin{cases}(1,g_{n-1},\ldots,g_{0})&i=0\\\
(s_{i-1}g_{n-1},\ldots s_{0}g_{n-i},1,g_{n-i-1},\ldots,g_{0})&i>0.\end{cases}$

We denote by $\pi:WK\to\overline{W}K$ the quotient map.

######  Theorem 2.8.

For any simplicial set $X$, pullback induces a bijection

${{[X,\overline{W}K]}}$${\operatorname{Prin}_{K}(X).}$$\scriptstyle{\cong}$

###### Proof.

This theorem is established for any principal $K$-bundle $EK\to BK$ satisfying
certain conditions in [GJ09, Ch. V, Thm. 3.9]. It is shown that
$\pi:WK\to\overline{W}K$ satisfies these conditions in [GJ09, Ch. V, Cor. 6.8]
and [GJ09, Ch. V, Lem. 4.6]. ∎

By Theorem 2.8, there is a bijection

$\operatorname{Prin}_{K}(X)\cong[X,\overline{W}K]$

for any $X\in\mathsf{sSet}$. However, since the action of $K$ on $E$ is free
for any principal bundle $E\to X$, we should be able to identify simplices of
$E$ with pairs $(g,x)$ where $g\in K_{n}$ and $X$ in $X_{n}$. Fortunately, the
fiber of $WK\to\overline{W}K$ over $(g_{n-1},\ldots,g_{0})$ can be canonically
identified with $K_{n}$ by construction. We now seek to untangle the specific
structure maps in the pull-back

$X_{n}\cong(WK\times_{\overline{W}K}X)_{n}$

for a given map $\gamma:X\to\overline{W}K$.

A quick computation of the structure maps shows that, for $(g,x)\in
K_{n}\times X_{n}$

$d_{i}(g,x)=\begin{cases}(d_{i}(g),d_{i}(x))&i>0\\\
(d_{0}(g)\cdot\gamma_{n}(x),d_{0}(x))&i=0\end{cases}$

and

$s_{i}(g,x)=(s_{i}(g),s_{i}(x)).$

However, this implies something curious — the bundle
$WK\times_{\overline{W}K}X$ only depends on the first component of $\gamma$,
and so the homotopy class of $\gamma$ only depends on this first component.

To understand how this works, we turn it into a definition.

######  Definition 2.9.

For $X\in\mathsf{sSet}$, a collection $\eta:=\\{\eta_{n}:X_{n}\to
K_{n-1}\\}_{n\geq 1}$ is called a _twisting function_ if the maps

$d_{i}(g,x)=\begin{cases}(d_{i}(g),d_{i}(x))&i>0\\\
(d_{0}(g)\cdot\eta_{n}(x),d_{0}(x))&i=0\end{cases}$

and

$s_{i}(g,x)=(s_{i}(g),s_{i}(x))$

define a simplicial structure on the graded set $K_{n}\times X_{n}$. Direct
computation of the simplicial identities then shows that $\eta$ is a twisting
function if and only if the identities

$d_{i}\eta(x)=\begin{cases}\eta(d_{i+1}(x))&i>0\\\
\eta(d_{1}(x))\cdot\eta(d_{0}(x))^{-1}&i=0\end{cases}$

and

$\eta(s_{j}(x))=\begin{cases}1&j=0\\\
s_{j-1}(\eta(x))&\text{else}.\end{cases}$

Given a twisting function $\eta$, we call the associated simplicial set the
_$\eta$ -twisted product of $X$ and $K$_, and denote it by $K\times_{\eta}X$.
We denote the set of twisting functions on $X$ by
$\operatorname{Twist}_{K}(X)$. We denote the projection map by
$\pi_{\eta}:K\times_{\eta}X\to X$.

######  Lemma 2.10.

Given a twisting function $\eta$ on $X$, the map $K\times_{\eta}X\to X$ is a
principal $K$-bundle.

###### Proof.

It is immediate that the left action of $K$ on $K\times_{\eta}X$ is free, and
that the projection induces an isomorphism from the quotient. ∎

Our final step is to determine when two twisting functions determine homotopic
maps to $\overline{W}K$.

######  Lemma 2.11.

Given a twisting function $\eta$, the map

${\theta^{\eta}:}$${K\times_{\eta}X}$${WK}$

given by

$\theta_{n}^{\eta}(g,x)=(g,\eta_{n}(x),\eta_{n-1}(d_{0}(x)),\ldots,\eta_{1}(\underbrace{d_{0}\cdots
d_{0}}_{\times n-1}(x)))$

is a $K$-equivariant simplicial map and the diagram

${K\times_{\eta}X}$${WK}$${X}$${\overline{W}K}$$\scriptstyle{\theta}$$\scriptstyle{\overline{\theta}}$

is pullback, where $\overline{\theta}$ denotes the induced map on quotients.

###### Proof.

This follows by direct computation using the simplicial identities. A proof
can be found in Appendix D. ∎

We then aim to classify when two twisted products are equivalent. This is
simplified by the fact that, by freeness, two bundles over the same base are
isomorphic if and only if there is a bundle map between them. Thus, if there
is an isomorphism

${f:}$${K\times_{\eta}X}$${K\times_{\tau}X}$

over $X$, it will have the form

$f(g,x)=(x,\kappa(g,x))$

and $\kappa_{n}(g,x)$ will be $K_{n}$-equivariant, i.e,

$\kappa_{n}(g,x)=g\cdot\psi_{n}(x)$

for some function $\psi$.

######  Lemma 2.12.

Given functions $\psi_{n}:X_{n}\to K_{n}$, and the maps
$f_{n}:(K\times_{\eta}X)_{n}\to(K\times_{\tau}X)_{n}$ defined by the
$\psi_{n}$, the following are equivalent.

  1. 1.

The map $f$ is a map of simplicial sets.

  2. 2.

The map $f$ is an isomorphism of principal $K$-bundles over $X$.

  3. 3.

The maps $\psi_{i}$ satisfy the relations

$\displaystyle d_{0}(\psi_{n}(x))\eta_{n}(x)$
$\displaystyle=\eta_{n}(x)\psi_{n-1}(d_{0}(x))$
$\displaystyle\psi_{n-1}(d_{i}(x))$ $\displaystyle=d_{i}(\psi_{n}(x))$
$\displaystyle i>0$ $\displaystyle s_{i}\psi_{n}(x)$
$\displaystyle=\psi_{n-1}(s_{i}(x))$ $\displaystyle i\geq 0.$

###### Proof.

The equivalence of (1) and (2) is immediate, since equivariant maps between
free $G$-sets are isomorphisms. We thus need only show the equivalence with
(3).

The map $f$ being simplicial is equivalent to the relations

$\displaystyle d_{i}f(g,x)$ $\displaystyle=f(d_{i}(g,x))$ $\displaystyle
s_{i}f(g,x)$ $\displaystyle=f(s_{i}(g,x)).$

Expanding these out in terms of the definition of $\psi_{n}$ and comparing
group terms yields the relations of the lemma. ∎

######  Definition 2.13.

We call twisting functions $\eta$ and $\tau$ _equivalent_ if there is a
collection of functions $\psi_{n}$ satisfying the conditions of Lemma 2.12.

######  Corollary 2.14.

The map

${\theta^{(-)}:}$${\operatorname{Twist}_{K}(X)_{/\sim}}$${{[X,\overline{W}K]}}$${\eta}$${\overline{\theta^{\eta}}}$

(see Lemma 2.11) is a bijection, where $\sim$ denotes equivalence of twisting
functions.

######  Lemma 2.15.

The levelwise sum of two twisting functions $\eta$ and $\eta^{\prime}$ is a
twisting function.

###### Proof.

Given $x\in X_{n}$, we have

$\displaystyle d_{0}((\eta+\eta^{\prime})_{n}(x))$
$\displaystyle=d_{0}(\eta_{n}(x)+\eta^{\prime}_{n}(x))$
$\displaystyle=d_{0}(\eta_{n}(x))+d_{0}(\eta^{\prime}_{n}(x))$
$\displaystyle=\eta_{n-1}(d_{1}(x))-\eta_{n-1}(d_{0}(x))+\eta^{\prime}_{n-1}(d_{1}(x))-\eta^{\prime}_{n-1}(d_{0}(x))$
$\displaystyle=(\eta+\eta^{\prime})_{n-1}(d_{1}(x))-(\eta+\eta^{\prime})_{n-1}(d_{0}(x)).$

For $1\leq i\leq n$, we have

$\displaystyle d_{i}((\eta+\eta^{\prime})_{n}(x))$
$\displaystyle=d_{i}(\eta_{n}(x)+\eta^{\prime}_{n}(x))$
$\displaystyle=d_{i}(\eta_{n}(x))+d_{i}(\eta^{\prime}_{n}(x))$
$\displaystyle=\eta_{n-1}(d_{i+1}(x))+\eta^{\prime}_{n-1}(d_{i+1}(x))$
$\displaystyle=(\eta+\eta^{\prime})_{n-1}(d_{i+1}(x)).$

For the degeneracy maps we have

$(\eta+\eta^{\prime})_{n}(s_{0}(x))=\eta_{n}(s_{0}(x))+\eta^{\prime}_{n}(s_{0}(x))=0,$

and for $1\leq j\leq n+1$,

$\displaystyle(\eta+\eta^{\prime})_{n}(s_{j}(x))$
$\displaystyle=\eta_{n}(s_{j}(x))+\eta^{\prime}_{n}(s_{j}(x))$
$\displaystyle=s_{j-1}(\eta_{n-1}(x))+s_{j-1}(\eta^{\prime}_{n-1}(x))$
$\displaystyle=s_{j-1}((\eta+\eta^{\prime})_{n-1}(x)).$

∎

######  Lemma 2.16.

If $K$ is a simplicial Abelian group, then $\operatorname{Twist}_{K}(X)$ is an
Abelian group.

###### Proof.

By Lemma 2.15 the sum is well-defined. The associativity follows from the
associativity in $K_{n}$ for every $n\geq 0$. The identity element is the
twisting function that send every $x\in X_{n}$ to the identity elment of
$K_{n-1}$. The inverse of $\eta$ is given by $-\eta$. ∎

######  Definition 2.17.

We will write $\operatorname{Sec}(f)$ for the set of sections of a simplicial
set map $f:E\to X$. Note that when $E$ is given by a twisted product
$E=K\times_{\eta}X$, we have a canonical identification of a section $s:X\to
E$ with a map of graded sets $\varphi:X\to K$ satisfying

$\displaystyle d_{i}\varphi(x)$ $\displaystyle=\varphi(d_{i}(x))$
$\displaystyle i>0$ $\displaystyle s_{i}\varphi(x)$
$\displaystyle=\varphi(s_{i}(x))$ $\displaystyle d_{0}(\varphi(x))\eta(x)$
$\displaystyle=\varphi(d_{0}x).$

Under this identification, $s(x)=(\varphi(x),x)$. We will typically denote an
element of $\operatorname{Sec}(\pi_{\eta})$ by the function $\varphi:X\to K$,
rather than the section $s$ itself. When necessary, we will denote the
associated section by $s_{\varphi}$.

We define a product

${\kappa:}$${\operatorname{Sec}(\pi_{\eta})\times\operatorname{Sec}(\pi_{\eta^{\prime}})}$${\operatorname{Sec}(\pi_{\eta+\eta^{\prime}})}$

by sending $(\varphi,\varphi^{\prime})$ to the pointwise sum
$\varphi+\varphi^{\prime}$.

######  Proposition 2.18.

Let $\eta$ be a twisting function on $X$. The following are equivalent.

  1. 1.

The set $\operatorname{Sec}(\pi_{\eta})$ is non-empty.

  2. 2.

There is an isomorphism $K\times_{\eta}X\cong K\times X$ of $K$-bundles over
$X$.

  3. 3.

There is an equivalence of twisting functions $\eta\sim 0$.

###### Proof.

The equivalence of (2) and (3) follows immediately from the classification
result Corollary 2.14 and that fact that, by definition $K\times X\cong
K\times_{0}X$. It is clear that $x\mapsto(0,x)$ is a section of the trivial
bundle $K\times X$, so (2) implies (1).

If $\pi_{\eta}$ admits a section then we can form a diagram

${P}$${K\times(K\times_{\eta}X)}$${(K\times_{\eta}X)}$${X}$${(X\times_{\eta}K)}$${X}$$\scriptstyle{\operatorname{pr}_{2}}$$\scriptstyle{m}$$\scriptstyle{\pi_{\eta}}$$\scriptstyle{s}$$\scriptstyle{=}$$\scriptstyle{\pi_{\eta}}$

by iterated pullback. The right-hand square is pullback by the freeness of the
$K$-action, and the left is defined to be pullback. Since the bottom composite
is the identity, $P$ is identified with $K\times_{\eta}X$, but by the
construction of pullbacks in $\mathsf{Set}$, the left-hand pullback square
identifies $P$ with $K\times X$. Thus, (1) implies (2). ∎

###  2.3 The theory for a simplicial Abelian group

We now specialize to the case of a simplicial Abelian group. Let
$A\in\mathsf{Ab}_{\Delta}$. We denote by

${M:}$${\mathsf{Ab}_{\Delta}}$${\mathsf{Ch}^{+}}$${:\Gamma}$

the Dold-Kan correspondence (see, e.g., [GJ09, Ch. III, §2]). Explicitly, $M$
is the _normalized chains_ functor which sends a simplicial Abelian group $K$
to the chain complex $M(K)$ with $n$-chains

$M(K)_{n}=\bigcap_{i=0}^{n-1}\operatorname{ker}(d_{i})\subset K_{n}$

and differentials given by $(-1)^{n}d_{n}$. The functor $\Gamma$ sends a chain
complex $C$ to a simplicial Abelian group $\Gamma(C)$ whose group of
$n$-simplices is

$\Gamma(C)_{n}=\bigoplus_{[k]\twoheadrightarrow[n]}C_{k}.$

The classic theorem of Dold and Kan says that $M$ and $\Gamma$ define an
equivalence of categories. We will leverage this to connect principal bundles
to cohomology groups as follows.

######  Proposition 2.19.

There is an isomorphism of chain complexes

$M({\overline{W}A})\cong(MA)[-1]$

natural in $A$, or, equivalently, a natural isomorphism

${\overline{W}A}\cong\Gamma(MA[-1]).$

###### Proof.

This is the content of [Jar10, Eq. 4.58]. ∎

Denote by $\underline{\mathsf{Ch}^{+}}(C_{\bullet},D_{\bullet})$ the chain
complex of maps between the chain complexes $C_{\bullet}$ and $D_{\bullet}$.
Denote by $\underline{\mathsf{Ab}_{\Delta}}(K,L)$ the simplicial Abelian group
of maps between simplicial Abelian groups $K$ and $L$.

######  Proposition 2.20.

Let $C_{\bullet}$ and $D_{\bullet}$ be chain complexes. There is a natural
equivalence of simplicial Abelian groups

${\Gamma\left(\underline{\mathsf{Ch}^{+}}(C_{\bullet},D_{\bullet})\right)}$${\underline{\mathsf{Ab}_{\Delta}}(\Gamma(C_{\bullet}),\Gamma(D_{\bullet})).}$$\scriptstyle{\simeq}$

###### Proof.

This is [Opa21, Thm 6.3.1]. ∎

######  Corollary 2.21.

There is a natural isomorphism of groups

$\pi_{0}\left(\underline{\mathsf{Ab}_{\Delta}}(\Gamma(C_{\bullet}),\Gamma(D_{\bullet}))\right)\cong
H_{0}(\underline{\mathsf{Ch}^{+}}(C_{\bullet},D_{\bullet})).$

###### Proof.

Under the Dold-Kan correspondence, simplicial homotopy corresponds to
homology. See, e.g., [Wei94, Thm 8.4.1] for details. ∎

If we denote by $\mathbb{Z}[-]$ the free simplicial Abelian group functor

${{\mathbb{Z}[-]}:}$${\mathsf{Set}_{\Delta}}$${\mathsf{Ab}_{\Delta}}$

and note that it is left adjoint to the forgetful functor $F$ from simplicial
Abelian groups to simplicial sets, we obtain the following corollary.

######  Corollary 2.22.

There is a natural isomorphism of groups

$[X,{\overline{W}A}]\cong
H_{-1}(\underline{\mathsf{Ch}^{+}}(M(\mathbb{Z}[X]),M(A))).$

###### Proof.

This amounts to chaining together the isomorphisms of 2.21 and 2.19, with the
isomorphism

$H_{-n}(C_{\bullet})\cong H_{0}(C_{\bullet}[-n]).$

More explicitly, we have

$\displaystyle=\pi_{0}(\underline{\mathsf{Set}_{\Delta}}(X,\overline{W}A))$
$\displaystyle\cong\pi_{0}(\underline{\mathsf{Ab}_{\Delta}}(\mathbb{Z}[X],\overline{W}A))$
$\displaystyle\cong\pi_{0}(\underline{\mathsf{Ab}_{\Delta}}(\mathbb{Z}[X],\Gamma(MA[-1])))$
$\displaystyle\cong
H_{0}(\underline{\mathsf{Ch^{+}}}(M(\mathbb{Z}[X]),MA[-1]))$
$\displaystyle\cong
H_{0}(\underline{\mathsf{Ch^{+}}}(M(\mathbb{Z}[X]),MA)[-1])$
$\displaystyle\cong H_{-1}(\underline{\mathsf{Ch^{+}}}(M(\mathbb{Z}[X]),MA)).$

∎

######  Theorem 2.23.

For a simplicial Abelian group $K$, the isomorphisms

$\operatorname{Twist}_{K}(X)_{/\sim}\cong[X,\overline{W}K]\cong
H_{-1}(\underline{\mathsf{Ch}^{+}}(M(\mathbb{Z}[X]),M(A)))$

of Corollaries 2.22 and 2.14 define an isomorphism of groups, where
$\operatorname{Twist}_{K}(X)_{/\sim}$ is equipped with the levelwise sum of
twisting functions.

###### Proof.

It is immediate from construction that the bijection
$[X,\overline{W}K]\cong\operatorname{Twist}_{K}(X)_{/\sim}$ sends the
levelwise sum of maps to the levelwise sum of twisting functions. Thus, the
latter must define a group structure on $\operatorname{Twist}_{K}(X)_{/\sim}$
isomorphic to that on $[X,\overline{W}K]$. Corollary 2.22 completes the proof.
∎

###  2.4 The case of an Abelian group

We now specialize even further. Let $H\in\mathsf{Ab}$, and let $A=N(H)$ denote
the nerve of $H$. By explicit construction, this means that $A=\Gamma(H[-1])$,
where $H$ is abusively used to denote the chain complex concentrated in degree
$0$.

######  Proposition 2.24.

There is a natural bijection

$[X,{\overline{W}A}]\cong
H_{-2}(\underline{\operatorname{Ch}^{+}}(M(\mathbb{Z}[X]),H))=H^{2}(X,H).$

###### Proof.

This is simply an application of Corollary 2.22. Note that the additional
degree shift follows because $N(H)$ corresponds under the Dold-Kan
correspondence to $H[-1]$. ∎

In this case, we can trace through the equivalences to obtain an explicit
2-cocycle representing a twisting function. Given a twisting function
$\\{\eta_{n}:X_{n}\to A_{n-1}\\}$, the degree 2 component of the corresponding
map to ${\overline{W}A}$ is

$\overline{\theta^{\eta}_{2}}(x)=(\eta_{2}(x))\in A_{1}=H.$

Applying the normalized chain complex functor $M$, we then obtain the map

${M(\overline{\theta}):}$${\ker(d_{0})\cap\ker(d_{1})}$${H}$${x}$${\eta_{2}(x).}$

To turn this into a cocycle on $X_{2}$ we use [GJ09, Chapter 2, Thm 2.1],
which says that the composite

${M(\mathbb{Z}[X_{2}])}$${\mathbb{Z}[X_{2}]}$${\mathbb{Z}[X_{2}]/\mathbb{Z}[s(X_{1})]}$

is an isomorphism, where $\mathbb{Z}[s(X_{1})]$ is the subgroup of
$\mathbb{Z}[X_{2}]$ generated by the degenerate 2-simplices. The inverse
isomorphism is induced by the map

${X_{2}}$${\ker(d_{0})\cap\ker(d_{1})}$${x}$${x-s_{0}(d_{0})x-s_{1}d_{1}(x-s_{0}d_{0}(x)).}$

As a result, the twisting function $\eta$ is sent to the cocycle
$\gamma_{\eta}:X_{2}\to H$ defined by

$\gamma_{\eta}(x)=\eta_{2}(x-s_{0}(d_{0})x-s_{1}d_{1}(x-s_{0}d_{0}(x)))$

Notice that this cocycle $\gamma_{\eta}$ vanishes on degenerate simplices,
that is, it is _normalized_.

On the other hand, we have

######  Lemma 2.25.

Let $\gamma:X_{2}\to H$ be a normalized 2-cocycle on $X$. Then the maps
$\eta_{n}:X_{n}\to N(H)_{n-1}$ defined inductively by

$\eta_{1}(x)=0,\qquad\eta_{2}(x)=\gamma(x)$

and

$\eta_{n}(x)=\left(\gamma(d_{3}\cdots
d_{n}(x)),(\eta_{n-1}(d_{1}x)-\eta_{n-1}(d_{0}x))\right)$

defines a twisting function on $X$.

###### Proof.

This follows by direct verifications of the relations between $\eta$ and the
face and degeneracy maps. The details can be found in Appendix D. ∎

######  Proposition 2.26.

The construction of Lemma 2.25 defines a bijection between cohomology classes
of normalized 2-cocycles on $X$ with values in $H$ and equivalence classes of
twisting functions. Moreover, under this bijection, the group structure on
$H^{2}(X,H)$, and thus the induced group structure on
$\operatorname{Prin}_{N(H)}(X)$ corresponds to the levelwise addition of
twisting functions.

###### Proof.

This is simply a specialization of Theorem 2.23 to the explicit map derived in
Lemma 2.25. ∎

When dealing with the nerve of an Abelian group, we can strengthen the
correspondence between statements (1) and (3) in Proposition 2.18 to a
statement about cochains and cocycles. To this end, let $\gamma:X_{2}\to H$ be
a normalized 2-cocycle, and let $\eta$ be the corresponding twisting function,
as described in Lemma 2.25. Given a normalized 1-cochain $\alpha:X_{1}\to H$
such that $\partial\alpha=\gamma$, we construct a section of the corresponding
(trivial) $N(H)$-bundle $\pi_{\eta}:N(H)\times_{\eta}X\to X$ as follows.

By Lemma C.5 in the appendix, $\pi_{\eta}$ is relatively 2-coskeletal over
$X$. Thus, it suffices for us to construct a map of 2-truncations
$\operatorname{tr}_{2}(X)\to\operatorname{tr}_{2}(N(H)\times_{\eta}X)$ over
$\operatorname{tr}_{2}(X)$ by Lemma C.6. We define a map
$(\varphi_{\alpha})_{i}(x)=(\phi_{i}(x),x)$ for $i=0,1,2$ by

$\displaystyle\phi_{0}(x)$ $\displaystyle=0$ $\displaystyle\phi_{1}(x)$
$\displaystyle=\alpha(x)$ $\displaystyle\phi_{2}(x)$
$\displaystyle=(\alpha(d_{2}x),\alpha(d_{1}x)-\alpha(d_{2}x)).$

Denote by $\operatorname{No}(X,H,\gamma)$ the set of normalized $H$-valued
1-cochains $\alpha$ on $X$ such that $\partial\alpha=\gamma$.

######  Proposition 2.27.

For a twisting function $\eta$ corresponding to a normalized 2-cocycle
$\gamma$, the map

${\operatorname{No}(X,H,\gamma)}$${\operatorname{Sec}(\pi_{\eta})}$${\alpha}$${\varphi_{\alpha}}$

is a bijection.

###### Proof.

We first must check that $\varphi_{\alpha}$ is simplicial on the 2-truncation.
We first check the face maps

$\displaystyle d_{i}(\phi_{2}(x),x)$
$\displaystyle=d_{i}((\alpha(d_{2}x),\alpha(d_{1}x)-\alpha(d_{2}x)),x)$
$\displaystyle=\begin{cases}(\alpha(d_{1}(x))-\alpha(d_{2}(x))+\eta_{2}(x),d_{0}x)&i=0\\\
(\alpha(d_{1}(x)),d_{1}(x))&i=1\\\ (\alpha(d_{2}(x)),d_{2}(x))&i=2\end{cases}$
$\displaystyle=\begin{cases}(\alpha(d_{0}(x)),d_{0}(x))&i=0\\\
(\alpha(d_{1}(x)),d_{1}(x))&i=1\\\ (\alpha(d_{2}(x)),d_{2}(x))&i=2\end{cases}$
$\displaystyle=\alpha(d_{i}(x))$

as desired. Here, the third equality follows because

$\eta(x)=\partial\alpha(x)=\alpha(d_{0}(x))-\alpha(d_{1}(x))+\alpha(d_{2}(x)).$

The relations with the face maps when $x\in X_{1}$ are immediate, since
$N(H)_{0}$ is a singleton.

We then check the relations with the degeneracies. For $x\in X_{0}$,

$s_{0}(\phi_{0}(x))=s_{0}(0)=0=\alpha(s_{0}(x))$

since $\alpha$ is normalized. For $x\in X_{2}$,

$\displaystyle\phi_{2}(s_{0}(x))$
$\displaystyle=(\alpha(d_{2}s_{0}(x)),\alpha(d_{1}s_{0}(x))-\alpha(d_{2}s_{0}(x)))$
$\displaystyle=(\alpha(s_{0}d_{1}(x)),\alpha(x)-\alpha(s_{0}d_{1}(x)))$
$\displaystyle=(0,\alpha(x))=s_{0}(\phi_{2}(x))$

by the simplicial identities and the normalization of $\alpha$. Finally,

$\displaystyle\phi_{2}(s_{1}(x))$
$\displaystyle=(\alpha(d_{2}s_{1}(x)),\alpha(d_{1}s_{1}(x))-\alpha(d_{2}s_{1}(x)))$
$\displaystyle=(\alpha(x),\alpha(x)-\alpha(x))$ $\displaystyle=(\alpha(x),0)$

as desired. This establishes that the map in question is well-defined.

On the other hand, given such a section $\varphi:X\to N(H)\times_{\eta}X$,
expressed as $\varphi(x)=(\psi(x),x)$, we define a 1-cochain $\beta:X_{1}\to
H$ by simply setting $\beta(x)=\psi_{1}(x)$. To see that this is a normalized
1-cochain, we simply note that

$\beta(s_{0}(x))=\psi_{1}(s_{0}(x))=s_{0}(\psi_{0}(x))=s_{0}(0)=0.$

To see that $\partial\beta=\gamma$, note that
$\psi_{2}(x)=(\psi_{2}^{1}(x),\psi_{2}^{2}(x))$ must satisfy the equations

$\displaystyle\psi_{2}^{2}(x)+\eta_{2}(x)$ $\displaystyle=\psi_{1}(d_{0}(x))$
(1) $\displaystyle\psi_{2}^{1}(x)+\psi_{2}^{2}(x)$
$\displaystyle=\psi_{1}(d_{1}(x))$ $\displaystyle\psi_{2}^{1}(x)$
$\displaystyle=\psi_{1}(d_{2}(x)).$

Taking the alternating sum of these equations yields

$\gamma(x)=\eta_{2}(x)=\psi_{1}(d_{0}(x))-\psi_{1}(d_{1}(x))+\psi_{1}(d_{2}(x))=\beta(d_{0}(x))-\beta(d_{1}(x))+\beta(d_{2}(x))$

as desired.

Finally, to complete the proof of bijectivity we check that
$\varphi_{\beta}=\varphi$. However, we see that the degree 1 and 2 components
agree, and it is easy to see that the equations (1) completely determine
$\psi_{2}^{2}(x)$ and $\psi_{2}^{1}(x)$ from the values $\eta_{2}(x)$ and the
function $\psi_{1}$. Thus, the proposition is proven. ∎

###  2.5 The tensor product of principal bundles

We now return to the case of a generic simplicial Abelian group. Let $K$ be a
simplicial Abelian group, and $X\in\mathsf{Set}_{\Delta}$ a simplicial set.
Throughout, we write $K$ multiplicatively, to better accord with the notation
for group actions. Let

${E}$${X}$${F}$${X}$$\scriptstyle{\pi_{E}}$$\scriptstyle{\pi_{F}}$

be two principal $K$-bundles over $X$. Define an equivalence relation on the
set $E\times_{X}F$ by setting $(ke,f)\sim(e,kf)$ for all $k\in K$, $e\in E$,
and $f\in F$, and let

$E\otimes_{K}F:=(E\times_{X}F)_{/\sim}.$

Note that, equivalently, the equivalence relation is $(e,f)\sim(x,y)$ if and
only if there exists $k\in K$ such that $(ke,k^{-1}f)=(x,y)$. Also note that
since $E$ and $F$ are principal bundles, if such a $k$ exists, it is unique.
This construction precisely mirrors that of the tensor product of principal
$A$-bundles for a topological Abelian group $A$. See, for instance [BSST06,
Example 2.2.4] for details.

######  Proposition 2.28.

The canonical map $\pi_{E\otimes F}:E\otimes_{K}F\to X$ is a principal
$K$-bundle.

###### Proof.

We first note that, given a map $\phi:[n]\to[m]$ in the simplex category and
$(k,e,f)\in K\times(E\times_{X}F)$, we have

$\displaystyle\phi^{\ast}(k\cdot e,f)$ $\displaystyle=(\phi^{\ast}(k\cdot
e),\phi^{\ast}(f))$
$\displaystyle=(\phi^{\ast}(k)\cdot\phi^{\ast}(e),\phi^{\ast}(f))$
$\displaystyle\sim(\phi^{\ast}(e),\phi^{\ast}(k)\cdot\phi^{\ast}(f))$
$\displaystyle=(\phi^{\ast}(e),\phi^{\ast}(k\cdot f))$
$\displaystyle=\phi^{\ast}(e,k\cdot f)$

so that the simplicial structure on $E\times_{X}F$ descends to
$E\otimes_{K}F$. Moreover, since multiplication by elements of $k$ occurs
fiberwise, the map $\pi_{E\otimes F}$ to $X$ remains well defined.

We then show that $E\otimes_{K}F$ carries a free $K$ action with quotient $X$.
The action is defined by

$k\cdot[e,f]=[ke,f]$

and is clearly simplicial. As above, it is immediate that the canonical map
$\pi_{E\otimes F}:E\otimes_{K}F\to X$ is $K$-equivariant.

To see that the action is free and transitive on fibers, suppose we are given
$[e,f],[x,y]\in E\otimes_{K}F$ such that $\pi_{E\otimes F}(e,f)=\pi_{E\otimes
F}(x,y)$. Then choose $k\in K$ and $h\in H$ such that

$ke=x\quad\text{and}\quad hf=y.$

Then we see that

$(h^{-1}ke,f)\sim(x,y)$

so the action is transitive on fibers. On the other hand, suppose that $h,k\in
K$ such that $(he,f)\sim(x,y)$ and $(ke,f)\sim(x,y)$. Then, by the definition
of the equivalence relation $\sim$, there is a unique $g\in K$ such that
$(gke,g^{-1}f)=(ghe,g^{-1}f)$. Since the action of $K$ on $F$ is free, this
implies $g=1$, and so $ke=he$. Since the action of $K$ on $E$ is free, this
implies $k=h$, and so the action of $K$ on $E\otimes_{K}F$ is free. ∎

######  Proposition 2.29.

The cohomology class in
$H_{-1}(\underline{\mathsf{C}^{+}}(M(\mathbb{Z}[X]),M(K)))$ corresponding to
$E\otimes_{K}F$ is the sum of the cohomology classes associated to $E$ and
$F$, respectively.

###### Proof.

By Theorem 2.23, it is sufficient to compute this on bundles of the form
$K\times_{\eta}X$ for a twisting function $\eta$, since every $K$-principal
bundle is isomorphic to such a one. We note that when $E=K\times_{\eta}X$ and
$F=K\times_{\rho}X$, we can identify $E\otimes_{K}F$ with the set of triples
of the form $(k,1,x)$ where $k\in K$ and $x\in X$. We can compute the face and
degeneracy maps, which are elementwise those of $K$ and $X$, except for
$d_{0}$. In that case, we have

$d_{0}(k,1,x)=(d_{0}(k)\eta(x),1\rho(x),d_{0}(x))\sim(d_{0}(k)\eta(x)\rho(x),1,d_{0}(x)).$

So that a twisting function associated to $E\otimes_{K}F$ is $\eta\rho$. Since
the group operation on twisting functions is identified with the group
operation on cohomology, the proposition follows. ∎

In the case of a general simplicial Abelian group $K$, the same reasoning as
in the proposition allows us to define a canonical isomorphism

${(K\times_{\eta}X)\otimes_{K}(K\times_{\xi}X)}$${K\times_{\eta\xi}X}$${{[(k,x),(h,x)]}}$${(kh,x)}$

which will be of use when we discuss monoidal functors.

Recall that we denote by $\mathsf{Bun}_{K}(X)$ the groupoid of principal
$K$-bundles over $X$.

######  Theorem 2.30.

The product $-\otimes_{K}-$ equips $\mathsf{Bun}_{K}(X)$ with the structure of
a symmetric monoidal groupoid.

###### Proof.

This is the content of Theorem A.3 in the appendix. ∎

As it turns out, $\mathsf{Bun}_{K}(X)$ is more than simply a groupoid with a
monoidal structure; it is a 2-group. See, e.g., [BL04] for further details.

######  Corollary 2.31.

The category $\mathsf{Bun}_{K}(X)$ is a commutative $2$-group.

###### Proof.

We need only see that every object $E\to X$ has an inverse up to isomorphism
under the tensor product. But since the tensor product induces the same monoid
structure on $\pi_{0}(\mathsf{Bun}_{K}(X))$ as the bijection with
$H^{2}(X,K)$, it is immediate that this property holds. ∎

Since $\mathsf{Bun}_{K}(X)$ is a commutative 2-group, it can be equipped with
a symmetric monoidal automorphism
$\mathcal{I}:\mathsf{Bun}_{K}(X)\to\mathsf{Bun}_{K}(X)$ which sends each
bundle $E\to X$ to a weak inverse $\overline{E}\to X$ under $\otimes_{K}$.
However, if we restrict our attention to bundles given by twisted products —
i.e., restrict to the full monoidal subcategory
$\mathsf{Bun}_{K}^{\operatorname{t}}(X)$ on the twisted products
$K\times_{\eta}X$ — this duality may be given the computationally convenient
form

${K\times_{\eta}X}$${K\times_{\eta^{-1}}X.}$

In general, there is no _bundle_ isomorphism between a bundle $E\to X$ and its
inverse $\overline{E}\to X$. However, as the next lemma shows, there is a
_simplicial_ isomorphism between $K\times_{\eta}X$ and $K\times_{\eta^{-1}}X$.

######  Lemma 2.32.

Let $K$ be a simplicial Abelian group, and $\eta$ a $K$-valued twisting
function on $X$. Then the map

${f:}$${K\times_{\eta}X}$${K\times_{\eta^{-1}}X}$${(k,x)}$${(k^{-1},x)}$

is an isomorphism of simplicial sets over $X$.

###### Proof.

Since the structure maps $d_{i}$ for $i>0$ and $s_{i}$ act as homomorphisms on
the $K$ component, it is immediate that they commute with $f$. It thus
suffices for us to check that $f$ commutes with $d_{0}$. We then compute

$f(d_{0}^{\eta}(k,x))=f(d_{0}(k)\eta(x),d_{0}(x))=((d_{0}(k)\eta(x))^{-1},x)=d_{0}^{\eta^{-1}}(k^{-1},x)=d_{0}^{\eta^{-1}}(f(k,x)),$

where we denote by $d^{\eta}_{i}$ the face map in $K\times_{\eta}X$. Since the
same formula provides an inverse to $f$, the lemma is proven. ∎

Note that the map $f$ is not $K$-equivariant, but rather equivariant along the
inverse map for $K$. Thus, while it is an isomorphism of simplicial sets over
$X$, it is not an isomorphism of bundles.

##  3 Twisted distributions

Have now developed the requisite theory of principal bundles, we come to the
main theme of this paper: distributions on principal bundles. We term these
_twisted distributions_ since they can be viewed as variants of the simplicial
distributions of [OKI23] which are twisted according to a twisting function
$\eta$ or the corresponding cohomology class.

Before defining twisted distributions, however, we must establish a few
preliminaries.

######  Definition 3.1.

Given a semiring $R$, the _$R$ -distributions functor_ is the functor

${D_{R}:}$${\mathsf{Set}}$${\mathsf{Set}}$

which sends $X$ to the set

$D_{R}(X)=\left\\{p:X\to R\;\mid\;p\text{ {with finite support}, }\sum_{x\in
X}p(x)=1\right\\}$

and sends $f:X\to Y$ to the map

${D_{R}(f):}$${D_{R}(X)}$${D_{R}(Y)}$${p}$${\left(y\mapsto{\displaystyle\sum_{x\in
f^{-1}(y)}}p(x)\right).}$

Composition with $D_{R}$ yields a functor $\mathsf{sSet}\to\mathsf{sSet}$,
which we also denote by $D_{R}$. Following [OKI23] we typically call a map of
simplicial sets $X\to D_{R}(Y)$ a _simplicial distribution_. For twisted
distributions we borrow the more general notion of simplicial distributions
introduced in [BKO23]. In the special case where $R=\mathbb{R}_{\geq 0}$ is
the non-negative reals, we write $D$ for the functor $D_{R}$.

######  Definition 3.2.

Let $K$ be a simplicial group, and $\pi_{E}:E\to X$ a principal $K$-bundle. A
_twisted distribution_ on $\pi_{E}$ is a simplicial map $p:X\to D_{R}(E)$
which makes the diagram

${D_{R}(E)}$${X}$${D_{R}(X)}$$\scriptstyle{D_{R}(\pi_{E})}$$\scriptstyle{\delta}$$\scriptstyle{p}$
(2)

commute.

We write $\operatorname{sDist}(\pi_{E})$ for the set of simplicial
distributions on $\pi_{E}$. A section $\varphi:X\to E$ of the map
$\pi_{E}:E\to X$ gives a simplicial distribution defined by
$\delta^{\varphi}:X\xrightarrow{\varphi}E\xrightarrow{\delta}D_{R}(E)$ called
a _deterministic distribution_. We write
$\delta:\operatorname{Sec}(\pi_{E})\to\operatorname{sDist}(\pi_{E})$ for the
map that sends a section $\varphi$ to the associated deterministic
distribution $\delta^{\varphi}$.

A simplicial distribution on the principal bundle
$\pi_{\eta}:K\times_{\eta}X\to X$ is called an $\eta$-twisted distribution.
For a simplicial set map $f:X\to Y$ it will be convenient to write
$f_{x}=f_{n}(x)$. With this notation an $\eta$-twisted distribution, i.e., a
simplicial set map $p:X\to D_{R}(E)$ making Diagram (2) commute, consists of a
family of distributions $\\{p_{x}:\,x\in X_{n},\,n\geq 0\\}$, where $p_{x}\in
D_{R}(K_{n}\times X_{n})$ with support contained in
$K_{n}\times\\{x\\}=\\{(k,x):\,k\in K_{n}\\}$, such that for every
$\theta:[m]\to[n]$ and $x\in X_{n}$ the following equation holds

$D_{R}(\theta^{*})(p_{x})=p_{\theta^{*}(x)}.$

When $K=NH$ we adopt the notation $p_{x}^{h_{1}h_{2}\cdots
h_{n}}=p_{n}(x)(h_{1},h_{2},\cdots,h_{n})$. By Lemma 2.25 a twisted bundle is
determined by a normalized cocycle $\gamma:X_{2}\to H$. In this case we will
write $X_{\gamma}$ for the twisted product $K\times_{\eta}X$.

######  Example 3.3.

Let us consider simplicial distributions on $\Delta^{2}$ twisted by a
normalized cocycle $\gamma:(\Delta^{2})_{2}\to\mathbb{Z}_{2}$. A twisted
simplicial distribution is given by a commutative diagram

${D_{R}(\Delta^{2}_{\gamma})}$${\Delta^{2}}$${D_{R}(\Delta^{2})}$$\scriptstyle{D_{R}(\pi)}$$\scriptstyle{\delta}$$\scriptstyle{p}$

Let $\sigma$ denote the non-degenerate $2$-simplex of $\Delta^{2}$. Then
$p_{\sigma}$ is a distribution on $\mathbb{Z}_{2}^{2}\times(\Delta^{2})_{2}$
with support on $\\{(ab,\sigma):\,a,b,\in\mathbb{Z}_{2}\\}$. The $d_{0}$-face
map is twisted:

$p_{d_{0}\sigma}^{a}=p_{\sigma}^{0(a+\alpha)}+p_{\sigma}^{1(a+\alpha)}$

where $\alpha=\eta_{2}(\sigma)=\gamma(\sigma)$ by Lemma 2.25.

Next, consider $\Delta^{3}$ and a normalized $2$-cochain $\gamma$ on this
simplicial set. Let $\sigma$ denote the non-degenerate $3$-simplex of
$\Delta^{3}$. The $d_{0}$-face map is given by

$p_{d_{0}\sigma}^{ab}=p_{\sigma}^{0(a+\alpha)(b+\beta)}+p_{\sigma}^{1(a+\alpha)(b+\beta)}$

where
$(\alpha,\beta)=\eta_{3}(\sigma)=(\gamma(d_{3}\sigma),\gamma(d_{1}\sigma)-\gamma(d_{0}\sigma))$
by Lemma 2.25.

###  3.1 The category of $K$-bundle scenarios

We now turn our attention to constructing appropriate categories of $K$-bundle
scenarios, which we will accomplish with the help of the Grothendieck
construction. The reader looking for more background on 2-categories and the
Grothendieck construction can consult, e.g., Chapters 2 and 10 of [JY21].

Let $K$ be a simplicial group. Given a simplicial map $f:X\to Y$, pullback
along $f$ induces a functor

${f^{\ast}:}$${\mathsf{Bun}_{K}(Y)}$${\mathsf{Bun}_{K}(X).}$

The universal property of the pullback provides natural isomorphisms

$\xi_{f,g}:g^{\ast}\circ f^{\ast}\cong(f\circ g)^{\ast}$

for any composable simplicial maps $f$ and $g$. Similarly, the universal
property provides a natural isomorphism

$(\operatorname{id}_{X})^{\ast}\cong\operatorname{Id}_{\mathsf{Bun}_{K}(X)}.$

These data provide a pseudofunctor

${\mathsf{Bun}_{K}:}$${\mathsf{sSet}^{\operatorname{op}}}$${\mathsf{Grpd}}$${X}$${\mathsf{Bun}_{K}(X).}$

######  Definition 3.4.

The _category of $K$-bundle scenarios_ $\mathsf{bScen}_{K}$ is the covariant
Grothendieck construction of the functor $\mathsf{Bun}_{K}$.

This category was first introduced in [BKO23]. More explicitly, we can
describe $\mathsf{bScen}_{K}$ as the category whose objects are principal
$K$-bundles $\pi_{E}:E\to X$, and whose morphisms from $\pi_{E}:E\to X$ to
$\pi_{F}:F\to Y$ are given by commutative diagrams

${E}$${f^{\ast}E}$${F}$${X}$${Y}$${Y}$$\scriptstyle{\pi_{E}}$$\scriptstyle{\alpha}$$\scriptstyle{\pi_{F}}$$\scriptstyle{f}$$\scriptstyle{=}$

The composition of this morphism with a morphism

${F}$${g^{\ast}F}$${B}$${Y}$${Z}$${Z}$$\scriptstyle{\pi_{F}}$$\scriptstyle{\beta}$$\scriptstyle{\pi_{B}}$$\scriptstyle{g}$$\scriptstyle{=}$

is the morphism

${E}$${(f\circ
g)^{\ast}E}$${B}$${X}$${Z}$${Z}$$\scriptstyle{\pi_{E}}$$\scriptstyle{\beta\circ
g^{\ast}(\alpha)\circ\xi_{f,g}}$$\scriptstyle{\pi_{B}}$$\scriptstyle{f\circ
g}$$\scriptstyle{=}$

We then construct a lax natural transformation

${\operatorname{sDist}:}$${\mathsf{Bun}_{K}}$${\underline{\mathsf{Set}}}$

where the latter denotes the constant functor
$\mathsf{sSet}^{\operatorname{op}}\to\mathsf{Cat}$ on the category
$\mathsf{Set}$555The manipulations we use here based on Grothendieck
constructions involve some size issues — for example, the category
$\mathsf{Set}$ is not small, and so to consider it as an object of
$\mathsf{Cat}$ would require additional axiomatics. However, the categories
and functors we construct using the Grothendieck construction can be given
explicit definitions which avoid these issues, and the reader not willing to
resort to alternate foundations may instead resort to these.. The components
are the functors

${\operatorname{sDist}_{X}:}$${\mathsf{Bun}_{K}(X)}$${\mathsf{Set}}$

which send bundle $\pi_{E}:E\to X$ to $\operatorname{sDist}(\pi_{E})$ and send
a bundle isomorphism to the corresponding isomorphism of sets of simplicial
distribution. To see lax naturality, note that for $f:X\to Y$ a simplicial map
and $\pi_{E}:E\to Y$ a $K$-bundle, we can define a map

${\psi_{E}^{f}:}$${\operatorname{sDist}_{Y}(\pi_{E})}$${(\operatorname{sDist}_{X}\circ
f^{\ast})(\pi_{E})}$

which sends a distribution $p$ on $\pi_{E}$ to the composition

${X}$${D_{R}(E)\times D_{R}(X)}$${D_{R}(E\times X)}$$\scriptstyle{p\circ
f\times\delta_{X}}$$\scriptstyle{m}$

Which has image in the simplicial subset $D_{R}(f^{\ast}E)$ by [BKO23, §4.2].
The fact that the maps $\psi_{E}^{f}$ do, in fact, produce a lax natural
transformation follows from Lemmas 4.13 and 4.14 of [BKO23].

Since the Grothendieck construction on a pseudofunctor computes its lax
colimit (see, e.g., [GHN17, Thm 7.4]) this lax transformation immediately
yields the following proposition.

######  Proposition 3.5.

There is a functor

${\operatorname{sDist}:}$${\mathsf{bScen}_{K}}$${\mathsf{Set}}$

which sends each bundle $\pi_{E}:E\to X$ to the set
$\operatorname{sDist}(\pi_{E})$ of twisted distributions on that bundle, each
bundle isomorphism $\alpha$ to the corresponding isomorphism on sets of
twisted distributions, and each pullback square

${E}$${f^{\ast}E}$${Y}$${X}$$\scriptstyle{\pi_{E}}$$\scriptstyle{f}$

to the map $\psi_{E}^{f}$ on sets of twisted distributions.

###  3.2 The colimit decomposition

If the base space $X$ of a fibration $\pi:E\to X$ can be expressed as a
colimit, it is possible to express the space of simplicial distributions in
terms of simplicial distributions on the pullback. To make this precise, we
consider a functor

${\operatorname{sDist}_{\pi}:}$${\left(\mathsf{Set}_{\Delta}\right)_{/X}^{\operatorname{op}}}$${\bf{Set}}$${(f:Y\to
X)}$${\operatorname{sDist}\left(Y\times_{X}E\to Y\right).}$

By Proposition 3.5 any pullback diagram

${E}$${F}$${X}$${Y}$$\scriptstyle{\pi_{X}}$$\scriptstyle{\pi_{Y}}$

yields a map

${\operatorname{sDist}(\pi_{X})}$${\operatorname{sDist}(\pi_{Y})}$

providing the functoriality of $\operatorname{sDist}_{\pi}$.

######  Proposition 3.6.

Given a map $\pi:E\to X$, the associated functor

${({\mathsf{Set}}_{\Delta})_{/X}^{\operatorname{op}}}$${{\mathsf{Set}}}$$\scriptstyle{\operatorname{sDist}_{\pi}}$

preserves limits. That is, given a diagram
$F:I\to(\mathsf{Set}_{\Delta})_{/X}$ with colimit $Y\to X$, the natural map

${\operatorname{sDist}_{\pi}(Y\times_{X}E\to
Y)}$${\lim\operatorname{sDist}_{\pi}(F(i)\times_{X}E\to F(i))}$

is a bijection.

###### Proof.

We fix some notation before beginning. We write

${Y_{i}}$${X}$${Y_{j}}$$\scriptstyle{\alpha_{i}}$$\scriptstyle{f_{u}}$$\scriptstyle{\alpha_{j}}$

for the image under $F$ of a morphism $u:i\to j$ in $I$. We write $\alpha:Y\to
X$ for the colimit of $F$, and we write $\eta_{i}:Y_{i}\to Y$ for the
colimiting cocone. We write $\pi_{i}:E_{i}:=Y_{i}\times_{X}E\to Y_{i}$,
$\pi_{Y}:E_{Y}:=Y\times_{X}E\to Y$, and use an overline to denote the induced
maps of total spaces, e.g.

${E_{i}}$${E_{j}}$${Y_{i}}$${Y_{j}}$$\scriptstyle{\pi_{i}}$$\scriptstyle{\overline{f}_{u}}$$\scriptstyle{\pi_{j}}$$\scriptstyle{f_{u}}$

Given a compatible collection $\\{p_{i}:Y_{i}\to D_{R}(E_{i})\\}_{i\in I}$ of
simplicial distributions, we wish to show that there is a unique simplicial
distribution $p:Y\to D_{R}(E_{Y})$ such that $(\eta_{i})_{\ast}(p)=p_{i}$ for
every $i\in I$. We first show uniqueness. Suppose that such a distribution $p$
exists, and let $(e,y)\in(E_{Y})_{n}$. Since $Y$ is the colimit of the diagram
$F$, this means that there is an $i\in I$ and $y_{i}\in(Y_{i})_{n}$ such that
$\eta_{i}(y_{i})=y$. Thus, we see that desired compatibility condition implies

$p_{i}(y_{i})=p(\eta_{i}(y_{i}))\cdot\delta_{Y_{i}}(y_{i})$

applying this to the element $(e,y_{i})$, we see that this implies

$p_{i}(y_{i})(e,y_{i})=p(y)(e,y)\cdot\delta_{y_{i},y_{i}}=p(y)(e,y).$

This immediately puts paid to uniqueness,as $p$ is specified at every $y\in Y$
and $(e,y)\in E_{Y}$ by the formula

$p(y)(e,y)=p(y_{i})(e,y_{i}).$

We then must check that this formula yields a well-defined simplicial
distribution.

To see well-definedness, let $u:i\to j$ in $I$, and let $y_{i}\in(Y_{i})_{n}$
and $y_{j}\in(Y_{j})_{n}$ such that

$f_{u}(y_{i})=y_{j}\quad\text{and}\quad\eta_{j}(y_{j})=y.$

Further let $(e,y)\in E_{Y}$. The compatibility condition for the collection
$\\{p_{i}:Y_{i}\to D_{R}(E_{i})\\}_{i\in I}$ is precisely that

$(f_{u})_{\ast}(p_{j})=p_{i}$

and so we see that

$p_{i}(y_{i})(e,y_{j})=p_{j}(y_{j})(e,y_{j})$

so that the two definitions of $p(e,y)$ coincide. Thus, the formula above
determines a well-defined value $p(y)(e,y)$ for every $(e,y)\in E_{Y}$.
Extending by $0$ determines $p(y)(e,z)$ for every $z\neq y$.

We next show that this is, indeed, a distribution. For $y\in Y$, $p(y):E\to R$
is by definition supported on the fiber $\pi_{Y}^{-1}(y)$. Given $y_{i}\in
Y_{i}$ such that $\eta_{i}(y_{i})=y$, this canonically identifies the fibers
$\pi_{i}^{-1}(y_{i})$ and $\pi_{Y}^{-1}(y)$. Thus, we see that

$\sum_{(e,z)\in(E_{Y})_{n}}p(y)(e,z)=\sum_{(e,y)\in\pi_{Y}^{-1}(y)}p(y)(e,y)=\sum_{(e,y_{i})\in\pi_{i}^{-1}(y_{i})}p(y_{i})(e,y_{i})=1$

and, since the right-hand side is equal to $1$, we see that $p(y)$ is a
distribution. Moreover, by construction, $p(y)$ lies over $\delta_{Y}(y)$.

We now need only check that the map

${p:}$${Y}$${D_{R}(E)}$${y}$${p(y)}$

respects the simplicial structure. Let $\theta:[n]\to[m]$ in $\Delta$, and
suppose that $y=\theta^{\ast}(z)$ for $z\in(Y)_{m}$. Choosing
$z_{i}\in(Y_{i})_{m}$ such that $\eta_{i}(z_{i})=z$, the fact that $\eta_{i}$
is a simplicial map means that we can define $y_{i}=\theta^{\ast}(z_{i})$ and
have $\eta_{i}(y_{i})=y$. We then have

$p(y)=p(\theta^{\ast}(z))=p_{i}(\theta^{\ast}(z_{i}))=D_{R}(\theta^{\ast})(p_{i}(z)).$

But $D_{R}(\theta^{\ast})(p_{i}(z_{i}))$ is defined on
$(e,x_{i})\in(E_{i})_{n}$ by

$\displaystyle D_{R}(\theta^{\ast})(p_{i}(z_{i}))(e,x_{i})$
$\displaystyle=\sum_{(g,w_{i})\in(\theta^{\ast})^{-1}(e,x_{i})}p_{i}(z_{i})(g,w_{i})$
$\displaystyle=\sum_{(g,z_{i})\in(\theta^{\ast})^{-1}(e,x_{i})}p_{i}(z_{i})(g,z_{i})$
$\displaystyle=\sum_{(g,z)\in(\theta^{\ast})^{-1}(e,x)}p(z)(g,z)$
$\displaystyle=\sum_{(g,w)\in(\theta^{\ast})^{-1}(e,x)}p(z)(g,w)$
$\displaystyle=D_{R}(\theta^{\ast})(p(z))(e,\eta_{i}(x_{i})).$

Thus $p(\theta^{\ast}(z))=D_{R}(\theta^{\ast})(p(z))$, and so $p$ is a
simplicial map, completing the proof. ∎

###  3.3 The polytope of twisted distributions

We can apply Proposition 3.6 to the canonical representation of $X$ as a
colimit over its category of simplices to obtain a useful characterization of
simplicial distributions on $\pi$.

######  Definition 3.7.

Given $\pi:E\to X$ a principal $K$-bundle, we define two functors

${D_{\pi}:}$${(\Delta_{/X})^{\operatorname{op}}}$${(\mathsf{Set}_{\Delta})_{/X}^{\operatorname{op}}}$${\mathsf{Set}}$$\scriptstyle{\operatorname{sDist}_{\pi}}$

and

${(\Delta_{/X})^{\operatorname{op}}}$${\mathsf{Set}}$${\mathsf{Set}}$$\scriptstyle{F_{\pi}}$$\scriptstyle{D_{R}}$

where $F_{\pi}$ is the functor which sends $\sigma:\Delta^{n}\to X$ to the
fiber $\pi_{n}^{-1}(\sigma)$ of $\pi$ over $\sigma$, which is in bijection
with $K_{n}$.

######  Lemma 3.8.

For a principal $K$-bundle $\pi:E\to X$, there is a natural isomorphism

$D_{\pi}\cong D_{R}\circ F_{\pi}.$

###### Proof.

Given $u:\Delta^{n}\to X$, we construct a bijection

${\alpha_{u}:}$${D_{\pi}(u)}$${D_{R}(F_{\pi}(u))}$

as follows. Maps of simplicial sets $p:\Delta^{n}\to
D_{R}(\Delta^{n}\times_{X}E)$ are in bijection with $n$-simplices of
$D_{R}(\Delta^{n}\times_{X}E)$, which are in turn elements of

$D_{R}((\Delta^{n}\times_{X}E)_{n}).$

This bijection is given explicitly by sending $p$ to $p_{u(\sigma)}$, i.e.,
evaluating on the unique non-degenerate $n$-simplex.

Simplicial distibutions are precisely those $p$ for which the diagram

${D_{R}(E\times_{X}\Delta^{n})}$${\Delta^{n}}$${D_{R}(\Delta^{n})}$$\scriptstyle{D_{R}(\pi)}$$\scriptstyle{\delta_{\Delta^{n}}}$$\scriptstyle{p}$

commutes, i.e., such that the support of $p_{u(\sigma)}$ lies in
$\pi_{n}^{-1}(u)$, i.e., $D_{R}(F_{\pi}(u))$. The naturality of this bijection
is immediate from the definitions. ∎

From this lemma, we immediately obtain a characterization of simplicial
distributions as a corollary.

######  Corollary 3.9.

Let $X$ be a simplicial set, and $\pi:E\to X$ a principal $K$-bundle. The
canonical map

${\operatorname{sDist}(\pi)}$${\lim_{(\Delta_{/X})^{\operatorname{op}}}D_{R}\circ
F_{\pi}}$

is a bijection. In particular, if $X$ has finitely many non-degenerate
simplices and $R=\mathbb{R}_{\geq 0}$, then $\operatorname{sDist}(\pi)$ is a
convex polytope with finitely many vertices.

###### Proof.

Since every simplicial set $X$ is a colimit over its category of simplices,
Proposition 3.6 shows that the canonical map

${\operatorname{sDist}(\pi)}$${\lim_{\Delta_{/X}^{\operatorname{op}}}D_{\pi}}$

is an isomorphism. By Lemma 3.8, however, we see that

$\lim_{\Delta_{/X}^{\operatorname{op}}}D_{\pi}\cong\lim_{\Delta_{/X}^{\operatorname{op}}}D_{R}\circ
F_{\pi}.$

When $X$ is a finite simplicial set and $R=\mathbb{R}_{\geq 0}$, Lemma B.2 in
the appendix shows that we may, instead, compute the limit as the limit over
$\left((\Delta_{/X})^{\leq n}\right)^{\operatorname{op}}$. Since this category
is finite, we may express the limit as an equalizer of finite products:

${\operatorname{sDist}(\pi)}$${\prod\limits_{\sigma}D(F_{\pi}(\sigma))}$${\prod\limits_{\psi:\sigma\to\tau}D(F_{\pi}(\tau))}$$\scriptstyle{s}$$\scriptstyle{t}$

where the former product is indexed over objects of $\left((\Delta_{/X})^{\leq
n}\right)^{\operatorname{op}}$, and the latter is indexed over morphisms of
$\left((\Delta_{/X})^{\leq n}\right)^{\operatorname{op}}$. Since each of the
$D(F_{\pi}(\sigma))$ are polytopes with finitely many vertices, this means
that $\operatorname{sDist}(\pi)$ is a subspace of a finite product of such
polytopes, specified by finitely many linear equations. Thus,
$\operatorname{sDist}(\pi)$ is a convex polytope with finitely many vertices,
as desired. ∎

###  3.4 The convolution product

We now make use of the monoidal structure on principal bundles to define a
global structure on simplicial distributions on $K$-bundles. To do this, we
first note that, for any simplicial sets $X,Y,Z\in\mathsf{sSet}$, and maps
$f:X\to Z$, $g:Y\to Z$, we have a canonical map

${D_{R}(X)\times D_{R}(Y)}$${D_{R}(X\times Y)}$${(p,q)}$${\left((x,y)\mapsto
p(x)q(y)\right).}$$\scriptstyle{m}$

Let $K$ be a simplicial Abelian group. For $K$-bundles $\pi_{E}:E\to X$ and
$\pi_{F}:F\to X$ form the composite

${\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})}$${\operatorname{sDist}(X,E)\times\operatorname{sDist}(X,F)}$${\operatorname{sDist}(X,E\times
F).}$$\scriptstyle{m}$

However, for any
$(p,q)\in\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})$,
$p(x)$ and $p(x)$ are supported on $\pi_{E}^{-1}(x)$ and $\pi_{F}^{-1}(x)$,
respectively. Thus, $m(p,q)(x)$ is supported on
$\pi_{E}^{-1}(x)\times\pi_{F}^{-1}(x)$. As a result, we see that we obtain a
map, abusively also denoted by $m$,

${m:}$${\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})}$${\operatorname{sDist}(E\times_{X}F\to
X).}$

The quotient map $E\times_{X}F\to E\otimes_{K}F$ induces a map on
distributions. Composing this with $m$, we obtain a map

${\mu:}$${\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})}$${\operatorname{sDist}(E\otimes_{K}F\to
X).}$

######  Definition 3.10.

The _convolution product of twisted distributions_ is the map

${\mu:}$${\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})}$${\operatorname{sDist}(E\otimes_{K}F\to
X).}$

We will often denote $\mu(p,q)$ by $p\ast q$.

We also note that, for the trivial bundle $K\times X\to X$, there is a
canonical choice of section $s_{0}:X\to K\times X$, which sends
$x\mapsto(0,x)$. We denote by $\varepsilon:\ast\to\operatorname{sDist}(K\times
X\to X)$ the map which sends $\ast$ to the deterministic distribution on
$s_{0}$.

######  Proposition 3.11.

The maps $\mu$ and $\varepsilon$ equip the functor

${\operatorname{sDist}:}$${\mathsf{Bun}_{K}(X)}$${\mathsf{Set}}$

with the structure of a lax symmetric monoidal functor.

###### Proof.

This is Proposition A.4 in the appendix. ∎

Applying the monoidal Grothendieck construction, we obtain

######  Corollary 3.12.

The Grothendieck construction $\int_{\mathsf{Bun}_{K}(X)}\operatorname{sDist}$
is equipped with a symmetric monoidal structure given by
$(\pi_{E},p)\boxtimes(\pi_{F},Q)=(E\otimes_{K}F,p\ast q)$ with unit $(K\times
X,\delta^{s_{0}})$. Thus, $\int_{\mathsf{Bun}_{K}(X)}\operatorname{sDist}$ is
a symmetric monoidal groupoid.

###### Proof.

This follows from [MV20, Thm 3.13]. ∎

######  Remark 3.13.

In [HS] and [HOS24], the authors of the present paper generalize the monoidal
Grothendieck construction of [MV20] to take as input generalizations of
monoidal functors into the category of convex sets. From this generalization,
the category $\int_{\mathsf{Bun}_{K}(X)}\operatorname{sDist}$ inherits
additional convex structure defined fiberwise. In particular, this structure
provides the monoid of Corollary 3.19 below a partially-defined convex
structure, which generalizes the convex monoids of distributions from [KO22].

Denote by $\mathsf{Bun}_{K}^{0}(X)$ the groupoid of trivial principal
$K$-bundles over $X$. Then we can note that, since a tensor product of trivial
bundles is trivial, $\mathsf{Bun}_{K}^{0}(X)$ is a symmetric monoidal
subcategory of $\mathsf{Bun}_{K}(X)$. We can define another functor

${\operatorname{Cl}:}$${\mathsf{Bun}_{K}^{0}(X)}$${\mathsf{Set}}$${\pi_{E}}$${D_{R}(\operatorname{Sec}(\pi_{E})).}$

We then define structure maps to equip $\operatorname{Cl}$ with the structure
of a lax monoidal functor. Firstly, given sections $\phi$ of $\pi_{E}$ and
$\psi$ of $\pi_{F}$, we obtain a canonical map

${(\phi,\psi):}$${X}$${E\times_{X}F}$

which is a section of $E\times_{X}F\to X$. composing this with the quotient
map, we obtain a section, which we abusively write

${\phi+\psi:}$${X}$${E\otimes_{K}F.}$

This construction provides a map

${\overline{\ell}:}$${\operatorname{Sec}(\pi_{E})\times\operatorname{Sec}(\pi_{F})}$${\operatorname{Sec}(\pi_{E\otimes
F}).}$

######  Lemma 3.14.

For $K$-valued twisting functions $\eta,\nu$ on $X$, and sections
$\phi(x)=(s(x),x)$ and $\psi(x)=(t(x),x)$ of $\pi_{\eta}$ and $\pi_{\nu}$,
respectively, the identification of
$(K\times_{\eta}X)\otimes_{K}(K\times_{\nu}X)$ with $K\times_{\eta+\nu}X$ from
the proof of Proposition 2.29 identifies $\phi+\psi$ with the section

${X}$${K\times_{\eta+\nu}X}$${x}$${(s(x)+t(x),x).}$

###### Proof.

Follows immediately from unwinding the definitions. ∎

Applying $D_{R}$, we then obtain a composite map

${\ell:}$${D_{R}(\operatorname{Sec}(\pi_{E}))\times
D_{R}(\operatorname{Sec}(\pi_{F}))}$${D_{R}(\operatorname{Sec}(\pi_{E})\times\operatorname{Sec}(\pi_{F}))}$${D_{R}(\operatorname{Sec}(\pi_{E\otimes
F})).}$$\scriptstyle{m}$$\scriptstyle{D_{R}(\overline{\ell})}$

Similarly, applying $D_{R}$ to the inclusion
$\ast\to\operatorname{Sec}(K\times X)$ of the zero section yields a map

${\ast\cong D_{R}(\ast)}$${D_{R}(\operatorname{Sec}(K\times
X)).}$$\scriptstyle{u}$

######  Proposition 3.15.

The maps $\ell$ and $u$ equip $\operatorname{Cl}$ with the structure of a lax
monoidal functor.

###### Proof.

This is Proposition A.5 in the appendix. ∎

For a trivial $K$-bundle $\pi_{E}:E\to X$, we now define a map

${\Theta_{E}:}$${D_{R}(\operatorname{Sec}(\pi_{E}))}$${\operatorname{sDist}(\pi_{E})}$

as follows. Given a distribution $p$ on sections of $\pi_{E}$, we define the
distribution $\Theta_{E}(p)$ by

$\Theta_{E}(p)_{x}(e)=\sum_{\phi\in\operatorname{Sec}(\pi_{E})}p(\phi)\delta_{\phi(x),e}.$

To see that this map is well-defined, we must show that $\Theta(p)_{x}$ is a
distribution, and $\Theta(p)$ is simplicial. The first follows because

$\displaystyle\sum_{e\in\phi_{E}^{-1}(x)}\Theta(p)_{x}(e)$
$\displaystyle=\sum_{e\in\phi_{E}^{-1}(x)}\sum_{\phi\in\operatorname{Sec}(\pi_{E})}p(\phi)\delta_{\phi(x),e}$
$\displaystyle=\sum_{\phi\in\operatorname{Sec}(\pi_{E})}\sum_{e\in\phi_{E}^{-1}(x)}p(\phi)\delta_{\phi(x),e}$
$\displaystyle=\sum_{\phi\in\operatorname{Sec}(\pi_{E})}p(\phi)=1.$

On the other hand, given a simplicial map $\theta:[n]\to[m]$ in $\Delta$, we
compute

$\displaystyle\theta^{\ast}(\Theta(p)_{x})(e)$
$\displaystyle=\sum_{\overline{e}\in(\theta^{\ast})^{-1}(e)}\Theta(p)_{x}(\overline{e})$
$\displaystyle=\sum_{\overline{e}\in(\theta^{\ast})^{-1}(e)}\sum_{\phi\in\operatorname{Sec}(\pi_{E})}p(\phi)\delta_{\phi(x),\overline{e}}$
$\displaystyle=\sum_{\phi\in\operatorname{Sec}(\pi_{E})}\sum_{\overline{e}\in(\theta^{\ast})^{-1}(e)}p(\phi)\delta_{\phi(x),\overline{e}}$
$\displaystyle=\sum_{\phi\in\operatorname{Sec}(\pi_{E})}p(\phi)\delta_{\phi(\theta^{\ast}(x)),e}$
$\displaystyle=\Theta(p)_{\theta^{\ast}(x)}(e).$

######  Lemma 3.16.

The maps $\Theta_{E}$ define a monoidal natural transformation from
$\operatorname{Cl}$ to $\operatorname{sDist}|_{\mathsf{Bun}_{K}^{0}(X)}$.

###### Proof.

Naturality in bundle isomorphisms is immediate. It thus remains to check
monoidalness of the transformation, i.e., the commutativity of the squares

${D_{R}(\operatorname{Sec}(\pi_{E}))\times
D_{R}(\operatorname{Sec}(\pi_{F}))}$${\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})}$${D_{R}(\operatorname{Sec}(\pi_{E\otimes
F}))}$${\operatorname{sDist}(\pi_{E\otimes
F})}$$\scriptstyle{\Theta_{E}\times\Theta_{F}}$$\scriptstyle{\ell}$$\scriptstyle{\mu}$$\scriptstyle{\Theta_{E\otimes
F}}$

Starting with a pair of distributions $p,q\in
D_{R}(\operatorname{Sec}(\pi_{E}))\times D_{R}(\operatorname{Sec}(\pi_{F}))$,
applying the definitions yields

$\Theta_{E\otimes
F}(\ell(p,q))_{x}([e,f])=\sum_{\phi\in\operatorname{Sec}(\pi_{E\otimes
F})}\left(\sum_{\psi_{E},\psi_{F}\text{s.t.}\overline{\ell}(\psi_{E},\psi_{F})=\phi}p(\psi_{E})q(\psi_{F})\right)\delta_{\phi(x),[e,f]}.$

Since the internal sum collapses, we can rewrite this as

$\Theta_{E\otimes
F}(\ell(p,q))_{x}([e,f])=\sum_{(\psi_{E},\psi_{F})\in\operatorname{Sec}(\pi_{E})\times\operatorname{Sec}(\pi_{F})}p(\psi_{E})q(\psi_{F})\delta_{\overline{\ell}(\psi_{E}(x),\psi_{F}(x)),[e,f]}.$

On the other hand, applying the definitions also yields

$\mu(\Theta_{E}(p),\Theta_{F}(q))_{x}([e,f])=\sum_{\overline{e},\overline{f}\text{
s.t.
}[\overline{e},\overline{f}]=[e,f]}\sum_{(\psi_{E},\psi_{F})\in\operatorname{Sec}(\pi_{E})\times\operatorname{Sec}(\pi_{F})}p(\psi_{E})q(\psi_{F})\delta_{\psi_{E}(x),\overline{e}}\delta_{\psi_{F}(x),\overline{f}}.$

However, $\overline{\ell}(\psi_{E},\psi_{F})(x)=[e,f]$ if and only if there
exist unique $\overline{e},\overline{f}$ such that
$[\overline{e},\overline{f}]=[e,f]$ and $\psi_{E}(x)=\overline{e}$ and
$\psi_{F}(x)=\overline{f}$. Thus, we can rewrite this sum as

$\mu(\Theta_{E}(p),\Theta_{F}(q))_{x}([e,f])=\sum_{(\psi_{E},\psi_{F})\in\operatorname{Sec}(\pi_{E})\times\operatorname{Sec}(\pi_{F})}p(\psi_{E})q(\psi_{F})\delta_{\overline{\ell}(\psi_{E},\psi_{F})(x),[e,f]}$

which shows that the square commutes. It is definitional that $\Theta_{K\times
X}\circ u=\epsilon$, completing the proof. ∎

######  Corollary 3.17.

There is a monoidal functor

${\Theta:}$${{\displaystyle\int_{\mathsf{Bun}^{0}_{K}(X)}}\operatorname{Cl}}$${{\displaystyle\int_{\mathsf{Bun}^{0}_{K}(X)}\operatorname{sDist}}.}$

###### Proof.

This follows from [MV20, Thm 3.13]. ∎

If we view the (commutative) monoid $\operatorname{Twist}_{K}(X)$ of twisting
functions on $X$ as a discrete symmetric monoidal category, we have the
following result.

######  Proposition 3.18.

The functor

${\operatorname{Twist}_{K}(X)}$${\mathsf{Bun}_{K}(X)}$${\eta}$${K\times_{\eta}X}$

is symmetric monoidal.

###### Proof.

This is Proposition A.6 in the appendix. ∎

######  Corollary 3.19.

The Grothendieck construction $\int_{\mathsf{Bun}_{K}(X)}\operatorname{sDist}$
restricts to a monoid $\int_{\operatorname{Twist}_{K}(X)}\operatorname{sDist}$
over $\operatorname{Twist}_{K}(X)$. More explicitly, this monoid is

$\int_{\operatorname{Twist}_{K}(X)}\operatorname{sDist}\cong\coprod_{\eta\in\operatorname{Twist}_{K}(X)}\operatorname{sDist}(\pi_{\eta})$

with multiplication $(\eta,p)\cdot(\xi,q)=(\eta\xi,p\ast q)$.

Similarly, if we restrict to the submonoid $\operatorname{Twist}_{K}^{0}(X)$
of twisting functions which yield trivial bundles, Corollary 3.17 then yields

######  Corollary 3.20.

The map

${\Theta:}$${{\displaystyle\coprod_{\eta\in\operatorname{Twist}_{K}^{0}(X)}D_{R}(\operatorname{Sec}(\pi_{\eta}))}}$${{\displaystyle\coprod_{\eta\in\operatorname{Twist}_{K}(X)}\operatorname{sDist}(\pi_{\eta})}}$

is a monoid homomorphism.

###  3.5 Equivariant distributions

We now provide a general construction of a morphism of bundle scenarios
associated to a pair of bundles $\pi_{E}:E\to X$ and $\pi_{F}:F\to X$.

Fix a simplicial Abelian group $K$. We will write the operation of $K$
multiplicatively to better accord with the standard notation for actions of
$K$ on other simplicial sets.

######  Definition 3.21.

Let $\pi_{E}:E\to X$ be a principal $K$-bundle, and let
$a,b\in\pi_{E}^{-1}(x)$ be elements in the same fiber. We define $ba^{-1}\in
K$ to be the unique element such that

$ba^{-1}\cdot a=b.$

######  Lemma 3.22.

Let $\pi_{E}:E\to X$ be a principal $K$-bundle, and let
$a,b,c\in\pi_{E}^{-1}(x)$ be elements in the same fiber. Then the following
computation rules hold.

  1. 1.

For $k\in K$, $(k\cdot b)a^{-1}=k(ba^{-1})$.

  2. 2.

$(ba^{-1})(ac^{-1})=bc^{-1}$.

  3. 3.

$(ba^{-1})^{-1}=ab^{-1}$.

  4. 4.

$aa^{-1}=1$.

###### Proof.

If $h\cdot a=b$, then $(kh)\cdot a=kb$. By the freeness of the $K$-action,
this implies $(k\cdot b)a^{-1}=k(ba^{-1})$, i.e., rule (1) holds. Similarly,
if $kc=a$ and $ha=b$, then $hkc=b$, so that rule (2) holds. Rule (3) is a
consequence of (2) and the uniqueness of inverses. Rule (4) holds since
$1\cdot a=a$ for any $a\in E$. ∎

Given two principal $K$-bundles $\pi_{E}:E\to X$ and $\pi_{F}:F\to X$, we can
form the commutative diagram

${E}$${E\times_{X}F}$${E\otimes_{K}F}$${X}$${F}$${X}$$\scriptstyle{\pi_{E}}$$\scriptstyle{\pi_{FE}}$$\scriptstyle{\pi_{EF}}$$\scriptstyle{\pi_{E\otimes
F}}$$\scriptstyle{\pi_{F}}$$\scriptstyle{\pi_{F}}$

where the upper rightward map is the quotient map. The right-hand square
induces a canonical map $E\times_{X}F\to(E\otimes_{K}F)\times_{X}F$ by the
universal property of pullback. We thus obtain a morphism of bundle scenarios

${E}$${E\times_{X}F}$${(E\otimes_{K}F)\times_{X}F}$${X}$${F}$${F.}$$\scriptstyle{\pi_{E}}$$\scriptstyle{\pi_{FE}}$$\scriptstyle{\pi_{EF}}$$\scriptstyle{\alpha}$$\scriptstyle{\pi_{2}}$$\scriptstyle{\pi_{F}}$$\scriptstyle{=}$

Explicitly, $\alpha$ sends $(e,f)$ to $([e,f],f)$.

This map of bundle scenarios induces a corresponding map on sets of simplicial
distributions, which we will denote by

${\gamma_{E,F}:}$${\operatorname{sDist}(\pi_{E})}$${\operatorname{sDist}(\pi_{2}).}$

Explicitly, given $p\in\operatorname{sDist}(\pi_{E})$, we compute

$\displaystyle\gamma_{E,F}(p)_{f}([e,j],\ell)$
$\displaystyle=\sum_{(u,v)\in\alpha^{-1}([e,j],\ell)}p_{\pi_{F}(f)}(u)\delta_{f,v}$
$\displaystyle=\sum_{u:[u,f]=[e,j]}p_{\pi_{F}(f)}(u)\delta_{f,\ell}$
$\displaystyle=\sum_{k:k^{-1}f=j}p_{\pi_{F}(f)}(k^{-1}e)\delta_{f,\ell}$

since $k$ acts freely transitively on $F$, there is a unique $k$ such that
$kj=f$. Denoting this $k$ by $(fj^{-1})$ as in Definition 3.21, we thus obtain

$\gamma_{E,F}(p)_{f}([e,j],\ell)=p_{\pi_{F}(f)}((jf^{-1})\cdot
e)\delta_{f,\ell}.$

We further note that the projection
$D_{R}(\pi_{1}):D_{R}((E\otimes_{K}F)\times_{X}F)\to D_{R}(E\otimes_{K}F)$
induces a map

${(\pi_{1})_{\ast}:}$${\operatorname{sDist}(\pi_{2})}$${\operatorname{sDist}(F,E\otimes_{K}F).}$

######  Lemma 3.23.

The map $(\pi_{1})_{\ast}\circ\gamma_{E,F}$ is injective. A simplicial
distribution $p:F\to D(E\otimes_{K}F)$ is in the image of
$(\pi_{1})_{\ast}\circ\gamma_{E,F}$ if and only if

  1. (1)

$p$ is $K$-equivariant and

  2. (2)

it makes the diagram

${D_{R}(E\otimes_{K}F)}$${F}$${D_{R}(X)}$$\scriptstyle{D_{R}(\pi_{E\otimes
F})}$$\scriptstyle{\delta\circ\pi_{F}}$$\scriptstyle{p}$

commute.

###### Proof.

We first show that the map $(\pi_{1})_{\ast}\circ\gamma_{E,F}$ is injective.
For brevity, let us write $\zeta=(\pi_{1})_{\ast}\circ\gamma_{E,F}$. Suppose
$p,q\in\operatorname{sDist}(\pi_{E})$ such that $\zeta(p)=\zeta(q)$. Then, for
any $f\in f$ and any $[e,j]\in E\otimes_{K}F$, we have

$\displaystyle\zeta(p)_{f}([e,j])$
$\displaystyle=p_{\pi_{F}(f)}((jf^{-1})\cdot
e)\delta_{\pi_{F}(f),\pi_{E\otimes F}([e,j])}$
$\displaystyle=q_{\pi_{F}(f)}((jf^{-1})\cdot
e)\delta_{\pi_{F}(f),\pi_{E\otimes F}([e,j])}$
$\displaystyle=\zeta(q)_{f}([e,j]).$

Given $x\in X$ and $g\in\pi_{E}^{-1}(x)$, we can choose any
$f\in\pi_{F}^{-1}(x)$. Applying the formulae above to $f$ and $[g,f]$. we
obtain

$\displaystyle\zeta(p)_{f}([g,f])$ $\displaystyle=p_{x}((ff^{-1})\cdot
g)\delta_{x,x}$ $\displaystyle=p_{x}(g)$

and similarly,

$\zeta(q)_{f}([g,f])=q_{x}(g).$

Thus, $p=q$, and the map is injective, as desired.

We then check that given $p\in\operatorname{sDist}(\pi_{E})$, $\zeta(p)$ has
the two requisite properties. The term $\delta_{\pi_{F}(f),\pi_{E\otimes
F}([e,j])}$ in the formula above shows that $\zeta(p)$ does indeed make the
desired diagram commute. To see equivariance, we let $k\in K$ and compute

$\displaystyle\zeta(p)_{k\cdot f}([e,j])$ $\displaystyle=p_{\pi_{F}(k\cdot
f)}((j(k\cdot f)^{-1})\cdot e)\delta_{\pi_{F}(k\cdot f),\pi_{E\otimes
F}([e,j])}$ $\displaystyle=p_{\pi_{F}(f)}(k^{-1}\cdot((jf^{-1})\cdot
e))\delta_{\pi_{F}(f),\pi_{E\otimes F}([e,j])}$
$\displaystyle=(\delta_{k}\ast\zeta(p)_{f})([e,j])$

so that the map is equivariant.

Finally, given $p:F\to D_{R}(E\otimes_{K}F)$ satisfying our two conditions,
define a simplicial distribution
$\overline{p}\in\operatorname{sDist}(\pi_{E})$ defined by

$\overline{p}_{x}(g)=\begin{cases}p_{f}([g,f])&\pi_{E}(g)=x\\\
0&\text{else},\end{cases}$

where $f\in F$ is any element such that $\pi_{F}(f)=x$. To see that this is
well defined, note that, choosing another element $k\cdot f$, we have

$p_{kf}([g,kf])=\delta_{k}\ast
p_{f}([g,kf])=p_{f}(k^{-1}[g,kf])=p_{f}([g,k^{-1}kf])=p_{f}([g,f])$

so that $\overline{p}_{x}(g)$ is well-defined. Similarly, we can compute

$D_{R}(\pi_{E})(\overline{p}_{x})(y)=\sum_{e\in\pi_{E}^{-1}(y)}\overline{p}_{x}(e)=\delta_{x,y}\sum_{e\in\pi_{E}^{-1}(x)}p_{f}([e,f])$

where we can choose a fixed $f\in\pi_{F}^{-1}(x)$ for the last formula. Since
there is a bijection between pairs $(e,f)$ with $e\in\pi_{E}^{-1}(x)$ for
fixed $f$ and equivalence classes $[e,f]\in\pi_{E\otimes F}^{-1}(x)$, the
latter sum can be written as

$\delta_{x,y}\sum_{[e,j]\in\pi_{E\otimes
F}^{-1}(x)}p_{f}([e,j])=\delta_{x,y}.$

Thus, the diagram

${D_{R}(E)}$${X}$${D_{R}(X)}$$\scriptstyle{D_{R}(\pi_{E})}$$\scriptstyle{\delta}$$\scriptstyle{\overline{p}}$

commutes, and $\overline{p}\in\operatorname{sDist}(\pi_{E})$.

Finally, we compute

$\displaystyle\zeta(\overline{p})_{f}([e,j])$
$\displaystyle=\overline{p}_{\pi_{F}(f)}((jf^{-1})\cdot
e)\delta_{\pi_{F}(f),\pi_{E\otimes F}([e,j])}$
$\displaystyle=p_{f}([(jf^{-1})\cdot e,f])$
$\displaystyle=p_{f}([e,(jf^{-1})\cdot f])=p_{f}([e,j])$

so that $\zeta(\overline{p})=p$. ∎

######  Definition 3.24.

For $F,B$ simplicial sets equipped with $K$-actions, we denote by
$\operatorname{sDist}_{K}(F,B)$ the set of $K$-equivariant simplicial
distributions $F\to D_{R}(B)$, where $D_{R}(B)$ is equipped with the $K$
action given by

$k\cdot p=\delta_{k}\ast p.$

For $\chi:F\to X$ and $\beta:B\to X$ two $K$-equivariant simplicial maps, we
denote by
$\operatorname{sDist}_{K}^{X}(F,B)\subset\operatorname{sDist}_{K}(F,B)$ the
subset of those equivariant distributions $p$ such that the diagram

${D_{R}(B)}$${F}$${D_{R}(X)}$$\scriptstyle{D_{R}(\beta)}$$\scriptstyle{\delta\circ\chi}$$\scriptstyle{p}$

commutes.

######  Theorem 3.25.

For a $K$-valued twisting function $\eta$ on $X$, there is a bijection

$\operatorname{sDist}(\pi_{\eta})\cong\operatorname{sDist}_{K}(K\times_{\eta^{-1}}X,K)$

given on elements by sending $p:X\to K\times_{\eta}X$ to the distribution
$\widetilde{p}$ with

$\widetilde{p}_{k,x}(h)=p_{x}(hk^{-1},x).$

###### Proof.

The canonical isomorphism

${(K\times_{\eta}X)\otimes_{K}(K\times_{\eta^{-1}}X)}$${K\times
X}$${{[(h,x),(k,x)]}}$${(hk,x)}$$\scriptstyle{\cong}$

induces an isomorphism

$\operatorname{sDist}_{K}^{X}(K\times_{\eta^{-1}}X,(K\times_{\eta}X)\otimes_{K}(K\times_{\eta^{-1}}X))\cong\operatorname{sDist}_{K}^{X}(K\times_{\eta^{-1}}X,K\times
X).$

Applying Lemma 3.23, we obtain a bijection

$\operatorname{sDist}(\pi_{\eta})\cong\operatorname{sDist}_{K}^{X}(K\times_{\eta^{-1}}X,K\times
X)$

which sends $p\in\operatorname{sDist}(\pi_{\eta})$ to the distribution
$\overline{p}$ defined by

$\overline{p}_{(k,x)}(h,y)=\delta_{x,y}p_{x}(k^{-1}h,x).$

Since $K\times X$ is an untwisted product, there is a canonical isomorphism

$\operatorname{sDist}_{K}^{X}(K\times_{\eta^{-1}}X,K\times
X)\cong\operatorname{sDist}_{K}(K\times_{\eta^{-1}}X,K)$

completing the proof. ∎

######  Example 3.26.

Key examples of twisted distributions come from quantum theory. See for
example [Wat18] for basic definitions. Let $\mathcal{H}$ denote a finite-
dimensional Hilbert space. We will write $\operatorname{Proj}(\mathcal{H})$
for the set of projectors. Analogous to the distribution functor we can define
a functor

${P_{\mathcal{H}}:}$${\mathsf{Set}}$${\mathsf{Set}}$

which sends $X$ to the set of projective measurements

$P_{\mathcal{H}}(X)=\left\\{\Pi:X\to\operatorname{Proj}(\mathcal{H})\;\mid\;\Pi\text{
{with finite support}, }\sum_{x\in X}\Pi(x)=\mathbb{1}\right\\}$

and sends $f:X\to Y$ to the map

${P_{\mathcal{H}}(f):}$${P_{\mathcal{H}}(X)}$${P_{\mathcal{H}}(Y)}$${\Pi}$${\left(y\mapsto{\displaystyle\sum_{x\in
f^{-1}(y)}}\Pi(x)\right).}$

We can easily extend this functor to simplicial sets. Given a density operator
$\rho$ (positive and trace $1$ linear operator), also called a quantum state,
we have a natural transformation

${\rho_{*}:}$${P_{\mathcal{H}}}$${D}$

whose components are given by $(\rho_{*})_{Y}:P_{\mathcal{H}}(Y)\to D(Y)$ that
sends $\Pi\mapsto(y\mapsto\operatorname{Tr}(\rho\Pi(y)))$. For a simplicial
group $K$ the corresponding map $P_{\mathcal{H}}(K)\to D(K)$ is in fact
$K$-equivariant. We can see this distribution as a twisted distribution. For a
group $G$ the set $P_{\mathcal{H}}(G)$ admits a natural $G$ action: For $g\in
G$ and $\Pi\in P_{\mathcal{H}}(G)$ we have $g\cdot\Pi(h)=\Pi(g^{-1}\cdot h)$.
Then we define

$\bar{P}_{\mathcal{H}}(G)=P_{\mathcal{H}}(G)/\sim$

to be the quotient under this action. For simplicial sets the quotient gives a
principal $K$-bundle

${\pi:}$${P_{\mathcal{H}}(H)}$${\bar{P}_{\mathcal{H}}(K).}$ (3)

Thus the isomorphism in Theorem 3.25 allows us to obtain a twisted
distribution

${D(P_{\mathcal{H}}(K))}$${\bar{P}_{\mathcal{H}}(K)}$${D(\bar{P}_{\mathcal{H}}(K))}$$\scriptstyle{D(\pi)}$$\scriptstyle{\delta}$$\scriptstyle{p_{\rho}}$

An important special case is $K=N\mathbb{Z}_{d}$. Then there is an alternative
description of $P_{\mathcal{H}}(N\mathbb{Z}_{d})$. For a group $G$, let us
write $N(\mathbb{Z}_{d},G)\subset NG$ for the simplicial subset consisting of
$n$-simplices given by $n$-tuples $(g_{1},\cdots,g_{n})$ of pairwise commuting
group elements such that $g_{i}^{d}=1$ for every $i$. For the unitary group
$U(\mathcal{H})$, the spectral decomposition of the commuting tuples of
operators give an isomorphism of simplicial sets

${N(\mathbb{Z}_{d},U(\mathcal{H}))}$${P_{\mathcal{H}}(N\mathbb{Z}_{d}).}$$\scriptstyle{\cong}$

The simplicial group $N\mathbb{Z}_{d}$ acts freely on
$N(\mathbb{Z}_{d},U(\mathcal{H}))$ via the canonical inclusion induced by
$1\mapsto e^{2\pi/d}\mathbb{1}$. Then the isomorphism above extends to an
isomorphism of principal bundles

${N(\mathbb{Z}_{d},U(\mathcal{H}))}$${P_{\mathcal{H}}(N\mathbb{Z}_{d})}$${\bar{N}(\mathbb{Z}_{d},U(\mathcal{H}))}$${\bar{P}_{\mathcal{H}}(N\mathbb{Z}_{d})}$$\scriptstyle{\cong}$$\scriptstyle{\cong}$

where the left vertical map is the quotient just described.

##  4 Contextuality

In this section we introduce the notion of contextuality for simplicial
distributions. We follow the framework of [BKO23]. To this end it is useful to
introduce the interpretation of the simplicial sets involved. Given a
simplicial set map $f:E\to X$, the base space represents the measurement
space. The fiber $x^{*}(E)$ over a simplex $x:\Delta^{n}\to X$ corresponding
to a measurement, represents the space of outcomes. Any physical experiment
whose measurements and outcomes are discretely labeled can be described in
this way; see [OKI23] for more details.

######  Definition 4.1.

A simplicial distribution $p$ on $f:E\to X$ is called _non-contextual_ if it
lies in the image of

$\Theta:D_{R}(\operatorname{Sec}(f))\to\operatorname{sDist}(f).$

Otherwise, it is called _contextual_.

When $\eta\sim 0$ the bundle ${K\times_{\eta}X}\to X$ is isomorphic to the
projection map $\pi_{2}:K\times X\to X$. In this case simplicial distributions
on $\pi_{2}$ can be identified with simplicial set maps $X\to D_{R}({K})$
recovering the original definition of contextuality in [OKI23].

The difficulty in studying contextuality for twisted distributions is that,
unless $\eta\sim 0$, the set $\operatorname{Sec}(\pi_{\eta})$ is empty. As a
result, in most interesting cases, there are no “obvious” classical
distributions. To address this, we examine distributions locally666Here,
“local” is used in the topological sense as the opposite of “global.” Note
that in the physics context, the word “local” is also used for a special case
of non-contextuality. To avoid confusion, we will use the word “relative” in
the topological context.. Throughout, fix a simplicial group $K$ and a
$K$-principal bundle $\pi:E\to X$.

######  Definition 4.2.

A morphism $\phi:U\to X$ of simplicial sets is called _trivializing_ (or
_$\pi$ -trivializing_, when the bundle is not clear from context) when the
pullback $E\times_{X}U\to U$ of $\pi:E\to X$ along $\phi$ is a trivial bundle.

If $\phi:U\to X$ is a $\pi$-trivializing morphism, we will call a simplicial
distribution $p\in\operatorname{sDist}(\pi)$ _$\phi$ -relatively non-
contextual_ if $\psi^{\phi}_{E}(p)$ is non-contextual (here, $\psi^{\phi}_{E}$
is the map of Proposition 3.5). Note that since the restriction maps are
convex, the set of $\phi$-relatively non-contextual distributions is itself a
convex subset of $\operatorname{sDist}(\pi)$. We will call $p$ _$\phi$
-relatively deterministic_ if $\psi^{\phi}_{E}(p)$ is deterministic.

######  Example 4.3.

Basic examples of trivializing simplicial set maps that prove to be useful in
applications are as follows.

  1. 1.

Given a subset $U\subset X$ such that $U$ is weakly contractible, the morphism
$U\to X$ is $\pi$-trivializing for every $K$-bundle over $X$.

  2. 2.

A collection $\mathcal{U}:=\\{U_{i}\\}_{i=1}^{k}$ of subsets of $X$ is called
a _cover_ of $X$ if the canonical map

${\phi:}$${{\displaystyle\coprod_{i=1}^{k}}U_{i}}$${X}$

is surjective. If each inclusion $U\to X$ is $\pi$-trivializing, than so is
$\phi$, in which case we say that $\mathcal{U}$ is a _$\pi$ -trivializing
cover_.

  3. 3.

By the definition of a principal $K$-bundle, the square

${K\times
X}$${E}$${E}$${X}$$\scriptstyle{\operatorname{pr}_{2}}$$\scriptstyle{\pi}$$\scriptstyle{\pi}$

is pullback. Thus, the morphism $\pi$ is always $\pi$-trivializing.

###  4.1 Twisting and collapsing

In the case where $K=N(H)$ is the nerve of an Abelian group, one may relate
distributions with specified deterministic behavior on a simplicial subset of
the measurement space to twisted distributions on the corresponding quotient.
To this end, let us fix an Abelian group $H$, a measurement space
$X\in\mathsf{sSet}$, a simplicial subset $Z\subset X$, and a normalized
2-cocycle $\alpha:X_{2}\to H$. For $\pi_{\eta}:K\times_{\eta}X\to X$, it will
be convenient to write
$\operatorname{sDist}_{\eta}(X)=\operatorname{sDist}(\pi_{\eta})$ and
$\operatorname{Sec}_{\eta}(X)=\operatorname{Sec}(\pi_{\eta})$. To emphasize
that $\eta$ comes from a cocycle $\alpha$ we will sometimes use the notation
$\operatorname{sDist}_{\alpha}(X)$ and $\operatorname{Sec}_{\alpha}(X)$,
respectively.

We will be working with the cofiber sequence

${Z}$${X}$${X/Z}$$\scriptstyle{i}$$\scriptstyle{j}$

of simplicial sets throughout, and the corresponding short exact sequence of
$H$-valued cochain complexes777Note that this sequence is _not_ actually exact
in degree $0$, as the short exact sequence on cohomology only holds for
relative cohomology. However, we will not at any point make use of
$0$-cochains, and so it is sufficient for us to look at the truncated cochain
complexes presented here.

${{C}_{1}(X/Z,H)}$${{C}_{1}(X,H)}$${{C}_{1}(Z,H)}$${{C}_{2}(X/Z,H)}$${{C}_{2}(X,H)}$${{C}_{2}(Z,H)}$${\vdots}$${\vdots}$${\vdots}$$\scriptstyle{j^{\ast}}$$\scriptstyle{\partial}$$\scriptstyle{i^{\ast}}$$\scriptstyle{\partial}$$\scriptstyle{\partial}$$\scriptstyle{j^{\ast}}$$\scriptstyle{\partial}$$\scriptstyle{i^{\ast}}$$\scriptstyle{\partial}$$\scriptstyle{\partial}$

First, let us assume that $i^{\ast}(\alpha)=0$. Then there is a unique
2-cocycle $\beta:(X/Z)_{2}\to H$ such that $j^{\ast}(\beta)=\alpha$. Denote by
$\eta$ the twisting function on $X/Z$ corresponding to $\beta$, and note that,
defining $\eta|_{X}=\eta\circ j$ , we have that $\eta|_{X}$ is the twisting
function corresponding to $\alpha$. We thus obtain a commutative diagram

${NH\times
Z}$${NH\times_{\eta|_{X}}X}$${NH\times_{\eta}X/Z}$${Z}$${X}$${X/Z}$$\scriptstyle{\operatorname{pr_{2}}}$$\scriptstyle{\pi_{\alpha}}$$\scriptstyle{\pi_{\eta}}$$\scriptstyle{i}$$\scriptstyle{j}$

in which each square is pullback, and the $N(H)$-components of the top
morphisms are identities. By the functoriality of simplicial distributions on
$\mathsf{bScen}_{N(H)}$, this provides a sequence of maps of convex sets of
twisted distributions

${\operatorname{sDist}_{\eta}(X/Z)}$${\operatorname{sDist}_{\eta|_{X}}(X)}$${\operatorname{sDist}_{0}(Z).}$$\scriptstyle{j^{\ast}}$$\scriptstyle{i^{\ast}}$

Since we can consider the delta distribution $\delta^{\varphi_{0}}$ on the
zero section $\varphi_{0}$ as a basepoint of $\operatorname{sDist}_{0}(Z)$, it
is possible to define the kernel of $i^{\ast}$, and thus, it is possible to
ask whether this sequence is short exact.

######  Lemma 4.4.

The induced sequence

${\operatorname{sDist}_{\eta}(X/Z)}$${\operatorname{sDist}_{\eta|_{X}}(X)}$${\operatorname{sDist}_{0}(Z)}$$\scriptstyle{j^{\ast}}$$\scriptstyle{i^{\ast}}$

of convex sets is left-exact.

###### Proof.

We first note that $j\circ i:Z\to X/Z$ factors through the one-point space
$\Delta^{0}$. Since there is a unique $0$-twisted distribution on $\Delta^{0}$
(the delta on the zero section), and the map $Z\to\Delta^{0}$ induces a
pullback square sending this distribution to $\delta^{\varphi_{0}}$, we see
that any $p\in\operatorname{sDist}_{\eta}(X/Z)$ satisfies

$i^{\ast}(j^{\ast}(p))=\delta^{\varphi_{0}}.$

On the other hand, suppose that $p\in\operatorname{sDist}_{\eta|_{X}}(X)$ is a
distribution such that $i^{\ast}(p)=\delta^{\varphi_{0}}$. This means the
composite map

${q:}$${Z}$${X}$${D_{R}(NH\times_{\eta_{X}}X)}$$\scriptstyle{i}$$\scriptstyle{p}$

satisfies

$q_{z}(h,x)=\delta_{h,0}\delta_{z,x}$

for any $z\in Z$ and $h\in N(H)$. We then define a putative twisted
distribution $\tilde{p}\in\operatorname{sDist}_{\eta}(X/Z)$ by setting

$\tilde{p}_{x}(h,x)=p_{\tilde{x}}(h,\tilde{x})$

for some chosen $\tilde{x}$ such that $j(\tilde{x})=x$. Note that it does not
matter which $\tilde{x}$ we choose, so long as the choices are consistent. It
is immediate that

$\sum_{h\in N(H)}\tilde{p}_{x}(h,x)=\sum_{h\in
N(H)}{p}_{\tilde{x}}(h,\tilde{x})=1$

so that this is, indeed a distribution. It remains for us to show it is
simplicial.

By definition of the quotient, there is a unique 0-simplex $z\in X/Z$ such
that $j\circ i$ factors through $z$. It is immediate from the definitions that
$\tilde{p}_{x}(h,x)$ is compatible with degeneracy maps when $x$ is not
degenerate on $z$, and compatible with all face maps $d_{i}$ such that
$d_{i}(x)$ is not degenerate on $z$. We thus have three cases to consider.

  * •

First, let $\phi$ be a surjective map in $\Delta$. Then

$\tilde{p}_{d_{i}(\phi^{\ast}(z))}(h,x)=\delta_{h,0}\delta_{\phi^{\ast}(z),x}$

and similarly,

$\displaystyle d_{i}(\tilde{p}_{\phi^{\ast}(z)})(d,x)$
$\displaystyle=\sum_{(k,y)\in d_{i}^{-1}(h,x)}\tilde{p}_{\phi^{\ast}(z)}(k,y)$
$\displaystyle=\sum_{(k,y)\in
d_{i}^{-1}(h,x)}p_{\widetilde{\phi^{\ast}(z)}}(k,\tilde{y})$
$\displaystyle=\sum_{(k,y)\in d_{i}^{-1}(h,x),\tilde{y}\in
Z}p_{\widetilde{\phi^{\ast}(z)}}(k,\tilde{y})+\sum_{(k,y)\in
d_{i}^{-1}(h,x),\tilde{y}\notin Z}p_{\widetilde{\phi^{\ast}(z)}}(k,\tilde{y})$
$\displaystyle=\sum_{(k,y)\in d_{i}^{-1}(h,x),\tilde{y}\in
Z}p_{\widetilde{\phi^{\ast}(z)}}(k,\tilde{y})$ $\displaystyle=\sum_{(k,y)\in
d_{i}^{-1}(h,x),\tilde{y}\in
Z}\delta_{k,0}\delta_{\tilde{y},\widetilde{\phi^{\ast}(z)}}$
$\displaystyle=\delta_{h,0}\delta_{\phi^{\ast}(z),x}.$

  * •

A similar computation to the above holds for the $\phi^{\ast}(z)$ and a
degeneracy map $s_{i}$.

  * •

The final case is that $x\notin Z$, but $d_{i}(x)=\phi^{\ast}(z)$ for a
surjective map $\phi$ in $\Delta$. In this case, we can compute

$\displaystyle d_{i}(\tilde{p}_{x})(h,y)$ $\displaystyle=\sum_{(k,w)\in
d_{i}^{-1}(h,y)}\tilde{p}_{x}(k,w)$ $\displaystyle=\sum_{(k,w)\in
d_{i}^{-1}(h,y)}p_{\tilde{x}}(k,\tilde{w})$ $\displaystyle=\sum_{(k,u)\in
d_{i}^{-1}(h,\tilde{y})}p_{\tilde{x}}(k,u)$
$\displaystyle=p_{d_{i}(\tilde{x})}(h,\tilde{y})$
$\displaystyle=\tilde{p}_{d_{i}(x)}(h,y).$

By construction $j^{\ast}(\tilde{p})=p$, thus proving exactness at the middle
term. It is immediate that $j^{\ast}$ is injective, completing the proof. ∎

We denote by $\operatorname{sDist}_{\eta}(X,0)$ the (convex) set of
$\eta$-twisted distributions on $X$ which satisfy
$i^{\ast}(p)=\delta^{\varphi_{0}}$.

######  Theorem 4.5.

There is a convex isomorphism

$\operatorname{sDist}_{\eta}(X/Z)\cong\operatorname{sDist}_{\eta}(X,0).$

Note that this isomorphism respects contextuality. Let
$\operatorname{Sec}_{\eta}(X,0)$ denote the set of sections $\varphi$ which
satisfy $\varphi\circ i=\varphi_{0}$. We have a commutative diagram

${D_{R}(\operatorname{Sec}_{\eta}(X,0))}$${\operatorname{sDist}_{\eta}(X,0)}$${D_{R}(\operatorname{Sec}_{\eta}(X/Z))}$${\operatorname{sDist}_{\eta}(X/Z)}$$\scriptstyle{\Theta}$$\scriptstyle{\cong}$$\scriptstyle{\cong}$$\scriptstyle{\Theta}$

We now modify our setup slightly, assuming not that $i^{\ast}(\alpha)=0$, but
rather that $[i^{\ast}(\alpha)]=0$. We choose a normalized 1-cochain
$\nu:Z_{1}\to H$ such that $\partial\nu=\alpha$, and define a normalized
1-cochain on $X$ by

$\tilde{\nu}(x)=\begin{cases}\nu(x)&x\in Z_{1}\\\ 0&\text{else}.\end{cases}$

Then $i^{\ast}(\alpha-\partial\tilde{\nu})=0$, so that we can again find a
normalized 2-cocycle $\beta:(X/Z)_{2}\to H$ such that
$j^{\ast}(\beta)=\alpha-\partial\tilde{\nu}$.

We can then apply Theorem 4.5 to $\alpha-\partial\tilde{\nu}$, obtaining a
convex isomorphism

$\operatorname{sDist}_{\beta}(X/Z)\cong\operatorname{sDist}_{\alpha-\partial\tilde{\nu}}(X,0),$
(4)

where we emphasize the $2$-cocycle in the notation. We will use the monoid
homomorphism of Corollary 3.17

${\Theta:}$${{\displaystyle\coprod_{\eta\in\operatorname{Twist}_{K}(X)}}D_{R}(\operatorname{Sec}(\pi_{\eta}))}$${{\displaystyle\coprod_{\eta\in\operatorname{Twist}_{K}(X)}}\operatorname{sDist}_{\eta}(X).}$

In particular, the delta distributions on sections of trivial bundles are
invertible in the convex monoid of twisted distributions. Specializing to
twistings coming from cocycles and denoting by
$\operatorname{sDist}_{\alpha}(X,\nu)$ the $\alpha$-twisted distributions on
$X$ which restrict to $\delta^{\varphi_{\nu}}$ on $Z$, we then obtain the
following.

######  Corollary 4.6.

There is a convex isomorphism

$\operatorname{sDist}_{\beta}(X/Z)\cong\operatorname{sDist}_{\alpha}(X,\nu).$

###### Proof.

By isomorphism (4), it is sufficient to show that there is a convex
isomorphism

$\operatorname{sDist}_{\alpha}(X,\nu)\cong\operatorname{sDist}_{\alpha-\partial\widetilde{\nu}}(X,0).$

However, $\delta^{\varphi_{-\partial\widetilde{\nu}}}$ is an invertible
element of the monoid of twisted distributions, with inverse
$\delta^{\varphi_{\partial\widetilde{\nu}}}$. Multiplying
$p\in\operatorname{sDist}_{\alpha}(X,\nu)$ by
$\delta^{\varphi_{-\partial\widetilde{\nu}}}$ yields

$p\cdot\delta^{\varphi_{-\partial\widetilde{\nu}}}\in\operatorname{sDist}_{\alpha-\partial\widetilde{\nu}}(X,0)$

and since $\delta^{\varphi_{-\partial\widetilde{\nu}}}$ is invertible, this
map is an isomorphism, completing the proof. ∎

The isomorphism in Corollary 4.6 restricts to a bijection of deterministic
distributions. Writing $\operatorname{Sec}_{\alpha}(X,\nu)$ for sections that
restrict to $\varphi_{\nu}$ on $Z$, we have a commutative diagram

${D_{R}(\operatorname{Sec}_{\alpha}(X,\nu))}$${\operatorname{sDist}_{\alpha}(X,\nu)}$${D_{R}(\operatorname{Sec}_{\beta}(X/Z))}$${\operatorname{sDist}_{\beta}(X/Z)}$$\scriptstyle{\Theta}$$\scriptstyle{\cong}$$\scriptstyle{\cong}$$\scriptstyle{\Theta}$

This diagram can be used to analyze contextuality by collapsing a subspace at
the cost of twisting the distributions. Some key examples in the case of $X$
is a $2$-dimensional simplicial complex are worked out in [Oka23].

###  4.2 The Mermin polytope

In this section we study a small example in full detail. This example is the
paradigmatic example of contextual quantum distributions first introduced by
Mermin [Mer93]. Later in [ORBR17] this construction is turned into a
topological one, and finally in [OCI23] the distributions on this scenario are
introduced and their contextual behavior are studied.

We let $M$ denote the measurement space of the Mermin scenario, that is, the
simplicial set

$f$$g$$f$$g$$u$$b$$c$$w$$a$$h$$v$$\sigma$$\eta$$\gamma$$\tau$$\mu$$\xi$

whose realization is a torus. Let $\beta:M_{2}\to\mathbb{Z}_{2}$ be the
2-cocycle which assigns $1$ to $\sigma$, $\eta$, and $\mu$, and $0$ otherwise.
Let $\pi_{\beta}:E_{\beta}\to M$ be the bundle represented by $\beta$.

######  Remark 4.7.

Consider the $2\times 2$ Pauli matrices

$X=\left(\begin{matrix}0&1\\\
1&0\end{matrix}\right)\;\;\;Y=\left(\begin{matrix}0&-i\\\
i&0\end{matrix}\right)\;\;\;Z=\left(\begin{matrix}1&0\\\
0&-1\end{matrix}\right).$

We can define a simplicial set map

${\phi:}$${M}$${\bar{N}(\mathbb{Z}_{2},U((\mathbb{C}^{2})^{\otimes 2}))}$

by sending the $1$-simplices to the equivalence class (under $\pm\mathbb{1}$)
of the following matrices

$f\mapsto Z\otimes X,\;\;\;u\mapsto X\otimes Y,\;\;\;g\mapsto Y\otimes
X,\;\;\;w\mapsto X\otimes Z.$

Then $\pi_{\beta}$ is precisely the pull-back of
$N(\mathbb{Z}_{2},U((\mathbb{C}^{2})^{\otimes
2}))\to\bar{N}(\mathbb{Z}_{2},U((\mathbb{C}^{2})^{\otimes 2}))$ along $\phi$.

We borrow a definition from [OCI23], presented using the language of
simplicial sets.

######  Definition 4.8.

A simplicial subset $U\subset M$ is called _closed_ if, whenever $U$ contains
two edges of a 2-simplex $\sigma$, then $U$ contains the 2-simplex $\sigma$. A
simplicial subset $U\subset M$ is called _non-contextual_ if there is a
1-cochain $s:U_{1}\to\mathbb{Z}_{2}$ such that $\partial(s)=\beta|_{U}$.

######  Lemma 4.9.

A simplicial subset $U\subset M$ is non-contextual if and only if it is
$\pi_{\beta}$-trivializing.

###### Proof.

This is simply the bijection between second cohomology classes and isomorphism
classes of bundles. That is, a non-contextual subset $U\subset N$ is precisely
one on which the cocycle $\beta|_{U}$ vanishes in cohomology. This is
equivalent to the restricted bundle $U\times_{M}E_{\beta}$ being represented
by the zero class in cohomology, and thus being trivial. ∎

Consider the simplicial set $\widetilde{M}$ whose $n$-simplices consist of an
$n$-simplex $\sigma$ in $M$ and a map

$f:\operatorname{sk}_{1}(\sigma)\to N(\mathbb{Z}_{2})$

where $\operatorname{sk}_{1}(\sigma)$ denotes the 1-skeleton of $\sigma$.

######  Lemma 4.10.

The simplicial set $\widetilde{M}$ is relatively 1-coskeletal over $M$.

###### Proof.

By construction, a simplex in $\widetilde{M}$ is uniquely determined by its
1-skeleton and the underlying simplex in $M$. The 1-coskeletal lifting problem
follows immediately. ∎

We define a map on 2-truncations

${\operatorname{tr}_{2}E_{\beta}}$${\operatorname{tr}_{2}\widetilde{M}}$${\operatorname{tr}_{2}(M)}$$\scriptstyle{\pi_{\beta}}$$\scriptstyle{\xi}$

as follows.

On both sides, the $0$-simplices are precisely those of $M$, and so we define
the map on $0$-simplices to be the identity. On $1$-simplices, we send a pair
$(\sigma,g)$ to the pair $(\sigma,g)$. On 2-simplicies, given
$(\sigma,(g_{0,1},g_{1,2}))$, we send it to the simplex $\sigma$ with the map
on the $1$-skeleton given by

${\ast}$${\ast}$${\ast.}$$\scriptstyle{g_{1,2}+\beta(\sigma)}$$\scriptstyle{g_{0,1}}$$\scriptstyle{g_{0,1}+g_{1,2}}$

######  Lemma 4.11.

The map $\xi$ is a morphism of $2$-truncated simplicial sets.

###### Proof.

We check the simplicial identities. For the face and degeneracy maps between
$0$-simplices and $1$-simplices, it is immediate that $\xi$ commutes with the
maps.

Let $(\sigma,\\{g_{0,1},g_{1,2}\\})$ be a $2$-simplex of $E_{\beta}$. Then by
definition

$d_{0}(\xi(\sigma,\\{g_{0,1},g_{1,2}\\}))=(d_{0}(\sigma),g_{1,2}+\beta(\sigma))=\xi(d_{0}(\sigma),g_{1,2}+\beta(\sigma))=\xi(d_{0}(\sigma,\\{g_{0,1},g_{1,2}\\})).$

The relations with $d_{1}$, $d_{2}$, $s_{0}$, and $s_{1}$ are immediate (since
$\beta$ is normalized, the $\beta(\sigma)$ in the definition of the map $\xi$
vanishes for degenerate $\sigma$). ∎

######  Lemma 4.12.

The map $\xi$ is injective, and its image consists of all $0$\- and
$1$-simplices, together with those 2-simplices
$(\sigma,g_{0,1},g_{1,2},g_{0,2})$ satisfying

$g_{0,1}+g_{1,2}+g_{0,2}=\beta(\sigma).$

###### Proof.

Injectivity is immediate from the definitions. Since every element of
$\mathbb{Z}_{2}$ is 2-torsion, it is similarly immediate that the 2-simplices
in the image of $\xi$ satisfy the given condition.

On the other hand, let $(\sigma,g_{0,1},g_{1,2},g_{0,2})$ be a 2-simplex of
$\widetilde{M}$ satisfying

$g_{0,1}+g_{1,2}+g_{0,2}=\beta(\sigma).$

Then $(\sigma,\\{g_{0,1},g_{1,2}-\beta(\sigma)\\})$ is a 2-simplex of
$E_{\beta}$ which maps to the specified 2-simplex of $\widetilde{M}$. ∎

We now denote by $\overline{M}$ the unique relative 2-coskeletal extension
over $M$ of the image of $\xi$.

######  Corollary 4.13.

The map $\xi$ induces an isomorphism over $M$ between $E_{\beta}$ and
$\overline{M}$.

The original construction in [Mer93] uses a different representation. Let us
write $\mathcal{M}$ for the set of non-degenerate $1$-simplices and
$\mathcal{C}$ for the set of non-degenerate $2$-simplices of $M$. Here the
elements of the first set represent measurements and those of the second set
are referred to as contexts. The same information contained in the torus
picture above can be depicted as a hypergraph:

$f$$c$$w$$h$$v$$a$$u$$b$$g$$\tau$$\xi$$\gamma$$\sigma$$\eta$$\mu$

Here, the red circles correspond precisely to those triangles on which the
cocycle $\beta$ does not vanish.

######  Definition 4.14.

For $C\in\mathcal{C}$ a context in the classical Mermin square scenario
$(\mathcal{M},\mathcal{C})$, we define

$O_{\beta}(C):=\left\\{s:C\to\mathbb{Z}_{2}\;\middle|\;\sum_{m\in
C}s(m)=\beta(C)\right\\}\subset{\mathbb{Z}_{2}^{C}}$

where we write $\mathbb{Z}_{2}^{C}$ for the set of $C$-indexed tuples in
$\mathbb{Z}_{2}$. Define the _non-signaling polytope_ to be

$\operatorname{NS}:=\left\\{\\{p_{C}:\mathbb{Z}_{2}^{C}\to[0,1]\\}_{C\in\mathcal{C}}\;\middle|\;\sum_{m\in
C}p(m)=1,\;p_{C}|_{C\cap C^{\prime}}=p_{C^{\prime}}|_{C\cap
C^{\prime}}\right\\}.$

Define the $\beta$-nonsignaling polytope to be the subset
$\operatorname{NS}_{\beta}\subset\operatorname{NS}$, on the
$\\{p_{C}\\}_{C\in\mathcal{C}}$ such that

$\operatorname{supp}(p_{C})\subset O_{\beta}(C)$

for all $C\in\mathcal{C}$.

######  Lemma 4.15.

There is an isomorphism

$\operatorname{sDist}(\overline{M}\to M)\cong\operatorname{NS}_{\beta}.$

###### Proof.

A distribution $p_{C}$ supported on $O_{\beta}$ is precisely a distribution on
the set of 2-simplices of $\overline{M}$ lying over the simplex of $M$
corresponding to $C$. The compatibility relations in $\operatorname{NS}$ are
then precisely those required to make the collection a simplicial set map

$\operatorname{tr}_{2}(M)\to\operatorname{tr}_{2}(D(\overline{M}))$

over $\operatorname{tr}_{2}(D(M))$. Since $M$ is 2-skeletal, this is
equivalent to a map

$M\to D(\overline{M})$

over $D(M)$, i.e., a simplicial distribution on $\overline{M}\to M$. ∎

######  Corollary 4.16.

There is an isomorphism

$\operatorname{sDist}(E_{\beta})\cong\operatorname{NS}_{\beta}.$

The vertex enumeration problem for the polytope
$\operatorname{sDist}(E_{\beta})$ is solved in [OCI23]. Up to combinatorial
automorphisms of the polytope there are two kinds of vertices. Both of them
are relatively deteministic in the sense of Definition 4.2. The trivializing
morphisms are given as follows:

  * •

Let $U$ denote the $1$-dimensional simplicial subset of $M$ consisting of the
$1$-simplices $u,c,a$. The inclusion $\phi:U\to M$ is trivializing. The vertex
corresponding to this type restricts to a deterministic distribution on $U$.

  * •

Let $V$ denote the $2$-dimensional simplicial set consisting of the two non-
degenerate simplices $\eta$ and $\xi$. Then $\phi:V\to X$ is trivializing and
restriction of the vertex to $V$ is deterministic.

These trivializing morphisms uniquely determine the vertices. Moreover, in
[Oka23] a $2$-dimensional version of Corollary 4.6 is used to solve the vertex
enumeration problem.

## References

  * [AB11] Samson Abramsky and Adam Brandenburger.  The sheaf-theoretic structure of non-locality and contextuality.  New Journal of Physics, 13(11):113036, 2011.
  * [Bel64] John S. Bell.  On the Einstein Podolsky Rosen paradox.  Physics Physique Fizika, 1:195–200, Nov 1964.  doi: 10.1103/PhysicsPhysiqueFizika.1.195.
  * [BKO23] Rui Soares Barbosa, Aziz Kharoof, and Cihan Okay.  A bundle perspective on contextuality: Empirical models and simplicial distributions on bundle scenarios.  arXiv preprint arXiv:2308.06336, 2023.  doi: 10.48550/arXiv.2308.06336.
  * [BL04] John C. Baez and Aaron D. Lauda.  Higher-dimensional algebra v: 2-groups.  Theory and Applications of Categories, 12(14):423–491, 2004.
  * [BSST06] Ulrich Bunke, Thomas Schick, Markus Spitzweck, and Andreas Thom.  Duality for topological abelian group stacks and t-duality.  In Guillermo (ed.) et al. Cortinas, editor, K-theory and noncommutative geometry, Proceedings of the ICM 2006 satellite conference, pages pp. 227–347. European Mathematical society, 2006.
  * [Bun23] Severin Bunk.  $\infty$-bundles.  arXiv preprint arXiv:2308.04196, 2023.
  * [Def19] Gian Deflorin.  The homotopy hypothesis.  Master’s Thesis, 2019.
  * [FP90] Rudolf Fritsch and Renzo A. Piccinini.  Cellular structures in topology.  Cambridge University Press, 1990.
  * [GHN17] David Gepner, Rune Haugseng, and Thomas Nikolaus.  Lax colimits and free fibrations in $\infty$-categories.  Documenta Math., 22:1225–1266, 2017.
  * [GJ09] Paul G Goerss and John F Jardine.  Simplicial homotopy theory.  Springer Science & Business Media, 2009.
  * [HOS24] Redi Haderi, Cihan Okay, and Walker H. Stern.  The operadic theory of convexity.  arXiv preprint arXiv:2403.18102, 2024.
  * [HS] Redi Haderi and Walker H. Stern.  An $\mathcal{O}$-monoidal grothendieck construction.  in preparation.
  * [Jac10] Bart Jacobs.  Convexity, duality and effects.  In IFIP International Conference on Theoretical Computer Science, pages 1–19. Springer, 2010.  doi: 10.1007/978-3-642-15240-5_1.
  * [Jar10] J. F. Jardine.  Generalized Etale Cohomology Theories.  Modern Birkhäuser Classics. Birkhäuser Basel, 2010.
  * [JY21] Niles Johnson and Donald Y. Yau.  2-dimensional categories.  Oxford University Press, 2021.
  * [KIO23] Aziz Kharoof, Selman Ipek, and Cihan Okay.  Topological methods for studying contextuality: N-cycle scenarios and beyond.  Entropy, 25(8), 2023.  doi: 10.3390/e25081127.
  * [KO22] Aziz Kharoof and Cihan Okay.  Simplicial distributions, convex categories and contextuality.  arXiv preprint arXiv:2211.00571, 2022.
  * [KO23] Aziz Kharoof and Cihan Okay.  Homotopical characterization of strongly contextual simplicial distributions on cone spaces.  arXiv preprint arXiv:2311.14111, 2023.
  * [KS67] Simon Kochen and Ernst P. Specker.  The problem of hidden variables in quantum mechanics.  Journal of Mathematics and Mechanics, 17:59–87, 1967.  url: https://www.jstor.org/stable/24902153.
  * [May67] J. P. May.  Simplicial objects in algebraic topology.  Van Nostrand Mathematical Studies, No. 11. D. Van Nostrand Co., Inc., Princeton, N.J.-Toronto, Ont.-London, 1967.
  * [Mer93] Nathaniel D. Mermin.  Hidden variables and the two theorems of John Bell.  Reviews of Modern Physics, 65(3):803, 1993.  doi: 10.1103/RevModPhys.65.803.
  * [MV20] Joe Moeller and Christina Vasilakopoulou.  Monoidal grothendieck construction.  Theory Appl. Categ., 35:No. 31, 1159–1207, 2020.
  * [NSS15] Thomas Nikolaus, Urs Schreiber, and Danny Stevenson.  Principal $\infty$ -bundles – presentations.  Journal of Homotopy and Related Structures, 10:565–622, 2015.
  * [OCI23] Cihan Okay, Ho Yiu Chung, and Selman Ipek.  Mermin polytopes in quantum computation and foundations.  Quantum Information and Computation, 23:733–782, 2023.
  * [Oka23] Cihan Okay.  On the rank of two-dimensional simplicial distributions.  arXiv preprint arXiv:2312.15794, 2023.
  * [OKI23] Cihan Okay, Aziz Kharoof, and Selman Ipek.  Simplicial quantum contextuality.  Quantum, 7, 2023.  doi: 10.22331/q-2023-05-22-1009.
  * [Opa21] Michael Opadotun.  Simplicial enrichment of chain complexes.  Master’s Thesis, 2021.
  * [ORBR17] Cihan Okay, Sam Roberts, Stephen D Bartlett, and Robert Raussendorf.  Topological proofs of contextuality in quantum mechanics.  Quantum Information & Computation, 17(13-14):1135–1166, 2017.  doi: 10.26421/QIC17.13-14-5. arXiv: 1701.01888.
  * [Wat18] John Watrous.  The theory of quantum information.  Cambridge university press, 2018.
  * [Wei94] C. A. Weibel.  An Introduction to Homological Algebra.  Cambridge Studies in Advanced Mathematics, No. 38. Cambridge University Press, 1994.
  * [ZOR20] Michael Zurel, Cihan Okay, and Robert Raussendorf.  Hidden variable model for universal quantum computation with magic states on qubits.  Physical Review Letters, 125(26):260404, 2020.  doi: 10.1103/PhysRevLett.125.260404. arXiv: 2004.01992.

##  Appendix A Monoidal categories and functors

In this section, we will show that various functors and categories used in the
main body are (lax) (symmetric) monoidal.

######  Proposition A.1.

The functor $D:\mathsf{Set}\to\mathsf{Set}$ is lax symmetric monoidal with
respect to the cartesian monoidal structure. The structure maps are

${D(X)\times D(Y)}$${D(X\times
Y)}$${\ast}$${D(\ast)}$$\scriptstyle{m_{X,Y}}$$\scriptstyle{\varepsilon}$

where $\ast$ denotes the singleton, and $\epsilon$ is the unique isomorphism
between singletons.

###### Proof.

We first note that $m$ is natural. Given maps of sets $f:X\to Z$ and $g:Y\to
W$ and $(p,q)\in D(X)\times D(Y)$ we have

$\displaystyle m(D(f)\times D(g)(p,q))(z,w)$ $\displaystyle=D(f)(p)(z)\cdot
D(g)(q)(w)$ $\displaystyle=\left(\sum_{x\in
f^{-1}(z)}p(x)\right)\cdot\left(\sum_{y\in g^{-1}(w)}q(y)\right)$
$\displaystyle=\sum_{\begin{subarray}{c}x\in f^{-1}(z)\\\ y\in
g^{-1}(w)\end{subarray}}p(x)q(y)$ $\displaystyle=\sum_{(x,y)\in(f\times
g)^{-1}(z,w)}p(x)q(y)$ $\displaystyle=D(f\times g)(m(p,q))(z,w).$

We then check associativity. Given $(p,q,r)\in D(X)\times D(Y)\times D(Z)$, we
have

$m((m\times\operatorname{id}_{D(Z)})(p,(q,r)))((x,y),z)=(p(x)q(y))r(z)$

and

$m((\operatorname{id}_{D(X)}\times m)((p,q),r))(x,(y,z))=p(x)(q(y)r(z))$

and so the associativity of multiplication completes the argument. Unitality
is immediate, and symmetry follows from the symmetry of multiplication on
$[0,1]$. ∎

The following, though inessential for the present paper, is an immediate
corollary, closely related to the work in [HOS24]. For this reason, we make
free use of the notion of biconvexity and the concomitant tensor product of
convex sets developed in op. cit.

######  Corollary A.2.

The lax symmetric monoidal structure on the functor
$D:\mathsf{Set}\to\mathsf{Set}$ induces a lax symmetric monoidal structure on
the functor $D:\mathsf{Set}\to(\mathsf{CSet},\otimes)$.

###### Proof.

Since the maps $m_{X,Y}$ are all biconvex, this follows immediately from the
universal property of $\otimes$. ∎

######  Theorem A.3.

For a simplicial Abelian group $K$, the product $-\otimes_{K}-$ equips
$\mathsf{Bun}_{K}(X)$ with the structure of a symmetric monoidal groupoid. The
structure maps are given by unitors

${(K\times X)\otimes_{K}E}$${E}$${{[(k,x),e]}}$${k\cdot
e}$$\scriptstyle{\lambda_{E}}$

and

${E\otimes_{K}(K\times X)}$${E}$${{[e,(k,x)]}}$${k\cdot
e;}$$\scriptstyle{\rho_{E}}$

associators

${E\otimes_{K}(F\otimes_{K}G)}$${(E\otimes_{K}F)\otimes_{K}G}$${{[e,[f,g]]}}$${{[[e,f],g]};}$$\scriptstyle{\alpha_{E,F,G}}$

and the braiding

${E\otimes_{K}F}$${F\otimes_{K}E}$${{[e,f]}}$${{[f,e]}.}$$\scriptstyle{\beta_{E,F}}$

###### Proof.

Since the associators and braiding are induced by those of the Cartesian
monoidal structure on $\mathsf{Set}$, the pentagon and hexagon identities will
follow from the well-definedness of these associators and braiding. To show
well-definedness, suppose $[e_{1},[f_{1},g_{1}]]=[e_{2},[f_{2},g_{2}]]$. Then
there is $k\in K$ such that $ke_{1}=e_{2}$ and
$k^{-1}\cdot[f_{1},g_{1}]=[f_{2},g_{2}]$. The latter relation implies that
there is $h\in K$ such that $hk^{-1}f_{1}=f_{2}$ and $h^{-1}g_{1}=g_{2}$.
Setting $\ell=h$ and $a=kh^{-1}$, we thus see that

$a\ell e_{1}=e_{2},\quad a^{-1}f_{1}=f_{2},\quad\ell^{-1}g_{1}=g_{2}$

so that $[[e_{1},f_{1}],g_{1}]=[[e_{2},f_{2}],g_{2}]$ and the associator is
well-defined. Similarly, for the braiding, if $[e_{1},f_{1}]=[e_{2},f_{2}]$,
then there is $k\in K$ such that $ke_{1}=e_{2}$ and $k^{-1}f_{1}=f_{2}$.
Setting $h=k^{-1}$ shows that $[f_{1},e_{1}]=[f_{2},e_{2}]$, and so the
braiding is well-defined.

It thus remains only for us to check the triangle identity. We show that the
diagram

${(E\otimes_{K}(K\times X))\otimes_{K}F}$${E\otimes_{K}((K\times
X)\otimes_{K}F)}$${E\otimes_{K}F}$$\scriptstyle{\alpha_{E,K\times
X,F}}$$\scriptstyle{\rho_{E}\otimes\operatorname{id}}$$\scriptstyle{\operatorname{id}\otimes\lambda_{F}}$

commutes. Starting with $[[e,(k,x)],f]$, applying the associator and
$\operatorname{id}\times\lambda_{F}$ yields $[e,k\cdot f]$. Applying, on the
other hand, $\rho_{E}$, yields $[k\cdot e,f]$. By the definition of our
equivalence relation $[k\cdot e,f]=[e,k\cdot f]$, and so the diagram commutes.
∎

######  Proposition A.4.

The functor

${\operatorname{sDist}:}$${\mathsf{Bun}_{K}(X)}$${\mathsf{Set}}$

is lax symmetric monoidal with respect to the product $\otimes_{K}$ on
$\mathsf{Bun}_{K}(X)$ and the cartesian monoidal structure on $\mathsf{Set}$.
The structure maps are

${\mu_{E,F}:}$${\operatorname{sDist}(\pi_{E})\times\operatorname{sDist}(\pi_{F})}$${\operatorname{sDist}(\pi_{E\otimes_{K}F})}$

and the map

${\varepsilon:}$${\ast}$${\operatorname{sDist}(K\times X\to X)}$

which sends the unique element to the delta distribution
$\delta^{\varphi_{0}}$ on the zero section.

###### Proof.

We check only the left unitality diagram. The right unitality diagram is
similar. We compute the composite

${\ast\times\operatorname{sDist}(\pi_{E})}$${\operatorname{sDist}(X\times
K)\times\operatorname{sDist}(\pi_{E})}$${\operatorname{sDist}((X\times
K)\otimes_{K}E)}$${\operatorname{sDist}(\pi_{E})}$$\scriptstyle{\epsilon\times\operatorname{id}}$$\scriptstyle{\mu}$$\scriptstyle{\lambda_{E}}$

acting on $p\in\operatorname{sDist}(\pi_{E})$. This is, effectively, the
product of $(\delta^{\varphi_{0}},p)$. Evaluated on $e\in E$, we compute

$\displaystyle\lambda_{E}(\mu(\delta^{\varphi_{0}},p))_{x}(e)$
$\displaystyle=\sum_{k+y=e}\delta^{\varphi_{0}}_{x}(k,x)p_{x}(y)$
$\displaystyle=\sum_{0+y=e}p_{x}(y)=p_{x}(e)$

so that the composite is the (Cartesian) unitor on
$\operatorname{sDist}(\pi_{E})$ as desired.

Since $\mu$ is directly induced by the multiplication $m$ and the quotient
map, the associativity follows easily from the associativity proven in
Proposition A.1. Symmetry follows directly from the symmetry of multiplication
on $[0,1]$. ∎

######  Proposition A.5.

The maps $\ell$ and $u$ equip the functor

${\operatorname{Cl}:}$${\mathsf{Bun}_{K}^{0}(X)}$${\mathsf{Set}}$

with the structure of a lax symmetric monoidal functor.

###### Proof.

It is sufficient to show that $\overline{\ell}$ and the zero section equip
$\operatorname{Sec}$ with a lax monoidal structure, since $\operatorname{Cl}$
will then simply be $D_{R}\circ\operatorname{Sec}$.

For associativity, it is thus sufficient to check associativity for
$\overline{\ell}$. Given sections
$(\varphi,\psi,\zeta)\in\operatorname{Sec}(\pi_{E})\times\operatorname{Sec}(\pi_{F})\times\operatorname{Sec}(\pi_{G})$,
we see that both

$\overline{\ell}((\overline{\ell}\times\operatorname{id}_{\operatorname{Sec}(\pi_{G})})(\varphi,\psi,\zeta))$

and

$\overline{\ell}((\operatorname{id}_{\operatorname{Sec}(\pi_{E})}\times\overline{\ell})(\varphi,\psi,\zeta))$

can be equivalently identified with the composite of

${(\varphi,\psi,\zeta):}$${X\to E\times_{X}F\times_{X}G}$

with the quotient map to $E\otimes_{K}F\otimes_{K}G$. Symmetry follows
similarly.

For unitality, we only write out the check of the left unitality diagram. The
composite

${\ast\times\operatorname{Sec}(\pi_{E})}$${\operatorname{Sec}(X\times
K)\times\operatorname{Sec}(\pi_{E})}$${\operatorname{Sec}((X\times
K)\otimes_{K}E)}$${\operatorname{Sec}(\pi_{E})}$$\scriptstyle{\overline{u}\times\operatorname{id}}$$\scriptstyle{\overline{\ell}}$$\scriptstyle{\lambda_{E}}$

We see that a section $\varphi$ is sent to the section $\psi$ defined by

$\psi(x)=\lambda_{E}([1,\varphi(x)])=\varphi(x)$

precisely as desired. ∎

######  Proposition A.6.

Viewing the commutative monoid $\operatorname{Twist}_{K}(X)$ of $K$-valued
twisting functions on $X$ as a discrete symmetric monoidal category, the
functor

${\operatorname{Twist}_{K}(X)}$${\mathsf{Bun}_{K}(X)}$${\eta}$${K\times_{\eta}X}$

is symmetric monoidal with structure maps given by the canonical isomorphism

$K\times_{0}X\cong K\times X$

and the isomorphisms

$(K\times_{\eta}X)\otimes_{K}(K\times_{\xi}X)\cong K\times_{\eta+\xi}X$

constructed in the proof of Proposition 2.29.

##  Appendix B Colimits and finite simplicial sets

######  Lemma B.1 (Eilenberg-Zilber Lemma).

Let $X$ be a simplicial set, and let $\sigma\in X_{n}$ be a simplex. Then
there is a unique surjective map $\phi:[n]\to[k]$ in $\Delta$ and a unique
non-degenerate simplex $\tau\in X_{k}$ such that $\sigma=\phi^{\ast}(\tau)$.

###### Proof.

There are many proofs in the literature. A textbook reference is [FP90, Thm.
4.2.3]. ∎

######  Lemma B.2.

Let $X$ be a simplicial set of dimension $n$. Denote by $(\Delta_{/X})^{\leq
n}$ the full subcategory of the category of simplices on the simplices of
dimension less than or equal to $n$. Then the inclusion

${(\Delta_{/X})^{\leq n}}$${\Delta_{/X}}$

is cofinal.

###### Proof.

Let $\sigma\in X_{k}$ be a $k$-simplex of $X$. It will suffice for us to show
that $(\Delta_{/X})^{\leq n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$ is
non-empty and connected. If $k\leq n$, then this is immediate, since
$(\Delta_{/X})^{\leq n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$ is then
canonically isomorphic to $\left((\Delta_{/X})^{\leq n}\right)_{\sigma/}$.

In the case where $k\geq n$, let $(\phi,\tau)$ be the unique decomposition of
$\sigma$ guaranteed by the Eilenber-Zilber Lemma B.1. Then
$\phi:\sigma\to\tau$ is an element of $(\Delta_{/X})^{\leq
n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$. Now suppose there is another
element $\psi:\sigma\to\rho$.

We can factor $\psi=\psi_{2}\circ\psi_{1}$, where $\psi_{2}$ is injective, and
$\psi_{1}$ is surjective. Then
$\psi_{1}^{\ast}(\psi_{2}^{\ast}(\rho))=\sigma$. However, since $\psi_{2}$ is
injective, this means that the dimension of $\psi_{2}^{\ast}(\rho)$ is less
than or equal to that of $\rho$. Thus $\psi_{2}^{\ast}(\rho)$ is an object in
$(\Delta_{/X})^{\leq n}$, and so $\psi_{1}:\sigma\to\psi_{2}^{\ast}(\rho)$
defines an object in $(\Delta_{/X})^{\leq
n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$

Then we see that the commutative diagram

${\psi_{2}^{\ast}(\rho)}$${\sigma}$${\rho}$$\scriptstyle{\psi_{2}}$$\scriptstyle{\psi_{1}}$$\scriptstyle{\psi}$

defines a morphism in $(\Delta_{/X})^{\leq
n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$. To show that
$(\Delta_{/X})^{\leq n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$ is
connected, it thus suffices to show that there is a morphism relating
$\phi:\sigma\to\tau$ to $\psi_{1}:\sigma\to\psi_{2}^{\ast}(\rho)$.

If $\psi_{2}^{\ast}(\rho)$ is non-degenerate, then the uniqueness of the
representation $(\phi,\tau)$ for $\sigma$ implies that
$\psi_{2}^{\ast}(\rho)=\tau$ and $\psi_{1}=\phi$, so we are done. Otherwise,
let $(\alpha,\gamma$ be the unique representation of $\psi_{2}^{\ast}(\rho)$
guaranteed by the Eilenberg-Zilber Lemma B.1. Then note that
$\alpha\circ\psi_{1}$ is surjective, $\gamma$ is non-degenerate, and

$(\alpha\circ\psi_{1})^{\ast}(\gamma)=\psi_{1}^{\ast}(\alpha^{\ast}(\gamma))=\psi_{1}^{\ast}(\psi_{2}^{\ast}(\rho))=\sigma.$

Thus, the uniqueness guaranteed by the Eilenberg-Zilber Lemma B.1 implies that
$\alpha\circ\psi_{1}=\phi$ and $\gamma=\tau$. We thus have a commutative
diagram

${\psi_{2}^{\ast}(\rho)}$${\sigma}$${\gamma}$$\scriptstyle{\alpha}$$\scriptstyle{\psi_{1}}$$\scriptstyle{\phi}$

which defines a morphism in $(\Delta_{/X})^{\leq
n}\times_{\Delta_{/X}}(\Delta_{/X})_{\sigma/}$. This completes the proof. ∎

##  Appendix C Relative coskeletalness

We first recall classic coskeletalness.

######  Definition C.1.

For $k\geq 0$, the category $\Delta_{\leq k}$ is the full subcategory on the
objects $[n]$ with $n\leq k$. The _$k$ th truncation functor_ is the functor

${\operatorname{tr}_{k}:}$${\mathsf{sSet}}$${\operatorname{Fun}(\Delta_{\leq
k}^{\operatorname{op}},\mathsf{Set})}$

given by restriction along the inclusion $\Delta_{\leq k}\to\Delta$. The right
adjoint to $\operatorname{tr}_{k}$, given explicitly by right Kan extension,
is called the _$k$ th coskeleton functor_, and denoted by

${\operatorname{cosk}_{k}:}$${\operatorname{Fun}(\Delta_{\leq
k}^{\operatorname{op}},\mathsf{Set})}$${\mathsf{sSet}.}$

Since $\operatorname{cosk}_{k}$ is the right Kan extension along a full
subcategory inclusion, the adjunction counit
$\operatorname{tr}_{k}(\operatorname{cosk}_{k}(X))\to X$ is an isomorphism. We
will typically use the notation

$\mathsf{sSet}_{\leq k}=\operatorname{Fun}(\Delta_{\leq
k}^{\operatorname{op}},\mathsf{Set}).$

######  Definition C.2.

A simplicial set $X$ is called _$k$ -coskeletal_ if, for every $n>k$ every
extension problem

${\partial\Delta^{n}}$${X}$${\Delta^{n}}$

has a unique solution.

######  Proposition C.3.

The adjunction unit $X\to\operatorname{cosk}_{k}(\operatorname{tr}_{k}(X))$ is
an isomorphism if and only if $X$ is $k$-coskeletal. Thus,
$\operatorname{cosk}_{k}$ is fully faithful, and its essential image consists
of the $k$-coskeletal simplicial sets.

###### Proof.

This is a classical fact. A proof may be found in, e.g., [Def19, Lemma 10.11].
∎

We can then turn to the relative case.

######  Definition C.4.

Let $\pi:X\to Y$ be a map of simplicial sets. We call $X$ _$\pi$ -relative
$k$-coskeletal_ (or we call $\pi$ _relatively $k$-coskeletal_) if, for any
$n>k$, every lifting problem

${\partial\Delta^{n}}$${X}$${\Delta^{n}}$${Y}$$\scriptstyle{\pi}$

has a unique solution.

We now concentrate on principal bundles with structure group $N(H)$ for $H$ an
Abelian group.

######  Lemma C.5.

Let $X$ be a simplicial set, and let $\eta$ be a $N(H)$-valued twisting
function on $X$. Then $\pi_{\eta}:E_{\eta}\to X$ is relatively 2-coskeletal.

###### Proof.

Solving a lifting problem

${\partial\Delta^{n}}$${E_{\eta}}$${\Delta^{n}}$${X}$$\scriptstyle{\pi_{\eta}}$

is equivalent to solving the lifting problem

${\partial\Delta^{n}}$${E_{\eta}\times_{X}\Delta^{n}}$${\Delta^{n}}$${\Delta^{n}}$$\scriptstyle{=}$

Since every principal bundle over $\Delta^{n}$ is trivial, this is equivalent
to solving the lifting problem

${\partial\Delta^{n}}$${N(H)\times\Delta^{n}}$${\Delta^{n}}$${\Delta^{n}}$$\scriptstyle{=}$

and thus, equivalent to showing that any diagram

${\partial\Delta^{n}}$${N(H)}$${\Delta^{n}}$

has a unique extension. However, since nerves of categories are always
2-coskeletal, this is immediate. ∎

######  Lemma C.6.

Let $\pi_{E}:E\to X$ and $\pi_{F}:F\to X$ be maps, and suppose that $F$ is
$\pi_{F}$-relatively $k$-coskeletal. Suppose given a simplicial map
$f:\operatorname{tr}_{k}(E)\to\operatorname{tr}_{k}(F)$ over
$\operatorname{tr}_{k}(X)$. Then $f$ uniquely extends to a map of simplicial
sets over $X$.

###### Proof.

It will suffice to show that $f$ extends uniquely to the $(k+1)$-truncation.
For each non-degenerate $(k+1)$ simplex $\sigma:\Delta^{k+1}\to E$, we get an
associated lifting problem

${\partial\Delta^{n}}$${F}$${\Delta^{n}}$${X}$$\scriptstyle{f\circ\partial\sigma}$$\scriptstyle{\pi_{F}}$$\scriptstyle{\pi_{E}\circ\sigma}$

any $\widetilde{f}$ extending $f$ to the $(k+1)$ truncation must send $\sigma$
to a solution to this lifting problem. Since $F$ is relatively $k$-coskeletal,
such a solution is unique, and so there is at most one such $\widetilde{f}$.
On the other hand, defining $\widetilde{f}(\sigma)$ to be the unique solution
to this lifting problem yields the desired extension. ∎

######  Corollary C.7.

Let

${E}$${F}$${X}$$\scriptstyle{f}$$\scriptstyle{\pi_{E}}$$\scriptstyle{\pi_{F}}$

be a map between relatively $k$-coskeletal simplicial sets over $X$. If $f$ is