A new criterion for $\mathcal{M}, \mathcal{N}$-adhesivity, with an application to hierarchical graphs

Adhesive categories provide an abstract framework for the algebraic approach to rewriting theory, where many general results can be recast and uniformly proved. However, checking that a model satisfies the adhesivity properties is sometimes far from immediate. In this paper we present a new criterion giving a sufficient condition for $\mathcal{M}, \mathcal{N}$-adhesivity, a generalisation of the original notion of adhesivity. We apply it to several existing categories, and in particular to hierarchical graphs, a formalism that is notoriously difficult to fit in the mould of algebraic approaches to rewriting and for which various alternative definitions float around.


Introduction
The introduction of adhesive categories marked a watershed moment for the algebraic approaches to the rewriting of graph-like structures [LS05,EEPT06].Until then, key results of the approaches on e.g.parallelism and confluence had to be proven over and over again for each different formalism at hand, despite the obvious similarity of the procedure.Differently from previous solutions to such problems, as the one witnessed by the butterfly lemma for graph rewriting [CMR + 97, Lemma 3.9.1], the introduction of adhesive categories provided such a disparate set of formalisms with a common abstract framework where many of these general results could be recast and uniformly proved once and for all.
Despite the elegance and effectiveness of the framework, proving that a given category satisfies the conditions for being adhesive can be a daunting task.For this reason, we look for simpler general criteria implying adhesivity for a class of categories.Similar criteria have been already provided for the core framework of adhesive categories; e.g., every elementary topos is adhesive [LS06], and a category is (quasi)adhesive if and only if can be suitably embedded in a topos [JLS07,GL12].This covers many useful categories such as sets, graphs, and so on.On the other hand, there are many categories of interest which are not (quasi)adhesive, such as directed graphs, posets, and many of their subcategories.In these cases we can try to prove the more general M, N -adhesivity for suitable M, N ; however, so far this has been achieved only by means of ad hoc arguments.To this end, one of the main contributions of this paper is a new criterion for M, N -adhesivity, based on the verification of some properties of functors connecting the category of interest to a family of suitable adhesive categories.This criterion allows us to prove in a uniform and systematic way some previous results about the adhesivity of categories built by products, exponents, and comma construction.
Moreover, it is well-known that categorical properties are often prescriptive, indicating abstractly the presence of some good behaviour of the modelled system.Adhesivity is one such property, as it is highly sought after when it comes to rewriting theories.Thus, our criterion for proving M, N -adhesivity can be seen also as a "litmus test" for the given category.This is useful in situations that are not completely settled, and for which different settings have been proposed.An important example is that of hierarchical graphs, for which we roughly can find two alternative proposals: on the one hand, algebraic formalisms where the edges have some algebraic structures, so that the nesting is a side effect of the term construction; on the other hand, combinatorial approaches where the topology of a standard graph is enriched by some partial order, either on the nodes or on the edges, where the order relation indicates the presence of nesting.By applying our criterion, we can show that the latter approach yields indeed an M, N -adhesive category, confirming and overcoming the limitations of some previous approaches to hierarchical graphs [MO12, Pad17, Pal04], which we briefly recall next.
The more straightforward proposal is by Palacz [Pal04], using a poset of edges instead of just a set; however, the class of rules has to be restricted in order to apply the approach, which in any case predates the introduction of adhesive categories.Our work allows to rephrase in terms of adhesive properties and generalise Palacz's proposal, dropping the constraint on rules.Another attempt are Mylonakis and Orejas' graphs with layers [MO12], for which M-adhesivity is proved for a class of monomorphisms in the category of symbolic graphs; however, nodes between edges at different layers cannot be shared.Padberg [Pad17] goes for a coalgebraic presentation via a peculiar "superpower set" functor; this gives immediately M-adhesivity provided that this superpower set functor is well-behaved with respect to limits.However, albeit quite general, the approach is rather ad hoc, not modular and not very natural for actual modelling.
Summarising, the main contributions of this work are: (a) a new general criterion for assessing M, N -adhesivity; (b) new proofs of M, N -adhesivity for some relevant categories, systematising previous known proofs; (c) the first proof that a category of hierarchical graph is M, N -adhesive.
Synopsis.After having recalled some basic notions, in Section 2 we introduce the new criterion for M, N -adhesivity; using it, we show M, N -adhesivity of several constructions, such as products and comma categories.In Section 3 we apply this theory to various example categories, such as directed (acyclic) graphs, trees and term graphs.We show also the adhesivity of several categories obtained by combining adhesive ones, and in particular of the elusive category of hierarchical graphs.Conclusions and directions for future work are in Section 6.

M, N -adhesivity via creation of (co)limits
In this section we recall some definitions and results about M, N -adhesive categories and provide a new criterion to prove this property.
2.1.M, N -adhesive categories.Intuitively, an adhesive category is one in which pushouts of monomorphisms exist and "behave more or less as they do in the category of sets" [LS05].Formally, we require pushouts of monomorphisms to be Van Kampen colimits.
Definition 2.1.Given two diagrams we say that the left square is a Van Kampen square if, whenever the right cube has pullbacks as back faces, then its top face is a pushout if and only if the front faces are pullbacks.Pushout squares which enjoy the "if" of this condition are called stable.
Given a category A we will denote by Mor(A), Mono(A), Reg(A) respectively the classes of morphisms, monomorphisms and regular monomorphisms of A. Definition 2.2.Let A be a category and A ⊆ Mor(A).Then we say that A is • stable under pushouts (pullbacks) if for every pushout (pullbacks) square Remark 2.3.Clearly, "decomposition" corresponds to "left cancellation", but we prefer to stick to the name commonly used in literature (see e.g.[HP12]).Remark 2.5.M-adhesivity as defined in [ACR19] coincides with M, Mor(A)-adhesivity, while adhesivity and quasiadhesivity [LS05, GL12] coincide with Mono(A)-adhesivity and Reg(A)-adhesivity, respectively.Notice that, in the M-adhesive case, stability under pushouts of M derives from properties (a)-(c) of Definition 2.4, while closure under decomposition follows from stability under pullbacks in any category, so there is no need to prove it independently.
In general, proving that a given category is M, N -adhesive by verifying the conditions of Definition 2.4 may be long and tedious; hence, we seek criteria which are sufficient for adhesivity, and simpler to prove.A prominent example is the following result due to Lack and Sobociński.
In particular the category Set of sets and any presheaf category are adhesive.However, there are many important categories for (graph) rewriting which are not toposes, hence the need for more general criteria.
We will need some properties of pushouts in the category of sets and functions.
Lemma 2.7.Take a pushout square in Set, and suppose that m is injective, then (1) n is injective too; (2) the function B ⊔ C → D induced by n and g is surjective; (3) for every x and y ∈ P , x = y if and only if one of the following is true: (a) there exists a, necessarily unique, b ∈ B such that Proof.The first point follows at once from the adhesivity of Set, while the others are implied by the explicit description of pushouts in it.

