  We provide a counterexample to a conjecture by Thiagarajan (1996 and 2002)
that regular event structures correspond exactly to event structures obtained
as unfoldings of finite 1-safe Petri nets. The same counterexample is used to
disprove a closely related conjecture by Badouel, Darondeau, and Raoult (1999)
that domains of regular event structures with bounded $\natural$-cliques are
recognizable by finite trace automata. Event structures, trace automata, and
Petri nets are fundamental models in concurrency theory. There exist nice
interpretations of these structures as combinatorial and geometric objects.
Namely, from a graph theoretical point of view, the domains of prime event
structures correspond exactly to median graphs; from a geometric point of view,
these domains are in bijection with CAT(0) cube complexes.
  A necessary condition for both conjectures to be true is that domains of
regular event structures (with bounded $\natural$-cliques) admit a regular nice
labeling. To disprove these conjectures, we describe a regular event domain
(with bounded $\natural$-cliques) that does not admit a regular nice labeling.
Our counterexample is derived from an example by Wise (1996 and 2007) of a
nonpositively curved square complex whose universal cover is a CAT(0) square
complex containing a particular plane with an aperiodic tiling. We prove that
other counterexamples to Thiagarajan's conjecture arise from aperiodic 4-way
deterministic tile sets of Kari and Papasoglu (1999) and Lukkarila (2009).
  On the positive side, using breakthrough results by Agol (2013) and Haglund
and Wise (2008, 2012) from geometric group theory, we prove that Thiagarajan's
conjecture is true for regular event structures whose domains occur as
principal filters of hyperbolic CAT(0) cube complexes which are universal
covers of finite nonpositively curved cube complexes.
