A graph-semantics of business configurations
Abstract
In this paper we give graph-semantics to a fundamental part of the semantics of the service modeling language SRML. To achieve this goal we develop a new graph transformation system for what we call 2-level symbolic graphs. These kind of graphs extend symbolic graphs with a simple 2-level hierarchy that can be generalized to arbitrary hierarchies. We formalize the semantics using this new graph transformation system using a simple example of a trip booking agent.
Full text
A graph-semantics of business configurations José Luiz Fiadeiro1, Nikos Mylonakis2, and Fernando Orejas2 1Royal Holloway, University of London 2Department of Computer Science, UPC September 10, 2014 Abstract In this paper we give graph-semantics to a fundamental part of the semantics of the service modeling language SRML. To achieve this goal we develop a new graph transformation system for what we call 2-level symbolic graphs. These kind of graphs extend symbolic graphs with a simple 2-level hierarchy that can be generalized to arbitrary hierarchies. We formalize the semantics using this new graph transformation system using a simple example of a trip booking agent. 1 Introduction SRML ([8, 10, 11]) is a service modeling language designed within the project SENSORIA. Its state model is considered at two levels of abstraction. Roughly, at the lowest level, a state configuration is a graph consisting of interconnected components and, at the highest level, business configurations are graphs consisting of interconnected activities, where each activity is a graph of components. This definition at two levels of abstraction is needed to allow for dynamic service binding. Unfortunately, the operational semantics of SRML is defined in a relative ad-hoc way, which means that, to animate its models, one would have to build a specific implementation. The goal of this work is to provide a graph transformation semantics for SRML so that its models could be animated using some graph transformation tool, such as the Maude implementation of graph transformation [2]. Following these ideas, in this paper, we present a new framework of 2-level graphs, based on the notion of symbolic graph and symbolic graph transformation [12], showing that it is m-adhesive. Then we show how this framework can be used to define (part of) a graph transformation semantics of SRML. We believe that this new semantics has the advantage that an implementation could be relatively easy if we had a tool for the graph transformation system that we propose. 1
The paper is organized as follows. In Sections 2 and 3, we present an overview of SRML and symbolic graphs, respectively. Then, in Section 4, we present our framework of 2-level graphs. Section 5 is dedicated to showing how we can define part of the semantics of SRML using hierarchical graph transformation. Finally, in Section 6, we discuss some related work and conclude the paper. 2 Introduction to SRML The essential concept of the Sensoria Reference Modeling Language (SRML) is the notion of module which is inspired by the constructions presented in Service Component Architecture (SCA). See [8, 10, 11] for a detailed description of the language. Roughly speaking, a module can be seen as a graph of components that are connected by wires. Moreover a module also includes some provides and requires interfaces, which are also connected by wires to the components. As an example of a module we present a booking agent. This module, which is graphically depicted in Fig. 1, is supposed to offer a service for booking trips (flight and hotel). It includes a single component (BookAgent) that is supposed to take care of the booking and three interfaces: a provides interface (Customer) for customer requests and two requires interfaces (FlightAgent and HotelAgent). The BookAgent is supposed to receive trip reservation requests from customers that are connected to the Customer interface. Then, BookAgent is supposed to request a flight and a hotel to services connected to the FlightAgent and HotelAgent, respectively, which are supposed to provide the corresponding reservation confirmations through a hotel and a flight code. These codes will then be returned to the customer. However, due to lack of space, in our example, we only see how the Bookagent requests a flight to the FlightAgent. BOOKING AGENT CR: Customer BA: BookAgent FA: FlightAgent HA: HotelAgent CB BH BF Figure 1: BOOKING AGENT service module 2
Components are specified by a business role consisting of a signature and an orchestration part. The signature declares the events in which that component may take part and the orchestration describes the behavior of the component. For instance, below we can see a small part of the specification of the main component of the booking agent module. BUSINESS ROLE BookAgent is r&s booktrip from,to:string; out,in:integer; Btconf : (fcode,hcode); s&r bookflight from,to:string; out,in:integer; Bfconf : fcode; . . . ORCHESTRATION local from,to:string; out,in:integer; fconf : fcode; hconf : hcode; transition Torder triggered by booktrip effects from’ =booktrip.from ∧ to’ =booktrip.to ∧ out’ =booktrip.out ∧ in’ =booktrip.in sends bookflight bookflight.from =from’ ∧ bookflight.to =to’ ∧ bookflight.out =out’ ∧ bookflight.in =in’ ∧ . . . In this specification we declare that BookAgent has an interaction called booktrip in which the component participates receiving and then sending information (r&s) and another interaction called bookflight in which the component participates sending and then receiving information (s&r). For example, booktrip has four input parameters (from, to, out and in) and one output parameter (tconf ). Then, in the orchestration part, first we declare the local variables of the component and possibly their initialization, and then we specify the effects of the interactions in which the component may take part. For instance, in the example, the local variables from, to, in, and out are supposed to store the basic data of the trip being booked (source, destination, departure and return dates, respectively), and fconf and hconf are supposed to store the flight and hotel reservation codes that have been booked. In the example, we also declare the local effects of an interaction, called Torder, in which the component takes part. This interaction is triggered by the event booktrip that the component receives. The contents of the local variables from, to, in, and out after the interaction are the contents of the corresponding parameters of booktrip. Moreover, the interaction triggers an event bookflight, which is sent by the component with the corresponding input parameters. External interfaces are specified through business protocols. They also include a signature and they specify the conversations that the module expects relative to each party. It is the responsibility of the coparty to adhere to these protocols. Finally, wires bind the names of the interactions and specify the protocols that coordinate the interactions between two parties. For instance, this module includes the wire CB that connects the business protocol of the customer of the BOOKING AGENT module and the business role BookingAgent of the same module. We do not include here an example of an interface 3
or of a wire specification, since they are not relevant for this paper. Another issue of SRML that we do not treat for reasons of space is service level agreement (SLA). As we saw in the definition of our service oriented architecture, business configurations can be described as a graph whose nodes are the components that are active at a given moment and whose edges are the wires connecting them. Moreover, a business configuration also includes the values contained by the local variables of wires and components and the events that are pending to be executed. These states can evolve in two different ways. On the one hand, the execution of an event causes that this event is eliminated from the set of pending events and, moreover, it may cause that some local variables in the components involved in the event change their value, and some other events are triggered meaning that they are added to the set of pending events. On the other hand, when the requires interface of an activity module AM matches the provides interface of a service module SM the two modules are connected and the activity is bound to this new service. This implies that initialized instances of the components and wires of SM are added to the state configuration and also to the activity associated to AM. The activity module associated to the enriched activity would include the components and wires of that activity and, in addition, the remaining (non-matched) interfaces of AM and SM. 3 Symbolic graphs and symbolic graph transformation Symbolic (hyper)graphs [12] can be seen as a specification of a class of attributed graphs (i.e. of graphs including values from a given data algebra in their nodes or edges). In particular, in a symbolic graph, values are replaced by variables and, moreover, a set of formulas, Φ, specifies the values that the variables may take. Then, we may consider that a symbolic graph SG denotes the class of all graphs obtained replacing the variables in the graph by values that satisfy Φ. For instance, the symbolic graph in Figure 2 specifies a class of attributed graphs, including distances in the edges, that satisfy the well-known triangle inequality. - 1 - with d3 ! d1+d2 d1 d2 d3 Figure 2: A symbolic graph The notion of symbolic graph is based on the notion of a special kind of labeled graphs called E-graphs (for details, see [6, 7]). The only difference of the notion of E- graph that we use with respect to the notion in [6] is that we deal with hypergraphs. 4
This means that, for every graph G, instead of having source and target functions that map edges to nodes, we have an attachment function, attachG, that maps each (hyper)edge to a sequence of nodes, i.e. the nodes connected by the edge. Definition 3.1 Asymbolic graph over the data algebra Dis a pair hG, ΦGi, where Gis an E-graph over a set of variables X, and ΦGis a set of first-order formulas over the operations and predicates in Dincluding variables in Xand elements in D. Given symbolic graphs hG1,ΦG1iand hG2,ΦG2iover D, a symbolic graph morphism h:hG1,ΦG1i → hG2,ΦG2iis an E-graph morphism h:G1→G2such that D|= ΦG2⇒h(ΦG1), where h(ΦG1)is the set of formulas obtained when replacing in ΦG1every variable x1in the set of labels of G1by hX(x1). Symbolic graphs over Dtogether with their morphisms form the category SymbGraphsD. In [12] it is shown that SymbGraphsDis an adhesive HLR category, which means that all the fundamental results of the theory of graph transformations apply to this kind of graphs [7]. In symbolic graph transformation we consider that the left and right-hand sides of a rule are symbolic graphs, where the conditions on the left hand side on the rule are included in the conditions in the right hand side of the rule. This means that applying a transformation to a symbolic graph hG, ΦGireduces or narrows the number of instances of the result. For instance, Gmay include an integer variable xsuch that ΦGdoes not constrain its possible values. However, after applying a given transformation, in the result graph hH, ΦHiwe may have that ΦHincludes the formula x= 0, expressing that 0is the only possible value of x. Definition 3.2 Asymbolic graph transformation rule is a triple hΦL, L ←- K → R, ΦRi, where L, K are E-graphs over the same set of labels XL,Ris an E-graph over a a set of labels XR, with XL=XK⊆XR,L←- K →Ris a standard graph transformation rule, and ΦLand ΦRare sets of formulas over XLand XR, respectively, and over the values in the given data algebra D, with ΦL⊆ΦR. Figure 3: A symbolic rule As an example, in Figure 3 we show a rule with two events and a bookagent component. The rule states that when arriving a booktrip event, the bookagent registers them and sends a new bookflight event. The formula below expresses that the origin, destination, and departure and return dates are the same in the incoming and in the outgoing events. For simplicity, we do not depict the intermediate graph 5
K, nor do we state explicitly which are the sets XLand XRof the given rule. Instead, we assume that XLconsists of all the variables that are explicitly depicted in the left-hand side graph, and XRconsists of all the variables that are depicted in the rule. Similarly, we just depict a single set of formulas for a given rule, assuming that ΦRis the set consisting of all these formulas and ΦLis the subset of ΦR consisting of the formulas that only include variables in XL. As usual, the application of a graph transformation rule to a given symbolic graph SG can be defined by a double pushout in the category of symbolic graphs. However, it can also be expressed in terms of a transformation of E-graphs. As a remark, given a symbolic graph transformation rule hΦL, L ←- K ,→R, ΦRi over a given data algebra Dand a symbolic graph morphism m:hL, ΦLi→hG, ΦGi, we have that hG, ΦGi=⇒p,m hH, ΦHiif and only if the diagram below is a double pushout in E−Graphs and D|= ΦG⇒m(ΦL). L (1) m K (2) ?_ oo// R m0 G F ?_ oo//H and, moreover, ΦH= ΦG∪m0(ΦR). 4 2-level symbolic graphs In this section we introduce our notion of 2-level symbolic graph and it can be shown that these graphs, together with their associated notion of morphism, form an M-adhesive category [7]. Our notion of 2-level graph is inspired by the notion of Petri Net refinement in [13]. According to that notion, in a net refinement, a transition tcan be replaced by another net, Nt, where some of its transitions are connected to the same places that twas connected. In our case, we consider that a 2-level graph is a graph whose edges include (standard) graphs, that may be considered their refinement. As in the case of nets, the edges in the graph inside e may be connected to the same nodes that eis connected. This is done by means of a notion of graph with interface, where the interface consists of some nodes of the graph (more precisely a sequence of nodes). In particular, if eis an edge of a 2-level graph, whose attachment is the sequence α, we assume that the graph inside eis a graph with interface α. Notice that, as a consequence, the nodes in the attachment of emay be considered to be simultaneously inside and outside e. For instance, in Fig. 4 we can see a 2-level graph. On the left, we can see the top level graph of that graph, i.e. the graph without seeing the contents of its edges. This graph has two nodes, n1and n2and two edges, e1and e2. Edge e1is connected to n1and n2and e2is connected to n1and twice to n2. This means that the attachment of e1may be n1n2and the attachment of e2may be n1n2n2. The graph on the right shows the contents of the edges. In particular, e1has no contents or, to be more precise, technically it includes the nodes in its interface (n1and n2). The edge e2includes a graph with three edges e3,e4and e5, whose interface is n1n2n2. In particular e3and e4are connected to n1and n2(and to other internal nodes). Notice that, technically, we consider that nodes n1and n2belong simultaneously to the top level edge and to the graphs contained in e1and e2. 6
Figure 4: A 2-level graph Definition 4.1 A symbolic graph with interface over a data algebra Dis a triple hG, ΦG, IGi, where hG, ΦGiis a symbolic graph over Dand IGis the interface, a sequence of nodes from G, i.e. IG∈V∗ G. A morphism between symbolic graphs with interface h:hG, ΦG, IGi → hG0,ΦG0, IG0iis a symbolic graph morphism such that h∗(IG) = IG0, where h∗denotes the extension of hto sequences of nodes. In what follows, all our symbolic graphs are assumed to include an interface. As a consequence, symbolic graphs with interface will just be called symbolic graphs and even if it is an abuse of notation, the class (category) of symbolic graphs with interface will also be denoted by SymbGraphsD. Definition 4.2 A 2-level graph T G is a pair hT Gtop, ctsT Gi, where T Gtop is a symbolic graph, the top level graph, and ctsT G is the contents function, ctsT G : ET Gtop →SymbGraphsDthat, for every edge ein the top level graph, yields the graph included in that edge, such that the attachment of ecoincides with the interface of the graph included in e, i.e. attachT Gtop (e) = IctsT G (e). 2-level graphs can be flattened to form a standard symbolic graph replacing every hierarchical edge by its contents. More precisely: Definition 4.3 The flattening of a 2-level graph, F lat(T G)is defined as follows: F lat(T G) = T Gtop ∪[ e∈ET Gtop cts(e)\ {e∈ET Gtop |Ects(e)6=∅} Morphisms between 2-level graphs T G1and T G2can be seen as families of graph morphisms that map, on the one hand, the top level graph of T G1to the top level graph of T G2and, on the other, the contents of each edge e1of T G1to the contents of the corresponding edge of T G2: Definition 4.4 A 2-level graph morphism h:T G1→T G2is a pair hhtop, hdowni, where htop :T Gtop 1→T Gtop 2is a symbolic graph morphism between the top level graphs, and hdown ={he:ctsT G1(e)→ctsT G1(htop(e))}e∈ET Gtop 1 is a family including a symbolic graph morphism for each edge in T Gtop 1. In general, given a 2-level morphism h=hhtop, hdowniwe say that a symbolic graph morphism gis inside hif g=htop or gis included in hdown. 7
It is routine to see that 2-level symbolic graphs and morphisms over a data algebra Dform a category, that we call 2SymbGraphsD. Moreover, we can see that this category is M-adhesive, where Mis the class of all monomorphisms h such that if gis inside hthen gis an M-morphism in SymbGraphsD. In the appendix there is a quite lengthy detailed proof. In particular, pushouts in this category are built as follows. Given the diagram below, the top level graph of T G3 is the pushout of the top level graphs and morphisms in the diagram and for every edge e3in T Gtop 3,ctsT G3(e3)is the colimit of the contents of each edge e0in T Gtop 0 such that gtop 1(htop 1(e0)) = e3, of each edge e1in T Gtop 1such that gtop 1(e1) = e3, and of each edge e2in T Gtop 2such that gtop 2(e2) = e3. T G0 h1// h2 T G1 g1 T G2g2 //T G3 5 A graph-semantics for business configurations In our graph semantics business configurations are represented by 2-level symbolic graphs, whose hyperedges represent components and events at the lowest level and activities at the top level, and whose nodes represent wires. Additionally, in the semantics we will have two different graph transformation rules for these two ways of transforming the state: state transformation rules and reconfiguration rules. Our graph semantics is presented in the next two subsections. In the first one, we present the graph semantics of business configurations, and in the second one its associated transformation system. The semantics that we propose is also more abstract than the original one [10] and the light version of [9], and therefore we do not use a concrete temporal logic in our provide and request specifications and we do not treat either the problem of name injections in wires. 5.1 Business configurations In the first definition we present the basic concept of a state configuration: Definition 5.1 A state configuration is an E-graph with two types of hyperedges: •Hyperedges that represent components with a positive number of nodes, an attribute with the name of the component and a set of attributes of the component. We will refer to them as component hyperedges. •Hyperedges that represent events connected with just one node, an attribute with the name of the event, another with the type of the event and a set of attributes of the event. We will refer to them as event hyperedges. There are also two types of nodes: internal and interface nodes. Both types of nodes can be part of different component hyperedges and a set of event hyperedges. The main difference between these two types of nodes is that interface nodes are the ones with which subsystem binding is performed. 8
Next, we present the concept of business configuration: Definition 5.2 A business configuration is a 2-level graph where the top level is a graph without cycles such that: •each hyperedge encapsulates one state configuration. •the top level nodes can also optionally have a set of event hyperedges. If they are not connected to another node they are referred to as interface nodes. When these nodes have an event hyperedge, they triggered a process of selection of a reconfiguration rule package. For example, if a customer has developed an activity module that requests a booking agent to book a hotel and a flight, the 2-level symbolic graph that represents the initial business configuration with an instance of this activity module will consist of a hyperedge that represents the activity, and inside this hyperedge, another hyperedge that represents the customer component with a set of attributes for the flight and hotel reservation. The 2-level symbolic graph will also have a request specification in the with clause. A graphical representation is in figure 5 . Figure 5: Business configuration with just a customer activity Additionally, in figures 7 and 9 we have two different stages of the initial business configuration of figure 5. In 7 we have a hyperedge encapsulating a customer subsystem with a set of attributes (from, to, in, out, ...). The hyperedge has an interface node with an event hyperedge. After triggering a process of selection of a reconfiguration rule package, the business configuration evolves to the one in figure 9, binding the interface node with an hyperedge with a booking agent subsystem inside. This new hyperedge has also two additional interface hierarchical nodes. 5.2 Transformation systems for business configurations In this subsection we present first the two kinds of rules that we have in transformation systems for business configurations: state transformation rules and reconfiguration rules. After that we present reconfiguration rule packages that combine both kind of rules. Definition 5.3 A state transformation rule is a rule that can make the following transformations in one activity: 9
•T Gtop 3,gtop 1and gtop 2are given by the pushout in SymbGraphsD: T Gtop 0 htop 1// htop 2 T Gtop 1 gtop 1 T Gtop 2gtop 2 //T Gtop 3 •For every edge e3in T Gtop 3, we have that ctsT G3(e3)is the colimit in SymbGraphsDof the diagram including all the graphs: –ctsT Gtop 0(e0), where e0is an edge in T G0and e3=htop 1(gtop 1(e0)) –ctsT Gtop 1(e1), where e1is an edge in T G1and e3=gtop 1(e1) –ctsT Gtop 2(e2), where e0is an edge in T G2and e3=gtop 2(e2) and all the morphisms he0 1and he0 2, where e0is an edge in T G0 and e3=htop 1(gtop 1(e0)). It is routine to prove that this construction is indeed a pushout. Now, we show the existence of pullbacks: Proposition A.3 2SymbGraphsDhas pullbacks. Proof The pullback of the diagram: T G0 h1// h2 T G1 g1 T G2g2 //T G3 is defined as follows: •T Gtop 0,htop 1and htop 2are given by the pullback in SymbGraphsD: T Gtop 0 htop 1// htop 2 T Gtop 1 gtop 1 T Gtop 2gtop 2 //T Gtop 3 •For every edge e0in T Gtop 0, we have that ctsT G0(e0)and he0 1and he0 2are given by the pullback in SymbGraphsD: ctsT G0(e0)he0 1// he0 2 ctsT G1(e1) ge1 1 ctsT G2(e2)ce2 //ctsT G3(e3) where e1=htop 1(e0),e2=htop 2(e0)and e3=gtop 1(e1) = gtop 2(e2). 16
Again, it is routine to prove that this construction is indeed a pullback. Pushouts and pullbacks preserve M-morphisms: Proposition A.4 If the diagram below is a pushout and h1is an M-morphism then g2is also an M-morphism. Similarly, if the diagram below is a pullback and g2is an M-morphism then h1is also an M-morphism. T G0 h1// h2 T G1 g1 T G2g2 //T G3 Proof For pullbacks, it is enough to notice that the pullback of the top level morphisms and the pullbacks of the down level morphisms preserve M-morphisms. For pushouts, it is slightly more involved. First, as before, we know that the pushout of the top level morphisms preserve symbolic graph M-morphisms. Then, considering that our graphs are assumed to be finite, it is enough to notice that each colimit of the down level morphisms can be defined as a combination of pushouts and pullbacks over M-morphisms. Then, by induction we know that each of these pushouts and pullbacks preserve M-morphisms and we also know that the composition of the resulting M-morphisms is also an M-morphism. Proposition A.5 Pushouts along 2-level M-morphisms are weak van Kampen squares. Proof Let us consider the following commutative cube, where h1, h0 1, g2, g0 2, f1, f2, f3are M-morphisms, the bottom square is a pushout and the back faces are pullbacks. We have to show that the top square is a pushout if and only if the front faces are pullbacks. T H0 h1kkkkkkk uukkkkkkk h2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 f0 T H1 g1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 f1 T G0 h0 1llllllll uullllllll h0 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 T H2 f2 g2llllllll uullllllll T G1 g0 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 T H3 f3 (1) T G2 g0 2kkkkkkkk uukkkkkkkk T G3 17
Let us suppose that the top square is a pushout and let us show that the two front faces are pullbacks. We know that the corresponding cube in terms of the top graphs and the top morphisms: T Htop 0 htop 1kkkkkkkk uukkkkkkkk htop 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ftop 0 T Htop 1 gtop 1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ftop 1 T Gtop 0 (h0 1)top kkkkkkk uukkkkkkk (h0 2)top 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 T Htop 2 ftop 2 gtop 2kkkkkkkk uukkkkkkkk T Gtop 1 (g0 1)top 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 T Htop 3 ftop 3 (2) T Gtop 2 (g0 2)topkkkkkkk uukkkkkkk T Gtop 3 is a weak van Kampen square in SymbGraphsD, therefore its front faces are pullbacks in that category. Hence, we have to show that for every edge e1in T Htop 1, ctsT H1(e1)is the pullback of fe3 3and (g0 1)e0 1, where e3=gtop 1(e1)and e0 1=ftop 1(e1). Now, let e0 3=ftop 3(e3). We have two cases: •If there is no edge e0in T Htop 0, such that e1=htop 1(e0)then we know that there is also no edge e0 0in T Gtop 0, such that ftop 1(e1) = (h0 1)top(e0), since T Htop 0is the pullback of the back left square in (2). In addition, we know that there is also no edge e2in T Htop 2such that e3=gtop 2(e2)since the top diagram in (2) is a pushout. Moreover, for similar reasons, we may also be sure that there is no edge e0 2in T Gtop 2such that ftop 3(e3)=(g0 2)top(e0 2). This means, by the definition of pushouts of 2-level graphs, that ctsT H1(e1) = ctsT H3(e3)and ctsT G1(e0 1) = ctsT G3(e0 3)and the morphisms ge1 1and (g0 1)e0 1are identities. Now, let us consider the diagram below: 18
∅ ∅iiiiiiiiiiiii ttiiiiiiii ∅ - - - - - - - - - - - - - - ∅ ctsT H1(e1) ge1 1 > > > > > > > > > > > > > > > > f1e1 ∅ ∅iiiiiiiiiiiii ttiiiiiiii ∅ - - - - - - - - - - - - - - ∅ ∅ ∅mmmmmmmmm vvmmmmmm ctsT G1(e0 1) (g0 1)e0 1 > > > > > > > > > > > > > > > > ctsT H3(e3) fe3 3 ∅ ∅mmmmmmmmm vvmmmmmm ctsT G3(e0 3) where ∅denotes the empty graph or the empty morphism, depending on the context. Now, by construction, we may see that, in the above diagram, the bottom face and the top face are pushouts and the back faces are pullbacks. Therefore, by induction, the front left face is a pullback. •If there is an edge e0in T Htop 0such that e1=htop 1(e0), then this edge must be unique, since h1is an M-morphism. However, there may be several edges d1in T Htop 1such that e3=gtop 1(d1). Moreover, for each d1there must be exactly an edge d0such that htop 1(d0) = d1, since h1is an M-morphism and the top face diagram of (2) is a pushout. And for the same reasons, for all these edges d0,htop 2(e0) = htop 2(d0). Let us call e2the edge in T Htop 2such that e2=htop 2(e0). This means that, in general, ctsT H3(e3)is not the result of the pushout of he0 1and he0 2, but it is the result of the colimit involving all the morphisms hd0 1and hd0 2. Similarly, if we call e0 i=ftop i(ei), for each such edges d0and d1 there would be exactly two edges d0 0and d0 1in T Gtop 0and T Gtop 1, where (g0 1)top(d0 1) = e0 3and (h0 1)top(d0 0) = d0 1. In particular, d0 0= ftop 0(d0)and d0 1=ftop 1(d1). Moreover, ctsT G3(e0 3)is the result of the colimit involving all the morphisms (h0 1)d0 0and (h0 2)d0 0. Now, we proceed by induction on the number of these edges, proving that for any number nof such edges d01, d0n, we can build a weak van Kampen square: 19
H0 a1kkkkkkkkk uukkkkkk a2 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 a ctsT H1(e1) g1tttt yyt t t t t f1e1 T H0 g2 T T T T T T T T T T ** T T T T T T T T T T f0 G0 a0 1kkkkkkkkk uukkkkkk a0 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 ctsT H2(e2) f2e2 b2llllll uulllllllll ctsT G1(e0 1) g0 1t t t t yyt t t t t T H f T G0 g0 2 U U U U U U U U U U ** U U U U U U U U U U ctsT G2(e0 2) b0 2kkkkkk uukkkkkkkkk T G where a1, a0 1, g1, and g0 1are M-morphisms, the top face and bottom face diagrams are pushouts (i.e. the top face is a pushout of the morphisms g1◦a1and a2and the bottom face is a pushout of the morphism g0 1◦a0 1and a0 2), where all the vertical squares are pullbacks and where T H is the colimit of all the morphisms hd0 1and fd0 0and T G is the colimit of all the morphisms hd0 0 1and fd0 0 0and f, g2◦g1, and g0 2◦g0 1are morphisms induced by these colimits. –If there is only one edge d1in T Htop 1such that e3=gtop 1(d1), i.e. e1=d1, then we have that the cube below, by induction on the depth of the graphs, is a weak van Kampen square, where the top square is a pushout: 20
H0 he0 1mmmmmm vvmmmmmm he0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 fe0 0 H1 ge1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 f1e1 G0 (h0 1)e0 0mmmmm vvmmmmm (h0 2)e0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 H2 f2e2 ge2 2mmmmmm vvmmmmmm G1 (g0 1)e0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 H3 fe3 3 G2 (g0 2)e0 2mmmmm vvmmmmm G3 where, e2=htop 2(e0)and, for every 0≤i≤3,e0 i=fi(ei), Hi=ctsT Hi(ei)and Gi=ctsT Gi(e0 i). Therefore, this cube satisfies the induction hypothesis when g1and g0 1are the identity morphisms. –If there are n+ 1 such edges, by induction we know that there is a weak van Kampen square associated to nedges: H0 a1kkkkkkkkk uukkkkkk a2 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 a ctsT H1(e1) g1tttt yyt t t t t f1e1 T H0 g2 T T T T T T T T T T ** T T T T T T T T T T f0 G0 a0 1kkkkkkkkk uukkkkkk a0 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 ctsT H2(e2) f2e2 b2llllll uulllllllll ctsT G1(e0 1) g0 1t t t t yyt t t t t T H f T G0 g0 2 U U U U U U U U U U ** U U U U U U U U U U ctsT G2(e0 2) b0 2kkkkkk uukkkkkkkkk T G where the top face is a pushout and TH and TG are the colimit of the morphisms associated to the given edges. Let d1be the remaining edge and let us consider the following diagram: 21
ctsT H0(d0) hd0 2jjjjjjj ttjjjjjjj hd0 1 = = = = = = = = = = = = = = = = fd0 0 ctsT H2(d2) 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 f2d2 ctsT G0(d0 0) (h0 2)d0 0jjjjj ttjjjjj (h0 1)d0 0 = = = = = = = = = = = = = = = = ctsT H1(e1) f1e1 ttiiiiiiiiiiiiiiiiiiiiii ctsT G2(d0 2) 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7H0 3 ctsT G1(e0 1) ttiiiiiiiiiiiiiiiiiiiiii G0 3 where, d0is the only edge in T Htop 0such that d1=htop 1(d0), for every i= 0,1,d0 i=ftop i(di), the top and bottom squares are pushouts and the (unnamed) morphism from H0 3to G0 3is the universal morphism associated to the top face pushout. By induction on the depth of the graphs, this diagram is a weak van Kampen square where the top and bottom faces are pushouts and the rest of faces are pullbacks. Let us now put together (and extend) the two diagrams above, skipping some arrows which are not important now: 22
H0 0 ~~| | | | | | | | ** V V V V V V V V V V V V V V V V V V V V V H0 a2 R R R R R R R R R )) R R R R R R a1 t t t t t zzt t t t a ctsT H0(d0) hd0 2 pppp xxpppphd0 2 N N N N && N N N N fd0 0 ctsT H1(e1) g1tttt yyt t t t t f1e1 G0 0 ~~| | | | | | | | ** U U U U U U U U U U U U U U U U U U U U U UctsT H2(e2) f2e2 ctsT H1(d1) f1d1 T H0 g2 T T T T T T T T T T ** T T T T T T T T T T f0 G0 a0 2 R R R R R R R R R )) R R R R R R a0 1t t t t t zzt t t t ctsT G0(d0 0) (h0 2)d0 0 p p p p xxp p p p(h0 2)d0 0 N N N N && N N N N ctsT G1(e0 1) g0 1t t t t yyt t t t t T H f ## G G G G G G G G G G G G G G G G G G G G G GctsT G2(e0 2)ctsT G1(d0 1) T G0 g0 2 U U U U U U U U U U ** U U U U U U U U U U H0 3 wwooooooooooooo T G ## G G G G G G G G G G G G G G G G G G G G G GT H00 G0 3 wwooooooooooooo T G00 where H0 0and G0 0are, respectively, the pullbacks of a2and hd0 2, and of a0 2and (h0 2)d0 0,T H00 is the pushout of the composed morphisms H0 0→T H and H0 0→H0 3, similarly, T G00 is the pushout of the morphisms G0 0→T G and G0 0→G0 3, and the rest of the arrows are part of or induced by these pushouts and pullbacks. Now, by induction of the depth of the graphs, this diagram is again a weak van Kampen square, where all the vertical diagrams are pullbacks by composition and decomposition of pullbacks and the top and bottom diagrams are pushouts by construction. Therefore, the front faces are also pullbacks. Moreover, by construction, T H00 and T G00 are the colimit of the morphisms associated to the given edges. The proof that the front right face is also a pullback is similar to the previous proof. Finally, we have to show that if the two front faces are pullbacks then the top face is a pushout. Again, we know that the corresponding cube in terms of the top graphs and the top morphisms is a van Kampen square in SymbGraphsD, therefore its top face is a pushout in that category. Hence, we have to show that for every edge e3in T Htop 3ctsT H3(e3)is the colimit of all the morphisms of he0 1 and he0 2for all edges e0such that e3=gtop 1(e1), where e1=htop 1(e0). We proceed by induction on the number of edges e0such that e3=gtop 1(e1) = gtop 2(e2), where e1=htop 1(e0)and e2=htop 2(e0). Notice that, for all these edges e0,e2=htop 2(e0)is always the same edge, since gtop 2is a monomorphism. In particular we prove that for any number nof such edges, given graphs H3and G3, if G3is the colimit of all 23
the morphisms (h0 1)e0 0and (h0 2)e0 0, where e0 0=ftop 0(e0), and for each diagram: ctsT H0(e0) he0 1jjjjjjj uujjjjjjj he0 2 = = = = = = = = = = = = = = = = fe0 0 ctsT H1(e1) 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 f1e1 ctsT G0(e0 0) (h0 1)e0 0jjjjj uujjjjj (h0 2)e0 0 = = = = = = = = = = = = = = = = ctsT H2(e2) f2e2 ttiiiiiiiiiiiiiiiiiiiiii ctsT G1(e0 1) 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7H3 (3) ctsT G2(e0 2) tthhhhhhhhhhhhhhhhhhhhh G3 where for every i= 0,2,e0 i=ftop i(ei), all the vertical faces are pullbacks, then we have that H3is the colimit of all the morphisms of he0 1and he0 2for all these edges e0. In particular, since we assume that ctsT G3(e0 3)is the colimit of all the morphisms (h0 1)e0 0and (h0 2)e0, and if we replace H3and G3in diagram (3) by ctsT H3(e3)and ctsT G3(e0 3), respectively, then all the vertical faces are pullbacks, this would imply that ctsT H3(e3)is the colimit of all the morphisms of he0 1and he0 2, as we want to prove. •If there are no edges e0such that e3=gtop 1(e1), where e1= htop 1(e0), this means that there must be either an edge e1in T Htop 1 or an edge e2in T Htop 2such that e3=gtop 1(e1)or e3=gtop 2(e2). Let us assume that the existing edge is e1(in the case of e2the proof is similar). In this case, we have to prove that ctsT H3(e3) = ctsT H1(e1), since this is equivalent to show that that the diagram below is a colimit: ∅∅// ∅ ctsT H1(e1) g1e1 ∅∅ //ctsT H3(e3) Now, we can see that there is no edge e0 0in T Gtop 0such that (h0 1)top(e0 0) = ftop 1(e1), since we know that diagram (2) above is a weak van Kampen square, where the back left face is a pullback, and this would have implied that there would have been an edge e0in T Htop 0such that htop 2(e0) = e2. For similar reasons, i.e. the front right face of (2) is a pullback, we know that there does not 24
exist an edge e0 2in T Gtop 2such that (g0 2)top(e0 2) = ftop 3(e3). Then, let us now consider the following diagram: ∅ ∅iiiiiiiiiiiii ttiiiiiiii ∅ - - - - - - - - - - - - - - ∅ ctsT H1(e1) ge1 1 > > > > > > > > > > > > > > > > f1e1 ∅ ∅iiiiiiiiiiiii ttiiiiiiii ∅ - - - - - - - - - - - - - - ∅ ∅ ∅mmmmmmmmm vvmmmmmm ctsT G1(e0 1) (g0 1)e0 1 > > > > > > > > > > > > > > > > ctsT H3(e3) fe3 3 ∅ ∅mmmmmmmmm vvmmmmmm ctsT G3(e0 3) where e0 1=ftop 1(e1)and e0 3=ftop 3(e3). By construction and knowing that diagram (1) is a weak van Kampen square where the front faces are pullbacks, the above diagram would also be a weak van Kampen square where the front faces are pullbacks. Hence, by induction, the top face would be a pushout, i.e. a colimit. •Assume that there are n+ 1 edges e0and H3and G3are graphs such that G3is the colimit of all the morphisms (h0 1)e0 0and (h0 2)e0 0, where e0 0=ftop 0(e0), and for each diagram: ctsT H0(e0) he0 1jjjjjjj uujjjjjjj he0 2 = = = = = = = = = = = = = = = = fe0 0 ctsT H1(e1) 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 f1e1 ctsT G0(e0 0) (h0 1)e0 0jjjjj uujjjjj (h0 2)e0 0 = = = = = = = = = = = = = = = = ctsT H2(e2) f2e2 ttiiiiiiiiiiiiiiiiiiiiii ctsT G1(e0 1) 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7H3 f (4) ctsT G2(e0 2) tthhhhhhhhhhhhhhhhhhhhh G3 25