20202020 →→ 2020 →

# Contextuality in the Fibration Approach and the Role of Holonomy

Sidiney B. Montanhano Departamento de Matemática Aplicada
Instituto de Matemática, Estatística e Computação Científica
Universidade Estadual de Campinas
Campinas, São Paulo, Brazil<EMAIL_ADDRESS>
###### Abstract

Contextuality can be understood as the impossibility to construct a globally
consistent description of a model even if there is local agreement. In
particular, quantum models present this property. We can describe
contextuality with the fibration approach, where the scenario is represented
as a simplicial complex, the fibers being the sets of outcomes, and
contextuality as the non-existence of a global section in the measure
fibration, allowing direct representation and formalization of the already
used bundle diagrams. Using the generalization to continuous outcome fibers,
we built the concept of measure fibration, showing the Fine-Abramsky-
Brandenburger theorem for the fibration formalism in the case of non-finite
fibers. By the Voroby’ev theorem, we argue that the dependence of contextual
behavior of a model to the topology of the scenario is an open problem. We
introduce a hierarchy of contextual behavior to explore it, following the
construction of the simplicial complex. GHZ models show that quantum theory
has all levels of the hierarchy, and we exemplify the dependence on higher
homotopical groups by the tetraedron scenario, where non-trivial topology
implies an increase of contextual behavior for this case. For the first level
of the hierarchy, we construct the concept of connection through Markov
operators for the measure bundle using the measure on fibers of contexts with
two measurements and taking the case of equal fibers we can identify the
outcome space as the basis of a vector space, that transform according to a
group extracted from the connection. With this, it is possible to show that
contextuality at the level of contexts with two measurements has a
relationship with the non-triviality of the holonomy group in the frame
bundle. We give examples and treat disturbing models through transition
functions, generalizing the holonomy.

###### Contents

  1. 1 Introduction
  2. 2 Fibration approach
    1. 2.1 Measurement scenario
    2. 2.2 Fibrations and fiber bundles
    3. 2.3 Measurable and event fibrations
    4. 2.4 $R$-states, empirical $R$-models and $R$-fibrations
    5. 2.5 First examples of $R$-fibrations
    6. 2.6 Non-contextual behaviour
    7. 2.7 Examples of contextuality in $R$-fibrations
  3. 3 Topology of $R$-fibrations
    1. 3.1 Necessary condition to contextual behavior
    2. 3.2 Discrete differential geometry
    3. 3.3 $G$-fibrations and triviality
    4. 3.4 Topological dependence and $n$-contextuality
  4. 4 Exploring $1$-contextual models
    1. 4.1 Contextual connection
    2. 4.2 Parallel transport in $1$-contextual models
    3. 4.3 Contextual holonomy
    4. 4.4 Examples
    5. 4.5 Discrete exterior derivative in $1$-contextuality
    6. 4.6 Disturbing empirical models
  5. 5 Conclusion
  6. A Appendices
    1. A.1 Contextual fraction

##  1 Introduction

Of all the descriptions of nature throughout human history, quantum behavior
is the strangest. Not that it is necessary to satisfy our vision, but because
it is after more than a century a formalism without a clear explanation that
allows a reasonably intuitive panorama. It is due to our classic intuition
that fails to confront quantum behavior, with fundamentally non-classical
results. To make explicit such non-classicality, which appears in the early
years of the development of quantum theory [26], the concept of nonlocality
has emerged. With theoretical work first by Bell [12], and with experiments
that culminated in important results [30, 28, 38], nonlocality finally
explained the impossibility of understanding quantum theory by classical
means.

It is possible to describe the quantum theory classically, as in Bohm’s
interpretation [14], but they all violate some property accepted as classical,
as the speed limit for localized influence, and independence of the context in
which the interaction occurs. This last property, called contextuality, was
initially proposed in Ref. [32], and it deals with the inability to describe
even with extra variables the results of a given physical system. As shown in
Ref. [5] nonlocality is a special case of contextuality, and starting from the
topos formalism for quantum theory, we have that contextuality is at the
origin of all the main properties that make it what it is [25]. Therefore,
contextuality is at the origin of what is known today as non-classicality and
can be informally explained as the inability to a global agreement even if
local agreement occurs [2]. As already demonstrated [3], contextuality can be
understood as the inability to remove a paradox from a data set, even with the
inclusion of variables, thus being described as the emergence of fundamental
paradoxes, with application in data science [6].

Similar to nonlocality, which implies the violating of certain inequalities
obtained by assuming classic properties in the outcomes of a model, one can
construct inequalities for contextuality. Thus the set of so-called classical
correlations is determined as satisfying these inequalities, and violations
invalidate one of the so-called classical properties previously assumed. The
study of such contextual inequalities is a field of research in development.
However, even for simple models the amount of such inequalities necessary to
specify the classic set makes the generic study of correlations complicated.

To understand contextual behavior, and to build tools in the study of specific
models, several formalisms were constructed, which have more or less
refinement, and with their limitations. For example, Contextuality-by-Default
[23, 22, 33] seeks to suppose dependence in contexts from the beginning, on
the level of random variables. The generalized contextuality [40] defines
contextuality for the entire operational framework, and not just to
measurements. The formalism of exclusivity graphs [16] identifies the maximum
limits of violations with graph properties generated by the relationship
between measurement outputs, enabling the identification of the set of quantum
correlations. The sheaf approach to contextuality [5] seeks to encode
contextuality through a structure in category theory, enabling equivalence
between the absence of a global section and contextual behavior. The latter
also has a study corresponding to the topological property of the models, and
the relationship between contextuality and cohomology [17, 18, 35]. The
relation with topology can also be used under the appropriate formalism [36].

As a more recent example of formalism for the usual contextuality, we have the
bundle approach, where the compatibility of measurements is codified in the
hypergraph formalism, and for each vertex, understood as a measurement, we
have the possible outcomes. The contextual behavior follows from the
impossibility of globally codify the bundle constructed with these fibers,
based on the hypergraph. Thus, contextuality appears as a property of the
bundle, as a total space. Its use already appeared as a graphic resource in
the sheaf approach [11], but its due formalism occurred later in Ref. [20].

In the first part of the present paper (2), we make a detailed formalization
for the bundle approach, explaining the reasons for the simplicial complex
structure that is usually imposed in the compatibility hypergraphs, in
addition to the local independence conditions. The equality of the fibers is
not supposed, and therefore a fibration is constructed having the same
informational content as the sheaf approach. Another generalization is the use
of non-finite fibers, as occurs in Ref. [10]. The version in the fibration
approach of the Fine–Abramsky–Brandenburger theorem is presented, identifying
different definitions of non-contextuality, and enabling the identification of
nonlocality as a special case of contextuality.

The second part (3) explores the relation between contextuality and the
geometry of the scenario. The Voroby’ev theorem is revised, and an example
shows that the contextuality in this formalism is not topological invariant,
but comes from a geometric property of the fibration. A treatment analogous to
discrete differential geometry is presented, allowing a geometric
visualization of empirical models when connecting the fibers and resulting in
the equivalence between non-contextuality and triviality of the fibration. We
define a hierarchy of probabilistic contextuality, indexed by the dimension of
the maximal contexts taken into account when probing the contextual behavior.
With this hierarchy, we show two things. First, we find an example of all
levels of it in quantum theory with GHZ models. And second, we find evidence
of the dependence between the contextuality of a model and the topology of the
underlying measurement scenario.

Finally, we restrict to equivalent and finite fibers in the third part (4). We
codify the information from the previously static probabilistic outcome table
in Markov kernels, such that it can be understood as the connections between
fibers, flirting with the idea of dynamics in join measurements. We use the
singular value decomposition to extract a group element from each Markov
kernel, allowing the study of parallel transport in the bundle and the
formalization of the holonomy group. Examples are presented, with the explicit
calculation method for the Markov kernels and the holonomy group, and where
methods for quantifying contextuality [4] are simply applicable. We define the
discrete curvature in the measurement bundle with $1$-contextuality by the
discrete outer derivative using the generalized Stokes theorem, for cases with
non-singular Markov kernels. Also, the condition of non-disturbance is
removed, allowing the inclusion of the disturbance influence in the holonomy
group, and relating it to the extended contextuality formalism [9].

##  2 Fibration approach

###  2.1 Measurement scenario

Contextuality can be understood as a local concordance that can’t be extended
to a global concordance. It deals with compatibility between measurements,
here understood as fundamental objects. Thus this phenomenon appears as
relations between parts of a set. To formalize this idea, let’s first define
how to write these relations.

######  Definition 1 (Hypergraph).

A hypergraph is a triple $\left(X,\mathcal{C},\epsilon\right)$, where $X$ is a
set of objects called vertices, $\mathcal{C}$ is a set of objects called
hyperedges, and $\epsilon$ is the incidence weight
$\epsilon:X\times\mathcal{C}\to\left\\{0,1\right\\}$ that codify if a vertex
$m\in X$ is in a hyperedge $U\in\mathcal{C}$ ($\epsilon\left(m,U\right)=1$) or
not ($\epsilon\left(m,U\right)=0$).

This definition enables different hyperedges with the same vertices, thus
encoding more information than just a relation between vertices. We might
interpret it as different kinds of relations with the same objects, which can
be important if we are working with relations in data analysis. For our
purposes, we can restrict our construction to just one hyperedge by a set of
vertices, such that the information is between them as some kind of
compatibility between these objects. As said in Ref. [2], it loses little by
way of examples.

######  Definition 2 (Hypergraph realization in the power set of $X$).

A hypergraph realization in the power set is the usual triple
$\left(X,\mathcal{C},\epsilon\right)$, that satisfies
$\mathcal{C}\subset\mathbb{P}\left(X\right)$. Therefore $\epsilon$ can be
defined implicitly in $\mathcal{C}$, and we can omit it.

As we will be studying how the relationship between the objects interferes in
the formed geometry, unrelated objects are not important and can be
disregarded. For simplicity, we will restrict ourselves to the case that there
is always at least one relation for any object.

######  Definition 3 (Hypergraph realization as a covering).

A hypergraph is realized in the power set $\mathbb{P}\left(X\right)$ as a
covering if

  * •

$\cup_{U_{i}\in\mathcal{C}}U_{i}=X$;

  * •

$\emptyset\in\mathcal{C}$.

For empirical realizations of these objects, and their interpretation as a
classical description, the hyperedges must have a $\sigma$-algebra structure
for their sub-hyperedges.

######  Definition 4 (Simplicial complex).

A simplicial complex is a hypergraph $\left(X,\mathcal{C}\right)$ with
covering representation in the power set, here called respectively as vertices
and simplices, that satisfies

  * •

if $U,V\in\mathcal{C}$, then $U\cap V\in\mathcal{C}$;

  * •

if $U,V\in\mathcal{C}$, and $U\subset V$ then $V-U\in\mathcal{C}$.

The first condition implies intersection closure and the second
complementation closure. Thus we get union closure, and as we are working with
contexts with a finite number of atomic measurements, we have the
$\sigma$-algebra conditions for each hyperedge. We can now define the concept
of measurement scenario.

######  Definition 5 (Measurement scenario).

Let $X$ be a collection of fundamental objects called simple measurements, in
the sense of being atomic. On $X$ we define a covering
$\mathcal{C}\subset\mathbb{P}\left(X\right)$ such that it satisfies the
structure of a simplicial complex. We call the elements of $\mathcal{C}$
contexts of the measurement set $X$, which are compatibles if they are in the
same context. A pair $\left(X,\mathcal{C}\right)$ is called a measurement
scenario.

This definition implies that there are maximal contexts ($U\in\mathcal{C}$ is
maximal if for all $V\in\mathcal{C}$ and $U\subset V$, then $U=V$), and
minimal contexts ($U\in\mathcal{C}$ is minimal if for all $V\in\mathcal{C}$
and $V\subset m=U$, then $U=V$). We will denote the set of maximal contexts as
$\mathcal{C}^{+}$, and the set of minimal contexts as $\mathcal{C}^{-}$. By
the $\sigma$-algebra structure, we can limit our study to minimal contexts,
and not the measurements, permitting us to do a disjoint union of a maximal
context by its minimal parts. Therefore we will call a context atomic if it is
minimal, and usually call it measurement.

This course-graining given by the ”effective” atomic measurement arises a
direct question about the relation between measurement scenarios. Is there any
way to prove a measurement in a scenario is fundamental? Formally define the
coarse-graining could give some hints about the loss of information, and some
work is already being done for the case of an adequate course-graining in
quantum theory [21]. We could translate to an equivalent question changing
coarse-graining to a refinement of a simplicial complex, therefore in some
sense, we are talking about the irreducibility of a measurement scenario. A
physical example of refinement is spin degeneration, where refinement occurs
by applying a suitable magnetic field. Such a question must be studied in the
formalism of category theory, more specifically the categories of empirical
models [31]111The problem of the fundamental nature of measurements only
appears here because of the treatment of measurements as the fundamental
objects. A more natural description is by the notion of coverage, and
consequently of site, for the category of contexts. A site can informally be
described as a space without points, implying the question of a measurement be
fundamental is empty: there are no fundamental objects, only the covering, and
its construction depends on how refined is the observer’s tools. For this, a
categorical treatment of the scenario is necessary..

