{'fraction_non_alphanumeric': 0.045263605040826924, 'fraction_numerical': 0.010478123377542833, 'mean_word_length': 3.6414019715224533, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Context for models of concurrency

Many categories have been used to model concurrency. Using any of these, the challenge is to reduce a given model to a smaller representation which nevertheless preserves the relevant computer-scientific information. That is, one wants to replace a given model with a simpler model with the same directed homotopy-type. Unfortunately, the obvious definition of directed homotopy equivalence is too coarse. This paper introduces the notion of context to refine this definition.


Introduction
Various topological models are being used for studying concurrency. Among them are precubical complexes [7], d-spaces [9,10], local po-spaces [4,8], and FLOW [6]. For a given concurrent system, each of these categories provides a model which captures the relevant computer-scientific properties of the system. These categories are large in two senses. They are large 'locally' in that a given model contains many paths which correspond to executions which are essentially equivalent. They are also large 'globally' in that a given concurrent system has a large number of models within the category. The size of these categories is a strength in terms of their descriptive power. However, to aid in calculations one would like to reduce these models to a smaller, possibly even discrete, representation.
A major goal of current research in this area is to introduce equivalences to obtain such smaller representations, which nevertheless still retain the relevant computer-scientific properties.
On the local front progress has been made in reducing the path space of a given model using directed homotopies of paths and the fundamental category [9]. One global approach is to pass to the component category [5,13]. In this paper we introduce another global approach, which is perhaps more geometric and which is compatible with the model categorical approach of [1].
In the classical (undirected) topological case, the solution to this 'global' problem is well-understood. The equivalent spaces are the (weak) homotopy equivalent ones. So for example, all of the contractible spaces (those homotopy equivalent to a point) are equivalent.
In the directed case there is a similar notion of directed homotopy equivalence (abbreviated to dihomotopy equivalence, which will be defined in the next section). However this notion is too coarse.  Clearly a stronger notion of equivalence is needed. Since − → I and − → I × − → I both have one initial state and one final state and all execution paths seem to be essentially equivalent it seems natural that we should look for a definition of equivalence under which these are equivalent. However even this 'equivalence' has a pitfall.
For a notion of equivalence to be practical it should continue to hold under certain 'pastings'. Our philosophy is the following. If we make the same addition to equivalent models we should still have equivalent models.
I be the images of x and y under the assumed equivalence ( Figure 2). Then either x ′ ≤ y ′ or y ′ ≤ x ′ , since − → I is totally ordered. If x ′ ≤ y ′ then identify b 1 and x and identify a 2 and y. Call this space B and denote C the space obtained by collapsing − → I × − → I ⊂ B to − → I using the given equivalence ( Figure 3). Then there is an execution path from a 1 to b 2 in C but not in B. So the concurrent systems modeled by B and C are not equivalent. A similar construction is possible if y ′ ≤ x ′ . Thus from this point of view − → I × − → I and − → I should not be equivalent. This gives a good indication of the current state of affairs for determining a global notion equivalence. We don't even know whether or not − → I × − → I and − → I should be equivalent.
In this paper we introduce the idea of context. Whether or not − → I and − → I × − → I are equivalent depends on the context. If we permit pastings as in Example 1.2, then they are not equivalent. However if we only permit pastings to the initial and final points of − → I and − → I × − → I then they are equivalent. From the computer-scientific point of view this can be interpreted as follows. We cannot expect equivalent concurrent systems to still be equivalent after arbitrary (but equal) changes. However, if equal additions are made in a suitably modular way, then the resulting systems should still be equivalent.
It should be noted that in the examples in this paper the context is chosen 'by hand'. The problem of choosing the context is related to the components of the fundamental category [5] and to the universal dicovering space [3]. A procedure for choosing the context is a subject for future research. Acknowledgments. The author would like to thank the referee for simplifying the proof of Proposition 3.5.

Context for directed homotopy equivalences
In this section we make precise the intuitive ideas presented in the introduction.
• A partial order on a topological space U is a reflexive, transitive, anti-symmetric relation ≤. If U has a partial order ≤ which is a closed subset of U × U under the product topology, then call U a po-space or pospace.
. • A product of pospaces (U 1 , ≤ 1 ) and (U 2 , ≤ 2 ) is a pospace whose underlying topological space is U 1 × U 2 and whose order relation is given by (x, y) ≤ (x ′ , y ′ ) if and only if x ≤ 1 x ′ and y ≤ 2 y ′ . • A subspace A of a pospace U inherits a pospace structure under the definition x ≤ A y if and only if x ≤ U y. This is called a sub-pospace.
Definition 2.2. Let Pospace be the the category whose objects are pospaces and whose morphisms are dimaps.
For the sake of simplicity we will work with pospaces but one should be able to easily extend or adapt the constructions presented here for other models of concurrency. Let Definition 2.3.
• Given dimaps f, g : g. This is an equivalence relation.
In this case write B ≃ C.
Our explicit dihomotopies will often be of the following form.
Definition 2.4. Assume that C is a pospace whose underlying topological spaces is a subspace of R n for some n. Assume f, g : B → C are two dimaps. Let the linear interpolation between f and g be the map H : B × − → I → R n given by Remark 2.5. Note that there is no guarantee that the image of such a map is in C. However one can check that it is for the cases we will consider. Lemma 2.6. Assume that C is a pospace whose underlying topological spaces is a subspace of R n for some n. If f, g : B → C are dimaps such that for all b ∈ B, f (b) ≤ g(b) then if the image of the linear interpolation H between f and g is in C then H is a dihomotopy from f to g.

Proof.
That H restricts to f and g follows from the definition of linear interpolation. It remains to check that H is a dimap. Figure 1). We will show that under Definition 2.3, 2 This is the notion of dihomotopy in [9] which is stronger than the notion of dihomotopy in [4] (which uses I = [0, 1] with the trivial ordering Then H is a dimap and is the desired homotopy Id− → I → g • f .
In exactly the same way one can show that the constant map f : Let H 1 be the linear interpolation between Id− → X and h and let H 2 be the linear interpolation between g • f and h. Then H 1 and H 2 are dimaps and are the desired dihomotopies.
We will show that in the right context it is no longer true that − → I , − → I × − → I , and − → X are dihomotopy equivalent to a point. Definition 2.8. Let the context be an object A ∈ Pospace. Instead of working in the category Pospace we will work in the category A ↓ Pospace of pospaces under Definition 2.10.
• Given dimaps f, g : g. This is an equivalence relation.
We can think of this as dihomotopy rel A. In case the context A is one point or two points we get pointed and bipointed dihomotopies. However we will see that this notion is useful for more general contexts. Example 2.11. Let us return to the example above. In the context of its end points − → I is no longer dihomotopic to a point. There is a dimap Then φ is the desired dihomotopy rel {a, b}.
Hence − → I × − → I and − → I are dihomotopy equivalent in the given context.

Context and the fundamental category
We will now introduce some definitions and prove some lemmas that will allow us to relate dihomotopy rel A to the fundamental category. Furthermore it will enable us to quickly see that certain spaces are not dihomotopy equivalent in a given context.
− → I → B be dipaths such that γ 1 (0) = γ 2 (0) = x and γ 1 (1) = γ 2 (2) = y. Then γ 1 and γ 2 are dihomotopic if they are dihomotopy equivalent with respect to their endpoints. That is, The fundamental category of B is the category − → π 1 (B) whose objects are the points of B and whose morphisms between x and y are the elements of 3 This differs from the definition of fundamental category in [5] where the dihomotopy classes of dimaps use I and not Proof. By definition there is a dimap g : C → B such that g • f ≃ Id B and f • g ≃ Id C . So by Lemma 3.4, for any a, b ∈ A, any dipath γ : − → I → B such that γ(0) = ι B (a) and γ(1) = ι B (b) and any dipath γ ′ :  a, b) is an isomorphism.