2.2.
A new criterion for M, N -adhesivity.In this section we present our main result, i.e., that M, N -adhesivity is guaranteed by the existence of a family of functors with sufficiently nice properties.We will adapt some definitions from [AHS06].
Definition 2.8.Let I : I → C be a diagram and J a set.We say that a family F = {F j } j∈J of functors F j : C → D j (1) jointly preserves (co)limits of I if given a (co)limiting (co)cone (L, l i ) i∈I for I, every (F j (L), F j (l i )) i∈I is (co)limiting for F j • I; (2) jointly reflects (co)limits of I if a (co)cone (L, l i ) i∈I is (co)limiting for I whenever (F j (L), F j (l i )) i∈I is (co)limiting for F j • I for every j ∈ J; (3) jointly lifts (co)limits of I if given a (co)limiting (co)cone (L j , l j,i ) i∈I for every F j • I, there exists a (co)limiting (co)cone (L, l i ) i∈I for I such that (F j (L), F j (l i )) i∈I = (L j , l j,i ) i∈I for every j ∈ J; (4) jointly creates (co)limits of I if I has a (co)limit and F jointly preserves and reflects (co)limits along it.
Remark 2.9.Jointly preservation, reflection, lifting or creation of (co)limits of a family F = {F j } j∈J with F j : A → B j is equivalent to the usual preservation, reflection, lifting or creation of (co)limits for the functor A → j∈J B j induced by F (see [ML13, Def.V.1] and [AHS06, Def.13.17]).
Theorem 2.10.Let A be a category, M ⊂ Mono(A), N ⊂ Mor(A) satisfying conditions (i)-(iii) of Definition 2.4, and F a non empty family of functors F j : A → B j such that B j is M j , N j -adhesive.
(1) If every F j preserves pullbacks, F j (M) ⊂ M j and F j (N ) ⊂ N j for every j ∈ J, F jointly preserves M, N -pushouts, and jointly reflects pushout squares Moreover if in addition F jointly reflects M-pullbacks and N -pullbacks then M, Npushouts are Van Kampen squares.
(2) If F satisfies the assumptions of the previous points and jointly creates both M-pullbacks and N -pullbacks, then A is M, N -adhesive.
(3) If F jointly creates all pushouts and all pullbacks, then A is M F , N F -adhesive, where (1.) Take a cube in which the bottom face is an M, N -pushout and all the vertical faces are pullbacks (below, left).Applying any F j ∈ F we get another cube in B j (below, right) in which the bottom face is an M j , N j -pushout (because F j (m) ∈ M j and F j (n) ∈ N j ) and the vertical faces are pullbacks, thus the top face of the second cube is a pushout for every j ∈ J Now m ′ , f ′ ∈ M and n ′ ∈ N since they are the pullbacks of m, f and n and thus we can conclude.Suppose now that F jointly reflects M-pullbacks and N -pullbacks, we have to show that the front faces of the first cube above are pullbacks if the top one is a pushout.In the second cube, the bottom and top face are M j , N j -pushouts and the back faces are pullbacks, then the front faces are pullbacks too by M j , N j -adhesivity.Now, notice that f ∈ M and g ∈ N (since M and N are closed under pushouts) and thus we can conclude since F jointly reflects pullbacks along arrows in M or in N .
in each B j with F j (m) ∈ M j and F j (n) ∈ N j and thus there exists a colimiting cocone (Q j , q F j (B) , q F j (C) ) in B j .Now we can conclude because F jointly creates M, N -pushouts.(c) This follows at once by the second half of the previous point.(3.)By the previous point it is enough to show that M F and N F satisfy conditions (i)-(iii) of Definition 2.4.
(i) If f ∈ Mor(A) is an isomorphism then so is F j (f ) for every F j ∈ F .Thus F j (f ) belongs to M j and N j for every j ∈ J, implying f is in M F and in N F .The parts regarding composition and decomposition follow immediately by functoriality of each and suppose that it is a pullback with n ∈ M F (N F ), then applying any which implies that F j (m) ∈ M j (N j ).This is true for every j ∈ J, from which the thesis follows.Stability under pushouts is proved applying the same argument to m.
Applying the previous theorem to the families given by, respectively, projections, evaluations and the inclusion we get immediately the following three corollaries (cfr.also [EEPT06,Thm. 4.15]).
Corollary 2.11.Let {A} i∈I be a family of categories such that each Corollary 2.12.Let A be an M, N -adhesive category.Then for every other category C, the category of functors A C is M C , N C -adhesive, where Corollary 2.13.Let A be a full subcategory of an M, N -adhesive category B and M ′ ⊂ Mono(A), N ′ ⊂ Mor(A) satisfying the first three conditions of Definition 2.4 such that M ′ ⊂ M, N ′ ⊂ N and A is closed in B under pullbacks and M ′ , N ′ -pushouts.Then A is M ′ , N ′ -adhesive.

Comma categories.
In this section we will show how to apply Theorem 2.10 to the comma construction [ML13] in order to guarantee some adhesivity properties under suitable hypotheses.
Definition 2.14.For any two functors L : A → C, R : B → C, the comma category L↓R is the category in which • objects are triples (A, B, f ) with A ∈ A, B ∈ B, and f : We have two obvious forgetful functors Graph is equivalent to the comma category made from the identity functor on Set and the product functor sending X to X × X.
We have a classic result relating limits and colimits in the comma category with those preserved by L or R.
Lemma 2.16.Let I : I → L↓R be a diagram such that L preserves the colimit (if it exists) of U L • I. Then the family {U L , U R } jointly creates colimits of I.
coprojection is the colimit of I. Let ((X, Y, g), (x i , y i )) i∈I be a cocone on I, in particular (X, x i ) i∈I and (Y, y i ) i∈I are cocones on U L • I and U R • I respectively so we have uniquely determined arrows x : A → X and y : B → Y such that x • a i = x i andy • b i = y i .We claim that (x, y) is an arrow of L↓R.For any i ∈ I we have And since the family {L(a i )} i∈I is jointly monic we get that R(y) • f = g • L(x).Uniqueness of (x, y) follows at once and so ((A, B, f ), (a i , b i )) i∈I is a colimit for I which, by construction, is preserved by U L and U R .Reflection follows by the previous construction: if must this can be regarded as an arrow f : R op (B) → L op (A), i.e as an object of R op ↓L op .Moreover, the commutativity in C of the square Thus we have proved the following.
This easy result allows us to dualize Lemma 2.16.
Corollary 2.18.The family {U L , U R } jointly creates limits along every diagram I : I → L↓R such that R preserves the limit of U R • I.
Proof.Apply Proposition 2.17 and Lemma 2.16.Now, in every category an arrow m : C → D is a mono if and only if the square is a pullback.Thus, using Corollary 2.18, we can characterize monos in comma categories.
Corollary 2.19.If R preserves pullbacks then an arrow (h, k) in L↓R is mono if and only if both h and k are monomorphisms.
We can also deduce the following result from Theorem 2.10 and Corollary 2.18.
Theorem 2.20.Let A and B be respectively M, N -adhesive and M ′ , N ′ -adhesive categories, L : A → C a functor that preserves M, N -pushouts, and R : B → C a pullback preserving one.Then L↓R is M↓M ′ , N ↓N ′ -adhesive, where When L = id A and R is the constant functor into an object A, the comma category L↓R is just the slice category A/A over A.

