
no parallel edges when it lifts at most once the canonical
inclusion \(\partial Y1Y1\) ,

the at most one square closing property when each of the four
canonical inclusions of
\(@R=3ex@C=3ex{&{++}&\\{-+}[ur]^{0+}&&\\&[ul]^{-0}{--}&}\) 

      
      

into
\(Y2@R=3ex@C=3ex{&{++}&\\{-+}[ur]^{0+}@{}[rr]|{00}&&[ul]_{+0}{+-}\\&[ul]^{-0}{--}[ur]_{0-}&}\) 
\(\begin{align*}Y2\setminus {{+-}}&Y2&Y2\setminus {{-+}}&Y2\\Y2\setminus {{++}}&Y2&Y2\setminus {{--}}&Y2\end{align*}is lifted at most once,\item the \emph {cube property} when each of four canonical inclusions of\begin{gather}@R=3ex@C=3ex{&{+++}&\\{++-}[ur]^{++0}@{}[r]|{+00}&{+-+}[u]|{+0+}@{}[r]|{00+}&{-++}[ul]_{0++}\\{+--}[u]^{+0-}[ur]|{+-0}@{}[rr]|{0-0}&&{--+}[ul]|{0-+}[u]_{-0+}\\&{---}[ul]^{0--}[ur]_{--0}&}\end{gather}\qquad \qquad @R=3ex@C=3ex{&{+++}&\\{++-}[ur]^{++0}@{}[rr]|{0+0}&&{-++}[ul]_{0++}\\{+--}[u]^{+0-}@{}[r]|{00-}&{-+-}[ul]|{0+-}[ur]|{-+0}@{}[r]|{-00}&{--+}[u]_{-0+}\\&{---}[ul]^{0--}[u]|{-0-}[ur]_{--0}&}\) 


            

into
\(\partial Y3@R=3ex@C=3ex{&&{+++}&&\\{++-}[urr]^{++0}&{+-+}[ur]|{+0+}&&&{-++}[ull]_{0++}\\{+--}[u]^{+0-}[ur]|{+-0}&&&{-+-}[ulll]|{0+-}[ur]|{-+0}&{--+}[ulll]|{0-+}[u]_{-0+}\\&&{---}[ull]^{0--}[ur]|{-0-}[urr]_{--0}&}\) 
\((we did not figure 2-cubes of \) 
Y3\( in order to keep the figure moreor less readable), \begin{align*}Y3\setminus {{-+-}}&\partial Y3&Y3\setminus {{+-+}}&\partial Y3\\Y3\setminus {{+++}}&\partial Y3&Y3\setminus {{---}}&\partial Y3\end{align*}is lifted at least once,\item the \emph {unique \) n\(-cube property} (\emph {at most one \) n\(-cubeproperty}) when it lifts uniquely (at most once) the inclusion\) YnYn\(.\)
When a precubical set satisfies the at most one square closing property, the
liftings of (REF ) and (REF ) are necessarily unique.
Notice that, in the cube property, we require lifting four inclusions of a
“half cube” into the hollow cube, but there are four more natural inclusions
that we could write (there are height in total, one corresponding to each
vertex of the cube). However, those are superfluous, because the cube has
non-trivial automorphisms. For instance, the lifting of the inclusion of
\(@R=3ex@C=3ex{&{+--}&\\{+-+}@{<-}[ur]^{+-0}@{}[r]|{+00}&{++-}@{<-}[u]|{+0-}@{}[r]|{00-}&{---}[ul]_{0--}\\{+++}@{<-}[u]^{+0+}@{<-}[ur]|{++0}@{}[rr]|{0+0}&&{-+-}[ul]|{0+-}@{<-}[u]_{-0-}\\&{-++}[ul]^{0++}@{<-}[ur]_{-+0}&}\) 
\(into \) 
Y3\( can be deduced from the lifting of the inclusioncorresponding to the left of~(\ref {eq:cube1}).\)
By definition of the condition of being geometric
(Definition REF ), we have the following.
A geometric precubical set \(C\)  lifts at most once the embedding
\(\partial YnYn\)  for any \(n\geqslant 1\) . In particular, it has no parallel
edges. Moreover, \(C\)  satisfies the at most one square filling property.
We introduce the following terminology, whose meaning should be explained in
Section REF .
A precubical set which

is geometric,

satisfies the cube property,

and satisfies the unique \(n\) -cube property for \(n\geqslant 3\) ,

is said to be non-positively curved (or  for short).
The precubical semantics of a program is non-positively curved.


We have already seen in Lemma REF  that the cubical semantics of
a non-degenerated program is geometric. We show the other properties.
Given a program \(p\) , it is easy to show by induction on \(p\)  that the
precubical set \({p}\)  is non-positively curved (essentially, one has to
check that the properties (2) and (3) are preserved by gluing along vertices
and taking tensor product). The precubical semantics is defined as
\({p}={p}\setminus X\)  where \(X\)  is the set of forbidden
vertices. Clearly, the unique \(n\) -cube property, with \(n\geqslant 3\) , is still
satisfied for \({p}\) . However, the cube property requires a little more
care. Write \(L\)  (\(R\) ) for the precubical set on the left (right)
of (REF ). Notice that the hollow 3-cube \(\partial Y3\)  can be
obtained by gluing \(L\)  and \(R\)  along their “border” (by identifying the
vertices and edges with the same names in both precubical sets). Suppose given
a morphism \(L\rightarrow {p}\) : we are going to show that it can be extended as a
morphism \(\partial Y3\rightarrow {p}\) . By abuse of notation, we identify \(L\)  with
its image in \({p}\)  and simply say that \({p}\)  “contains” \(L\) . Since
\({p}\)  satisfies the cube property, it also contains \(R\) . Thus, in
\({p}\) , \(L\)  can be completed as a hollow 3-cube unless the vertex
\({-+-}\)  is forbidden. We write \(A\) , \(B\)  and \(C\)  for the actions
respectively labeling the edges of the form \(0\epsilon \epsilon ^{\prime }\) ,
\(\epsilon 0\epsilon ^{\prime }\)  and \(\epsilon \epsilon ^{\prime }0\) , with
\(\epsilon ,\epsilon ^{\prime }\in {-,+}\) : \(L\)  and \(R\)  in \({p}\)  are respectively
labeled as
\(@R=3ex@C=3ex{&{+++}&\\{++-}[ur]^{C}@{}[r]|{}&{+-+}[u]|<<<{B}@{}[r]|{}&{-++}[ul]_{A}\\{+--}[u]^{B}[ur]|{C}@{}[rr]|{}&&{--+}[ul]|{A}[u]_{B}\\&{---}[ul]^{A}[ur]_{C}&}\) 
                  