###  2.2 Fibrations and fiber bundles

A fibration can be understood as a generalization of the Cartesian product.

######  Definition 6.

A fibration is a topological space called total space $\mathcal{R}$ equipped
with a continuous projection function in a base topological space $X$

$\begin{split}\pi:\mathcal{R}&\to X\\\ r&\mapsto\pi(r)=m\end{split}$ (1)

such that $\pi^{-1}(m)=O^{m}$ takes each point $m$ to its respective fiber.
The total space can then be seen as gluing the fibers from the base, or in
notation analogous to the exact short sequence

$O^{m}\to\mathcal{R}\to X.$ (2)

The concept of a section of a fibration will be necessary.

######  Definition 7 (Section).

A section of a fibration with projection $\pi:\mathcal{R}\to X$ is a
continuous application $s_{U}:U\to\mathcal{R}$, where $U\in\mathbb{P}(X)$,
such that if $m\in U$ then

$\pi(s_{U})(m)=m$ (3)

holds. If $U=X$ the section is said global, if not it is said local.

Yet nothing restricts the type of fibration. The trivialities between fibers
and between the base and the fibers, both locally, define that there is no
storage of information in these structures. Thus it is necessary first to
cover the base $X$, codifying the notion of locality, in such a way that we
can define a $\sigma$-algebra in each element of the covering.

######  Definition 8 (Local independent gluing).

Let $\mathcal{R}$ be a fibration, and $\mathcal{C}$ a covering of the base
$X$. If $m_{i}\in U\in\mathcal{C}$ for all $i$, then the gluing set of fibers
of $U$ is a local independent gluing if $O^{U}=\prod_{i}O^{m^{i}}$.

The direct consequence of this definition of independence between fibers is
that within an element of the covering, we can write the bundle as the
Cartesian product of the fibers, justifying the notion of local independence.

We can define the action of a section on a subset $V\subset U\in\mathcal{C}$
by $s_{U}(V)=O^{U}|_{V}$ when the gluing between fibers is defined. Local
independent gluing defines the action in an obvious way. The next definition
imposes the independence between the base and the fibers, in the local sense
of a covering, using this notion of fiber of a covering’s element222Basically
this definition of triviality codify the independence between the outcomes and
the base, separating these objects, and justifying their different
treatments..

######  Definition 9 (Local fiber independence).

Let $\mathcal{R}$ be a fibration, and $\mathcal{C}$ a covering of the base
$X$. For any $U\in\mathcal{C}$, we have the local independence between the
base and its set of fibers if all local sections on the $U$ are of the form

$s_{U}:U\to U\times O^{U}.$ (4)

If we assume that the fibers are the same, in addition to the independence
conditions above, we have a fiber bundle.

###  2.3 Measurable and event fibrations

We can now use the concept of fibration to code the outcomes $O^{m}$ of each
measurement $m$. The base space is nothing more than the simplicial complex
that represents the measurement scenario, with the covering having the
contexts as elements. The local independent gluing can be rewritten with just
the elements of the covering, here understood as the covering of contexts. The
idea is to use the simplicial complex structure of $\mathcal{C}$. We will also
use the term fiber to denote the set of outcomes of a context.

######  Definition 10 (Local independent gluing for contexts).

Let $\mathcal{R}$ be a fibration, and $\mathcal{C}$ a covering of the base
$X$. If $U\subset V\in\mathcal{C}$, then the set of fibers of $U$ is an
independent gluing if it is the restriction, in the sense of Cartesian
product, of the set of fibers of $V$. In notation, $O^{U}=O^{V}|_{U}$, what
means, by closing complementarity, that the set of fibers can be written as

$O^{V}=O^{U}\times O^{V-U}.$ (5)

We will work with general fibers, not only finite ones, and therefore the
$\sigma$-algebra of each set of outcomes must be made explicit, making them
measurable spaces. We then denote each fiber of a measurement $m\in X$ as
$\textbf{O}^{m}=(O^{m},\Sigma^{m})$. The fibration will be

$\textbf{O}^{m}\to\mathcal{R}\to X.$ (6)

The local gluing independence of the fibration is justified globally by the
independence between outcomes of different measurements. As one can access the
outcomes just locally, we will work with the outcomes of a context
$U\in\mathcal{C}$, thus denoting $\textbf{X}=(X,\mathcal{C})$, we have the
fibration

$\textbf{O}^{m}\to\mathcal{R}\to\textbf{X}.$ (7)

One can ignore the measurements and work with just the contexts from this
point, once we can only access the contexts. The same argument holds for the
outcomes and the elementes of the $\sigma$-algebra. We will keep the use of X
and $\textbf{O}^{m}$ to maintain explicitly the use of a simplicial complex
and measurable spaces, respectively. The new total space $\mathcal{R}$ can be
understood locally as a element $(U,\sigma_{U})$, with $U\in\mathcal{C}$ and
$\sigma_{U}\in\Sigma^{U}$. Thus we can denote the projection function locally
as

$\displaystyle\begin{split}\pi\colon\mathcal{R}&\to\textbf{X}\\\
\left(U,\sigma_{U}\right)&\mapsto U.\end{split}$ (8)

######  Definition 11.

A fibration
$\left(\textbf{X},\left\\{\textbf{O}^{U}\right\\}_{U\in\mathcal{C}},\pi\right)$
that satisfies the conditions of local independent gluing and local fiber
independence is called measurable fibration.

The sections $\left\\{s_{U}\right\\}$ of a context $U$ are in bijection with
the elements of $\Sigma^{U}$, once their definition gives an element
$\sigma_{U}$ for each context $U$, which follows from local fiber
independence. We will call a section in a measurable fibration, and
consequently the respective element of the $\sigma$-algebra, an event
$\sigma_{U}$333Usually the events are the elements of $O^{U}$. But this only
holds because one is using a discrete $\sigma$-algebra..

Events are defined in a context and can depend on it. For an event to be
globally defined without access to the global structure, it’s necessary two
conditions. Fist we impose local agreement, $\sigma_{U}|_{U\cap
V}=\sigma_{V}|_{U\cap V}$ holds for any pair of contexts $U,V\in\mathcal{C}$
such that $U\cap V\neq\emptyset$. Second we impose uniqueness, if two global
sections $\sigma_{X}$ and $\sigma_{X}^{\prime}$ satisfy
$\sigma_{X}|_{U}=\sigma_{X}^{\prime}|_{U}$ for all $U\in\mathcal{C}$, then
$\sigma_{X}=\sigma_{X}^{\prime}$. With these two properties satisfied, any
local section is then the restriction of a global section. These properties
can be justified by an assumed reality of global outcomes.

######  Definition 12.

A measurable fibration
$\left(\textbf{X},\left\\{\textbf{O}^{U}\right\\}_{U\in\mathcal{C}},\pi\right)$
that satisfies local agreement and uniqueness is called event fibration.

###  2.4 $R$-states, empirical $R$-models and $R$-fibrations

The idea of an empirical model is nothing more than a generalization of the
notion of gluing fibers of a fibration. Instead of a deterministic gluing of
elements of $O^{m}$, we can only use the measurable structure. First, we need
to define the notion of semi-ring, such as the Boolean semi-ring $\mathbb{B}$,
the reals $\mathbb{R}$, or the probability semi-ring $\mathbb{R}^{+}$.

######  Definition 13.

A generic semi-ring is a set $R$ equipped with two binary operations $+$ and
$\cdot$ such that $(R,+)$ is a commutative monoid with $0_{R}$:

  * •

$(a+b)+c=a+(b+c)$

  * •

$0_{R}+a=a+0_{R}=a$

  * •

$a+b=b+a$

$(R,\cdot)$ is a monoid with $1_{R}$:

  * •

$(a\cdot b)\cdot c=a\cdot(b\cdot c)$

  * •

$a\cdot 1_{R}=1_{R}\cdot a=a$

the multiplication distributes:

  * •

$a\cdot(b+c)=a\cdot b+a\cdot c$

  * •

$(a+b)\cdot c=a\cdot c+b\cdot c$

and $0_{R}$ annihilates:

  * •

$a\cdot 0_{R}=0_{R}\cdot a=0_{R}$

The choice of a $R$ defines a way to probe the fibration.

######  Definition 14.

A $R$-state is a map $P::U\in\mathcal{C}\to\mu_{P}^{U}$ from a context to a
$R$-measure on its events, $\mu_{P}^{U}:\Sigma^{U}\to R$, such that
$\int_{O^{U}}\mu_{P}=1_{R}$, where the integral is defined on the
$\sigma$-algebra of the fiber, and $1_{R}$ is the identity element of the
semi-ring.

######  Definition 15 (Empirical $R$-model).

An empirical $R$-model is defined as an event fibration and a fixed $R$-state
$P$ acting on it.

By the definition, $P\left(U\right)$ is a $R$-measure for the set of events on
the context, and the $R$-measure on sub-contexts can be obtained by
marginalization. We can codify a empirical $R$-model as a fibration by the
projection

$\displaystyle\begin{split}\pi\colon\mathcal{R}&\to\mathcal{C}\\\
\left(U,\textbf{O}^{U},\mu_{P}^{U}\right)&\mapsto U.\end{split}$ (9)

See that the state is fixed, and the use of all $\textbf{O}^{U}$ is necessary
to make sense of the measure.

######  Definition 16.

With the previously projection, an empirical $R$-model
$\left(\textbf{X},\left\\{\textbf{O}^{U}\right\\}_{U\in\mathcal{C}},P,\pi\right)$
is called $R$-measure fibration, or $R$-fibration for short.

A section $s_{U}^{P}$ on a $R$-fibration takes a subset $U$ of $X$ and gives a
$R$-measure $\mu_{P}^{U}$ on all the events $\Sigma^{U}$ of $U$. In this
sense, there is only one section for each context of this fibration.

A natural question is what happens with the $R$-measures at the intersections
between contexts. To fix it, we impose the local agreement between the
distributions.

######  Definition 17 (Non-disturbance).

An empirical $R$-model with $R$-state $P$ is called non-disturbing if for any
two contexts $U_{1}$ and $U_{2}$ with $U=U_{1}\cap U_{2}\neq\emptyset$, then
$\mu_{P}^{U_{1}}|_{U}=\mu_{P}^{U_{2}}|_{U}=\mu_{P}^{U}$ holds. Otherwise it is
called disturbing.

###  2.5 First examples of $R$-fibrations

######  Example 1 (Trivial model).

The usual trivial example of a non-contextual non-disturbing bundle is given
by the table of section probabilities of Fig. 1.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$bc$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$cd$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$de$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$ea$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$

Figure 1: (Left) The visualization of the trivial model through its bundle
diagram. The global sections are explicit, and determined by the fiber
elements. (Right) Table of outcome probabilities of each context for the
trivial model.

Here, and for all the explicit examples of this paper, we have finite
simplicial complex and finite fibers. The contexts are
$\mathcal{C}=\left\\{ab,bc,cd,de,ea,a,b,c,d,e\right\\}$, with minimal contexts
$\mathcal{C}^{-}=\left\\{a,b,c,d,e\right\\}$ and maximal contexts
$\mathcal{C}^{+}=\left\\{ab,bc,cd,de,ea\right\\}$. All the fibers for minimal
contexts are the same, $O^{i}=\left\\{0,1\right\\}$, and the local
independence fix the events for maximal contexts. It is a probabilistic model,
$R=\mathbb{R}^{+}$, and its table gives the probabilities for each event of
each maximal context444Examples with finite fibers can be described by the
values in $R$ of each element of $O^{U}$, using the discrete $\sigma$-algebra,
and the other events are kept implicitly.. Only the non-null events are
represented in the bundle diagram, as possibilistic coarse-graining. As one
can see, this $\mathbb{R}^{+}$-model is non-disturbing, once all the events of
all the intersections have probability $\frac{1}{2}$, and it can be described
as two global events with probability $\frac{1}{2}$.

######  Example 2 (Liar cycle, PR box model).

An example of non-disturbing $\mathbb{R}^{+}$-model with no global section is
the PR box scenario, also called by logicians the liar cycle, Fig. 2.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$bc$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$cd$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$de$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$ea$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$

Figure 2: (Left) The visualization of the PR box model through its bundle
diagram. There isn’t any global event, caused by the swap of elements in the
path $ea$. (Right) Table of outcome probabilities of each context for the PR
box model.

It could be understood as a set of individuals saying that the next one will
say the truth, cyclically, but the last one saying that the first one lied,
such that a paradox occurs. The structure of the event fibration is the same
as the previous example. The difference appears in the
$\mathbb{R}^{+}$-fibration, in the measure defined on $\textbf{O}^{ea}$. The
model still is non-disturbing, but global sections that define the model as a
measure of global events don’t exist.

######  Example 3 (KCBS model).

The next example looks like a extreme version of the PR box, but in fact just
repeat the change of elements of the outcome fiber in every context, or in the
logical representation, everyone are saying the next one is a liar, Fig. 3.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$
$bc$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$
$cd$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$
$de$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$
$ea$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$