Finding simpler models using context
In this section we look at two two-dimensional pospaces with a given context. We show how each of them can be replaced with an equivalent one-dimensional pospace by constructing explicit directed homotopy equivalences.  (1, 1). Intuitively we will contract B to C in two stages. First we will expand the missing square ( 1 and then to (0, 1) × (0, 1). The first will be done by a map h which we define below and the composite of the two will yield the desired dihomotopy equivalence f .  Figure 5. The graphs of F 1 , F 2 , and F 2 • F 1 .
We will now give explicit dihomotopies rel A showing that g • f ≃ Id B rel A and f • g ≃ Id C rel A. Let H 1 and H 2 be linear interpolations between Id B and h and between g • f and h. That is, F 1 (y)), and Note that F 1 and F 2 fix 0 and 1, so H 0 and H 1 fix the marked points (0, 0) and (1, 1). By Lemma 2.6,    In this example we give an explicit dihomotopy between the famous Swiss flag pospace in Figure 6 and the one-dimensional sub-pospace in Figure 7 in the context of four points.
Let  Intuitively we will contract B to C be applying four maps which are described in Figure 8.
Let g : C → B be the dimap given by g(x, y) = (x, y). Let f : B → C be the dimap given by f (x, y) = f 4 • f 3 • f 2 • f 1 (x, y) where f 1 , f 2 , f 3 , and f 4 are defined in (1) below. From the sketches of f 1 , f 2 , f 3 , and f 4 in Figure 8, one can see that they are dimaps. As in the previous example we will give a chain of dihomotopies rel A to show that Id B ≃ g • f . Since C is a subspace of B and g • f = f = f • g this will restrict to a chain of dihomotopies rel A which show that Id C ≃ f • g. As a result we will have that B ≃ C.
Therefore Id B ≃ g • f . Restricting to C gives a chain of dihomotopies showing Id C ≃ f = f • g. Hence B is dihomotopy equivalent to C rel {a, b, c, d}.