\(Suppose that \) 
-+-\( is forbidden. Since none of the vertices in \) L\( isforbidden, there exists a resource~\) a\( such that either\) p(-+-)(a)=1\( and \) B\( is~\) a̭\(, or \) p(-+-)=-2\( and\) B\( is~\) ¶a\(. Suppose that we are in the first case (the other case issimilar), \) B=a̭\(. Notice that we have\) p(—)=0\(. Necessarily, we have \) A=¶a\( (otherwise\) p(++-)=p(-+-)=1\( and the vertex~\) ++-\( wouldbe forbidden) and \) C=¶a\( (otherwise \) -++\( would be forbidden). But inthis case, we have \) p(+-+)=-2\( and therefore \) +-+\( would beforbidden, contradicting the hypothesis that \) p\( contains~\) L\(. All othercases can be handled by similar reasoning.\)
The precubical semantics of the program \(AB\)  is
\(@R=3ex@C=3ex{&[dr]^A\\[ur]^[dr]_&&\\&[ur]_B}\) 
\(showing that the \) 
\(-cube property is not generally satisfied for cubicalsemantics of programs.\)
The link condition
The Gromov condition for characterizing cubical complexes, which is
recalled in Gromov-condition, is generally expressed in terms of a
“flagness” condition on the “link” of vertices in the complex. We extend
here the definition of link to precubical sets and show that a similar
characterization of can be formulated in terms of those links.
Given a precubical set \(C\) , the link of \(C\) , denoted \((C)\) , is
the (augmented) presimplicial set whose \(n\) -simplices are pairs \((u,y)\)  with
\(u\in {-,+}^n\)  and \(y\in C(n)\) . Given \(i\)  with \(i\in {n}\) , the \(i\) -th
simplicial face of such an \(n\) -simplex \((u,y)\)  is given by
\(\partial _i(u,y)(u^{\prime },\partial _i^{u_i}(y))\) 
where \(u^{\prime }\)  is the word \(u\)  with the \(i\) -th letter removed. Given a
vertex \(x\in C(0)\) , the link of \(x\) , denoted \((x)\) , is the presimplicial
subset of \((C)\)  whose simplices are those having \((\varepsilon ,x)\)  as
iterated 0-face.
Note that, by definition, the link of a vertex has only one 0-simplex, and as
such can be seen as a non-augmented presimplicial set, shifting dimensions by
-1. This will implicitly be used in the following in order to draw pictures.
Consider the precubical set \(C\)  on the left. The link of the vertex \(x\)  is
shown on the right:
\({z^{\prime }&y_1[l][r]@{}[dr]|\alpha &z\\y_3[u]&x[l]^a[u]_b[r]_c&y_2[u]}\qquad \qquad \qquad \qquad \qquad {a&b[r]^\alpha &c}\) 
The link of a vertex \(x\)  is constituted of the cubes having \(x\)  as iterated
face. Its simplices can be represented as follows.
Given \(u\in {-,+}^n\) , we write \(\Lambda ^u\)  for the precubical subset of
\(\partial Yn\)  whose cubes \(v\in {-,0,+}^n\)  are those having at least one
letter in common with \(u\)  (there exists \(i\) , with \(0\leqslant i<n\) , such that
\(v_i=u_i\) ).
The precubical set \(\Lambda ^u\)  can alternatively defined from \(\partial Yn\)  by
removing all cubes having the vertex \(u\)  as iterated face, where
\(u={u_0}\ldots {u_{n-1}}\)  with \(-=+\)  and \(+=-\) .
The precubical sets (REF ) are respectively \(\Lambda ^{-+}\) ,
\(\Lambda ^{+-}\) , \(\Lambda ^{--}\)  and \(\Lambda ^{++}\) . Those of (REF )
are respectively \(\Lambda ^{+-+}\)  and \(\Lambda ^{-+-}\) , and similarly for
(REF ), see also Remark REF .
By definition, given \(u\in {-,+}^n\) , there is a canonical inclusion
\(\Lambda ^u\partial Yn\)  and thus a canonical inclusion \(\Lambda ^uYn\) 
by post-composing with the canonical inclusion \(\partial YnYn\) . By
Remark REF , the cube property is precisely the lifting
property all possible such inclusions in the case \(n=3\) . In particular,
the two precubical sets of (REF ) are respectively \(\Lambda ^{+-+}\) 
and \(\Lambda ^{-+-}\) , and those of (REF ) are respectively
\(\Lambda ^{---}\)  and \(\Lambda ^{+++}\) .
Geometric precubical sets which are non-positively curved can be characterized
by a lifting condition on the links. We write \(Z:\rightarrow \hat{}\)  for the Yoneda
embedding of the presimplicial category into presimplicial sets (the notation
\(Y\)  is reserved for the Yoneda embedding \(Y:\rightarrow \hat{}\) ). Given \(n\in \) ,
the representable \(Zn\)  is called the standard \(n\) simplex. As in the
case of precubical sets, it can be explicitly described as the presimplicial set
whose \(k\) -simplices are the sets \({j_0,\ldots ,j_{k-1}}\subseteq {n}\) 
such that \(j_0<j_1<\ldots <j_{k-1}\)  and, given \(i\)  with \(0\leqslant i<k\)  the \(i\) -th
face of such a simplex is given by removing the element \(j_i\) . We thus have
\(Znk=\emptyset \)  for \(k>n\)  and \(Znn\)  is reduced to one element (the simplex
\({n}\) ). The standard hollow \(n\) -simplex \(\partial Zn\)  is the
presimplicial set obtained from \(Zn\)  by removing the top-dimensional simplex
in \(Zn\) , and there is a canonical inclusion \(\partial ZnZn\) .
A presimplicial \(S\in \hat{}\)  set is flag if, for every integer
\(n\geqslant 3\)  and morphism \(f:\partial Zn\rightarrow S\) , there exists a unique morphism
\(g:Zn\rightarrow S\)  making the diagram
\({\partial Zn@{_{(}->}[d][r]^f&S\\Zn@{.>}[ur]_g}\) 
commute, where the vertical arrow is the standard inclusion.
As previously, we sometimes say that a flag presimplicial set lifts uniquely the
inclusions \(\partial ZnZn\) . In Theorem REF , we
characterize precubical sets in terms of their links, and this will follow
from the following lemmas.
Suppose given a precubical set \(C\)  and a vertex \(x\in C(0)\) .

There is a bijection between presimplicial morphisms
\(\phi :Zn\rightarrow (x)\)  and pairs \((u,\psi )\)  with \(u\in {-,+}^n\)  and
\(\psi :Y(n)\rightarrow C\)  a precubical morphism such that \(\psi (u)=x\) .

Similarly, there is a bijection between presimplicial morphisms
\(\phi :\partial Zn\rightarrow (x)\)  and all precubical morphisms of the form
\(\psi :\Lambda ^u\rightarrow C\) , for some \(u\in {-,+}^n\) , such that \(\psi (u)=x\) .

The first bijection follows easily from the Yoneda lemma: morphisms
\(\phi :Zn\rightarrow (x)\)  are in bijection with \(n\) -simplices in \((x)\) , pairs \((u,y)\)  with \(u\in {-,+}^n\)  and \(y\in C(n)\)  such that
\(\partial ^u(y)=x\) , which are in turn in bijection with pairs \((u,\psi )\)  with
\(u\in {-,+}^n\)  and \(\psi :Y(n)\rightarrow C\)  such that \(\psi (u)=x\) . The second
bijection is a slight variant of the first one.
It can moreover be checked that these bijections are compatible with
restriction to the border, what we will generally leave implicit in the
following. This means that given a presimplicial morphism \(\phi :Zn\rightarrow (x)\) 
corresponding to a precubical morphism \(\psi :Y(n)\rightarrow C\)  by the first
bijection, the presimplicial morphism
\(\partial ZnZn\overset{\phi }{\rightarrow }(x)\)  corresponds the the precubical
morphism \(\partial Y(n)Y(n)\overset{\psi }{\rightarrow }C\)  by the second bijection.
The following lemma shows that precubical sets, always satisfy a
higher-dimensional generalization of the cube property.
Suppose given an precubical set \(C\) . Given \(n\in \)  with \(n\geqslant 3\)  and
\(u\in {-,+}^n\) , \(C\)  lifts uniquely the canonical embedding
\(\Lambda ^uYn\) .


Given \(u\in {-,+}^n\)  and \(k\)  with \(0\leqslant k\leqslant n\) , we write \(\Lambda ^u_k\) 
for the subcomplex of \(Yn\)  whose cubes are the strings \(v={-,0,+}^n\)  which
either have one letter in common with \(u\)  (\(v_i=u_i\)  for some
\(i\in {n}\) ) or have at most \(k\)  occurrences of the letter “0”. In
particular, we have \(\Lambda ^u_0=\Lambda ^u\) , \(\Lambda ^u_{n-1}=\partial Yn\)  and
\(\Lambda ^u_n=Yn\) . We show that \(C\)  lifts uniquely the embedding
\(\Lambda ^u\Lambda ^u_2\) , and the embeddings
\(\Lambda ^u_k\Lambda ^u_{k+1}\)  for \(2\leqslant k<n\) , from which we can
conclude. In order to illustrate our proof, we suppose that \(u=-^n\)  (other
cases can be obtained by symmetry) and that \(n=5\)  (but the arguments go
through similarly in the general case).
Case \(k=0\) . Suppose fixed a morphism \(\phi :\Lambda ^u\rightarrow C\) . Given any triple
of indices \(0\leqslant i_0<i_1<i_2<n\) , there is an embedding
\(\lambda _{i_0,i_1,i_2}:\Lambda ^{---}\Lambda ^u\) , sending a \(k\) -cube
\(v_0v_1v_2\)  to the \(k\) -cube
\(w{+^{i_0}}v_0{+^{(i_1-i_0-1)}}v_1{+^{(i_2-i_1-i_0-2)}}v_2{+^{(n-3-i_2)}}\) 
\(w\)  is obtained by inserting \(v_0\) , \(v_1\)  and \(v_2\)  at positions \(i_0\) ,
\(i_1\)  and \(i_2\)  respectively in the word constituted of \(n-3\)  letters “\(+\) ”:
\(w_i{\left\lbrace \begin{array}{ll}v_{i_p}&\text{if $i=i_p$ for some $p\in {0,1,2}$}\\+&\text{otherwise}\end{array}\right.}\) 
For instance, with \(n=5\) , we have \(\lambda _{1,2,4}(v_0v_1v_2)={+}v_0v_1{+}v_2\) 
and the image of \(\lambda _{1,2,4}\)  is shown on the left
\(@R=3ex@C=6ex{&{+-++-}[dl]_{+-++0}[dr]^{+0++-}&\\{+-+++}@{}[r]|{+-0+0}&{+--+-}[dl]|{+--+0}[u]|{+-0+-}[dr]|{0--}&{++++-}@{}[l]|{+00+-}\\{+--++}[u]^{+-0++}[dr]_{+0-++}@{}[rr]|{+0-+0}&&{++-+-}[dl]^{++-+0}[u]_{++0+-}\\&{++-++}&\\}\qquad @R=3ex@C=6ex{&{+-++-}[dl]_{+-++0}[dr]^{+0++-}&\\{+-+++}[dr]|{+0+++}@{}[rr]|{+0++0}&&{++++-}[dl]|{++++0}\\{+--++}[u]^{+-0++}[dr]_{+0-++}&{+++++}@{}[l]|{+00++}@{}[r]|{++0+0}&{+--}[dl]^{++-+0}[u]_{++0+-}\\&{++-++}[u]|{++0++}&}\) 
By the cube property, the morphism
\(\Lambda ^{---}\Lambda ^u\overset{\phi }{\rightarrow }C\)  extends to a morphism
\(\partial Y(n)\rightarrow C\)  (in the case of \(\lambda _{1,2,4}\) , \(C\)  also
contains the other half-cube shown on the right above) and into \(Y3\)  by the
unique 3-cube property. By the at most one square closing property (which holds by
Lemma REF ), the image of the image of the vertex \(+^{n+1}\) 
thus defined does not depend on the indices \(i_0,i_1,i_2\) . For instance, the
embeddings \(\lambda _{1,2,4}\)  and \(\lambda _{0,2,3}\)  can both be completed and
both define an image for the vertex \({+++++}\) : the one defined by
\(\lambda _{1,2,4}\)  is the same as the one defined by \(\lambda _{1,2,3}\)  (the
completions share the face \({+00++}\) ), which in turn is the same as the
one defined by \(\lambda _{0,2,3}\)  (the completions share the face
\({++00+}\) ). Similarly, the 1- and 2-cubes defined by multiples embeddings
do not depend on the choice of the embedding. Therefore, the precubical
complex \(C\)  lifts the embedding \(\Lambda ^u\Lambda ^u_2\) . Finally, by the
at most one square closing property again, the lifting is unique.
Suppose given \(k\)  with \(2\leqslant k<n\)  and a morphism \(\phi :\Lambda ^u_k\rightarrow C\) . For
any \((k+1)\) -uple of indices \(0\leqslant i_0<\ldots <i_k<n\) , there is an
embedding \(\lambda _{i_0,\ldots ,i_k}:\partial Y(k+1)\Lambda ^u_k\)  sending a
cube \(v\in {-,0,+}^{k+1}\)  to the cube \(w\in {-,0,+}^n\)  defined by
\(w_i{\left\lbrace \begin{array}{ll}v_{i_p}&\text{if $i=i_p$ for some $p\in {k+1}$}\\+&\text{otherwise}\end{array}\right.}\) 
By the unique \((k+1)\) -cube property, the morphism
\(\partial Y(k+1)\Lambda ^u_k\overset{\phi }{\rightarrow }C\)  extends uniquely to a
morphism \(Y(k+1)\rightarrow C\) . The precubical set \(\Lambda ^u_{k+1}\)  can be obtained
from \(\Lambda ^u_k\)  by properly adding \((k+1)\) -cubes: more precisely, one can
easily check that \(\Lambda ^u_{k+1}\)  is the colimit of the diagram of
precubical sets
\({\Lambda ^u_k&&Y(k+1)\\\partial Y(k+1)[u]^{\lambda _{I_0}}[urr]&\ldots &[ull]^<<<<<<<<{\lambda _{I_p}}[u]\partial Y(k+1)}\) 
where the \(I_j\)  range over subsets of cardinal \(k+1\)  of \([n]\) . Therefore, by
universal property of the colimit, the morphism \(\phi \)  extends uniquely to a
morphism \(\Lambda ^u_{k+1}\rightarrow C\) .
Notice that previous lemma also shows that the canonical embedding
\(\Lambda ^u\partial Yn\)  is lifted uniquely. When the precubical set is only
supposed to be geometric, the lifting does not generally exists, but the proof
can easily be adapted in order to show that it is necessarily unique (the
particular case with \(n=3\)  was already noticed in
Remark REF ):
Suppose given a geometric precubical set \(C\) . Given \(n\in \)  with \(n\geqslant 3\) 
and \(u\in {-,+}^n\) , \(C\)  lifts at most once the canonical embedding
\(\Lambda ^u\partial Yn\) .
A geometric precubical set \(C\)  is non-positively curved if and only if for
every vertex \(x\in C(0)\) , the presimplicial set \((x)\)  is flag.


We first show the left-to-right implication and suppose that \(C\)  is
non-positively curved.
We show that for every vertex \(x\)  of \(C\)  the presimplicial set \((x)\) 
lifts the inclusion \(\partial ZnZn\) .
Suppose fixed a presimplicial morphism \(\partial Zn\rightarrow (x)\) . By
Lemma REF , this amounts to fix a precubical morphism
\(\phi :\Lambda ^u\rightarrow C\) , for some \(u\in {-,+}^{n}\) , such that
\(\phi (u)=x\) . By Lemma REF , this morphism extends
uniquely to a morphism \(\psi :Y(n)\rightarrow C\) , satisfying \(\psi (u)=x\) , which
corresponds by Lemma REF  to a morphism \(Zn\rightarrow (x)\) .
We now show the right-to-left implication and suppose that \((x)\)  is flag
for every vertex \(x\)  of \(C\) . We first show that \(C\)  satisfies the cube
property. Suppose given \(u\in {-,+}^3\)  and a precubical morphism
\(\phi :\Lambda ^u\rightarrow C\) , by Remark REF  we want to show that it
extends to a morphism \(Y3\rightarrow C\)  (the uniqueness is granted by
Remark REF ). We write \(x=\phi (u)\) . By
Lemma REF , the precubical morphism \(\phi :\Lambda ^u\rightarrow C\) 
corresponds to a presimplicial morphism \(\partial Z2\rightarrow (x)\) , which can be
uniquely completed into a presimplicial morphism \(Z2\rightarrow (x)\)  since the
link is flag, which corresponds to a morphism \(Y3\rightarrow C\)  by
Lemma REF , and therefore to a morphism \(\partial Y3\rightarrow C\) 
by precomposition with the inclusion \(\partial Y3Y3\) . We now show
that \(C\)  satisfies the unique \((n)\) -cube property for \(n\geqslant 2\) . Suppose
given a morphism \(\phi :\partial Y(n)\rightarrow C\)  and write \(x=\phi (u)\)  for some
vertex \(u\)  of \(\partial Y(n)\) . By Lemma REF , the
precubical morphism \(\Lambda ^u\partial Y(n)\overset{\phi }{\rightarrow }C\) 
corresponds to a presimplicial morphism \(\partial Zn\rightarrow (x)\) , which
extends to a presimplicial morphism \(Zn\rightarrow (x)\)  because the link is flag,
which in turn corresponds to a morphism \(\psi :Y(n)\rightarrow C\)  by
Lemma REF . By Remark REF , we
have that the morphisms \(\Lambda ^u\partial Y(n)\overset{\phi }{\rightarrow }C\)  and
\(\Lambda ^uY(n)\overset{\psi }{\rightarrow }C\)  coincide, therefore the morphisms
\(\phi \)  and \(\partial Y(n)Y(n)\overset{\psi }{\rightarrow }C\)  also coincide by
Lemma REF . Finally, the lifting is
necessarily unique by Lemma REF .

2-dimensional non-positively curved precubical sets
Interestingly, a precubical set \(C\)  satisfying the unique \(n\) -cube property, for
every \(n\geqslant 3\) , is characterized by its underlying 2-precubical set \(C_2\)  (its image under the 2-truncation functor \(\hat{}\rightarrow \hat{}_2\) , see
Definition REF ). Higher-dimensional cubes can be recovered by a
“completion” process: the 3-cubes can be recovered from \(C_2\)  by adding a
3-cube whenever \(C_2\)  contains the border of a cube (for every morphism
\(\partial Y3\rightarrow C_2\) ), then the 4-cubes can be obtained by adding a 4-cube
whenever the precubical set contains the border of a 4-cube, etc. More
precisely, by general results about presheaf categories, we have
The 2-truncation functor \(\hat{}\rightarrow \hat{}_2\)  admits a right adjoint
\(\hat{}_2\rightarrow \hat{}\) , and this adjunction restricts to an equivalence of
categories between the category \(\hat{}_2\)  and the full subcategory
of \(\hat{}\)  whose objects are precubical sets satisfying the unique \(n\) -cube
property for every \(n\geqslant 3\) .
The image of a 2-precubical set under the right adjoint will be called its
completion. All the constructions preformed here preserve the above
equivalence. For instance, we could easily define a “2-precubical semantics”
by adapting the definitions of Section REF  in order to associate a
2-precubical set to every program in the obvious way. It could then easily be
shown that the completion of the 2-precubical semantics is isomorphic to the
precubical semantics.
For this reason, we will mostly restrict, without loss of generality, to the underlying
2-precubical sets in the rest of the article.
In this setting, the property of being geometric can be also reformulated by
lifting properties, there is a reciprocal to Lemma REF .
Suppose given a 2-precubical set \(C\) .

We say that a precubical set \(C\)  has no looping edge when there
is no edge \(x\in C(1)\)  with the same source and target (\(\partial ^-(x)=\partial ^+(x)\) ).

We say that it has no folded square when every square
\(x\in C(2)\)  is such that \(\partial ^{--}(x)\ne \partial ^{++}(x)\)  and
\(\partial ^{-+}(x)\ne \partial ^{+-}(x)\) .

We say that is has no pinned squares when for all squares
\(x,y\in C(2)\) , either

\(\partial ^{--}(x)=\partial ^{--}(y)\)  and
\(\partial ^{++}(x)=\partial ^{++}(y)\) , or

\(\partial ^{+-}(x)=\partial ^{+-}(y)\)  and
\(\partial ^{-+}(x)=\partial ^{-+}(y)\)

implies \(x=y\) .

A typical example of pinned square is given in Example REF .
A 2-precubical set \(C\)  is geometric if and only if it has

no looping edge,

no folded square,

no parallel edges,

no pinned squares,

and the at most one square closing property.

Suppose given a 2-precubical set \(C\)  satisfying the five above conditions.
The first condition says precisely that \(C\)  has no self-intersecting edge. We
now show that it has no self-intersecting square. Suppose given
square \(x\in C(2)\) . Suppose that \(x\)  has two 0-faces which are equal:
\(\partial ^{\epsilon _0\epsilon _1}(x)=\partial ^{\epsilon _0^{\prime }\epsilon _1^{\prime }}(x)\) . The
case \(\epsilon _0\ne \epsilon _0^{\prime }\)  and \(\epsilon _1\ne \epsilon _1^{\prime }\)  is excluded
because \(C\)  has no folded square. Therefore we can suppose
\(\epsilon _0=\epsilon _0^{\prime }\)  (the case \(\epsilon _1=\epsilon _1^{\prime }\)  is similar). If
\(\epsilon _1\ne \epsilon _1^{\prime }\)  then the edge \(y=\partial ^{\epsilon _0}_0\)  is
looping, which is forbidden, therefore \(\epsilon _1=\epsilon _1^{\prime }\)  and the faces
are not distinct. Suppose that \(x\)  has two 1-faces which are equal:
\(\partial ^{\epsilon }_i(x)=\partial ^{\epsilon ^{\prime }}_{i^{\prime }}(x)\) . If \(i=i^{\prime }\)  then
\(\epsilon =\epsilon ^{\prime }\) , otherwise the edges \(\partial ^-_{1-i}(x)\)  and
\(\partial ^+_{1-i}(x)\)  would both be looping. Suppose that \(i\ne i^{\prime }\) , then it
can easily be checked that this common face is a looping edge.
The fact that \(C\)  satisfies the other conditions required for being geometric
can be checked by case analysis in a similar way, and the converse implication
is simple to check.
To sum up, in the rest of the paper, by a non-positively curved precubical set,
we can thus mean the following:
A non-positively curved precubical set is a 2-precubical set which
satisfies

the five conditions of Lemma  REF

the cube property.


When dihomotopy coincides with homotopy
Homotopy and dihomotopy in precubical sets
As exposed in the introduction, one of the main contributions of this article is
to show that homotopy coincides with its directed variant for paths in precubical sets. We begin by formally introducing these equivalences on paths,
which can be thought of as algebraic variants of the classical notion of
homotopy between paths in algebraic topology.
Since we will need to consider both directed and non-directed paths in
precubical sets \(C\) , we will consistently use the following terminology in the
remainder of the article. A directed path (or dipath) is a path in
the underlying directed graph of \(C\)  (what we have been simply calling a
“path” up to now), and a path is a path in the underlying non-directed
graph \(C\)  (a sequence of composable transitions which might contain
transitions taken backwards, that we call reversed transitions).
We sometimes write \(s:xy\)  to indicate that \(s\)  is a path with \(x\)  as
source and \(y\)  as target, and \({x}:xx\)  for the empty path
on \(x\) .
The length \(s\)  of a path \(s\)  is the number of (possibly reversed)
edges occurring in it. The concatenation of two paths \(s:xy\)  and
\(t:yz\)  is written \(st:xz\) , and the reversal of a
path \(s:xy\)  is written \(s:yx\) .
By an edge (or a transition) \(a:x\rightarrow y\) , we will always denote a dipath of
length one, and write \(a:y\rightarrow x\)  for the corresponding reversed transition,
unless we explicitly state that it can be possibly reversed, in which case we
denote a path of length one.
We conservatively extend the definition relation \(\) 
(Definition REF ) from dipaths to paths: given a precubical
set \(C\) , this relation is now defined as the smallest symmetric relation on
paths of length 2 such that
\(abb^{\prime }a^{\prime }\qquad \qquad {b}{a}{a^{\prime }}{b^{\prime }}\qquad \qquad {a}b^{\prime }b{a^{\prime }}\qquad \qquad {b^{\prime }}aa^{\prime }{b}\) 
whenever there is a square
\({&x_{11}&\\x_{10}[ur]^{b}&&[ul]_{a^{\prime }}x_{01}\\&[ul]^{a}x_{00}[ur]_{b^{\prime }}&\\}\) 
in \(C\) .
Given a precubical set \(C\) , the dihomotopy relation \(\)  on paths
is the smallest congruence concatenation containing \(\) . A
dihomotopy step is a dihomotopy between two paths using only one of the
four above relations (REF ) in context.
The homotopy relation \(\hom \)  on paths is the smallest congruence
containing \(\)  and such that for every edge \(a:x\rightarrow y\)  we have
\(a{a}\hom {x}\qquad \qquad {a}a\hom {y}\) 
A homotopy step is a homotopy reduced to one of the six relations
(REF ) and (REF ) in context.
For geometric precubical sets, the notion of (di)homotopy coincides with the
usual topological one through the geometric realization, see
Section REF  and [1]}.
By definition of the axioms defining dihomotopy, we have the following
properties.
Two dihomotopic paths have the same length.
A path which is dihomotopic to a dipath is necessarily a dipath.
These notions allow us to introduce variants of the well-known construction of
fundamental groupoid in algebraic topology.
Given a precubical set \(C\) , its fundamental groupoid \((C)\)  is
the category whose objects are vertices and morphisms are paths up to
homotopy, and its fundamental category \((C)\)  is the category
whose objects are vertices and morphisms are dipaths up to dihomotopy.
Since the relations (REF ) are precisely those required for every
transition \(a\)  to admit \(a\)  as inverse, it is not hard to show that
Given a precubical set \(C\) , the category \((C)\)  is the free groupoid
over the category \((C)\) .
By definition, two dipaths which are dihomotopic are homotopic. The main goal of
Section REF  is to show that for precubical sets satisfying the
cube property, the converse is true and both relations thus coincide
(Theorem REF ).
Consider the standard hollow cube \(\partial Y3\)  without the “bottom” face
\({0-0}\) , first considered in [2]}:
\(@R=3ex@C=3ex{{--+}[rrr]^{0-+}[dr]|{-0+}&@{}[dr]|{00+}&&[dl]|{+0+}{+-+}\\&{-++}[r]^{0++}&{+++}&\\@{}[ur]|{-00}&{-+-}[u]|{-+0}[r]_{0+-}@{}[ur]|{0+0}&[u]|{++0}{++-}@{}[ur]|{+00}&\\{---}[uuu]^{--0}[rrr]_{0--}[ur]|{-0-}&@{}[ur]|{00-}&&[ul]|{+0-}[uuu]_{+-0}{+--}}\) 
\(The two external paths \) 
–00-+\( and \) 0–+-0\( arehomotopic (as detailed in Example~\ref {ex:cube-without-bottom-dihom}), but notdihomotopic (each of those two paths is dihomotopic only to itself). Noticethat this precubical set does not satisfy the cube property.\)
We will also see in Section  that our algebraic conditions
for precubical sets are closely related to those characterizing
non-positively curved metric spaces in the traditional sense. Those spaces are
locally geodesic: in our context, a counterpart of this notion can be defined as
follows.
A path \(s\)  is locally geodesic if it is not dihomotopic to a path of
the form \(s^{\prime }aas^{\prime \prime }\)  or \(s^{\prime }aas^{\prime \prime }\) . It is
geodesic if every path homotopic to it has a greater or equal length.
By Lemma REF , since the dihomotopy class of a dipath
contains only dipaths, the situation of previous definition can never occur:
Every dipath is locally geodesic.
Clearly, a geodesic path is locally geodesic, but the reciprocal is not
generally true.
Consider again the hollow cube without bottom face introduced in
Example REF . The “loop around the hole”, the
path \({--0}{0-+}{{+-0}}{{0--}}\) , is locally
geodesic. However it is not geodesic, since it is homotopic to the identity
path on the vertex \({---}\) , which is strictly shorter.