Corollary 2.21. If A is an object of an M, N -adhesive category A, then
When is U R a right adjoint?We will end this section with a technical result regarding the existence of a left adjoint to U R .This result will be useful to add interfaces to various classes of (hyper)graphs (see Sections 3.3 and 4.2).
Dualizing we get immediately the following.
Corollary 2.23.If R preserves terminal objects then U L : L↓R → A has a right adjoint.

Application to some categories of graphs
In this section we apply the results provided in Section 2, to some important categories of graphs, such as directed (acyclic) graphs and hierarchical graphs.These examples have been chosen for their importance in graph rewriting, and because we can recover their M, Nadhesivity in a uniform and systematic way.In fact, in the case of hierarchical graphs we give the first proof of M, N -adhesivity, to our knowledge.
3.1.Directed (acyclic) graphs.Among visual formalisms, directed simple graphs represent one of the most-used paradigms, since they adhere to the classical view of graphs as relations included in the cartesian product of vertices.It is also well-known that directed graphs are not quasiadhesive [JLS07], not even in their acyclic variant.In this section we are going to exploit Corollary 2.13 to show that these categories of (acyclic) graphs have nevertheless adhesivity properties.
) where E G and V G are sets, called the set of edges and nodes respectively, and We will denote by Graph the category so defined.A directed simple graph is a directed graph in which there is at most one edge between two nodes, SGraph is the full subcategory of Graph given by directed simple graphs.
A path [e i ] n i=1 in a directed graph G is a finite and non empty list of edges such that A directed acyclic graph is a directed simple graph without cycles.Directed acyclic graphs form a full subcategory DAG of SGraph and Graph.Remark 3.2.From the definition of Graph, we can immediately deduce its equivalence to: • the category id Set ↓prod, where prod is the functor Set → Set defined as which preserves limits; • the category of presheaves on • ⇒ •, the category with just two objects and only two parallel arrows between them (besides the identities).From these two characterizations we can deduce that Graph is a topos.We can also deduce that limits and colimits of directed graphs are computed component-wise and that an arrow in Graph is mono if and only if both its underlying functions are injective.
We will now establish some properties of SGraph that will be useful in the following.
Proof.Let e 1 , e 2 ∈ E G be nodes such that f (e 1 ) = f (e 2 ), then t G (e 1 ) = t G (e 2 ) and we can conclude that e 1 = e 2 since H is simple.
Since I : SGraph → Graph is full and faithful, then it reflects monomorphisms, thus, from Remark 3.2 we get the following.
Let E be the quotient E/ ∼, we define L(G) to be the graph (E, V G , s, t) where s, t : E ⇒ V G are the functions induced by s G and t G .(2) an arrow (f, g) : G → H of SGraph is a regular monomorphism if and only if f is injective and edge-reflecting: Proof.
(1) For every object G of Graph, there is an arrow (π G , id V G ) : G → I(L(G)).Now, if H is a simple graph and (f, g) : G → I(H) a morphism, then f (e 1 ) = f (e 2 ) whenever e 1 ∼ e 2 , and thus there exists a unique f , g : L(G) → H such that (2) (⇒).Suppose that (f, g) is the equalizer of (f 1 , g 1 ), (f 2 , g 2 ) : H ⇒ K, since I preserves limits, (f, g) is the equalizer of (f 1 , g 1 ) and (f 2 , g 2 ) in Graph.Let G ′ be the graph where and s G ′ , t G ′ are the restrictions of s H and t H . Then an equalizer (i, j) : G ′ → H of (f 1 , g 1 ) and (f 2 , g 2 ) in Graph is given by the inclusions Notice that G ′ is simple because H is. Now, I preserves limits, so there exists an isomorphism (in Graph and in SGraph) commutes.If we show that (i, j) is edge-reflecting we are done.For every e ∈ H(i(v 1 ), i(v 2 )) then where i 1 and i 2 are the inclusion of V H and V H g(V G ) into V .Restricting the projections, we get two arrow s, t : E ⇒ V , let K be the directed graph (E, V, s, t), which by construction is simple.Now, consider paired with i 1 : V H → V it induces a morphism (f, i 1 ) : H → K. On the other hand, define and with inclusion i : A → E H , and let also j be the inclusion g(V H ) → V H .By construction there are arrows s, t : commute.Putting G ′ := (A, g(V G ), s, t) we get a (simple) graph, with an inclusion (i, j) : G ′ → G which is the equalizer in Graph of (f, i 1 ) and (f ′ , i ′ ).Now, g = j • φ for some φ : Since j is injective, we can deduce that (ψ, φ) is a morphism G → G ′ .Now, φ is surjective by construction and g is injective by hypothesis, thus φ is injective too and, using Corollary 3.4, we can deduce that also ψ is injective.If we show that ψ is also surjective we are done: let e ∈ A, then e ∈ H(g(v 1 ), g(v 2 )) for some v 1 , v 2 ∈ V G , thus there exists e ′ ∈ G(v 1 , v 2 ) and, necessarily, f (e ′ ) = e, but this means that ψ(e ′ ) = e.
Proof.Let (f, g) : G → H be a monomorphism in Graph, then L(f, g) = (f , g) where f is the unique arrow such that f • π G = f .Now, by Remark 3.2 g is injective, thus the thesis follows from Corollary 3.4.
Example 3.9.In [JLS07] it is shown that SGraph is not quasiadhesive.Take the cube By the results of Proposition 3.7 the top and bottom faces are pushouts along regular monos and the back faces are pullbacks, but the front one is not, contradicting the Van Kampen property.The same example shows that even DAG is not quasiadhesive.Proof.Since Graph is a presheaf category, the pullback of a cospan G The two obvious projections give the limiting cone.Now it follows at once that two edges with the same source and target or a cycle in P would induce parallel edges and cycle in G and K, thus P is in SGraph or DAG if G and K are in it.
We are left with pushouts.Let us start again with the presheaf category Graph and a span G Its pushout is given by P where E P and V P are given by the pushouts • Let (f 1 , g 1 ) and (f 2 , g 2 ) be, respectively, a regular mono and a mono in SGraph.Let also e 1 and e 2 be two elements of P(v, v ′ ).We can use Lemma 2.7 to get the following cases.
e 1 = p 1 (e ′ 1 ) and e 2 = p 1 (e ′ 2 ) for some e ′ 1 , e ′ 2 ∈ e K .Then But q 1 is injective, since g 1 is injective and Set is adhesive, so , from which we can deduce that e ′ 1 = e ′ 2 and the thesis follows.
e 1 = p 2 (e ′ 1 ) and e 2 = p 2 (e ′ 2 ) for some e ′ 1 , e ′ 2 ∈ E G .Then But g 2 is injective, so, as before, q 2 is injective too and ) and e 2 = p 2 (e ′ 2 ) for some e ′ 1 ∈ K and e ′ 2 ∈ E G .Therefore we have Thus there exist w 1 and w 2 ∈ V H such that Thus e ′ 1 ∈ G(g 1 (w 1 ), g 1 (w 2 )), but (f 1 , g 1 ) is regular, so Proposition 3.7 entails the existence of e ∈ H(w 1 , w 2 ).Now, f 1 (e) = e ′ 1 , while ) and thus f 2 (e) = e ′ 1 .We conclude that e 1 = e 2 in E P e 1 = p 2 (e ′ 1 ) and e 2 = p 1 (e ′ 2 ) for some e ′ 1 ∈ G and e ′ 2 ∈ E K .This is done exactly as in the previous point swapping the roles of e ′ 1 and e ′ 2 .• Let (f 1 , g 1 ) and (f 2 , g 2 ) be, respectively, a downward closed morphism and a mono in DAG.Suppose that a cycle [e i ] n i=1 in P is given.We split again the cases using Proposition 5.13.
As before, q 1 is injective because is the pushout of an injective functions, thus [e ′ i ] n i=1 is a cycle in K, which is absurd.
Even in this case we can conclude appealing to the injectivity of q 2 .To deal with the other cases we can reason in the following way.Take e = p 1 (e ′ ) for some e ′ ∈ E K and suppose that there exists a = p 2 (a ′ ) for some a ′ ∈ E G such that s P (e) = t P (a).By Lemma 2.7 there exists v ∈ V H such that Let us apply this argument to our cycle [e i ] n i=1 .By Lemma 2.7 and the second point above, there must be an index j such that e j ∈ p 1 (E K ).Now, if j > 1 the previous argument shows that e j−1 ∈ p 1 (E K ) too, thus surely e 1 ∈ p 1 (E K ).But, since [e i ] n i=1 is a cycle, the same argument shows that e n ∈ p 1 (E K ) and this implies that every e i ∈ e 1 ∈ p 1 (E K ) for every 1 ≤ i ≤ n, but we already know that this is absurd.Indeed consider a pullback square with (f, g) but (f, g) ∈ dclosed d , and so there exist w 2 ∈ V K and e 2 ∈ E K such that hence (s G (e 1 ), w 2 ) ∈ V P and (e 1 , e 2 ) ∈ E P and this means that s G (e 1 ) ∈ π 1 (V P ) and e 1 ∈ π ′ 1 (E P ), i.e. that (π 1 , π ′ 1 ) ∈ dclosed d .• dclosed d is stable under pushouts.Take a pushout square in Graph we know by the proof of Lemma 3.13 that its pushout P does not contains cycles (even if can contain parallel edges).Applying L to it we get a pushout in SGraph that is acyclic, therefore, since DAG is a full subcategory of SGraph, a pushout in DAG.So, by Remark 3.11 it is enough to show that dclosed is closed under pushouts.But this now follows by the description of pushouts in Graph.
Indeed let e ∈ E P such that t P (e) = q 1 (v) for some v ∈ V K .Suppose that e / ∈ p 1 (E K ), by Lemma 2.7 we know that there exists e ′ ∈ E G such that p 2 (e ′ ) = e, but then Thus there exists w ∈ V H such that Since, by hypothesis, (f 1 , g 1 ) is in dclosed, there exists e ′′ ∈ E H such that f 1 (e ′′ ) = e ′ , thus p 1 f 2 e ′′ = p 2 f 1 e ′′ = p 2 (e ′ ) = e and e ∈ p 1 (E K ).