Figure 3: (Left) The visualization of the KCBS model through its bundle
diagram. Every local section is a swap, implying that for a odd number of
sides there isn’t any well defined global event. (Right) Table of outcome
probabilities of each context for the KCBS model.

Again the event fibration is the same, the difference appearing in the
measures. There isn’t a global section, which can be view by the bundle
diagram. As one can see, topologically this and the previous example are
equivalent, one just needs to relabel the events.

###  2.6 Non-contextual behaviour

There are different ways to formalize contextuality, all as the violation of
some non-contextual notion. The best-known follows from seeking to include
hidden variables to explain the empirical model, and it’s similar to the
inclusion of auxiliary variables to seek to correct data inconsistencies and
to resolve non-fundamental paradoxes [2].

######  Definition 18 (Non-contextuality by model).

An empirical model is said $R$-non-contextual by model if the $R$-measure
$\mu_{P}^{U}$ depends on each of the minimum measurements that make up $U$
independently, with the exception of hidden variables that must be
statistically taken into account, that is, it is defined as the average of
hidden variables in space $\Lambda$ with $R$-weight $p:\Lambda\to R$, with
$\sum_{\lambda\in\Lambda}p(\lambda)=1_{R}$,

$\mu_{P}^{U}=\int_{\Lambda}\left(p\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\mu_{P}^{\left(V_{i},\lambda\right)}\right)d\lambda=\int_{\Lambda}\left(p\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}P\left(V_{i},\lambda\right)\right)d\lambda$
(10)

where the $R$-measure on $\textbf{O}^{U}$ couples the $R$-measures
$\mu_{P}^{V_{i}}$ of the fibers $\textbf{O}^{V_{i}}$, with
$\bigcup_{i}V_{i}=U$ the decomposition of $U$ in its minimal contexts, in the
canonical way.

This non-contextual $R$-model definition assumes two properties of the allowed
hidden-variable model, as punctuated in Ref. [10]. The first is
$\lambda$-independence, which assumes the independence of the $R$-measure
concerning contexts, and the second is parameter-independence, which assumes
non-disturbance of the hidden variable model. Both and more properties of
hidden variable models are studied in Ref. [15]555What this definition is
saying is that a non-contextual $R$-model can be understood as a coarse-
graining of a $R$-fibration with contexts $(U,\lambda)$ such that the coupling
of all the measures is globally trivial..

Another way to define $R$-non-contextuality is by defining a unique function
that explains all the empirical $R$-model, in a sense, it would be like the
notion of asking a question to a physical system through a measurement without
interfering with the outcome result, as an objective reality that only needs
to be discovered.

######  Definition 19 (Non-contextuality by section).

An empirical $R$-model is said $R$-non-contextual by section if every local
section can be extended to a global section.

The notion of contextuality by section originates from the sheaf approach to
contextuality [5], but it was first written for bundles in the approach
presented in Ref. [20].

Finally, we can start with a global $R$-measure that can be marginalized to
obtain the $R$-measure of a specific outcome of a measurement, as in a
classical model. Inspired by this fact, we define $R$-non-contextuality as the
existence of such a global $R$-measure.

######  Definition 20 (Contextuality by marginals).

An empirical $R$-model is said $R$-non-contextual by marginals if there is a
$R$-measure $\mu_{P}^{X}$, defined on all the measurements set, such that we
can write any $R$-measure as $\mu_{P}^{U}=\mu_{P}^{X}|_{U}$ for all
$U\in\mathcal{C}$.

The next theorem, well known in the sheaf approach to contextuality [5], is a
generalization of the same result presented in Ref. [20] in the fiber bundle
approach. Here we generalized the fibers to any measurable space, not just
finite ones. The demonstration is inspired by the same theorem for generalized
measurable spaces for continuous fibers presented in Ref. [10].

######  Theorem 21 (Fine-Abramsky-Brandenburger).

Given an empirical $R$-model on a measurement scenario X, the following
statements are equivalent:

  1. 1.

the model is $R$-non-contextual by model;

  2. 2.

the model is $R$-non-contextual by marginals;

  3. 3.

the model is $R$-non-contextual by section.

###### Proof.

($1\to 2$) If we have an empirical $R$-model that is $R$-non-contextual by
model, then for any context $U\in\mathcal{C}$ holds

$\mu_{P}^{U}=\int_{\Lambda}\left(p\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\mu_{P}^{\left(V_{i},\lambda\right)}\right)d\lambda=\int_{\Lambda}dp\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\mu_{P}^{\left(V_{i},\lambda\right)}.$
(11)

By the same reason, we can write

$\mu_{P}^{X}=\int_{\Lambda}dp\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}}\mu_{P}^{\left(V_{i},\lambda\right)}$
(12)

defining a $R$-measure on $X$. The marginals follows from

$\mu_{P}^{X}|_{U}=\int_{\Lambda}dp\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}}\mu_{P}^{\left(V_{i},\lambda\right)}|_{U}=\int_{\Lambda}dp\left(\lambda\right)\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\mu_{P}^{\left(V_{i},\lambda\right)}=\mu_{P}^{U},$
(13)

therefore it’s an model $R$-non-contextual by marginals.

($2\to 3$) Given a $R$-measure $\mu_{P}^{X}$ of $X$, and let $s_{U}^{P}$ be a
local section, $\pi\left(s_{U}^{P}\right)\left(V\right)=V$ for all $V\subset
U$, $V\in\mathcal{C}$. As

$s_{U}^{P}\left(V\right)=\left(V,\textbf{O}^{V},\mu_{P}^{U}|_{V}\right)$ (14)

we can extend the section by

$s_{X}^{P}\left(V\right)=\left(V,\textbf{O}^{V},\mu_{P}^{X}|_{V}\right)$ (15)

where obviously holds for all
$U^{\prime}\in\mathbb{P}\left(\mathcal{C}^{-}\right)$

$s_{X}^{P}\left(U^{\prime}\right)=\left(U^{\prime},\textbf{O}^{U^{\prime}},\mu_{P}^{X}|_{U^{\prime}}\right).$
(16)

This is especially true for $U^{\prime}=X$, and therefore the model is
$R$-non-contextual by section.

($3\to 1$) If we have an empirical model that is $R$-non-contextual by
section, then for any $U\in\mathbb{P}(\mathcal{C}^{-})$ holds

$s_{X}^{P}\left(U\right)=\left(U,\textbf{O}^{U},\mu_{P}^{X}|_{U}\right).$ (17)

We always can write a $R$-measure on $U$ as

$\mu_{P}^{U}(\sigma_{U})=\int_{\Lambda}dp(\lambda)K_{U}(\lambda,\sigma_{U})$
(18)

with any $\sigma_{U}\in\Sigma^{U}$, and $K$ the kernel for $U$. Choosing
$\Lambda=\textbf{O}^{X}$, $p=\mu_{P}^{X}$, and defining
$K_{U}(\lambda,\sigma_{U})=\delta_{\mu_{P}^{X}|_{U}}(\sigma_{U})$ and the
restriction function $f\left(\mu_{P}^{X}\right)=\mu_{P}^{X}|_{U}=\mu_{P}^{U}$,
we have

$\displaystyle\begin{split}\int_{\Lambda}dp(\lambda)K_{U}(\lambda,\sigma_{U})&=\int_{\textbf{O}^{X}}d\mu_{P}^{X}(\sigma_{X})K_{U}(\sigma_{X},\sigma_{U})\\\
&=\int_{\textbf{O}^{X}}d\mu_{P}^{X}(\sigma_{X})\delta_{f\left(\mu_{P}^{X}\right)}(\sigma_{U})\\\
&=\int_{\textbf{O}^{X}}d\mu_{P}^{X}(\sigma_{X})\left(\chi_{\sigma_{U}}\circ
f\right)\\\
&=\int_{\textbf{O}^{U}}d\left(f^{*}\mu_{P}^{X}\right)(\sigma_{X})\chi_{\sigma_{U}}\\\
&=\int_{\textbf{O}^{U}}\chi_{\sigma_{U}}d\mu_{P}^{X}(\sigma_{X})|_{U}\\\
&=\mu_{P}^{X}|_{U}(\sigma_{U}).\end{split}$ (19)

where $\chi_{\sigma_{U}}$ is the characteristic function. This tells us that
the model obtained is deterministic. It follows that it is factorisable, since
the Dirac $R$-measure $\delta_{\mu_{P}^{U}}$ factorize as a product of Dirac
$R$-measures,

$\delta_{\mu_{P}^{U}}=\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\delta_{\mu_{P}^{U}|_{V_{i}}}=\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\delta_{\mu_{P}^{V_{i}}}.$
(20)

Being $\sigma_{U}=\prod_{{V_{i}\in\mathcal{C}^{-}|_{U}}}\sigma_{V_{i}}$, we
can write

$K_{U}\left(\sigma_{X},\sigma_{U}\right)=\delta_{\mu_{P}^{X}|_{U}}(\sigma_{U})=\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}\delta_{\mu_{P}^{V_{i}}}\left(\sigma_{V_{i}}\right)=\prod_{V_{i}\in\mathcal{C}^{-}|_{U}}K_{V_{i}}\left(\sigma_{X},\sigma_{V_{i}}\right)$
(21)

therefore we can finally define
$K_{V_{i}}\left(\sigma_{X},\sigma_{V_{i}}\right)=\mu_{P}^{\left(V_{i},\lambda\right)}\left(\sigma_{V_{i}}\right)$,
$\lambda=\sigma_{X}$, and as holds for $X$, we conclude that the model is
$R$-non-contextual by model. ∎

During the previous demonstration, it was shown that a model is $R$-non-
contextual if and only if it can be factorizable. This property when
$R=\mathbb{R}^{+}$ is equivalent to Bell’s locality [13], as explained in Ref.
[5]. The theorem above thus relates Bell’s nonlocality as a special case of
the contextuality of the respective empirical model. For our case with non-
finite fibers, this identification is generalized for cases of a continuous
spectrum.

###  2.7 Examples of contextuality in $R$-fibrations

The examples that will be presented here have finite outcome fiber and are
non-disturbing. To check the contextual behavior, we will use the contextual
fraction (see Appendices).

######  Example 4 (Trivial model).

The model of Fig. 1 can be describe as the combination of two global events,

$s_{X}^{trivial}=\frac{1}{2}(abcde\to 00000)+\frac{1}{2}(abcde\to 11111)$ (22)

defining a global section of the $\mathbb{R}^{+}$-fibration. By theorem 21,
the model is $\mathbb{R}^{+}$-non-contextual, in agreement with non-contextual
fraction $NCF=1$.

######  Example 5 (Liar cycle, PR box model).

The PR box model of Fig. 2 can’t be described as a combination in
$R=\mathbb{R}^{+}$ of global events, thus there isn’t a global section that
describes it. The cause is the swap in the context $ea$, giving a
$\mathbb{R}^{+}$-contextual behaviour for this $\mathbb{R}^{+}$-fibration,
with non-contextual fraction $NCF=0$. The PR box model is an example of strong
contextuality, once there isn’t any well-defined global event, and can’t be
reproduced by quantum theory.

######  Example 6 (KCBS model).

The KCBS model of Fig. 3 follows the same reasoning as the PR box model. It
can’t be described by a combination of global events, because of an odd number
of swaps. The non-contextual fraction is $NCF=0$, showing the
$\mathbb{R}^{+}$-contextual behavior of this model.

######  Example 7 (Hardy model).

The example of Fig. 4 has two important differences from the previous ones.
First it is more complicated, but one still can directly see if it is
contextual or not just using the events. Second, it can be realized in quantum
theory.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $\frac{2}{9}$ | $\frac{2}{3}$ | $\frac{1}{9}$ | $0$
$bc$ | $0$ | $\frac{1}{3}$ | $\frac{2}{3}$ | $0$
$cd$ | $\frac{1}{3}$ | $\frac{1}{3}$ | $\frac{1}{3}$ | $0$
$de$ | $0$ | $\frac{2}{3}$ | $\frac{1}{3}$ | $0$
$ea$ | $\frac{2}{9}$ | $\frac{1}{9}$ | $\frac{2}{3}$ | $0$

Figure 4: (Left) The visualization of the Hardy model through its bundle
diagram. This model has global events, but some local events can’t be extended
to a global one. (Right) Table of outcome probabilities of each context for
the Hardy model.

The model is non-disturbing, with non-contextual fraction $NCF=\frac{7}{9}$,
thus being $\mathbb{R}^{+}$-contextual. It shows global events, starting in
$(ab\to 00)$, $(cd\to 00)$ and $(ea\to 00)$, but there are events that can’t
be extended to global ones, $(ab\to 01)$, $(ab\to 10)$, $(cd\to 01)$, $(cd\to
10)$, $(ea\to 01)$ and $(ea\to 10)$. A model that presents global events but
also presents non-extendable local events is called possibilistic contextual,
in the sense of being described as $\mathbb{B}$-contextual.

######  Example 8 (Bell model).

The Bell model, Fig. 5 is the usual example of a non-disturbing contextual
model in quantum mechanics.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$bc$ | $\frac{3}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{3}{8}$
$cd$ | $\frac{3}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{3}{8}$
$da$ | $\frac{1}{8}$ | $\frac{3}{8}$ | $\frac{3}{8}$ | $\frac{1}{8}$