A 2-categorical approach to dihomotopy in precubical sets
In this section, we reuse and extend the rewriting techniques developed by
Lafont [3]} for presenting monoidal categories, and the
subsequent developments in the second author's PhD thesis [4]}, [5]}, in order to show one of the main results of this
article: homotopy and dihomotopy relations coincide for directed paths in precubical sets (Theorem REF ). This will be done by rewriting
homotopies between paths into a canonical form, which is always a dihomotopy
when the two paths are directed.
The fundamental 2-category and 2-groupoid of a precubical set
In the following, we suppose fixed a 2-precubical set \(C\)  which
satisfies:

the at most one square closing property,

the cube property,

for any square \({a}a^{\prime }b{b^{\prime }}\)  as in (REF ), we
have \(a=a^{\prime }\)  if and only if \(b=b^{\prime }\) .

In particular any precubical set (see Definition REF )
satisfies those conditions, which is our main object of interest here, but the
results of this section hold in this more general context.
To such a precubical set, we can canonically associate two distinct 2-categories
respectively defined as follows, which are 2-dimensional refinements of the
categories introduced in Definition REF . The precise way in
which those are generalizations is given in Lemma REF .
In classical algebraic topology, the fundamental groupoid \((X)\)  of a
topological space is constructed as the category with, as objects, the points of
\(X\) , and as morphisms, the 1-tracks, or paths modulo homotopy. A direct
generalization is that of the fundamental bicategory, where points are still
0-cells, paths are 1-cells and 2-tracks or homotopies relative end points modulo
higher homotopies are 2-cells [6]}. Composition in dimension 2, vertical composition is associative and even groupoidal (every 2-cell has an
inverse), but composition in dimension 1 is a little less well-behaved:
composition is only associative up to some 2-cells. Hence the natural structure
of weak 2-category, or bicategory. In dimension one
also, the fundamental bicategory has all its 1-cells being invertible (up to
coherent 2-cells again), hence is a bigroupoid.
For Hausdorff spaces, it is possible to construct directly a fundamental
2-groupoid (hence a strict version) [7]}, which is biequivalent to
the fundamental bigroupoid. We follow an equivalent approach here, in defining
a fundamental 2-category and fundamental 2-groupoid, but based on a
combinatorial structure, instead of a topological structure.
The fundamental 2-category \((C)\)  associated to \(C\)  is the
2-category whose

0-cells are the vertices of \(C\) ,

1-cells are generated by (non-reversed) edges of \(C\) : 1-cells are
dipaths in \(C\)  and composition is given by concatenation,

2-cells are freely generated by
\({a,b}{b^{\prime },a^{\prime }}abb^{\prime }a^{\prime }\) 
whenever \(a,b,a^{\prime },b^{\prime }\)  are transitions such that \(abb^{\prime }a^{\prime }\) , and
quotiented by the smallest congruence (both compositions) such that

