Simplicial techniques for operator solutions of linear constraint systems

A linear constraint system is specified by linear equations over the group $\ZZ_d$ of integers modulo $d$. Their operator solutions play an important role in the study of quantum contextuality and non-local games. In this paper, we use the theory of simplicial sets to develop a framework for studying operator solutions of linear systems. Our approach refines the well-known group-theoretical approach based on solution groups by identifying these groups as algebraic invariants closely related to the fundamental group of a space. In this respect, our approach also makes a connection to the earlier homotopical approach based on cell complexes. Within our framework, we introduce a new class of linear systems that come from simplicial sets and show that any linear system can be reduced to one of that form. Then we specialize in linear systems that are associated with groups. We provide significant evidence for a conjecture stating that for odd $d$ every linear system admitting a solution in a group admits a solution in $\ZZ_d$.


Introduction
Linear (constraint) systems are a source of contextual distributions that arise in quantum theory [Mer93,Per91,Ark12] and play a prominent role in studying non-local games [CLS17,Slo20].A linear system over the group Z d of integers modulo d is specified by an equation Ax = b where A is an r × c-matrix and b is a column of size r both with entries in Z d .A solution of such a linear system in a group G consists of group elements where J G is a fixed central element of order d in the group.In addition to these product equations, a solution has to satisfy (1) d-torsion property, that is T d i for all i = 1, • • • , c, and (2) commutativity property: T i T j = T j T i whenever A ki and A kj both non-zero for some row index k.In the literature, it is common practice to take G as a unitary group acting on a finite-dimensional Hilbert space.In this case, the solutions are usually called operator solutions.There is a group-theoretic approach for studying operator solutions of linear systems centered around the properties of the solution group Γ(A, b); see, for example, [CLS17].In this paper, we associate spaces to linear systems such that their algebraic invariants are closely related to the solution group.Our methods connect both to the solution group via a construction akin to the fundamental group of a space, and the homotopical methods of [OR20] based on cell complexes.
We use simpicial sets [GJ99] as combinatorial models of spaces.Simplicial sets are fundamental objects of modern homotopy theory.They are more expressive than their close relatives simplicial complexes.One can associate a simplicial complex Σ to a matrix A specifying a linear system: The vertices of Σ are given by v 1 , • • • , v c and maximal simplices by σ 1 , • • • , σ r where each σ i consists of vertices v j such that A ij = 0.Each row of A can be regarded as a function A i : Σ 0 → Z d on the vertex set.A simplicial set consists of a set of n-simplices for each n ≥ 0 together with the simplicial relations describing how simplices of various dimensions are glued.Our simplicial realizations are motivated by a well-known construction in algebraic topology.The nerve space N G of a group consists of n-tuples of group elements as its n-simplices.Given a matrix A with the associated simplicial complex Σ we construct a simplicial set, denoted by N (Z d , Σ), whose set of n-simplices are given by tuples (s 1 , s 2 , • • • , s n ) of functions s i : Σ 0 → Z d such that the union of the supports supp(s i ) is a simplex of Σ.The rows A i can be regarded as 1-simplices of this simplicial set.Another construction we need is the simplicial set N (Z d , G), which we refer to as the d-torsion commutative nerve of G, consisting of n-simplices given by tuples of pairwise commuting d-torsion group elements.Closely related versions of the nerve construction are first introduced in [ACTG12], and their homotopy theory has been studied recently; see, for example, [Oka18,ACGV20,Oka21].
Proposition 2.11.There is a bijective correspondence between solutions of (A, b) in a group G and the simplicial set maps f making the following diagram commute The maps that appear in this diagram are described in Section 2.1.Briefly, α, β and ι correspond to A i 's, b i 's, and the central element J G in a way that the commutativity of the diagram coincides with the notion of a solution in G introduced above.The cofiber of the α map, which we denote by N (Z d , Σ), together with a cohomology class γ b serves as the simplicial realization of the linear system (A, b).The cohomology class depends on the column vector b and is defined using the cohomology long exact sequence associated to the cofiber sequence.There is a converse to this procedure which associates a linear system (A X , b γ ) to a pair (X, γ) consisting of a simplicial set X and a cohomology class [γ] ∈ H 2 (X), where the coefficients of the cohomology group are in Z d .Applying this procedure to X = N (Z d , Σ) and [γ] = γ b produces a linear system that is closely related to the original linear system (A, b).The solution groups of these two linear systems turn out to be isomorphic thus their solution sets in a group G are in bijective correspondence (Proposition 2.18).
Motivated by this result, we focus on linear systems (A X , b γ ) that come from simplicial sets.We use the theory of twisted products [May67].Given (X, γ) the twisted product is a simplicial set X γ which fits into a fibration sequence The set of n-simplices of X γ is given by the product N Z d × X, but its simplicial structure maps are twisted by γ.
Theorem 3.11.For a (connected) simplicial set X, there is a canonical isomorphism of groups The group π 1 (Z d , •) is a version of the fundamental group.Briefly, its generators are the 1-simplices (edges) of the simplicial set, and simplicial relations come from the 2-simplices together with additional relations imposing commutativity for the edges on the boundary and d-torsion condition for each generator.This algebraic invariant is first introduced in [OZ20].
We can associate a linear system to a pair (G, J G ) in a canonical way.Such linear systems are of particular interest in this paper.Our starting point is the central extension where Ḡ denotes the quotient group.This extension is classified by a cohomology class γ G in the second cohomology H 2 ( Ḡ) of the quotient group with coefficients in Z d .This cohomology class can be represented by a 2-cocycle constructed using a set-theoretic section φ : Ḡ → G of the quotient homomorphism.On the level of simplicial sets, the extension above gives rise to a fibration sequence classified by a cohomology class similar to γ G .The section φ can be used to construct a representing cocycle γ φ,d for this class.The linear system associated to (G, J G ) is the one associated to the pair ( N (Z d , G), γ φ,d ).Writing (A G , b φ ) for this linear system we have a group homomorphism We describe the kernel of this homomorphism using homotopical methods (Proposition 4.4).
When d > 1 is an odd integer, in the known cases a linear system admitting a solution in a group G admits a solution in Z d .We state this as a conjecture (Conjecture 3.15) and provide evidence when d is an odd prime.The classes of groups satisfying this conjecture are certain types of extraspecial p-groups (Theorem 4.10) and a class of groups introduced in [FOC22] (Theorem 4.12).Other interesting results we obtain using simplicial methods are as follows: • We show that if a linear system does not admit a solution in Z d then any simplicial distribution induced by a density operator is contextual (Proposition 2.15).The theory of simplicial distributions introduced in [OKI22] is a framework based on simplicial sets for studying contextuality.
• We provide four equivalent characterizations of solutions of linear systems based on group-theoretic and cohomological criteria (Corollary 3.14).
• We consider power maps ω m acting on N (Z d , G) by raising a tuple of group elements to the m-th power.Corollary 3.23 applies this map to prove that for odd d certain relations in the solution group simplify.This result appears as the main theorem of [QW20].
• We compute the solution group of the K 3,3 linear system using our simplicial approach and reproduce some of the key results of [Ark12].number FA9550-21-1-0002.The second author would like to thank the Institute for Quantum Computing for their hospitality during a visit in January 2023, and William Slofstra for fruitful discussions and providing the proof of Proposition 2.6.

