# Equivariant simplicial distributions and quantum contextuality

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

###### Abstract

We introduce an equivariant version of contextuality with respect to a
symmetry group, which comes with natural applications to quantum theory. In
the equivariant setting, we construct cohomology classes that can detect
contextuality. This framework is motivated by the earlier topological approach
to contextuality producing cohomology classes that serve as computational
primitives in measurement-based quantum computing.

###### Contents

  1. 1 Introduction
  2. 2 Equivariant distributions
    1. 2.1 Simplicial distributions
    2. 2.2 Partial groups
    3. 2.3 Simplicial $G$-sets
    4. 2.4 Equivariant distributions
    5. 2.5 Distributions on the circle
    6. 2.6 Example: Torus with involution
  3. 3 Distributions relative to a subspace
    1. 3.1 Cohomology
    2. 3.2 Total complex of the Borel construction
    3. 3.3 Example: Torus relative to the diagonal
  4. 4 Quantum distributions
    1. 4.1 Extensions of partial groups
    2. 4.2 Group action on partial groups
    3. 4.3 Comparison to cofibration
    4. 4.4 Example: Dihedral group
    5. 4.5 Quantum distributions
    6. 4.6 Example: Mermin star

##  1 Introduction

In quantum theory, measurement statistics is described by a family of
probability distributions associated to quantum measurements that can be
performed simultaneously. Such a family of distributions is called contextual
if a joint probability distribution cannot describe the measurement
statistics. The sheaf-theoretic approach of [1] is a natural framework to
capture this notion. More recently, a topological approach has been introduced
in [2] based on chain complexes and tailored for applications in measurement-
based quantum computing. Simplicial distributions introduced in [3] is a new
framework that unifies these two earlier approaches and goes beyond by
generalizing the notion of contextuality to measurements and outcomes
described by spaces rather than discrete sets. In [2], topological techniques
are first introduced to describe proofs of contextuality for (1) parity proofs
based on algebraic relations among the observables and (2) symmetry-based
proofs that rely on a transformation group acting on the observables.
Moreover, the two kinds of proofs can be related using the theory of chain
complexes. This paper extends this analysis to simplicial distributions. Our
main contribution is the notion of equivariant contextuality with respect to a
symmetry group and the construction of cohomology classes, which can detect
this type of contextuality. These cohomology classes are related to those
introduced in [2], which play an important role in quantum computational
schemes such as measurement-based quantum computation [4, 5] and quantum
computation with magic states [6] for quantifying computational advantage. As
a future direction, the authors plan to investigate the computational
significance of the cohomology classes introduced in the equivariant setting.

The framework of simplicial distributions is based on simplicial sets,
combinatorial models of spaces more expressive than simplicial complexes. A
simplicial distribution on a pair of simplicial sets $X$ and $Y$, which
represent the measurements and outcomes, is given by a simplicial set map

$p:X\to D_{R}(Y)$

The simplicial set $D_{R}(Y)$ has simplices given by $R$-valued distributions
on the set of simplices of $Y$, where $R$ is a semiring. Any simplicial set
map $s:X\to Y$ can be turned into a simplicial distribution
$\delta^{s}=\delta_{Y}\circ s$, called a deterministic distribution, by
composing with $\delta_{Y}:Y\to D_{R}(Y)$ that sends a simplex of the outcome
space to the delta-distribution peaked at that simplex. A simplicial
distribution is called contextual if it cannot be expressed as a probabilistic
mixture of deterministic distributions. Given a group $G$ and a pair of
simplicial $G$-sets $(X,Y)$, we introduce the notion of $G$-equivariant
contextuality. The basic idea is to require equivariance with respect to $G$
in the definitions of simplicial and deterministic distributions.

In quantum theory, commutation relation among operators can be used to define
simplicial sets that are variations of the well-known nerve construction in
algebraic topology. Such simplicial sets are called partial groups, a notion
introduced in [7]. A typical example is defined for the unitary group
$U(\mathcal{H})$ of a finite dimensional Hilbert space $\mathcal{H}$ and
consists of the $n$-simplices given by

$N(\mathbb{Z}_{d},U(\mathcal{H}))=\\{(A_{1},A_{2},\cdots,A_{n}):\,A_{i}^{d}=\mathbb{1},\;\;A_{i}A_{j}=A_{j}A_{i}\;\forall
i,j\\}.$

This space and its variants have been studied in [8, 9, 10]. Identifying
unitary operators that differ by an element in $\langle e^{2\pi
i/d}\mathbb{1}\rangle$ gives a central partial group extension in the sense of
[7]. We develop our theory for a central partial group extension of the form

$NA\xrightarrow{i}E\xrightarrow{\pi}M$

where $A$ is a finite abelian group and $NA$ is the nerve space. This
extension is classified by a cohomology class $[\beta]\in H^{2}(M,A)$. A
simplicial distribution $p:E\to D_{R}(NA)$ is said to be relative to $i:NA\to
E$ if the following diagram commutes

${NA}$${X}$${D_{R}(NA)}$$\scriptstyle{i}$$\scriptstyle{\delta_{Y}}$$\scriptstyle{p}$

We show that if $[\beta]\neq 0$, then every such simplicial distribution is
contextual (Corollary 4.12). In the equivariant setting, we consider a group
$G$ that acts on $E$ by partial group automorphisms fixing $NA$. Our main tool
in the equivariant setting is the Borel construction, which sends a simplicial
$G$-set $X$ to the simplicial set given by $X/\\!/G=EG\times_{G}X$. Applying
this construction to the partial group extension gives another partial group
extension

$NA\to E/\\!/G\to M/\\!/G$

Let $[\beta_{G}]\in H^{2}(M/\\!/G,A)$ denote the cohomology class classifying
this extension. On the other hand, we can think of the Borel construction as
the diagonal of the bisimplicial set $S_{G}(X)$ whose $(p,q)$-simplices are
given by $(EG)_{p}\times_{G}X_{q}$. The total complex of the associated double
complex of cochains on this bisimplicial set provides an alternative way of
studying the cohomology class $[\beta_{G}]$. In the total complex, we have two
important cocycles: First of all, $\beta$ can be regarded as a
$(0,2)$-cocycle. Given a pseudo-section $\eta:M\to E$ of $\pi$ (similar to a
simplicial set map except that it fails to be compatible with the $d_{0}$
face), we have a $(1,1)$-cocycle $\Phi:G\times M_{1}\to A$ defined by

$\Phi_{g}(x)=(g\cdot\eta(g^{-1}\cdot x))\cdot\eta(x)^{-1}.$

Our main result is the following (Theorem 4.8 and Corollary 4.15):

######  Theorem.

Let $NA\xrightarrow{x}E\xrightarrow{\pi}M$ be a central partial group
extension and $G$ be a group acting on $E$ by partial group automorphisms that
fix $NA$. The following are equivalent:

  1. 1.

The class $[\beta_{G}]$ is zero.

  2. 2.

There exists $s:M_{1}\to A$ such that $d^{v}s=\beta$ and $d^{h}s=\Phi$.

  3. 3.

The map $\pi$ admits a $G$-equivariant section.

Moreover, if $[\beta_{G}]\neq 0$ then every $G$-equivariant distribution
$p:E\to D_{R}(NA)$ relative to $NA$ is $G$-equivariantly contextual.

There is a counterpart to the partial group approach, which uses cofiber
sequences of spaces. We develop this approach in Section 2 and prove a result
analogous to the theorem above (Theorem 3.12). Equivariant distributions
naturally arise in quantum theory. The nerve space
$N(\mathbb{Z}_{d},U(\mathcal{H}))$ can be regarded as the total space of a
partial group extension and a quantum state (density operator) can be used to
obtain a simplicial distribution relative to the fiber, which is
$N\mathbb{Z}_{d}$.

The paper is organized as follows. In Section 2, we introduce the notion of
equivariant distributions and equivariant contextuality. We give a simple
example, torus with the involution action, to discuss these basic notions
(Section 2.6). We also introduce distributions on the simplicial circle.
Section 3 is about the relative version of contextuality and mainly focuses on
introducing the cohomological notions. The total complex of the Borel
construction is studied in this section. We end the section by elaborating on
the torus example. Quantum distributions are discussed in Section 4. We
introduce partial group extensions and group actions on them. Our main theorem
stated above is proved in this section. The counterpart to the torus example
is the nerve of the dihedral group, also discussed in this section. We show
how quantum theory naturally gives simplicial distributions relative to a
subspace. We finish with the Mermin star construction, a well-known example of
a contextual scenario introduced in [11], analyzed in the equivariant setting.
Our methods extend the earlier topological study presented in [2] by
demonstrating that this construction produces equivariantly contextual
simplicial distributions.

#### Acknowledgments.

This work is supported by the US Air Force Office of Scientific Research under
award number FA9550-21-1-0002 and the Digital Horizon Europe project FoQaCiA,
GA no. 101070558.

##  2 Equivariant distributions

Simplicial distributions are first introduced in [3] as a framework to study
contextuality. In this section we introduce equivariant simplicial
distributions and equivariant contextuality.

###  2.1 Simplicial distributions

Let $R$ be a commutative zero-sum-free semiring, i.e., $a+b=0$ implies $a=b=0$
for all $a,b,\in R$. The distribution monad
$D_{R}:\mathbf{Set}\to\mathbf{Set}$ is defined as follows:

  * •

The set $D_{R}(U)$ of $R$-distributions on a set $U$ consists of functions
$p:U\to R$ of finite support, i.e., $|\\{u\in U:\,p(u)\neq 0\\}|<\infty$, such
that $\sum_{u\in U}p(u)=1$.

  * •

Given a function $f:U\to V$ the function $D_{R}(f):D_{R}(U)\to D_{R}(V)$ is
defined by

$p\mapsto\left(v\mapsto\sum_{u\in f^{-1}(v)}p(u)\right).$

Let $\mathbf{\Delta}$ denote the simplex category with objects
$[n]=\\{0,1,\cdots,n\\}$ where $n\geq 0$ and morphisms given by ordinal maps
$\theta:[m]\to[n]$. This category is generated by morphisms of the form

  * •

coface maps $d^{i}:[n-1]\to[n]$ that skip $i$ in the target, and

  * •

codegeneracy maps $s^{j}:[n+1]\to[n]$ that has a double preimage at $j$.

A simplicial set is a functor

$X:\mathbf{\Delta}^{\text{op}}\to\mathbf{Set}$

A simplicial set map $f:X\to Y$ between two simplicial sets is a natural
transformation. We will denote the category of simplicial sets by
$\mathbf{sSet}$. Alternatively, a simplicial set is a sequence of sets
$X_{n}$, where $n\geq 0$, together with the face $d_{i}$ and the degeneracy
maps $s_{j}$ dual to the coface $d^{i}$ and the codegeneracy $s^{j}$ maps. In
this description a simplicial set map consists of a family of functions
$\\{f_{n}:X_{n}\to Y_{n}\\}_{{\geq 0}}$ compatible with the face and
degeneracy maps. Given $\sigma\in X_{n}$ we will write $f_{\sigma}\in Y_{n}$
for the value of the function $f$ on $\sigma$. The standard $d$-simplex
$\Delta[d]$ is the simplicial set with $n$-simplices given by the set of
ordinal maps $[n]\to[d]$. In other words, this is the functor represented by
$[d]$. We will write $\sigma^{01\cdots d}$ for the $d$-simplex in $\Delta[d]$
corresponding to the identity map $\text{id}:[d]\to[d]$. Observe that every
other $n$-simplex can be obtained from $\sigma^{01\cdots n}$ by an application
of face and degeneracy maps.

The functor $D_{R}$ extends to a monad on simplicial sets

$D_{R}:\mathbf{sSet}\to\mathbf{sSet}$

sending a simplicial set $X:\mathbf{\Delta}^{\text{op}}\to\mathbf{Set}$ to the
composite functor
$D_{R}(X):\mathbf{\Delta}^{\text{op}}\xrightarrow{X}\mathbf{Set}\xrightarrow{D_{R}}\mathbf{Set}$;
see [12]. We will write $\delta_{X}:X\to D_{R}(X)$ for the unit of this monad
that sends $x$ to the delta-distribution with a peak at $x$.

######  Definition 2.1.

Let $X$ and $Y$ be simplicial sets. A _simplicial distribution_ on $(X,Y)$ is
a simplicial set map $p:X\to D_{R}(Y)$. A _deterministic distribution_ is a
simplicial distribution of the form
$\delta^{s}:X\xrightarrow{s}Y\xrightarrow{\delta_{Y}}D_{R}(Y)$ where $s:X\to
Y$ is a simplicial set map. We write $\mathsf{sDist}(X,Y)$ and
$\mathsf{dDist}(X,Y)$ for the sets of simplicial and deterministic
distributions, respectively. There is a comparison map

$\Theta:D_{R}(\mathsf{dDist}(X,Y))\to\mathsf{sDist}(X,Y)$

that sends a distribution $d=\sum_{r}d(r)\,\delta^{r}$ to the simplicial
distribution $\Theta(d):X\to D_{R}Y$ defined by

$\Theta(d)_{\sigma}:\theta\mapsto\sum_{r\,:\,r_{\sigma}=\theta}d(r)$

where $\sigma\in X_{n}$, $\theta\in Y_{n}$ and $r:X\to Y$ runs over simplicial
set maps such that $r_{\sigma}=\theta$. A simplicial distribution is called
non-contextual if it lies in the image of $\Theta$. Otherwise, it is called
contextual.

######  Example 2.2.

Let us consider simplicial distributions of the form $p:\Delta[2]\to
D_{R}(N\mathbb{Z}_{2})$. Such a simplicial set map is determined by a
distribution $p_{\sigma}\in D_{R}(\mathbb{Z}_{2}^{2})$ where
$\sigma=\sigma^{012}$. Writing $p^{ab}$ for the values $p_{\sigma}(a,b)$ this
distribution is specified by a tuple $(p^{00},p^{01},p^{10},p^{11})\in R^{4}$
such that $\sum_{a,b}p^{ab}=1$. A deterministic distribution $\delta^{s}$ for
a simplicial set map $s:\Delta[2]\to N\mathbb{Z}_{2}$ will be determined by a
delta-distribution at $s_{\sigma}=(a,b)\in\mathbb{Z}_{2}^{2}$. We write
$\delta^{ab}$ for this simplicial distribution. Then any simplicial
distribution $p$ can be written as

$p=\sum_{a,b}p^{ab}\delta^{ab},$

and hence is non-contextual. More complicated simplicial distributions can be
constructed by gluing $2$-simplices. In this case additional relations will be
introduced as the faces. The distribution $p_{d_{i}\sigma}$ associated to a
face of $\sigma$ will be an element of $D_{R}(\mathbb{Z}_{2})$. We will write
$(p_{d_{i}\sigma})^{a}$ to denote its value as $a\in\mathbb{Z}_{2}$. We have
$(p_{d_{i}\sigma})^{0}+(p_{d_{i}\sigma})^{1}=1$. Then

