Finite 1-safe Petri nets, also called net systems, are natural models of asynchronous concurrency. Nielsen, Plotkin, and Winskel  proved that every net system unfolds into an event structure describing all possible executions of : the events of are all prime Mazurkiewicz traces on the set of transitions of , equipped with the causal dependency and conflict relations. Later results of Nielsen, Rozenberg, and Thiagarajan  show in fact that 1-safe Petri nets and event structures represent each other in a strong sense. An event structure [36, 51, 52] is a partially ordered set of the occurrences of actions, called events, together with a conflict relation. The partial order captures the causal dependency of events. The conflict relation models incompatibility of events so that two events that are in conflict cannot simultaneously occur in any state of the computation. Consequently, two events that are neither ordered nor in conflict may occur concurrently. The domain of an event structure consists of all computation states, called configurations. Each computation state is a subset of events subject to the constraints that no two conflicting events can occur together in the same computation and if an event occurred in a computation then all events on which it causally depends have occurred too. Therefore, the domain of an event structure is the set of all finite configurations ordered by inclusion. The future (or the principal filter) of a configuration is the set of all finite configurations containing it.
In a series of papers [42, 46, 47, 48], Thiagarajan formulated (alone or with co-authors) three important conjectures (1) about the local-to-global behavior of event structures (the nice labeling conjecture): any event structure of finite degree admits a finite nice labeling, (2) on the relationship between event structures and net systems: regular event structures are exactly the unfoldings of net systems and (3) about the decidability of the Monadic Second Order theory (MSO theory) of net systems: grid-free net systems are exactly the net systems with decidable MSO theory. The last two conjectures were motivated by the fact that in each case, one of the two implications holds and by evidences and important particular cases for which the converse implication also holds. For example, it was proven in [46, 47] that unfoldings of net systems are exactly the trace regular event structures, and thus the second conjecture asks whether a regular event structure is trace regular.
In the previous papers  and [14, 13] we provided counterexamples to the first two conjectures. In the current paper, we will provide a counterexample to the third conjecture about the decidability of the MSO theory of grid-free net systems. The three counterexamples are based on different ideas and techniques, however, they all use the bijections between domains of event structures, median graphs, and CAT(0) cube complexes. Median graphs is the most important class of graphs in metric graph theory and CAT(0) cube complexes play an essential role in geometric group theory and the topology of 3-manifolds. Even if the three conjectures turned out to be false, the work on them raised many important open questions and the current paper establishes a surprising bijection between 1-safe Petri nets (trace regular event structures) and finite special cube complexes. Notice that special cube complexes, introduced by Haglund and Wise [27, 28], played an essential role in the recent solution of the famous virtual Haken conjecture for hyperbolic 3-manifolds by Agol [1, 2].
2. On Thiagarajan’s conjectures
We continue with an informal description of Thiagarajan’s conjectures, of some related work on them, and of the results of this paper.
2.1. The nice labeling conjecture
The nice labeling conjecture was formulated by Rozoy and Thiagarajan in  and asserts that
Conjecture 1. Every event structure with finite degree admits a nice labeling with a finite number of labels.
A nice labeling is a labeling of events with the letters from some finite alphabet such that any two co-initial events (i.e., any two events which are concurrent or in minimal conflict) have different labels. The nice labelings of event structures arise when studying the equivalence of three different models of distributed computation: labeled event structures, net systems, and distributed monoids. The nice labeling conjecture can be viewed as a question about a local-to-global finite behavior of such models.
A counterexample to nice labeling conjecture was constructed in . It is based on the bijection between domains of event structures, pointed median graphs, and CAT(0) cube complexes and on the Burling’s construction  of 3-dimensional box hypergraphs with clique number 2 and arbitrarily large chromatic numbers. Assous, Bouchitté, Charretton, and Rozoy  proved that the event structures of degree 2 admit nice labelings with 2 labels and noticed that Dilworth’s theorem implies that the conflict-free event structures of degree have nice labelings with labels. They also showed that finding the least number of labels in a nice labeling of a finite event structure is NP-hard. Santocanale  proved that all event structures of degree 3 with tree-like partial orders have nice labelings with 3 labels. Chepoi and Hagen  proved that the nice labeling conjecture holds for event structures with 2-dimensional domains, i.e., for event structures not containing three pairwise concurrent events.
For CAT(0) cube complexes a question related to the nice labeling conjecture was independently formulated by F. Haglund, G. Niblo, M. Sageev, and the second author of this paper: is it true that the 1-skeleton of any CAT(0) cube complex of finite degree can be isometrically embedded into the Cartesian product of a finite number of trees? A negative answer to this question was obtained in , based on a modification of the counterexample from . However, in  it was shown that the answer is positive for 2-dimensional CAT(0) cube complexes. Haglund  proved that this embedding question has a positive answer for hyperbolic CAT(0) cube complexes. Modifying the argument of , we can also show that the nice labeling conjecture is true for event structures with hyperbolic domains.
2.2. The conjecture on regular event structures
To deal with net systems, Thiagarajan [46, 47] introduced the notions of regular event structure and trace regular event structure. The main difference is that the regularity of event structures is defined for unlabeled event structures while trace regularity is defined under the much stronger assumption of a given trace regular labeling. These definitions were motivated by the fact that the event structures arising from finite 1-safe Petri nets are regular: Thiagarajan  in fact proved that event structures of finite 1-safe Petri nets correspond to regular trace event structures. This lead Thiagarajan to conjecture (see also Conjecture 3.3 below) in [46, 47] that
Conjecture 2. Regular event structures and regular trace event structures are the same.
Equivalently, this can be reformulated in the following way: an event structure is isomorphic to the event structure unfolding of a net system if and only if is regular.
Nielsen and Thiagarajan  established this conjecture for all regular conflict-free event structures and Badouel, Darondeau, and Raoult  proved it for context-free event domains, i.e., for domains whose underlying graph is a context-free graph sensu Müller and Schupp . Morin  showed that any event structure admitting a regular nice labeling is trace regular.
In a recent paper , we presented a counterexample to Thiagarajan’s Conjecture 2 based on a geometric and combinatorial view on event structures. To deal with regular event structures, we showed in  how to construct regular event domains from CAT(0) cube complexes. By a result of Gromov , CAT(0) cube complexes are exactly the universal covers of nonpositively curved cube (NPC) complexes. Of particular importance for us are the CAT(0) cube complexes arising as universal covers of finite NPC complexes. We adapted the universal cover construction to directed NPC complexes and showed that every principal filter of the directed universal cover is the domain of an event structure. Furthermore, if the NPC complex is finite, then this event structure is regular. Motivated by this result, we called an event structure strongly regular if its domain is the principal filter of the directed universal cover of a finite directed NPC complex . Our counterexample to this Thiagarajan’s conjecture is a strongly regular event structure not admitting a finite regular nice labeling. It is derived from Wise’s [53, 54] nonpositively curved square complex obtained from a tile set with six tiles.
In view of this counterexample, one can ask the following two important questions:
Are the event structures arising as unfoldings of finite 1-safe Petri nets strongly regular?
Under which conditions a regular event structure is trace regular?
Haglund and Wise [27, 28] detected five types of pathologies which may occur in NPC complexes. They called the NPC complexes without such pathologies special. The main motivation for introducing and studying special cube complexes was the profound idea of Wise that the famous virtual Haken conjecture for hyperbolic 3-manifolds can be reduced to solving problems about special cube complexes. In a breakthrough result, Agol [1, 2] completed this program and solved the virtual Haken conjecture using the deep theory of special cube complexes developed by Haglund and Wise [27, 28]. The main ingredient in this proof is Agol’s theorem that finite NPC complexes whose universal covers are hyperbolic are virtually special (i.e., they admit finite covers which are special cube complexes).
In  we proved that Thiagarajan’s conjecture is true for event structures whose domains arise as principal filters of universal covers of finite special cube complexes. Using the result of Agol, we specified this result and showed that Thiagarajan’s conjecture is true for strongly regular event structures whose domains occur as principal filters of hyperbolic CAT(0) cube complexes that are universal covers of finite directed NPC complexes. Since context-free domains are hyperbolic, this result can be viewed in some sense as a partial generalization of the result of Badouel et al. .
In the current paper, we establish the converse to the previous result of : we prove that to any 1-safe Petri net one can associate a finite directed labeled special cube complex such that the domain of the event structure (obtained as the unfolding of ) is a principal filter of the universal cover of . This proves that the trace regular event structures are exactly the special strongly regular event structures and that the trace labeling is obtained via the covering map. This shows that all event structures arising as unfoldings of finite 1-safe Petri nets are strongly regular, answering in the positive Question 2.1. This also shows that specialness must be added to strong regularity to ensure a positive answer to Thiagarajan’s Conjecture 2. Therefore, the trace regular event structures can be characterized as the event structures whose domains arise from finite special cube complexes. This establishes a surprising bijection between 1-safe Petri nets (fundamental objects in concurrency) and special cube complexes (fundamental objects in geometric group theory).
2.3. The conjecture on decidability of MSO logic of trace regular event structures
Thiagarajan and Yang  defined the monadic second order (MSO) theory of an event structure unfolding of a net system as the MSO theory of the relational structure (see Subsection 3.5 for definitions). This immediately leads to the following fundamental question:
When is decidable?
It turns out that the MSO theory of trace event structures is not always decidable:  presented such an example suggested by I. Walukiewicz. To circumvent this example, Thiagarajan and Yang formulated the notion of a grid event structure and they showed that the MSO theory of event structures containing grids is undecidable. This leads Thiagarajan to conjecture in  that (see also Conjecture 3.4 below):
Conjecture 3. The theory of a trace regular event structure is decidable if and only if is grid-free.
Notice also that preceding , Madhusudan  proved that the MSO theory of a trace event structure is decidable provided quantifications over sets are restricted to conflict-free subsets of events. In particular, this shows that the MSO theory of conflict-free trace regular event structures is decidable.
With the event structure one can associate two other MSO logics: the MSO logic of the directed graph of the domain of and the MSO logic of the undirected graph of the domain. This leads to the next question:
When (respectively, ) is decidable?
As we will prove in this paper, the decidability of each of ) and is equivalent to the fact that has finite treewidth and to the fact that is a context-free graph. This completely answers Question 2.4. We also prove that if is decidable, then is decidable (the converse is not true). We introduce the notion of hairing of an event structure , which is an event structure obtained from by adding an event for each configuration of the domain in a such a way that is in conflict with all events except those from (those events precede ). We prove that is decidable if and only if is decidable, i.e., if and only if has finite treewidth. All these results provide partial answers to Question 2.3.
Using these results, we construct a counterexample to Thiagarajan’s Conjecture 3. Namely, we construct an NPC square complex with one vertex, four edges, and three squares. We show that is virtually special and thus any principal filter of the universal cover of is the domain of a trace regular event structure . The hairing of is still trace regular. We show that the graphs and have infinite treewidth and bounded hyperbolicity. The first result implies that is undecidable while the second result shows that is grid-free.
3. Event structures and net systems
3.1. Event structures and their domains
An event structure is a triple , where
is a set of events,
is a partial order of causal dependency,
is a binary, irreflexive, symmetric relation of conflict,
is finite for any ,
and imply .
Two events are concurrent (notation ) if they are order-incomparable and they are not in conflict. The conflict between two elements and is said to be minimal (notation ) if there is no event such that either and or and . We say that is an immediate predecessor of (notation ) if and only if , and for every if , then or .
Given two event structures and , a map is an isomorphism if is a bijection such that iff and iff for every . If such an isomorphism exists, then and are said to be isomorphic; notation .
A configuration of an event structure is any finite subset of events which is conflict-free ( implies that are not in conflict) and downward-closed ( and implies that ) . Notice that is always a configuration and that and are configurations for any . The domain of an event structure is the set of all configurations of ordered by inclusion; is a (directed) edge of the Hasse diagram of the poset if and only if for an event . An event is said to be enabled by a configuration if and is a configuration. Denote by the set of all events enabled at the configuration . Two events are called co-initial if they are both enabled at some configuration . Note that if and are co-initial, then either or . It is easy to see that two events and are in minimal conflict if and only if and and are co-initial. The degree of an event structure is the least positive integer such that for any configuration of . We say that has finite degree if is finite. The future (or the principal filter) of a configuration is the set of all configurations containing : , i.e., is the principal filter of in the ordered set .
A labeled event structure is defined by an underlying event structure and a labeling that is a map from to some alphabet . Two labeled event structures and are isomorphic (notation ) if there exists an isomorphism between the underlying event structures and such that for every .
A labeling of an event structure defines naturally a labeling of the directed edges of the Hasse diagram of its domain that we also denote by . A labeling of an event structure is called a nice labeling if any two events that are co-initial have different labels . A nice labeling of can be reformulated as a labeling of the directed edges of the Hasse diagram of its domain ) subject to the following local conditions:
Determinism: the edges outgoing from the same vertex of have different labels;
Concurrency: the opposite edges of each square of are labeled with the same labels.
In the following, we use interchangeably the labeling of an event structure and the labeling of the edges of its domain.
3.2. Mazurkiewicz traces
A (Mazurkiewicz) trace alphabet is a pair , where is a finite non-empty alphabet set and is an irreflexive and symmetric relation called the independence relation. The relation is called the dependence relation. As usual, is the set of finite words with letters in . For , denotes the last letter of . The independence relation induces the equivalence relation , which is the reflexive and transitive closure of the binary relation : if and , then . The -equivalence class containing is called a (Mazurkiewicz) trace and will be denoted by . The trace is prime if is non-null and for every , . The partial ordering relation between traces is defined by (and is said to be a prefix of ) if there exist and such that is a prefix of .
3.3. Regular trace event structures
In this subsection, we recall the definitions of regular event structures, regular trace event structures, and regular nice labelings of event structures. We closely follow the definitions and notations of [46, 47, 38]. Let be an event structure. Let be a configuration of . Set . The event structure rooted at is defined to be the triple , where , is restricted to , and is restricted to . It can be easily seen that the domain of the event structure is isomorphic to the principal filter of in such that any configuration of corresponds to the configuration of .
For an event structure , define the equivalence relation on its configurations in the following way: for two configurations and set if and only if . The index of an event structure is the number of equivalence classes of , i.e., the number of isomorphism types of futures of configurations of . The event structure is regular [46, 47, 38] if has finite index and finite degree.
Now, let be a labeled event structure. For any configuration of , if we restrict to , then we obtain a labeled event structure denoted by . Analogously, define the equivalence relation on its configurations by setting if and only if . The index of is the number of equivalence classes of . We say that an event structure admits a regular nice labeling if there exists a nice labeling of with a finite alphabet such that has finite index.
We continue by recalling the definition of regular trace event structures from [46, 47]. For a trace alphabet an -labeled event structure is a labeled event structure , where is an event structure and is a labeling function which satisfies the following conditions:
if or , then ,
if , then or or .
We call a trace labeling of with the trace alphabet . The conditions (LES2) and (LES3) on the labeling function ensures that the concurrency relation of respects the independence relation of . In particular, since is irreflexive, from (LES3) it follows that any two concurrent events are labeled differently. Since by (LES1) two events in minimal conflict are also labeled differently, this implies that is a finite nice labeling of .
An -labeled event structure is regular if has finite index. Finally, an event structure is called a regular trace event structure [46, 47] if there exists a trace alphabet and a regular -labeled event structure such that is isomorphic to the underlying event structure of . From the definition immediately follows that every regular trace event structure is also a regular event structure.
3.4. Net systems and their event structure unfoldings
In the following presentation of finite 1-safe Petri nets and their unfoldings to event structures, we closely follow the paper by Thiagarajan and Yang . A net system (or, equivalently, a finite 1-safe Petri net) is a quadruplet where and are disjoint finite sets of places and transitions (called also actions or events), is the flow relation, and is the initial marking. For , set and . A marking of is a subset of . The transition relation (or the firing rule) is defined by if , , and . The transition relation is extended to sequences of transitions as follows (this new relation is also denoted by ): (1) for any marking and (2) if for and for , then . is called a firing sequence at if there exists a marking such that . Denote by the set of firing sequences at . A marking is reachable if there exists a firing sequence such that .
Given a net system , there is a canonical way to associate a -labeled event structure with . The trace alphabet associated with is the pair , where iff . Observe that the trace alphabet is independent of the initial marking of . Given the trace alphabet , we call the traces of the form firing traces of . Denote by the set of all firing traces of and by the subset of consisting of prime firing traces.
In Figure 1, we present a net system with 12 transitions and 10 places . The initial marking is given by the places containing tokens in the figure.
The trace alphabet associated with the net system has 12 letters . The letter is dependent from the letters (because of the place and/or ), , and (because of ). The letter is dependent from the letters (because of the place ), (because of ), , and (because of ). For the remaining letters, the dependency relation is defined in a similar way.
Observe that the letters and are independent, but there is no firing trace containing and as consecutive letters.
Following , the event structure unfolding of is the event structure , where
is the set of prime firing traces ,
is , restricted to ,
Let . Then iff there does not exist a firing trace such that and ,
is given by .
The following result establishes the equivalence between unfoldings of net systems and regular trace event structures:
Theorem 3.2 ([47, Theorem 1]).
An event structure is a regular trace event structure if and only if there exists a net system such that and are isomorphic.
An event structure is isomorphic to the event structure arising from a finite 1-safe Petri net if and only if is regular.
3.5. The MSO theory of trace event structures
We start with the definition of monadic second-order logic (MSO-logic). Let be a universe and , where for be a relational structure. The MSO logic of has two types of variables: individual (or first-order) variables and set (or second-order) variables. The individual variables range over the elements of and are denoted by etc. The set variables range over subsets of and are denoted etc. MSO-formulas over the signature of are constructed from the atomic formulas , and (where , are individual variables and is a set variable) using the Boolean connectives , and quantifications over first order and second order variables. The notions of free variables and bound variables are defined as usual. A formula without free occurrences of variables is called an MSO-sentence. If is an MSO-formula such that at most the individual variables among and the set variables among occur freely in , and and , then means that evaluates to true in when evaluates to and evaluates to . The MSO theory of , denoted by , is the set of all MSO-sentences such that . The MSO theory of is said to be decidable if there exists an algorithm deciding for each MSO-sentence in , whether .
Let be a regular trace event structure, which is the event structure unfolding of a net system (by Theorem 3.2, any regular trace event structure admits such a representation). Thiagarajan and Yang  defined the MSO theory of as the MSO theory of the relational structure , where is the set of events, is the set of -labeled events for , and is the precedence relation. The MSO theory of a net system is the MSO theory of its event structure unfolding .
As shown in , the conflict relation , the concurrency relation , and the notion of a configuration of , as well as other connectives of propositional logic such as (implies) and (if and only if), universal quantification over individual and set variables (), the set inclusion relation (), can be defined as well. The conflict and concurrency relations and of are defined in  in the following way:
An interpretation assigns to every individual variable an event in and every set variable, a subset of . Then satisfies a formula under an interpretation , denoted by , if the following holds :
iff there exists and an interpretation such that where satisfies the conditions: , for every individual variable other than , and for every set variable .
iff there exists and an interpretation such that where satisfies: , for every individual variable , and for every set variable other than .
and are defined in the standard way.
will denote that is a model of the sentence .
It turns out that the MSO theory of trace event structures is not always decidable: Fig. 1 of  presented an example of such an event structure suggested by Igor Walukiewicz. To circumvent this example, Thiagarajan and Yang formulated the following notion.
The event structure is grid-free  if there does not exist three pairwise disjoint sets of satisfying the following conditions:
is an infinite set of events with .
is an infinite set of events with .
There exists an injective mapping satisfying: if then and . Furthermore, if then and of then .
The -labelled event structure is said to be grid-free if the unlabeled event structure is grid-free. The net system is grid-free if the event structure is grid-free. As noticed in , Walukiewicz’s net system is not grid-free. Thiagarajan and Yang  proved that if a net system is not grid-free, then the MSO theory is not decidable. Thiagarajan conjectured that the converse holds:
The theory of a net system is decidable iff is grid-free.
4. Domains, median graphs, and CAT(0) cube complexes
In this section, we recall the bijections between domains of event structures and median graphs/CAT(0) cube complexes established in  and , and between median graphs and 1-skeleta of CAT(0) cube complexes established in  and .
4.1. Median graphs
Let be a simple, connected, not necessarily finite graph. The distance between two vertices and is the length of a shortest -path, and the interval between and consists of all vertices on shortest –paths, that is, of all vertices (metrically) between and :
An induced subgraph of (or the corresponding vertex set) is called convex if it includes the interval of between any of its vertices. An induced subgraph of is called gated if for any vertex there exists a unique vertex such that for any (the vertex is called the gate of in ). Any gated subgraph is convex, bu the converse is not true for general graphs. A graph is isometrically embeddable into a graph if there exists a mapping such that for all vertices .
A graph is called median if the interval intersection is a singleton for each triplet of vertices. Median graphs are bipartite. Basic examples of median graphs are trees, hypercubes, rectangular grids, and Hasse diagrams of distributive lattices and of median semilattices . With any vertex of a median graph is associated a canonical partial order defined by setting if and only if is called the basepoint of . Since is bipartite, the Hasse diagram of the partial order is the graph in which any edge is directed from to if and only if the inequality holds. We call a pointed median graph. There is a close relationship between pointed median graphs and median semilattices. A median semilattice is a meet semilattice such that (i) for every , the principal ideal is a distributive lattice, and (ii) any three elements have a least upper bound in whenever each pair of them does.
Theorem 4.1 ().
The Hasse diagram of any median semilattice is a median graph. Conversely, every median graph defines a median semilattice with respect to any canonical order .
Median graphs can be obtained from hypercubes by amalgams and median graphs are themselves isometric subgraphs of hypercubes [8, 34]. The canonical isometric embedding of a median graph into a (smallest) hypercube can be determined by the so called Djoković-Winkler (“parallelism”) relation on the edges of [23, 50]. For median graphs, the equivalence relation can be defined as follows. First say that two edges and are in relation if they are opposite edges of a -cycle in . Then let be the reflexive and transitive closure of . Any equivalence class of constitutes a cutset of the median graph , which determines one factor of the canonical hypercube . The cutset (equivalence class) containing an edge defines a convex split of , where and (we call the complementary convex sets and halfspaces). Conversely, for every convex split of a median graph there exists at least one edge such that is the given split. We denote by the equivalence classes of the relation (in , they were called parallelism classes). For an equivalence class , we denote by the associated convex split. We say that separates the vertices and if or . The isometric embedding of into a hypercube is obtained by taking a basepoint , setting and for any other vertex , letting be all parallelism classes of which separate from .
From the definition it follows that any median graph satisfies the following quadrangle condition: for any four vertices with and there exists a common neighbor of and such that In fact, is the median of the triplet . Since this median is unique, the vertex in quadrangle condition is also unique.
We conclude this subsection with the following simple but useful local characterization of convex sets of median graphs (which holds for much more general classes of graphs):
Lemma 4.2 ().
Let be a connected subgraph of a median graph . Then is a convex subgraph if and only if is locally-convex, i.e., for any two vertices of having a common neighbor in .
We also recall that convex subgraphs and gated subgraphs of median graphs are the same:
Lemma 4.3 ().
A subgraph of a median graph is convex if and only if is gated.
4.2. Nonpositively curved cube complexes
A 0-cube is a single point. A 1-cube is an isometric copy of the segment and has a cell structure consisting of 0-cells and a single 1-cell. An -cube is an isometric copy of , and has the product structure, so that each closed cell of is obtained by restricting some of the coordinates to and some to . A cube complex is obtained from a collection of cubes of various dimensions by isometrically identifying certain subcubes. The dimension of a cube complex is the largest value of for which contains a -cube. A square complex is a cube complex of dimension 2. The 0-cubes and the 1-cubes of a cube complex are called vertices and edges of and define the graph , the -skeleton of . We denote the vertices of by and the edges of by . For , we denote by the -skeleton of , i.e., the cube complex consisting of all -dimensional cubes of , where . A square complex is a combinatorial 2-complex whose 2-cells are attached by closed combinatorial paths of length 4. Thus, one can consider each 2-cell as a square attached to the 1-skeleton of . All cube complexes occurring in this paper are simple  in the sense that two distinct squares cannot meet along two consecutive edges.
The star of a vertex of is the subcomplex spanned by all cubes containing . The link of a vertex is the simplicial complex with a -simplex for each -cube containing , with simplices attached according to the attachments of the corresponding cubes. More generally, the link of a -dimensional cube of is the simplicial complex with a -simplex for each -cube containing , with simplices attached according to the attachments of the corresponding cubes. Note that in the definition of the link, the simplices are added with multiplicity: if (or ) belongs to a cube in multiple ways, then contributes to the link with multiple (disjoint) simplices. For example, if is a 1-dimensional complex with only one 0-cube and only one 1-cube (a loop around ), then consists of two disjoint -simplices.
The link is said to be a flag (simplicial) complex if each -clique in spans an -simplex. A cube complex is flag if is a flag simplicial complex for every vertex . This flagness condition of can be restated as follows: whenever three -cubes of share a common -cube containing and pairwise share common -cubes, then they are contained in a –cube of . A cube complex is called simply connected if it is connected and if every continuous mapping of the 1-dimensional sphere into can be extended to a continuous mapping of the disk with boundary into . Note that is connected iff is connected, and is simply connected iff is simply connected. Equivalently, a cube complex is simply connected if is connected and every cycle of its -skeleton is null-homotopic, i.e., it can be contracted to a single point by elementary homotopies.
Given two cube complexes and , a covering (map) is a surjection mapping cubes to cubes and such that induces an isomorphism between and . When the -skeleton of does not contain loops or multiple edges, the condition on the links is equivalent to the following condition on the stars: is an isomorphism for every vertex in . The space is then called a covering space of . For any vertex of , any vertex of such that is called a lift of . It is well-known that if and are flag cube complexes, is a covering space of if and only if the -skeleton of is a covering space of . A universal cover of is a simply connected covering space; it always exists and it is unique up to isomorphism [29, Sections 1.3 and 4.1]. The universal cover of a complex will be denoted by . In particular, if is simply connected, then its universal cover is itself.
An important class of cube complexes studied in geometric group theory and combinatorics is the class of nonpositively curved and CAT(0) cube complexes. We continue by recalling the definition of CAT(0) spaces. A geodesic triangle in a geodesic metric space consists of three points in (the vertices of ) and a geodesic between each pair of vertices (the sides of ). A comparison triangle for is a triangle in the Euclidean plane such that for A geodesic metric space is defined to be a CAT(0) space  if all geodesic triangles of satisfy the comparison axiom of Cartan–Alexandrov–Toponogov: If is a point on the side of with vertices and and is the unique point on the line segment of the comparison triangle such that for then A geodesic metric space is nonpositively curved if it is locally CAT(0), i.e., any point has a neighborhood inside which the CAT(0) inequality holds. CAT(0) spaces can be characterized in several different natural ways and have many strong properties, see for example . In particular, a geodesic metric space is CAT(0) if and only if is simply connected and is nonpositively curved. Gromov  gave a beautiful combinatorial characterization of CAT(0) cube complexes, which can be also taken as their definition:
Theorem 4.4 ().
A cube complex endowed with the -metric is CAT(0) if and only if is simply connected and the links of all vertices of are flag complexes. If is a cube complex in which the links of all vertices are flag complexes, then the universal cover of is a CAT(0) cube complex.
In view of the second assertion of Theorem 4.4, the cube complexes in which the links of vertices are flag complexes are called nonpositively curved cube complexes or shortly NPC complexes. As a corollary of Gromov’s result, for any NPC complex , its universal cover is CAT(0).
A square complex is a -complex (vertical-horizontal complex) if the 1-cells (edges) of are partitioned into two sets and called vertical and horizontal edges respectively, and the edges in each square alternate between edges in and . Notice that if is a -complex, then satisfies the Gromov’s nonpositive curvature condition since no three squares may pairwise intersect on three edges with a common vertex, thus -complexes are particular NPC square complexes. A -complex is a complete square complex (CSC)  if any vertical edge and any horizontal edge incident to a common vertex belong to a common square of . By [54, Theorem 3.8], if is a complete square complex, then the universal cover of is isomorphic to the Cartesian product of two trees. By a plane in we will mean a convex subcomplex of isometric to tiled by the grid into unit squares.
We continue with the bijection between CAT(0) cube complexes and median graphs:
Theorem 4.6 ().
A graph is a median graph if and only if its cube complex is simply connected and satisfies the 3-cube condition: if three squares of pairwise intersect in an edge and all three intersect in a vertex, then they belong to a 3-cube.
A midcube of the -cube , with , is the isometric subspace obtained by restricting exactly one of the coordinates of to 0. Note that a midcube is a -cube. The midcubes and of are adjacent if they have a common face, and a hyperplane of is a subspace that is a maximal connected union of midcubes such that, if are midcubes, either and
are disjoint or they are adjacent. Equivalently, a hyperplaneis a maximal connected union of midcubes such that, for each cube , either or is a single midcube of . The carrier of a hyperplane of is the union of all cubes intersecting .
Theorem 4.7 ().
Each hyperplane of a CAT(0) cube complex is a CAT(0) cube complex of dimension at most and consists of exactly two components, called halfspaces.
A 1-cube (an edge) is dual to the hyperplane if the 0-cubes of lie in distinct halfspaces of , i.e., if the midpoint of is in a midcube contained in . The relation “dual to the same hyperplane” is an equivalence relation on the set of edges of ; denote this relation by and denote by the equivalence class consisting of 1-cubes dual to the hyperplane ( is precisely the parallelism relation on the edges of the median graph ).
The following results summarize the well known and many times rediscovered convexity properties of halfspaces and carriers of CAT(0) cube complexes.
If is a hyperplane of a CAT(0) cube complex , then the carrier of and the two halfspaces defined by restricted to the vertices of induce convex and thus gated subgraphs of the 1-skeleton of . Any convex subgraph of is the intersection of the halfspaces of containing .
Proposition 4.9 ().
For any set of pairwise intersecting hyperplanes of a CAT(0) cube complex , the carriers of the hyperplanes of intersect in a -cube of .
4.3. Domains versus median graphs/CAT(0) cube complexes
Theorems 2.2 and 2.3 of Barthélemy and Constantin  (this result was independently rediscovered by Ardilla et al.  in the language of CAT(0) cube complexes) establish the following bijection between event structures and pointed median graphs (in , event structures are called sites):
Theorem 4.10 ().
The (undirected) Hasse diagram of the domain of any event structure is a median graph. Conversely, for any median graph and any basepoint of , the pointed median graph is isomorphic to the Hasse diagram of the domain of an event structure.
In  we presented a new proof of Theorem 4.10. In the current paper we will only need the canonical construction of an event structure from a pointed median graph (or pointed CAT(0) cube complex), presented in  and briefly recalled here. Suppose that is an arbitrary but fixed basepoint of a median graph The events of the event structure are the hyperplanes of . Two hyperplanes and define concurrent events if and only if they cross. The hyperplanes and are in precedence relation if and only if or separates from . Finally, the events defined by and are in conflict if and only if and do not cross and neither separates the other from .