Linear systems
In this section we will introduce linear systems and their simplicial realizations.Let d > 1 be an integer and Z d denote the additive group of integers modulo d.A linear system (A, b) over Z d is a set of linear equations Ax = b specified by a matrix A ∈ Z r d × Z c d and a column vector b ∈ Z c d .To a linear system we can associate the following data: Definition 2.1.Let G be a group with a central element J G of order d, i.e., J d G = 1.A solution of a linear system (A, b) in the group G is a function T : (Σ A ) 0 → G satisfying the following conditions: • for all 1 ≤ i ≤ r we have We will write Sol(A, b; G) for the set of solutions of a linear system (A, b) in the group G.
Solutions in Z d in this sense coincide with the ordinary solutions of the linear system in Z d .
For a set U we will write P (U ) for the power set, that is, the collection of subsets of U .We will write Z U d for the set of functions U → Z d .This set of functions has a group structure induced by Z d .Note that the rows of A when regarded as functions A i : Σ 0 → Z d give elements in the group Z Σ0 d .We will write A i for the subgroup generated by this function.
Example 2.2.Let A be a matrix such that the simplicial complex Σ A consists of a unique maximal simplex.That is, Σ A is given by the power set P (Σ 0 ).In other words, A ij = 0 for all 1 ≤ i ≤ r and 1 ≤ j ≤ c.In this case a solution specified by a function for all vertices v, w.We can convert the linear system (A, b) into a row echelon form (A , b ) by row operations: where A contains no rows with all entries zero.Then there is a bijection between Sol(A, b; G) and Sol(A , b ; G).The latter set is non-empty if b 2 = 0. Thus when studying solutions of linear systems, it is a simplifying assumption to require that A i = A j for every i = j.
In this paper we will consider linear systems satisfying the following two conditions: 2. For two distinct rows A i and A j we have A i = A j .
These conditions simplify the description of simplicial realizations of linear systems given in Section 2.1.The last property is motivated by Example 2.2.The first property is satisfied by the linear systems of interest, mainly those that come from simplicial sets introduced in Section 2.3.Later in Proposition 2.18, we will show that the solution group of any linear system can be described as the solution group of a linear system satisfying this property.
Definition 2.3.The solution group Γ(A, b) of a linear system (A, b) is the finitely presented group generated by e v , where v ∈ Σ 0 , and J subject to the following relations: • d-torsion relations: • product relations: for all σ i we have Let Grp denote the category of groups.We will write Grp(G, H) for the set of group homomorphisms.We introduce a category by restricting the morphisms in the category of groups which will be useful in describing solutions of linear systems.Let Grp J denote the following category: We will write Grp J (G, H) for the set of morphisms in this category.
Proposition 2.4.For a linear system (A, b) the following properties hold.
(2) The set Sol(A, b; G) of solutions is non-empty for some G if and only if J ∈ Γ(A, b) has order d.
Proof.A solution T : Σ 0 → G can be used to define a group homomorphism θ T : Γ(A, b) → G by sending e v → T (v) and J → J G .Conversely, given a group homomorphism in Grp J (Γ(A, b), G), restricting to the generators specifies a solution.This proves part (1).
For the second part, assume that the solution set is non-empty for some G. Then the group homomorphism associated to the solution implies that J has order d since the element θ T (J) = J G has order d.Conversely, if the order of J is d then Solutions in the unitary group U (C m ), where m ≥ 1, are of particular importance in the study of linear systems.When m ≥ 2 such solutions are usually referred to as operator solutions, and when m = 1 they are called classical solutions.Next, we will show that instead of studying solutions in unitary groups, we can focus on finite groups.Proof.For a finite group G, we can construct a unitary representation of G by inducing the 1-dimensional representation J − → U (C) obtained by sending J to ω1.This gives an injective group homomorphism φ : G → U (C m ) where m = |G/ J |. Then given a solution T : Σ 0 → G the composite φ • T : Σ 0 → U (C m ) is a solution in a unitary group.
The converse implication follows from the following fact: Any finitely generated subgroup of the general linear group GL(C m ) is residually finite [DK18,Theorem 7.116].Therefore the subgroup G ⊂ U (C m ) generated by {T (v j ) : j = 1, • • • , c} is residually finite.Then G is the inverse limit of a sequence of surjective group homomorphisms where each G i is finite.The element J ∈ G is represented by a tuple (J i ) i≥1 of central elements where J i ∈ G i .There exists N ≥ 1 such that J N has order d.Then using the projection π N : G → G N we obtain a solution in a finite group.
For a simplicial complex Σ we will write Σ for the dual complex consisting of the vertex set and maximal simplices σj = {σ i : where 1 ≤ j ≤ c.An important source of linear systems comes from the incidence matrices of graphs.Let K be a graph with vertex set K 0 and edge set K 1 , which we can think of as a simplicial complex.Let b : K 0 → Z d be a function.Then the incidence matrix A(K), with entries together with the function b specifies a linear system.Note that Σ A(K) coincides with the dual complex K.For more on these kinds of linear systems see [PRSS22].Each triangle is assigned a value b i (pink color corresponds to 1 value).The top edge is identified with the bottom edge, and the leftmost edge is identified with the rightmost edge.

Simplicial realizations
In Section 2 we have seen that a linear system can be described by a simplicial complex, a set of functions each supported on a maximal simplex and a function on the set of maximal simplices.In this section we will express this data in a different way using the language of simplicial sets.
A simplicial set consists of a sequence of sets X 1 , X 2 , • • • , X n together with • face maps d i : X n → X n−1 where 0 ≤ i ≤ n, and • degeneracy maps s j : X n → X n+1 where 0 ≤ j ≤ n satisfying the simplicial identities [GJ99,Fri12].Elements of X n are called n-simplices.A simplex σ ∈ X n in the image of s j : X n → X n+1 for some j is called degenerate; otherwise, it is called non-degenerate.A map f : X → Y between two simplicial sets consists of a sequence of functions f n : X n → Y n for every n ≥ 0 that respects the face and the degeneracy maps.A simplicial subset of X is a simplicial set Z together with a map i : Z → X of simplicial sets such that each i n is given by inclusion of sets Z n ⊂ X n .A simplicial set X is connected if for any two 0-simplices there is a sequence of 1-simplices connecting them.That is, for v, w ∈ X 0 there exists where i l ∈ {0, 1} and i l = i l for l = 1, • • • , k.In this paper we will be mostly concerned with connected simplicial sets.
Our examples of simplicial sets will follow a basic construction from algebraic topology known as the nerve construction.Let G be a group.The nerve space N G is the simplicial set whose set of n-simplices is G n and simplicial structure maps are given by For simplicial realizations of linear systems we will be interested in certain simplicial subsets of nerve spaces.Recall that for a set U we write Z U d for the set of functions U → Z d , and this set comes with a group structure inherited from Z d .We consider the nerve space N (Z U d ).Our simplicial realization will be a certain subspace of this nerve space.Let Σ be a simplicial complex.
Definition 2.8.We define a simplicial subset N (Z d , Σ) ⊂ N (Z Σ0 d ) whose n-simplices are given by For a linear system (A, b) with associated simplicial complex Σ, the functions A i , where 1 ≤ i ≤ r, can be regarded as 1-simplices of N (Z d , Σ).Thus N (Z d , Σ) can be thought of as a space that encodes the matrix A. Next we introduce another space that can be used for describing solutions of the linear system.Our construction is a modified version of the nerve construction introduced in [Oka21]; see also [ACTG12] for other versions.
Definition 2.9.The mod-d commutative nerve space is the simplicial subset N (Z d , G) ⊂ N (G) whose n-simplices are given by When the d-torsion condition is dropped the resulting simplicial set is called the commutative nerve space and denoted by N (Z, G), a space first introduced in [ACTG12].Its n-simplices are given by n-tuples of pairwise commuting group elements.
Lemma 2.10.A simplicial set map f : X → N G is determined by its restriction to 1-simplices, that is, by the function This result can be used to describe maps into a simplicial subspace of N G, for example, the mod-d commutative nerve space N (Z d , G).The nerve spaces introduced so far are partial monoids in the sense of [BG21].In fact, the theory introduced there provides a nice framework for studying the simplicial sets of interest in this paper.This approach will be pursued elsewhere.
We will need the following simplicial set maps: Proposition 2.11.There is a bijective correspondence between Sol(A, b; G) and the set of simplicial set maps f : Proof.We will use Lemma 2.10.A solution T : Σ 0 → G can be used to construct a simplicial set map v) .Conversely, from a simplicial set map we obtain a solution by setting