Figure 5: (Left) The visualization of the Bell model through its bundle
diagram. This model has only global events, and the contextual behaviour only
appears because of the impossibility to explain it with positive real numbers.
(Right) Table of outcome probabilities of each context for the Bell model.

The $ab$ local section is trivial, but the others have probabilities that
remember the liar cycle. In this sense, this model can be understood as a
combination of a trivial model and three PR boxes. Such decomposition is in
agreement with the non-contextual fraction $NCF=\frac{3}{4}$, therefore the
Bell model is a $\mathbb{R}^{+}$-contextual model. As one can see by its
bundle diagram, all events are defined as a restriction of a global event. For
this reason, the Bell model is an example of probabilistic contextuality,
contextual behaviour only appears when dealing with the measures.

##  3 Topology of $R$-fibrations

###  3.1 Necessary condition to contextual behavior

A result discovered before the notion of contextuality being defined, due to
Voroby’ev [42], is the characterization of a necessary but not sufficient
condition in the measurement scenario to be part of a contextual empirical
model. The theorem is linked with the notion of cyclicity, in the sense of
Graham’s decomposition.

######  Definition 22.

A hypergraph $\left(X,\mathcal{C}\right)$ is said acyclic if it can be reduced
to the empty set through the Graham’s decomposition, algorithm given by the
repeated application of the following operations:

  * •

if $m\in X$ such that it belongs to a single hyperedge, then delete $m$ from
this hyperedge;

  * •

if $V\subsetneq U$, with $V,U\in\mathcal{C}$, then delete $V$ from
$\mathcal{C}$.

The interpretation of Graham’s decomposition algorithm is to ”forget” contexts
that can be described by others, as a coarse-graining of contexts.
Contextuality depends on maximal contexts and their intersections, as one can
see by the contextual fraction algorithm. Graham’s decomposition deletes
minimal measurements that aren’t intersections, and contexts that aren’t
maximal or minimal. In this sense, acyclic scenarios allow themselves to be
simplified arbitrarily, while cyclic scenarios do not, requiring a more
detailed analysis of this ”defect” that we call contextuality. For this
reason, Graham’s decomposition does not preserve the simple complex structure
of the measurement scenario. As obtained in Ref. [31], being acyclic induces
morphisms - there linked with simplification of the object - from the terminal
object of the category of empirical models.

Figure 6: Graham decomposition of a filled triangle. The steps are: to exclude
the edges; to exclude the isolated vertices; finally to exclude the interior
(there is no vertices). The result is the empty set, therefore the hypergraph
is acyclic. Figure 7: Graham decomposition of a triangle with barycentric
subdivision. The first and unique allowed step is to exclude the edges. There
isn’t any other possible step, therefore the hypergraph is cyclic.

The property of being cyclic, although it appears to be a topological property
in the sense of capturing ”holes” in the hypergraph, is not a topological
invariant, as can be seen by the example in Fig. 6 and Fig. 7. The triangle of
Fig. 6 is simply connected, and therefore collapsible, besides it is acyclic.
In the case of the triangle with barycentric subdivision of Fig. 7, despite
being simply connected and therefore collapsible, in addition to being
homeomorphic to the previous case, it is not an acyclic hypergraph and can be
a measurable scenario for an empirical model.

######  Theorem 23 (Voroby’ev theorem).

If an empirical model has an associate hypergraph acyclic, then it is non-
contextual.

In short, contextuality does not follow directly from the topology of the
simplicial complex of the measurement scenario666For different approaches it
is possible to relate to the topological aspects [36], but of all the
empirical model.. The example in the Fig. 6 and Fig. 7 not only show
independence in terms of topology, by detaching the topology of the simplicial
complex from its ability to be a base for a contextual measure fibration, it
also indicates that the inclusion of freedom (the vertex in the center of the
barycentric triangle) is sufficient to allow such behavior.

###  3.2 Discrete differential geometry

As a simplicial complex, any measurement scenario allows a study in the
formalism of discrete differential geometry [19, 29]. A $n$-simplex is treated
as a ”quanta of space”, and the topology follows from the topology of the
simplicial complex.

Another feature is the formalism of discrete differential forms, which can be
informally thought of as a way to measure the ”size” of the simplices. The set
of $n$-simplices of a simplicial complex X is denoted by $\mathcal{C}_{n}$.

######  Definition 24.

Discrete differential forms are defined as linear duals of the simplices,
where we will denote by $\mathcal{C}^{n}$ the set of $n$-forms. If
$\bra{\omega}\in\mathcal{C}^{n}$, then we have

$\displaystyle\begin{split}\bra{\omega}\colon\mathcal{C}_{n}&\to R\\\
\ket{S}&\mapsto\left<\omega|U\right>.\end{split}$ (23)

As our usual notion of contextuality is defined by a fixed $R$-state $P$, and
the non-disturbance condition implies that the $R$-measures are well defined,
the simplicial complex accept as duals of the simplices the elements of the
$\sigma$-algebra of the outcome space $\textbf{O}^{U}$ of the context $U$,
therefore

$\bra{\omega}\ket{U}_{P}=P[U](\omega)=\mu_{P}^{U}(\omega)\in R,$ (24)

for all $\omega\in\Sigma^{U}$777In this sense that we are working with
measurement contextuality. The state is kept fixed, and the contextual
behaviour follows from the relation between events and measurements, here
described as contexts. Event and measurement define the notion of effect in
operational theories, thus measurement contextuality is the contextuality of
effects when the state is fixed..

The curvature in the discrete differential geometry will depend on the
relationship with parallel transport since there is no differentiability to
work directly. Its use is generally for modeling digital structures, and it is
calculated using the angle generated by the transport of the vector normal to
the surface. Note however that it is a curvature that describes the geometry
of the surface, which can then be understood as immersed in a Euclidean space.
Such geometric curvature determines using Stokes’ theorem the associated
shape, but it has no relation to contextuality. Any description through
discrete differential forms comes from the relations between the fibers and
does not reflect (at least not directly) the geometric representation of the
measurement scenario.

###  3.3 $G$-fibrations and triviality

Let’s define a way to change the fibers of a fibration.

######  Definition 25.

A transformation on the fibers is a measurable application
$g:\mathcal{R}\to\mathcal{R}$ of the total space to itself, such that for any
local coordinate $(b,e)\in E$, with $b$ and $e$ elements of the base and the
fiber, respectively, $g(b,e)=(b,e^{\prime})$ (it acts on the fibers). The set
of all such transformations will be denoted by $G$.

We suppose the base and the fibers have topology, $G$ is a continuous monoid
action (a monoid satisfies almost all group properties and may violate
invertibility, i.e., it is a semigroup with identity) with the topology of the
total space $E$, and the projection on the base $\pi$ is continuous. With
these assumptions, $G$ becomes a topological monoid if its elements are
continuous.

Weak-homotopy equivalence between two topological spaces can be seen as the
equivalence of their shapes. Formally, two topological spaces are weak-
homotopy equivalents if their homotopy groups are isomorphic. Let’s separate
the fibers by weak-homotopy equivalence, getting disjoint components, and work
with path-connected components. For each connected component, we have the
following definition [27].

######  Definition 26.

Given a topological monoid $G$, a $G$-fibration is a fibration such that the
fibers are weak-homotopy equivalents and the continuous action of $G$
preserves the fibers.

A fibration is called trivial if the independence condition between fibers
holds globally. A well-known result of the theory of $G$-fibrations is the
following.

######  Theorem 27.

A $G$-fibration is trivial if and only if any local section admits an
extension to a global section.

We can use this result to characterize the context of a model by the
triviality of its fibration if we identify $G$.

######  Corollary 28.

A $R$-measure $G$-fibration is $R$-non-contextual if and only if it’s trivial.

It follows from the non-contextuality by section: the triviality of a
$G$-fibration is equivalent to extendability of a local section to a global
one, and as it is one of the equivalent notions of contextuality given by the
Fine–Abramsky–Brandenburger theorem, we have the equivalence between $R$-non-
contextuality of the model and triviality of its respective $R$-measure
$G$-fibration.

###  3.4 Topological dependence and $n$-contextuality

The intuitive idea of this section is to follow the recipe for building a
simple complex, increasing the dimension of the simplices to be included in
each step, and study the dependence on contextuality. Starting with vertices,
we know that the scenario is acyclic, and therefore not contextual.

For the inclusion of edges, we know that contextuality appears, as was already
shown in examples. Its verification can be done many times by reasoning that
takes one measurement in another until it returns to the original and finds a
contradiction. We will call contextuality with this dependence on points in
the measurement scenario $1$-contextuality. The question is whether there is
contextuality for $n>1$ without $1$-contextuality. The next example shows that
it does.

######  Example 9.

An example of a measurement scenario that has non-trivial cyclicality is given
by the border of a tetrahedron, with only the four vertices, six edges, and
four faces. The table below has the probabilities of obtaining certain outputs
within maximal contexts, as is common in the literature. In it, we have the
encoding of a measure fibration with identical fibers, each with two outputs
$\left\\{0,1\right\\}$, and base with contexts represented by the boundary of
a tetrahedron, with measurements $\left\\{a,b,c,d\right\\}$.

| $000$ | $001$ | $010$ | $011$ | $100$ | $101$ | $110$ | $111$
---|---|---|---|---|---|---|---|---
$abc$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$abd$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$acd$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
$bcd$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
(25)

As one can see, the probabilities in any subcontext represented by the edges
are maximally random, implying non-contextuality for each face. There is
concordance between them, making it be a non-disturbing empirical model. But
as can be seen using a measure of contextuality, such as the contextual
fraction [4], it is a contextual empirical model. In conclusion, the
contextual behavior of this model does not originate in the structure of
$1$-simplices, but from the $2$-simplices structure.

The $n$-contextuality appears as the contextuality generated by including
$n$-simplices, or equivalently when the model is explored with $n$-dimensional
structures. One way of doing this exploration is through the contextual
fraction (see the Appendices) when changing the maximal contexts of the model.
For non-disturbing models, $1$-contextuality behavior will appear if we
measure contextual fraction with $1$-simplices as the maximal contexts. The
$2$-contextual behavior appears if the measure of contextuality changes due to
the change of the maximal contexts to $2$-simplices. We can do this procedure
inductively until the maximal contexts of the model. Thus, $n$-contextuality
occurs when we cannot reduce the dimension of the simplicial complex without
losing certain information about the model’s contextuality, a kind of
irreducible behavior.

A question that can be asked is whether quantum theory presents any examples
of $n$-contextuality. Quantum theory has a well-known example for all $n$.

######  Example 10.

The $n$ dimensional GHZ model is a scenario with $n+1$ parts, each with two
measurements and fibers with two elements. For $n=1$ we have the Bell
scenario, while for $n=2$ has an octahedron shape. The model is fixed when
choosing the state

$\ket{GHZ}=\frac{\ket{0}^{\otimes(n+1)}+\ket{1}^{\otimes(n+1)}}{\sqrt{2}}$
(26)

which is maximally entangled. By the theorem 21 and the structure of the
possible measurements in quantum theory, it is always possible to find a set
of measurements that presents contextuality for this model. The marginalized
measures are maximally uniform (a reflection of the state’s non-
biseparability), and therefore the contextuality doesn’t appear in simplices
of a smaller dimension than $n$.

The case of the GHZ model in octahedron is well known, and its usual version
has the table of joint probabilities

| $000$ | $001$ | $010$ | $011$ | $100$ | $101$ | $110$ | $111$
---|---|---|---|---|---|---|---|---
$ABC$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
$ABc$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$
$AbC$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$
$Abc$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$aBC$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$
$aBc$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$abC$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$abc$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$
(27)

which can be verified by contextual fraction that it is a strong contextual
model ($NCF=0$). Another example also with strong contextuality, but super-
quantum, that inspired the tetrahedron model in example 9 is the Svetlichny’s
box

| $000$ | $001$ | $010$ | $011$ | $100$ | $101$ | $110$ | $111$
---|---|---|---|---|---|---|---|---
$ABC$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$ABc$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$AbC$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$Abc$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
$aBC$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$aBc$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
$abC$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
$abc$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
(28)

which also has maximally uniform marginals, and therefore only presents
contextuality in dimension $n=2$.

An open question is whether the contextual fraction always increases with the
inclusion of larger simplices.

######  Conjecture 29.

The contextual fraction cannot decrease with the increase of the hierarchy of
$n$-contextuality.

Another interesting result is the apparent dependence on the topology of the
measurement scenario, but in a different way than the one suggested in Ref.
[20]. In Ref. [24] we have the example of an empirical model in a barycentric
triangle, which ends up being a sub-model of the tetrahedron presented in
example 9. In it the face $abc$ is forgotten, and the non-contextual fraction
is $NCF=\frac{1}{2}$, whereas the complete tetrahedron presents
$NCF=\frac{1}{4}$. We have two options: either the face adds $\frac{1}{4}$ of
contextuality in the model, or it happens due to the change in topology.

