Topological Methods for Studying Contextuality: N-Cycle Scenarios and Beyond

Simplicial distributions are combinatorial models describing distributions on spaces of measurements and outcomes that generalize nonsignaling distributions on contextuality scenarios. This paper studies simplicial distributions on two-dimensional measurement spaces by introducing new topological methods. Two key ingredients are a geometric interpretation of Fourier–Motzkin elimination and a technique based on the collapsing of measurement spaces. Using the first one, we provide a new proof of Fine’s theorem characterizing noncontextual distributions in N-cycle scenarios. Our approach goes beyond these scenarios and can describe noncontextual distributions in scenarios obtained by gluing cycle scenarios of various sizes. The second technique is used for detecting contextual vertices and deriving new Bell inequalities. Combined with these methods, we explore a monoid structure on simplicial distributions.


Introduction
Quantum contextuality is a fundamental feature of collections of probability distributions obtained from quantum measurements.In a classical setting, experimental statistics are derivable from a joint probability distribution.Measurements of quantum observables, however, do not satisfy this principle, leading to violations of Bell inequalities, or more generally, non-contextual inequalities, which serve as a witness of this quintessentially non-classical phenomenon.That such violations were necessary was first discovered by Bell [1].Later, Fine [2,3] showed that such inequalities were also sufficient for recovering a classical description in the well-known Clauser-Horne-Shimony-Holt (CHSH) scenario [4].
A systematic study of contextuality scenarios using sheaf theory was introduced by Abramsky-Brandenburger in [5].Later topological ideas from group cohomology were introduced to the study of contextuality [6], with an emphasis on investigating quantum advantage in measurementbased quantum computation.More recently, a unified framework for the study of contextuality was introduced, based on combinatorial representations of topological spaces known as simplicial sets [7].The basic objects in this theory are called simplicial distributions.This theory subsumes the theory of non-signaling distributions and goes beyond by formulating the notion of distributions on spaces rather than sets.Contextuality can be formulated in this generality.Initial applications of simplicial distributions in [7] included a new topological proof of Fine's theorem for the CHSH scenario.A novel feature of this approach is its flexibility in realizing measurement scenarios as topological spaces.Such expressiveness allows for contextuality to be characterized topologically in multiple ways.For instance, one realization of the CHSH scenario is topologically equivalent to a disk consisting of four triangles, while another realization, also appearing in [8], is given by a punctured torus.While the former allows for an analysis similar in spirit to that of Fine, the latter work supplies an alternative proof by the classifying the extreme distributions on the torus.In this paper, we go beyond these examples and consider a generalization of N -cycle scenarios [9,10] which we call flower scenarios.The flower scenario is obtained by gluing various cycle scenarios of arbitrary size as in Fig. (1).This scenario is a particular example of a class of 2-dimensional measurement spaces.Given a 1-dimensional simplicial set, i.e., a graph, the cone construction produces a 2-dimensional simplicial set.This construction introduces a new vertex and a set of triangles connecting each edge on the graph to the new vertex.For a 1-dimensional space X, we will write C(X) for the cone space.We will write L N for the space obtained by gluing N edges in the shape on a line.Theorem 4.9.Let C(X) denote the flower scenario (Fig. (1)), the cone of X obtained by gluing the lines L N 1 , • • • , L N k at their end points.A simplicial distribution p ∈ sDist(C(X)) is non-contextual if and only if for every N -circle C on X the restriction p| C satisfies the N -circle inequalities 1 .
The primary technique that goes into the proof of this result is the Fourier-Motzkin (FM) elimination [11], a version of Gaussian elimination for inequalities.In Section 3.1 we present a topological interpretation of FM elimination.A measurement space is represented by a simplicial set whose simplices correspond to measurements.In this paper, we will restrict our attention to 2-dimensional simplicial sets, that is, those obtained by gluing triangles.Our outcome space will be fixed to a canonical choice obtained from Z 2 = {0, 1} (known as the nerve space) so that the measurements labeling the edges have binary outcomes.In this setting, non-contextuality is characterized by Bell inequalities consisting of variables corresponding to probabilities of measurements on the edges.For our topological proof of Fine's theorem we consider a particular triangulation of the disk, which we refer to as a classical N -disk.On these disks any simplicial distribution turns out to be non-contextual, hence the name classical.If we start from a distribution on the boundary of a disk, the N -circle inequalities appear as the sufficient and necessary condition for extending such a distribution from the boundary to the entire disk (Proposition 3.10).Now, given two such classical disks glued at a common edge, the topological interpretation of FM elimination is that the boundary of the new space is formed by taking the union of the boundaries of the disks and omitting the common edge; see Fig. (8).The elimination of the edge is the geometric interpretation of removing the variable by FM elimination.This key idea allows us to characterize the extension condition from the boundary of a bouquet of classical disks, i.e., a collection of disks glued at a common edge, by a collection of circle inequalities (Corollary 3.12).This extension result is the main ingredient of the proof of Theorem 4.9 that characterizes non-contextual distributions on the flower scenario Fig. (1).Note that this scenario generalizes bipartite Bell scenarios where Alice performs 2 measurements, and Bob performs m measurements, and all measurements have binary outcomes [12].
Our next main contribution is the collapsing of measurement spaces to detect contextual vertices of simplicial distributions (Section 5).To study simplicial distributions on the cone space we introduce a technique based on collapsing edges.Let π : X → X/σ denote the map that collapses an edge σ of the graph.Applying the cone construction gives a map Cπ : C(X) → C(X/σ) between the cone spaces.A simplicial distribution on the cone of the collapsed measurement space can be extended via Cπ to give a simplicial distribution on the cone of the original measurement space.We denote this map by (Cπ) * : sDist(C(X/σ)) → sDist(C(X)).
In Theorem 5.2 we show that for a simplicial distribution p ∈ sDist(C(X/σ)) and its image q = (Cπ) * (p) the following holds: 1. p is a vertex if and only if q is a vertex.
2. p is contextual if and only if q is contextual.
3. p is strongly contextual if and only if q is strongly contextual.
4. p is a deterministic distribution if and only if q is a deterministic distribution.
In particular, parts (1) and (2) imply that contextual vertices map to contextual vertices under the collapsing map.This method is very powerful in detecting vertices.Let n X denote the number of generators of the fundamental group of the graph X.Then the number of contextual vertices in sDist(C(X)) is lower bounded by (2 n X − 1)2 |X 0 |−1 where |X 0 | denotes the number of vertices of the graph (Theorem 5.10).In addition, we use this method to derive new Bell inequalities from known ones.For example, the Froissart inequalities [13] of the scenario given by the cone of the bipartite graph K 3,3 produce new Bell inequalities for the cone of the graph obtained by collapsing one of the edges (Section 5.1).Finally, we explore a new algebraic feature of simplicial distributions first introduced in [14].The set of simplicial distributions sDist(X) has a monoid structure.Together with its polytope structure, this gives a convex monoid.The restriction of the monoid structure to deterministic distributions gives a group structure, and this group acts on simplicial distributions.Using this action, we can generate more vertices from those obtained from the collapsing technique.Our other contributions are as follows: (1) For a 2-dimensional measurement space X we show that sDist(X) is a convex polytope (Proposition 2.15) and provide the H-description (Corollary 2.16).
(2) We describe the monoid structure on sDist(X) (Section 2.4) and describe the action of the set of deterministic distributions on Bell inequalities and contextual vertices (Example 2.24).( 3) The 1-cycle scenario obtained as the cone of a circle (Fig. (17)) is a new scenario that cannot be realized in the conventional non-signaling picture.More generally, we describe the polytope of simplicial distributions on the cone of the wedge ∨ n i=1 C 1 of 1-circles (Proposition 5.8).