Simplicial distributions
Solutions of linear systems play an important role in the study of contextuality [OR20].In this section, we will define this notion using the theory of simplicial distributions introduced in [OKI22] and consider the simplicial distributions associated with solutions of linear systems.A distribution on a set U is defined to be a function p : U → R ≥0 with finite support such that u∈U p(u) = 1.We write D(U ) for the set of distributions on U .There is a function δ : U → D(U ) sending u to the delta distribution For a simplicial set Y the space of distributions on this simplicial set is defined to be the simplicial set D(Y ) with n-simplices given by D(Y n ) together with the face and the degeneracy maps Definition 2.12.A simplicial distribution is a simplicial set map p : X → D(Y ).We will write sDist(X, Y ) for the set of simplicial distributions.Given a simplicial set map s : X → Y we can define a simplicial distribution δ s : Simplicial distributions of the form δ s are called deterministic distributions.We will write dDist(X, Y ) for the set of deterministic distributions.
Given a simplicial distribution p : X → DY , we will write p σ for the distribution p n (σ) ∈ D(Y n ) where σ ∈ X n .We will denote by δ : Y → DY the simplicial set map defined by δ n (σ) = δ σ .There is a canonical map Θ : that sends d = s λ(s)δ s to the simplicial distribution Θ(d) defined as follows: where σ ∈ X n , θ ∈ Y n , and the summation runs over simplicial set maps r : X → Y such that r σ = θ.
Definition 2.13.A simplicial distribution p : X → DY is called contextual if it does not lie in the image of Θ; otherwise, it is called non-contextual.
A conventional way of formulating contextuality is to use presheaves of distributions [AB11, ABK + 15].Any presheaf of distributions can be realized as a simplicial distribution and the notion of contextuality given in Definition 2.13 specializes to the usual notion formulated in this language [KO22].
Contextual simplicial distributions arise from quantum measurements.Let H denote a finite dimensional complex Hilbert space.Let Proj(H) denote the set of projector operators acting on H, i.e., Hermitian operators that square to itself.A projective measurement is a function Π : U → Proj(H) with finite support such that u∈U Π(u) = 1 H .We write P H U for the set of projective measurements on U .Given a function f : U → V we define P H f : For a simplicial set Y the space of projective measurements is given by the simplicial set P H Y whose nsimplices are given by P H Y n together with the simplicial structure maps Given a density operator ρ, a positive operator of trace 1, we can define a simplicial set map ρ * : P H Y → DY by sending Π ∈ P H Y n to the distribution Checking that this is indeed a simplicial set map is straight-forward, and essentially follows from the linearity of the trace.
Proposition 2.14.The spectral decomposition theorem gives an isomorphism of simplicial sets sd : Proof.In degree n, sd is described as follows: Now, let G be a group and χ : G → U (H) be a group homomorphism, in other words, a unitary representation.We have a commutative diagram of simplicial sets Proposition 2.15.Let (A, b) be a linear system over Z d and Σ the associated simplicial complex.Let χ : G → U (H) be a group homomorphism.Assume that (A, b) admits a solution in G, but not in ) denote the simplicial set map corresponding to the solution (Proposition 2.11).
Then the simplicial distribution given by the composite is contextual for any density operator ρ.
Proof.In the contrary assume that p = f • p ρ is non-contextual, that is, there exists Consider the commutative diagram The left square is Diagram 2. Our goal is to show that s makes the left-top triangle in the left square commute, i.e., s • α = β.By Lemma 2.10 it suffices to verify commutativity in degree 1.Let 1 ∈ Z d denote the 1-simplex in the ith factor of the wedge product ∨ r N Z d .By the vertical map this element maps to the 1-simplex A i and under the horizontal map it maps to b i .By commutativity of the outer square we obtain that p Ai = δ bi .Then by Equation (3) we have This result explains the importance of operator solutions of linear systems.Those which admits solution in a group but not in Z d , i.e., solutions in the conventional sense, give rise to contextual simplicial distributions for any density operator (quantum state).Our approach is based on simplicial sets to make the connection to the theory of simplicial distributions in a more direct way.One can pass through presehaves of distributions to specialize the corresponding result in that language.That is, such linear systems also give rise to contextual presheaves of distributions [AB11].