To test the possibilities, it is possible to study the local sections on the
face, since the marginals are maximally uniform. Realizing that possible local
sections in the triangle satisfy the system of linear equations

$\sum_{x}p(x,y,z|a,b,c)=p(y,z|b,c)$ (29) $\sum_{y}p(x,y,z|a,b,c)=p(x,z|a,c)$
(30) $\sum_{z}p(x,y,z|a,b,c)=p(x,y|a,b)$ (31) $\sum_{x,y,z}p(x,y,z|a,b,c)=1$
(32)

that are valid for non-perturbation (which basically says that the
probabilities at the vertices are independent of the contexts, and therefore
depend only on the vertex), in addition to the probability condition, we
obtain that the triangle $abc$ has generic section on the face given by the
vector

$\left(\frac{1}{4}-\eta,\eta,\eta,\frac{1}{4}-\eta,\eta,\frac{1}{4}-\eta,\frac{1}{4}-\eta,\eta\right)$
(33)

with $\eta\in[0,\frac{1}{4}]$, with the maximally uniform occurring in
$\eta=\frac{1}{8}$. However, as it can be calculated, add a face to the model,
obtaining the generic case

| $000$ | $001$ | $010$ | $011$ | $100$ | $101$ | $110$ | $111$
---|---|---|---|---|---|---|---|---
$abc$ | $\frac{1}{4}-\eta$ | $\eta$ | $\eta$ | $\frac{1}{4}-\eta$ | $\eta$ | $\frac{1}{4}-\eta$ | $\frac{1}{4}-\eta$ | $\eta$
$abd$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$
$acd$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
$bcd$ | $0$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $0$ | $\frac{1}{4}$ | $0$ | $0$ | $\frac{1}{4}$
(34)

where contextuality remains the same, with $NCF=\frac{1}{4}$, corroborating
the option of topological dependency. A formalization of this dependency must
be constructed so that something more can be said about this result, and it’s
beyond the scope of this paper.

Finally, the definition of $n$-contextuality raises the possibility of also
study the disturbance with its dependence on the dimension of the simplicial
complexes. We will call this hierarchy $n$-disturbance, and just like
$n$-contextuality, it encodes the irreducibility that a model presents
concerning the dimension of the measurement scenario. A deeper study of these
hierarchies would be interesting, it being a path for future work.

##  4 Exploring $1$-contextual models

###  4.1 Contextual connection

For the rest of the paper, we will investigate contextuality restricting
ourselves to contexts with two atomic measurements, and probabilistic states.
The following construction is about connections, therefore $1$-forms on the
simplicial complex.

An application to codify the transport from one vertex to another must be
linear by a convexity argument, and its information lies in the measure on the
context’s events. From now on, we will talk about probabilistic empirical
models, therefore $R=[0,1]$, implying that such an application is a Markov
kernel.

######  Definition 30.

A path operator is an application
$T:\mathcal{C}_{1}\otimes_{\mathcal{C}_{0}}\mathcal{C}_{0}\to\mathcal{K}$,
that leads an $1$-simplex and a vertices of it to a Markov kernel
$T_{nm}:\mathcal{D}\left(\textbf{O}^{m}\right)\to\mathcal{D}\left(\textbf{O}^{n}\right)$.

One property that can be noticed is that the joint measure does not choose a
direction in the $1$-simplex, which must be chosen when introducing one of the
vertices as an initial. It is the discrete version of choosing a point and a
direction in a variety and obtaining the rule of changing some property in
that direction. Note, however, that $T_{nm}T_{mn}$ is not necessarily the
identity.

######  Definition 31 (Connection).

A connection is defined as

$\mathbb{T}:\Gamma\left(\mathcal{C}_{0}\right)\to\Gamma\left(\mathcal{C}_{1}\otimes_{\mathcal{C}_{0}}\mathcal{C}_{0}\right)$
(35)

where $\Gamma\left(\mathcal{C}_{0}\right)$ is the collection of sections on
elements of $\mathcal{C}_{0}$, and
$\Gamma\left(\mathcal{C}_{1}\otimes\mathcal{C}_{0}\right)$ is the set of
linear applications with the form

$\displaystyle\begin{split}T\colon\mathcal{C}_{1}\times_{\mathcal{C}_{0}}\Gamma\left(\mathcal{C}_{0}\right)&\to\Gamma\left(\mathcal{C}_{0}\right)\\\
\left(\left\\{m,n\right\\},s^{P}_{m}(m)\right)=\left(\left\\{m,n\right\\},\left(m,\textbf{O}^{m},\mu_{P}^{m}\right)\right)&\mapsto\left(n,\textbf{O}^{n},T_{nm}\mu_{P}^{m}\right)=s_{n}^{P^{\prime}},\end{split}$
(36)

with
$T_{nm}:\mathcal{D}\left(\textbf{O}^{m}\right)\to\mathcal{D}\left(\textbf{O}^{n}\right)$
the Markov kernel. $T$ is called a path transformation.

The path transformation is the version of the path operator that works with
the sections, and not with just the base space, and includes it as a
simplification. The connection defined here is the discrete equivalent of the
usual connection of differential geometry.

The contextual connection will be the case where the connection is constructed
with the information of the joint measure of the $1$-simplex. Given a context
$\left\\{m,n\right\\}$ with two minimal contexts $m$ and $n$, the allowed path
transformations has the form

$\displaystyle\begin{split}T\colon\mathcal{C}_{1}\times_{\mathcal{C}_{0}}\Gamma\left(\mathcal{C}_{0}\right)&\to\Gamma\left(\mathcal{C}_{0}\right)\\\
\left(\left\\{m,n\right\\},s^{P}_{m}(m)\right)=\left(\left\\{m,n\right\\},\left(m,\textbf{O}^{m},\mu_{P}^{m}\right)\right)&\mapsto\left(n,\textbf{O}^{n},T_{nm}\mu_{P}^{m}\right)=\left(n,\textbf{O}^{n},\mu_{P}^{mn}|_{n}\right)=s_{mn}^{P}|_{n}.\end{split}$
(37)

The connection defines a transformation in both the fibers and the base. Due
to the local independence of the fiber, we can separate the horizontal and
vertical parts. The change in the fibers need to be extracted from the Markov
kernels, but different fibers imply that the composition is not a globally
well-defined product in the set of Markov kernels888They will form a category,
knows as the Markov category [37].. With the proper choice of fibers and
topology, the vertical part is described by the set of Markov kernels: the
equivalence between the Markov kernel and the path transformation follows if
the fibers are homeomorphic (generically denoted by O). Only with this
condition, we get a topological monoid, that we identify with $G$.

We will call a measure fibration that satisfies the properties presented in
this section a measure $G$-bundle, once it satisfies then the condition of
$G$-bundle [39] (it’s a language abuse, $G$ isn’t a group). With this, we get
the next corollary.

######  Corollary 32.

A measure $G$-bundle, with $G$ the monoid described by the contextual
connection $T$, is non-contextual if and only if it’s trivial.

As we will see explicitly in the examples, the joint measure on a $1$-simplex
has just enough information to construct its Markov kernels (one for each
direction), and vice versa.

###  4.2 Parallel transport in $1$-contextual models

We will first study the case of finite fiber $R$ with $n$ elements. In this
case, as described in Ref. [8], we can describe a probabilistic measure as a
vector living in $\mathbb{R}^{d}$ in some fixed basis, such that the
conditions of probabilistic distributions holds (non-negative entries that sum
to one). Since the fibers are the same, the Markov kernels are stochastic
matrices that represent the change in these vectors (a linear operator such
that the probabilistic properties are preserved). But as one can see, the
basis of the vector space can change, and the connection doesn’t need to be
trivial.

With this description, we can identify the measure bundle as a vector bundle
[34], with $\mathcal{D}\left(\textbf{O}\right)=\mathbb{R}^{d}$ as fibers, but
the vectors accessible by a section are restricted to probabilistic ones. The
basis for each fiber is fixed, to keep the probabilistic properties, as an
intrinsic property of the fiber, not previously related with the vector.

Let’s study what kind of kernels the non-disturbance condition allows in the
vertices. The passage from a context to another can be described by a
transition function, which will be view in more detail in the study of
disturbing empirical models. For now, the transition between two contexts can
be seen as a Markov kernel $T_{mm}$ such that

$T_{mm}\left(\mu_{P}^{n_{i}m}|_{m}\right)=\left(\mu_{P}^{n_{f}m}|_{m}\right),$
(38)

but that preserve the structure of $\textbf{O}^{m}$. Since $T_{mm}$ is a
linear application that takes a vector that represents a measure to another,
and the basis of the vector space, the transformation allowed by the non-
disturbance condition needs not just to preserve the distribution, but also
the basis of the vector space because the fiber of outcomes is the same. Thus
the Markov kernels that are allowed have the general form $T_{mm}=ODO^{T}$,
with $O$ an orthogonal matrix and $D$ a diagonal matrix with entries $0$’s or
$1$’s, the definition of an idempotent matrix.

For the general case of a path transformation, the stochastic matrix can be
singular value decomposed in an orthogonal part, the group $G=O(d)$ of the
principal $G$-bundle describing the transformations between frames, and a
diagonalizable matrix, that codifies the forgetting information through the
path. Therefore by matrix diagonalization through singular value
decomposition, we can extract a $O(d)$ element for each stochastic matrix,

$T_{mn}=U\Sigma V^{T}=\left(U\Sigma U^{T}\right)\left(UV^{T}\right),$ (39)

where the matrix $U$ is the eigenvector matrix with the orthonormal basis of
$T_{mn}T^{T}_{mn}$, the matrix $V$ is the eigenvector matrix with the
orthonormal basis of $T^{T}_{mn}T_{mn}$, and $\Sigma$ is the diagonal matrix
with the singular values as the diagonal entries. We identify $UV^{T}$, that
effectively charge the basis of the vector space, as an element of $G$ that
changes the outcome fiber due to a path transformation, and define a monoid
homomorphism

$\displaystyle\begin{split}\Phi:\mathbb{M}(d)&\to O(d)\\\ M&\mapsto
UV^{T}\end{split}$ (40)

of the stochastic matrices to the orthogonal group, both defined in
$\mathbb{R}^{d}$. As one can see, there will be problems when dealing with
singular stochastic matrices, as they erase part of the original information.

Parallel transport on the measure bundle is the composition of the stochastic
matrices from an initial vertex through a path of $1$-simplices to a final
one, by two different paths. In the end, a comparison of the information
transported is made. The information here is the basis of the vector space, or
equivalently the frame in the frame bundle.

######  Theorem 33 (Parallel transport and contextuality: finite case).

If a $G$-bundle satisfying the non-disturbance condition and with non-singular
stochastic matrices is non-contextual, then for any two paths $I^{b}_{a}$ and
$I^{\prime b}_{a}$ with the same initial and final vertices, holds

$\prod_{I_{a}^{b}}\Phi\left(T_{a_{i}a_{i+1}}\right)=\prod_{I^{\prime
b}_{a}}\Phi\left(T_{a_{i}a_{i+1}}\right).$ (41)

###### Proof.

Let a non-contextual empirical model satisfying the non-disturbance condition
and being non-contextual. The non-disturbance condition implies the extension
to a global section of the measures. Its measure fibration admits a monoid
such that a homomorphism $\Phi$ can be reduced to a group $G=O(d)$, turning
the measurable fibration in a $G$-bundle. By theorem 21, we have a global
section

$s^{P}_{X}=\left(U,\textbf{O}^{X}|_{U},\mu^{X}_{P}|_{U}\right).$ (42)

As all the outcome fibers are the same, we can write a local section on a
measurement $a$ as being transported through a path $I_{a}^{b}$ as

$\left(b,\textbf{O},\prod_{I_{a}^{b}}T_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\mu^{a}_{P}\right),$
(43)

and through a path $I^{\prime b}_{a}$ as

$\left(b,\textbf{O},\prod_{I^{\prime
b}_{a}}T_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\mu^{a}_{P}\right).$ (44)

By the non-disturbance condition, the phase of the parallel transport will be
given by a change in the outcome space, but by global section the bundle must
be trivial, implying in the equality

$\prod_{I_{a}^{b}}\Phi\left(T_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\right)=\prod_{I^{\prime
b}_{a}}\Phi\left(T_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\right).$ (45)

∎

For a non-finite outcome space, the interpretation of a vector space it’s more
subtle, but we can do a similar construction. Suppose that the Markov kernels
$T_{mn}=\omega(x,y)$ are square integrable on all the outcome fiber $O$. We
can define

$\omega_{1}(x,y)=\int_{R}\omega(x,z)\omega(y,z)dz$ (46)

and

$\omega_{2}(x,y)=\int_{R}\omega(z,x)\omega(z,y)dz,$ (47)

that are symmetric and positive defined. Using the Mercer’s theorem [41], they
can be rewritten as

$\omega_{1}(x,y)=\sum_{j}\alpha_{j}u_{j}(x)u_{j}(y)$ (48)

and

$\omega_{2}(x,y)=\sum_{j}\alpha_{j}v_{j}(x)v_{j}(y).$ (49)

One can show that