Tree Orders.
In this section we present trees as partial orders and show that the resulting category is actually a topos of presheaves, hence adhesive.This fact will be exploited in Section 4.2 to construct a category of hierarchical graphs, where the hierarchy between edges is modelled by trees.Definition 3.15.A tree order is a partial order (E, ≤) such that for every e ∈ E, ↓e is a finite set totally ordered by the restriction of ≤.Since ↓e is a finite chain we can define the immediate predecessor function For any k ∈ N + we can define the k th predecessor function = * in which we take i 0 E to be the inclusion E → E ⊔ { * }.Let f : (E, ≤) → (F, ≤) be a monotone map and f * : E ⊔ { * } → F ⊔ { * } be its extension sending * to * .We say that f is strict if the following diagram commutes We define Tree as the subcategory of Poset given by tree orders and strict morphisms.
Example 3.16.A strict morphisms is simply a monotone function that preserves immediate predecessors (and thus every predecessor).For instance the function {0} → {0, 1} sending 0 to 1 and where we endow the codomain with the order 0 ≤ 1, is not a strict morphism.
Remark 3.17.Clearly i 1 E = i E and it holds that i k E (e) = * if and only if |↓e| ≤ k.In this case an easy induction shows that ↓i k E (e) = |↓e| − k.Remark 3.18.We have an obvious forgetful functor Let (E, ≤) be an object of Tree and ω the first infinite ordinal, then we can define its associated presheaf E : ω op → Set sending n to the set If n ≤ m in ω, we can define a function which is well defined since |↓e| > m − n so is the identity, while for any k ≤ n ≤ m we have Theorem 3.20.There exists an equivalence of categories (−) : Tree → Set ω op sending (E, ≤) to E.
Proof.Let f : (E, ≤) → (F, ≤) be an arrow in Tree, then an easy induction shows that it must send e ∈ E(n) in F (n) • if n = 0 then i F (f (e)) = f * (i E (e)) = * , so so ↓f (e) = ∅ and thus f (e) ∈ F (0); • if n ≥ 1 since e ∈ E(n), then i E (e) ∈ E(n−1) and, by the inductive hypothesis f (i E (e)) ∈ F (n − 1) and f (i E (e)) = f * (i E (e)) = i F (f (e)), so i F (f (e)) ∈ F (n − 1) and thus f (e) ∈ F (n). Therefore we can define and, for every n ≤ m and e ∈ E(m) we have where the middle step follows easily by induction from the definition of strict morphism.Thus we can define the functor (−) : Tree → Set ω op , we want to show that it is an equivalence.It is clearly faithful while, for every η : E → F , we can define that is easily seen to be strict.This prove fullness.For essential surjectivity: given F : ω op → Set we define q F as the poset in which • the underlying set is given by ⊔ n∈ω F (n); • x ≤ y if and only if x = F (l n,m )(y) where x ∈ F (n), y ∈ f (m) and l n,m is the arrow corresponding to n ≤ m.For every e ∈ ⊔ n∈ω F (n) it holds that Proof.Let (−) be the equivalence constructed in the previous theorem, and define ⊔ : since colimits are computed component-wise in Set ω op and coproducts in Set commute with colimits we get that ⊔ preserves them.Now it is enough to notice that the following triangle commutes 3.3.Hierarchical graphs.We can use trees to produce a category of hierarchical graphs [Pal04], which, in addition, can be equipped with an interface, modelled by a function into the set of nodes.Let us start with graphs.
This data, with componentwise composition, form a category HGraph.
HGraph can be realized as a comma category: take as L the functor |−| : Tree → Set of Remark 3.18, while as R we take Set → Set which sends V to V × V and f to f × f .Applying Theorem 2.20 we get the following result.