Simplicial distributions
The theory of simplicial distributions is introduced in [7].A simplicial distribution is defined for a space of measurements and outcomes.In this formalism spaces are represented by combinatorial objects known as simplicial sets.More formally, a simplicial set X consists of a sequence of sets X n for n ≥ 0 and the simplicial structure maps: These maps are subject to simplicial relations (see, e.g., [15]).An n-simplex is called degenerate if it lies in the image of a degeneracy map, otherwise it is called non-degenerate.Geometrically only the non-degenerate simplices are relevant.Among the non-degenerate simplices there are ones that are not a face of another non-degenerate simplex.Those simplices we will refer to as generating simplices.Throughout the paper when we refer to an edge (1-simplex) or a triangle (2-simplex) of a simplicial set we mean a non-degenerate one.
In this paper we will focus on spaces obtained by gluing triangles.
Example 2.1.The triangle, denoted by ∆ 2 , is the simplicial set with simplices The i-th face map deletes the i-th index: , and the j-th degeneracy map copies the j-th index: The simplex σ 012 is the generating simplex.Any other simplex can be obtained by applying a sequence of face and degeneracy maps.In general, we can define ∆ d consisting of n-simplices of the form σ a 0 •••an where 0 ≤ a 0 ≤ • • • ≤ a n ≤ d.This simplicial set represents the topological d-simplex.Of particular interest are ∆ 0 and ∆ 1 representing a point and an edge, respectively.
The gluing operation can be specified by introducing relations between the generating simplices.The simplest example is obtained by gluing two triangles along a face.
Example 2.2.The diamond space D is defined as follows: • Generating simplices: σ 012 A and σ 012 B .
• Identifying relation: We can define other versions by changing the faces.We will write D ij for the diamond whose identifying relation is Next we introduce the notion of maps between simplicial sets.A map f : X → Y of simplicial sets consists of a sequence f n : X n → Y n of functions that respect the face and the degeneracy maps.Given a simplex σ ∈ X n we will write f σ for f n (σ) ∈ Y n .With this notation the compatibility conditions are given by A simplicial set map f : ∆ 2 → Y is determined by the image of the generating simplex, that is, by an arbitrary 2-simplex f σ 012 ∈ Y 2 .Therefore these maps are in bijective correspondence with the elements of Y 2 .In the case of the diamond space a simplicial set map f : Given a simplicial set Y we will construct another simplicial set that represents the space of distributions on Y .For this we need the distribution monad D R defined for a commutative semiring R [16].Throughout the paper we will take R to be R ≥0 .A distribution on a set U is defined to be a function p : U → R of finite support such that u∈U p(u) = 1.The delta distribution at u ∈ U is defined by Any distribution can be expressed as a sum of delta distributions: The space of distributions on Y is represented by the simplicial set D R (Y ) whose n-simplices are given by D R (Y n ).The face and the degeneracy maps are given by D R d i and D R s j .There is a canonical simplicial set map δ : Y → D R (Y ) defined by sending a simplex σ to the delta distribution δ σ .Definition 2.3.A simplicial scenario consists of a pair (X, Y ) of simplicial sets where X represents the space of measurements and Y represents the space of outcomes.A simplicial distribution on (X, Y ) is a simplicial set map p : X → D R (Y ).A simplicial set map of the form s : X → Y is called an outcome assignment.The associated distribution δ s : X → D R (Y ) is defined to be the composite δ • s is called a deterministic distribution.We will write sDist(X, Y ) and dDist(X, Y ) for the set of simplicial and deterministic distributions.
There is a canonical map There is a stronger version of contextuality whose definition relies on the notion of support.The support of a simplicial distribution p : Definition 2.5.A simplicial distribution p on (X, Y ) is called strongly contextual if its support supp(p) is empty.

Two-dimensional distributions with binary outcomes
Throughout the paper we will work concretely with binary outcome measurements in Z 2 .In effect this means that our outcome space will be the nerve space of Z 2 .This simplicial set is denoted by N Z 2 and is defined as follows: • The face maps are given by and the degeneracy maps are given by Our measurement spaces will be obtained by gluing triangles.A simplicial set is d-dimensional if all its non-degenerate simplices are in dimension n ≤ d.In this paper we will restrict ourselves to simplicial scenarios of the form (X, N Z 2 ) where X is 2-dimensional.We will study simplicial distributions on such scenarios.For simplicity of notation we will write sDist(X) omitting the outcome space when it is fixed to N Z 2 , and denote the simplicial scenario only by the measurement space X.
Let us look more closely to simplicial distributions on the triangle.Consider a triangle ∆ 2 with the generating 2-simplex σ = σ 012 .A simplicial distribution is given by a simplicial set map which is determined by the distribution p σ on Z 2  2 .We will write p ab σ for the probability of obtaining the outcome (a, b) ∈ Z 2  2 when we measure σ.The three edges bounding σ are given by the face maps as follows: σ 01 = d 2 σ 012 , σ 02 = d 1 σ 012 , σ 12 = d 0 σ 012 .For simplicity of notation we will write x = σ 01 , y = σ 12 and z = σ 02 .The corresponding marginal distribution p x : Z 2 → R ≥0 at edge x can be identified with (p 0 x , p 1 x ).Since p 0 x + p 1 x = 1, it suffices just to keep p 0 x .Similarly for edges y and z.Compatibility with face maps requires that: Since p ab σ is also normalized, it can be expressed by three parameters.Without loss of generality we can take these three parameters to be the marginal distributions corresponding to the edges on the boundary.Conversely, given the marginals on the edges we have that Therefore a simplicial distribution on the triangle is determined by its restriction to the boundary.This observation generalizes to every 2-dimensional simplicial set.As we will observe in Proposition 2.15 for such measurement spaces restriction of a simplicial distribution to the 1-dimensional simplicial subset consisting of all the edges determines the distribution.Alternatively, we can use the expectation coordinates instead of the probability coordinates.For an edge τ ∈ X 1 , let us define its expectation value by Using this we can rewrite p ab σ , which takes the form Next we describe non-contextual distributions on ∆ 2 .Let us start with outcome assignments.An outcome assignment s : ∆ 2 → N Z 2 is determined by a pair of bits s σ ∈ Z 2  2 .The corresponding deterministic distribution is δ s .For simplicity of notation we will write δ ab for the deterministic distribution corresponding to the outcome assignment s σ = (a, b).In this paper we are interested in cones of 1-dimensional simplicial sets.For instance, the Ncycle scenario (Definition 4.1) is of this form.Given a simplicial set X we will construct a new simplicial set denoted by C(X) which represents the topological construction of adding a new vertex and joining every n-simplex of X to this vertex to create an (n + 1)-simplex.The new vertex is represented by ∆ 0 , the simplicial set representing a point.This simplicial set is defined by • the face and the degeneracy maps are given by deleting and copying; see Example 2.1.
For notational convenience we will write c n for the simplex σ 0•••0 in dimension n.With this notation a face map sends c n → c n−1 and a degeneracy map send c n → c n+1 .Definition 2.7.The cone C(X) is the simplicial set given as follows: Otherwise, the face and the degeneracy maps on the {c n } and X n factors act the same as in ∆ 0 and X.This construction is a special case of the join construction Z * X defined for a pair of simplicial sets [17,Chapter 17.1].In the cone construction Z = ∆ 0 .We will use the cone construction to obtain 2-dimensional measurement spaces.
Remark 2.8.For n ≥ 1, the non-degenerate n-simplices of C(X) are of the form (c 0 , σ) where σ is a non-degenerate (n − 1)-simplex of X.We will usually write c = c 0 .