(b',c'c”,b”a”)(a'a',cc',a”)(a,bb',a'c)

(c”a”',b”'b”,a”)(a,c”'c”,a”'b”')(ab,cc”',b”')

b',a'a,ba,bb',a'ab

for transitions such that all the involved morphisms are
defined. Graphically,


[r]b@[d]|[dr]c@[dd]|
[ur]a[dr]c”[r]|b'[ur]|a'[dr]|c'
[r]b”@[u]|[ur]a”


[r]b[dr]|c”'@[dd]|[dr]c@[d]|
[ur]a[dr]c”[r]|b”'
[r]b”[ur]|a”'[ur]a”@[u]|

[dr]b@[d]|
[ur]a[r]|b'[dr]a[r]|a'
[ur]b@[u]|

[r]a[r]b

The horizontal composition will be denoted as concatenation (\(\) ), in
sequential order, whereas the vertical composition will be denoted as usual
(\(\circ \) ), in categorical order, thus following the usual convention for
monoidal categories.
In the 2-category \((C)\) , if \({a,b}{b^{\prime },a^{\prime }}\)  is defined, then
the transitions \(a^{\prime }\)  and \(b^{\prime }\)  are uniquely determined from \(a\)  and \(b\) 
because \(C\)  satisfies the at most one square closing property. Moreover, if
\({a,b}{b^{\prime },a^{\prime }}\)  is defined then \({a^{\prime },b^{\prime }}{a,b}\)  is also defined,
and is an inverse for \({a,b}{b^{\prime },a^{\prime }}\)  by (REF ): in
fact, the 2-category is a category enriched in groupoids.
Two dipaths \(f,g:xy\)  in \(C\)  are dihomotopic if and only if there
exists a 2-cell \(\alpha :fg\)  in \((C)\) .
The fundamental 2-groupoid \((C)\)  associated to \(C\)  is the
2-category whose

0-cells are the vertices of \(C\) ,

1-cells are generated by edges of \(C\)  or their reverse: 1-cells are
paths in \(C\)  and composition is given by concatenation,

2-cells are freely generated by
\({a,b}{b^{\prime },a^{\prime }}abb^{\prime }a^{\prime }\) 
whenever \(a,b,a^{\prime },b^{\prime }\)  are possibly reversed transitions such that
\(abb^{\prime }a^{\prime }\) , and
\(\begin{array}{r@{\qquad :\qquad }r@{\qquad \qquad }l}\eta _a&_x&aa\\\varepsilon _a&aa&_y\end{array}\) 
whenever \(a:x\rightarrow y\)  is a possibly reversed transition, and quotiented by the
smallest congruence (both compositions) such that


(b',c'c”,b”a”)(a'a',cc',a”)(a,bb',a'c)

(c”a”',b”'b”,a”)(a,c”'c”,a”'b”')(ab,cc”',b”')

b',a'a,ba,bb',a'ab

(aa)(aa)a

(aa)(aa)a

aa
a,aa',a'aa'
a'a,aa',a'a
(a,b'b,a'a')(aa,bb',a')(ab)
ba'
(a'b',aa',b)(b,aa',b'a)(ba)
a'b
(a'b)(a'b',aa',b)(b,aa)
ba
(ba')(a,b'b,a'a')(aa,bb',a')
ab

for possibly reversed transitions \(a,a^{\prime },a^{\prime \prime },b,b^{\prime },b^{\prime \prime },c,c^{\prime },c^{\prime \prime }\)  such that all
the involved morphisms are defined.

In string diagrammatic notation, the generators are drawn as
\(\hbox{\includegraphics {gamma.pdf}}\) 
            
            
\(or often simply as\) 

            
            
\(and the relations of Definition~\ref {def:fundtgpd} can be pictured as\begin{align*}\hbox{\includegraphics {yb_l.pdf}}\end{align*}&\hbox{\includegraphics {yb_r.pdf}}\) 
By definition of the generating 2-cells, we have that
Two paths \(f,g:xy\)  in \(C\)  are homotopic if and only if there exists a
2-cell \(\alpha :fg\)  in \((C)\) .
In the hollow cube without bottom \(C\)  of Example REF ,
the fact that the two paths \(f={--0}{0-+}\)  and
\(g={0--}{+-0}\)  are homotopic is witnessed by the following 2-cell
\(\phi :fg\)  in \((C)\)  (drawn from left to right instead of top to
bottom for space constraints):
\(\phi \hbox{\includegraphics {hollow-cube-hom.pdf}}\) 
\(Of course, this precubical set does not satisfy our assumptions, but we couldstill define a fundamental 2-category, excepting that some members of theequations may not be defined. We allow ourselves to consider it in thisexample only, for illustrative purposes.\) 
The following relations are derivable for 2-cells in \((C)\) :


(b,a'a,b'a')(ba')(aa,bb',a')(ab)

(b'a')(a,bb',a'a')(ab')(ab,a'a,b')

(a'a)(a'a',aa',a)(a'a)a

(when the involved morphisms are defined). Graphically,




We provide graphical derivations for the first and third relations:
\(\begin{array}{c}\hbox{\includegraphics [scale=.5]{etaturn1.pdf}}\end{array}\hbox{\includegraphics [scale=.5]{etaturn2.pdf}}\) 
\(It can easily be checked that the intermediate morphisms are always definedwhen the first and last one are. For instance, the equational derivation ofthe first relation is\) 
(b,a'a,b'a')(ba')
=
(aa,bb',a')(ab',a'a,b)(b,a'a,b'a')(ba')
=
(aa,bb',a')(ab)
\(Since\) 
b,a'a,b'\( is supposed to be defined, we have\) ba'ab'\( in~\) C\( and therefore the morphisms\) b',a'a,b\( and \) a, bb',a'\( are alsodefined. The relation (\ref {eq:rel-der2}) is similar to (\ref {eq:rel-der1}).\)
The generators (for 0-, 1- and 2-cells) of \((C)\)  are a subset of the
generators of \((C)\)  and similarly for relations. There is thus a
canonical functor \((C)\rightarrow (C)\)  exhibiting a quotient of
\((C)\)  as a subcategory of \((C)\) . In the following we study
some of the properties of this functor.
The interest of those 2-categories is that they respectively contain “more
information” than the fundamental category and groupoid, in the following
sense. Given a 2-category \(, we write~\)  for the category with
the 0-cells of \( as objects, and morphisms are the 1-cells of~\)  quotiented
by the smallest equivalence relation identifying two 1-cells between which there
exists a 2-cell.
We have \((C)\cong \widetilde{(C)}\)  and
\((C)\cong \widetilde{(C)}\) .

Rewriting homotopies as dihomotopies
By definition, the 2-cells of \((C)\)  are equivalence classes of 2-cells
in the free 2-category generated by the 2-cells
\({a,b}{b^{\prime },a^{\prime }}\) , \(\eta _a\)  and \(\varepsilon _a\) , quotiented by the
equivalence relation \(\equiv \)  generated by the relations. An element of such an
equivalence class is called a formal 2-cell. We say that a formal 2-cell
\(\phi \)  rewrites to a 2-cell \(\psi \) , which we write \(\phi \psi \) , when
\(\psi \)  can be obtained from \(\phi \)  by iteratively replacing the left member of a
relation in some context by the right member of the relation in the same
context, where the relation is one of the eleven relations of
Definition REF  or the three relations of
Proposition REF . For instance the formal 2-cell on the left
rewrites to the formal 2-cell on the right using the relation
(REF ):
\(\hbox{\includegraphics [scale=.7]{etaturn2.pdf}}\) 
            
\(More formally, we can introduce a 3-category with the above free 2-category asunderlying 2-category, and 3-cells generated by the relations oriented from leftto right, and we would have \) 
\( precisely when there exists a 3-cellfrom \)\( to \)\( in this 3-category. The interested reader can find a moredetailed presentation of this construction in~\cite {t3rt}. Notice that if \)\(and~\)\( are two formal 2-cells such that \)\( then \)\( and~\)\(are in the same equivalence class, moreover the following lemma ensures thatrewriting a formal 2-cell will always produce a (well-defined) formal 2-cell:\) 

In Definition REF  and Proposition REF , if
the left member of a relation is well-defined then the right member is also
well-defined.


We show that when the left member of a relation is well-defined then the right
member is also well-defined. The property is verified for
(REF ) because \(C\)  is supposed to satisfy the cube property,
and the right members of other relations of Definition REF  are
always well-defined. For (REF ), if the left-member is
well-defined then \({b,a^{\prime }}{a,b^{\prime }}\)  is, \(ba^{\prime }ab^{\prime }\)  in \(C\) ,
and therefore \({a,b}{b^{\prime },{a^{\prime }}}\)  is well-defined. The case
of (REF ) is similar, and the right-member of (REF )
is always defined.
We call a slice a formal 2-cell \(\phi \)  of the form
\(\phi =_f\alpha _g\)  where \(f,g\)  are 1-cells and \(\alpha \)  is a
generating 2-cell. A slice is thus a 2-cell constituted of a unique generator in
identity context:
\(\hbox{\includegraphics {slice.pdf}}\) 
\(Using the laws of 2-categories it is easy to show the following lemma, whichwill enable us to reason by induction on formal 2-cells:\) 


Any formal 2-cell \(\phi \)  can be expressed as a composite of slices: there
exists slices \(\phi _1,\ldots ,\phi _n\)  such that
\(\phi =\phi _n\circ \ldots \circ \phi _1\) . Moreover, any two such decompositions
have the same number of slices.
The number \(n\)  of slices in the decomposition of a formal 2-cell \(\phi \)  is
called its length and is denoted \({\phi }\) .
We first generalize the notation for the 2-cells \({a,b}{b^{\prime },a^{\prime }}\)  as
follows:
Given transitions \(a,a^{\prime }\)  and 1-cells \(f,f^{\prime }\) , we write
\({a,f}{f^{\prime },a^{\prime }}:aff^{\prime }a^{\prime }\)  for the 2-cell defined by induction
on the length of \(f\)  by

if \(a:x\rightarrow y\)  then
\({a,{y}}{{x},a}_a\) 

given transitions \(a,b,a^{\prime },b^{\prime }\)  such that \(abb^{\prime }a^{\prime }\) , we have
\({a,bf}{b^{\prime }f^{\prime },a^{\prime \prime }}({a,b}{b^{\prime }a^{\prime }}_f)\circ (_{b^{\prime }}{a^{\prime },f}{f^{\prime },a^{\prime \prime }})\) 
whenever \({a^{\prime },f}{f^{\prime },a^{\prime \prime }}\)  is defined.

Graphically, we have
\({a,b_1b_2\ldots b_n}{b_1^{\prime }b_2^{\prime }\ldots b_n^{\prime },a^{\prime }}\hbox{\includegraphics {gamman.pdf}}\) 
\(\) 
As explained in the beginning of the section, we are going to show that every
formal 2-cell can be rewritten into one of a particular form, called a canonical
form. For those, we will be able to show that they are actually homotopies when
the source and target are directed paths (Lemma REF ) and
conclude.
A formal 2-cell \(\phi \)  is a canonical form when it is of the form
\(_{_x}\)  for some 0-cell \(x\) , what we write \(Z_x\) , or there exists a
canonical form \(\psi \)  such that \(\phi \)  is of one of the four following forms:

Ga,f,gf',a'(a,ff',a'g)(a)
Hf,a,g,hg',a'(faa,gg',a'h)(fagh)
Ea,f(af)(a)

for some transitions \(a\) , \(a^{\prime }\)  and morphisms \(f\) , \(f^{\prime }\) , \(g\) , \(g^{\prime }\) , \(h\) .
Graphically,

ZxHf,a,g,hg',a'
Ga,f,gf',a'Ea,f

The operations \(G\) , \(H\)  and \(E\)  on 2-cells are called operators.
Notice that the operator \(E^{a,f}\)  transforms a 2-cell \(\psi :fag\)  into
a 2-cell \(E^{a,f}\psi :afg\) . Similarly, the “type” for other operators is
\(\begin{array}{r@{\qquad :\qquad }r@{}l@{\qquad \rightsquigarrow \qquad }r@{}l}G^{a,f,g}_{f^{\prime },a^{\prime }}&h&fg&ah&f^{\prime }a^{\prime }g\\H^{f,a,g,h}_{g^{\prime },a^{\prime }}&i&fgh&i&fag^{\prime }{a^{\prime }}h\\E^{a,f}&g&af&ag&f\end{array}\) 
We sometimes use the notation \(I^{a,f}\)  for the operator \(G^{a,,f}_{,a,f}\) :
\(I^{a,f}\psi G^{a,,f}_{,a,f}\psi _a\psi \hbox{\includegraphics {I.pdf}}\) 
\(and simply write \) 
a\( when \) f\( is clear from the context.\)
Every formal 2-cell \(\phi \)  rewrites to a canonical form.


By induction on the length of \(\phi \) . If \({\phi }=0\) , then
\(\phi =_f=I^{a_1}I^{a_n}Z\)  for some 1-cell \(f=a_1a_n\)  and we
conclude. Otherwise \({\phi }=n+1\) , and by Lemma REF , \(\phi \) 
admits a decomposition as \(\phi =\sigma \circ \psi \)  with \({\psi }=n\)  and
\(\sigma \)  is a slice, \(\sigma =_f\alpha _g\)  for some generating
2-cell \(\alpha \)  and 1-cells \(f\)  and \(g\) . By induction hypothesis, \(\psi \)  is
equal to a canonical form, and we conclude by examining all the possible forms
for the canonical form \(\psi \)  and the slice \(\sigma \) .

Suppose that \(\alpha =\eta _a\) . Then
\(\phi =(_f\eta _a_g)\circ \psi =H^{f,a,,g}_{,a}\psi \) .

Suppose that \(\alpha =\varepsilon _b\) . We proceed by induction on \(\psi \) .

Suppose that \(\psi =G^{a,f^{\prime \prime },g^{\prime }}_{f^{\prime },a^{\prime }}\psi ^{\prime }\) :
\(\psi =\hbox{\includegraphics {Gproof.pdf}}\) 
\(Depending on~\) 
\( and~\) g\(, the following cases are possible.\begin{itemize}\item If f^{\prime }=f^{\prime }_1bbf^{\prime }_2, f=f^{\prime }_1 and g=f^{\prime }_2a^{\prime }g^{\prime },\phi =\hbox{\includegraphics [scale=.7]{cf-proof1a.pdf}}\end{itemize}=\hbox{\includegraphics [scale=.7]{cf-proof1b.pdf}}\) 

=
G”
\(where \) 
”\( is a canonical form obtained by induction.\item If \) f'=f'1a'\(, \) b=a'\(, \) f=f'1\( and \) g=g'\(,\)\(\phi =\hbox{\includegraphics [scale=.7]{cf-proof2a.pdf}}\) 



=
E”
\(where \) 
”\( is a canonical form obtained by induction.\item If \) g'=a'g'2\(, \) b=a'\(, \) f=f'\(, \) g=g'2\(,\)\(\phi =\hbox{\includegraphics [scale=.7]{cf-proof3a.pdf}}\) 


=
E”
\(where \) 
”\( is a canonical form obtained by induction.\item If \) g'=g'1bbg'2\(\)\(\phi =\hbox{\includegraphics [scale=.7]{cf-proof4a.pdf}}\) 
=


=
G”
\(where \) 
”\( is a canonical form obtained by induction.\)

The cases where \(\psi =H^{f,a,g,h}_{g^{\prime },a^{\prime }}\psi ^{\prime }\)  and
\(\psi =E^{a,f}\psi ^{\prime }\)  can be handled similarly by case analysis.


The case where \(\alpha ={a,b}{b^{\prime },a^{\prime }}\)  can be handled similarly by
case analysis.

A canonical form is not, in general, a normal form. The following lemma shows
that a canonical form of the form \(XEHY\)  (where \(X\)  and \(Y\)  are composites of
operators and we omit indices) can always be rewritten to a canonical form of
the form \(XGY\)  of \(XHEY\) , and \(XGHY\)  to \(XHGY\) . By severely abusing notations,
this can be summarized as
\(EHG\text{ or }HE\qquad \qquad \qquad GHHG\) 
From these relations, it is easy to show that if a canonical form contains a \(H\) 
(is of the form \(XHY\) ) then it can be rewritten to one which contains a \(H\) 
in first position (of the form \(HX\) ) and if it contains an \(E\)  (is of
the form \(XEY\) ) then it can be rewritten to one of the form \(XEY\)  where \(Y\)  does
not contain an \(H\) . This will be used in Lemma REF .
The following rewriting relations can be shown:

    (1) for every morphism \(\phi :i\rightarrow gh\) ,
Ea,g'a'hH,a,g,hg',a'Ga,g,hg',a'
    (2) for every morphism \(\phi :i\rightarrow bfgh\) ,
Eb,fag'a'hHbf,a,g,hg',a'Hf,a,g,hg',a'Eb,fgh
    (3) for every morphism \(\phi :if_1f_2gh\) ,
Gb,f1,f2a'g'a'hf1',b'Hf1f2,a,g,hg',a'Hf1'b'f2,a,g,hg',a'Gb,f1,f2ghf1',b'
    (4) for every morphism \(\phi :ifg_1g_2h\) 
Gb,fag1”,g2'a”hf'a'g1',b'Hbf,a,g1g2,hg1”g2',a”Hf',a',g2”b”g2,hg1'b'g2',a”Gb,fg1,g2hf'g2”,b”
    (5) for every morphism \(\phi :ifgh_1h_2\) 
Gb,fag”a”'h1,h2f'a'g'a”h1',b'Hbf,a,g,h1h2g”,a”'Hf',a',g”',h1'b'h2g',a”Gb,fgh1,h2f'g”'h1',b'


(in the last two cases the omitted indices can be inferred from the figure).


(1) is a direct application of relation (REF ), (2) and
(3) are equalities (they follow from the exchange law in 2-categories), (4)
and (5) can be shown by applying suitable sequence of rewriting, which can
easily be guessed from the figures.
In the following, we sometimes omit the superscript and subscript indices of
operators for simplicity. We say that a 1-cell \(f\)  contains a reversed
transition when it can be written in the form \(f=f_1af_2\)  where
\(a\)  is a reversed transition: a path \(f\)  is a dipath when it does not
contain a reversed transition. Two possibly reversed transitions \(a\)  and \(a^{\prime }\) 
are said to have the same direction if they are both non-reversed or both
reversed.
In a 2-cell of the form \({a,b}{b^{\prime },a^{\prime }}\)  the transitions \(a\)  and \(a^{\prime }\) 
(\(b\)  and \(b^{\prime }\) ) have the same direction. In a 2-cell of the form
\({a,f}{f^{\prime },a^{\prime }}\)  the transitions \(a\)  and \(a^{\prime }\)  have the same direction,
and \(f\)  contains a reversed transition if and only if \(f^{\prime }\)  does.


The first point is immediate by definition of \({a,b}{b^{\prime },a^{\prime }}\) . This can
easily be used to show the result on \({a,f}{f^{\prime },a^{\prime }}\)  by induction on its
definition (Definition REF ).
The source and target of a formal 2-cell in canonical form satisfy the
following properties.

A formal 2-cell of the form \(H\phi \)  necessarily contains a reversed
transition in its target.

\(Z\)  contains no reversed transition in its source or its target.

\(G\phi \)  contains a reversed transition in its target if and only if
either it contains a reversed transition in its source or \(\phi \)  contains a
reversed transition in its target.

A formal 2-cell of the form \(EX\)  where is consists of operators
within \({Z,E,G}\)  necessarily contains a reversed transition in its
source.

The properties can be shown as follows.

The target of a formal 2-cell \(H^{f,a,g,h}_{a^{\prime },g^{\prime }}\)  is
\(fag^{\prime }{a^{\prime }}h\)  and thus contains a reversed transition since
it contains both \(a\)  and \({a^{\prime }}\) , and \(a\)  and \(a^{\prime }\)  have the same direction
(this follows easily from Lemma REF ).

The source (target) of \(Z\)  is an empty path.

Consider \(G^{a,f,g}_{f^{\prime },a^{\prime }}\phi :ahf^{\prime }a^{\prime }g\)  with
\(\phi :hfg\) , where
\(G^{a,f,g}_{f^{\prime },a^{\prime }}\phi =({a,f}{f^{\prime },a^{\prime }}_g)\circ (_a\phi )\) . If
the transition \(a^{\prime }\)  is reversed then \(a\)  is also reversed and we
conclude. Otherwise, either \(f^{\prime }\)  or \(g\)  contains a reversed transition. If
it the case for \(g\)  then \(\phi \)  contains a reversed transition in its
target. Otherwise \(f^{\prime }\)  contains a reversed transition and thus also \(f\)  by
previous lemma. The converse implication is similar.

It is enough to show the property in the case where \(X\)  is of the form
\(X=GG\ldots GZ\)  because if \(EX\)  contains a reversed transition in its source
then so does \(EX^{\prime }EX\) . Consider \(E^{a,f}\phi :agf\)  with
\(\phi :g\rightarrow af\) , if \(a\)  not reversed then \(E^{a,f}\phi \)  contains the
reversed transition \(a\)  in its source. Otherwise \(\phi \)  contains a
reversed transition in its target and is of the form \(GG\ldots GZ\) . By an
easy induction, using the two previous cases, it thus contains a reversed
transition in its source. The converse implication is similar.

Suppose given a formal 2-cell \(\phi :fg\)  whose source \(f\)  and target \(g\) 
are dipaths (do not contain reversed transitions). Then \(\phi \)  rewrites to
a formal 2-cell which is a composite of generators not involving generators of
the form \(\eta _a\)  and \(\varepsilon _a\) .


By Proposition REF , \(\phi \)  rewrites to a canonical form. This
canonical form corresponds to a formal 2-cell involving a generator of the
form \(\eta _a\)  if and only if it contains an operator \(H\) . By
Lemma REF , up to more rewriting, if the canonical form
contains an operator \(H\)  we can always suppose that there is one placed at
leftmost position. This situation is impossible because a morphism of the form
\(H\psi \)  necessarily contains a reversed transition in its target by
Lemma REF . Similarly, the formal 2-cell involves a generator
\(\varepsilon _a\)  if and only if its canonical form contains an operator \(E\) . Up
to rewriting more, we can always suppose that the canonical form is of the
form \(YEX\)  where \(X\)  consists of operators not involving \(H\) . By
Lemma REF , it thus contains a reversed transition in its
source, contradicting the hypothesis.
Two dipaths in \(C\)  are homotopic if and only if they are dihomotopic.


We show the left-to-right implication, the converse being obvious. Suppose
that \(f\)  and \(g\)  are two homotopic dipaths. By Lemma REF ,
this means that there exists a 2-cell \(\phi :fg\)  in \((C)\) . This
2-cell \(\phi \)  is, by definition, an equivalence class of formal 2-cells under
the relations defining fundamental 2-groupoids. Choose an arbitrary formal
2-cell \(\psi \)  in this equivalence class. By Lemma REF , \(\psi \) 
rewrite to a formal 2-cell \(\psi ^{\prime }\) , which is still in the equivalence
class \(\phi \)  by definition of rewriting, and does not involve
generators \(\eta \)  or \(\varepsilon \) . Therefore, the 2-cell \(\phi \)  is in the
image of the canonical functor \((C)\rightarrow (C)\)  (see
Remark REF ), and there exists a dihomotopy from \(f\) 
to \(g\)  by Lemma REF .
This can be formulated more categorically as follows.
The quotient functor \((C)\rightarrow (C)\)  is full and faithful.
On a related note, a characterization of the embeddability of small categories
into their groupoid completion is given in [8]}, and
variants of the above theorem have also been investigated in more geometric
contexts, see the references given in Section REF .

Extensions
In this section, we briefly comment on a few topics and extensions related to
the preceding approach. We omit proofs, they should be detailed in subsequent
works.
The free compact closed category on a unidimensional object
Given an precubical set \(C\) , we have seen (Lemma REF ) that
homotopy corresponds to the existence of a 2-cell in \((C)\)  and
therefore the relations we put on 2-cells in the definition of \((C)\)  do
not really matter as long as they are well-defined
(Lemma REF ) and allow us to rewrite a homotopy between
dipaths to a dihomotopy (Theorem REF ). In this section, we
advocate that our axioms are not completely arbitrary by showing that our
construction encompasses the free compact closed category on an unidimensional
object as a particular case.
We study here the particular case of the 2-category \((C)\)  where \(C\) 
is the precubical set with one vertex \(x\) , one edge \(a:x\rightarrow x\)  and one square
\(aaaa\) :
\(C{&x\\x[ur]^a&&[ul]_ax\\&[ul]^ax[ur]_a&}\) 
This will illustrate that our axioms for the category \((C)\)  constitute
a variant of the well-known notion of compact-closed category. Since the
2-category \( has only one 0-cell, we can consider it as a monoidal category,with ``\)\(^{\prime \prime } as tensor product. It can be noticed that the monoidalcategory~\)  is symmetric (the symmetry being generated by
\({a,a}{a,a}:aa\rightarrow aa\) ), and compact closed (with \(a\)  being
dual to \(a\) ):
A symmetric monoidal category \((,I)\)  is compact closed when for
every object \(A\in , there exists an object \) A*, called the
dual of \(A\) , together with two morphisms
\(\eta _A:I\rightarrow AA^*\qquad \text{and}\qquad \varepsilon _A:A^*A\rightarrow A\) 
such that
\((_A\varepsilon _A)\circ (\eta _A_A)=_A\qquad \qquad (\varepsilon _A_{A^*})\circ (_{A^*}\eta _A)=_{A^*}\) 
An object \(A\in  in such a category is \emph {unidimensional} when\) AA,A*A=I\(.\)
Consider the symmetric monoidal category \(\)  of finite-dimensional
vector spaces over a fixed field \(, equipped with the usual tensor product\)\(, the unit~\) I\( being~\)  equipped with its canonical \(-vectorspace structure. This category is compact closed, the dual of a vectorspace~\) A\( being the space~\) A*\( of linear functionals on~\) A\(. Notice thatgiven a linear map \) f:AB\(, the morphism \) Tr(f):II\( defined by\) Tr(f)=A*(fA*)A\( is the linearmap \) x(f)x\( where \) (f) is the trace of \(f\)  in the usual
sense. In particular, given a space \(A\) , we have \((_A)=\dim (A)\)  and
\(\operatorname{Tr}(_A)=_I\)  precisely when \(A\)  is of dimension 1 (we suppose
that \( is of null characteristic).\)
A converse to the preceding remark can be shown, and precisely formulated as
follows. The proof of this result is not entirely obvious, and can be obtained
as a variant of [9]}, [10]}.
The category \( is the free compact closed category containing aunidimensional object.\)

Convergence of the rewriting system
We conjecture that this rewriting system is convergent, both terminating and
confluent. We believe that Guiraud's techniques based on
derivations [11]} can be used in order to show the
termination of the rewriting system. Confluence is quite tedious to check.
Because of the “Yang-Baxter” rule (REF ) there is an infinite
number of critical pairs as discovered by Lafont [3]}. We
could still be able to handle those families of critical pairs (as done by
Lafont), however this requires beforehand to establish the existence of
canonical forms as we did in previous section: it would therefore require
strictly more work than done here. As a byproduct of this result, we expect to
be able to show that in \((C)\)  (and therefore also in \((C)\)  by
Theorem REF ) there is at most one homotopy between any two
paths (of course, when \(C\)  satisfies the cube property and other hypothesis).

An axiomatization of homotopy between homotopies
As explained in detail in next section, one can interpret a precubical set \(C\) 
as a directed space \(C\)  by taking its geometric realization (see
Definition REF ). It has been shown by
Fajstrup [1]} that two paths in \(C\)  are dihomotopic (homotopic) in \(C\)  if and only if the corresponding paths in \({C}\)  are
dihomotopic (homotopic) in the geometric sense, our algebraic notion
of (di)homotopy corresponds to the geometric one. We conjecture that this result
extends one dimension higher, that two formal 2-cells in \((C)\) 
(\((C)\) ) are equal (in the same equivalence class modulo the
relations) if and only if the corresponding homotopies (dihomotopies)
in \(C\)  are homotopic, thus bringing a geometric justification for our
axiomatic definition of \((C)\)  and \((C)\) .

A (geo)metric approach to the cube property
The cube condition which is at the heart of the developments in previous
sections is quite reminiscent of Gromov's condition for characterizing
non-positively curved cubical complexes [14]}. In order to
make the connection precise, one has to associate to every precubical set a
geodesic metric space (which is a cubical complex). Such a construction could be
performed abstractly as a geometric realization in the category of metric spaces
if this category were cocomplete... which is not the case. This leads us to
investigate a generalization of the notion of metric spaces (called
generalized metric spaces [15]} or Lawvere
metric spaces [16]} or hemi-metric
spaces [17]}) which form a cocomplete
category. Interestingly, these spaces also allow one to encode a notion of
“time direction” in the metric, as first noticed by
Grandis [18]}, [15]}, thus enabling one to
formulate a metric semantics for concurrent programs, which is not only able to
encode the direction of time but also the duration of the elapsed time during an
execution.
The use of non-positive curvature has been used by Ghrist in order to study
configuration spaces and cubical complexes [20]}, [21]}, [22]}.
In Section REF , we recall the definition of generalized metric spaces
as well as associated basic definitions and properties: the properties of the
resulting category, the symmetric variant of generalized metric spaces (which
can be thought of as being “undirected”), the topology induced by a metric,
and the various notions of paths. In Section REF , we define the
realization of a precubical set as a metric space and show that the underlying
topology of the realization induced by the metric is the expected one: this
means that considering the metric bring more (as opposed to different)
information compared to the usual case. Finally, in Section REF , we
recall the original definition of space with non-positive curvature, and show
that our definition corresponds with this one, through geometric realization.
The two main results are those in the end of Sections REF  and
REF  (compatibility of the metric with usual topology and
correspondence of our axioms with the usual ones). We do not claim much
originality in this section, but we did our best to collect in a concise way
results which are disseminated in the literature or, worse, considered as
folklore. The reason why we have presented this here is to explain the
inspiration for our axiomatics on precubical sets, but none of the results in
this paper depend on the geometric interpretation of those axioms.
Generalized metric spaces
Recall that a metric space \((X,d)\)  consists of a set \(X\)  equipped with a
metric \(d:X\times X\rightarrow [0,\infty ]\) , a function such that, given \(x,y,z\in X\) ,
we have
\(\begin{array}{rrl}(1)&\text{point equality:}&d(x,x)=0\\(2)&\text{triangle inequality:}&d(x,z)\leqslant d(x,y)+d(y,z)\\(3)&\text{finite distances:}&d(x,y)<\infty \\(4)&\text{separation:}&\text{$d(x,y)=d(y,x)=0$ implies $x=y$}\\(5)&\text{symmetry:}&d(x,y)=d(y,x)\\\end{array}\) 
Generalized metric space are defined similarly, but only keeping the two first
conditions:
A generalized metric space \((X,d)\)  consists of a set \(X\)  equipped
with a function \(d:X\times X\rightarrow [0,\infty ]\) , called generalized metric
or distance, such that, given \(x,y,z\in X\) , we have
\(\begin{array}{rrl}(1)&\text{point equality:}&d(x,x)=0\\(2)&\text{triangle inequality:}&d(x,z)\leqslant d(x,y)+d(y,z)\\\end{array}\) 
A morphism \(f:(X,d_X)\rightarrow (Y,d_Y)\)  between two such spaces is a function
\(f:X\rightarrow Y\)  which is nonexpansive (does not increase distance): for
every \(x,y\in X\) , \(d_Y(f(x),f(y))\leqslant d_X(x,y)\) . We write \(\)  for the
category of generalized metric spaces and their morphisms.
By a space we will always mean an object in this category, unless we
explicitly state that the space is “non-generalized”. It was observed by
Lawvere [16]} that it can alternatively be defined as the
category of categories and functors enriched over the posetal category
\(=[0,\infty ]\)  (with an arrow \(x\rightarrow y\)  whenever \(x\geqslant y\) ) equipped with the
monoidal structure induced by addition.
Our main interest in considering this category instead of the full subcategory
of (usual) metric spaces is double. Firstly, removing conditions (3) and (4)
makes the category much more well-behaved (the category of generalized metric
spaces has small colimits, which is not the case for metric spaces). Of course,
we generally work with separated (\(T_0\) ) spaces
and we will have to show that colimits we obtain from such spaces are still
separated. Secondly, removing condition (5) allows us to encode a notion of
direction of the space: intuitively, a point \(x\)  is really “before” a
point \(y\)  whenever the distance \(d(x,y)\)  is finite and \(d(y,x)=\infty \) .
Given \(a,b\in \) , we write \(ab\)  for the interval equipped with the
usual metric given by \(d(x,y)=|y-x|\) . We write \({ab}\)  for the
same interval metrized by
\(d(x,y){\left\lbrace \begin{array}{ll}y-x&\text{if $y\geqslant x$}\\\infty &\text{if $y<x$}\end{array}\right.}\) 
In particular, we often write \(I\)  (\(\) ) instead of 01 (01) for the (directed) standard
interval. Similarly, we write \(\)  (\(\) ) for the (directed)
real line, which is also sometimes called the Sorgenfrey
line [24]}, [17]}.
The directed unit circle \(\)  is the set of complex points of the
form \(^{2\pi \theta }\) , with \(\theta \in \) , equipped with the distance
\(d(x,y)=\bigwedge {\rho -\theta }{x=^{2\pi \theta }, y=^{2\pi \rho }, \rho \geqslant \theta }\) .
An isometry \(f:X\rightarrow Y\)  is a distance-preserving morphism, satisfies
\(d_Y(f(x),f(x^{\prime }))=d_X(x,x^{\prime })\)  for every \(x,x^{\prime }\in X\) .
Isomorphisms in \(\)  are isometries.
Suppose given an isometry \(f:X\rightarrow Y\) . For every \(x,y\in X\) , we have
\(f(x)=f(y)\)  implies \(d(x,y)=0=d(y,x)\) . In particular, when \(X\)  separated \(f\) 
is injective, and we write \(f^{-1}(y)\)  for the unique antecedent of \(y\in Y\) 
under \(f\) .
We write \(d_0\)  for the constant distance equal to 0 and \(d_\infty \)  for the
distance such that \(d(x,x)=0\)  and \(d(x,y)=\infty \)  for \(x\ne y\) .
Limits and colimits
We now show that the category of generalized metric spaces has all limits and
colimits and describe how to explicitly construct those. These are also studied
in [15]}, [17]}.
The category \(\)  is complete and cocomplete. Moreover, the forgetful
functor \(\rightarrow \)  admits both a left and a right adjoint and thus
preserves limits and colimits.