$\omega(x,y)=\sum_{j}\sqrt{\alpha_{j}}u_{j}(x)v_{j}(y).$ (50)

Therefore the map $\Phi:\mathbb{M}\to\mathbb{M}$ can be defined as
$\Phi\left(\omega(x,y)\right)=\sum_{j}u_{j}(x)v_{j}(y)$. With this, we can
prove the next theorem similarly to the finite case.

######  Theorem 34 (Parallel transport and contextuality: non-finite case).

If a $G$-bundle satisfying the non-disturbance condition, with square
integrable Markov kernels and non-singular stochastic matrices is non-
contextual, then for any two paths $I_{a}^{b}$ e $I^{\prime b}_{a}$ with the
same initial and final vertices, holds

$\prod_{I_{a}^{b}}\Phi\left(T_{a_{i}a_{i+1}}\right)=\prod_{I^{\prime
b}_{a}}\Phi\left(T_{a_{i}a_{i+1}}\right).$ (51)

###  4.3 Contextual holonomy

Another way to codify non-trivial parallel transport, and so $1$-contextuality
is by the holonomy group, that is non-trivial if and only if there is at least
one non-trivial phase of the parallel transport through a loop. Given a loop
$\gamma$ with fixed point $x$ in the simplicial complex, we define the
function
$P_{\gamma}:\mathcal{D}\left(\textbf{O}\right)\to\mathcal{D}\left(\textbf{O}\right)$
as $P_{\gamma}=\prod_{\gamma}\Phi\left(T_{a_{i}a_{i+1}}\right)$. We know that
$P_{\gamma}\in GL\left(\mathcal{D}\left(\textbf{O}\right)\right)$.

######  Definition 35.

The group $Hol_{x}(T)=\left\\{P_{\gamma}\in
GL\left(\mathcal{D}\left(\textbf{O}\right)\right)|\gamma\text{ is a loop based
at }x\right\\}$ is called the holonomy group at the vertex
$x\in\mathcal{C}^{-}$ of the connection $T$.

The holonomy group will codify the phase of the non-trivial parallel transport
as a subgroup generated in a fixed loop, by repeating it. Also notice that
$Hol_{x}(T)\in O(d)$, and the independence of a point in the loop, since a
transformation of similarity is enough to change the point, without changing
the group. As a consequence, we can then get the following.

######  Theorem 36.

If an empirical model is $1$-non-contextual and doesn’t present a singular
path, then it has a trivial holonomy group for the contextual connection.

Again, models with singular paths must be omitted, as they can erase
contextual behavior by losing information. The reciprocal of this theorem is
false: it is possible to obtain contextual models with a trivial holonomy
group. Both cases will appear in examples in the next section.

We can express the theorem 36 through the logical statement $NC\wedge
NS\implies TH$, where NC is non-contextual, NS is non-singularity, and TH is
trivial holonomy. The negative, $H\implies C\lor S$ says that holonomy as
defined or indicates contextuality or singularity in the model, which erases
contextuality. It may be that the holonomy used is too coarse, as it fixes the
elements of the outgoing fiber as the base of the vector space. For this
reason, it doesn’t fully capture contextuality in non-singular models, in
addition to the singularity having a strange behavior regarding
contextuality999This is a problem when using group structures to study semi-
ring measures. Something is forgotten, and a different framework is necessary,
see Ref. [35].. One can speculate if higher holonomy groups can do an
equivalent condition for higher contextual behaviors.

The examples of the next section will have measurement scenarios encoded in
graphs, and cannot have $n$-contextuality for $n>1$. In these cases, we can
use the previous results to verify the necessary conditions for contextual
behavior. Suppose a $1$-simplex with vertices $a$ and $b$, and to make it even
simpler let’s follow the examples, assuming only two elements ${0,1}$ in the
fibers. As a context, there are the probabilities that each mutual result will
occur, denoted by $p(i,j|a,b)$, with $i,j\in{0,1}$. We can construct the
matrix of such probabilities $M^{(a,b)}_{ij}$, which has no notion of
transport from one vertex to another. As we assume the action to the left of
the Markov kernel of the path transformation, the origin vertex indexes the
lines of the stochastic matrix. Besides, columns are normalized. In this way,
the kernel will have forms dependent on the direction chosen in the
$1$-simplex, following the previous rules for the treatment of
$M^{(a,b)}_{ij}$. We get by taking $a$ as the origin of the transport

$T^{a\to
b}_{ij}=\frac{M^{(a,b)}_{ij}}{\sum_{i}M^{(a,b)}_{ij}}=\frac{p(i,j|a,b)}{\sum_{i}p(i,j|a,b)}=\frac{p(i,j|a,b)}{p(j|b)}=p(i|j;a,b)$
(52)

and taking $b$ as the origin of the transport

$T^{b\to
a}_{ji}=\frac{\left(M^{(a,b)}_{ij}\right)^{T}}{\sum_{i}M^{(a,b)}_{ij}}=\frac{p(i,j|a,b)}{\sum_{j}p(i,j|a,b)}=\frac{p(i,j|a,b)}{p(i|a)}=p(j|i;b,a).$
(53)

When there isn’t doubt, the direction will be omitted.

###  4.4 Examples

######  Example 11 (Trivial model).

The example of Fig. 1 has kernels

$T_{ij}=\begin{bmatrix}1&0\\\ 0&1\end{bmatrix},$ (54)

implying $\Phi\left(T_{ij}\right)=id$, therefore

$\prod_{I_{x}}\Phi\left(T_{ij}\right)=id.$ (55)

By non-disturbance, $\Phi\left(t_{xx}\right)=id$. The holonomy group of this
example is trivial, in agreement with the non-contextual behaviour of this
model.

######  Example 12 (Liar cycle, PR box model).

For the example of Fig. 2, following the construction of the stochastic
matrices, we get

$T_{ab}=T_{bc}=T_{cd}=T_{de}=\begin{bmatrix}1&0\\\ 0&1\end{bmatrix},$ (56)

therefore $\Phi\left(T_{ij}\right)=id$ for these contexts, but for the last
one

$T_{ea}=\begin{bmatrix}0&1\\\ 1&0\end{bmatrix}$ (57)

and $\Phi\left(T_{ea}\right)=T_{ea}$. As $\Phi\left(t_{xx}\right)=id$ for non-
disturbing models, we get

$\Phi\left(\prod_{I_{x}}T_{ij}\right)=\begin{bmatrix}0&1\\\
1&0\end{bmatrix}\neq id.$ (58)

The holonomy group is non-trivial, $Hol_{x}\left(T\right)=\mathbb{Z}_{2}$,
because $\Phi\left(\prod_{2nI_{x}}T_{ij}\right)=id$ and
$\Phi\left(\prod_{(2n+1)I_{x}}T_{ij}\right)=\begin{bmatrix}0&1\\\
1&0\end{bmatrix}$, with $n\in\mathbb{Z}$, in agreement with the contextual
behaviour of the model.

######  Example 13 (KCBS model).

The example of Fig. 3 has stochastic matrices

$T_{ij}=\begin{bmatrix}0&1\\\ 1&0\end{bmatrix}$ (59)

for all contexts, resulting in
$\Phi\left(\prod_{I_{x}}T_{ij}\right)=\begin{bmatrix}0&1\\\
1&0\end{bmatrix}\neq id$, in agreement with its contextual behaviour. For the
same reason of the PR box, the holonomy group is
$Hol_{p}\left(T\right)=\mathbb{Z}_{2}$.

######  Example 14 (Hardy model).

Previously examples were simple, in the sense that $\Phi$ changed nothing in
the stochastic matrices. The example of Fig. 4 is different. The stochastic
matrices are

$T_{ab}=\begin{bmatrix}\frac{2}{8}&1\\\
\frac{6}{8}&0\end{bmatrix},T_{bc}=\begin{bmatrix}0&1\\\
1&0\end{bmatrix},T_{cd}=\begin{bmatrix}\frac{1}{2}&1\\\
\frac{1}{2}&0\end{bmatrix},T_{de}=\begin{bmatrix}0&1\\\
1&0\end{bmatrix},T_{ea}=\begin{bmatrix}\frac{2}{3}&1\\\
\frac{1}{3}&0\end{bmatrix},$ (60)

and doing the singular value decomposition and applying $\Phi$, we get

$\Phi\left(T_{ea}T_{de}T_{cd}T_{bc}T_{ab}\right)=\begin{bmatrix}\frac{4}{5}&\frac{3}{5}\\\
\frac{3}{5}&-\frac{4}{5}\end{bmatrix},$ (61)

different of the identity implied by non-disturbance. By the same reason of
the PR box, the holonomy group is $Hol_{p}\left(T\right)=\mathbb{Z}_{2}$, a
result of its contextual behaviour.

######  Example 15 (Bell model).

The stochastic matrices of Fig. 5 are given by

$T_{ab}=\begin{bmatrix}1&0\\\
0&1\end{bmatrix},T_{bc}=T_{cd}=\begin{bmatrix}\frac{3}{4}&\frac{1}{4}\\\
\frac{1}{4}&\frac{3}{4}\end{bmatrix},T_{de}=\begin{bmatrix}\frac{1}{4}&\frac{3}{4}\\\
\frac{3}{4}&\frac{1}{4}\end{bmatrix},T_{ea}=\begin{bmatrix}0&1\\\
1&0\end{bmatrix},$ (62)

and $\Phi\left(T_{ea}T_{de}T_{cd}T_{bc}T_{ab}\right)=\begin{bmatrix}0&1\\\
1&0\end{bmatrix}$. Therefore $Hol_{p}\left(T\right)=\mathbb{Z}_{2}$.

######  Example 16 (Maximally random model).

All the previously examples have non-singular stochastic matrices. This one,
Fig. 8, is the extreme case of singular paths.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$bc$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$cd$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$da$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$

Figure 8: (Left) The visualization of the maximally random model through its
bundle diagram. This model has all possible global sections of its scenario.
(Right) Table of outcome probabilities of each context for the maximally
random model model.

Taking all the stochastic matrices as the same,

$T_{ij}=\begin{bmatrix}\frac{1}{2}&\frac{1}{2}\\\
\frac{1}{2}&\frac{1}{2}\end{bmatrix},$ (63)

a idempotent matrix, we get $\Phi\left(T_{ij}\right)=id$, a non-contextual
behaviour (which is confirmed by the contextual fraction), and a trivial
holonomy group.

######  Example 17 (Modified Bell model).

Bell model has a trivial path transformation, and in the modified model of
Fig. 9 we change it to a ”liar” path transformation. The point here is to show
that a local change can force contextuality to vanish, and we can still have a
non-contextual non-disturbing model.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$
$bc$ | $\frac{3}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{3}{8}$
$cd$ | $\frac{3}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{3}{8}$
$da$ | $\frac{1}{8}$ | $\frac{3}{8}$ | $\frac{3}{8}$ | $\frac{1}{8}$

Figure 9: (Left) The visualization of the modified Bell model through its
bundle diagram. It’s explicit the change of the local section of the context
$ab$. (Right) Table of outcome probabilities of each context for the modified
Bell model.

We just change $T_{ab}$ of the Bell model to

$T_{ab}=\begin{bmatrix}0&1\\\ 1&0\end{bmatrix},$ (64)

clearly modifying the product to $T_{ea}T_{de}T_{cd}T_{bc}T_{ab}=id$, what is
preserved by $\Phi$. The holonomy group is trivial, and the model is non-
contextual, agreeing with the contextual fraction.

######  Example 18 (”Liar in maximally random” models).

Another modification of a previously example. The model of Fig. 10 modify a
context of the homogeneous example, with the objective to show that even if
the holonomy group is non-trivial, it is still possible for the model to be
non-contextual.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $0$ | $\frac{1}{2}$ | $\frac{1}{2}$ | $0$
$bc$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$cd$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$da$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$

Figure 10: (Left) The visualization of the ”liar in maximally random” model
with three maximally random paths. Its bundle diagram is the same of the
modified Bell model, the difference is in the probabilistic weights. (Right)
Table of outcome probabilities of each context for the ”liar in maximally
random” model with three maximally random paths.

In the maximally random model with three maximally random paths, we change
$T_{ab}$ to

$T_{ab}=\begin{bmatrix}0&1\\\ 1&0\end{bmatrix},$ (65)

which implies $\prod_{I_{x}}\Phi\left(T_{ij}\right)=T_{ab}$, a non-trivial
parallel transport. Again and for the same previously reason,
$Hol_{p}\left(T\right)=\mathbb{Z}_{2}$. But $NCF=1$, and it’s a non-contextual
model. We could exchange maximally random paths for identity ones, not
modifying the holonomy group. For example, let’s change the path $bc$ to the
trivial one, $T_{bc}=id$, keeping two maximally random paths. Though
contextual fraction one can find that the model is still non-contextual. But
if we change another maximally random path, say $cd$, to the trivial one, one
gets $NCF=\frac{1}{2}$, implying contextual behavior.

######  Example 19 (Counterexample for holonomy).

An example that has no singularity, but has contextuality even though it does
not have holonomy, Fig. 11.