Theorem 3.23. HGraph is an adhesive category.
Let G be a hierarchical graph, we can model an interface as a function between a set X and the set of nodes V .Now, |−| : Tree → Set preserves the initial objects, thus, by Proposition 2.22, the forgetful functor HGraph → Set, which only remembers the set of nodes, has a left adjoint ∆, thus an interface is just a morphism ∆(X) → G.This suggests the definition of the following category.
Definition 3.24.The category HIGraph of hierarchical graphs with interface is the category ∆↓id HGraph .
We can give a more explicit description of HIGraph.Objects are triples (G, X, f ) made by a hierarchical graph G, a set X and a function f Whatever description we choose, the following result now follows from Theorem 2.20.

Application to some categories of hypergraphs
In this section we will move from the world of graphs to the one of hypergraphs allowing an edge to join two arbitrary subsets of nodes.Even in this case, leveraging the modularity provided by Theorem 2.10, it is possible to combine sufficiently adhesive categories of preorders or graphs (modelling the hierarchy between the edges) while retaining suitable adhesivity properties.It is worth noticing that, beside hypergraphs or interfaces, this methodology can be extended easily to other settings such as Petri nets (see [EHKPP91]).
4.1.Hypergraphs.We will start this section with the definition of (directed) hypergraph and we will see how label them with an algebraic signature.We will denote by (−) ⋆ the monad Set → Set associated to the algebraic theory of monoids (i.e. the Kleene star ), moreover, given a set V, e V will be the empty word in given by two sets E G and V G , whose elements are called respectively hyperedges and nodes, pluse two source and target functions s G , t G : We define Hyp to be the resulting category.
Notation.Given a set X, length X : X ⋆ → N is the function which sends a word to its length.Notice that for every function f : X → Y , the following diagram commutes e X will denote the empty word in X ⋆ , moreover given x ∈ X ⋆ {e X } and 1 ≤ n ≤ length X (x), x n is the n th letter of x.
It's easy to see that this definition is exactly the definition of the comma category id Set ↓R where R : We can also notice that the monoid monad (−) ⋆ : Set → Set is cartesian, i.e. preserves all connected limits.This in turn rests upon the fact that the theory of monoids is a strongly regular theory (see [CJ95,Sec. 3] and [Lei04, Ch.4] for details).In particular it preserves pullbacks, thus we can apply Theorem 2.20 and Corollary 2.19.Proposition 4.2.Hyp is an adhesive category.Remark 4.5.Since the initial object of Set is the empty set, ∆ Hyp (X) is the hypergraph which has X as set of nodes and ∅ as set of hyperedges.
Hypergraphs, as normal graphs, can be represented graphically.We will use dots to denote nodes and squares to denote hyperedges, the name of a node or of an hyperedge will be put near the corresponding dot or square.Sources and targets are represented by lines between dots and squares: the lines from the sources of an hyperedge will enter its square from the left, while the lines to the targets will exit it from the right, we will adopt the convention for which sources and targets are ordered from the top to the bottom.We can now illustrate this giving some example.
Example 4.6.Take V to be be {v 1 , v 2 , v 3 , v 4 , v 5 } and E to be {h 1 , h 2 , h 3 }.Sources and targets are given by: We can draw the resulting G as follows: Example 4.7.Let V be as in the previous example and E = {h 1 , h 2 , h 3 }.Then we define Now we can depict G as Example 4.8.Let Σ = (O, ar) be an algebraic signature (O is a set and ar : O → N a function called arity function), we can construct the hypergraph G Σ taking V and E to be respectively the singleton v and the set O. We put For instance let Σ be the signature of groups ({m, i, e}, ar) with Then G Σ is depicted as: This last example is useful in order to label hyperedges with operations.
Definition 4.9.Let Σ = (O, ar) be an algebraic signature, the category Hyp Σ of labeled hypergraphs is the slice category Hyp/G Σ .
Corollary 2.19 and Corollary 2.21 give us immediately an adhesivity result for Hyp Σ and a characterization of monomorphisms in it.
Proposition 4.10.For every algebraic signature Σ, Hyp Σ is an adhesive category.Moreover a morphism (h, k) between two object of Hyp Σ is a mono if and only if h and k are injective functions.
Hyp Σ has a forgetful functor U Σ : Hyp Σ → Set which sends h : H → G Σ to U Hyp (H).Now, U Hyp (G Σ ) = {v} thus, for every set X, there is only one arrow X → U Hyp (G Σ ).Define ∆ Σ (X) : ∆ Hyp (X) → G Σ to be the transpose of this arrow.
Proof.Let h : H → G Σ be an object of Hyp Σ , and suppose that there exists f : X → U Σ (H).Since U Σ (H) = U Hyp (H) and id Set is the unit of ∆ ⊣ U Hyp , there exists a unique morphism of Hyp (k, f ) : ∆ Hyp (X) → H. Since the set of hyperedges of ∆ Hyp (X) is empty, k must be the empty function and the commutativity of each of the two triangles below is equivalent to that of the other But the triangle on the right commutes because U Hyp (G Σ ) is terminal.
A more concrete definition of a labeled hypergraphs can be given.Let H = (E, V, s, t) be an hypergraph, since U Hyp (G Σ ) is the singleton an arrow H → G Σ , is determined by a function f : E → O such that ar(h(e)) is equal to the length of s(e).
Remark 4.12.If H has an hyperedge h such that t H (h) has a length different from 1, then there is no morphism We will extend our graphical notation of hypergraph to labeled ones putting the label of an hyperedge h inside its corresponding square.
In this case we get the following: There is a colored (or typed) version of these last constructions.Start with a colored algebraic signature: this is a triple (C, O, ar) where C is the set of colors, O is the set of operations and ar : O → C • × C • assigns to every operations f an arity and a coarity given by strings of colors.We can still construct an hypergraph G Σ with C as set of nodes using the operations as hyperedges.In this context an object in the slice Hyp/G Σ is an hypergraph in which both the hyperedges and the nodes are labeled, the formers with an elemento of O and the latters with an element of C [?].
Hyp as a topos of presheaves.By Corollary 2.18 we already know that Hyp has all connected limits, and by Proposition 4.2 we know that it is adhesive.Actually more can be proved about it: we can realize Hyp as a presheaf topos [?].
Definition 4.16.Let I be the category in which: • the set of objects is given by (N × N) ∪ {•} • arrows are given by the identities id k,l and id • and exactly k + l arrows f i : (k, l) → •; • composition is defined simply putting, for every f i : (k, l) → •: Then we have Proposition 4.17.Hyp is equivalent to the category Set I .
Proof.Let X be a set, for every n ∈ N define We are now ready to that G − is full and essentially surjective.
• For fullness, let (f, g) : G F → G H be a morphism of hypergraphs and define h k,l to be h thus the previous computations shows that there exists η k,l such that the square commutes.Now, defining η • as g, the collection {η k,l } k,l∈N , defines a natural transformation η : F → H. Indeed, if f i : (k, l) → • we have: The diagram on the right implies naturality where i ≤ k, while the one on the left takes care of the other case.Finally, by contruction it is clear that (η, η • ) = (f, g).
• Given an hypergraph G = (E, V, s, t) we can define Now, F G is a functor I → Set and for every h ∈ E there exists a unique pair (k, l) Moreover, by construction s F G = s and t F G = t, from which the thesis follows.
As a corollary we get immediately the following.
Taking componentwise composition we get a category HHGraph.
It's now easy to see that, with this definition, HHGraph is the comma category |−|↓(−) ⋆ , therefore deducing its adhesivity.
Theorem 4.20.HHGRaph is adhesive.Moreover, the functor HHGraph → Set, which sends a hierarchical hypergraph to its set of nodes, has a left adjoint ∆ HHGraph .
Proof.The first half follows from Theorem 2.20, the second one from Proposition 2.22.
To add interface we proceed exactly as in Section 3.3, using Proposition 4.4 Definition 4.21.The category HHIGraph of hierarchical hypergraphs with interface is the comma category ∆ HHGraph ↓id Hyp .
As before we can give a more explicit description of HHIGraph.An object in it is a triple (G, X, f ) made by a hierarchical hypergraph G = ((E G , ≤), V G , e G ), a set X and a function f : Remark 4.22.This category of hypergraphs whose edges form a tree order, corresponds to Milner's (pure) bigraphs [Mil09], with possibly infinite edges 1 .
Given its definition, we deduce at once the following.
4.3.SGraph and DAG-hypergraphs.We can consider more general relations between edges, besides tree orders.An interesting case is when edges form a directed acyclic graph, yielding the category of DAG-hypergraphs; this corresponds to (possibly infinite) bigraphs with sharing, where an edge can have more than one parent, as in [SC15] (see also Fig. 1, left).Even more generally, we can consider any relation between edges, i.e., the edges form a generic directed graph possibly with cycles, yielding the category of SGraph-hypergraphs.These can be seen as "recursive bigraphs", i.e., bigraphs which allow for cyclic dependencies between controls, like in recursive processes; an example is in Fig. 1 (right).
Thess data give rise to the categories SHGraph and DAGHGraph respectively.
We can realise both SHGraph and DAGHGraph as comma categories,: take respectively the forgetful functors SGraph → Set and DAG → Set on one side and the Kleene star (−) * on the other.Theorem 4.25.SHGraph is adhesive with respect to the classes while DAGHGraph is adhesive with respect to the classes 1 In bigraph terminology, "controls" and "edges" correspond to our edges and nodes.If we unravel the definition we get the following description of these two categories.An object in SHIGraph (DAGHGraph) is a triple (G, V, e), X, f ) where (G, V, e) is a SGraph-hypergraph (a DAG-hypergraph) and f is a function X → V .An arrow ((G, V, e), X, f ) → ((H, w, e ′ ), Y, g) is then a triple ((h 1 , h 2 ), k, l) made by (h 1 , h 2 ) : G → H in SGraph (in DAG), k : V → W and l : X → Y in Set such that the following squares commute In this setting Theorem 4.25 becomes the following.
Theorem 4.27.SHGraph is adhesive with respect to the classes while DAGHGraph is adhesive with respect to the classes