$(p_{d_{i}\sigma})^{0}=\left\\{\begin{array}[]{ll}p^{00}+p^{10}&i=0\\\
p^{00}+p^{11}&i=1\\\ p^{00}+p^{01}&i=2.\end{array}\right.$

When two $2$-simplices are glued at a common face, say the $i$-th face of
$\sigma_{1}$ and the $j$-th face of $\sigma_{2}$, then we have

$d_{i}p_{\sigma_{1}}=p_{d_{i}\sigma_{1}}=p_{d_{j}\sigma_{2}}=d_{j}p_{\sigma_{2}}.$

This way we can construct contextual simplicial distributions. See [3] and
[13] for examples.

###  2.2 Partial groups

In this section we recall the notion of partial monoids and groups from [7].

We need two ordinal maps:

  * •

The $i$-th edge map $e^{i}:[1]\to[n]$ that sends $\\{0,1\\}$ to $\\{i-1,i\\}$.

  * •

The $n$-th multiplication map $\Pi^{n}:[1]\to[n]$ that sends $\\{0,1\\}$ to
$\\{0,n\\}$.

######  Definition 2.3.

A partial monoid is a non-empty simplicial set $M$ such that

  * •

$M$ is reduced, i.e., $M_{0}=\\{\ast\\}$,

  * •

The $n$-th spine map

$\mathbf{e}_{n}=(e_{1},\cdots,e_{n}):M_{n}\to\underbrace{M_{1}\times\cdots\times
M_{1}}_{n}$

is injective for all $n\geq 1$, where $e_{i}:M_{n}\to M_{1}$ is induced by the
ordinal map $e^{i}$.

A homomorphism of partial monoids is a simplicial set map.

A simplex $x\in M_{n}$ can be identified with the tuple
$\mathbf{e}_{n}(x)=(x_{1},\cdots,x_{n})$. Let $\Pi_{n}:M_{n}\to M_{1}$ denote
the map induced by the ordinal map $\Pi^{n}$. The simplex $\Pi_{n}(x)\in
M_{1}$ will also be denoted by $x_{1}\cdot x_{2}\cdots x_{n}$ to emphasize
that this element represents the product. The degenerate simplex
$s_{0}(\ast)\in M_{1}$ will be denoted by $1$ since it serves as the identity
of the product.

######  Lemma 2.4 ([7]).

Let $X$ be a simplicial set, and $M$, $N$ be a partial monoids.

  1. 1.

A simplicial set map $f:X\to M$ is determined by $f_{1}:X_{1}\to M_{1}$.

  2. 2.

A simplicial homotopy $F:N\times\Delta[1]\to M$ from $g$ to $f$ is determined
by $\theta=F_{1}(1,\sigma^{01})\in M_{1}$ that satisfies $\theta\cdot
g_{1}(x)=f_{1}(x)\cdot\theta$ for all $x\in N_{1}$.

Part (1) of this lemma justifies saying that $f:X\to M$ is defined by $f(x)=m$
on $1$-simplices. Note that we also drop the subscript from $f_{1}$. We write
$f\xrightarrow{\theta}g$ for the homotopy from $f$ to $g$. Every monoid can be
regarded as a partial monoid by the nerve construction.

######  Definition 2.5.

For a monoid $M$ the nerve space $N(M)$ is the simplicial set whose set of
$n$-simplices is given by $M^{n}$ with the following simplicial structure:

$\displaystyle d_{i}(m_{1},m_{2},\cdots,m_{n})$
$\displaystyle=\left\\{\begin{array}[]{ll}(m_{2},m_{3},\cdots,m_{n})&i=0\\\
(m_{1},\cdots,m_{i}\cdot m_{i+1},\cdots,m_{n})&0<i<n\\\
(m_{1},m_{2},\cdots,m_{n-1})&i=n\end{array}\right.$ $\displaystyle
s_{j}(m_{1},m_{2},\cdots,m_{n})$
$\displaystyle=(m_{1},\cdots,{m_{j},1_{M},m_{j+1}},\cdots,m_{n})\;\;\,0\leq
j\leq n,$

where $1_{M}$ is the identity element.

######  Corollary 2.6.

A simplicial set map $f:X\to NM$ is given by a function $f_{1}:X_{1}\to M$
such that

$f_{1}(d_{1}\sigma)=f_{1}(d_{2}\sigma)\cdot f_{1}(d_{0}\sigma)$

for every $\sigma\in X_{2}$.

###### Proof.

This can be obtained from Lemma 2.4 by working out the simplicial structure. A
more direct approach is to use the fact that the nerve of a category is
$2$-coskeletal [14, Cor. 1.2]. ∎

######  Definition 2.7.

An inversion in a partial monoid $M$ is a simplicial set map $\nu:M\to
M^{\text{op}}$ such that for every $x\in M_{n}$ with $n\geq 1$ there is a
simplex $(\nu(x),x)\in M_{2n}$ such that $\Pi_{2n}(\nu(x),x)=1$. A partial
monoid with an inversion is called a _partial group_.

A group $G$ can be regarded as a partial group by the nerve construction.

###  2.3 Simplicial $G$-sets

By a simplicial $G$-set we mean a simplicial object in the category of
$G$-sets.

We define a simplicial $G$-set $EG$ whose $n$-simplices are given by
$(EG)_{n}=G^{n+1}$ and the simplicial structure maps are as follows:

$d_{i}(g_{0},g_{1},\cdots,g_{n})=\left\\{\begin{array}[]{cc}(g_{0},\cdots,g_{i}g_{i+1},\cdots,g_{n})&0\leq
i{<}n\\\ (g_{0},g_{1},\cdots,g_{n-1})&i=n\end{array}\right.$

and
$s_{j}(g_{0},g_{1},\cdots,g_{n})=(g_{0},\cdots,g_{j},1,g_{j+1},\cdots,g_{n})$
where $0\leq j\leq n$. The group action is multiplication from the left on the
first coordinate in each level. The quotient map gives the universal principal
$G$-bundle:

$G\to EG\to NG$

######  Definition 2.8.

Let $X$ be a simplicial $G$-set. The Borel construction of $X$ is the
simplicial set $X/\\!/G$, also denoted by $EG\times_{G}X$, whose $n$-simplices
are given by $EG_{n}\times_{G}X_{n}$ with the diagonal simplicial structure
maps.

Let $f:X\to Y$ be a simplicial $G$-map. There is an associated map between the
Borel constructions that makes the following diagram commute:

${EG\times X}$${EG\times
Y}$${X/\\!/G}$${Y/\\!/G}$$\scriptstyle{\text{id}\times
f}$$\scriptstyle{f_{G}}$

where the vertical maps are the quotients under the $G$-action. When $G$ acts
trivially on $X$, the Borel construction can be identified with
$X/\\!/G=NG\times X$. Assume that the action of $G$ on $Y$ is trivial. We will
consider the composition

$\tilde{f}_{G}:X/\\!/G\xrightarrow{f_{G}}Y/\\!/G=NG\times
Y\xrightarrow{\pi_{2}}Y$ (1)

Applying the Borel construction to $X\to\ast$ gives a fibration sequence

$X{\xrightarrow{\iota_{X}}}X/\\!/G\to NG$

where $\ast/\\!/G$ is identified with $NG$. The first map in the sequence is
the canonical inclusion that sends $x\in X_{n}$ to the simplex
$[(1,\cdots,1),x]$. Note that this is a simplicial $G$-map, where the target
has the trivial action.

###  2.4 Equivariant distributions

Let $U$ be a $G$-set. We equip $D_{R}(U)$ with the following $G$-action:

$g\cdot p(u)=p(g^{-1}\cdot u).$

Here the action is induced by the standard $G$-action on the set of all
functions $U\to R$, where the action on the target is trivial. This extends to
simplicial $G$-sets. That is, if $Y$ is simplicial $G$-set then $D_{R}(Y)$ is
a simplicial $G$-set with the action above in each degree.

######  Definition 2.9.

Let $X$ and $Y$ be simplicial $G$-sets. A $G$-equivariant simplicial
distribution on $(X,Y)$ is a simplicial $G$-map

$p:X\to D_{R}(Y)$

A $G$-equivariant deterministic distribution is a simplicial distribution of
the form $\delta^{s}:X\xrightarrow{s}Y\xrightarrow{\delta}D_{R}(Y)$ where
$s:X\to Y$ is a simplicial $G$-map. We will write $\mathsf{sDist}_{G}(X,Y)$
and $\mathsf{dDist}_{G}(X,Y)$ for the sets of $G$-equivariant simplicial and
deterministic distributions, respectively. A $G$-equivariant simplicial
distribution $p$ is called $G$-equivariantly contextual if it does not lie in
the image of

$\Theta_{G}:D_{R}(\mathsf{dDist}_{G}(X,Y))\to\mathsf{sDist}_{G}(X,Y)$

Otherwise, it is called $G$-equivariantly non-contextual.

We will be interested in the case where the $G$-action on $Y$ is trivial. In
this case we can apply the Borel construction, as described in (1), to a
$G$-equivariant distribution $p:X\to D_{R}(Y)$ and obtain a simplicial
distribution

$\tilde{p}_{G}:X/\\!/G\to D_{R}(Y)$ (2)

This construction can be applied to a simplicial $G$-map $s:X\to Y$ and the
corresponding equivariant distribution $\delta^{s}:X\to D_{R}(Y)$.

######  Lemma 2.10.

We have $\widetilde{\delta_{G}^{s}}=\delta^{\tilde{s}_{G}}$.

###### Proof.

We want to show that $\tilde{\delta}_{G}^{s}$ factors as
$\delta\circ\tilde{s}_{G}$. By construction we have

$\tilde{\delta}_{G}^{s}[(1,g_{1},\cdots,g_{n}),x]=\delta^{s(x)}=\delta^{\tilde{s}[(1,g_{1},\cdots,g_{n}),x]}.$

∎

The construction in (1) gives a commutative diagram

${D_{R}(\mathsf{dDist}_{G}(X,Y))}$${\mathsf{sDist}_{G}(X,Y)}$${D_{R}(\mathsf{dDist}(X/\\!/G,Y))}$${\mathsf{sDist}(X/\\!/G,Y)}$$\scriptstyle{\Theta_{G}}$$\scriptstyle{\Theta}$
(3)

where the left vertical map sends $\delta^{s}$ to $\delta^{\tilde{s}_{G}}$,
which is also equal to $\widetilde{\delta_{G}^{s}}$ by Lemma 2.10, and the
right vertical map is defined by $p\mapsto\tilde{p}_{G}$. The dashed arrows
are simply obtained by restricting along the inclusion map $X\to X/\\!/G$. The
composition of the vertical downward map with the upward map is the identity.

######  Proposition 2.11.

A $G$-equivariant simplicial distribution $p$ is $G$-equivariantly contextual
if and only if $\tilde{p}_{G}$ is contextual.

###### Proof.

Assume that $p$ is $G$-equivariantly non-contextual. Then by the commutativity
of Diagram (3), with the downward vertical arrows, we see that $\tilde{p}_{G}$
is non-contextual. Conversely, if $\tilde{p}_{G}$ is non-contextual then the
same diagram with the upward vertical arrows this time shows that $p$ is non-
contextual. ∎

###  2.5 Distributions on the circle

The set of $n$-simplices of the simplicial interval $\Delta[1]$ is given by

$\Delta[1]_{n}=\\{\theta^{i}|\;0\leq i\leq n+1\\}$

where $\theta^{i}:[n]\to[1]$ is the ordinal map such that
$|(\theta^{i})^{-1}(0)|=i$. The simplicial structure maps are given by

$d_{j}(\theta^{i})=\left\\{\begin{array}[]{ll}\theta^{i-1}&j<i\\\
\theta^{i}&i\leq j\end{array}\right.\;\;\;\text{ and
}\;\;\;s_{j}(\theta^{i})=\left\\{\begin{array}[]{ll}\theta^{i+1}&j<i\\\
\theta^{i}&i\leq j.\end{array}\right.$

The boundary $\partial\Delta[1]$ consists of the simplicial subset given by
$\\{\theta^{0},\theta^{n+1}\\}$ in each level. The simplicial structure maps
are just the identity maps. The simplicial circle $S^{1}$ is defined to be the
simplicial set obtained from $\Delta[1]$ by collapsing its boundary
$\partial\Delta[1]$. So $\theta^{0}$ and $\theta^{n+1}$ are identified to a
single point, which we denote by $\star$. Therefore the set of $n$-simplices
is given by

$(S^{1})_{n}=\left\\{\begin{array}[]{ll}\\{\star\\}&n=0\\\
\\{\star,\theta^{1},\cdots,\theta^{n}\\}&n\geq 1.\end{array}\right.$

The simplicial structure maps on $\theta^{i}$ are given by

$d_{j}(\theta^{i})=\left\\{\begin{array}[]{ll}\theta^{i-1}&j<i{\text{ and
}}1<i\\\ \theta^{i}&i\leq j{\text{ and }}i<n\\\
\star&\text{otherwise}\end{array}\right.\;\;\;\text{ and
}\;\;\;s_{j}(\theta^{i})=\left\\{\begin{array}[]{ll}\theta^{i+1}&j<i\\\
\theta^{i}&i\leq j.\\\ \end{array}\right.$

Any simplicial structure map sends $\star$ to itself.

A zero-sum-free semiring $R$ admits a partial order: For $a,b\in R$ we write
$a\leq b$ if there exists $c\in R$ such that $a+c=b$. In the next result we
use this partial order.

######  Proposition 2.12.

There is an isomorphism of simplicial sets

$D_{R}(S^{1})\to N_{\leq 1}(R)$

where $N_{\leq 1}(R)$ is the simplicial subset of the nerve space $N(R)$ of
$(R,+)$, consisting of tuples whose sum is at most $1$.

###### Proof.

An $R$-distribution on $(S^{1})_{n}$ is specified by a tuple
$(p_{1},p_{2},\cdots,p_{n})$ where $p_{i}\in R$ and $\sum_{i}p_{i}\leq 1$. The
value assigned to $\theta^{i}$ is given by $p_{i}$ and the value assigned to
$\star$ is determined by this tuple, which is given by $1-\sum_{i}p_{i}$. The
simplicial structure of $S^{1}$ can be used to show that

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

and

$s_{j}(p_{1},p_{2},\cdots,p_{n})=(p_{1},\cdots,p_{j},0,p_{j+1},\cdots,p_{n}).$

∎

Note that $N_{\leq 1}(R)$ is a partial monoid contained in $NR$ therefore
combining with Corollary 2.6 we obtain:

######  Corollary 2.13.

Let $i_{2}:X^{(2)}\to X$ denote the inclusion of the $2$-skeleton. Then the
following induced map is an isomorphism

$(i_{2})^{*}:\mathsf{sDist}(X,S^{1})\to\mathsf{sDist}(X^{(2)},S^{1})$

###### Proof.

The inclusions $i_{2}$ and $D_{R}S^{1}\cong N_{\leq 1}R\to NR$ induce a
commutative diagram

${\mathbf{sSet}(X,D_{R}S^{1})}$${\mathbf{sSet}(X^{(2)},D_{R}S^{1})}$${\mathbf{sSet}(X,NR)}$${\mathbf{sSet}(X^{(2)},NR)}$$\scriptstyle{(i_{2})_{*}}$$\scriptstyle{\cong}$

Then $(i_{2})_{*}$ is injective by commutativity of the diagram. For
surjectivity we observe that in the commutative diagram

${X^{(2)}}$${X}$${D_{R}S^{1}}$${NR}$$\scriptstyle{i_{2}}$$\scriptstyle{p}$$\scriptstyle{\tilde{p}}$

the lift $\tilde{p}$ of the diagonal map has image contained in $D_{R}S^{1}$
since it is determined by the restriction to the $1$-skeleton of $X$ by Lemma
2.4. ∎

In particular, for $R=\mathbb{N}$ we obtain that

$S^{1}=D_{\mathbb{N}}(S^{1})\xrightarrow{\cong}N_{\leq 1}(\mathbb{N})$

Therefore we also have

$(i_{2})^{*}:\mathsf{dDist}(X,S^{1})\to\mathsf{dDist}(X^{(2)},S^{1})$

###  2.6 Example: Torus with involution

We will take $X=S^{1}\times S^{1}$ and $Y=S^{1}$. We will write $\sigma_{0}$
and $\sigma_{1}$ for the non-degenerate $2$-simplices of $X$. The face maps
for $c\in\\{0,1\\}$ are given by

$d_{i}\sigma_{c}=\left\\{\begin{array}[]{ll}x_{c+1}&i=0\\\ x&i=1\\\
x_{c}&i=2.\end{array}\right.$

where the summation in the first formula is taken modulo $2$. The unique
vertex of $X$ will be denoted by $v$. We will regard the circle as a
simplicial subset of the nerve space

$S^{1}\to N\mathbb{Z}_{2}$

defined by sending $\sigma^{01}\mapsto 1$ in degree $1$. Using the notation of
Example 2.2 a simplicial distribution $p:\Delta[2]\to D(S^{1})$ is specified
by a tuple $(p^{00},p^{01},p^{10},p^{11})$ satisfying $\sum_{a,b}p^{ab}=1$ and
$p^{11}=0$. Note that $(S_{1})_{2}$ is in bijective correspondence with
$\\{(0,0),(0,1),(1,0)\\}\subset\mathbb{Z}_{2}^{2}$ hence a distribution $p$ in
$D((S^{1})_{2})$ regarded as a distribution in $D(\mathbb{Z}_{2}^{2})$ will
have $p^{11}=0$. Then simplicial distributions on $(X,Y)$ are given as follows

$\mathsf{sDist}(X,Y)=\\{(t_{1},t_{2})\in[0,1]^{2}:\,1-(t_{1}+t_{2})\geq 0\\};$

see Figure (1).

Figure 1: Simplicial distribution on the torus consisting of two triangles.
Edges labeled by $x_{0}$ are identified. Similarly for $x_{1}$. Top-right
triangle is $\sigma_{0}$ and the bottom-left triangle is $\sigma_{1}$. We
write $\overline{t_{1}+t_{2}}=1-(t_{1}+t_{2})$.

Let us take $G=\mathbb{Z}_{2}$ and endow both spaces with a $G$-action. On $X$
the action is given by the swapping of the coordinates and on $Y$ the action
is trivial. A $G$-equivariant distribution would be one in which
$t_{1}=t_{2}$. Then $\mathsf{sDist}_{G}(X,Y)$ can be identified with the
interval $[0,1/2]$. When $t_{1}=0$ we obtain the unique deterministic
distribution $p_{\sigma_{i}}=\delta^{00}$, and for $t_{1}=1/2$ we obtain

$p^{ab}_{\sigma_{i}}=\left\\{\begin{array}[]{ll}1/2&a+b=1\\\
0&\text{otherwise.}\end{array}\right.$

Therefore $p$ is $G$-equivariantly contextual if and only if $t_{1}>0$.

(a)

(b)

(c)

Figure 2: The non-degenerate $2$-simplices of the Borel construction and the
face identifications. Edges depicted by the same color are identified, e.g.,
in (a) the top (left) and bottom (right) edges are identified to give a torus.

Now, let us consider the Borel construction $X/\\!/G$. By Corollary 2.13 it
suffices to consider the $2$-skeleton $W=(X/\\!/G)^{(2)}$. We will use the
following notation for the simplices:

$v=[(1),v]\;\;\;\;\;\;x_{b}(a)=[(1,a),x_{b}]\;\;\;\;\;\;\sigma_{c}(ab)=[(1,a,b),\sigma_{c}].$

The face maps of the $2$-simplices are given by

$d_{i}\sigma_{c}(ab)=\left\\{\begin{array}[]{ll}x_{a+c+1}(b)&i=0\\\
x(a+b)&i=1\\\ x_{c}(a)&i=2.\end{array}\right.$

The non-degenerate $2$-simplices can be grouped into three parts each of which
is a closed surface as in Figure (2). Let us describe simplicial distributions
on $(W,S^{1})$. Using the closed surface in Figure (2(c)) we have

$\displaystyle p_{\sigma_{0}(11)}^{01}$
$\displaystyle=p_{\sigma_{0}(11)}^{10}=t_{1}$ $\displaystyle
p_{\sigma_{1}(11)}^{01}$ $\displaystyle=p_{\sigma_{1}(11)}^{10}=t_{2}$

where $t_{1},t_{2}\in[0,1/2]$. On the other hand, the middle surface forces
$t_{1}=t_{2}$. Considering the surface in Figure (2(a)) as well and using
Corollary 2.13 we obtain

$\mathsf{sDist}_{G}(X,Y)=\\{(t,t):\,t\in[0,1/2]\\}\subset\mathsf{sDist}(X,Y)$

and

$\mathsf{sDist}_{G}(X,Y)\xrightarrow{\cong}\mathsf{sDist}(X/\\!/G,Y)$ (4)

A similar isomorphism holds between the deterministic distributions. Hence we
verified Proposition 2.11.

##  3 Distributions relative to a subspace

In this section $X$ and $Y$ denote simplicial $G$-sets where the $G$-action on
$Y$ is trivial. We consider simplicial distributions relative to a subspace
and introduce cohomology classes that can detect contextuality for such
distributions.

######  Definition 3.1.

Let $i:Y\to X$ be a $G$-equivariant inclusion. A $G$-equivariant distribution
on $(X,Y)$ relative to $Y$ is a simplicial $G$-map $p:X\to D_{R}(Y)$ such that
the following diagram commutes

${Y}$${X}$${D_{R}(Y)}$$\scriptstyle{\delta_{Y}}$$\scriptstyle{i}$$\scriptstyle{p}$
(5)

Note that the non-equivariant definition can be obtained by taking $G$ as the
trivial group.

######  Lemma 3.2.

If $p:X\to D(Y)$ is a $G$-equivariant distribution relative to $Y$ then
$\tilde{p}_{G}:X/\\!/G\to D_{R}(Y)$ in (2) is a simplicial distribution
relative to $Y$.

###### Proof.

Follows from the following commutative diagram

${Y}$${X}$${D(Y)}$${X/\\!/G}$$\scriptstyle{i}$$\scriptstyle{\delta}$$\scriptstyle{p}$$\scriptstyle{\iota_{X}}$$\scriptstyle{\tilde{p}_{G}}$

where the top triangle commutes by assumption on $p$ and the lower triangle
commutes by the construction of $\tilde{p}_{G}$. ∎

We will consider the diagram of cofiber sequences

${Y}$${Y}$${Y/\\!/G}$${X}$${X/\\!/G}$${X/\\!/G}$${\bar{X}}$${\overline{X/\\!/G}}$${\bar{X}/\\!/G}$$\scriptstyle{i}$$\scriptstyle{j}$$\scriptstyle{i_{G}}$$\scriptstyle{q}$$\scriptstyle{\iota}$$\scriptstyle{\bar{\iota}}$$\scriptstyle{c}$
(6)

######  Lemma 3.3.

The following are equivalent.

  1. 1.

The inclusion $i:Y\to X$ has a $G$-equivariant section.

  2. 2.

The inclusion $i_{G}:Y/\\!/G\to X/\\!/G$ has a section.

  3. 3.

The inclusion $j:Y\to Y/\\!/G\xrightarrow{i_{G}}X/\\!/G$ has a section.

###### Proof.

First we prove the equivalence of (1) and (3). Let $s:X\to Y$ be a
$G$-equivariant section of $i$. The associated map $\tilde{s}_{G}:X/\\!/G\to
Y$ gives a section of $j$. Conversely, let $r:X/\\!/G\to Y$ be a section of
$j$. Then precomposing with the canonical ($G$-equivariant) map $X\to X/\\!/G$
gives a $G$-equivariant section of $i$. Next we prove the equivalence of (2)
and (3). Let $t$ be a section of $i_{G}$. Then projecting onto the second
factor gives a section of $j$. Given a section $r$ of $j$, composing this with
the canonical inclusion $Y\to Y/\\!/G$ gives a section of $i_{G}$. ∎

###  3.1 Cohomology

Our default space of choice for $Y$ will be the nerve space $NA$ of some
finite abelian group $A$. In this case we can interpret deterministic
distributions as cohomology classes. Let $Z$ be a simplicial subset of $X$.
Consider the cofiber sequence

$Z\xrightarrow{i}X\xrightarrow{q}\bar{X}$

We have a commutative diagram

${\mathsf{dDist}(\bar{X},NA)}$${\mathsf{dDist}(X,NA)}$${\mathsf{dDist}(Z,NA)}$${H^{1}(\bar{X},A)}$${H^{1}(X,A)}$${H^{1}(Z,A)}$${H^{2}(\bar{X},A)}$$\scriptstyle{\cong}$$\scriptstyle{q^{*}}$$\scriptstyle{\cong}$$\scriptstyle{i^{*}}$$\scriptstyle{\cong}$$\scriptstyle{q^{*}}$$\scriptstyle{i^{*}}$$\scriptstyle{\zeta}$
(7)

where the vertical maps send a deterministic distribution $\delta^{s}$ to the
cohomology class $[s]$. The bottom sequence is exact; see [3, Sec. 5.3] for
details.

######  Lemma 3.4.

Let $Z$ be a simplicial subset of $X$. A simplicial set map $r:Z\to NA$
extends to $X$ if and only if $\zeta([r])=0$.

###### Proof.

From the exactness of the bottom row in Diagram (7) we see that $\zeta([r])=0$
if and only if there exists $[\tilde{r}]\in H^{2}(X,A)$ such that
$i^{*}([\tilde{r}])=[r]$. Vertical isomorphisms imply that this latter
condition is equivalent to the existence of an extension. ∎

The cohomology class $\zeta([r])$ is represented by the cocycle $\zeta(r)$
defined as follows:

  * •

Let $\tilde{r}:X:\to A$ denote the extension of $r$ by setting its value equal
to zero on $X_{1}-Z_{1}$.

  * •

The coboundary $d\tilde{r}:X_{2}\to A$ restricts to a cocycle on $\bar{X}_{2}$
which we denote by $\zeta(r)$.

Let us specialize to $Z=Y=NA$. We take $r$ to be the identity map
$\text{id}:NA\to NA$. Note that in this case we have

$H^{1}(NA,A)\cong\mathbf{Grp}(A,A).$

Then $\text{id}:NA\to NA$ can be identified with the identity homomorphism
$\text{id}:A\to A$. We will write

$\gamma=\zeta(\text{id}).$ (8)

######  Proposition 3.5.

The inclusion $i:NA\to X$ has a section if and only if $[\gamma]=0$. Moreover,
if $[\gamma]\neq 0$ then every simplicial distribution $p:X\to{D_{R}}(NA)$
relative to $NA$ is contextual.

###### Proof.

The first statement follows from Lemma 3.4. For the second statement, assume
that $p$ is non-contextual, that is, there exists $d=\sum_{r}d(r)\delta^{r}$
with $\Theta(d)=p$. Then there exists $s$ such that $d(s)>0$ and for every
$\sigma\in X_{n}$ we have

$p_{\sigma}(s_{\sigma})=\sum_{r:\,r_{\sigma}=s_{\sigma}}d(r)>d(s)>0.$

Taking $\sigma\in(NA)_{n}$ we have

$p_{\sigma}=(p\circ i)_{\sigma}=\delta^{\sigma}$

where $\delta^{\sigma}$ is the delta-distribution peaked at $\sigma$.
Combining the two equations we obtain $\delta^{\sigma}(s_{\sigma})>0$ which
implies that $s_{\sigma}=\sigma$. This shows that $s:X\to NA$ is a section of
$i$. ∎

Now, we turn to the equivariant case. Let $i:NA\to X$ be a $G$-equivariant
inclusion. We apply the cohomology discussion to the cofiber sequences in
Diagram (6). For the middle cofibration sequence we introduce the following
cocycle: Using the connecting homomorphism $\zeta:H^{1}(NA,A)\to
H^{2}(\overline{X/\\!/G},A)$ we define

$\gamma_{G}=\zeta(\text{id}).$ (9)

By definition we have

$\bar{\iota}^{*}(\gamma_{G})=\gamma.$

######  Proposition 3.6.

The inclusion $j:NA\to X/\\!/G$ has a section if and only if $[\gamma_{G}]=0$.
Moreover, if $[\gamma_{G}]\neq 0$ then every simplicial distribution
$p:X/\\!/G\to D_{R}(NA)$ relative to $NA$ is contextual.

###### Proof.

Follows from Proposition 3.5 applied to $j$. ∎

######  Corollary 3.7.

If $[\gamma_{G}]\neq 0$ then every $G$-equivariant distribution $p:X\to
D_{R}(NA)$ relative to $NA$ is $G$-equivarianly contextual.

###### Proof.

By Proposition 3.6, $[\gamma_{G}]\neq 0$ implies that $\tilde{p}_{G}$ is
contextual. This is equivalent to $p$ being $G$-equivariantly contextual by
Proposition 2.11. ∎

######  Remark 3.8.

We can slightly generalize one direction of Proposition 3.6 to the case where
$Y$ is a simplicial subset of $NA$: For $Y$ a simplicial subset of $NA$ we
have that if the inclusion $i:Y\to X$ has a $G$-equivariant section then
$[\gamma_{G}]=0$. The converse of this statement may not be true since the
extension obtained using Lemma 3.4 gives a map with target $NA$, not
necessarily the simplicial subset $Y$. We are interested in the case where $Y$
is the simplicial subset given by the circle

$S^{1}_{(a)}\to NA$

where the unique non-degenerate $1$-simplex is mapped to a non-trivial element
$a\in A$.

We have a similar observation for the rightmost cofibration in Diagram (6).
Using the connecting homomorphism $\zeta:H^{1}(NA,A)\to
H^{2}(\bar{X}/\\!/G,A)$ and the projection map $\pi_{1}:NA/\\!/G\to NA$ we
define

$\tilde{\gamma}_{G}=\zeta(\pi_{1}).$ (10)

We have

$c^{*}(\tilde{\gamma}_{G})=\gamma_{G}.$

######  Proposition 3.9.

The inclusion $i_{G}:NA/\\!/G\to X/\\!/G$ has a section if and only if
$[\tilde{\gamma}_{G}]=0$. Moreover, we have $[\gamma_{G}]=0$ if and only if
$[\tilde{\gamma}_{G}]=0$.

###### Proof.

Proof of the first statement follows from Lemma 3.4 applied to
$\pi_{1}:NA/\\!/G\to NA$. The second statement follows from combining
Proposition 3.6 and 3.9 with Lemma 3.3. ∎

Combined with Proposition 3.6 $[\tilde{\gamma}_{G}]$ can also be used to
detect contextuality.

###  3.2 Total complex of the Borel construction

For a simplicial $G$-set $X$, we define a bisimplicial set

$S_{G}(X)_{p,q}=(EG)_{p}\times_{G}X_{q}.$ (11)

The diagonal $\text{diag}(S_{G}(X))$ of this bisimplicial set is the Borel
construction $X/\\!/G$. In this section we recall the Eilenberg–Zilberg
theorem that relates the chains on the diagonal of a bisimplicial abelian
group and the total complex of the associated double complex. We apply this
result to the bisimplicial set $S_{G}(X)$.

Let $L$ be a bisimplicial abelian group. There are two chain complexes
associated to this object:

  * •

The chain complex $C(\text{diag}(L))$ of the diagonal.

  * •

The total complex $\text{Tot}(C(L))$ of the double complex $C(L)$.

By the Eilenberg–Zilber theorem these two chain complexes are chain homotopy
equivalent [15, Chapter 8.5]. This equivalence is given by the
Alexander–Whitney map

$\Delta:C(\text{diag}(L))\to\text{Tot}(C(L))$

and the Eilenberg–Zilber map

$\nabla:\text{Tot}(C(L))\to C(\text{diag}(L))$

We are interested in degree $2$ of these maps:

  * •

For $a\in L_{2,2}$ we have

$\Delta_{2}(a)=((d_{0}^{v})^{2}(a),d_{2}^{h}d_{0}^{v}(a),d_{1}^{h}d_{2}^{h}(a)).$

  * •

For $(a,b,c)\in L_{2,0}\oplus L_{1,1}\oplus L_{0,2}$ we have

$\nabla_{2}(a,b,c)=s_{1}^{v}s_{0}^{v}(a)+(s_{1}^{h}s_{0}^{v}(b)-s_{0}^{h}s_{1}^{v}(b))+s_{1}^{h}s_{0}^{h}(c).$

We will apply this to the bisimplicial abelian group

$L_{p,q}=\mathbb{Z}[S_{p,q}]$

where $S=S_{G}(X)$ is the bisimplicial set given in Equation (11). Then the
maps $\Delta$ and $\nabla$ in degree $2$ are given by

$\Delta_{2}[(1,g_{1},g_{2}),x]=([(1,g_{1},g_{2}),(d_{0})^{2}(x)],[(1,g_{1}),d_{0}(x)],[(1),x])$

and

$\displaystyle\nabla_{2}([(1,g_{1},g_{2}),x],[(1,g_{1}^{\prime}),x^{\prime}],$
$\displaystyle[(1),x^{\prime\prime}])=$
$\displaystyle[(1,g_{1},g_{2}),s_{1}s_{0}(x)]+[(1,g_{1}^{\prime},1),s_{0}(x^{\prime})]-[(1,1,g_{1}^{\prime}),s_{1}(x^{\prime})]+[(1,1,1),x^{\prime\prime}].$

By applying $\text{Hom}(-,A)$ to the chain complexes $\text{Tot}(C(L))$ and
$C(\text{diag}(L))$ we obtain the dual maps between the associated cochain
complexes with coefficients in $A$. The dual map
$\Delta^{*}:C^{*}(\text{Tot}(C(L)),A)\to C^{*}(\text{diag}(L),A)$ sends a
$2$-cochain $(\alpha,\alpha^{\prime},\alpha^{\prime\prime})$ to

$\theta[(1,g_{1},g_{2}),x]=\alpha[(1,g_{1},g_{2}),(d_{0})^{2}(x)]+\alpha^{\prime}[(1,g_{1}),d_{0}(x)]+\alpha^{\prime\prime}[(1),x].$

On the other hand, the dual map $\nabla^{2}:C^{*}(\text{diag}(L),A)\to
C^{*}(\text{Tot}(C(L)),A)$ sends a $2$-cochain $\theta$ to
$(\alpha,\alpha^{\prime},\alpha^{\prime\prime})$ where

$\displaystyle\alpha[(1,g_{1},g_{2}),x]$
$\displaystyle=\theta[(1,g_{1},g_{2}),s_{1}s_{0}(x)]$ (12)
$\displaystyle\alpha^{\prime}[(1,g_{1}^{\prime}),x^{\prime}]$
$\displaystyle=\theta[(1,g_{1}^{\prime},1),s_{0}(x^{\prime})]-\theta[(1,1,g_{1}^{\prime}),s_{1}(x^{\prime})]$
$\displaystyle\alpha^{\prime\prime}[(1),x^{\prime\prime}]$
$\displaystyle=\theta[(1,1,1),x^{\prime\prime}].$

Next, we apply the formulas in Equation (12) to the middle and the rightmost
cofibrations in Diagram (6). The Borel construction $\bar{X}/\\!/G$ can be
described as the diagonal of the bisimplicial set

$\bar{S}_{p,q}=S_{G}(\bar{X})_{p,q}=(EG)_{p}\times_{G}\bar{X}_{q}.$ (13)

Similarly we can describe $\overline{X/\\!/G}$ as the diagonal of the
following bisimplicial set

$T_{p,q}=\frac{(EG)_{p}\times_{G}X_{q}}{\ast\times Y_{q}}.$ (14)

The Eilenberg–Zilber map is natural with respect to the map $T\to\bar{S}$ of
bisimplicial sets.

######  Lemma 3.10.

Under the Eilenberg–Zilber map the cocycle $\gamma_{G}$ is represented by the
triple $(0,0,\gamma)$ in the total complex.

###### Proof.

Let $\pi_{2}\colon NA/\\!/G\to NA$ denote the projection map, recall that
$NA/\\!/G=NG\times NA$. Since the Eilenberg–Zilber map $\nabla$ is natural
with respect to maps of bisimplicial sets we can first compute
$\nabla^{2}(\tilde{\gamma}_{G})$ and then pull-back along the corresponding
map between the total complexes. Applying the formula in Equation (12) to
$\bar{S}$ we obtain that

$\nabla^{2}(\tilde{\gamma}_{G})=(0,0,\gamma).$ (15)

Pulling back this cochain along $T\to\bar{S}$ gives the desired result. To
obtain Equation (15) we first consider how the cocycle $\tilde{\gamma}_{G}$ is
defined. In the cohomology long exact sequence we begin with $\pi_{1}$
regarded as a $1$-cochain $\pi_{1}:A\times G\to A$, again given by projection,
and define $\tilde{\pi}:X_{1}\times_{G}G^{2}\to A$ by lifting $\pi_{1}$ on the
rest of the $1$-simplices by setting it equal to zero. Then applying the
coboundary in $X/\\!/G$ we obtain $\tilde{\gamma}_{G}$. Looking at the
description of $d(\tilde{\pi}_{1})$ and the formula in Equation (12) we obtain
Equation (15). In more details, the map $\nabla^{2}(\tilde{\gamma}_{G})$
consists of three factors. For $x\in X_{0}$, $x^{\prime}\in X_{1}$ and
$x^{\prime\prime}\in X_{2}$, we have

  1. 1.

$\tilde{\gamma}_{G}((1,g_{1},g_{2}),s_{1}s_{0}(x))=0$ since $\tilde{\pi}$
restricted to a degenerate simplex of the form $s_{1}s_{0}(x)$ is zero.

  2. 2.

$\tilde{\gamma}_{G}((1,g_{1}^{\prime},1),s_{0}(x^{\prime}))-\tilde{\gamma}_{G}((1,1,g_{1}^{\prime}),s_{1}(x^{\prime}))=0$:
We have

$\displaystyle\tilde{\gamma}_{G}((1,g_{1}^{\prime},1),s_{0}x^{\prime})-\tilde{\gamma}_{G}((1,1,g_{1}^{\prime}),s_{1}x^{\prime})$
$\displaystyle=\tilde{\pi}((g_{1}^{\prime},1),x^{\prime})-\tilde{\pi}((1,g_{1}^{\prime}),x^{\prime})+\tilde{\pi}((1,g_{1}^{\prime}),s_{0}d_{1}x^{\prime})-\tilde{\pi}((1,g_{1}^{\prime}),s_{0}d_{0}x^{\prime})+\tilde{\pi}((1,g_{1}^{\prime}),x^{\prime})-\tilde{\pi}((1,1),x^{\prime})$
$\displaystyle=\tilde{\pi}((g_{1}^{\prime},1),x^{\prime})+\tilde{\pi}((1,g_{1}^{\prime}),s_{0}d_{1}x^{\prime})-\tilde{\pi}((1,g_{1}^{\prime}),s_{0}d_{0}x^{\prime})-\tilde{\pi}((1,1),x^{\prime}).$

In the sum above, the second and third component are $0$, as the second factor
in $\tilde{\pi}$ is a degeneracy of the vertex of $X$. Thus we are left with
the sum

$\tilde{\pi}((g_{1}^{\prime},1),x^{\prime})-\tilde{\pi}((1,1),x^{\prime}).$

However, this sum also becomes zero since if $x^{\prime}\in(NA)_{1}$, then $G$
acts trivially on $x^{\prime}$ and we have that
$((g_{1}^{\prime},1),x^{\prime})=((1,1),x^{\prime})$ in $X/\\!/G$. Otherwise,
if $x^{\prime}\not\in(NA)_{1}$, then also $g_{1}^{\prime}\cdot
x\not\in(NA)_{1}$, giving that both components of the sum are zero.

  3. 3.

$\tilde{\gamma}_{G}((1,1,1),x^{\prime\prime})=\gamma(x^{\prime\prime})$ since
$\tilde{\gamma}_{G}$ pulls-back to $\gamma$ along $c\circ\bar{\iota}$ in
Diagram (6).

∎

######  Definition 3.11.

Assume that $[\gamma]=0$ in $H^{2}(\bar{X},A)$. Consider a $1$-cochain
$s:\bar{X}_{1}\to A$ such that $d^{v}s=\gamma$ in the total complex of
$\bar{S}$ (see Equation (13)). We introduce a $(1,1)$-cochain
$\tilde{\phi}:G\times\bar{X}_{1}\to A$ in $\text{Tot}(C(\mathbb{Z}[\bar{S}]))$
by

$\tilde{\phi}=-d^{h}s,$

where we identify $G^{2}\times_{G}\bar{X}_{1}$ with $G\times\bar{X}_{1}$. Then
we define

$\phi=c^{*}(\tilde{\phi}),$

a $(1,1)$-cochain in the total complex of $T$ (see Equation (14)).

Note that one important case where $\phi$ can be defined is when
$[\gamma_{G}]=0$. Since $\gamma_{G}$ pulls-back to $[\gamma]$ under
$\bar{\iota}$ we have $[\gamma]=0$ in this case and thus we can define $\phi$.

######  Theorem 3.12.

Let $X$ be a simplicial $G$-set and $i:NA\to X$ be an inclusion of simplicial
$G$-sets where the action on $NA$ is trivial. Assume that the class
$[\gamma_{G}]$ defined in Equation (10) is zero, so that $\phi$ is defined
(see Definition 3.11). Then there exists $r:\bar{X}_{1}\to A$ such that
$d^{v}r=0$ and $d^{h}r=\phi$.

###### Proof.

By Lemma 3.10 $[\gamma_{G}]=0$ if and only if $[(0,0,\gamma)]$ is zero in the
total complex. Since $[\beta]=0$ we can trivialize it and define $\phi$. That
is, we have $[(0,0,\gamma)]=[(0,\phi,0)]$ in the total complex. Then this
class is zero if and only if there exists $r:\bar{X}_{1}\to A$ with the
desired property. ∎

######  Remark 3.13.

By the proof of Theorem 3.12 we can show that $[\gamma_{G}]\neq 0$ by working
in the total complex. We have $[\gamma_{G}]=0$ if and only if

  1. 1.

there exists $s:\bar{X}_{1}\to A$ such that $d^{v}s=\gamma$, and

  2. 2.

there exists $r:\bar{X}_{1}\to A$ such that $d^{v}r=0$ and $d^{h}r=\phi$
(where $\phi=-d^{h}s$).

Note that $\tilde{s}=(0,r+s)$ satisfies $d\tilde{s}=(0,0,\gamma)$. We can
apply this observation to the case when $[\gamma]=0$. Then $s$ as specified in
(1) exists. Thus $[\gamma_{G}]=0$ if and only if $2$ as specified in (2)
exists. Combined with Proposition 3.6 we can use this observation to detect
contextuality.

###  3.3 Example: Torus relative to the diagonal

We revisit the example $X=S^{1}\times S^{1}$ and $Y=S^{1}$ from Section 2.6.
Let $i:Y\to X$ be the diagonal map sending the non-degenerate $1$-simplex of
$Y$ to $x$ in Figure (1). A simplicial distribution $p:X\to D(Y)$ is relative
to $Y$ if and only if $p_{x}=\delta^{1}$. Recall that simplicial distributions
on $(X,Y)$ are given by $(t_{1},t_{2})\in[0,1]^{2}$ such that
$1-(t_{1}+t_{2})\geq 0$. The relativity condition then implies that
$t_{1}+t_{2}=1$. In the $G$-equivariant case, i.e., when
$t_{1}=t_{2}\in[0,1/2]$, this forces $t_{1}=1/2$. Therefore there exists a
unique $G$-equivariant simplicial distribution relative to $Y$ in this case.

When we take the Borel construction and then restrict to the $2$-skeleton
(this gives $W=(X/\\!/G)^{(2)}$) the inclusion map $j:Y\to W$ sends the unique
non-degenerate $1$-simplex of $Y$ to the edge $x(0)$ (the diagonal edge in the
space in Figure (2(a))). Again there is a unique simplicial distribution
relative to $Y$ given by $t_{1}=1/2$ by the isomorphism in (4).

Now, we consider the cofiber sequence

$Y\xrightarrow{j}W\to\overline{W}$ (16)

Let $[\gamma_{G}]$ denote the cohomology class obtained as the image of
$[s_{1}]\in H^{1}(Y,\mathbb{Z}_{2})$ under the connecting homomorphism, where
$s_{1}:Y\to N\mathbb{Z}_{2}$ sends the unique non-degenerate $1$-simplex to
the edge labeled by $1$. We can compute the cochain $\gamma_{G}$ using the
construction of the connecting homomorphism. More explicitly, we have
$\gamma_{G}(\sigma)=1$ for

$\sigma\in\\{\sigma_{0}(00),\sigma_{1}(00),\sigma_{0}(11),\sigma_{1}(11)\\},$

and otherwise zero. We see that $\gamma_{G}$ is non-zero on the upper triangle
of the surface in Figure (2(c)), which is a closed surface in $\overline{W}$,
therefore $[\gamma_{G}]\neq 0$. Then Proposition 3.5 implies that the
simplicial distribution with $t_{1}=1/2$ is contextual.

Using Lemma 3.2 we conclude that every $G$-equivariant simplicial distribution
$p:X\to D(Y)$ relative to $Y$ is $G$-equivariantly contextual.

Next we want to understand the representation of $\gamma_{G}$ in the total
complex. Note that here we regard $\gamma_{G}$ as a cocycle on
$\overline{(X/\\!/G)}$, the cofiber of $Y\to X/\\!/G$, rather than the
subspace $\overline{W}$. Since $[\gamma]=0$ there exists
$s:\bar{X}_{1}\to\mathbb{Z}_{2}$ such that $d^{v}s=\gamma$. For concreteness
we will choose

$s(x_{0})=0\;\;\text{ and }\;\;s(x_{1})=1.$ (17)

In the total complex we have

$(0,0,\gamma)-d(0,s)=(0,0-d^{h}s,\gamma-d^{v}s)=(0,-d^{h}s,0).$

The cocycle $\phi=-d^{h}s$, which can be regarded as a function
$\mathbb{Z}_{2}\times\bar{X}_{1}\to\mathbb{Z}_{2}$, is given by

$\displaystyle\phi(g,x_{i})=s(g\cdot
x_{i})+s(x_{i})=\left\\{\begin{array}[]{cc}1&g=1\\\
0&\text{otherwise.}\end{array}\right.$ (18)

##  4 Quantum distributions

Equivariant simplicial distributions arise naturally in quantum theory. In
this section we provide an approach based on partial groups, which is
complementary to the cofibration approach of the previous sections. Then we
apply our theory to equivariant simplicial distributions that are obtained
from quantum theory. In Section 4.6 we consider an important example, known as
the Mermin star construction, which also has applications to measurement-based
quantum computing [4]. We show that this construction produces equivariantly
contextual simplicial distributions and this kind of contextuality can be
detected by the cohomology classes we construct in the theory.

###  4.1 Extensions of partial groups

We recall the theory of extensions of partial groups from [7]. There are two
important groups associated to a partial group:

  * •

The normalizer of the partial group $M$ is defined by

$N(M)=\\{\theta\in
M_{1}:\,\exists\,\text{id}_{M}\xrightarrow{\theta}f_{\theta}\\}.$

  * •

The center of $M$ is the subgroup $Z(M)\subset N(M)$ consisting of those
$\theta\in M_{1}$ such that $\text{id}_{M}\xrightarrow{\theta}\text{id}_{M}$.

We are interested in the case where $M=NA$. We have $Z(NA)=N(NA)=A$.
Extensions of partial groups are described by fiber bundles. Let $N$ be
another partial group. The extension of $M$ by $N$ is defined to be a fiber
bundle

$N\to E\to M$

In the theory of partial groups the total space $E$ can be described by a
twisted product. An $M$-twisting pair for $N$ is a pair of functions
$(t,\beta)$ where

$t:M_{1}\to\text{Aut}(N)\;\;\;\;\text{ and }\;\;\;\;\beta:M_{2}\to N(N)$

satisfying

  * •

$\beta(x,y)$ determines a homotopy $t(x\cdot y)\to t(x)\cdot t(y)$,

  * •

$t(1)=\text{id}$ and $\beta(x,1)=1=\beta(1,x)$ for all $x\in M_{1}$,

  * •

for all $(x,y,z)\in M_{3}$,

$t(x)(\beta(y,z))\cdot\beta(x,y\cdot z)=\beta(x,y)\cdot\beta(x\cdot y,z).$

The pair $(t,\beta)$ can be used to define a twisting function $\tau$ and the
total space can be described as the twisted product $E=N\times_{\tau}M$; see
[7, Theorem 4.5]. We will not go into the description of $\tau$ in general. We
will be more explicit when $N=NA$, the case of interest for us. In this paper
we will need two extreme cases of extensions:

  * •

$\beta$ is trivial: In this case the twisted product is simply denoted by
$N\ltimes M$. Our main example will come from an action of a group $G$ on $M$.
We will consider $NG\ltimes M$.

  * •

$t$ is trivial: Such extensions are called central. We will consider the case
where $N=NA$. Note that in this case $\beta:M_{2}\to A$ is precisely a
$2$-cocycle. We will write $NA\times_{\beta}M$ for the twisted product.

Central extensions of partial groups generalize central extensions of groups.
Let $K$ be a group $A\subset K$ be a central subgroup. We have a central group
extension

${0}\to A\to K\xrightarrow{\epsilon}\bar{K}\to 1$ (19)

Consider a set-theoretic section

$\eta:\bar{K}\to K$

of $\epsilon$ satisfying $\eta(1_{\bar{K}})=1_{K}$. Then we can define a
cocyle

$\beta(\bar{k}_{1},\bar{k}_{2})=\eta(\bar{k}_{1})\eta(\bar{k}_{2})\eta(\bar{k}_{1}\bar{k}_{2})^{-1}.$

The associated cohomology class $[\beta]$ classifies the group extension. We
can also regard this extension as an extension of partial groups. Let
$A\times_{\beta}\bar{K}$ denote the group whose elements consists of pairs
$(a,\bar{k})$ together with the multiplication rule twisted by $\beta$:

$(a_{1},\bar{k}_{1})\cdot(a_{2},\bar{k}_{2})=(a_{1}+a_{2}+\beta(\bar{k}_{1},\bar{k}_{2}),\bar{k}_{1}\bar{k}_{2}).$
(20)

Then there is a commutative diagram

${NA}$${NA}$${NA\times_{\beta}N\bar{K}}$${N(A\times_{\beta}\bar{K})}$${N\bar{K}}$${N\bar{K}}$$\scriptstyle{i}$$\scriptstyle{\pi}$$\scriptstyle{\cong}$
(21)

The section $\eta$ also defines a pseudo-section of the left-hand partial
group extension, which by a slight abuse of notation, we still denote by
$\eta:N\bar{K}\to N\mathbb{Z}_{d}\times_{\beta}N\bar{K}$. (Pseudo-section
means that the map is compatible with the simplicial structure maps except
$d_{0}$.) The isomorphism is given by

$((a_{1},\cdots,a_{n}),(\bar{k}_{1},\cdots,\bar{k}_{n}))\mapsto((a_{1},\bar{k}_{1}),\cdots,(a_{n},\bar{k}_{n}))$

For an arbitrary central partial group extension we will allow the base space
to be a partial group: $NA\to NA\times_{\beta}M\to M$ where $M$ is a partial
group. Equation (20) also holds for the $1$-simplices of the total space as
the $\Pi_{2}$ map coincides with the $d_{1}$-face of the twisted product.

######  Lemma 4.1.

For a central partial group extension

$NA\xrightarrow{i}NA\times_{\beta}M\xrightarrow{\pi}M$

the following are equivalent:

  1. 1.

$[\beta]=0$ in $H^{2}(M,A)$.

  2. 2.

The map $i$ splits.

  3. 3.

The map $\pi$ splits.

###### Proof.

The class $[\beta]$ is zero if and only if the twisted product is isomorphic
to the trivial one $E\cong NA\times M$; see for example [16, App. B]. Both (2)
and (3) are equivalent to this latter condition. ∎

###  4.2 Group action on partial groups

Let $G$ be a group. Consider the central partial group extension

$NA\to E\xrightarrow{\pi}M$

where $E=NA\times_{\beta}M$. Our group will act on the total space in such a
way that its restriction to the fiber is trivial and moreover the action is
compatible with the $NA$-action on the total space. Note that this fiber
bundle is in fact a principal $NA$-bundle: the fiber is not just a partial
group, it is a simplicial abelian group. More precisely, the action is given
by a homomorphism $\varphi:G\to\text{Aut}(NA\times_{\beta}M)$, which we simply
denote by $g\cdot x=\varphi(g)(x)$, such that

  * •

$g\cdot a=a$ for all $a\in(NA)_{n}$, and

  * •

$g\cdot(a\cdot x)=a\cdot(g\cdot x)$.

Thus $G$ acts on $E$ by partial group automorphisms fixing $NA$. Here $NA$
acts freely on the total space by left multiplication on the first coordinate
of the twisted product. Then we have

$g\cdot(a,m)=(a+\Phi_{g}(g\cdot m),g\cdot m).$ (22)

for some function $\Phi_{g}:M_{1}\to A$. We will think of this as a function
$\Phi:G\times M_{1}\to A$. Our approach will be to regard this as a cochain in
a double complex.

First we begin with the partial group extension associated to the group
action:

$NA\to NG\ltimes E\xrightarrow{\tilde{\pi}}NG\ltimes M$ (23)

where $\tilde{\pi}\colon NG\ltimes E\to NG\ltimes M$ is defined on
$1$-simplices by $\tilde{\pi}((g,x))=(g,\pi(x))$. The associated twisting pair
$(t,\beta)$ is given by $t=\varphi$ and $\beta=0$. Our next goal is to
identify the partial group extension associated to the group action with the
Borel construction.

######  Lemma 4.2.

There is an isomorphism of simplicial sets

$M/\\!/G\cong NG\ltimes M$

given by $S:M/\\!/G\to NG\ltimes M$ defined by

$\displaystyle[(g_{0},g_{1},\ldots,g_{n}),(m_{1},\cdots,m_{n})]$
$\displaystyle\mapsto((g_{0}^{-1}m_{1},g_{1}),(g_{1}^{-1}g_{0}^{-1}m_{2},g_{2}),\cdots,((g_{n-1}g_{n-2}\cdots
g_{2}g_{1})^{-1}g_{0}^{-1}m_{n},g_{n})]$

and $T:NG\ltimes M\to M/\\!/G$ defined by

$\displaystyle((m_{1},g_{1}),\cdots,(m_{n},g_{n}))$
$\displaystyle\mapsto[(1,g_{1},\cdots,g_{n}),(m_{1},g_{1}m_{2},\cdots,g_{n-1}\cdots
g_{2}g_{1}m_{n})].$

###### Proof.

Follows from direct verification.

∎

We note that the isomorphism given in the lemma above can be extended to
extensions of partial groups.

######  Proposition 4.3.

There is a commutative diagram of partial group extensions

${NA}$${E/\\!/G}$${M/\\!/G}$${NA}$${NG\ltimes E}$${NG\ltimes
M}$$\scriptstyle{\cong}$$\scriptstyle{p}$$\scriptstyle{\cong}$$\scriptstyle{\tilde{\pi}}$

###### Proof.

We need only to prove that the right-hand square indeed commutes. Note that
the vertical isomorphisms are given by $S$ in Lemma 4.2. Let
$[(1,g_{1},\cdots,g_{n}),(x_{1},\cdots,x_{n})]\in(E/\\!/G)_{n}$. Then we have
that

$\displaystyle S\circ p([(1,g_{1},\cdots,g_{n}),(x_{1},\cdots,x_{n})])$
$\displaystyle=S((1,g_{1},\ldots,g_{n}),\pi(x))$
$\displaystyle=((g_{1},\pi(x_{1})),(g_{2},g_{1}^{-1}\pi(x_{2})),\cdots,(g_{n},(g_{n-1}g_{n-2}\cdots
g_{1})^{-1}\pi(x))).$

On the other hand,

$\displaystyle\tilde{\pi}\circ
S([(1,g_{1},\cdots,g_{n}),(x_{1},\cdots,x_{n})])$
$\displaystyle=\tilde{\pi}((g_{1},x_{1}),(g_{2},g_{1}^{-1})x_{2},\cdots,(g_{n},(g_{n-1}g_{n-2}\cdots
g_{1})^{-1}x))$
$\displaystyle=((g_{1},\pi(x_{1})),(g_{2},g_{1}^{-1}\pi(x_{2})),\cdots,(g_{n},((g_{n-1}g_{n-2}\cdots
g_{1})^{-1}\pi(x))).$

Thus the claim follows. ∎

Recall that $M/\\!/G$ is the diagonal of the bisimplicial set
$S_{G}(M)_{p,q}=(EG)_{p}\times_{G}M_{q}$ defined in Equation (11). We regard
$\Phi$ as a $(1,1)$-cochain in the double complex
$C^{*}(\mathbb{Z}[S_{G}(M)],A)$. Similarly we can regard $\beta:M_{2}\to A$ as
a $(0,2)$-cochain in the same complex.

######  Lemma 4.4.

The function $\Phi$ satisfies:

  1. 1.

$d^{v}\Phi=d^{h}\beta$,

  2. 2.

$d^{h}\Phi=0$.

###### Proof.

Automorphisms of $E=NA\times_{\beta}M$ are determined by their restriction to
$1$-simplices (part (1), Lemma 2.4). We have a commutative diagram

${(NA\times_{\beta}M)_{2}}$${(NA\times_{\beta}M)_{1}\times(NA\times_{\beta}M)_{1}}$${(NA\times_{\beta}M)_{2}}$${(NA\times_{\beta}M)_{1}\times(NA\times_{\beta}M)_{1}}$$\scriptstyle{g\cdot}$$\scriptstyle{d_{2}\times
d_{0}}$$\scriptstyle{g\cdot}$$\scriptstyle{d_{2}\times d_{0}}$

By commutativity of the diagram we obtain

$g\cdot((0,0),\sigma)=((\Phi_{g}(g\cdot d_{2}\sigma),\Phi_{g}(g\cdot
d_{0}\sigma)+\beta(\sigma)-\beta(g\cdot\sigma)),g\cdot\sigma).$

Now, $g\cdot$ is a simplicial set map and since the twisted product is
determined by a $2$-cocycle it suffices to require compatibility with the face
maps $d_{i}$ from $2$-simplices. Compatibility with $d_{1}$ requires that

$d_{1}(g\cdot((0,0),\sigma))=(\Phi_{g}(g\cdot d_{2}\sigma)+\Phi_{g}(g\cdot
d_{0}\sigma)+\beta(\sigma)-\beta(g\cdot\sigma),d_{1}(g\cdot\sigma))$

is equal to

$g\cdot(d_{1}((0,0),\sigma))=(\Phi_{g}(g\cdot
d_{1}\sigma),g\cdot(d_{1}\sigma))$

which gives $d^{v}\Phi=d^{h}\beta$. A similar computation shows that $g\cdot$
is compatible with $d_{0}$ and $d_{2}$. Finally $d^{h}\Phi=0$ follows from the
requirement that $g\cdot(h\cdot((0,0),\sigma))=gh\cdot((0,0),\sigma)$. Indeed,
using Equation (22) we have that

$\displaystyle g\cdot(h\cdot((0,0),\sigma))$
$\displaystyle=g\cdot(\Phi_{h}(h\cdot\sigma),h\cdot\sigma)=(\Phi_{g}(gh\cdot\sigma)+\Phi_{h}(h\cdot\sigma),gh\cdot\sigma)$
$\displaystyle=(\Phi_{gh}(gh\cdot\sigma),gh\cdot\sigma)$
$\displaystyle=gh\cdot((0,0),\sigma).$

This gives the identity

$\Phi_{g}(gh\cdot\sigma)+\Phi_{h}(h\cdot\sigma)=\Phi_{gh}(gh\cdot\sigma).$

from which the result follows:
$d^{h}\Phi(g,h,\sigma)=\Phi_{g}(gh\cdot\sigma)+\Phi_{h}(h\cdot\sigma)-\Phi_{gh}(gh\cdot\sigma)=0$.
∎

Let $\eta:M\to NA\times_{\beta}M$ denote the pseudo-section defined by
$\eta(x)=(0,x)$. Then we have

$\displaystyle\eta(x)\cdot\eta(y)\cdot\eta(x\cdot y)^{-1}$
$\displaystyle=(0,x)\cdot(0,y)\cdot(0,x\cdot y)^{-1}$ (24)
$\displaystyle=(\beta(x,y),x\cdot y)\cdot(-\beta(x\cdot y,x^{-1}\cdot
y^{-1}),y^{-1}\cdot x^{-1})$ $\displaystyle=(\beta(x,y),1)$

and

$\displaystyle(g\cdot\eta(g^{-1}\cdot x))\cdot\eta(x)^{-1}$
$\displaystyle=(g\cdot(0,g^{-1}\cdot x))\cdot(0,x)^{-1}$ (25)
$\displaystyle=(\Phi_{g}(x),x)\cdot(-\beta(x,x^{-1}),x^{-1})$
$\displaystyle=(\Phi_{g}(x),1).$

######  Lemma 4.5.

There exists $s:M_{1}\to A$ such that $d^{h}s=\Phi$ if and only if $\pi$
admits a $G$-equivariant pseudo-section.

###### Proof.

We firstly note that the cohomology class of $\Phi$ does not depend on the
choice of the pseudo-section $\eta$. Indeed, let $\eta_{1}$ and $\eta_{2}$ be
two pseudo-sections and let $\Phi^{(1)}$ and $\Phi^{(2)}$ be the corresponding
functions defined using Equation (25). Since for every $x\in M_{1}$ we have
that $\pi(\eta_{1}(x))=\pi(\eta_{2}(x))$, there exists a function
$\alpha\colon M_{1}\to A$ such that $\eta_{2}(x)=\alpha(x)\eta_{1}(x)$. Recall
that we assume that the action of $G$ on $A$ is trivial. Therefore we have
that for any $g\in G$, $x\in M_{1}$

$\displaystyle\Phi^{(2)}(g,x)$
$\displaystyle=g\cdot\eta_{2}(g^{-1}x)\eta_{2}(x)^{-1}$
$\displaystyle=\alpha(g^{-1}x)g\cdot\eta_{1}(g^{-1}x)\alpha(x)^{-1}\eta_{1}(x)^{-1}$
$\displaystyle=\alpha(g^{-1}x)-\alpha(x)+{\Phi^{(1)}(g,x)}.$

We obtain that the difference of the cocycles $\Phi^{(1)}$ and $\Phi^{(2)}$ is
a coboundary of the cochain $\alpha$. So the class of $\Phi$ does not depend
on the choice of the pseudo-section.

From Equation (25) it follows directly that if $\eta$ is $G$-equivariant, then
the cocycle $\Phi$ become zero. By the observation above we see that if there
is any equivariant pseudo-section, then the cocycle $\Phi$ differs from zero
by a coboundary, thus its cohomology class is zero.

Assume now that $[\Phi]=0$, that is, there exists a function $a\colon M_{1}\to
A$ such that for every $g\in G$ and $x\in M_{1}$ we have that

$a(g^{-1}x)-a(x)=g\cdot\eta(g^{-1}x)\eta(x)^{-1}.$

Now define the function $\lambda\colon M_{1}\to A$ by
$\lambda(x)=\eta(x)a(x)^{-1}$. From the equation above and the fact that $\pi$
maps $A$ to the trivial partial subgroup of $M$ it follows that $\lambda$ is
an equivariant pseudo-section. Thus the claim follows. ∎

The pseudo-section $\eta_{G}:M/\\!/G\to E/\\!/G$ defined by

$\eta_{G}([(1,g_{1},\cdots,g_{n}),x)])=[(1,g_{1},\cdots,g_{n}),\eta(x)]$

gives a $2$-cocycle $\beta_{G}:(M/\\!/G)_{2}\to A$ defined by a formula
similar to Equation (24)

$[(1,1),\beta_{G}(\sigma,x,y)]=\eta_{G}(x)\cdot\eta_{G}(y)\cdot\eta_{G}(x\cdot
y)^{-1},$ (26)

where $[\sigma,(x,y)]\in(EG)_{2}\times_{G}M_{2}$, such that the principal
$NA$-bundle in (23) is classified by $[\beta_{G}]$.

######  Remark 4.6.

Using Lemma 4.2 we can identify $M/\\!/G\cong NG\ltimes M$. Thus for
$\sigma=(1,g_{1},g_{2})\in(EG)_{2}$ the element $[(\sigma,(x_{1},x_{2}))]$ is
represented by $((g_{1},x_{1}),(g_{2},g_{1}^{-1}x_{2}))\in(NG\ltimes E)_{2}$.
The function $\eta_{G}\colon NG\ltimes M\to NG\ltimes E$ is then given by

$\eta_{G}((g_{1},x_{1}),\cdots,(g_{n},x_{n}))=((g_{1},\eta(x_{1})),\cdots,(g_{n},\eta(x_{n}))).$

Using this we obtain

$\displaystyle{(1,\beta_{G}((g_{1},x_{1}),(g_{2},x_{2}))}$
$\displaystyle=\eta_{G}(g_{1},x_{1})\cdot\eta_{G}(g_{2},x_{2})\cdot\eta_{G}(g_{1}g_{2},x_{1}\cdot(g_{1}x_{2}))^{-1}$
(27)
$\displaystyle=(g_{1},\eta(x_{1}))\cdot(g_{2},\eta(x_{2}))\cdot(g_{1}g_{2},\eta(x_{1}\cdot(g_{1}x_{2})))^{-1}$
$\displaystyle=(g_{1}g_{2},\eta(x_{1})\cdot(g_{1}\eta(x_{2})))\cdot((g_{1}g_{2})^{-1},(g_{1}g_{2})^{-1}\cdot\eta(x_{1}\cdot(g_{1}x_{2}))^{-1})$
$\displaystyle=(1,\eta(x_{1})\cdot(g_{1}\eta(x_{2}))\cdot\eta(x_{1}\cdot(g_{1}x_{2}))^{-1}).$

######  Lemma 4.7.

The cocycle $\beta_{G}$ is represented by the triple $(0,\Phi,\beta)$ in the
total complex.

###### Proof.

We will use the identification in Remark 4.6 and Equation (27). The claim
follows from the formulas given in Equation (12). For the first factor, recall
that $M$ is a reduced simplicial set (see Definition 2.3) and for the unique
vertex $\ast\in M_{0}$ we have $s_{0}(\ast)=1\in M_{1}$. Thus for
$\sigma=(1,g_{1},g_{2})\in EG_{2}$ we compute that

$\displaystyle\alpha(\sigma,\ast))$
$\displaystyle=\beta_{G}(\sigma,s_{1}s_{0}(\ast))$
$\displaystyle=\beta_{G}((g_{1},1),(g_{2},1))$
$\displaystyle=(1,\eta(1)\cdot(g_{1}\eta(1))\cdot\eta(1\cdot(g_{1}\cdot
1))^{-1})$ $\displaystyle=(1,0).$

We obtain that $\alpha(\sigma,\ast)=0$. The second factor comes from the
following computation for $g\in G$ and $x\in M_{1}$:

$\displaystyle\alpha^{\prime}((1,g),x)$
$\displaystyle=\beta_{G}((1,g,1),s_{0}x)-\beta_{G}((1,1,g),s_{1}x)$
$\displaystyle=\beta_{G}((g,1),(1,g^{-1}x)))-\beta_{G}((1,x),(g,1))$
$\displaystyle=(1,\eta(1)\cdot(g_{1}\eta(g^{-1}x))\cdot\eta(1)^{-1})-(1,\eta(x)\cdot\eta(1)\cdot\eta(x)^{-1})$
$\displaystyle=(1,\eta(1)\cdot(g_{1}\eta(g^{-1}x))\cdot\eta(1)^{-1})$
$\displaystyle=(1,\Phi_{g}(x)).$

Therefore $\alpha^{\prime}((1,g),x)=\Phi_{g}(x)$. Finally the third factor can
be computed as

$\displaystyle\alpha^{\prime\prime}[(1),(x_{1},x_{2})]$
$\displaystyle=\beta_{G}((1,1,1),(x_{1},x_{2}))$
$\displaystyle=\beta_{G}((1,x_{1}),(1,x_{2}))$
$\displaystyle=(1,\eta(x_{1})\cdot\eta(x_{2})\cdot\eta(x_{1}x_{2})^{-1})$
$\displaystyle=(1,\beta(x_{1},x_{2})).$

∎

######  Theorem 4.8.

Let $NA\xrightarrow{x}E\xrightarrow{\pi}M$ be a central partial group
extension and $G$ be a group acting on $E$ partial group automorphisms that
fix $NA$. The following are equivalent:

  1. 1.

The class $[\beta_{G}]$ is zero.

  2. 2.

There exists $s:M_{1}\to A$ such that $d^{v}s=\beta$ and $d^{h}s=\Phi$.

  3. 3.

The map $\pi$ admits a $G$-equivariant section.

###### Proof.

We begin by showing the equivalence of (1) and (2). By Lemma 4.7
$[\beta_{G}]=0$ if and only if $[(0,\Phi,\beta)]=0$ in the total complex. This
condition is equivalent to the existence of $s:M_{1}\to A$ and $r:G\to A$ such
that $d(r,s)=(0,\Phi,\beta)$. Unraveling the coboundary in the total complex
gives

$d(r,s)=(d^{h}r,d^{h}s,d^{v}s)$

where we used $d^{v}r=0$. Thus $[(0,\Phi,\beta)]=0$ if and only if $d^{h}r=0$,
$d^{h}s=\Phi$ and $d^{v}s=\beta$. We obtain the desired result since we can
take $r=0$.

Equivalence of (2) and (3) follows from Lemma 4.1 and Lemma 4.5. ∎

######  Remark 4.9.

In practice we will not carry over the trivial part in the Equations (24-27)
and simply write

$\displaystyle\beta(x,y)$ $\displaystyle=\eta(x)\cdot\eta(y)\cdot\eta(x\cdot
y)^{-1}$ $\displaystyle\Phi_{g}(x)$ $\displaystyle=(g\cdot\eta(g^{-1}\cdot
x))\cdot\eta(x)^{-1}$ $\displaystyle\beta_{G}(x,y)$
$\displaystyle=\eta_{G}(x)\cdot\eta_{G}(y)\cdot\eta_{G}(x\cdot y)^{-1}.$

###  4.3 Comparison to cofibration

There is a canonical comparison diagram

${NA}$${NA}$${E}$${E}$${\bar{E}}$${M}$$\scriptstyle{i}$$\scriptstyle{i}$$\scriptstyle{q}$$\scriptstyle{\pi}$$\scriptstyle{\alpha}$
(28)

where the left sequence is a cofiber sequence and right sequence is a central
extension of partial groups.

######  Lemma 4.10.

We have $\alpha^{*}([\beta])=[\gamma]$.

###### Proof.

Consider the Serre spectral sequence for the right vertical sequence in
Diagram (6) with coefficients in $A$. Let $\operatorname{id}$ be the identity
homomorpshim of $A$. Then we have that $[\operatorname{id}]\in H^{1}(A,A)$ and
that $d_{2}([\operatorname{id}])=[\beta]$; see [17]. This differential is the
transgression homomorphism and it is defined by the following diagram (see
[18, Sec. 6.2]):

${0}$${H^{2}(M,A)}$${H^{2}(M,A)}$${0}$${H^{1}(A,A)}$${H^{2}(\bar{E},A)}$${H^{2}(E,A)}$$\scriptstyle{\alpha^{\ast}}$$\scriptstyle{\pi^{\ast}}$$\scriptstyle{\zeta}$

This diagram comes from the map of cofibrations:

${NA}$${\ast}$${E}$${M}$${\bar{E}}$${M}$$\scriptstyle{i}$$\scriptstyle{\pi}$$\scriptstyle{\alpha}$

By the definition of the transgression we obtain that
$\alpha^{\ast}([\beta])=\zeta([\operatorname{id}])=[\gamma]$. ∎

######  Proposition 4.11.

The following are equivalent.

  1. 1.

$i:NA\to E$ has a section.

  2. 2.

$[\gamma]=0$ in $H^{2}(\bar{E},A)$.

  3. 3.

$[\beta]=0$ in $H^{2}(M,A)$.

###### Proof.

Equivalence of (1) and (2) follows from Proposition 3.5 and the equivalence of
(1) and (3) follows from Lemma 4.1. ∎

######  Corollary 4.12.

If $[\beta]\neq 0$ then every simplicial distribution $p:E\to D_{R}(NA)$
relative to $NA$ is contextual.

###### Proof.

Follows from Proposition 3.5 and Proposition 4.11. ∎

We can also apply the discussion of $G$-equivariant contextuality. In this
case the comparison diagram is given as follows

${NA}$${NA/\\!/G}$${NA}$${E/\\!/G}$${E/\\!/G}$${E/\\!/G}$${\overline{E/\\!/G}}$${\bar{E}/\\!/G}$${M/\\!/G}$$\scriptstyle{c}$$\scriptstyle{\alpha}$
(29)

We have

$\alpha^{*}([\beta_{G}])=\tilde{\gamma}_{G}\;\;\;\;\text{ and
}\;\;\;\;c^{*}(\tilde{\gamma}_{G})=\gamma_{G}.$

######  Lemma 4.13.

We have

$\alpha^{*}[(0,\Phi,\beta)]=[(0,\tilde{\phi},\gamma)].$

###### Proof.

Follows from the first equation above and the corresponding descriptions in
the total complexes. ∎

######  Proposition 4.14.

The following are equivalent.

  1. 1.

$i:NA\to E$ has a $G$-equivariant section.

  2. 2.

$i:NA\to E/\\!/G$ has a section.

  3. 3.

$[\beta_{G}]\in H^{2}(M/\\!/G,A)$ is zero.

  4. 4.

$[\gamma_{G}]\in H^{2}(\overline{E/\\!/G},A)$ is zero.

###### Proof.

Equivalence of (1), (2) and (4) is by Lemma 3.3 and Proposition 3.6. Applying
Proposition 4.11 to the leftmost cofibration and the rightmost fibration,
which is a partial group extension by Proposition 4.3, we obtain the
equivalence of (3) and (4). ∎

######  Corollary 4.15.

If $[\beta_{G}]\neq 0$ then every $G$-equivariant distribution $p:E\to
D_{R}(NA)$ relative to $NA$ is $G$-equivariantly contextual.

###### Proof.

Follows from Corollary 3.7 and Proposition 4.14. ∎

######  Remark 4.16.

By Theorem 4.8 we can show that $[\beta_{G}]\neq 0$ by working in the total
complex. Part (2) of this corollary can be broken into two steps: We have
$[\beta_{G}]=0$ if and only if

  1. 1.

there exists $s^{\prime}:M_{1}\to A$ such that $d^{v}s^{\prime}=\beta$, and

  2. 2.

there exists $s^{\prime\prime}:M_{1}\to A$ such that $d^{v}s^{\prime\prime}=0$
and $d^{h}s^{\prime\prime}=\Phi-d^{h}s^{\prime}$.

Note that $s=(0,s^{\prime\prime}+s^{\prime})$ satisfies $ds=(0,\Phi,\beta)$.
We can apply this observation to the case when $[\beta]=0$. Then $s^{\prime}$
as specified in (1) exists. Thus $[\beta_{G}]=0$ if and only if
$s^{\prime\prime}$ as specified in (2) exists.

###  4.4 Example: Dihedral group

We will compare the cofibration involving the torus in Sections 2.6 and 3.3 to
a partial group extension obtained from the trivial group extension:

${S^{1}}$${N\mathbb{Z}_{2}}$${S^{1}\times
S^{1}}$${N(\mathbb{Z}_{2}\times\mathbb{Z}_{2})}$${\overline{S^{1}\times
S^{1}}}$${N\mathbb{Z}_{2}}$$\scriptstyle{\alpha}$ (30)

The map $\alpha$ sends $x_{i}\mapsto 1$ where $i=0,1$. We consider the
$G=\mathbb{Z}_{2}$ action on the middle spaces by swapping the coordinates.
Let us begin with a pseudo-section $\eta:N\mathbb{Z}_{2}\to
N(\mathbb{Z}_{2}\times\mathbb{Z}_{2})$ that sends $a\mapsto(0,a)$ in degree
$1$. In fact, this is a section and hence $\beta=0$. In Section 3.3 we have
seen that $[\gamma]=0$. Therefore $\alpha^{*}([\beta])=[\gamma]$ (thus
verifying Lemma 4.10). We compute $\Phi$ as follows:

$\displaystyle\Phi_{a}(b)$ $\displaystyle=a\cdot\eta(-a\cdot
b)\cdot\eta(b)^{-1}$ $\displaystyle=\left\\{\begin{array}[]{cc}0&a=0\\\
b&a=1.\end{array}\right.$

Then we have

$\displaystyle\alpha^{*}(\Phi)(a,x_{i})$ $\displaystyle=\Phi(a,\alpha(x_{i}))$
$\displaystyle=\Phi(a,1)$ $\displaystyle=\left\\{\begin{array}[]{cc}0&a=0\\\
1&a=1\end{array}\right.$ $\displaystyle=\phi(a,1).$

where $\phi$ is given by Equation (18). Using $s$ in Equation (17) we observe
that

$\alpha^{*}(0,\Phi,0)=(0,\phi,0)=d(0,s)+(0,\phi,\gamma),$

and hence $\alpha^{*}[(0,\Phi,0)]=[(0,\phi,\gamma)]$ (this verifies Lemma
4.13).

We observe that $(\mathbb{Z}_{2}\times\mathbb{Z}_{2})\rtimes\mathbb{Z}_{2}$,
where the action is the swap, is isomorphic to the dihedral group $D_{8}$. The
action on the base space $N\mathbb{Z}_{2}$ is trivial. Then the Borel
construction of Diagram (30) gives

${S^{1}}$${N\mathbb{Z}_{2}}$${(S^{1}\times
S^{1})/\\!/G}$${ND_{8}}$${\overline{(S^{1}\times
S^{1})/\\!/G}}$${N(\mathbb{Z}_{2}\times\mathbb{Z}_{2})}$$\scriptstyle{\alpha_{G}\,\circ\,c}$

We can compute the cocycle representing the extension class from the pseudo-
section $\eta_{G}:N(\mathbb{Z}_{2}\times\mathbb{Z}_{2})\to ND_{8}$ defined by
$\eta_{G}(c,d)=((0,c),d)$:

$\displaystyle\beta_{G}((c,d),(c^{\prime},d^{\prime}))$
$\displaystyle=\eta(c)\cdot(d\eta(c))\cdot\eta(c+(dc^{\prime}))^{-1}$
$\displaystyle=(0,c)+d\cdot(0,c^{\prime})+(0,c+c^{\prime})$
$\displaystyle=\left\\{\begin{array}[]{cc}c^{\prime}&d=1\\\
0&d=0.\end{array}\right.$

Note that we use that the action on the base space is trivial. Using Equation
(12) we obtain

$\nabla_{2}(\beta_{G})=(0,\Phi,0).$

When computing this we also used the isomorphism
$N(\mathbb{Z}_{2}\times\mathbb{Z}_{2})\cong
N\mathbb{Z}_{2}/\\!/\mathbb{Z}_{2}$ that sends
$((c,d),(c,d))\mapsto[(0,d,d^{\prime}),(c,c^{\prime})]$ in degree $2$. To
illustrate this we compute the middle term in Equation (12):

$\displaystyle\alpha^{\prime}[(0,d),c]$
$\displaystyle=\beta_{G}[(0,d,0),(0,c)]-\beta_{G}[(0,0,d),(c,0)]$
$\displaystyle=\beta_{G}[(0,d,0),(0,c)]$
$\displaystyle=\left\\{\begin{array}[]{cc}c&d=1\\\ 0&d=0\end{array}\right.$
$\displaystyle=\Phi_{d}(c).$

###  4.5 Quantum distributions

We recall some basic constructions from [3, Section 6] to study simplicial
distributions that come from quantum mechanics. Let $\mathcal{H}$ denote a
finite dimensional complex Hilbert space. We will write
$\text{Pos}(\mathcal{H})$ and $\text{Proj}(\mathcal{H})$ for the set of
positive operators and the subset of projectors. We define a functor
$P_{\mathcal{H}}:\mathbf{Set}\to\mathbf{Set}$:

  * •

For a set $U$ the set $P_{\mathcal{H}}(U)$ of projective measurements on $U$
consists of functions $\Pi:U\to\text{Proj}(\mathcal{H})$ with finite support,
i.e., $|\\{u\in U:\,\Pi(u)=\mathbb{0}\\}|<\infty$, such that $\sum_{u\in
U}\Pi(u)=\mathbb{1}_{\mathcal{H}}$.

  * •

Given a function $f:U\to V$ the function
$P_{\mathcal{H}}(f):P_{\mathcal{H}}(U)\to P_{\mathcal{H}}(V)$ is defined by

$\Pi\mapsto\left(v\mapsto\sum_{u\in f^{-1}(v)}\Pi(u)\right).$

There is an analogous functor $Q_{\mathcal{H}}$ involving
$\text{Pos}(\mathcal{H})$ instead of the projectors. Note that for
$\mathcal{H}=\mathbb{C}$ this functor coincides with the distribution monad
$D$ introduced in Section 2.1. In this paper we will focus on the projective
version. Given a simplicial set $X:\mathbf{\Delta}^{\text{op}}\to\mathbf{Set}$
we define
$P_{\mathcal{H}}(X):X\xrightarrow{X}\mathbf{Set}\xrightarrow{P_{\mathcal{H}}}\mathbf{Set}$.

######  Definition 4.17.

A simplicial projective measurement on $(X,Y)$ is a simplicial set map
$\Pi:X\to P_{\mathcal{H}}(Y)$. We will write $\text{sProj}(X,Y)$ for the set
of simplicial projective measurements on $(X,Y)$.

Let $\rho$ be a density operator, i.e., $\rho\in\text{Pos}(\mathcal{H})$ and
$\text{Tr}(\rho)=1$. By sending a simplicial measurement $\Pi:X\to
P_{\mathcal{H}}(Y)$ to the simplicial distribution $\rho_{*}(p):X\to D(Y)$
defined by

$\sigma\mapsto\left(\,\theta\mapsto\text{Tr}(\rho\Pi_{\sigma}(\theta))\,\right)$

we obtain a simplicial set map

$\rho_{*}:P_{\mathcal{H}}(Y)\to D(Y)$ (31)

The trace $\text{Tr}(\rho\Pi_{\sigma}(\theta))$ is interpreted as the
probability of obtaining the outcome $\theta$ and in physics literature this
is known as the Born rule. The simplicial set map in (31) will be referred to
as the simplicial Born rule. Next we introduce a nerve space that has been
successful in studying contextuality in the context of quantum theory; see
[16] for applications to operator solutions of linear systems.

######  Definition 4.18.

Let $d\geq 2$ be an integer and $K$ be a group. We define a partial group
$N(\mathbb{Z}_{d},K)$, a simplicial subset of the nerve space $NK$, whose
$n$-simplices are given by

$N(\mathbb{Z}_{d},K)_{n}=\\{(k_{1},k_{2},\cdots,k_{n}):\,k_{i}^{d}=1_{K},\;\;k_{i}k_{j}=k_{j}k_{i}\;\forall
1\leq i,j\leq n\\}.$

The property $k^{d}=1_{K}$ will be referred to as the $d$-torsion property.

Let $U(\mathcal{H})$ denote the group of unitary operators.

######  Proposition 4.19.

([3, Proposition 6.3]) Sending an $n$-tuple $(A_{1},A_{2},\cdots,A_{n})$ of
pairwise commuting $d$-torsion unitary operators to the projective measurement
$\Pi_{A}:\mathbb{Z}_{d}^{n}\to\text{Proj}(\mathcal{H})$ obtained by
simultaneously diagonalizing the operators gives an isomorphism of simplicial
sets

$\text{sd}:N(\mathbb{Z}_{d},U(\mathcal{H}))\to
P_{\mathcal{H}}(N\mathbb{Z}_{d})$

We will identify these two simplicial sets. After this identification the
simplicial Born rule becomes

$\rho_{*}:N(\mathbb{Z}_{d},U(\mathcal{H}))\to D(N\mathbb{Z}_{d})$

Now, consider a group $K$ with a central element $J$ or order $d$. We have a
central group extension

$1\to\langle J\rangle\to K\xrightarrow{\epsilon}\bar{K}\to 1$ (32)

We write $\bar{g}$ for the image of $g$ under the quotient map.

######  Definition 4.20.

Let $d\geq 2$ be an integer and $K$ be a group with a central element $J$ of
order $d$. We define a partial group $\bar{N}(\mathbb{Z}_{d},K)$, a simplicial
subset of the nerve space $N\bar{K}$, whose $n$-simplices are given by

$\bar{N}(\mathbb{Z}_{d},K)_{n}=\\{(\bar{k}_{1},\bar{k}_{2},\cdots,\bar{k}_{n})\in\bar{K}^{n}:\,k_{i}^{d}=1_{K},\;\;k_{i}k_{j}=k_{j}k_{i}\;\forall
1\leq i,j\leq n\\}.$

The central extension in (32) gives a diagram as in (21). Puling back this
diagram along the inclusion $\bar{N}(\mathbb{Z}_{d},K)\to N\bar{K}$ we obtain
the following result. We will still write $\beta$ for the pull-back of the
cocycle $\beta$ along this inclusion.

######  Proposition 4.21.

We have a central extension of partial groups

$N\mathbb{Z}_{d}\xrightarrow{i}N(\mathbb{Z}_{d},K)\xrightarrow{q}\bar{N}(\mathbb{Z}_{d},K)$
(33)

where the total space can be described as the twisted product
$N\mathbb{Z}_{d}\times_{\beta}\bar{N}(\mathbb{Z}_{d},K)$.

There is a way to obtain a simplicial distribution on the total space relative
to the fiber that uses representation theory of groups. Consider a unitary
representation $\psi:K\to U(\mathcal{H})$, i.e., a group homomorphism, such
that

$\psi(J)=e^{2\pi i/d}\mathbb{1}.$

Then given a quantum state $\rho\in\text{Den}(\mathcal{H})$ we can construct a
commutative diagram

${N\mathbb{Z}_{d}}$${N\mathbb{Z}_{d}}$${N\mathbb{Z}_{d}}$${N(\mathbb{Z}_{d},K)}$${N(\mathbb{Z}_{d},U(\mathcal{H}))}$${D(N\mathbb{Z}_{d})}$${\bar{N}(\mathbb{Z}_{d},K)}$${\bar{N}(\mathbb{Z}_{d},U(\mathcal{H}))}$$\scriptstyle{\delta}$$\scriptstyle{\psi_{*}}$$\scriptstyle{\rho_{*}}$

The composite $\rho_{*}^{\psi}=\rho_{*}\circ\psi_{*}$ is a simplicial
distribution relative to $N\mathbb{Z}_{d}$.

######  Definition 4.22.

A quantum state $\rho\in\text{Den}(\mathcal{H})$ is called (non-)contextual
with respect to $\psi:K\to U(\mathcal{H})$ if the simplicial distribution

$\rho_{*}^{\psi}:N(\mathbb{Z}_{d},K)\to D(\mathbb{Z}_{d})$ (34)

is (non-)contextual.

######  Corollary 4.23.

If $[\beta]\neq 0$ then $\rho_{*}^{\psi}$ is contextual for all
$\rho\in\text{Den}(\mathcal{H})$.

###### Proof.

Follows from Corollary 4.12 since the simplicial distribution
$\rho_{*}^{\psi}$ is relative to $NA$. ∎

######  Remark 4.24.

In practice we can assume that $\psi$ is injective so that $K$ can be
identified with a subgroup of $U(\mathcal{H})$. Note that we can always
replace $K$ with the image of $\psi$. $K$ is called contextual if
$\rho_{*}^{\psi}$ is contextual for all $\rho\in\text{Den}(\mathcal{H})$. This
notion of contextuality is usually referred to as state-independent
contextuality and a topological perspective is first developed in [2]. In this
case we say $\rho$ is contextual with respect to $K$ instead of the
homomorphism $\psi$.

Next, we turn to the equivariant case. Let us assume that $\psi:K\to
U(\mathcal{H})$ is injective so that we can identify $K$ as a subgroup of the
unitary group. Under this assumption we drop $\psi$ from notation, e.g., we
simply write $\rho_{*}$ for the map in (34). We will consider partial group
actions on $N(\mathbb{Z}_{d},K)$ in the sense of Section 4.2. In practice such
actions arise from a subgroup $G$ of the normalizer $N(K)$ of $K$ in the
unitary group $U(\mathcal{H})$. For the rest of this section we will restrict
to actions arising in this way.

######  Definition 4.25.

A quantum state $\rho$ is called $G$-equivariant if $U\rho U^{\dagger}=\rho$
for all $U\in G$. A $G$-equivariant quantum state is $G$-equivariantly
(non-)contextual if $\rho_{*}$ is $G$-equivariantly (non-)contextual.

######  Corollary 4.26.

If $[\beta_{G}]\neq 0$ then $\rho_{*}$ is $G$-equivariantly contextual for all
$G$-equivariant quantum states $\rho$.

###### Proof.

Follows from Corollary 4.15 since the simplicial distribution
$\rho_{*}^{\psi}$ is $G$-equivariant and relative to $NA$. ∎

In practice, we will use Remark 4.16 to show that $[\beta_{G}]\neq 0$. The
situation in Corollary 4.26 is referred to as state-independent contextuality
in the physics literature [2].

###  4.6 Example: Mermin star

In this section we will construct an example that is of practical interest in
quantum foundations and computing. Our example is a topological representation
of the well-known Mermin star construction introduced in [11]. We improve on
the earlier topological approach of [2] by help of the simplicial approach
developed in [3].

Let $\mathcal{H}$ denote the $n$-fold tensor product
$(\mathbb{C}^{2})^{\otimes n}$. The Pauli $X$ and $Z$ matrices are given by

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

The Pauli group $P_{n}$ is the subgroup of $U(\mathcal{H})$ generated by
operators of the form

$T_{a}=i^{a_{z}\cdot a_{x}}Z(a_{z})X(a_{x})$

where $i$ is the imaginary unit,
$a=(a_{z},a_{x})\in\mathbb{Z}_{2}^{n}\times\mathbb{Z}_{2}^{n}$, $a_{z}\cdot
a_{x}=\sum_{j}(a_{z})_{j}(a_{x})_{j}$, and

$Z(a_{z})=Z^{(a_{z})_{1}}\otimes\cdots\otimes
Z^{(a_{z})_{n}}\;\;\;\;\;\;X(a_{x})=X^{(a_{x})_{1}}\otimes\cdots\otimes
X^{(a_{x})_{n}}.$

Note that $T_{a}^{2}=\mathbb{1}$ for all $a\in\mathbb{Z}_{2}^{2n}$. The Pauli
group fits in a central extension

$0\to\mathbb{Z}_{4}\xrightarrow{1\mapsto
i\mathbb{1}}P_{n}\xrightarrow{\epsilon}\mathbb{Z}_{2}^{2n}\to 0$

A set-theoretic section of $\epsilon$ can be defined by

$\eta(a)=T_{a}.$ (35)

We will study the partial group extension

$N\mathbb{Z}_{2}\to
N(\mathbb{Z}_{2},P_{n})\xrightarrow{\pi}\bar{N}(\mathbb{Z}_{2},P_{n})$

Now, the set-theoretic section in Equation (35) can be used to define a
pseudo-section of $\pi$, which we still denote by $\eta$. Using $\eta$ and
Equation (24) we can compute

$\displaystyle(-1)^{\beta(a,b)}\mathbb{1}$
$\displaystyle=\eta(a)\cdot\eta(b)\cdot\eta(a+b)^{-1}$
$\displaystyle=T_{a}T_{b}(T_{a+b})^{-1}$ $\displaystyle=(i^{a_{z}\cdot
a_{x}}Z(a_{z})X(a_{x}))(i^{b_{z}\cdot
b_{x}}Z(b_{z})X(b_{x}))(i^{(a+b)_{z}\cdot(a+b)_{x}}Z((a+b)_{z})X((a+b)_{x}))$
$\displaystyle=i^{a_{z}\cdot a_{x}+b_{z}\cdot
b_{x}+(a+b)_{z}\cdot(a+b)_{x}}(-1)^{b_{z}\cdot a_{x}+(a+b)_{z}\cdot(a+b)_{x}}$
$\displaystyle=i^{b_{z}\cdot a_{x}-a_{z}\cdot b_{x}}$
$\displaystyle=(-1)^{(b_{z}\cdot a_{x}-a_{z}\cdot b_{x})/2}$

where we used the fact that $b_{z}\cdot a_{x}-a_{z}\cdot b_{x}$ is divisible
by $2$ since $\omega(a,b)=0$. Therefore

$\beta(a,b)=(b_{z}\cdot a_{x}-a_{z}\cdot b_{x})/2.$ (36)

Similarly we can compute $\Phi$ using Equation (25).

(a)

(b)

Figure 3: (a)The Mermin star represented by a reduced simplicial set $M$
consisting of eight $2$-simplices $\sigma_{ai},\sigma_{bi}$ where $i=1,2,3,4$.
The right (top) and left (bottom) edges are identified. (b) Edges are labeled
by elements of $P_{3}$ modulo the subgroup $\langle-\mathbb{1}\rangle$. For
simplicity we omit the tensor product from notation, e.g., $XXX$ stands for
$X\otimes X\otimes X$, and indicate the qubit on which the operator is acting
by a subscript, e.g., $X_{1}$ stands for
$X\otimes\mathbb{1}\otimes\mathbb{1}$.

We begin by constructing a smaller partial group extension and a cofibration
that comes with a comparison map. For the partial group extension first we
consider the $2$-skeleton $N\mathbb{Z}_{2}^{(2)}$ and the partial monoid $M$
given by the space in Figure (3(a)). Let
$\bar{\Pi}:M\to\bar{N}(\mathbb{Z}_{2},P_{n})$ denote the inclusion described
by Figure (3(b)) and $E$ denote the $2$-skeleton of the pull-back of $\pi$
along this maps. The space $E$ consists of the non-degenerate $2$-simplices
given by $\sigma_{ai}(cd)$ and $\sigma_{bi}(cd)$ where $c,d\in\mathbb{Z}_{2}$,
i.e., there are four copies of triangles above a given triangle of $M$.
Instead of providing a picture of $E$ we will consider a simplicial subset
$X\subset E$ which is described in Figure (4(a)). This portion focuses on the
restriction of $E$ over the two triangles $\sigma_{1b}$ and $\sigma_{4b}$ of
$M$. Using all these spaces we obtain a commutative diagram

${S^{1}}$${N\mathbb{Z}_{2}^{(2)}}$${N\mathbb{Z}_{2}}$${X}$${E}$${N(\mathbb{Z}_{2},P_{3})}$${\bar{X}}$${M}$${\bar{N}(\mathbb{Z}_{2},P_{3})}$$\scriptstyle{i}$$\scriptstyle{q}$$\scriptstyle{\alpha}$$\scriptstyle{\pi}$$\scriptstyle{\Pi}$$\scriptstyle{\bar{\alpha}}$$\scriptstyle{\bar{\Pi}}$

where $\Pi|_{X}=\Pi\circ\alpha$ is described in Figure (4(b)). Under $i$ the
circle $S^{1}$ maps to the common edge $x$ between $\sigma_{2}$ and
$\sigma_{3}$.

(a)

(b)

Figure 4: (a) The reduced simplicial set $X$ consisting of six $2$-simplices
$\sigma^{\prime}_{ib},\sigma^{\prime\prime}_{ib},\sigma_{2},\sigma_{3}$ where
$i=1,4$. (b) Edges are labeled by elements of $P_{3}$. This specifies a
simplicial set map $\Pi|_{X}:X\to N(\mathbb{Z}_{2},P_{3})$.

Next we describe the symmetry group $G$. This example is a modified version of
the one discussed in the context of measurement-based quantum computing; see
[4]. Let us define the following unitary operator

$A=\frac{X+Y}{\sqrt{2}}.$

Note that $A^{2}=\mathbb{1}$ and we have

$AXA=Y,\;\;\;\;AYA=X,\;\;\;\;AZA=-Z.$

Therefore $A$ is in the normalizer of $P_{1}\subset U(\mathbb{C}^{2})$.
Consider the symmetry group

$G=\langle A\otimes A\otimes Y,A\otimes Y\otimes A,Y\otimes A\otimes
A\rangle.$

Note that $G$ acts on $N(\mathbb{Z}_{2},P_{3})$ and furthermore this action
restricts to an action on $E$, which is regarded as a simplicial subset via
the inclusion $\Pi$. Consider the following subgroup

$H=\langle V\rangle\subset G.$

where $V=A\otimes A\otimes Y$. We have

$\displaystyle V(X\otimes X\otimes\mathbb{1})V$ $\displaystyle=Y\otimes
Y\otimes\mathbb{1}$ $\displaystyle V(X\otimes X\otimes X)V$
$\displaystyle=-Y\otimes Y\otimes X$ $\displaystyle
V(\mathbb{1}\otimes\mathbb{1}\otimes X)V$
$\displaystyle=-\mathbb{1}\otimes\mathbb{1}\otimes X.$

Hence $H$ acts on the smaller simplicial subset $X$ (embedded via $\Pi|_{X}$).

Finally we consider a $G$-equivariant quantum state
$\rho\in\text{Den}(\mathcal{H})$ given by

$\displaystyle\begin{split}\rho=\frac{1}{4}(\mathbb{1}+\mathbb{1}\otimes
Z\otimes Z&+Z\otimes\mathbb{1}\otimes Z+Z\otimes Z\otimes\mathbb{1}\\\
&+X\otimes X\otimes X-X\otimes Y\otimes Y-Y\otimes X\otimes Y-Y\otimes
Y\otimes X).\end{split}$ (37)

Note that $\rho$ can be written as the outer product $vv^{\dagger}$ where
$v=(e_{0}\otimes e_{0}\otimes e_{0}+e_{1}\otimes e_{1}\otimes e_{1})/\sqrt{2}$
and $\\{e_{0},e_{1}\\}$ is the canonical basis of $\mathbb{C}^{2}$. In physics
literature the state $v$ is called the Greenberger–Horn–Zeilinger (GHZ) state
[19]. Observe that

$U\rho U^{\dagger}=\rho$

for all $U\in G$. Therefore we obtain a $G$-equivariant distribution using the
simplicial Born rule (see (31))

$\rho_{*}:N(\mathbb{Z}_{2},P_{3})\to D(N\mathbb{Z}_{2})$

which we can restrict to $E$ and $X$ to obtain the $G$-equivariant
distributions $\rho_{*}|_{E}$ and $\rho_{*}|_{X}$, respectively.

First we begin with $X$ and the $H$-equivariant distribution
$p_{X}=\rho_{*}|_{X}$. It turns out that $X$ does not admit any
$H$-equivariant deterministic distribution. To see this note that such a
distribution $d$ is determined by the assignment
$d_{d_{2}\sigma^{\prime\prime}_{1b}}=\delta^{a}$ and
$d_{d_{0}\sigma^{\prime\prime}_{1b}}=\delta^{b}$. Then the $2$-simplex
$\sigma_{2}$ forces that $d_{d_{2}\sigma^{\prime}_{1b}}=\delta^{1-a}$ since
one of the edges is given by $\delta^{1}$. In addition, $H$-equivariance
implies that $d_{d_{0}\sigma^{\prime}_{1b}}=\delta^{b}$. Then we obtain a
contradiction

$\delta^{a+b}=d_{d_{1}{\sigma^{\prime\prime}_{1b}}}=d_{d_{1}{\sigma^{\prime}_{1b}}}=\delta^{1+a+b}.$

By Corollary 4.26 this implies that $[\gamma_{G}]\neq 0$. On the other hand,
we observe that $[\gamma]=0$ since the cocycle $\gamma$ is non-zero on two of
the non-degenerate $2$-simplices $\sigma_{2}$ and $\sigma_{3}$. Let us define

$s(x^{\prime})=\left\\{\begin{array}[]{ll}1&x^{\prime}\in\\{x_{i}:\,i=0,1,2\\}\\\
0&\text{otherwise.}\end{array}\right.$

Then using $\phi=-d^{h}s$ we obtain

$\phi(g,x^{\prime})=\left\\{\begin{array}[]{ll}1&g=1,\;x^{\prime}\in\\{x_{i},x_{i}^{\prime}:\,i=0,1,2\\}\\\
0&\text{otherwise.}\end{array}\right.$

Let us consider the partial group extension $E$. We can compute $\beta$, as we
did for the general case; see Equation (36). Since in each triangle the
product of operators on the boundary is $\mathbb{1}$ the cocycle $\beta$ is
zero. Let us compute $\Phi$ for the group element $V$:

$(-1)^{\Phi_{g}(x^{\prime})}=g\cdot\eta(g\cdot
x^{\prime})\eta(x^{\prime})=\left\\{\begin{array}[]{ll}-1&g=V,\;x^{\prime}\in\\{x_{i},x_{i}^{\prime}:\,i=0,1,2\\}\\\
1&\text{otherwise.}\end{array}\right.$

Therefore $\phi=\bar{\alpha}^{*}(\Phi)$.

## References

  * [1] S. Abramsky and A. Brandenburger, “The sheaf-theoretic structure of non-locality and contextuality,” New Journal of Physics, vol. 13, no. 11, p. 113036, 2011.  doi: 10.1088/1367-2630/13/11/113036.
  * [2] C. Okay, S. Roberts, S. D. Bartlett, and R. Raussendorf, “Topological proofs of contextuality in quantum mechanics,” Quantum Information & Computation, vol. 17, no. 13-14, pp. 1135–1166, 2017.  doi: 10.26421/QIC17.13-14-5.
  * [3] C. Okay, A. Kharoof, and S. Ipek, “Simplicial quantum contextuality,” Quantum, vol. 7, 2023.  doi: 10.22331/q-2023-05-22-1009.
  * [4] R. Raussendorf, “Cohomological framework for contextual quantum computations,” Quantum Information and Computation, vol. 19, no. 13&14, pp. 1141–1170, 2019.  doi: 10.26421/QIC19.13-14-4.
  * [5] C. Okay, E. Tyhurst, and R. Raussendorf, “The cohomological and the resource-theoretic perspective on quantum contextuality: common ground through the contextual fraction,” Quantum Information and Computation, vol. 18, no. 15&16, pp. 1272–1294, 2018.  doi: 10.26421/QIC18.15-16-2.
  * [6] R. Raussendorf, C. Okay, M. Zurel, and P. Feldmann, “The role of cohomology in quantum computation with magic states,” Quantum, vol. 7, p. 979, 2023.  doi: 10.22331/q-2023-04-13-979.
  * [7] C. Broto and A. Gonzalez, “An extension theory for partial groups,” arXiv preprint arXiv:2105.03457, 2021.  doi: 10.48550/arXiv.1507.04392.
  * [8] A. Adem and J. Gómez, “A classifying space for commutativity in lie groups,” Algebraic & Geometric Topology, vol. 15, no. 1, pp. 493–535, 2015.  doi: 10.2140/agt.2015.15.493.
  * [9] O. Antolín-Camarena, S. P. Gritschacher, and B. Villarreal, “Classifying spaces for commutativity of low-dimensional lie groups,” in Mathematical Proceedings of the Cambridge Philosophical Society, vol. 169, pp. 433–478, Cambridge University Press, 2020.  doi: 10.1017/S0305004119000240.
  * [10] C. Okay and D. Sheinbaum, “Classifying space for quantum contextuality,” in Annales Henri Poincaré, vol. 22, pp. 529–562, Springer, 2021.  doi: 10.1007/s00023-020-00993-3.
  * [11] N. D. Mermin, “Hidden variables and the two theorems of John Bell,” Reviews of Modern Physics, vol. 65, no. 3, p. 803, 1993.  doi: 10.1103/RevModPhys.65.803.
  * [12] A. Kharoof and C. Okay, “Simplicial distributions, convex categories and contextuality,” preprint arXiv:2211.00571, 2022.  doi: 10.48550/arXiv.2211.00571.
  * [13] A. Kharoof, S. Ipek, and C. Okay, “Topological methods for studying contextuality: N-cycle scenarios and beyond,” Entropy, vol. 25, no. 8, 2023\.  doi: 10.3390/e25081127.
  * [14] A. Joyal, “The theory of quasi-categories and its applications,” Quaderns, vol. 45, no. 2, pp. 151–496, 2008.
  * [15] C. A. Weibel, An introduction to homological algebra.  No. 38, Cambridge university press, 1995.  doi: 10.1007/b98977.
  * [16] H. Y. Chung, C. Okay, and I. Sikora, “Simplicial techniques for operator solutions of linear constraint systems,” preprint arXiv:2305.07974, 2023\.  doi: 10.48550/arXiv.2305.07974.
  * [17] A. Adem and R. J. Milgram, Cohomology of finite groups, vol. 309.  Springer Science & Business Media, 2013.  doi: 10.1007/978-3-662-06280-7.
  * [18] J. McCleary, A user’s guide to spectral sequences.  No. 58, Cambridge University Press, 2001.  doi: 10.1017/CBO9780511626289.
  * [19] M. A. Nielsen and I. L. Chuang, Quantum computation and quantum information.  Cambridge university press, 2010.  doi: 10.1017/CBO9780511976667.