Since the category \(\)  is complete and cocomplete, with products (coproducts) being given by supremum (infimum), by general results about
enriched categories [28]}, the category
\(=\)  has small limits and colimits. The left (right)
adjoint to the forgetful functor \(\rightarrow \)  is the functor which to a
set \(X\)  associates the generalized metric space \((X,d_0)\)  (\((X,d_\infty )\) ). The underlying set of a limit of metric spaces is thus the
limit of the underlying sets and similarly for colimits.
Limits and colimits can be constructed explicitly as follows.
It is well-known that it is enough to construct all (co)products and
(co)equalizers to construct all (co)limits.
Given a family \((X_i,d_i)_{i\in I}\)  of metric spaces, its product (coproduct) is the set \(\prod _{i\in I}X_i\)  (\(\coprod _{i\in I} X_i\) ),
respectively equipped with the distances
\(d_{\prod X_i}((x_i),(y_i))=\bigvee _{i\in I}d_i(x_i,y_i)\qquad \qquad d_{\coprod X_i}(x,y)={\left\lbrace \begin{array}{ll}d_i(x,y)&\text{if $x,y\in x_i$}\\\infty &\text{otherwise}\end{array}\right.}\) 
Given a pair of morphisms \(f,g:(X,d_X)\rightarrow (Y,d_Y)\) , their equalizer is the
equalizer set \(Z={x\in X}{f(x)=g(x)}\)  equipped with the restriction of
\(d_X\)  as distance.
Given a pair of morphisms \(f,g:(X,d_X)\rightarrow (Y,d_Y)\) , the coequalizer of \(f\) 
and \(g\)  is the set \(Y/{\approx }\) , where \(\approx \)  is the smallest equivalence
relation such that \(y\approx y^{\prime }\)  whenever there exists \(x\in X\)  with \(y=f(x)\) 
and \(y^{\prime }=g(x)\) , equipped with the following distance. Given two points
\(x,y\in Y\) , a “chain” from \(x\)  to \(y\) 
is a sequence of points \(x_1,y_1,x_2,y_2,\ldots ,x_n,y_n\in Y\)  such that
\(x=x_1\) , \(y_i\approx x_{i+1}\) , and \(y_n=y\) . The length of such a chain \(u\)  is
defined to be \(l(u)=\sum _{i=1}^nd(x_i,y_i)\) . The distance between two points
\(x,y\in Y/{\approx }\)  is the infimum of the lengths of chains from a
representative of \(x\)  to a representative of \(y\)  (in fact, it does not depend
on the choice of representatives for \(x\)  and \(y\) ).
With the notations of previous lemma, given \(x,y\in Y\) , the sequence \(x,y\)  is
a chain from \(x\)  to \(y\)  and thus \(d_{Y/{\approx }}(x,y)\leqslant d_Y(x,y)\) .
The directed circle (see Example REF ) can be constructed
from 01 as a colimit, by identifying the points 0
and 1.
Consider the spaces \((I_n,d_n)\)  indexed by \(n\in \)  with \(I_n=[0,1]\)  and
distance \(d_n(x,y)=|y-x|/n\) . The colimit \(I_\omega =\coprod _{n\in }/{\approx }\) 
where \(\approx \)  identifies points 0, 1, in various \(I_n\)  is the
colimit of the sets equipped with the distance \(d_\omega \)  such that given
\(x\in I_n\)  and \(y\in I_m\) ,
\(d_\omega (x,y){\left\lbrace \begin{array}{ll}0&\text{if $x,y\in {0,1}$}\\|y-x|/n&\text{if $n=m$}\\(x/n+y/m)\vee ((1-x)/n+(1-y)/m)&\text{otherwise}\end{array}\right.}\) 
In particular, we have \(d_\omega (0,1)=0\) , which shows that coequalizers of
separated spaces are not necessarily separated. Notice that, in the space
\(I_\omega \) , if we “cut in the middle” all the intervals we obtain two
“star-shaped” spaces which are both separated. The space \(I_\omega \)  can then
be obtained as a pushout of the two spaces (over the discrete space with \(\) 
as points), showing that separated spaces are not either closed under
pushouts.
Since the category \(\)  is cocomplete, we can easily mimic the definitions
of Section REF  in order to associate a generalized metric space
to each program. We do not detail this here, because we will be able to reuse
the precubical semantics and realize it as a space, see
Section REF , instead of starting all over again. In
particular, an action in this semantics will typically be realized as a
directed unit interval \(\)  (see Example REF ): this corresponds to
the intuition that executing an action is a directed process and takes « one
unit of time » (but of course, other duration choices could be made depending
on the nature of the actions, as illustrated in next remark). Moreover,
parallel composition is naturally interpreted as product of metric spaces: the
time taken to execute two programs in parallel is the maximum of both
execution times.
In order to illustrate why removing the separation axiom makes sense in this
context, consider the action \(\) , which is instantaneously executed and
does nothing. This particular action is most naturally modeled as \((I,d)\) ,
with \(d(x,y)=0\)  for \(x\leqslant y\)  and \(d(y,x)=\infty \)  otherwise (but other actions
are still modeled as \(\) ). For instance, the geometric semantics of a
program of the form \({A}\) , where \(A\)  is some action, would be a space of
the form
\(\begin{tikzpicture}(0,0) circle (.5);{(180:.5)} node[left] {x};{(0:.5)} node[right] {y};(90:.5) node[above] {};(-90:.5) node[below] {A};{(0:.5)};\end{tikzpicture}\) 
In this space, we have \(d(x,y)=0\)  and \(d(y,x)=1\) ; it is thus neither separated
nor symmetric. Similarly, \(\)  provides an example of a non-trivial
space (non-contractible in particular) equipped with the constant null
distance \(d_0\) .
Because our spaces are not supposed to be separated, it will sometimes be useful
to consider the following kind of quotient.
Given a space \(X\) , an equivalence relation \(\approx \)  on \(X\)  is called
instantaneous when \(x\approx y\)  implies \(d(x,y)=0\)  for every \(x,y\in X\) .
Given a space \(X\)  and a instantaneous equivalence relation \(\approx \) , the
quotient morphism \(X\rightarrow X/{\approx }\)  is an isometry.


The quotient space \(X/{\approx }\)  can be computed as the coequalizer of
\({\approx }\rightrightarrows X\) , where the two arrows are the projections of
the relation \({\approx }\subseteq X\times X\) . Given \(x,y\in X\)  and a chain
\(x_0,y_0,\ldots ,x_n,y_n\)  with \(x_0=x\) , \(y_n=y\) , by the triangle inequality we
have

dX(x,y)
      d(x0,y0)+d(y0,x1)+...+d(yn-1,xn)+d(xn,yn)
   =   d(x0,y0)+d(x1,y1)+...+d(xn-1,yn-1)+d(xn,yn)

and therefore \(d_X(x,y)\leqslant d_{X/{\approx }}(x,y)\) . Conversely, since \(x,y\)  is
a chain, we have that \(d_{X/{\approx }}(x,y)\leqslant d_X(x,y)\) .
In particular, given a generalized metric space \(X\) , the free separated space
can be constructed as \(X/{\approx }\) , where \(\approx \)  is the smallest equivalence
relation such that \(d(x,y)=0\)  or \(d(y,x)=0\)  implies \(x\approx y\) , for
\(x,y\in X\) . The quotient map will be an isometry when the relation \(\approx \)  is
instantaneous, when \(d(x,y)=0\)  implies \(d(y,x)=0\) . The colimits of
non-generalized metric spaces usually considered in literature can be obtained
from those described here by freely separating the resulting colimits.