Gluing and extending distributions
Fundamental tools in the study of simplicial distributions are the extension and the gluing lemmas.They will be crucial for the proof of Fine's theorem for the N -cycle and the flower scenarios in Section 4.1.Given a simplicial set map f : Z → X we will write for the map that sends a simplicial distribution p on X to the simplicial distribution defined by the composition f * p : Similarly there is a map between the deterministic distributions, which is also denoted by f * : dDist(X) → dDist(Z).In this case a deterministic distribution δ s is sent to δ s•f .There is a commutative diagram Proposition 2.9.If q ∈ sDist(X) is non-contextual then p = f * (q) is also non-contextual.
Let A be a simplicial subset of X and let us write i : A → X for the inclusion map.This means that each A n is a subset of X n and the simplicial structure of A is compatible with that of X.Given p ∈ sDist(X) we will write p| A for the distribution i * p.For a deterministic distribution δ s on X the distribution i * δ s will be denoted by δ s | A .Note that δ s | A = δ s| A where s| A stands for the composition s| A : An important special case of Proposition 2.9 is the following result we will need later in the paper.
Corollary 2.10.Let A be a simplicial subset of X.If q ∈ sDist(X) is non-contextual then q| A is also non-contextual.
Another important result is the following Gluing Lemma.Using this result one can reduce the study of distributions on a measurement space to its smaller constituents in some cases.
Lemma 2.11.Suppose that X = A ∪ B with A ∩ B = ∆ n for some n ≥ 0. Then p ∈ sDist(X) is non-contextual if and only if both p| A ∈ sDist(A) and p| B ∈ sDist(B) are non-contextual.

Polytope of simplicial distributions
Recall that the triangle ∆ 2 has a single generating simplex σ.The boundary ∂σ consists of three non-degenerate 1-simplices denoted by x, y, z.Using Eq. ( 2) the polytope of simplicial distributions sDist(∆ 2 ) can be described as the space consisting of triples (p 0 x , p 0 y , p 0 z ) ∈ R 3 satisfying This set of inequalities is an example of N -circle inequalities introduced in Definition 3.5 (N = 3).They imply that sDist(∆ 2 ) is a tetrahedron in R 3 .Proposition 2.6 can be used to observe that its vertices are given by (a, b, c) where a, b, c ∈ {0, 1} and c + 1 = a + b mod 2.
In general, we will show that sDist(X) is described as the intersection of finitely many halfspace inequalities corresponding to the non-negativity of the parameters p ab σ .Such a description of a polytope is called the H-representation.Our goal is to characterize the geometric structure of sDist(X) including the vertices (extreme distributions) and the Bell inequalities bounding the non-contextual distributions.Definition 2.12.A 1-simplex τ of X is called a deterministic edge (with respect to p) if p τ is a deterministic distribution on Z 2 .Proposition 2.13.If two of the edges of a triangle are deterministic then the third edge is also deterministic.
Proof.Assume that p 0 x = 1 and p 0 y = 1, the other cases follow similarly.Then the last inequality in Eq. ( 6) implies that p 0 z = 1.
Next, we recall some basic facts from polytope theory [11,18].In the H-representation a (convex) polytope is specified by a set of inequalities: where A is a m × d matrix and b is a column vector of size m.We will assume that P ⊂ R d is full-dimensional, that is, the dimension of the polytope is given by d.
Proof.Let P denote the image of f .First consider the case where |∂σ| = 3. P is defined by the set of inequalities in Eq. ( 6).This is a tetrahedron in R 3 with vertices (δ a , δ b , δ c ) where a, b, c ∈ {0, 1} and c = a + b mod 2. Therefore the dimension of P is 3. Next consider |∂σ| = 2.We can assume that x and y identified.Then the polytope is obtained by intersecting the tetrahedron by the hyperplane p 0 x = p 0 y .This gives a 2-dimensional polytope.Finally, if |∂σ| = 1 then all the edges are identified.The polytope is obtained by intersecting the previous one with p 0 y = p 0 z producing a polytope of dimension 1.
n for the set of non-degenerate simplices.Let X (n) denote the simplicial subset of X generated by X • n .For example, X (1) is generated by non-degenerate 1-simplices together with the face relations coming from X. Proposition 2.15.Let X be a simplicial set generated by the 2-simplices σ 1 , • • • , σ k such that each ∂σ i does not contain non-degenerate edges.The map Proof.This follows from Lemma 2.14: For each σ i the restriction of f to the simplicial set X i generated by σ i gives a map onto the coordinates of the boundary.Combining these projections we can obtain a linear embedding i : Then P X is given by the intersection of the image of i and the product of the polytopes k i=1 P X i .This intersection remains to be full dimensional in the linear subspace.
In practice, this result implies that a simplicial distribution on a 2-dimensional simplicial set is determined by its restriction to the edges.This description of p will be referred to as the edge coordinates.With this result at hand, it is straight-forward to give the H-description of P X .
We define an m X × d X matrix: and a column vector b of size m X : Then P X is described as P (A, b).
We adopt a notation where if Z ⊆ {1, • • • , m} then A[Z] is the matrix obtained by keeping only those rows indexed by Z and discarding the rest, and similarly for b[Z].Let i ∈ {1, • • • , m} index a single inequality and x ∈ P , then we call an inequality i at x tight if the inequality is satisfied with equality, i.e., A i x = b i .For a point x ∈ P we write Z x for the set of tight inequalities at x. Definition 2.17.The rank rank(p) of a simplicial distribution p ∈ sDist(X) is defined to be the rank of the matrix This basic fact applied to P X , where d = |X • 1 |, combined with Proposition 2.15 gives the result.

Monoid structure on simplicial distributions
An additional algebraic feature that comes for free in the theory of simplicial distributions is the monoid structure on sDist(X, Y ) when Y is a simplicial set which also has the structure of a group.Such a group-like simplicial set is called a simplicial group.
Our outcome space N Z 2 has this additional algebraic feature, which comes from the following simplicial set map: It is straight-forward to verify that this assignment respects the face and the degeneracy maps.This product gives the set dDist(X) of deterministic distributions the structure of a group.Given two such distributions δ s and δ r their product is given by δ s•r where We will write δ s • δ r to denote this product of deterministic distributions.
1.The product on dDist(∆ 1 ) is given by 2. The product on dDist(∆ 2 ) is given by Proof.Let τ = σ 01 denote the generating simplex of ∆ 1 .Consider two deterministic distributions δ s and δ r such that s τ = a and r τ = b.The product s • r is determined by its value at τ .Using Eq. ( 8) we have For ∆ 2 , we will consider the generating simplex σ = σ 012 .By a similar argument applied to s σ = (a, b) and r = (c, d) we observe that Lemma 2.19 can be used to describe the product on dDist(X) when X is 2-dimensional.This product can be extended to D(dDist).Given d, e ∈ D(dDist(X)) we define where the summation runs over (δ r , δ t ) ∈ (dDist(X)) 2 satisfying r • t = s.With this product D(dDist(X)) is a monoid.Next, we turn to the monoid structure on sDist(X).Given two simplicial distributions p, q on X the product p • q is defined by where the summation runs over (b, c) ∈ (Z n 2 ) 2 satisfying b + c = a.This formula works for an n-simplex σ.For us the main interest is the cases n = 1, 2.
Moreover, the map Θ : D(dDist(X)) → sDist(X) is a homomorphism of monoids.For more on the monoid structure and its interaction with convexity see [14].We will use the action of the group dDist(X) on the monoid sDist(X) that comes from the product in Eq. ( 9).Explicitly, for σ ∈ X 2 and τ ∈ X 1 this action is described as follows: Note that this action maps vertices of sDist(X) to vertices.
1.For two non-contextual simplicial distributions p and q in sDist(X), the product p • q is a non-contextual distribution.Part (2) of this proposition implies that the action of dDist(X) on sDist(X) maps a (non)contextual vertex to a (non)-contextual vertex.We describe the action in the case of the well-known CHSH scenario in Example 2.24 below.