Pushouts of dihomotopy equivalences
In this section we elaborate on the statement made in the introduction that dihomotopy equivalences should be preserved by 'pastings'. In fact we discuss the construction of a homotopy theory for concurrency. In order that we do not lose focus from the main ideas of this paper, we will defer the details of the definitions and constructions of this section to the appendix.
An excellent framework for a homotopy theory on a category is given by a model structure on the category [12]. A category with a model structure and all small limits and colimits is called a model category. A model structure has three special classes of morphisms: fibrations, cofibrations, and weak equivalences which satisfy certain axioms (see Appendix A for the full definition).
The category Pospace has all small limits and colimits. However it is too restrictive to model many concurrent systems (for example pospaces cannot contain loops). Though all of our examples are in Pospace a better framework for concurrency is the category LoPospc of local pospaces. A local pospace is a topological space such that each point has a neighborhood which is a pospace and that these local orders are compatible (for a precise definition see Appendix B). Unfortunately, unlike Pospace, LoPospc does not contain all small colimits. However there is a formal method of enlarging a category to one with all small limits and colimits. 4 Furthermore this larger category has a canonical model structure! [2] For details on how this theory can be applied to LoPospc see the appendix and [1]. In the appendix we give a more precise version of the following theorem (Theorem B.4) which is proved in [1].
Theorem 5.2. Let C = LoPospc. Then C is a subcategory of a model category UC. The morphisms in C that are cofibrations are the monomorphisms and the morphisms in C that are weak equivalences are the isomorphisms.
From the point of view of just C, this model structure is almost trivial. However one can localize UC with respect to a set M of morphisms in C to obtain a new category UC/M. UC/M has the same objects and cofibrations as UC but the morphisms in M are now weak equivalences [2]. The problem is to choose a good set of morphisms M . For example, we can take M to be the set of dihomotopy equivalences in C.
One of the key properties of UC and UC/M is that they are left proper. That is, the pushout of a weak equivalence over a cofibration is a weak equivalence.
In particular in UC/M if f ∈ M then g is a weak equivalence.  Figure 2). We have the following pushout diagram.
Since the inclusion j is a cofibration, we get a weak equivalence between B and C. However as discussed in Example 1.2, B should not be equivalent to C. The solution to this problem is to work with A ↓ LoPospc instead of LoPospc where the choice of context A ∈ Ob LoPospc depends on the pushouts that one would like to consider.
In the example above the right context is clearly the points x, y ∈ − → I × − → I and 6 the map f is not a dihomotopy equivalence rel A. So we are not forced to conclude that there is a weak equivalence between B and C.
In the following two examples we examine the 'pastings' of two copies of − → I × − → I with a square removed. We show how choosing the right context allows us to find a one-dimensional sub-pospace which is dihomotopy equivalent to the pushout.
Unlike the previous section, we will not write out the explicit dihomotopy equivalences in these two examples.  Figure 10 with the rectangle 0, 1 2 × ]0, 1[ removed and the same marked points. Then there is a dihomotopy equivalence f : B ≃ − → B ′ rel A. One can construct the required dihomotopies by stretching the region 2 5 ≤ y ≤ 3 5 first to y = 1 and then to y = 0. Next one stretches the region 1 5 ≤ x ≤ 2 5 first to x = 1 2 and then to x = 0. All this is done while leaving the three marked points fixed.
Then E is the pospace obtained by attaching the bottom edge of B ′ to the top edge of C. Since C includes into E we can take the following pushout. Figure 12 obtained by attaching the bottom edge of B ′ to the top edge of C ′ .
Example 5.5. Let A, B, C, B ′ and C ′ be as in the previous example, except that the marked points on B and B ′ are taken to be on the top edge, and the marked points on C and C ′ are taken to be on the bottom edge. Let D ′ be the space obtained by attaching C along its bottom edge to the top edge of B.
Then as in the previous example D ′ is dihomotopy equivalent to F ′ where F ′ is the pospace in Figure 13 obtained by attaching the bottom edge of C ′ to the top edge of B ′ .
Finally F ′ is dihomotopy equivalent rel A to the space G ′ in Figure 13. Consider F ′ and G ′ as sub-pospaces of − → I × − → I . The dihomotopy is obtained by collapsing the regions [ 1 2 , 1] × [0, 1 2 ] using (x, y) → (x, 1 2 ), and then collapsing the square [0, 1 2 . 5 Being precise, if we consider the pushout F to be a subspace of I ×I then the points [0, Example 5.6. Finally we give an example which requires a non-discrete context. Let X = − → I × − → I . We will show that if we want to use X to construct a certain space Z then there is no appropriate finite context.
Let I be the unit interval [0, 1] together with the trivial partial order given by x ≤ I y if and only if x = y. Let ϕ : I → X be the inclusion of the anti-diagonal, given by t → (t, 1 − t) (see Figure 14). Let Y = I × − → I and let ψ : I → Y be the inclusion of the central line, given by t → (t, 1 2 ) (see Figure 14). Define the pospace Z obtained by gluing X and Y together along the images of I. That is, Z is the following pushout.
We claim that if we want to consider this pushout then there is no appropriate finite context. For α ∈ I let p α := ι X (ϕ(α)) = ι Y (α, 1 2 ), p 0 α = ι Y (α, 0) and p 1 α = ι Y (α, 1). Notice that for s = t ∈ I there does not exist a dipath in Z from p 0 s to p 1 t . Now let A be some context and fix ι I : A → I which determines ι X : A → X and ι Y : A → Y . Let f : X → X ′ be some dihomotopy equivalence rel A. Let Z ′ and g be defined by the following pushout.
Assume there exists s = t ∈ I such that f (ϕ(s)) = f (ϕ(t)). We claim that there is a dipath from g(p 0 s ) to g(p 1 t ). In Z there is a dipath from p 0 s to p s and a dipath from p t to p 1 t . The concatenation of the images of these paths under g gives the desired dipath in Z ′ . But this contradicts Proposition 3.5.
Therefore there should not have been an equivalence f such that f (ϕ(s)) = f (ϕ(t)) for some s = t ∈ I. We can prevent this difficulty if we use the context A = I together with ι I = Id I .
On the other hand with any finite context A, we claim that there is always such a dihomotopy equivalence f . Assume that A is a finite context and fix ι I : A → I. Since A is finite there is some interval [a, b] ⊂ I\ι I (A). Let f : X → X be the dihomotopy equivalence given by the concatenation of the following two maps. First collapse the region [a, b] × I to the right. Then collapse the region upwards. Then f is a dihomotopy equivalence rel A but f (ϕ(a)) = f (ϕ(b)).
The category sSet has a model structure in which the cofibrations are the monomorphisms and the weak equivalences are the morphisms f such that |f | the geometric realization of f is a weak equivalence in the category of topological spaces (that is, it induces isomorphisms between homotopy groups). For more details see [12].
The category of simplicial presheaves has a canonical model structure, called the cofibrant model structure, where the weak equivalences and the cofibrations are defined objectwise. That is, a morphism f in sPre(C) is a weak equivalence or cofibration if and only if for each X ∈ Ob C the morphism f (X) is a weak equivalence or cofibration in sSet.
Now one can localize this model category [11] with respect some set of morphisms M to get a new model category sPre(C)/M. This model category has the same objects, but in addition to the previous weak equivalences, the morphisms in M are now weak equivalences. For example if C = LoPospc then one could localize with respect to all dihomotopy equivalences (it makes sense to say this because of the embedding of C in sPre(C)).

Appendix B. Local po-spaces
In this section we give a precise definition of the category LoPospc of local pospaces and use it to give a more precise version of Theorem 5.2. Local pospaces are defined in [4,1]. Here we follow [1].
• Given a topological space M , an order atlas on M is an open cover 6 U = {U i } indexed by a set I such that each U i is a pospace and that the orders are compatible. That is, given x, y ∈ U i ∩ U j , x ≤ i y if and only if x ≤ j y.
• Let U = {U i } and V = {V j } be two order atlases. Then V is said to be a refinement of U if for any U i and any x ∈ U i there exists a V j containing x which is a sub-pospace of U i . • Two order atlases are said to be equivalent if they have a common refinement. One can check that this defines an equivalence relation. • Define a local pospace to be a topological space together with an equivalence class of order atlases. Definition B.2. Define LoPospc to be the category whose objects are local pospaces whose underlying topological spaces are subsets of R n for some n, 7 and whose morphisms are dimaps between local pospaces.
Remark B.3. Notice that we have restricted the class of local pospaces in our category. This is done precisely so that the resulting category LoPospc is a small category, which is used to apply the machinery of Appendix A. For the purposes of concurrency, this does not seem to be a significant limitation. Furthermore, it may be possible that any local pospace can be 'found' in sPre(LoPospc).
Nevertheless, a consequence of this, is that the category Pospace in Definition 2.2 is not a subcategory of LoPospc. Of course one could define a new category Pospace ′ whose objects are those pospaces whose underlying topological spaces are subsets of R n for some n. Then Pospace ′ is a subcategory of LoPospc. All of our examples are in Pospace ′ .
We can now give a more precise version of Theorem 5.2.
Theorem B.4 ([1]). There exists a model structure on sPre(LoPospc) such that the cofibrations are the monomorphisms. Furthermore the morphisms in LoPospc which are weak equivalences in sPre(LoPospc) are just the isomorphisms.