Symmetric metric spaces
The category of spaces which are symmetric forms an interesting subcategory, in
which most of the usual properties of (non-generalized) metric spaces are still
valid. They are sometimes also called pseudo-metric spaces in the
literature [29]}, [30]}, [31]}.
We write \(\)  for the full subcategory of \(\)  whose object are
symmetric generalized metric spaces, spaces \((X,d)\)  such that
\(d(x,y)=d(y,x)\)  for every \(x,y\in X\) .
The constructions of Proposition REF  are easily checked to
preserve the symmetry of spaces:
The category \(\)  is complete and cocomplete.
Notice that given a symmetric space \((X,d)\)  and \(x,x^{\prime },y,y^{\prime }\in X\) , we have
\(|d(x^{\prime },y^{\prime })-d(x,y)|\quad \leqslant \quad |d(x^{\prime },y^{\prime })-d(x,y^{\prime })|+|d(x,y^{\prime })-d(x,y)|\quad \leqslant \quad d(x,x^{\prime })\vee d(y,y^{\prime })\) 
the last step using the well-known “reverse triangle inequality”. The
distance \(d\)  can thus be seen as a morphism \(d:X\times X\rightarrow [0,\infty ]\)  in
\(\) .
Any generalized metric space can canonically be symmetrized in two ways as
follows.
The forgetful functor \(\)  admits a left adjoint sending a space
\((X,d)\)  to the symmetric space \((X,{d})\)  where the metric \({d}\)  is
called the symmetric metric generated by \(d\)  and is defined by
\({d}(x,y)\bigwedge _{x=x_0,x_1,\ldots ,x_{2n},x_{2n+1}=y}\sum _{i=0}^nd(x_{i+1},x_i)+d(x_{i+1},x_{i+2})\) 
It also admits a right adjoint sending \((X,d)\)  to the space \((X,d^\vee )\) 
equipped with the distance defined by \(d^\vee (x,y)=d(x,y)\vee d(y,x)\) . The
forgetful functor thus preserves limits and colimits.
For instance, consider the directed plane \(^2\) , whose distance is given by
\(d((x_1,x_2),(y_1,y_2))=d_{}(x_1,y_1)\vee d_{}(x_2,y_2)\) , and \(d_{}\) 
is described in Example REF . The left and right adjoint of the
proposition respectively equip \(^2\)  with the distances \(d\)  and \(d^\vee \) 
such that
\({d}((x_1,x_2),(y_1,y_2)){\left\lbrace \begin{array}{ll}|y_1-x_1|\vee |y_2-x_2|&\text{if $(y_1-x_1)(y_2-x_2)\geqslant 0$}\\|y_1-x_1|+|y_2-x_2|&\text{if $(y_1-x_1)(y_2-x_2)\leqslant 0$}\\\end{array}\right.}\) 
and
\(d^\vee ((x_1,x_2),(y_1,y_2)){\left\lbrace \begin{array}{ll}|y_1-x_1|\vee |y_2-x_2|&\text{if $(y_1-x_1)(y_2-x_2)\geqslant 0$}\\\infty &\text{if $(y_1-x_1)(y_2-x_2)\leqslant 0$}\\\end{array}\right.}\) 
For every points \(x\)  and \(y\)  in a generalized metric space \((X,d)\) , we have
\(d(x,y)\geqslant {d}(x,y)\)  (as witnessed by the unit of the monad on \(\) 
induced by the adjunction).
Moreover, if \(d\)  is a symmetric metric then \({d}=d\)  (the comonad
on \(\)  induced by the adjunction is the identity comonad).
We say a self-dual category \( is a category equipped with anisomorphism \)\( which is the identity on objects. The aboveconstruction for the left adjoint functor is a particular case of theconstruction of the free self-dual \)\(-category on a \)\(-category, and avariant of the more well-known construction of the enveloping \)\(-groupoidof a \)\(-category.\)

The underlying topological space of a metric space
We are now interested in equipping our spaces with a topology, in
constructing a decent functor \(\rightarrow \)  (in particular, we want directed
paths, see Definition REF , to be continuous). In the case of
symmetric spaces, a satisfactory answer is provided by the usual functor
\(\rightarrow \)  sending a symmetric space \((X,d)\)  to the topological space \(X\) 
equipped with the metric topology, which is generated by open balls
\(B^\varepsilon (x){y\in X}{d(x,y)<\varepsilon }\) 
for \(x\in X\)  and \(\varepsilon >0\) . Since the maps in \(\)  are nonexpansive, it
can be easily checked that they are continuous to the metric topology and
the functor is well-defined.
For (general) generalized metric spaces, the situation is however not so
clear. Before presenting our answer, we would first like to explain why other
“intuitive” options are not satisfactory. Given a space \((X,d)\)  and \(x\in X\) ,
one can construct past and future open balls of radius
\(\varepsilon >0\) , which are respectively defined by
\(B_-^{\varepsilon }(x)={y\in X}{d(y,x)<\varepsilon }\qquad \qquad \qquad B_+^{\varepsilon }(x)={y\in X}{d(x,y)<\varepsilon }\) 
Considering the topology generated by future open balls is intuitive, but leads
to a topology which is too fine: for instance, the map \(f:\rightarrow \)  such that
\(f(t)=0\)  if \(t<0.5\)  and \(f(t)=1\)  otherwise would be continuous this
topology.
Another option could also consider the topology generated by sets of the form
\(B_-^{\varepsilon }(x)\cup B_+^{\varepsilon }(x)\) . However, an easy computation
shows that in \(^2\) , the resulting topology is the discrete one. Namely, a
generating open set is drawn on the left below (continuous lines mean that the
border is included and dotted ones that the border is excluded). In the middle
right, an open set is shown (it is obtained by intersecting two generating open
sets as drawn on the middle left). Finally, by intersecting two such open sets,
we can obtain an open set reduced to a point, as shown on the right.
\(\begin{tikzpicture}[color=lightgray] (0,0) rectangle (-1,-1);[color=lightgray] (0,0) rectangle (1,1);(-1,0) -- (1,0);(0,-1) -- (0,1);[dotted] (-1,0) -- (-1,-1) -- (0,-1);[dotted] (1,0) -- (1,1) -- (0,1);\end{tikzpicture}\qquad \qquad \begin{tikzpicture}[color=lightgray] (0,0) rectangle (-1,-1);[color=lightgray] (0,0) rectangle (1,1);[color=lightgray] (.75,.75) rectangle (-.25,-.25);[color=lightgray] (.75,.75) rectangle (1.75,1.75);[color=gray] (-.25,-.25) rectangle (0,0);[color=gray] (0,0) rectangle (.75,.75);[color=gray] (.75,.75) rectangle (1,1);(-1,0) -- (1,0);(0,-1) -- (0,1);(-.25,.75) -- (1.75,.75);(.75,-.25) -- (.75,1.75);[dotted] (-1,0) -- (-1,-1) -- (0,-1);[dotted] (1,0) -- (1,1) -- (0,1);[dotted] (-.25,.75) -- (-.25,-.25) -- (.75,-.25);[dotted] (1.75,.75) -- (1.75,1.75) -- (.75,1.75);\end{tikzpicture}\qquad \qquad \begin{tikzpicture}[color=lightgray] (-.25,-.25) rectangle (0,0);[color=lightgray] (0,0) rectangle (.75,.75);[color=lightgray] (.75,.75) rectangle (1,1);(-.25,0) -- (.75,0);(0,.75) -- (1,.75);(0,-.25) -- (0,.75);(.75,0) -- (.75,1);[dotted] (-.25,0) -- (-.25,-.25) -- (0,-.25);[dotted] (1,.75) -- (1,1) -- (.75,1);\end{tikzpicture}\qquad \qquad \begin{tikzpicture}[color=lightgray] (-.25,-.25) rectangle (0,0);[color=lightgray] (0,0) rectangle (.75,.75);[color=lightgray] (.75,.75) rectangle (1,1);(-.25,0) -- (.75,0);(0,.75) -- (1,.75);(0,-.25) -- (0,.75);(.75,0) -- (.75,1);[dotted] (-.25,0) -- (-.25,-.25) -- (0,-.25);[dotted] (1,.75) -- (1,1) -- (.75,1);\begin{scope}[shift={(.75,-.75)}][color=lightgray] (-.25,-.25) rectangle (0,0);[color=lightgray] (0,0) rectangle (.75,.75);[color=lightgray] (.75,.75) rectangle (1,1);(-.25,0) -- (.75,0);(0,.75) -- (1,.75);(0,-.25) -- (0,.75);(.75,0) -- (.75,1);[dotted] (-.25,0) -- (-.25,-.25) -- (0,-.25);[dotted] (1,.75) -- (1,1) -- (.75,1);\end{scope}\end{tikzpicture}\) 
We hope to have convinced the reader that the canonical way of assigning a
topological space to a generalized metric space is the following
We define the forgetful functor \(\rightarrow \)  as the composite functor
\(\rightarrow \rightarrow \) , where the first functor \(\rightarrow \)  is the left
adjoint to the forgetful functor constructed in
Proposition REF  and the second functor \(\rightarrow \)  is
the forgetful functor described at the beginning of this section.
Example REF  illustrates why the left adjoint (and
not the right adjoint) is suitable here.
In the following, when we implicitly see a generalized metric space \((X,d)\)  as a
topological space, it will always be in this way, with topology generated by
the open balls \(B^\varepsilon (x)={y\in X}{{d}(x,y)<\varepsilon }\) .
Morphisms of spaces being nonexpansive functions, the following can easily be
shown:
A morphism \(f:X\rightarrow Y\)  of generalized metric spaces is continuous. In
particular, by Remark REF , given a space \((X,d)\) , the
distance \({d}:X\times X\rightarrow X\)  is continuous.
Notice the distance is not necessarily continuous to the induced
topology. For instance, in \(^2\)  (see the figure on the left),
\(\begin{tikzpicture}[->] (-.2,0) -- (1,0);[->] (0,-.2) -- (0,1);{(.2,.5)} node[above]{x};{(.8,.7)} node[right]{y};{(.8,.3)} node[right]{y^{\prime }};\end{tikzpicture}\qquad \qquad \qquad \qquad \begin{tikzpicture}(0,0) circle (.5);{(90:.5)} node[above] {x};{(140:.5)} node[above] {y};{(50:.5)} node[above] {y^{\prime }};\end{tikzpicture}\) 
when \(y\)  “moves” vertically to \(y^{\prime }\) , the value of \(d(x,y)\)  suddenly
“jumps” from a finite value to \(\infty \) . Similarly in \(\)  (figure on
the right), when \(y\)  moves to \(y^{\prime }\) , the value of \(d(x,y)\)  jumps from 0 to
\(2\pi \) .
The functor \(\rightarrow \)  preserves finite limits and small
coproducts.


It can be directly checked that the functor preserves binary products,
equalizers, and small coproducts, as described in Section REF ,
see also [17]}.
The functor does not preserve coequalizers.
Namely, if we consider the colimit of Example REF , the colimit as
topological spaces has points 0 and 1 separated in \(I_\omega \) , whereas
\(d_\omega (0,1)=0\)  and thus the points are not separated in the topological
space associated to the colimit of generalized metric spaces.
The functor does not preserve infinite products. Namely, given a
family \((X_i)\)  of generalized metric spaces, the underlying topology of the
generalized metric space \(\prod _iX_i\)  is the box topology, which is finer than
the product topology.

Directed paths
In this section, we define the notion of directed path in a generalized metric
space.
A path in a space \(X\)  is a continuous function \(\gamma :I\rightarrow X\) . Notice
that \(\gamma \)  is not required to be nonexpansive, it is a path in the
underlying topological space. The point \(x=\gamma (0)\)  (\(y=\gamma (1)\) ) is
called the source (target) of the path. We often write
\(\gamma :xy\)  to indicate that \(\gamma \)  is a path from \(x\)  to \(y\) .
The length \(\gamma \)  of a path \(\gamma \)  is defined by
\(\gamma \bigvee _{n\in }\bigvee _{0=t_0<t_1<\ldots <t_n=1}\sum _id(\gamma (t_i),\gamma (t_{i+1}))\) 
A path \(\gamma \)  is called directed (or a dipath, or a
rectifiable path) when its length is finite.
In the directed circle \(\)  (see Example REF ), directed
paths are those which are “turning counter-clockwise”, maps of the form
\(t\mapsto ^{\theta (t)}\)  where \(\theta :I\rightarrow ~[0,2\pi ]\)  is increasing
modulo \(2\pi \) .
By the triangle inequality, we always have
\(\gamma \geqslant d(\gamma (0),\gamma (1))\)  for an arbitrary path \(\gamma \) .
By Lemma REF , given a path \(\gamma :I\rightarrow X\)  and a morphism
\(f:X\rightarrow Y\) , the morphism \(f\circ \gamma :I\rightarrow Y\)  is also a path. Since \(f\)  is
nonexpansive, the path \(f\circ \gamma \)  is directed when \(\gamma \)  is: morphisms
preserve the direction of paths.
Since a (non-generalized) metric space is symmetric, it does not contain any
information about a “direction of time” and it is thus natural to expect
that every path is directed in this case. However, this is not the case
because it is well known that, in general, a path is not necessarily
rectifiable (for instance the well-known topologist's sine curve in \(^2\) 
defined by \(\gamma (0)=0\)  and \(\gamma (t)=t\sin (1/t)\)  for \(0<t\leqslant 1\) ). The
definition of directed path given in Definition REF  is thus not
completely satisfactory yet, and we leave the investigation of a more general
notion for future works; we expect that in the case of geometric semantics of
concurrent programs, the current and the right notions of directed paths
coincide.
Notice that many simple generalizations of the notion of directedness that one
could think of in order to overcome this problem do not work. For instance,
one could declare that a path \(\gamma \)  is directed if we have
\(d(\gamma (t_1),\gamma (t_2))<\infty \) , for every \(t_1,t_2\in I\)  with
\(t_1<t_2\) . However, with this definition, every path of the directed unit
circle (see Example REF ) would be directed.
Of course, the usual notions of homotopy and dihomotopy directly extend to our
setting:
A homotopy between two paths \(\gamma ,\rho :I\rightarrow X\)  is a continuous
function \(h:I\times I\rightarrow X\)  such that \(h(0,-)=\gamma \)  and \(h(1,-)=\rho \) . Such
a homotopy is a dihomotopy when \(h(t,-)\)  is a directed path for every
\(t\in I\) .
Intuitively, a morphism \({[0,a]}\rightarrow X\)  is the same as a rectifiable
path in \(X\) . However, because the maps take distance in account (they are
nonexpansive), this is only true up to an expected equivalence relation on paths:
if \(a\)  is too small, there is no possible parametrisation of the path.
A partial reparametrization is a continuous non-decreasing map
\(\theta :I\rightarrow I\)  and a reparametrization is a surjective partial
reparametrization. A trace is an equivalence class of paths under the
relation identifying two paths \(f\)  and \(g\)  whenever there exists a
reparametrization \(\theta \)  such that \(g=f\circ \theta \) . It can easily be shown
that length is well-defined on traces and a trace is rectifiable when its
length is finite. The following proposition shows that in every trace containing
a rectifiable path, there is a canonical one which corresponds to a morphism
in \(\) . Its proof is a direct generalization of the one in the classical
case Prop. I.1.2012. Given \(t,t^{\prime }\in \)  with \(t<t^{\prime }\) , we write
\(\iota _{[t,t^{\prime }]}:I\rightarrow [t,t^{\prime }]\)  for the function such that
\(\iota _{[t,t^{\prime }]}(u)=t+(t^{\prime }-t)u\) .
Suppose that \((X,d)\)  is a separated space and \(\gamma :I\rightarrow X\)  a directed path
of length \(a=\gamma \) . The function \(\lambda :I\rightarrow [0,a]\)  such that
\(\lambda (t)={\gamma \circ \iota _{[0,t]}}\)  is well-defined, continuous and
non-decreasing, and there exists a unique morphism \(\tilde{\gamma }:[0,a]\rightarrow X\) 
such that \(\tilde{\gamma }\circ \lambda =\gamma \)  and
\({\tilde{\gamma }\circ \iota _{[0,t]}}=t\)  for every \(t\in [0,a]\) .
In order to see why we need the separation hypothesis, consider a path in a
space \(X\)  equipped with the constant distance \(d_0\)  equal to 0. Any path
in \(X\)  has length 0 and the lemma is clearly wrong.
As a direct corollary of previous lemma, we have:
Given a separated space \(X\) , rectifiable traces are in bijection with maps
\({[0,a]}\rightarrow X\)  sending distance to length, with \(a\geqslant 0\) .
Finally, we briefly mention here that we can recover traditional notions of
directed spaces from generalized metric spaces.
The notion of d-space has emerged as the “standard” model for topological
spaces equipped with a notion of time direction [15]}. It
consists in a space together with the specification of which paths are to be
considered as directed.
A d-space \((X,dX)\)  consists of a topological space \(X\)  together with a
set \(dX\subseteq X^I\)  of paths in \(X\) , whose elements are called
d-paths, which contains all constant paths and is closed under
concatenation and reparametrization. We write \(\)  for the category of
d-spaces with continuous functions preserving d-paths as morphisms.
The operation which to a metric space associates its underlying topological
space together with the set of directed paths defines a functor
\(\rightarrow \) .
A metric space is acyclic when every path \(f:xx\)  with the same
source and target is constant. To such a space, we can associate the following.
A pospace \((X,\leqslant )\)  consists of a topological space \(X\)  equipped with
a partial order \(\leqslant \) . We write \(\)  for the category of pospace and
non-decreasing continuous maps.
Some authors impose additional restrictions on pospaces such as the fact
that \(\leqslant \)  is a closed subset of \(X\times X\) , or at least that the limit of
an increasing sequence of points is its supremum.
The operation which to a metric space \((X,d)\)  associates its underlying
topological space \(X\) , equipped with the partial order \(\leqslant \)  such that
\(x\leqslant y\)  if and only if \(d(x,y)<\infty \)  for every \(x,y\in X\) , extends to a
functor from the category of acyclic generalized metric spaces to the category
of pospaces.