| $00$ | $01$ | $10$ | $11$
---|---|---|---|---
$ab$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$bc$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$cd$ | $\frac{1}{2}$ | $0$ | $0$ | $\frac{1}{2}$
$da$ | $\frac{3}{8}$ | $\frac{1}{8}$ | $\frac{1}{8}$ | $\frac{3}{8}$

Figure 11: (Left) The visualization of the model that is a counterexample of a
reciprocal of the theorems in the previous section. The idea is to keep all
edges trivial, except one that has the same probabilities as the Bell model.
(Right) Table of outcome probabilities of each context for the model.

For three of the four edges holds $T_{ab}=T_{bc}=T_{cd}=Id$. The remain has
the form

$T_{ab}=\begin{bmatrix}\frac{3}{4}&\frac{1}{4}\\\
\frac{1}{4}&\frac{3}{4}\end{bmatrix},$ (66)

which implies $\prod_{I_{x}}\Phi\left(T_{ij}\right)=Id$, a trivial parallel
transport. The holonomy group is trivial, but $NCF=\frac{3}{4}$, and therefore
it’s a contextual model.

###  4.5 Discrete exterior derivative in $1$-contextuality

Usually, the curvature is given by a differential description, by the algebra
of the group $G$. Due to the relation with the holonomy group given by the
Ambrose–Singer theorem in the differential case, the curvature in the discrete
differential geometry is described as the phase of the parallel transport. But
let’s formalize the concept of curvature by representing our group in a Lie
group, and work with its algebra.

The $\Phi$ image of a Markov kernel will be written as
$\Phi\left(T_{nm}\right)=e^{\nabla_{nm}}$, with $\nabla_{nm}$ the average
covariant derivative on the $1$-simplex $nm$. We then define the connection of
the frame bundle as the $1$-form with values in the Lie algebra $\mathfrak{g}$

$\displaystyle\begin{split}\nabla:\mathcal{C}_{1}&\to\mathfrak{g}\\\
nm&\mapsto\nabla_{nm}.\end{split}$ (67)

A $1$-form does not act only on the $1$-simplex, but depends on its
orientation, here implicit in the ordering $nm$.

Locally, in the sense of belonging to a context, we have a section, therefore
a trivial bundle. The connection $1$-form can be write as its vertical and
horizontal parts,

$\nabla_{nm}=\triangle_{nm}+A_{nm}.$ (68)

with the horizontal part

$\displaystyle\begin{split}\triangle:\mathcal{C}_{1}&\to\mathfrak{g}\\\
nm&\mapsto\triangle_{nm}\end{split}$ (69)

and the vertical part

$\displaystyle\begin{split}A:\mathcal{C}_{1}&\to\mathfrak{g}\\\ nm&\mapsto
A_{nm}\end{split}$ (70)

being $1$-forms as well. Due to the local independence, these two parts
commute in the group representation, implying that their sum in the algebra
representation is well defined.

The product of an $1$-form $\omega$ with a $1$-simplex $nm$ to a Lie algebra
will be denoted by

$\bra{nm}\ket{\omega}=log\left(e^{\omega\left(nm\right)}\right).$ (71)

For example, the vertical part of the connection is

$\bra{nm}\ket{A}=A_{nm}=log\left(e^{A_{nm}}\right).$ (72)

To describe the non-local generalization of this equation, we need to use the
formalism of simplicial complexes, where we define the linear operator
$\partial$ on a $n$-simplex in the usual way. This allows us to talk about the
edge of a region simply connected $S$, given by the sum of $1$-siplices of the
edge

$\partial S=\sum_{i}a_{i}a_{i+1}$ (73)

where $a_{i}a_{i+1}$ are the $1$-simplices that make up the edge. This allows
us to write the product over a loop, making sense of the notation $log(exp)$
to symbolize the Baker–Campbell–Hausdorff formula in the case of non-
abelianity,

$\bra{\partial
S}\ket{\omega}=log\left(\prod_{i}e^{\omega\left(a_{i}a_{i+1}\right)}\right).$
(74)

As a example, with $S=abc$ a $2$-simplex,
$\partial\left(abc\right)=(ab)+(bc)+(ca)$, and
$\bra{\partial(abc)}\ket{A}=log\left(e^{A_{ab}}e^{A_{bc}}e^{A_{ca}}\right)$.
For an Abelian algebra $\mathfrak{g}_{f}$, holds the linearity
$\bra{\partial(abc)}\ket{A}=A_{ab}+A_{bc}+A_{ca}$.

We define the operator $d$ as usual for the Abeliancase, following the
discrete differential geometry, through Stokes’ theorem
$\bra{S}\ket{d\omega}=\bra{\partial S}\ket{\omega}$, and for the non-Abelian
case, we define $D$ through generalized Stokes’ theorem, where we lost the
linearity $\bra{S}\ket{D\omega}=\bra{\partial S}\ket{\omega}$. Again in the
example,

$\bra{abc}\ket{dA}=\bra{\partial(abc)}\ket{A}=log\left(e^{A_{ab}}e^{A_{bc}}e^{A_{ca}}\right)=A_{ab}+A_{bc}+A_{ca}$
(75)

and for the non-Abelian case,

$\bra{abc}\ket{DA}=\bra{\partial(abc)}\ket{A}=log\left(e^{A_{ab}}e^{A_{bc}}e^{A_{ca}}\right).$
(76)

The $2$-forms $DA$ and $dA$ are the discrete versions of curvature that codify
the contextual behaviour. With them we can write to a simply connected surface
$S$

$\bra{\partial S}\ket{\nabla}=\bra{\partial S}\ket{\triangle}+\bra{\partial
S}\ket{A}=\bra{\partial S}\ket{A}=\bra{S}\ket{DA},$ (77)

where the second equality follows from $\bra{\partial S}\ket{\triangle}$
depends only the base of the bundle. From theorem 36, contextuality in a
simply connected space only appears if the discrete contextual curvature are
non-trivial. But again, it doesn’t imply contextuality.

An analogous of the Aharonov–Bohm effect [7] appears here as the fact that
curvature only capt the holonomy in simply-connected regions, which is
characterized by the subgroup $Hol^{0}_{x}\left(\mathbb{T}\right)$ of
contractile loops. The effect appears in regions with holes, where the
curvature is not defined, but the contextuality behavior happens.

The examples presented in this paper, with exception of the barycentric
triangle, have a non-trivial topology. But we can immerse them in a more
complex scenario, as the cases studied in Ref. [4]. As a closed surface, all
the loops have an interior, and they are the bounder of a simply-connected
surface, and the homology group being non-trivial is equivalent to a non-
trivial curvature.

###  4.6 Disturbing empirical models

For disturbing empirical models, the marginal measures could be different, and
the trivialization of the measure part of the measure $G$-bundle can not be
guaranteed. But some construction can be done, with a beautiful
generalization.

######  Definition 37.

For a disturbing empirical model, the transition function between contexts is
defined by the application

$\displaystyle\begin{split}t_{UV}:\Gamma\left(U\cap
V\right)&\to\Gamma\left(U\cap V\right)\\\ \left(U\cap V,\textbf{O}^{U\cap
V},\mu_{P}^{V}|_{U\cap V}\right)&\mapsto\left(U\cap V,\textbf{O}^{U\cap
V},\mu_{P}^{U}|_{U\cap V}\right).\end{split}$ (78)

The transition function $t_{UV}$ is a Markov kernel when describing
disturbance in models that can be codified in $1$-simplices, where the
intersection is a vertex that links two paths. The disturbance can be
understood as a non-trivial contribution of the vertex in the path
transformation. Using the same argumentation as before, we get the following
generalization.

######  Theorem 38 (Parallel transport and contextuality: disturbing case).

If a $G$-bundle with square integrable Markov kernels and with non-singular
stochastic matrices is non-contextual, then for any two paths $I_{a}^{b}$ e
$I^{\prime b}_{a}$ with the same initial and final vertices, holds

$\prod_{I_{a}^{b}}\Phi\left(t_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\right)=\prod_{I^{\prime
b}_{a}}\Phi\left(t_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\right).$ (79)

With this result, the extended version of the empirical model in Ref. [9] for
disturbing models that can be codified in $1$-simplices is explicit. We can
just write an extended empirical model where $t_{a_{i}a_{i}}$ are just another
(virtual) context and work in a non-disturbing model.

The holonomy group for $1$-contextual models remains the same. The transition
functions need to be taken into account when defining the group, and the
description by holonomy remains valid. For a loop, $\gamma$ based in
$x\in\mathcal{C}_{0}$ of a measurement scenario, the element of the holonomy
group $Hol_{x}\left(T\right)$ for this loop has the form

$Hol\left(\gamma\right)=\prod_{\gamma}\Phi\left(t_{a_{i}a_{i}}T_{a_{i}a_{i+1}}\right).$
(80)

For a non-Abelian group, the product order matters, but for Abelian ones, we
can write the beautiful equation

$Hol\left(\gamma\right)=\prod_{\gamma}\Phi\left(t_{a_{i}a_{i}}\right)\prod_{\gamma}\Phi\left(T_{a_{i}a_{i+1}}\right).$
(81)

In this way, we can calculate directly from the table of probabilities for the
local sections of contexts with two measurements, and from the transformation
data by the disturbance of the model, the elements of the holonomy group.

##  5 Conclusion

The first part of the present paper was a presentation of the fibration
approach to contextuality, showing why measurement scenarios are usually
encoded in simplicial complexes for non-finite outcome sets. In this approach,
the different notions of non-contextuality were unified by
Fine–Abramsky–Brandenburger theorem. In the second part, an exploration of the
relation of topology and contextual behaviour was done, with the definition of
a hierarchy of contextuality. The example of GHZ model shows that all levels
of the hierarchy are presented in quantum theory, and the tetraedron scenario
gives hints of a relation between non-trivial topology and quantity of
contextuality. Finally, the last part explores the first level of the
hierarchy, with the identification of a relationship between contextual
behavior and holonomy. Such relation permits defining a curvature that appears
in contextual models, and a natural extension to disturbing models is also
possible, as shown.

One of the questions in Ref. [20] is whether contextuality can be fully
described through the first homotopy group or not. As presented here,
specifically with the tetraedron scenario and the GHZ models, there is
contextuality that depends on higher homotopy groups, culminating in the
notion of $n$-contextuality. More work must be done to construct
identification tools to turn this concept into a clearer framework.

Tools that use outcome probabilities to identify contextuality already exist,
but the contextual connection has a straightforward interpretation of the
Markov kernels. There is more space for exploring the relationship of this
dynamic with $1$-contextuality. The role of singular paths has to erase
contextual behaviors should be better explored, to perhaps enable a concept
that identifies contextuality under necessary and sufficient conditions. A
known problem with the presented formalism is that the use of group structure
isn’t natural to relate measures, implying violations in the characterization
of contextuality [35].

Finally, it also allows us to imagine the role of higher holonomy groups in
$n$-contextuality. For disturbing models, the codification of extended
contextuality in transition functions and its role in the holonomy group
culminated in a beautiful result that deserves future attention, as the
natural $0$-contextuality. But one must be aware that, besides the group
structure violates the natural description of the probabilistic measure, the
$\mathcal{C}$ can be more complicated than a simplicial complex construction.

## Acknowledgements

The author thanks Prof. Marcelo Terra Cunha for the long conversations about
the bundle approach and Prof. Rui Soares Barbosa for explaining the Voroby’ev
theorem, and its independence from topology, with the counterexample of the
triangle with and without barycentric subdivision. Also, to thank Hamadalli de
Camargo for punctuating the eccentricity of the singular path transformations.
This work was supported by Brazilian agency CAPES, without which such research
would be impossible.

##  Appendix A Appendices

###  A.1 Contextual fraction

The contextual fraction is a measure of contextuality, based on the fact that
a non-contextual model can be written as a convex combination of global
events. The finite version was present in Ref. [4], and the more general case
of non-finite fibers in Ref. [10].

Formally, each measurable bundle has an incidence matrix

$M\left(\sigma_{U},\sigma_{\mathcal{B}}\right)=\begin{cases}1\text{ if
}\sigma_{\mathcal{B}}|_{U}=\sigma_{U};\\\ 0\text{ otherwise}.\end{cases}$ (82)

It has the possible global events indexing the columns and the possible local
events of maximal contexts indexing the rows, such that the entry will only be
non-null if the local event is a restriction to the context of the global
event. A model to be non-contextual per section is to be a convex combination
of global events, and therefore we will have a weight $b_{i}$ for each of
them, which should add $1$. It is equivalent to

$M\vec{b}:=\vec{p}$ (83)

where $\vec{p}$ is the vector of the probabilities of the outcome in each
context (certain care must be taken so that the vector, which originates in
the usual probability table, is in the correct position about the entry in the
incidence matrix).

The non-contextual fraction $NCF$ is the maximum value of $\sum_{i}b_{i}$ such
that $b_{i}\geq 0$ and $\sum_{j}M_{ij}b_{j}\leq p_{i}$, i.e.,

$NCF:=\max_{\vec{b}}\left\\{\sum_{i}b_{i};b_{i}\geq 0,\sum_{j}M_{ij}b_{j}\leq
p_{i}\right\\}.$ (84)