Term graphs
In the past years, the use of a particular class of hypergraphs, called term graphs has been advocated as a tool for the optimal implementation of terms, with the intuition that the graphical counterpart of trees can allow for the sharing of sub-terms [Plu99].A brute force proof of quasiadhesivity of the category of term graphs was given in [CG05].In this section we will present the category of term graphs as a subcategory of labeled hypergraphs, moreover we will recover the result of [CG05] exploiting our new criterion for adhesivity.
Definition 5.1.Let Σ be an algebraic signature, a labelled hypergraph l : G → G Σ is a term graph if for every hyperedges Take now a mono (i, j) : H → G between l : G → G Σ and l ′ : H → G Σ in Hyp, using Proposition 4.10, if l is a term graph then l ′ belongs to TG Σ too.In particular we can apply this argument when l ′ is the equalizer of two parallel arrows between term graphs.Proposition 5.5.TG Σ has equalizers and I Σ creates them.
We have a similar result even for binary products.
Proposition 5.6.TG Σ has binary products and I Σ creates them.
Proof.Let l : G → G Σ and t : H → G Σ be two term graphs, their product in Hyp Σ is given by p : P → G Σ , where the square is a pullback in Hyp and (p, !V P ) is the unique diagonal filling it.Since Hyp is a comma category, this means that the squares are pullbacks in Set.Moreover t P is such that the diagram Since pullbacks can be computed from products and equalizers we also get the following.
Corollary 5.7.TG Σ has pullbacks and they are created by I Σ .
Remark 5.8.TG Σ in general does not have terminal objects.Since U TG Σ preserves limits, if a terminal object exists it must have the singleton as set of nodes, therefore the set of hyperedges must be empty or a singleton {h}.Now take as signature the one given by two operations {a, b} of arity 0; we have three term graphs with only one node v: There are no morphisms in TG Σ between the last two and from the last two to the first one, therefore none of them can be terminal.
Remark 5.9.TG Σ is not an adhesive category.In particular it does not have pushouts along all monomorphisms.Take the graphs of the previous remark and call them ∆ TG which cannot be completed to any square.Indeed if h : H → G Σ another term graph with (g E , g V ) : l → h and (k E , k V ) : l ′ → h complete the span, than g E (h 1 ) and k E (h 2 ) both have g Definition 5.10.Given a hypergraph G, we will say that v ∈ V G is an input node if it does not belong to the image of t G .
Proposition 5.11.Let l : H → G Σ be a term graph and (f, g) : G → H an arrow of Hyp such that the image of any input node is still an input node.For every Since H is a term graph we can conclude that f (k) = h.
We are now ready to show that regular monos are exactly monos sending input nodes to input nodes.Lemma 5.12.A mono (i, j) between two term graphs l : G → G Σ and l ′ : H → G Σ is regular if and only if it sends input nodes to input nodes.
Proof.(⇒).This follows at once from Proposition 5.5.(⇐).Take V and E to be, respectively, Now, we are going to use another auxiliary function which is clearly injective.So equipped we can define s, t : E ⇒ V ⋆ as the functions induced by Let now K be the hypergraph (E, V, s, t), and take as label q : K → G Σ the morphism induced by l ′ : E H → E G Σ and its restriction to E H i(E G ).We have now to check that q : K → G Σ is actually a term graph.Suppose that t(h 1 ) = t(h 2 ), we have three cases.
and thus, exploiting Remark 4.3, . By the definition of t, this can happen only if t H (k) ∈ j(V G ), therefore, using Proposition 5.11, k must be an element of i(E G ), which is absurd.
• h 1 = i 2 (h) and h 2 = i 1 (k) for some h ∈ E H , k in E H i(E G ).This is done as in the previous point, switching the roles of h 1 and h 2 .Now, by construction (i 1 , j 1 ) defines an arrow H → K, which is also a morphism of TG Σ .On the other hand we can construct another arrow (f, r) parallel to it defining and noticing that Where the last equalities follows since h ∈ i(E G ) implies that By construction q(f (h)) = l ′ (h), thus (f, g) is a morphism in TG Σ .Now, G is the equalizer of (f, g) and (i, j) in Hyp, thus it is their equalizer even in Hyp Σ , and the thesis follows since the inclusion TG Σ → Hyp Σ reflects limits.Proposition 5.13.Let l 0 : G → G Σ , l 1 : H → G Σ and l 2 : K → G Σ be term graphs and (f 1 , g 1 ) : G → H, (f 2 , g 2 ) : G → K two morphisms between them and suppose that (f 1 , g 1 ) is a regular mono.Then their pushout p : P → G Σ in Hyp Σ is a term graph too.
Remark 5.14.By definition Hyp Σ the comma category on id Hyp and the costant functor in G Σ .Now, this last functor preserves pushouts, thus we know how to compute this kind of colimits in Hyp Σ .In particular p : P → G Σ is given by the pushout P in Hyp equipped with the labeling induced by l 1 and l 2 .
Proof.By the previous remark we know that we have pushout squares in Set And diagrams Now, suppose that there exists h 1 , h 2 ∈ E P such that t P (h 1 ) = t P (h 2 ), by Remark 4.12 we know that t P (h 1 ), t P (h 2 ) ∈ V P , thus, by Lemma 2.7 there are two possible cases.(a) There exists a unique w ∈ V K such that t P (h 1 ) = k V (w) = t P (h 2 ).Using again Lemma 2.7 we can split this case in four subcases.
(a.i)There exist k 1 and k 2 ∈ E K such that Then uniqueness of w implies that and we can conclude since K is the hypergraph undelying a term graph.
(a.ii)There exist h ′ 1 and h Thus g V (v 1 ) = w = g V (v 2 ) On the other hand Proposition 5.11 implies that there exist g 1 , g 2 ∈ E G such that Hence t K (g E (g 1 )) = w = t K (g E (g 2 )) and we can deduce that g E (g 1 ) = g E (g 2 ) from which h 1 = h 2 follows using Lemma 2.7.
(a.iii)There exist k ∈ E K and h ′ ∈ E H such that and we can conclude that there exists v ∈ V G with the property that Using Proposition 5.11 we can also deduce the existence of g ∈ E G satisfying Since K underlies a term graph it follows that g E (g) = k.Appealing again to Lemma 2.7 we get the thesis.
(a.iv)This is case is dealt as the previous one, simply swapping h 1 and h 2 .(b) There exists a unique v ∈ V H f V (V G ) such that t P (h 1 ) = h V (v) = t P (h 2 ) Now, if h ∈ E K is such that t P (k E (h)) = h V (v) then, by Lemma 2.7, there must be w ∈ V G such that f V (w) = v and g V (w) = k, but this is absurd under our hypothesis.We conclude that there exist h ′ 1 and h ′ 2 ∈ E H such that h E (h ′ 1 ) = h 1 h E (h ′ 2 ) = h 2 and the uniqueness of v implies that t H (h ′ 1 ) = t H (h ′ 2 ) The thesis now follows.