Geodesic and length spaces
In this section, we briefly turn our attention to length spaces, since all
geodesic spaces are such, and the CAT(0) condition we are interested in is
formulated on such spaces, by considering the “size” of triangles whose sides
are geodesics.
Given a space \((X,d)\) , the intrinsic metric \({d}\)  is defined by
\({d}(x,y)\bigwedge _{\gamma :xy}\gamma \) 
A space equipped with its intrinsic metric is called a length space.
Consider the circle
\(={^{2\pi \theta }}{\theta \in }\subseteq \)  equipped
with the distance induced by the euclidian distance on \(\) , \(d(x+y, x^{\prime }+y^{\prime })=\sqrt{(x^{\prime }-x)^2+(y^{\prime }-y)^2}\) . This space is not a length
space. The associated intrinsic metric is
\({d}(^{\theta },^{\rho })\bigwedge {\rho ^{\prime }-\theta ^{\prime },\theta ^{\prime }-\rho ^{\prime }}{\theta ^{\prime }=\theta , \rho ^{\prime }=\rho \mod {2}\pi }\) 
A directed path \(\gamma :I\rightarrow X\)  is a geodesic when for every \(t<t^{\prime }\) 
in \(I\)  we have \(d(\gamma (t),\gamma (t^{\prime }))=\lambda (t^{\prime }-t)\)  with
\(\lambda =d(\gamma (0),\gamma (1))\) . A space is geodesic (uniquely geodesic) when between any two points at finite distance there
exists a geodesic (a unique geodesic).
Every geodesic space is a length space, but the converse is not true in
general (for instance, the Hopf-Rinow theorem [34]} provides
sufficient conditions on spaces so that a length space satisfying those
conditions is geodesic).
The space \(^2\)  equipped with the euclidian distance is geodesic. The
subspace \(^2\setminus {(0,0)}\)  is a length space but is not geodesic
since there is no path of length \(2=d(x,y)\)  from \(x=(0,-1)\)  to \(y=(0,1)\) 
(however, there exists a path of length \(2+\varepsilon \)  from \(x\)  to \(y\)  for
arbitrarily small \(\varepsilon >0\) ).
In the case of a geodesic space, Proposition REF  can be
reformulated as follows.
Given a separated space \(X\) , geodesic paths are in bijection with isometries
\({[0,a]}\rightarrow X\) , with \(a\geqslant 0\) .
The subcategory of length spaces is closed under colimits.


See Lem. I.5.2065. It can be checked directly that the property of
being a length space is preserved under taking coproducts and coequalizers.

Geometric realization of precubical sets
We now consider two ways of associating a generalized metric space to a
precubical set, and study the properties of the resulting space. Since here we
are mainly concerned about precubical sets arising as the cubical semantics of
concurrent programs, we study mainly finite geometric precubical sets, but try
to provide more general hypothesis when these generalizations are easy to
make. Part of the current section is a reformulation – and generalization – in
the categorical language of properties studied in the framework of polyhedral
complexes [35]}. The two main results of this section are
that metric and topological geometric realization provide comparable
constructions (Theorem REF ) and that realization of
precubical sets are CAT(0) cubical complexes (Theorem REF ).
Geometric realization
Recall from Example REF  that we write \(I=[0,1]\)  for the standard
interval, and we write \(I^n\)  for the standard (topological) \(n\) -cube
obtained as the product of \(n\)  copies of \(I\) . We write \(\delta ^-=0\)  and
\(\delta ^+=1\) . Given \(i\)  with \(0\leqslant i<n\) , and \(\epsilon =-\)  (\(\epsilon =+\) ),
the set of points in \(I^n\)  whose \(i\) -th coordinate is \(\delta ^\epsilon \)  is
isomorphic to \(I^{n-1}\)  and called the \(i\) -th back (front) face of
the cube. Now, consider the functor \(I:\rightarrow \)  such that the image of an
object \(n\in \)  is \(I^n\) , and the images of
morphisms \(\varepsilon ^\epsilon _{i,n}\)  are the morphisms
\(I(\varepsilon ^\epsilon _{i,n}):I^{n}\rightarrow I^{n+1}\)  such that
\(I(\varepsilon ^\epsilon _{i,n})(x_0,\ldots ,x_{n-1})(x_0,\ldots ,x_{i-1},\delta ^\epsilon ,x_i,\ldots ,x_n)\) 
they are the inclusions of the faces of
a cube into the cube. A topological space can be obtained from a precubical
set \(C\)  by taking a topological \(n\) -cube for each element of \(C(n)\)  an gluing
them according to faces.
The geometric realization functor \({-}:\hat{}\rightarrow \)  is the
functor obtained as the left Kan extension of \(I:\rightarrow \)  along the
Yoneda embedding \(y:\rightarrow \hat{}\) . More explicitly, given a cubical set
\(C\) , its geometric realization is the space
\({C}{\bigsqcup _{n\in }I^n\times C_n}/\approx \) 
where \(\approx \)  is the smallest equivalence relation such that
\((x,c)\approx (y,d)\)  whenever \(d=\partial ^\epsilon _{i,n}(c)\)  for some indices
\(\epsilon ,i,n\)  and \(I(\varepsilon ^\epsilon _{i,n})(y)=x\) .
One can define similarly a functor \(I:\rightarrow \)  (by post-composing previous
functor with the forgetful functor \(\rightarrow \) ), which induces, by left Kan
extension along the Yoneda embedding \(y:\rightarrow \hat{}\) , a
topological geometric realization functor
\(-:\hat{}\rightarrow \) . Unless we add the adjective “topological”,
“geometric realization” will always be meant in generalized metric spaces.
By Proposition REF , the forgetful functor \(\rightarrow \) 
preserves colimits, and therefore geometric realization commutes with it. And
similarly, it commutes with the symmetrization functor \(\rightarrow \) , which
is a left adjoint. In the following, we will mainly focus on symmetric spaces
for simplicity.
For every \(n\) -cube \(c\in C(n)\)  there is a canonical morphism of metric spaces
\(\iota _c:I^n\rightarrow {C}\)  such that the image of \(x\in I^n\)  is the equivalence
class of \((x,c)\) . Formally, these morphisms can be obtained as the cocone arrows
of the colimit defining the geometric realization. They allow one to see the
cube \(I^n\)  as a “subspace” of \({C}\) . Notice that there is no a priori
reason why these morphisms should be isometries; we will however see below that,
they are isometries “locally”. We say a cube \(c\)  contains a
point \(x\in |C|\)  when \(x\)  is in the image of \(\iota _c\) . When the precubical
set \(C\)  has no self-intersection (in particular when \(C\)  is geometric) the
function \(\iota _c\)  is injective, and we write \(\iota _c^{-1}\)  for its partial
inverse. In this case, following Def. 7.8100, given a point
\(x\in {C}\)  and an \(n\) -cube \(c\in C(n)\)  such that \(x\)  occurs in the image of
\(\iota _c\) , we write
\(\varepsilon (x,c)\bigwedge {d_{I^n}(\iota ^{-1}_c(x),K)}{\text{$K$ is a face of $I^n$ not containing~$x$}}\) 
with, by convention, \(\varepsilon (x,c)=\infty \)  when \(c\)  is a 0-cube (above,
the distance between \(\iota ^{-1}_c(x)\)  and \(K\)  is taken to be the infimum of
distances between \(\iota ^{-1}_c(x)\)  and some point of \(K\) ). We then define
\(\varepsilon (x)\bigwedge {\varepsilon (x,c)}{\text{$n\in $ and $c\in C(n)$ is such that $x$ belongs to the image of $\iota _{c}$}}\) 
It is easy to show that \(\varepsilon (x)>0\)  for any point \(x\in {C}\) ,
see 7.33112. This constant, called the escape distance
from \(x\) , intuitively reflects the fact that a path (or a chain) starting
from \(x\)  and going outside a simplex containing \(x\)  will at least be of length
\(\varepsilon (x)\) . Otherwise said, the distance from \(x\)  to a point \(y\) 
“near \(x\) ” (at distance less than \(\varepsilon (x)\) ) will be the same
whether we consider the distance within the face or in the whole complex:
Suppose given a precubical set \(C\)  with no self-intersection, and a point \(y\) 
such that \(d_{|C|}(x,y)<\varepsilon (x)\) . Then any cube \(c\)  which contains \(y\) 
also contains \(x\)  and we have
\(d_{{C}}(x,y)=d_{I^n}(\iota _c^{-1}(x),\iota _c^{-1}(y))\) .


See Lem. 7.9100. Fix a “chain” \(u=x_0,x_1,x_2,\ldots ,x_n\)  in
\({C}\)  from \(x=x_0\)  to \(y=x_n\) , a sequence of points such that \(x_i\) 
and \(x_{i+1}\)  both belong to \(\iota _{c_i}\)  for some given cube \(c_i\in C(n_i)\) 
(to be precise, the \(c_i\)  are part of the data defining the chain). Its length
is by definition
\(l(u)=\sum _i d_{I^{n_i}}(\iota _{c_i}^{-1}(x_i),\iota _{c_i}^{-1}(x_{i+1}))\)  and
the distance \(d_{{C}}(x,y)\)  is the infimum of lengths of such
chains. The points \(x_1\)  and \(x_2\)  belong to the image of \(\iota _{c_1}\) . If we
suppose moreover that \(l(u)<\varepsilon (x)\)  then \(x\)  also belongs
to \(\iota _{c_1}\) , and by the triangle inequality the chain
\(u^{\prime }=x_0,x_2,x_3,\ldots ,x_n\)  has smaller length. We can conclude by a simple
induction.
Given a precubical set \(C\)  with no self-intersection, its geometric
realization \({C}\)  is separated.


This is a corollary of Lemma REF , since the spaces \(I^n\) 
are separated.
The geometric realization of a precubical set is a length space.


The spaces \(I^n\)  are length spaces and, by Lemma REF ,
length spaces are closed under colimits.
The geometric realization of a finite dimensional precubical set \(C\)  is a
complete space.


The ideas is as follows, see Thm. 7.13101, of which this proof is
a variant, for details. Given a Cauchy sequence \((x_n)\)  in \({C}\) , we
show that it contains a convergent subsequence. The points \(x_i\)  belong to the
image of \(\iota _{c_i}\)  for some \(n_i\) -cell \(c_i\in C(n_i)\) . Up to taking a
subsequence, we can suppose that all the \(n_i\)  are equal and we write \(n\)  for
the corresponding integer: the points \(c_i\)  are the images \(\iota _{c_i}(x_i)\) 
for some points \(x_i\in I^n\) . Up to taking a further subsequence, we can
suppose that the sequence \((x_i)\)  converges to a point \(x_\infty \) . Now, noting
that the \(\iota _{c_i}\)  are nonexpansive, using an argument based on
\(\varepsilon (x_\infty )\)  as in the proof of Lemma REF , one
can show that the \(c_i\)  are all equal to some \(c_\infty \)  for \(i\)  big enough,
and conclude that the subsequence converges to \(\iota _{c_\infty }(x_\infty )\) 
in \({C}\) .
We have seen in Lemma REF  that the geometric realization of
a precubical set is locally isometric to a space \(I^n\) . The proof used here does
not really depend on the choice of the functor \(I:\rightarrow \)  used to specify
the realization of representable precubical sets, and would extend to other
choices. We however conjecture that, with this specific choice, this property is
more “global” in the sense that the canonical inclusions of standard cubes in
the realizations are in fact isometries. The intuition behind this is that
within a cube any two points are at distance at most one, and that a non-trivial
chain going outside a cube has to cross another cube and will thus be of length
more than one.
Conjecture  
Given a finite dimensional geometric precubical set \(C\) , \(n\in \)  and
\(c\in C(n)\)  the morphism \(\iota _c:I^n\rightarrow {C}\)  is an isometry.

Notice that the above conjecture is not true if the precubical set is not
supposed to be geometric. For instance, consider the following precubical
set \(C\) :
\({c^{\prime }@(ul,ur)^c}\) 
The morphism \(\iota _c:I^1\rightarrow {C}\)  is clearly not an isometry.
Moreover, the property strongly depends on the functor \(I:\rightarrow \)  we
used. For instance, suppose that we had defined the geometric realization
using the functor \(I\)  such that \(I(n)\)  is the set \(I^n\)  equipped with the
euclidian metric (instead of the product metric), and consider the following
precubical set \(C\) :
\({x[d]_g[r]^f@{}[dr]|&[d]^{g^{\prime }}y_1\\y_2[r]_{f^{\prime }}@/_2ex/[ur]|h&y}\) 
In the square, we have \(d_{I^2}(y_1,y_2)=\sqrt{2}\)  but in the realization we
have \(d_{{C}}(y_1,y_2)=1\) . The above precubical set is not geometric,
but it can easily be turned into a geometric one: instead of having one
edge \(h\) , consider a sequence of two edges \(h_1h_2\)  (whose length is 2),
and instead of gluing it along the diagonal of a square, glue it along the
diagonal of an hypercube of dimension 5, so that the length of the diagonal
is \(\sqrt{5}>2\) .

The topology of the geometric realization
In previous section, we have introduced two possible geometric realizations: in
metric spaces and in topological spaces. We now show that the two agree for the
precubical sets of interest here. Notice that, by
Remark REF , we have no hope to show this using very
general arguments since the forgetful functor \(\rightarrow \)  does not preserve
colimits (nor even finite ones).
Consider a symmetric generalized metric space \((X,d)\) . We write
\(U:\rightarrow \)  for the forgetful functor described in
Section REF .
Given an equivalence relation \(R\)  on \(X\) , the underlying sets of \((UX)/R\)  and
\(U(X/R)\)  are the same and the identity function \(f:(UX)/R\rightarrow U(X/R)\)  is
continuous.


The underlying sets of both \((UX)/R\)  and \(U(X/R)\)  are the same because the
forgetful functors \(\rightarrow \)  and \(\rightarrow \)  both admit a right
adjoint (see Proposition REF ).
Suppose given \(V\)  open in \(U(X/R)\) : for every \(x\in V\)  there exists
\(\varepsilon >0\)  such that \(B^\varepsilon _{X/R}(x)\subseteq V\) . Thus, for every
\(x\in f^{-1}(V)\) , there exists \(\varepsilon >0\)  such that
\(f^{-1}(B^\varepsilon _{X/R}(f(x)))\subseteq f^{-1}(V)\) . Given \(x\in X\) , we
have \(B^\varepsilon _X(x)\subseteq B^\varepsilon _{X/R}(x)\)  by
Remark REF . Therefore, for every \(x\in X\)  such that
\(x\in \pi ^{-1}(V)\) , there exists \(\varepsilon >0\)  such that
\(B^\varepsilon _X(x)\subseteq \pi ^{-1}(V)\) , from which we can conclude that
\(\pi ^{-1}(V)\)  is open.
The following lemma is well-known [36]}:
A continuous bijection \(f:X\rightarrow Y\)  between topological spaces such that \(X\)  is
compact and \(Y\)  is separated is an homeomorphism.