A simplicial distribution
The following simplicial distributions on ∆ 2 = C(∆ 1 ) will play a distinguished in later sections when we study 2-dimensional scenarios more closely: We follow the convention in Fig. (2b).
Next we show that this set is a group.We will denote the distribution in G ± (CX) with p| (c,τ ) = p + for every τ ∈ X • 1 by e + .
Proposition 2.23.G ± (CX) is an abelian group with e + as the identity.In addition, every element has order 2, that is, Proof.By part 2 of Lemma 2.20 we have Therefore the statement holds for X = ∆ 1 , that is we have Now for arbitrary X and p, q ∈ G ± (CX) the product is computed triangle-wise, i.e., (p•q) σ = p σ •q σ .Therefore the statement easily generalizes.
Example 2.24.The CHSH scenario consists of four triangles organized into a disk with vertices v 0 , v 1 , w 0 , w 1 and c.For each pair (v i , w j ) there is an edge which we denote by τ ij .This constitutes the boundary of the disk.There are four non-degenerate triangles σ ij = (c, τ ij ) as depicted in Fig. (3).The interior edges (c, v i ) and (c, w j ) will be denoted by x i and y j , respectively.This scenario is a particular case of the N -cycle scenario in Definition 4.
Also the contextual vertices are known.They are given by the Popescu-Rohrlich (PR) boxes [19]: A PR box is a simplicial distribution p such that p σ ij = p ± for i, j ∈ {0, 1} with the further restriction that the number of p − 's is odd.We begin with the action on the PR boxes.By Eq. (10) we see that δ 00 and δ 10 are the only deterministic distributions on the triangles that fix p + and p − .From this observation we conclude that among the 16 deterministic distributions on the CHSH scenario the ones that fix a given PR box are (δ 00 σ 00 , δ 00 σ 01 , δ 00 σ 10 , δ 00 σ 11 ) and (δ 10 σ 00 , δ 10 σ 01 , δ 10 σ 10 , δ 10 σ 11 ).Thus the size of the orbit is 16/2 = 8, which gives all the PR boxes.
To describe the action of δ s on the Bell inequalities we need to switch back to the edge coordinates.For notational convenience we will write p i for the i-th entry of this tuple.Then the deterministic distribution δ s is given by (δ a 0 , δ a 0 +b 0 , δ b 0 , δ a 1 +b 0 , δ a 1 , δ a 1 +b 1 , δ b 1 , δ a 0 +b 1 ).Using the notational convenience introduced above, in these coordinates the action of δ s on p is given by Now, substituting these new values to the Bell inequality gives the action.For example, the action of (δ 0 , δ 1 , δ 1 , δ 0 , δ 1 , δ 1 , δ 0 , δ 0 ) on the Bell inequality gives 1 − p 0 σ 00 + p 0 σ 10 + 1 − p 0 σ 11 − p 0 σ 01 ≤ 2, which can be put in a more familiar form p 0 σ 00 − p 0 σ 10 + p 0 σ 11 + p 0 σ 01 ≥ 0. We can compute the stabilizer of the Bell inequality in Eq. ( 13).The relevant edge coordinates are σ ij that constitute the boundary of the CHSH scenario.The relevant coordinates of δ s that can change the inequality are δ a i +b j where i, j ∈ {0, 1}.Then the stabilizer consists of those deterministic distributions that satisfy a i + b j = 0 mod 2 for every i, j ∈ {0, 1}.The size of this group is 2 and therefore there are 8 = 16/2 elements in the orbit.This covers all 8 of the Bell inequalities.
See Section 5.1 for more on the action on Bell inequalities.

Distributions on the classical N -disk
The classical N -disk scenario has the measurement space given by a disk triangulated in a way that results in only non-contextual (or classical) distribution.Definition 3.1.For N ≥ 3 let D N denote the following simplicial set: • Identifying relations: The classical N -disk can be constructed by successive gluing.To see this, starting from an initial non-degenerate simplex σ 1 we successively glue simplices along a single edge so that σ i+1 shares a single common edge with σ i , terminating with the simplex σ N −2 .The simplices σ 1 and σ N −2 in any classical N -disk will be referred to as the initial and terminal simplices, respectively.In particular, the gluing described by the face relations is such that the boundary of the disk has N edges and form an N -circle in the sense of Definition 3.11.Letting (∂D N ) • 1 be the non-degenerate edges on the boundary of the classical N -disk, non-degenerate simplicies in the classical N -disk are distinguished by Such edges in the classical N -disk are called boundary edges, otherwise we call them interior edges.The classical 3-disk is ∆ 2 , while the diamond space D is an example of a classical 4-disk.See  Proof.This follows from (Gluing) Lemma 2.11 since D N is constructed by gluing N triangles along a ∆ 1 .At each step we can apply the Gluing Lemma.

Fourier-Motzkin elimination
As is well-known, systems of linear equations can be solved using Gaussian elimination.For systems of linear inequalities there exists a related technique known as Fourier-Motzkin (FM) elimination; see e.g., [18].A linear inequality in d variables can be written as a T x ≥ b, where a, x ∈ R d and b ∈ R. For m such linear inequalities we have Taking each vector a T i to be a row of a matrix A, this set of m inequalities can be compactly written as Ax ≥ B, where A ∈ R m×d and B ∈ R m .The feasible region defined by Ax ≥ B (if one exists) forms a polyhedron.
To perform FM elimination of a variable x j , let us first index all inequalities where x j appears with positive, negative, or zero coefficients as I + j , I − j , and I 0 j , respectively.We then solve for x j : Then for every (i, i ′ ) ∈ I + j × I − j we have that such an x j exists so long as This can be rearranged to give a new set of inequalities in d − 1 variables whose solution, should it exist, is the same as the original set of inequalities.