Linear systems from simplicial sets
Our goal in this section is to associate a linear system to a given simplicial set.We will show that as far as the solution groups are concerned any linear system can be converted to one that comes from a simplicial set.
Next we introduce cohomology of simplicial sets.Throughout the paper we restrict to cohomology with coefficients in Z d .Given a simplicial set an n-cochain taking values in Z d is a function X n → Z d .We will write C n (X) for the set of n-cochains.There is a coboundary map for σ ∈ X n .The n-th cohomology group is defined by the quotient group Sometimes we will write H n (X, Z d ) to emphasize the coefficients.We will construct a linear system associated to a simplicial set together with a 2-cochain.
Definition 2.16.Given a simplicial set X and a 2-cochain γ : where the summation runs over 0 Our main examples in this paper will come from simplicial sets satisfying the property that |∂σ| = 3 for every 2-simplex of X.In this case the definition of A becomes: A solution in G for the linear system (A X , b γ ) consists of a function T : X 1 → G that satisfies • for every σ ∈ X 2 we have The simplicial set N (Z d , Σ) (Definition 2.8) is our main example.As we have seen each row A i can be regarded as an element in Z Σ0 d .The nerve space N A i is contained in N (Z d , Σ).The union of these simplicial subsets over 1 ≤ i ≤ r is the simplicial subset given by the wedge ∨ r i=1 N A i .Here we use the wedge notation to emphasize that for i = j the intersection of N A i ∩ N A j is given by ∆ 0 , the simplicial set with (∆ 0 ) n = { * } for n ≥ 0 representing a point.Definition 2.17.Let N (Z d , Σ) denote the simplicial set obtained by taking the quotient of N (Z d , Σ) by the subspace ∨ r i=1 N A i .More explicitly, the n-simplices are given by N Next we construct a cohomology class γ b .We will use the cohomology long exact sequence of the cofiber sequence where we identify A i with Z d .There is an associated long exact sequence in mod d cohomology The vector b ∈ Z r d can be identified with an element in Let γ b be the 2-cocycle on N (Z d , Σ) defined by where b is the 1-cochain on N (Z d , Σ) given by b(s) = ab i s = aA i 0 otherwise. (7) In Lemma A.1 we show that δ(b) = γ b .
Proposition 2.18.For a linear system (A, b), let X = N (Z d , Σ) and γ be such that [γ] = γ b .Then there is an isomorphism between the solution groups Proof.Proof is given in Section A.

Twisted products
Let X be a simplicial set and γ : X 2 → Z d be a 2-cocycle.We will assume that γ is normalized in the sense that γ(s i X 1 ) = 0 for i = 0, 1.
To this cocycle we can associate a fibration The total space X γ can be described explicitly using twisted products.
Definition 3.1.The twisted product X γ = N Z d × γ X is a simplicial set defined as follows: • the set of n-simplices is given by Z n d × X n , • for α ∈ Z n d and τ ∈ X n the simplicial structure maps are given by where 1 ≤ i ≤ n and 0 ≤ j ≤ n; and when i = 0 we have is the twisting function that depends on the cocycle γ; see Equation (34) in Section B.