Conclusions
In this paper we have introduced a new criterion for M, N -adhesivity, based on the verification of some properties of functors connecting the category of interest to a family of suitably adhesive categories.This criterion can be seen as a distilled abstraction of many ad hoc proofs of adhesivity found in literature.This criterion allows us to prove in a uniform and systematic way some previous results about the adhesivity of categories built by products, exponents, and comma construction.We have applied the criterion to several significant examples, such as term graphs and directed (acyclic) graphs; moreover, using the modularity of our approach, we have readily proved suitable adhesivity properties to categories constructed by combining simpler ones.In particular, we have been able to tackle the adhesivity problem for several categories of hierarchical (hyper)graphs, including Milner's bigraphs, bigraphs with sharing, and a new version of bigraphs with recursion.
As future work, we plan to analyse other categories of graph-like objects using our criterion; an interesting case is that of directed bigraphs [GM07, BGM09, BMP20].Moreover, it is worth to verify whether the M, N -adhesivity that we obtain from the results of this paper is suited for modelling specific rewriting systems, e.g. based on the DPO approach.As an example, TG Σ is quasiadhesive but this does not suffice in most applications, because the rules are often spans of monomorphisms, and not of regular monos [CG05].
We are now ready to give the definition of M, N -adhesive category[HP12,PH16].Definition 2.4.Let A be a category and M⊆Mono(A), N ⊆Mor(A) such that (i) M and N contain all isomorphisms and are closed under composition and decomposition; (ii) N is closed under M-decomposition; (iii) M and N are stable under pullbacks and pushouts.Then we say that A is M, N -adhesive if (a) every cospan C g − → D m ← − B with m ∈ M can be completed to a pullback (such pullbacks will be called M-pullbacks); (b) every span C m ← − A n − → B with m ∈ M and n ∈ N can be completed to a pushout (such pushouts will be called M, N -pushouts); (c) M, N -pushouts are Van Kampen squares.
5) for every b ∈ B and c ∈ C, n(b) = g(c) if and only if there exists a ∈ A such that m(a) = c f (a) = b (2.) Let us show properties (a), (b), (c) defining M, N -adhesivity.(a) Given a cospan C g − → D m ← − B in A with m ∈ M we can apply F j ∈ F to it and get F j (C) F j (g) − −− → F j (D) F j (m) ← −−− − F j (B) which is a cospan in B j with F j (g) ∈ M j , thus, by hypothesis it has a limiting cone (P j , p F j (B) , p F j (C) ) in B j .Since F jointly lifts M-pullbacks there exists a limiting cone (P, p B , p C ) for the cospan C g − → D m ← − B. (b) Analogously: for every span C m ← − A n − → B in A with m ∈ M and n ∈ N , we have Proposition 2.22.If A has initial objects and L preserves them then the forgetful functor U R : L↓R → B has a left adjoint ∆.Proof.For an object B ∈ B define ∆(B) as (I, B, !B ), where I is an initial object in A and !B is the unique arrow L(I) → B. Let id B : B → U R (∆(B)) = B be the identity, and k : B → U R (A, B ′ , f ) an arrow in B. Now, by initiality of I, there is only one arrow h : I → A in A and, since L preserves initial objects, the following square commutes.