Application to the Diamond scenario
As a warm up we begin by considering the diamond scenario D described in Example 2.2.We will adapt a more convenient notation for the generating simplices of the two triangles A and B.
The first one will be denoted by σ 012 and the other one by σ 01 ′ 2 .The diamond D is obtained by gluing A and B along the d 1 face, i.e., the simplex σ 02 .Again for ease of notation the probabilities will be denoted by p ab 012 and p a ′ b ′ 01 ′ 2 ; respectively.In this section we will use the expectation coordinates introduced in Eq. ( 3) and ( 4).These eight probabilities that are required to be non-negative is equivalent (up to an overall constant factor) to the inequalities for all a, b, a ′ , b ′ ∈ Z 2 .
Proposition 3.3.Let D be a diamond and ∂D denote its boundary.Then a distribution p ∈ sDist(∂D) extends to p ∈ sDist(D) if and only if the CHSH inequalities are satisfied: where a, a Proof.Proof of this result is given in [7, Proposition 4.10].We provide an exposition here for completeness.All of the coefficients that appear in Eqns.(16)(17) are just ±1, to perform FM elimination it suffices to sum up the inequalities where σ 02 has positive and negative coefficient.
For inequalities coming from the same triangle this just yields that −1 ≤ σij ≤ 1 -we call such inequalities trivial.When we combine inequalities from different triangles we obtain the inequalities in Eq. ( 18).In an abuse of terminology, we will sometimes say that we eliminate an edge σ, when what we actually mean is that we perform FM elimination on the corresponding expectation value σ that appears in the inequalities.
where n i=1 a i = n + 1 mod 2.
Example 3.6.Clearly a triangle ∆ 2 is just a classical 3-disk and the 3-circle inequalities come from Eq. ( 4): Note also that the diamond space is an example of a classical 4-disk and the CHSH inequalities correspond to the 4-circle inequalities.
Lemma 3.7.Consider a set of N -circle inequalities with a common coordinate z.Applying FM elimination to z the resulting inequalities are satisfied if the remaining coordinates τi each satisfies Proof.Consider two inequalities where z appears with opposite signs where n−1 i=1 a i = n + 1 mod 2 and n−1 i=1 b i = n mod 2. To perform FM elimination of z we add these inequalities together and observe that due to the conditions on a i and b j that at least one other variable will cancel after summing.Let N ⊂ {1, • • • , n − 1} index all variables that do not cancel.(Note that |N | ≤ n − 2.) The inequality after summing becomes or equivalently Using Eq. ( 3) we see that these inequalities are satisfied if −1 ≤ τi ≤ 1 for all i ∈ N : This condition gives us where each term is non-negative since |N | ≤ n − 2 and 0 ≤ p a i τ i ≤ 1.Thus the inequalities in Eq. ( 20) are satisfied.Lemma 3.8.Suppose we have a set of N -circle and M -circle inequalities that overlap on only a single variable z.FM elimination of z yields a set of (N + M − 2)-circle inequalities (plus trivial inequalities).
Proof.We begin by noting that if we sum up inequalities coming from the same set of circle inequalities then by Lemma 3.7 we get trivial inequalities.Let us consider the other case where z comes from two different sets; see Fig.
We have the following corollary of Lemma 3.8: Corollary 3.9.Suppose we have a set of N -circle and 3-circle inequalities that overlap on only a single variable z.FM elimination of z yields a set of (N + 1)-circle inequalities (plus trivial inequalities).See Fig. (6).
Next we apply these preliminary results to the classical N -disk scenario.Proposition 3.10.A distribution p ∈ sDist(∂D N ) extends to a distribution p on D N if and only if the N -circle inequalities (and the trivial inequalities −1 ≤ τi ≤ 1) are satisfied.
Proof.We consider a classical N -disk (e.g., see Fig. (4)) such that the edges on the boundary are labeled by τ i (i = 1, • • • , n) and those on the interior are denoted z j (j = 1, • • • , n − 3).For the first part of our proof, our strategy is to perform FM elimination successively on the interior edges z j beginning2 with z 1 and ending in z n−3 .Consider the two classical 3-disks bounded by {τ 1 , τ n , z 1 } and {z 1 , τ 2 , z 2 }, respectively.By Corollary 3.9, FM elimination of z1 yields a set of 4-circle inequalities (plus trivial inequalities) together with the remaining inequalities in which z1 does not appear.For each successive application of FM for the edges z j we can apply Corollary 3.9.After n − 3 iterations we are left with an n-circle inequality, as well as trivial inequalities.This proves one direction.On the other hand, FM elimination guarantees that we can find a set of {z i : i = 1, • • • , n − 3} such that we can reverse this process and extend from the boundary to the n-order disk.

Bouquet of classical N -disks
It is possible to extend Proposition 3.10 slightly by considering the union of N disks of varying size.
We call C N the N -circle space, or simply the circle space when N = 1; see Fig. (9b).A circle of length N on a simplicial set X is given by an injective simplicial set map C N → X.We will also write C N for the image of this map.Corollary 3.12.Let X be a 2-dimensional simplicial set obtained by gluing D N 1 , • • • , D N k along a common edge, and let ∂X be the 1-dimensional given by the boundary of X.Then p ∈ sDist(∂X) extends to a distribution p on X if and only if for every circle C M j ⊂ ∂X, where j = 1, • • • , k 2 , we have that p| C M j satisfies the corresponding M j -circle inequality.
Proof.For each D N i its initial and terminal triangles, which we denote by σ (i) 1 and σ (i) N i −2 , respectively, are distinguished via Eq.(14).A bouquet X of classical N -disks is then constructed by gluing each D N i along the single common edge τ , which we take to be either boundary edge of the initial triangle σ (i) 1 ; see Fig. (7a).For each disk D N i in X we perform FM elimination on all interior edges, beginning with the interior edge of the terminal triangle and concluding with the interior edge of the initial triangle; see Fig. (7b).The ordering of which disks FM elimination is applied to is arbitrary and does not affect the calculations.For each disk we stop before eliminating the edge τ ; see Fig. (7c).By Proposition 3.10 this will result in N -circle inequalities (plus trivial inequalities), each corresponding to a circle of length N i .Since τ appears in all k sets of circle inequalities, and it is the only edge in the intersection of these circles, then Lemma 3.8 applies.We will have k 2 circles C M j , where The extension result of Corollary 3.12 will be useful in proving Fine's theorem in Section 4.1 for various types of scenarios.In [12] it was shown that, by generalizing an argument due to Fine [2,3], that the CHSH inequalities are also necessary and sufficient for this more general scenario.
A topological realization for (2, m, 2, 2) Bell scenario is given in Fig. (8a).Note that this scenario is a special case of the flower scenario depicted in Fig. (1).In Theorem 4.9 we will generalize Fine's characterization of non-contextual distributions to to flower scenarios.The basic idea of our approach can be sketched in the case of (2, 3, 2, 2) Bell scenario; see Fig. (8b).In this case we use the bouquet of 3-disks depicted in Fig. (8c).By Corollary 3.12 a distribution on the boundary Fig. (8d) extends to the whole space if and only if the 6 = 4  2 sets of 4-circle inequalities are satisfied.