Commutative fundamental group
Let sSet denote the category of simplicial sets.There is a well-known adjunction π 1 N between the nerve functor N : Grp → sSet that sends a group to the nerve space and the functor π 1 : sSet → Grp that sends a simplicial set X to the group defined as follows: We will refer to π 1 X as the algebraic fundamental group.Note that this group coincides with the fundamental group of the geometric realization for reduced simplicial sets, i.e., X 0 = { * }.For example, this is the case for N (Z d , G) and N (Z d , Σ). Lemma 3.2.For every x ∈ s 0 X 0 we have e x = 1.
Proof.Consider the 2-simplex σ = s 0 x.We have d i σ = x for all i = 0, 1, 2 by the simplicial relations.Therefore e x e x = e x , which implies that e x = 1.
By the adjunction there is a natural isomorphism sSet(X, N G) ∼ = Grp(π 1 X, G).
Recall that N (Z d , G) is a simplicial subset of N G, and there is a similar adjunction that can be used to provide an algebraic description of simplicial set maps.Next, we describe this adjunction.To this end, we introduce a version of the algebraic fundamental group.
Definition 3.3.The commutative (d-torsion algebraic) fundamental group of a simplicial set X is the group π 1 (Z d , X) generated by e x for x ∈ X 1 subject to the relations • [e diσ , e dj σ ] = 1 G for all σ ∈ X 2 and i, j = 0, 1, 2, • e d2σ e d0σ = e d1σ for all σ ∈ X 2 .
As a consequence of this definition there is a surjective group homomorphism π 1 X → π 1 (Z d , X) defined by the identity map on the set of generators.In particular, the quotient homomorphism π 1 (X) → π 1 (Z d , X) is an isomorphism.
Proof.Using σ = (g, h), for g, h ∈ G (d) such that [g, h] = 1, we obtain the relation e g e h = e gh .From which it follows that e d g = e g d = e 1 = 1 by Lemma 3.2 and e g e h = e gh = e hg = e h e g .
Proof.A simplicial set map f : X → N G factors through the inclusion N (Z d , G) ⊂ N G if and only if the adjoint map f : π 1 X → G factors through the quotient map π 1 X → π 1 (Z d , X).This follows from Lemma 3.4 and Lemma 3.5.
Also, the fundamental group of N (Z d , Σ) has a nice description.For a simplex σ ∈ Σ let us define the function δ σ : Σ → Z d by When σ = {v} we will abbreviate the notation as δ v and write e v for e δ v .
Proof.Note that a function s : Σ 0 → Z d can be written as s = v∈Σ0 k v δ v .Using simplices of the form σ = (kδ v , lδ w ), where v, w is such that {v, w} ∈ Σ, we can write Then each generator e δ v is d-torsion since e d δ v = e dδ v = e 0 = 1.Moreover, [e δ v , e δ w ] = 1 whenever {v, w} ∈ Σ.
Corollary 3.8.The set Sol(A, b; G) of solutions is in bijection with the set of group homomorphisms θ : By the adjunction of Proposition 3.6 and the computation in Lemma 3.7, the diagrams in Proposition 2.11 characterizing solutions are in bijective correspondence with diagrams of group homomorphisms of the form Note that for a group homomorphism θ : π 1 N (Z d , G) → G such that θ(e Ai ) = J bi G the images θ(e v ) will be d-torsion and elements in {θ(e v ) : v ∈ σ i } will pairwise commute.Using Equation (9) the condition

Fundamental group of twisted products
In this section we will describe the algebraic fundamental group of X γ .Using the explicit formula for η given in Equation (34) in Section B we have where σ ∈ X 2 and (a, b) ∈ Z 2 d .The fundamental group π 1 (X γ ) is generated by e a,x , where (a, x) ∈ Z d × X 1 , subject to the relations e a+b,d1σ = e a,d2σ e γ(σ)+b,d0σ where ((a, b), σ) ∈ Z 2 d × X 2 .Here are some useful relations: (1) For σ = (a, b; s 0 x), where x ∈ X 1 , e a+b,x = e a,s0(d1x) e b,x where γ(s 0 x) = 0 by the normalization condition.In particular, when b = 0 this gives e a,x = e a,s0(d1x) e 0,x On the other hand, setting x = s 0 v gives e a+b,s0v = e a,s0v e b,s0v , using which we obtain e d a,s0v = 1 and [e a,s0v , e b,s0v ] = 1.
See Figure (2) for a pictorial representation of this generator.
When X is connected we will write e a = e a,s0v since in the commutative fundamental group the generators e a,s0v with different v's are all identified.
Theorem 3.11.Let X be a connected simplicial set.The assignment e a,x → J a e x defines an isomorphism of groups Moreover, for two cocycles γ and γ such that Proof.We will denote the homomorphism in the statement by φ.We firstly prove that it is a well-defined homomorphism of groups, i.e., the relators in π 1 (Z d , X γ ) are taken to 1 by φ.

Consider the relation e d
a,x = 1.We have where we used the centrality of the element J and the fact that all generators in Γ(A X , b γ ) are of order d.
3. The last relation is that for a 2-simplex (a, b; σ) ∈ X γ the elements {e −1 a+b,d1σ , e a,d2σ , e γ(σ)+b,d0σ } pairwise commute.Note that image of every element from this set is the product of a power of J and an element e diσ for i = 0, 1, 2. However, the elements e d0σ , e d1σ and e d2σ pairwise commute in Γ(A X , b γ ) and J is central.Thus φ(e −1 a+b,d1σ ), φ(e a,d2σ ), φ(e γ(σ)+b,d0σ ) also pairwise commute.Now, we define ψ : Γ(A X , b γ ) → π 1 (Z d , X γ ) by ψ(J) = e 1 and ψ(e x ) = e x .Note that if ψ is a well-defined group homomorphism then ψ and φ are mutually inverse, proving that φ is an isomorphism.So we need to check again that ψ is taking the relators of Γ(A X , b γ ) to 1 in π 1 (Z d , X γ ).
4. Finally, we need to consider the product relation.Let σ be a 2-simplex in X.Then we need to show that ψ J γ(σ) e d0σ e d2σ e −1 d1σ = 1.
We conclude that ψ is a well-defined group homomorphism.Thus the result follows.
For the second statement, observe that Theorem B.1 implies that when the cohomology classes [γ] and [γ ] coincide there is an isomorphism of bundles.Therefore π 1 (Z d , X γ ) ∼ = π 1 (Z d , X γ ).The result follows from the first part of the Proposition.Known examples of linear systems over Z d for d an odd integer behave particularly nice.We state this as a conjecture and provide some evidence for it in Section 4.
Conjecture 3.15.Let d > 1 be an odd integer.Any linear system over Z d admitting a solution in G also admits a solution in Z d .
The implications of this conjecture for contextuality is important.Let χ : G → U (H) be a unitary representation.Proposition 2.15 implies that those linear system admitting a solution in some group G but not in Z d , produces contextual simplicial distributions for any density operator (see Definition 2.13).The conjecture states that those contextual simplicial distributions never arise when d is an odd prime.However, when d = 2 this is not the case.For example, the K 3,3 linear system studied in Example 4.7 admits a solution in D 8 * D 8 but not in Z 2 .This distinction between d = 2 and d odd has crucial implications in quantum computation [BVDB + 16, ROZF23].