Theorem 3. 14 .
The category SGraph is both Reg(SGraph), Mono(SGraph)-adhesive and Mono(SGraph), Reg(SGraph)-adhesive, while DAG is dclosed d , Mono(DAG)-adhesive.Proof.In light of Theorem 2.10 we only have to show that the right classes of arrows satisfies the properties of Definition 2.4.Clearly all classes contains all isomorphisms and are closed under composition.Mono(A) is closed under decomposition, and Reg(A) is closed under Mono(A)-decomposition for every category A, so Mono(SGraph), Reg(SGraph) and Reg(DAG) are closed under decomposition, Reg(SGraph) under Mono(SGraph)decomposition, Mono(SGraph) under Reg(SGraph)-decomposition and, finally, the class Mono(DAG) under dclosed d -decomposition.Moreover they are all closed under pullbacks.Now for the other properties • Mono(DAG) and Reg(DAG) are closed under pushout.The first one follows from Corollary 3.8 and the adhesivity of Graph, while the second one follows from the explicit construction of pushouts in Graph and in SGraph.• dclosed d is stable under pullbacks.It follows from the explicit construction of pullbacks.
for some m ≤ n} and so |↓x| ≤ n + 1.On the other hand if x = F (l m,n )(e) and y = F (l k,n )(e) with, say, m ≤ k, thenx = F (l m,n )(e) = F (l n,k (l m,k (e))) = F (l n,k (y))thus x ≤ y and q F ∈ Tree.Corollary 3.21.Tree is adhesive and the forgetful functor |−| : Tree → Set preserves all colimits.
Remark 4.3.Preservation of connected limits implies that (−) ⋆ sends monos to monos.Proposition 2.22 allows us to deduce immediately the following.

Proposition 4. 4 .
The forgetful functor U Hyp : Hyp → Set which sends an hypergraph G to its set of nodes has a left adjoint ∆ Hyp .
Example 4.13.The simplest example is given by the identity id G Σ : G Σ → G Σ .If Σ is the signature of groups we get 14.Take again Σ the signature of groups, then the hypergraph G of Example 4.7 can be labeled defining Corollary 4.18.Hyp is a complete category.4.2.Hierarchical hypergraphs.We can leverage on the modularity of Theorem 2.10 and Theorem 2.20 to give hypergraphical variants for Theorem 3.23 and Theorem 3.25.This is done replacing the set E G of hyperedges with a tree order (E G , ≤) and id Set with the forgetful functor|−| : Tree → Set.Definition 4.19.A hierarchical hypergraph G is a triple ((E G , ≤), V G , e G ) where (E G , ≤) is a tree order, V G a set and e G : E G → V ⋆ G a function.A morphism G → H is a pair (f, g) with f : (E G , ≤) → (E H , ≤)in Tree, g : V → W in Set such that the following square commutes

Definition 4 .
24.A SGraph-hypergraph (respectively DAG-hypergraphs) is a triple (G, V, e) where G is in SGraph (in DAG), V is a set and e a function E G → V ⋆ .A morphism of SGraph-hypergraph (DAG-hypergraphs) is a pair ((h 1 , h 2 ), k) : (G, V, e) → (H, W, e ′ ) with (h 1 , h 2 ) : G → H in DAG (in SGraph) and k : V → W in Set such that the following square commute

Figure 1 :
Figure 1: A DAG-hypergraph (left) and a SGraph-hypergraph corresponding to the CCS process P = a(x).b(xy).P (right).A red arrow between two edges denotes the order relation ≤.
We define TG Σ to be the full subcategory of Hyp Σ and denote by I Σ the corresponding inclusion.Remark 5.2.Notice that, by Remark 4.12, if G is a term graph then t G (h) is a word of length 1, i.e. an element of V G .Example 5.3.Of the examples of Section 4.1, only Example 4.14 is a term graph.Composing I Σ qith U Σ : Hyp Σ → Set we get a functor U TG Σ : TG Σ → Set.Now, ∆ Σ (X) is a term graph for every set X, thus ∆ Σ factors through I Σ .This allows us to conclude the following.Proposition 5.4.The forgetful functor U TG Σ : TG Σ → Set has a left adjoint ∆ TG Σ .