Distributions on the N -cycle scenario and beyond
The measurement space of the N -cycle scenario is a disk triangulated into N triangles as in Fig. (9a).Definition 4.1.Let CN denote the following simplicial set: • Identifying relations: Topologically CN is obtained from its boundary, which is circle consisting of N edges, by introducing a new point, the vertex in the middle, and coning off the boundary.This construction will be very useful in our analysis of simplicial distributions on 2-dimensional measurement spaces.Observe that CN is precisely the cone of C N .In later sections, we will study the vertices of the polytope of simplicial distributions on this scenario and describe the Bell inequalities bounding the non-contextual distributions.Note that C1 is a new scenario in the sense that it cannot be realized in the conventional picture of non-signaling distributions, such as in the language of sheaf theory [5].This is the smallest space on which a contextual simplicial distribution is defined.Lemma 4.2.Let X be a simplicial set.The map Proof.A deterministic distribution on ∆ 2 is given by an assignment (x, y, z) → (a, b, c) such that a+b+c = 0 mod 2. Therefore in C(X) once the edges (c, v) are assigned an outcome the remaining edges will be determined.Proof.Forward direction is proved in Lemma 4.3.For the converse, we will need the following simplicial sets: • W is obtained by gluing a triangle ∆ 2 to D N as in Fig. (10b).
• V is the simplicial set obtained by gluing CN and W along Z as in Fig. (10c): Let p be a simplicial distribution on CN such that p| C N satisfies the N -circle inequalities.By Proposition 3.10 we conclude that the restriction of p on the other two circles on Z also satisfies the circle inequalities.Therefore Corollary 3.12 implies that p| Z extends to a simplicial distribution q on W . Since p and q match on Z there is a simplicial distribution P on V such that P | CN = p and P | W = q.Now, consider the following decomposition given in Fig. (11): where L = ∂∆ 3 is the boundary of the tetrahedron, M = ∆ 2 a triangle.Let R denote the simplicial subset of R obtained by omitting the bottom triangles.Note that R is an (N − 1)-cycle scenario.
Let Q be the restriction of P on L∪ M R. Combining this result with Proposition 3.10 gives the following result which will be used in the generalization of Proposition 4.4 to the flower scenario.Taking N = 3 in Corollary 4.5 gives us a sufficient and necessary condition when a distribution on the boundary of a triangle can be extended to a distribution on the triangle.Thus we obtain a useful result that characterizes the image of the map f : sDist(X) → sDist(X (1) ) introduced in (7).(We remark that the following result still holds when the restriction that ∂σ i does not contain non-degenerate edges is removed in Proposition 2.15.)Corollary 4.6.Let X be a 2-dimensional simplicial set.A distribution q ∈ sDist(X (1) ) is in the image of the map f in ( 7) if and only if (q 0 d 0 σ , q 0 d 1 σ , q 0 d 2 σ ) satisfies the 3-circle inequality for all σ ∈ X 2 .
To generalize Proposition 4.4 to the flower scenario we need a stronger version of the Gluing lemma.
Proof.Follows by induction and Lemma 2.11.
The flower scenario is obtained by gluing lines at their end points.Let L N denote the simplicial set consisting of the generating 1-simplices τ 1 , • • • , τ N together with the identifying relations at their boundary, i.e., the two terminal points v and w; see Fig. (12a).We will call the cone of Theorem 4.9.Let C(X) denote the flower scenario where ) is non-contextual if and only if for every circle C N on X the restriction p| C N satisfies the N -circle inequalities.
Proof.Forward direction follows from Lemma 4.3.For the converse, we introduce the following simplicial sets: • Z ⊂ C(X) denotes the 1-dimensional simplicial set obtained by gluing two edges τ 1 and τ 2 to X as depicted in Fig. (12b).
applying the s 0 degeneracy map n-times: Collapsing an edge to a point can be represented by a simplicial set map that sends the generating simplex σ 01 to the degenerate simplex σ 00 .Now, applying the cone construction to this map we obtain a simplicial set map ) can be identified with a triangle whose generating simplex is given by (c, σ 01 ).A similar topological intuition works for C(∆ 0 ).It represents an edge whose generating simplex is (c, σ 0 ).From this we can work out the map Cπ as follows: The generating simplex (c, σ 01 ) is mapped to (c, s 0 σ 0 ) since π sends σ 01 to the degenerate simplex s 0 σ 0 .By the simplicial structure of the cone described in Definition 2.7 we have As we have seen in Section 2.2 the map Cπ between the cone spaces induces a map between the associated simplicial distributions . Let q denote the image of p, i.e., q = (Cπ) * (p).Then q will be determined by q (c,σ 01 ) , a distribution on Z 2 2 .It is given as follows; see Figure (14): where in the first line we use q = p • Cπ, in the second line the definition of Cπ, in the third line Eq.( 24), in the fourth line compatibility of p with the simplicial structure, and in the fifth line the definition of D R (s 1 ).We will refer to this distribution as a collapsed distribution on the triangle.Next we consider the general case.Let X be a 1-dimensional simplicial set and σ denote a non-degenerate 1-simplex such that We will write X/σ for the simplicial set obtained by collapsing3 this edge.More formally, X/σ consists of the same generating simplices as X except σ and the simplicial relations are inherited from X.We will write π : X → X/σ for the collapsing map as before.We also have Cπ : C(X) → C(X/σ) that collapses the triangle obtained as the cone of σ.In Fig. (15) we represent the collapsing map π : C 4 → C 3 between two circle scenarios.Lemma 5.1.For a collapsing map π : X → X/σ, the following properties hold.
1.The map is injective.Moreover, a distribution q ∈ sDist(C(X)) lies in the image of (Cπ) * if and only if q (c,σ) is a collapsed distribution.
1. p is contextual if and only if q is contextual.
2. p is strongly contextual if and only if q is strongly contextual.
3. p is a vertex if and only if q is a vertex.
4. p is deterministic distribution if and only if q is deterministic distribution.