Power maps
For a group G let us write G (d) to denote the set of d-torsion elements, i.e., those g ∈ G satisfying g d = 1 G .Definition 3.16.Let Grp (d) denote the category whose objects are groups and a morphism G → H is given by a set map θ : Let ι : Grp → Grp (d) denote the inclusion functor.The nerve space N (Z d , •) extends to a functor from Grp (d) to the category of simplicial sets.That is, a morphism θ : G → H of the category Grp (d) induces a map of simplicial sets θ : N (Z d , G) → N (Z d , H).This observation follows from Definition 2.9.There are special morphisms in this category which turn out to be very useful.Definition 3.17.For an integer m, let ω m : G → G denote the set map defined by g → g m .
In general, the map ω m is not a group homomorphism.For instance, ω −1 is a group homomorphism if and only if G is abelian.However, ω m is a morphism of the category Grp (d) .In this case the domain is restricted to the d-torsion part G (d) .This map induces a simplicial set map, denoted by ω m : N (Z d , G) → N (Z d , G), which in degree n is given as follows It is straight-forward to verify that this assignment respects the simplicial structure giving us a simplicial set map as claimed.
Lemma 3.18.We have Proof.Raising to the m-th power gives a commutative diagram of simplicial sets In cohomology the induced map Lemma 3.19.Let q i = j =i d j and q −1 i denote the inverse of q i in Z di .The following diagram of simplicial sets commutes Lemma 3.20.Mod d i reduction induces an injective map Proof.Consider the diagram in Lemma 3.19 and the associated spectral sequence for • ω qi and ri the induced map N (Z d , G) → N (Z di , G) between the quotient spaces.Combining ri 's gives an injective map r : Given f : X → N (Z d , G) we can compose with r and project onto the ith factor to obtain In particular, this result can be applied to a prime decomposition of d to reduce problems to the case where d is a prime power.Let d = k i=1 p αi i be a prime decomposition.Given a linear system (A, b) over Z d let us write (A (i) , b (i) ) for the linear system over Z p α i i obtained by mod p αi i reduction.
Corollary 3.21.Mod p αi i reduction reduction induces an injective map between the solution sets: Proof.Follows from Corollary 3.14 and Lemma 3.20.
Let us turn to the induced map on the algebraic fundamental group of N (Z d , G) (see Section 3.1).In general, the power map induces a map on the commutative fundamental group π 1 (Z d , X) of an arbitrary simplicial set: defined by e x → e m x .Let p be a positive integer dividing d and let q = d/p.We can identify π 1 (Z p , X) as a subgroup of π 1 (Z d , X) via the homomorphism ι q : π 1 (Z p , X) → π 1 (Z d , X) defined by e x → e q x .This homomorphism splits via the composition Now, we give an application of the ω −1 map to linear systems over Z d when d is odd.We will write w for a word in a finitely presented group, that is, a product of the form w = e x1 e x2 • • • e x l where each e xi is a generator.The word w op will denote the opposite word given by the product e x l • • • e x2 e x1 .Proposition 3.22.Let d > 1 be an odd integer.If the equation w = e a 1 w op holds in π 1 (Z d , X γ ) then w = w op .
Proof.The map ω −1 is an automorphism of π 1 (Z d , X γ ).Applying this automorphism to the equation, we obtain that w = e −a 1 w op , where x l , also holds.Together with the original equation we obtain (J −a w op )w = w(J a w op ) ⇒ J 2a = 1.
Since d is odd, this implies a = 0 mod d.
Combining this result with Lemma 3.4 we obtain the following result proved in [QW20, Theorem 5] using different methods.
Corollary 3.23.Let d > 1 be an odd integer.If the equation w = J a w op holds in π 1 N (Z d , G) then w = w op .
Proof.We apply Proposition 3.22 with

The K 3,3 linear system
In this section we will study the linear system introduced in Example 2.7.It will be useful to introduce chains on a simplicial set, a dual notion to cochains.Given a simplicial set X the set C n (X) of n-chains is the free Z d -module generated by the symbols [σ] where σ ∈ X n .The group C n (X) of n-chains can be identified with the group of Z d -module homomorphisms C n (X) → Z d .
Proof.Let Aut(K 3,3 ) denote the automorphism group of K 3,3 .It is well-known that this group is isomorphic to (Σ 3 × Σ 3 ) Z 2 [SM21].Aut(K 3,3 ) acts transitively on the set of pairs {x, y} that do not belong to a common σ.This action carries over to the generators in the algebraic fundamental group.Therefore it suffices to consider x, y that live on the boundary of Figure 3.We have e x e y e −1 x e −1 y = (e −1 z1 e t1 e γ(σ1) 1 )(e t2 e −1 z3 e γ(σ3) 1 )(e s2 e −1 z3 e γ(σ6) 1 ) −1 (e −1 z1 e s1 e γ(σ4) 1 )  Proof.When [γ] = 0 the result follows from Lemma 3.24.Let [γ] = 1.We can assume that the cocycle representing this class is as given in Figure (4).We rely on the fact that the isomorphism type of the commutative fundamental group only depends on the cohomology class; see Theorem 3.11.We have a diagram where K denotes the kernel of the homomorphism π 1 (Z 2 , X γ ) → D 8 * D 8 .Lemma 3.24 implies that π 1 (Z 2 , X) is abelian.From the presentation we see that this group is generated by e x1 , e x2 , e z1 , e z2 .On the other hand, it surjects onto Z 4 2 .Therefore K = 1.
According to Proposition 2.15 simplicial distributions in the case of [γ] = 1 will be contextual.The polytope of simplicial distributions for d = 2 is described in [OCI22].