Given a closed set \(U\)  of \(X\) , \(U\)  is compact since \(X\)  is, therefore \(f(U)\) 
is also compact, and therefore \(f(U)\)  is closed since \(Y\)  is
separated. Therefore \((f^{-1})^{-1}(U)=f(U)\)  is closed and \(f^{-1}\)  is
continuous since the preimage of a closed set is closed.
The geometric realization of finite geometric precubical sets commutes with
the forgetful functor \(\rightarrow \) .


Given a finite geometric precubical set \(C\) , the colimit defining its
geometric realization can be computed as a quotient of the space
\(X=\coprod _{n\in }\coprod _{x\in C(n)}I(n)\) , by a relation that we
denote \(R\) . The space \(UX\)  is compact, as a finite coproduct of compact spaces
(the functor \(U\)  commutes with coproducts, see
Proposition REF ), and thus the space \((UX)/R\)  is
compact too, as a quotient of a compact space. Since \(C\)  is geometric, and
thus without self-intersection, its geometric realization \(U(X/R)\)  is
separated by Lemma REF . Finally, the identity function
\((UX)/R\rightarrow U(X/R)\)  is continuous by Lemma REF  and thus an
homeomorphism by Lemma REF .
Since the topology of a space is determined locally, previous proposition
can be generalized to the case of precubical sets which are only locally finite:
A precubical set is locally finite if for every vertex \(x\) , only
finitely many cubes have \(x\)  as iterated vertex.
The geometric realization of locally finite geometric precubical sets commutes
with the forgetful functor \(\rightarrow \) .


Suppose given a locally finite geometric precubical set \(C\)  and a
point \(x\in {C}\) . We write \(c\)  for the carrier of \(x\) , the cube
in \(C\)  of lowest dimension which contains \(x\) . Consider the precubical
set \(C_c\) defined as the smallest precubical subset of \(C\)  which contains all
the cubes having \(c\)  as iterated face (the star of \(c\) ): its cubes are faces
of maximal cubes with \(c\)  as iterated face. Since \(C\)  is supposed to be both
locally finite and geometric, the precubical set \(C_c\)  is easily shown to be
finite and we can apply Proposition REF . By
Lemma REF , a neighborhood of \(x\)  in the geometric
realization of \(C\)  is isometric to a neighborhood of \(x\)  in the geometric
realization of \(C_c\)  (because the lemma shows that the distance is the
distance of standard cubes). Therefore, locally around \(x\) , the metric
topology is the colimit topology.

Cubical complexes
Geometric precubical sets give rise to cubical complexes, in the following
sense.
A cubical complex \(K\)  is a topological space of the form
\(K{\bigsqcup _{\lambda \in \Lambda }I^{n_\lambda }}/{\approx }\) 
where \(\Lambda \)  is a set, \((n_\lambda )_{\lambda \in \Lambda }\)  is a family of
integers, and \(\approx \)  is an equivalence relation, such that, writing
\(p_\lambda :I^{n_\lambda }\rightarrow K\)  for the restriction of the quotient map
\(\bigsqcup _{\lambda \in \Lambda }I^{n_\lambda }\rightarrow K\) , we have

for every \(\lambda \in \Lambda \) , the map \(p_\lambda \)  is injective,

given \(\lambda ,\mu \in \Lambda \) , if \(p_\lambda (I^{n_\lambda })\cap p_\mu (I^{n_\mu })\ne \emptyset \)  then there is an isometry from a face
\(J_\lambda \)  of \(I^{n_\lambda }\)  to a face \(J_\mu \)  of \(I^{n_\mu }\)  such that
\(p_\lambda (x)=p_\mu (y)\)  if and only if \(y=h_{\lambda ,\mu }(x)\) .

A directed cubical complex is defined similarly, as a d-space of the
form \(K={\bigsqcup _{\lambda \in \Lambda }I^{n_\lambda }}/{\approx }\) .
The geometric realization of a geometric precubical set is a cubical complex.
Moreover, the metric of the geometric realization of a geometric precubical set
is precisely the intrinsic metric (as defined in Sect. I.7.33112).
Notice that the geometric realization of precubical complexes of
Example REF  which are not geometric are not precubical
complexes.
The converse of the above lemma is not true. For instance, one can construct a
Möbius strip as a complex, and it cannot be obtained as the geometric
realization of a geometric precubical set because there is a “mismatch of
direction” of the edges. One can actually show that directed geometric
realizations of geometric precubical sets are precisely directed cubical
complexes.
Finally, we mention the following useful fact, whose proof can be found
in 7.33112.
A finite dimensional precubical complex is geodesic.
To sum up the above properties shown on geometric realizations of geometric
precubical sets, we have:
Finite dimensional precubical complexes are complete geodesic length spaces.

Directed geometric realization
Interestingly, all the above properties can easily be checked to hold for a
variant of the geometric realization which is really “directed”, and makes
much more sense from a concurrency point of view. In Definition REF 
of geometric realization, we can replace the functor \(I:\rightarrow \) 
sending \(n\)  to \(I^n\)  by the functor \(:\rightarrow \)  which send \(n\)  to
\(^n\)  and thus obtain a variant of the notion of geometric realization where
not every path is directed.
The directed geometric realization \({C}\)  of a precubical complex
is the functor obtained as the left Kan extension of \(:\rightarrow \)  along
the Yoneda embedding \(y:\rightarrow \hat{}\) .
The directed geometric realization of a finite dimensional geometric
precubical set is a complete geodesic length space.
Given a precubical set \(C\) , we can consider its directed geometric
realization \({C}\) . A vertex in \(C\)  can be seen as a morphism \(Y0\rightarrow C\) 
(where \(Y\)  denotes the Yoneda functor, see Section REF ) and thus
induces, by functoriality of the realization, a point \({x}\)  of
\({C}\) , which is given by the image of the morphism
\({Y0}\rightarrow {C}\) . Similarly, a path (dipath) \(f\)  in \(C\)  induces
a path (dipath) \({f}\)  in \({C}\) . It is easy to show that
given two dipaths \(f,g:xy\)  in \(C\) , if they are homotopic (dihomotopic) then the dipaths \({f}\)  and \({g}\)  are also homotopic
(dihomotopic). A converse property was shown by Fajstrup for locally
finite precubical sets [1]} (more exactly, this result was
formulated for geometric realization of precubical sets as d-spaces, but the
proof adapts straightforwardly to the case of generalized metric spaces).
Given \(C\)  geometric and locally finite, a geometric and locally finite
precubical set, the homotopy (dihomotopy) classes of dipaths from \(x\) 
to \(y\)  in \(C\)  are in bijection with homotopy (dihomotopy) classes of
dipaths from \({x}\)  to \({y}\)  in \({C}\) .
From the previous proposition and Theorem REF , one can deduce
that, for dipaths between any two points which are realizations of vertices
of \(C\) , homotopy coincides with dihomotopy in \({C}\) . Variants of this
properties have been shown in the literature: in the case of geometric semantics
of “simple” programs with mutexes [38]}, in the case of cube
complexes [22]} (see also next section). A similar observation has
been made for spaces which are hypercontinuous lattices equipped with their
Lawson topology, such that their underlying space has connected CW
type [40]}. In that case also, increasing paths that are homotopic
are in fact dihomotopic.

Non-positively curved spaces
CAT(0) spaces
We now recall the notion of non-positively curved space (also called CAT(0)
space), with the aim of showing that this notion is a topological counterpart of
the notion introduced for precubical sets (Definition REF ). We
chose not to define this earlier in the paper in order to emphasize that this is
only an inspiration for our axiomatics on precubical sets, but the geometric
interpretation is not needed in order to work with non-positively curved
precubical sets (excepting, maybe, to forge intuitions).
This notion generalizes hyperbolic geometry by formalizing the observation that,
in a non-positively curved space, triangles with geodesic sides appear to be
thinner than in usual, flat, spaces. Its importance is due to the numerous
applications this notion has allowed. We only mention basic notions here, and
refer the reader to standard texts for a more detailed presentation of the
subject [14]}, [35]}, [43]}.
In the rest of this section, for simplicity, we only consider symmetric
generalized metric spaces, since the topology of a space does not depend on its
direction. Interesting possible generalizations in the directed case are
mentioned in Section .
A geodesic triangle \(\Delta (x,y,z)\)  in a geodesic metric space \(X\) 
consists of three points \(x\) , \(y\) , \(z\)  and three geodesics joining any pair of
two. A comparison triangle for a geodesic triangle \(\Delta (x,y,z)\) 
consists of an isometry \(-:\Delta (x,y,z)\rightarrow ^2\)  whose image is a geodesic
triangle \(\Delta (x,y,z)\) , where \(^2\)  is equipped with the
usual euclidian distance \(d_{^2}\) .
We now recall the definition of non-positively curved space based on the
comparison axiom of Cartan, Alexandrof and Topogonov. This is the origin of the
name CAT(0), where the 0 refers to the fact that strictly positive or negative
curvature can also be defined in a similar way, but we will refrain from
introducing those in full generality here (see below).
A geodesic triangle \(\Delta (x,y,z)\)  is CAT(0) when there exists a
comparison triangle \(\Delta (x,y,z)\)  such that for any two
points \(p,q\in \Delta (x,y,z)\) , we have \(d(p,q)\leqslant d_{^2}(p,q)\) . A
geodesic metric space is CAT(0) when every geodesic triangle is CAT(0),
and locally CAT(0) or non-positively curved () when every
point admits a neighborhood which is CAT(0).
These spaces enjoy many nice properties such as being (locally) uniquely geodesic
and contractible. We refer the reader to [35]} for more details about those.
Other notions of curvature can be defined if we consider other “model spaces”
instead of \(^2\)  in which we take our comparison triangles. This amounts, in
Definitions REF  and REF , to consider geodesic
triangles \(-:\Delta (x,y,z)\rightarrow M_k\)  where \(M_k\)  is called a model space. For
\(k=0\) , we have \(M_k=^2\)  and we recover the above definitions; for \(k>0\) , \(M_k\) 
is a 2sphere (the smaller \(k\)  is, the bigger its radius is); for \(k>0\) ,
\(M_k\)  is a hyperbolic space. Compared to usual model spaces \(M_0\) , triangles in
model spaces \(M_k\)  are fatter when \(k>0\)  and slimmer when \(k<0\) , this getting
more accentuated when \(|k|\)  becomes large.
In particular, for \(k=1\) , we consider the standard 2sphere \(\) 
equipped with the distance \(d\)  such that \(d(x,y)\in [0,\pi ]\)  is defined by
\(\cos (d(x,y))=\langle x,y\rangle \) . A space is CAT(1) when for every
triangle \(\Delta (x,y,z)\)  whose diameter is less than \(2\pi \) , there exists a
comparison triangle \(\Delta (x,y,z)\)  in \(\) , such that we
have \(d(p,q)\leqslant d_{}(p,q)\)  for every points
\(p,q\in \Delta (x,y,z)\) .

The Gromov link condition
In this section we recall the characterization given by
Gromov [14]} of CAT(0) cubical complexes, see
also II.5.4206 and II.5.20212. We first introduce some
necessary definitions.
[Section 7.14102]
Given a geodesic metric space \(X\)  and a point \(x\in X\) , the link
\(_X(x)\)  of \(x\)  in \(X\)  is the set of geodesics \(\gamma :[0,a]\rightarrow X\)  such
that \(\gamma (0)=x\) , equipped with the compact-open topology, quotiented by the
relation identifying two paths which coincide on an interval of the for
\([0,\varepsilon [\)  for some \(\varepsilon >0\) , the “directions” from \(x\) 
pointing into \(X\) . This space can be metrized using the angle between two such
directions.
This notion of link can be formally related to the one introduced for precubical
sets in Definition REF  by observing that the former is a
geometric realization of the latter (where the standard \(n\) -simplex is realized
as a spherical simplex with edges of length \(\pi /2\) ).
An abstract simplicial complex is flag if whenever the complex contains
the 1-skeleton of a simplex, it also contains the simplex: given vertices
\(x_1,\ldots ,x_k\)  such that \({x_i,x_j}\)  are simplices for every indices
\(i,j\) , the set \({x_1,\ldots ,x_k}\)  is also a simplex.
Again, this notion corresponds to the one of Definition REF  through
the geometric realization.
Finally, we can explain in which way our conditions for non-positively curved
precubical sets (Definition REF ) correspond to the traditional
geometric one.
Given a finite dimensional geometric precubical set \(C\) , the following are
equivalent:

\({C}\)  is non-positively curved

in \({C}\)  the link of every point is CAT(1)

in \({C}\)  the link of every vertex is a flag complex

in \(C\)  the link of every vertex is a flag complex

\(C\)  satisfies the cube condition

Moreover, the following are equivalent:

\({C}\)  is CAT(0)

\({C}\)  is uniquely geodesic

\({C}\)  is non-positively curved and simply connected

\(C\)  satisfies the cube condition and is simply connected

First, notice that because \(C\)  is supposed to be finite dimensional, its
realization is geodesic by Proposition REF . The equivalence
between (i), (ii) and (iii) is due to Gromov [14]}, see
also Thm. 5.20212. The equivalence between (iii) and (iv) is
immediate and the equivalence between (iv) and (v) was shown in
Theorem REF .
The equivalence between (i'), (ii') and (iii') is due to
Gromov Thm. 5.5207. The equivalence between (iii') and (iv')
follows from the equivalence between (i) and (v).

Conclusion and future work
We showed in this article that numerous concepts from different fields of
mathematics and computer science are closely related, non-positively curved
spaces and rewriting systems with the cube property in particular, 
These are important observations since, in many ways, non-positively curved
spaces are “simpler” to work with than general spaces: topological invariants
are much simpler, the homology and homotopy groups have no torsion, and
their universal covering space are contractible [35]}.
There are many possible extensions to this work. First, in the case of a
non-positively curved precubical set, as used in the geometric semantics of
programs in Section REF , we believe that the coreflexion of the
adjunction between (some form of labeled) precubical sets and (labeled) prime
event structures of [48]} is directly linked to the
universal dicovering in the sense of [38]}. This would enlighten the
relationship between these two models, in case we are dealing with concurrent
programs with mutual exclusion primitives.
Our original idea was that for non-positively curved spaces \(X\) , dihomotopy of
dipaths can be characterized by the first relative homology group \(H_1(X,A)\) 
where \(A\)  is the subspace of \(X\)  formed of the initial and final points of the
dipaths we are considering. By the work of Steiner [50]},
we know that the homotopy 2-categories, for some particular loop-free spaces,
are in one-to-one correspondence with some particular augmented directed
complexes, and that homotopic dipaths would map onto homologous elements of the
corresponding chain complex. In the case of non-positively curved spaces, this
implies that dihomotopic dipaths would be mapped onto homologous elements of the
underlying chain complex, in a not too distant manner, by Hurewicz theorem, up to abelianization. Unfortunately, it seems that we need to further shrink
down the class of spaces so that dihomotopy of dipaths can be fully
characterized by this first relative homology group, and there are probably
subtle combinatorial properties to be discovered.
We also expect to extend the results of this article to programs with resources
of arbitrary capacity, where we still have some control of the homotopy type of
the spaces generated by the semantics of such programs. This is, after all, part
of an endeavor to better understand the geometries that can appear in the study
of rewriting, concurrent and distributed systems, where other primitives
(test-and-set and all read-modify-write statements) will generate different
types of geometries. The relationship between metrics and (di-)homotopies,
unravelled in this paper, may also pave the way to considering timed concurrent
models, studied up to deformation (and amenable to state-space reduction
techniques [38]}). This has actually already been used in a different
context, in robotics, by Ghrist and collaborators, to design efficient
algorithms, see [22]}.