Application to Bell inequalities
Consider the collapsing map π : X → X/σ and suppose that the Bell inequalities for the scenario C(X) are known.By part (1) of Theorem 5.2 a simplicial distribution p ∈ sDist(C(X/σ)) is noncontextual if and only if q = (Cπ) * (p) ∈ sDist(C(X)) is non-contextual.This is equivalent to the condition that q satisfies the Bell inequalities for the scenario C(X).From these Bell inequalities we can extract those for the collapsed scenario C(X/σ).
Let us illustrate how the collapsing technique can be applied to cycle scenarios.Let π : C 4 → C 3 denote the map that collapses one of the edges in the 4-circle space as in Fig. (15).By Proposition where each entry is a distribution on Z 2 .On the other hand, a simplicial distribution q on C4 is specified by a tuple (q (c,v 0 ) , q τ 00 , q (c,w 0 ) , q τ 10 , q (c,v 1 ) , q τ 11 , q (c,w 1 ) , q τ 01 ) Then the image of p under the map (Cπ) * gives us q = (p (c,v 0 ) , p τ 00 , p (c,w 0 ) , p τ 10 , p (c,u) , which constitute the non-trivial 3-circle inequalities.Now, we will apply this technique to find the Bell inequalities for the cone of the 1-dimensional space given in Fig. (16b).This space will be our collapsed space X/σ.The 1-dimensional simplicial set X is the complete bipartite graph K 3,3 given in Fig. (16a).We denote the edge from v i to w j by τ ij .Note that the measurement space C(X) represents the (3, 3, 2, 2) Bell scenario.It has three kinds of Bell inequalities: (1) trivial, (2) circle inequalities, and (3) Froissart inequalities [13].We are interested in the latter type.An example of Froissart inequalities is the following (see [21, Eq. ( 21)]): p 0 (c,v 0 ) + p 0 (c,w 0 ) − p 00 (c,τ 00 ) − p 00 (c,τ 01 ) − p 00 (c,τ 02 ) − p 00 (c,τ 10 ) − p 00 (c,τ 20 ) − p 00 (c,τ 11 ) + p 00 (c,τ 12 ) + p 00 (c,τ 21 ) ≥ −1 It will be convenient for us to convert this inequality to one that only contains distribution on edges.For this we will use Eq. ( 2).This substitution gives us the following inequality: We observe that the only edges that do not appear in this inequality are (c, v 2 ), (c, w 2 ), τ 22 .Applying the symmetries of X, more precisely the automorphism group of the graph K 3,3 , we can obtain 9 distinct such inequalities in which the edges (c, v i ), (c, w j ), τ ij do not appear where i, j ∈ {0, 1, 2}.For example, for i = 1, j = 2 we have Note that these 9 inequalities are in distinct orbits under the action of dDist(C(X)) since different edges appear in every one of them (see Example 2.24).We can find the number of the Froissart inequalities in every orbit.A deterministic distribution δ s fixes the inequality (28) if and only if (δ s τ ) 0 = 1 for every edge τ that appears in the inequality.In this case, δ s is the identity, i.e., (δ s σ ) 00 = 1 for every triangle σ in C(X).This implies that the size of the orbit of this inequality is equal to |dDist(C(X))| = 2 6 = 64.Same counting argument works for the rest of the 9 inequalities.Therefore there are 9 • 64 = 576 Bell-inequalities of this type.
Next, we apply our collapsing technique to generate a new Bell inequality, i.e., one that is not a circle inequality for the cone of the scenario given in Fig. (16b).We will use the following collapsing map π : X → X/σ where σ = τ 22 .For a given circle on X there is a corresponding circle inequality.Every such inequality will appear as a Bell inequality in the collapsed scenario X/σ if the corresponding circle does not contain the collapsed edge τ 22 .If the circle contains τ 22 the resulting Bell inequality will be a circle inequality of size one less as in Definition 3.5.Given a simplicial distribution p ∈ sDist(X/σ) the image q = (Cπ) * (p) satisfies q 0 τ 22 = 1 and q 0 (c,w 2 ) = q 0 (c,v 2 ) = p 0 (c,u) .
Substituting this in (29) we obtain the following Bell inequality of the scenario X/σ: This inequality is a new Bell inequality, that is, it is not a circle inequality, and it belongs to a scenario that is not a Bell scenario.The latter observation implies that going beyond Bell scenarios can produce simpler Bell inequalities that are not circle inequalities; see [22].
Remark 5.5.Let X be a 1-dimensional simplicial set.Consider a Bell inequality for the cone scenario C(X) expressed in the edge coordinates (see Proposition 2.15).Then in the known examples the edges that appear with non-trivial coefficients in this Bell inequality form a loop (i.e., a circle with possible self intersections) on X.It is a curious question whether this observation holds for every 1-dimensional X.If so, it gives a topological restriction on the form of possible Bell inequalities hence a nice structural result in contextuality.
where v is the unique vertex.The cone space C(∨ n i=1 C 1 ) consists of n triangles given by (c, τ i ) where i = 1, • • • , n.We consider simplicial distributions on the cone of ∨ n i=1 C 1 .Such a distribution p is determined by the n distributions p (c,τ i ) on Z 2  2 .For convenience of notation we will write (p 1 , • • • , p n ) for this tuple of distribution, i.e., p i = p (c,τ i ) .
2. The contextual vertices are of the form (p 1 , • • • , p n ) where p i ∈ {p + , p − } for every 1 ≤ i ≤ n with at least one j satisfying p j = p − .
Our main result in this section relates a topological invariant, the fundamental group, to the number of contextual vertices.Given a 1-dimensional simplicial set X regarded as a graph consider a maximal tree T ⊂ X.The collapsing map can be applied to the edges in T to obtain a map π : X → X/T where X/T is of the form ∨ n X i=1 C 1 .The number n X is a topological invariant of the graph that gives the non-contractible circles.This number is independent of the chosen maximal tree.The fundamental group π 1 (X) is defined to be the free group on the set of n X edges in X 5.10.Let X be a connected 1-dimensional measurement space and n X denote the number of generators of the fundamental group π 1 (X).Then there exists at least (2 n X −1)2 |X 0 |−1 contextual vertices in sDist(C(X)).
Proof.For simplicity we will write n = n X .Let T be a maximal tree in X.We have the collapsing map π : X → X/T = ∨ n i=1 C 1 .According to Corollary 5.3 applying (Cπ) * to the contextual vertices described in Proposition 5.9 we obtain contextual vertices of sDist(C(X)).First, we will show that these vertices are in different orbits under the action of sDist(C(X)).Given two different contextual vertices (p 1 , . . ., p n ) and (q 1 , . . ., q n ) of sDist(C(∨ n X i=1 C 1 )), there exists 1 ≤ j ≤ n such that p j = p − and q j = p + .Fix one circle C in X such that the image of π| C contains only τ j as a non-degenerate 1-simplex (i.e, C collapsed to the circle generated by τ j ).We have which is the PR box of Example 5.6.On the other hand, one can see using the same technique of Example 5.6 that the restriction of (Cπ) * (q 1 , . . ., q n ) to C(C) is the non-contextual distribution e + , the identity element of G ± (C(X)) (see Definition 2.22).Therefore these two restrictions are not in the same orbits under the action of sDist(C(C)).We conclude that (Cπ) * (p 1 , . . ., p n ) and (Cπ) * (q 1 , . . ., q n ) are not in the same orbit under the action of sDist(C(X)).So far we have proved that there are 2 n −1 contextual vertices in sDist(C(X)) that lie in different orbits.Observe that every such vertex has p ± on every non-degenerate triangle of C(X), thus the only two outcome assignments that fix this vertex are those that restrict to δ 00 on every non-degenerate triangle or δ 11 on every nondegenerate triangle.We conclude that the orbit of such a vertex has |dDist(C(X))| where t (c,τ ) = (0, 0) and r (c,τ ) = (1, 0) for every τ ∈ X • 1 , and (e + •δ s ) σ = p ± for every non-degenerate 2-simplex σ of C(X).Therefore the coset e + •dDist(C(X)) is a subset of G ± (CX) and all its elements are non-contextual.Moreover, since sDist(C(X)) is a commutative monoid and e + • e + = e + , the subset e + • dDist(C(X)) is in fact a subgroup of G ± (CX).
To conclude that the remaining distributions are all contextual we will use Theorem 5.10.For a 1-dimensional (connected) simplicial set X, the Euler characteristic [23] is given by χ(X) = 1 − n X .Alternatively, it can be computed using the formula where we used the fact that the size of the coset is half the size of dDist(C(X)) since it is the orbit of e + .Therefore the contextual vertices detected in Theorem 5.10 are precisely those distribution in G ± (CX) − (e + • dDist(CX)).
Example 5.12.The Bell scenario (m, n, 2, 2) represented by the complete bipartite graph K m,n .This graph has m + n vertices and m • n edges.Therefore, by Theorem 5.10 we have at least 2 mn − 2 m+n−1 contextual vertices in the scenario (m, n, 2, 2).

Contextual vertices of the cycle scenario
We conclude this section by showing that PR boxes constitute all the contextual vertices in the cycle scenario using the collapsing method.Let us set X = CN .The polytope P X associated to the cycle scenario has dimension R 2N .This is a consequence of Proposition 2.15 since the number of non-degenerate edges of the N -cycle space is 2N .
Lemma 5.13.Let p be a simplicial distribution on the N -cycle scenario such that p x i is deterministic for some 1 ≤ i ≤ N .Then p is non-contextual.
Proof.Assume that p x i = δ a for some a.Let q be the deterministic distribution given by q σ j = δ 00 for all 1 ≤ j ≤ N distinct from i and q σ i = δ 11 .Since (q • p) x i = δ 0 and p is non-contextual if and only if q • p is non-contextual, we can assume that a = 0. Let X denote the quotient X obtained by collapsing x i .The resulting space X is a classical N -disk.Consider the map π * : sDist( X) → sDist(X) induced by the quotient map π : X → X.There exists a simplicial distribution p on the classical N -disk such that π * (p) = p.Since every distribution on the N -disk is non-contextual p is noncontextual.
Proposition 5.14.Contextual vertices of the polytope of simplicial distributions on the N -cycle scenario are given by the PR boxes.
Proof.By Lemma 5.13 for a vertex p there cannot be a deterministic edge on any of the x i 's.By Corollary 2.18 p is a vertex if and only if rank(p) = 2N .Therefore there are precisely N deterministic edges z 1 , • • • , z N , all of which lie on the boundary.The distribution p σ i , which is given by p ± , for each triangle has rank 2. Let (A, b) be as in Corollary 2.16 so that P X = P (A, b).
Let p be the distribution such that p| σ i = p ± for every σ i and let Z p index the inequalities tight at p.There are 2N such tight inequalities since there are N non-degenerate simplices σ i and each corresponding distribution p σ i has two zeros; see Fig.In the former case we have p 0 x i = 1 − p 0 x i , which implies that p 0 x i = 1/2.Hence p σ i 's are all given by p ± .The condition that c = 1 implies that the number of σ i 's with p σ i = p − is odd.Proof.A PR box p corresponds to a non-degenerate vertex, meaning that the number 2N of tight inequalities is precisely the dimension of the polytope.One property of non-degenerate vertices is that, if Z p indexes the tight inequalities of a PR box p, and Z is a set differing from Z p by one element, then p ′ = A[Z] −1 b is also a vertex so long as it satisfies the remaining inequalities.In this case p and p ′ are neighbors.A neighbor is obtained by replacing a tight inequality with another, which amounts to replacing one zero with another.Doing so will make one of x i 's a deterministic edge.Lemma 5.13 implies that p ′ , if it is a vertex of P X , is non-contextual, thus a deterministic distribution.

Conclusion
In this paper, we demonstrate novel techniques from the theory of simplicial distributions introduced in [7].We present topological proofs for the sufficiency of the circle inequalities for the non-contextuality of distributions on the cycle scenario.This proof extends the topological proof of the CHSH scenario in [7].We go beyond the cycle scenarios and study the flower scenario depicted in Fig. (1) that generalizes the bipartite Bell scenarios consisting of 2 measurements for Alice and m measurements for Bob.Our main insight in the proof is the topological interpretation of Fourier-Motzkin elimination and the gluing and extension methods of distributions on spaces.We also explore two new features of scenarios available in the simplicial setting: (1) Collapsing measurement spaces to detect contextual vertices and (2) Applying the monoid structure of simplicial distributions to generate vertices.An appealing feature of the collapsing technique featured here is that previously unknown types of Bell inequalities can be discovered from those that are known; see Section 5.1.These Bell inequalities may have desirable properties, such as having quantum violations that are more robust to noise, which may be of both theoretical and practical interest.

Figure 2 :
Figure 2: (a) A triangle can be considered as the cone of an edge.The generating 2-simplex is given by (c, σ 01 ) whose faces are (c, σ 0 ), (c, σ 1 ) and σ 01 , where c = c 0 .(b) A simplicial distribution on the triangle.

Fig. ( 4 )
for an example of a classical 6-disk.

Remark 3 . 4 .Figure 5 :
Figure 5: (a) The classical 4-disk is the diamond scenario.(b) FM elimination is interpreted geometrically as deleting an edge from a topological space.

3. 2
Extending to the classical N -disk Definition 3.5.Let τ 1 , • • • , τ N denote the generating edges on the boundary of D N .We define the N -circle inequalities by (6).First note that there are 2 K−1 (K ≥ 1) inequalities in a set of K-circle inequalities.Let I ± M index the M -circle inequalities where z has a positive (or negative) coefficient and observe that |I ± M | = 2 M −2 .Similarly for I ± N .FM elimination proceeds by summing up inequalities indexed by (i, i ′ ) ∈ I + M × I − N and (j, j ′ ) ∈ I − M × I + N .This amounts to 2 × 2 (M −2)+(N −2) = 2 (N +M −2)−1 new inequalities, which is precisely the amount needed for a set of (N + M − 2)-circle inequalities.

Figure 6 :
Figure 6: FM elimination of an edge (black) common to an N -circle and M -circle in (a) yields an inequality for the N + M − 2-circle in (b).

Definition 3 . 11 .
Let C 1 denote the simplicial set with a single generating 1-simplex τ with the relation d 0 τ = d 1 τ.For N ≥ 2, let C N denote the 1-dimensional simplicial set consisting of the generating 1-simplices τ 1 , • • • , τ N together with the identifying relations

Figure 7 :
Figure 7: (a) A bouquet of classical N -disks is constructed by gluing each D N i along a common edge (purple) that is a boundary edge of its initial triangle.(b) For each disk we perform FM elimination beginning with the interior edge of the terminal triangle.(c) We continue until only the common edge (purple) remains.

Figure 9 :
Figure 9: The N -cycle scenario (N = 8) depicted in (a) is the cone of the N -circle scenario depicted in (b) consisting of the edges τ 1 , • • • , τ 8 on the boundary.

Figure 10 :
Figure 10: (a) Z is obtained from the N -circle by attaching two edges.(b) W is obtained from a classical N -disk by attaching a triangle.(c) V is obtained from W by attaching an N -cycle space.

Lemma 4 . 3 .
Let X be a simplicial set.Given a non-contextual distribution p ∈ sDist(C(X)), the restriction p| C N to an N -circle C N ⊂ X satisfies the N -circle inequalities.Proof.Let D N be a classical N -disc with C N as the boundary.Recall that we can think of CN as the cone of C N .Note that (C N ) 0 = (D N ) 0 , thus using Lemma 4.2 we obtain that the map dDist(C(D N ))) → dDist( CN ) induced by the inclusion C N →D N is an isomorphism.We have the commutative diagram D R (dDist(C(D N )) sDist(C(D N )) D R (dDist( CN )) sDist( CN ) p is non-contextual, thus by Corollary 2.10 p| CN is also non-contextual.Therefore by Diagram (22) the distribution p| CN can be extended to a distribution on C(D N ).In particular, p| C N extended to a distribution on D N .By Proposition 3.10 we obtain the result.Proposition 4.4.A distribution p ∈ sDist( CN ) is non-contextual if and only if p| C N satisfies the N -circle inequalities.

Figure 11 :
Figure 11: The space V partitioned into three simplicial subsets L, M and R.

Corollary 4 . 5 .
A distribution p on CN is non-contextual if and only if it extends to a distribution on CN ∪ C N D N .

Figure 12 :
Figure 12: (a) X is obtained by gluing lines at their end points.(b) Z comes with an additional piece consisting of two edges.(c) W is obtained by filling the circles in Z with classical disks.

Figure 14 :
Figure 14: Collapsed distribution on the triangle.

Corollary 5 . 3 . 2 . 5 . 4 .
A distribution p ∈ sDist(C(X/σ)) is a contextual vertex if and only if (Cπ) * (p) is a contextual vertex.Proof.This follows directly from parts (1) and (3) of Theorem 5.Remark The conclusions of Theorem 5.2 and Corollary 5.3 hold for more general kinds of collapsing maps obtained by collapsing a set of edges in sequence.

Figure 16 :
Figure 16: (a) The complete bipartite graph K 3,3 .(b) The graph obtained by collapsing the edge τ 22 to the vertex u.

Definition 5 . 7 .
A PR box on an N -cycle scenario is a simplicial distribution p ∈ sDist( CN ) such that p σ = p ± for σ ∈ {σ i : i = 1 • • • , N } with the further restriction that the number of p − 's is odd.It is clear from the definition that there are 2 N −1 PR boxes on the N -cycle scenario.All of them can be obtained from the one given in Example 5.6 by the action of dDist( CN ) in a way similar to the CHSH scenario discussed in Example 2.24.Therefore by Proposition 2.21 the PR boxes are contextual vertices in the cycle scenario.Next we describe a 1-dimensional simplicial set obtained by gluing n copies of C 1 at their vertex.More explicitly, this simplicial set, denoted by ∨ n i=1 C 1 , consists of the generating 1-simplices τ 1 , • • • , τ n with the identifying relations

0 ILet us define c = N i=1 c i mod 2 .
(18).Denoting A[Z p ] := A p , we order the columns ofA p by x 1 • • • , x N , z 1 , • • • , z N .Up to elementary row operations we have A p = E 0 Then rank(A p ) = N + rank(E).Multiplying each row of E by −1 if necessary we can write Then rank(E) = N if c = 1, otherwise rank(E) = N − 1.
Two vertices v, v ′ of a full-dimensional polytope P ⊂ R d are called neighbors if rank(A[Z v ∩ Z v ′ ]) = d − 1.Corollary 5.15.All neighbors of a PR box are deterministic distributions.
[4]ere N is the number of edges on the boundary, hence in this case N = 4.Using the edge coordinates of Proposition 2.15 a simplicial distribution p on the CHSH scenario can be described by the tuple (p x 0 , p τ 00 , p y 0 , p τ 10 , p x 1 , p τ 11 , p y 1 , p τ 01 ).It is well-known that p is non-contextual if and only if it satisfies the CHSH inequalities[4]: The simplicial distribution Q is non-contextual if and only if Q| L and Q| R are both non-contextual by (Gluing) Lemma 2.11.By [7, Proposition 4.12] every simplicial distribution on ∂∆ 3 is non-contextual.Therefore it suffices to have Q| R non-contextual to guarantee that Q is non-contextual.In fact, Q| R is the restriction of P | R on R, thus by Proposition 3.10 we conclude that Q satisfies the circle inequalities on the lower circle of R. By induction on N , we conclude that Q| R is non-contextual.Finally, by Corollary 2.10 this implies that p = Q| CN is non-contextual.