Linear systems from groups
In this section we will study linear systems obtained from groups.We begin with a central extension as in (14).That is, G is a group with a central element J G of order d and Ḡ is the quotient group by J G .Let be a set-theoretic section of the quotient homomorphism π : G → Ḡ that preserves the identity element, i.e., φ(1 Ḡ) = 1 G .Given such a section we can construct a 2-cocycle γ φ : It is well-known that the class of the central extension is given by the cohomology class [γ φ ] ∈ H 2 ( Ḡ); see [Wei95,Chapter 6].Consider the map of fibrations The pull-back of the cochain γ φ , which we denote by γ φ,d , represents the cohomology class γ G,d .Explicitly, we have γ φ,d = i 2 • γ φ .
Definition 4.1.The linear system over Z d associated to (G, J G ) is the linear system (A X , b γ ) where We denote this linear system simply by (A G , b φ ).
The explicit cocycle γ φ,d can be used to give a twisted product description of N (Z d , G).
Proposition 4.2.Let X = N (Z d , G) and γ = γ φ,d .There is an isomorphism of simplicial sets Proof.In degree n this map is given by The simplicial structure of the twisted product is such that this assignment gives a well defined simplicial set map.

Homotopical methods
In this section we assume that G is generated by its d-torsion elements, i.e., G = G (d) .For details on the homotopical constructions in this section we refer to [Oka14].
The element e g,h maps to the product e g1 • • • e g n(g) e g −1 h e −1 Proof.The maximal tree T is the union of the paths p g for each g ∈ G.The generators of the fundamental group are given by the loops based at the identity element.For each (g, h) ∈ G such that g −1 h ∈ G (d) the generator is given by the loop e g,h : The relations come from the degenerate edges and the 2-simplices.The former are of the form 1 = e s0(g) = e 1,g and 1 = e s1(g) = e g,1 .

Finite p-groups
Next we focus on the case where d is given by a prime p.For a group H, we will write H ab and H el for the largest abelian and elementary abelian p-group quotients, respectively.
Proposition 4.5.Consider the fibration Proof.Consider the five term exact sequence of the Serre spectral sequence of the fibration: We have δ(1) = [γ] = 0. Therefore i * is the zero map.This is equivalent to the dual map i * : H 1 (N Z p ) → H 1 (X γ ) being zero.The result follows from the observation that for a simplicial set Y we have H 1 (Y ) = (π 1 Y ) el .
Proof.This follows from Proposition 4.5 and the following diagram Theorem 4.10.For an extraspecial p-group E the group Γ(Z , E) is described as follows: 1.For p = 2, Γ(Z 2 , E) ∼ = E if E = E + n and n ≥ 2, or E = E − n and n ≥ 3.

For an almost extraspecial
Proof.Let us begin with the case p = 2. Observe that the linear system associated to (E + 2 , J E ) can be identified with the odd parity ([γ] = 1) linear system associated to K 3,3 .More precisely, X γ ∼ = N (Z 2 , E + 2 ).Therefore Proposition 3.26 implies that the statement holds for E + 2 .To generalize this to n ≥ 2, the argument is similar.Consider the diagram of groups The key fact we need is the following: Given two pairs of p-torsion elements (g 1 , g 2 ) and (h 1 , h 2 ) of E satisfying [g 1 , g 2 ] = [h 1 , h 2 ] there exists an automorphism φ of E fixing the central element J E such that φ(g 1 ) = h 1 and φ(g 2 ) = h 2 .This is a well-known fact and follows from Witt's lemma [Asc86, Chapter 7].
Using the action of the automorphism group of E on Γ(Z 2 , E) and Lemma 3.24 we see that any pair of 2torsion elements satisfying [g 1 , g 2 ] = J E will satisfy [e g1 , e g2 ] = J.Then Γ(Z 2 , E) turns out to be isomorphic to Z 2n 2 .This implies that K(Z 2 , E) = 1.A similar argument works for E = E − n when n ≥ 3.For the almost extraspecial group, the simplicial set N (Z 2 , E 0 n ) can be identified with N (Z 2 , E + n ).This follows from the basic fact that there is a bijection between the partially ordered set (poset) of the elementary abelian subgroups of E 0 n and the poset of abelian subgroups of E + n ; see [Asc86,Chapter 8].The fundamental group of the latter simplicial set is computed in [Oka15].
For p > 2 note that N (Z p , E) coincides with N (Z, E) since every element of E is p-torsion.The fundamental group of N (Z, E) for n ≥ 2 is isomorphic to Ê as shown in [Oka15].
Corollary 4.11.If a linear system admits a solution in E + n for p > 2 then it admits a solution in Z p .
Proof.By Theorem 4.10 we have Γ(Z p , E) ∼ = Ê/ (J E , J −1 E ) .This group turns out to be isomorphic to E + n .Therefore in the Diagram (26) the extension class γ E is hit by the transgression map.Thus γ E,p = 0.