The contextual fraction is then defined as $CF=1-NCF$.

The contextual fraction is related to the contextuality inequalities in the
literature and has the necessary properties to be considered a ”good” measure
of contextuality. In case of interest in such properties, the references
already mentioned have more details, and Ref. [8] has a good review.

## References

  * [1]
  * [2] Samson Abramsky (2018): _Contextuality: At the Borders of Paradox_.  Oxford Scholarship Online, 10.1093/oso/9780198748991.003.0011.  Available at http://dx.doi.org/10.1093/OSO/9780198748991.003.0011.
  * [3] Samson Abramsky, Rui Soares Barbosa, K. Kishida, Raymond Lal & S. Mansfield (2015): _Contextuality, Cohomology and Paradox_.  arXiv:1502.03097 [quant-ph].
  * [4] Samson Abramsky, Rui Soares Barbosa & Shane Mansfield (2017): _Contextual Fraction as a Measure of Contextuality_.  Physical Review Letters 119(5), 10.1103/physrevlett.119.050504.  Available at http://dx.doi.org/10.1103/PhysRevLett.119.050504.
  * [5] Samson Abramsky & Adam Brandenburger (2011): _The sheaf-theoretic structure of non-locality and contextuality_.  New Journal of Physics 13(11), p. 113036, 10.1088/1367-2630/13/11/113036.  Available at http://dx.doi.org/10.1088/1367-2630/13/11/113036.
  * [6] Samson Abramsky & Giovanni Carù (2019): _Non-locality, contextuality and valuation algebras: a general theory of disagreement_.  Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 377(2157), p. 20190036, 10.1098/rsta.2019.0036.  Available at http://dx.doi.org/10.1098/rsta.2019.0036.
  * [7] Y. Aharonov & D. Bohm (1959): _Significance of Electromagnetic Potentials in the Quantum Theory_.  Phys. Rev. 115, pp. 485–491, 10.1103/PhysRev.115.485.  Available at https://link.aps.org/doi/10.1103/PhysRev.115.485.
  * [8] Barbara Amaral & Marcelo Terra Cunha (2017): _On geometrical aspects of the graph approach to contextuality_.  arXiv:1709.04812 [quant-ph].
  * [9] Barbara Amaral & Cristhiano Duarte (2019): _Characterizing and quantifying extended contextuality_.  Physical Review A 100(6), 10.1103/physreva.100.062103.  Available at http://dx.doi.org/10.1103/PhysRevA.100.062103.
  * [10] Rui Soares Barbosa, Tom Douce, Pierre-Emmanuel Emeriau, Elham Kashefi & Shane Mansfield (2019): _Continuous-variable nonlocality and contextuality_.  arXiv:1905.08267 [quant-ph].
  * [11] Kerstin Beer & Tobias J. Osborne (2018): _Contextuality and bundle diagrams_.  Physical Review A 98(5), 10.1103/physreva.98.052124.  Available at http://dx.doi.org/10.1103/PhysRevA.98.052124.
  * [12] J. S. Bell (1964): _On the Einstein Podolsky Rosen paradox_.  Physics Physique Fizika 1, pp. 195–200, 10.1103/PhysicsPhysiqueFizika.1.195.  Available at https://link.aps.org/doi/10.1103/PhysicsPhysiqueFizika.1.195.
  * [13] John Stewart Bell (1964): _On the Einstein Podolsky Rosen paradox_.  Physics 1(3), pp. 195–200, 10.1103/PhysicsPhysiqueFizika.1.195.  Available at https://cds.cern.ch/record/111654.
  * [14] David Bohm (1952): _A Suggested Interpretation of the Quantum Theory in Terms of ”Hidden” Variables. I_.  Phys. Rev. 85, pp. 166–179, 10.1103/PhysRev.85.166.  Available at https://link.aps.org/doi/10.1103/PhysRev.85.166.
  * [15] Adam Brandenburger & Noson Yanofsky (2008): _A classification of hidden-variable properties_.  Journal of Physics A: Mathematical and Theoretical 41(42), p. 425302, 10.1088/1751-8113/41/42/425302.  Available at http://dx.doi.org/10.1088/1751-8113/41/42/425302.
  * [16] Adán Cabello, Simone Severini & Andreas Winter (2014): _Graph-Theoretic Approach to Quantum Correlations_.  Physical Review Letters 112(4), 10.1103/physrevlett.112.040401.  Available at http://dx.doi.org/10.1103/PhysRevLett.112.040401.
  * [17] Giovanni Carù (2017): _On the Cohomology of Contextuality_.  Electronic Proceedings in Theoretical Computer Science 236, p. 21–39, 10.4204/eptcs.236.2.  Available at http://dx.doi.org/10.4204/EPTCS.236.2.
  * [18] Giovanni Carù (2018): _Towards a complete cohomology invariant for non-locality and contextuality_.  arXiv:1807.04203 [quant-ph].
  * [19] Keenan Crane, Fernando de Goes, Mathieu Desbrun & Peter Schröder (2013): _Digital Geometry Processing with Discrete Exterior Calculus_.  In: ACM SIGGRAPH 2013 courses, SIGGRAPH ’13, ACM, New York, NY, USA.
  * [20] Marcelo Terra Cunha (2019): _On Measures and Measurements: a Fibre Bundle approach to Contextuality_.  Phil. Trans. Roy. Soc. A 377(15), 10.1098/rsta.2019.0146.  Available at https://royalsocietypublishing.org/doi/10.1098/rsta.2019.0146.
  * [21] Cristhiano Duarte, Barbara Amaral, Marcelo Terra Cunha & Matthew Leifer (2020): _Investigating Coarse-Grainings and Emergent Quantum Dynamics with Four Mathematical Perspectives_.  arXiv:2011.10349 [quant-ph].
  * [22] Ehtibar N. Dzhafarov (2019): _On joint distributions, counterfactual values and hidden variables in understanding contextuality_.  Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 377(2157), p. 20190144, 10.1098/rsta.2019.0144.  Available at https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2019.0144.
  * [23] Ehtibar N. Dzhafarov, Víctor H. Cervantes & Janne V. Kujala (2017): _Contextuality in canonical systems of random variables_.  Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 375(2106), p. 20160389, 10.1098/rsta.2016.0389.  Available at https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2016.0389.
  * [24] Ehtibar N. Dzhafarov, Janne V. Kujala & Víctor H. Cervantes (2020): _Contextuality and noncontextuality measures and generalized Bell inequalities for cyclic systems_.  Physical Review A 101(4), 10.1103/physreva.101.042119.  Available at http://dx.doi.org/10.1103/PhysRevA.101.042119.
  * [25] Andreas Döring & Markus Frembs (2020): _Contextuality and the fundamental theorems of quantum mechanics_.  arXiv:1910.09591 [math-ph].
  * [26] A. Einstein, B. Podolsky & N. Rosen (1935): _Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?_ Phys. Rev. 47, pp. 777–780, 10.1103/PhysRev.47.777.  Available at https://link.aps.org/doi/10.1103/PhysRev.47.777.
  * [27] Yves Felix, Steve Halperin & Jean-Claude Thomas (1995): _Differential Graded Algebras in Topology_.  In: Handbook of Algebraic Topology, Elsevier, pp. 829–865, 10.1016/b978-044481779-2/50017-1.  Available at https://doi.org/10.1016%2Fb978-044481779-2%2F50017-1.
  * [28] Marissa Giustina, Marijn A. M. Versteegh, Sören Wengerowsky, Johannes Handsteiner, Armin Hochrainer, Kevin Phelan, Fabian Steinlechner, Johannes Kofler, Jan-Åke Larsson, Carlos Abellán, Waldimar Amaya, Valerio Pruneri, Morgan W. Mitchell, Jörn Beyer, Thomas Gerrits, Adriana E. Lita, Lynden K. Shalm, Sae Woo Nam, Thomas Scheidl, Rupert Ursin, Bernhard Wittmann & Anton Zeilinger (2015): _Significant-Loophole-Free Test of Bell’s Theorem with Entangled Photons_.  Phys. Rev. Lett. 115, p. 250401, 10.1103/PhysRevLett.115.250401.  Available at https://link.aps.org/doi/10.1103/PhysRevLett.115.250401.
  * [29] L.J. Grady & J.R. Polimeni (2010): _Discrete Calculus: Applied Analysis on Graphs for Computational Science_.  Springer London.  Available at https://books.google.com.br/books?id=E3-OSVSPbU0C.
  * [30] B. Hensen, H. Bernien, A. E. Dréau, A. Reiserer, N. Kalb, M. S. Blok, J. Ruitenberg, R. F. L. Vermeulen, R. N. Schouten, C. Abellán, W. Amaya, V. Pruneri, M. W. Mitchell, M. Markham, D. J. Twitchen, D. Elkouss, S. Wehner, T. H. Taminiau & R. Hanson (2015): _Loophole-free Bell inequality violation using electron spins separated by 1.3 kilometres_.  Nature 526(7575), pp. 682–686, 10.1038/nature15759.  Available at https://doi.org/10.1038/nature15759.
  * [31] Martti Karvonen (2019): _Categories of Empirical Models_.  Electronic Proceedings in Theoretical Computer Science 287, p. 239–252, 10.4204/eptcs.287.14.  Available at http://dx.doi.org/10.4204/EPTCS.287.14.
  * [32] Simon Kochen & E. P. Specker (1975): _The Problem of Hidden Variables in Quantum Mechanics_ , pp. 293–328.  Springer Netherlands, Dordrecht, 10.1007/978-94-010-1795-4_17.  Available at https://doi.org/10.1007/978-94-010-1795-4_17.
  * [33] Janne V. Kujala & Ehtibar N. Dzhafarov (2019): _Measures of contextuality and non-contextuality_.  Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 377(2157), p. 20190149, 10.1098/rsta.2019.0149.  Available at https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2019.0149.
  * [34] Serge Lang (1995): _Vector Bundles_ , pp. 40–63.  Springer New York, New York, NY, 10.1007/978-1-4612-4182-9_3.  Available at https://doi.org/10.1007/978-1-4612-4182-9_3.
  * [35] Sidiney B. Montanhano (2021): _Contextuality and Semi-Module Cohomology_.  arXiv:2104.11411 [math.AC].
  * [36] Cihan Okay & Robert Raussendorf (2020): _Homotopical approach to quantum contextuality_.  Quantum 4, p. 217, 10.22331/q-2020-01-05-217.  Available at http://dx.doi.org/10.22331/q-2020-01-05-217.
  * [37] Prakash Panangaden (1999): _The Category of Markov Kernels_.  Electronic Notes in Theoretical Computer Science 22, pp. 171 – 187, https://doi.org/10.1016/S1571-0661(05)80602-4.  Available at http://www.sciencedirect.com/science/article/pii/S1571066105806024.  PROBMIV’98, First International Workshop on Probabilistic Methods in Verification.
  * [38] Lynden K. Shalm, Evan Meyer-Scott, Bradley G. Christensen, Peter Bierhorst, Michael A. Wayne, Martin J. Stevens, Thomas Gerrits, Scott Glancy, Deny R. Hamel, Michael S. Allman, Kevin J. Coakley, Shellee D. Dyer, Carson Hodge, Adriana E. Lita, Varun B. Verma, Camilla Lambrocco, Edward Tortorici, Alan L. Migdall, Yanbao Zhang, Daniel R. Kumor, William H. Farr, Francesco Marsili, Matthew D. Shaw, Jeffrey A. Stern, Carlos Abellán, Waldimar Amaya, Valerio Pruneri, Thomas Jennewein, Morgan W. Mitchell, Paul G. Kwiat, Joshua C. Bienfang, Richard P. Mirin, Emanuel Knill & Sae Woo Nam (2015): _Strong Loophole-Free Test of Local Realism_.  Phys. Rev. Lett. 115, p. 250402, 10.1103/PhysRevLett.115.250402.  Available at https://link.aps.org/doi/10.1103/PhysRevLett.115.250402.
  * [39] Josiney A. Souza (2020): _UMA NOTA SOBRE A TEORIA DOS GRUPOS: DA TEORIA DE GALOIS À TEORIA DE GAUGE_.  Revista Brasileira de História da Matemática 12(24), pp. 71–81, 10.47976/RBHM2012v12n2471-81.  Available at https://www.rbhm.org.br/index.php/RBHM/article/view/108.
  * [40] R. W. Spekkens (2005): _Contextuality for preparations, transformations, and unsharp measurements_.  Physical Review A 71(5), 10.1103/physreva.71.052108.  Available at http://dx.doi.org/10.1103/PhysRevA.71.052108.
  * [41] Ernesto De Vito, Veronica Umanita‘ & Silvia Villa (2011): _An extension of Mercer theorem to vector-valued measurable kernels_.  arXiv:1110.4017 [math.FA].
  * [42] N. N. Vorob’ev (1959): _Consistent Families of Measures and Their Extensions_.  Theory Probab. Appl. 7(2), 10.1137/1107014.  Available at https://doi.org/10.1137/1107014.
  * [43] James Owen Weatherall (2016): _Categories and the Foundations of Classical Field Theories_.  arXiv:1505.07084 [physics.hist-ph].