Higher odd prime torsion groups
In this section we give more examples in support of Conjecture 3.15.For details see [FOC22].Let H = CZ p denote the vector space with basis {b a : a ∈ Z p }.For m ≥ 1, we define a subgroup of the special unitary group SU(H): where T is the maximal torus given by the diagonal matrices in SU(H) and X is the permutation matrix defined by Xb a = b a+1 .We define Note that for m = 1 we obtain E + n .
An element of T can be described by a function ξ : Z p → U (1) such that q∈Zp ξ(q) = 1.The corresponding diagonal matrix will be denoted by D(ξ).The function ξ can be expressed as ξ(q) = e m j=1 2πifj (q)/p j where f j (q) = b∈Zp ν j,b q b and ν j,b ∈ Z p .We define a function where for M = D(ξ)X b we have Theorem 4.12.Let p be an odd prime.The function φ defined in Equation ( 27) is a morphism in Grp (p) that splits the inclusion E n (p) → E n (p m ).As a consequence the induced homomorphism Corollary 4.13.If a linear system admits a solution in E n (p m ) then it admits a solution in Z p .
See Definition 2.3 and 2.16.For v ∈ Σ 0 let us write δ v : Σ 0 → Z d for the delta function First we observe that Γ(A X , b γ ) is generated by J and e δ v where v ∈ Σ 0 , i.e., every generator of the form e s can be decomposed as a product of those.This can be proved by induction over the partial order.The claim holds for the minimal non-trivial functions, that is, the delta functions δ v .For an arbitrary s / ∈ A we can write s = r + r for some r, r < s.Then using Eq. ( 28) we have where α can be computed using the formula for γ(r, r ).By induction e r and e r is a product of J and e δ v 's.We will show that the following maps: defined by ψ(e δ v ) = e v and J → J in both cases, give well-defined group homomorphisms.These maps clearly respect the d-torsion and commutativity relations.It suffices to show that they also respect the product relations.This will prove the isomorphism as these maps are inverse of each other.We will say that s is reduced if there exists no r ∈ A such that r ≤ s.We will use the following relation Note that we regard s 1 , s 2 as functions with target N. First we will show that φ respects the product relations.To this end, given aA i = 0 we will show that the following relation holds in Γ(A X , b γ ): • Let aA i = 0 be a minimal element of A. Choose v ∈ supp(aA i ) and define s = aA i − δ v .The function s is reduced, thus Eq. (29) gives e aAi(w) δ w .
• For an arbitrary aA i , let bA j be a predecessor in A, i.e, if bA j ≤ r ≤ aA i then either r = aA i or r = bA j .Let s = aA i − bA j .By induction and using Eq. ( 29) and Eq.(30) we have This proves that φ is a group homomorphism.Let us turn to ψ.We will need the following counterpart of Eq. (30): for an arbitrary function s / ∈ A. This can be proved using Eq. ( 29) and induction on the partial order.It is clear that this holds for a reduced s.Otherwise, s = r + r where r ∈ A and r < s.Then by induction and using Eq.(29) and Eq.(32) we have: To finish the proof we will use Eq.(32) and Eq.(33).There are eight cases: • s 1 , s 2 , s 1 + s 2 / ∈ A: We have Note that we use here the fact that (s 1 , s 2 ) is a 2-simplex in N (Z d , G), thus supp(s 1 )∪supp(s 2 ) belongs to Σ. Thus there is a maximal simplex σ i ∈ Σ that contains supp(s 1 ), supp(s 2 ), and supp(s 1 + s 2 ).Thus by commutativity relation (Definition 2.3) all elements e v in the equation above commute.A similar observation applies to the remaining cases.
This proves that ψ is a group homomorphism.By definition φ is the inverse.Thus we obtain that the two groups are isomorphic.

B Classification of fibrations
Let X be a simplicial set and [γ] be a cohomology class in H 2 (X) represented by a normalized cocycle γ : X 2 → Z d (see Equation ( 8)).Using the cocycle we can define a simplicial group homomorphism f γ : GX → N Z d , where GX denotes Kan's loop space.First observe that a simplicial group homomorphism f : GX → N Z d is uniquely specified by a group homomorphism f 1 : F [X 2 − s 0 X 1 ] → Z d that satisfies for all τ ∈ X 3 − s 0 X 2 .Here in the second line we used the face maps of GX and in the third line we regard f 1 as a function (X 2 − s 0 X 1 ) → Z d .Therefore given a cocycle γ the map f γ is defined by In dimensions n ≥ 2 the map is defined as follows: Let e i : (GX) n → (GX) 1 denote the i-th spine operator.For τ ∈ X n+1 − s 0 X n we have Using the adjoint pair G W we obtain a simplicial set map g : X → W (N Z d ).In dimension n this map is given by g(τ ) = (f ([τ ]), We define X γ to be the pull-back of the universal bundle We can provide a description of X γ as a twisted cartesian product by pulling-back the canonical twisting function of the universal bundle, which is given by projection onto the first coordinate W (N Z d ) n → (N Z d ) n−1 .
For n = 2 the twisting function η : X 2 → Z d is given by and for n ≥ 3 the twisting function η : X n → Z n−1 d can be computed using g: The twisted cartesian product N Z d × η X is defined as follows: • the set of n-simplices are given by Z n d × X n , • the simplicial structure maps are given by d i (α, τ ) = (η(τ ) + d 0 (α), d 0 τ ) i = 0 (d i α, d i τ ) otherwise, and s j (α, τ ) = (s j α, s j τ ).

Corollary 2. 5 .
Assume that Γ(A, b) is abelian and J has order d.Then (A, b) admits a solution in Z d .
Proposition 2.6 ( [Slo]).For a linear system (A, b) we have Sol(A, b; U (C m )) = ∅ for some m ≥ 1 if and only if Sol(A, b; G) = ∅ for some finite group G.

Example 2. 7 .
Let K 3,3 denote the complete bipartite graph illustrated in Figure (1a).The dual complex Σ 3,3 = K3,3 is given by a torus triangulated as in Figure (1b).It is well known that K 3,3 admits a solution in Z 2 if and only if 6 i=1 b i = 0; see [Ark12, CS17, PRSS22].In Section 3.5 we will study this linear system using our simplicial techniques.

Figure 1 :
Figure 1: (a) The K 3,3 graph.Each vertex is assigned a value b i .(b) Dual of the graph representing a torus.Each triangle is assigned a value b i (pink color corresponds to 1 value).The top edge is identified with the bottom edge, and the leftmost edge is identified with the rightmost edge.

Lemma 3. 4 .
The fundamental group of X = N (Z d , G) has the following presentation e g , g ∈ G (d) : e g e h = e gh whenever [g, h] = 1 .

Figure 2 :
Figure 2: The generator e a,s0(d1x) corresponds to the loop a at the vertex d 1 x, the source of the edge x.The conjugate element e x e a,s0(d0x) e −1x is the loop obtained by traversing x, a, and x in the reverse direction.There two elements coincide in π 1 X γ .

Definition 4. 3 .
Let E(Z d , G) denote the simplicial set whose set of n-simplices is G × N (Z d , G) n and simplicial structure maps are given by Note that only the horizontal sequence of maps is exact.The composite of the right-hand vertical maps is zero.By commutativity of the top square the image of Z p → Γ(Z p , G) lands in the kernel of Γ(Z p , G) → Γ(Z p , G) el .Hence the class γ G,p classifying the fibration N Z p → N (Z p , G) → N (Z p , G) is nonzero.

ψ(e s1 e s2 e −
e s1(v)+s2(v) v J γ(s1,s2) Let us write d = d 1 • • • d k , where d i 's are positive integers such that gcd(d i , d j ) = 1 for all is again multiplication by m.Recall that the class γ G,d is obtained from the transgression d 2 : H 1 (N Z d ) → H 2 ( N (Z d , G)); see Equation (16).Comparing the spectral sequences of the fibrations in Diagram (18) we obtain the desired result.