Towards M-Adhesive Categories of Corecursive Graphs

Towards M-Adhesive Categories of Corecursive
Graphs
arXiv:1702.04650v2 [cs.LO] 2 Mar 2017
Julia Padberg
Hamburg University of Applied Sciences
Germany
[email protected]
Abstract. In this contribution we investigate several extensions of the
powerset that comprise arbitrarily nested subsets, and call them superpower set. This allows the definition of graphs with possibly infinitely
nested nodes. additionally we define edges that are incident to edges.
Since we use coalgebraic constructions we refer to these graphs as corecursive graphs. The superpower set functors are examined and then used
for the definition of M-adhesive categories which are the basic categories for M-adhesive transformation systems. So, we additionally show
that coalgebras SetsF are M-adhesive categories provided the functor
F : Sets → Sets preserves pullbacks along monomorphisms.
Keywords: graph, hierarchy, coalgebra, corecursion, M-adhesive transformation system
Table of Contents
Towards M-Adhesive Categories of Corecursive Graphs . . . . . . . . . . . . . . . .
Julia Padberg
1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Node Corecursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 Node corecursion based on P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Node Corecursion Based on P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Node recursion based on P ω . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Differences between P, P and P ω . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 M-adhesive Categories of F -Coalgebras . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Endofunctors and Pullbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Edge Corecursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Corecursive Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1 Recursive Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Recursive Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3 Bigraphs as a Corecursive Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Hierarchical Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 Power Set Functor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3 Noetherian Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
2
4
4
7
11
14
15
18
18
19
21
21
21
22
23
24
26
26
28
29
Motivation
The main motivation of this paper is the question how to define recursion on a
graph’s structure so that we still obtain an M-adhesive transformation systems.
Since the recursion construct we use in this contribution is a coalgebraic construction we consequently use the term corecursive.
We start with a examples of such graphs to illustrate what we aim at.
Example 1 (Corecursive graphs). The corecursive graph G1 = (cN1 , cE1 , con1 , ngb1 )
is given in Fig. 1(a) and consists of a set of nodes cN , a set of edges cE, a contains function con and a neighbour function ngb. con yields the set of nodes for
each node those i
Let cN1 = {n1 , n2 , n3 , n4 , n5 , n6 } with:

ni
;1 ≤ i ≤ 3



{n , n }
;i = 4
1
2
con1 (ni ) =
{n3 }
;i = 5



{n2 , {n2 , n3 }, n5 } ; i = 6
3
The atomic vertices are V1 = {n1 , n2 , n3 } and
con(cN1 ) = {n1 , n2 , n3 , {n1 , n2 }, {n3 } , {n2 , {n1 , n2 }, n5 }}.
We have n1 , n2 ∈ con1 (n4 ) and {n1 , n2 } ∈ con1 (n6 ).
(a) Corecursive graph G1
(b) Corecursive edges in G2
Fig. 1. Examples of corecursive graphs
cE1 = {a, b, c, d, e} with ngb1 : a 7→ {n1 , n3 }
b 7→ {n2 , b}
c 7→ {n5 }
d 7→ {b, n2 , n5 }
Edge d is an hyperedge. All other edges are arcs, i.e., edges that have one or two
nighbours.
The atomic arcs are A1 = {a, c}.
The edges are not node-based, since ngb + (b) and ngb + (d) remain undefined, b
is an unary arc, denoted by its end n2
b
•
.
In Fig. 1(b) the corecursive graph G2 = (V2 , cE2 , ngb2 with vertices, i.e. atomic
nodes V2 = {a, b, c, d} and edges cE2 = {x1, x2, x3, x4} with ngb2 : x17→{a, b, c}
x27→{a, b}
x37→{x2, d}
x47→{a}
can be flattened to a hypergraph with the attachment function att := ngb2 + :
cE → P(V ) and ngb2 + : x17→{a, b, c}
x27→{a, b}
x37→{a, b, d}
x47→{a}
A corecursive graph with
– only atomic nodes and all edges are atomic arcs yields an undirected multigraph.
4
– only atomic nodes and all edges are atomic yields a classic hypergraph.
– all nodes being hierarchical and well-founded yields bigraphs Mil06 see Sect. 6.3.
– only atomic nodes and and all edges are layered and node-based yields hierarchical graphs as in DHP02 see Sect. 6.4.
– all nodes being layered and well-founded and and all edges are atomic yields
hierarchical graphs as in BKK05 see Sect. 6.4.
2
Node Corecursion
The superpower set is achieved by recursively inserting subsets of the superpower
set into itself. In this contribution we present three possibilities:
1. P allows atomic nodes.
2. P only allows sets of nodes.
3. P ω layers the nesting of nodes.
Subsequently, we investigate the properties of each construction and in Subsect. 2.4 we discuss the differences.
2.1
Node corecursion based on P
Definition 1 (Superpower set P). Given a finite set M and P(M ) the power
set of M then we define the superpower set P(M )
1. M ⊂ P(M ) and P(M ) ⊂ P(M )
2. If M 0 ⊂ P(M ) then M 0 ∈ P(M ).
P(M ) is the smallest set satisfying 1. and 2.
The use of the strict subset ensures that Russell’s antinomy cannot occur.
Note that this superpower set construction P is well-founded sets with the ordering with respect to the number of parentheses (see Appendix A.3).
The difference to P is that elements of the underlying set are elements of the
superpowerset as well, so M ⊂ P(M ) but M 6⊂ P for an non-empty set M .
Lemma 1 (P is a functor). P : Sets → Sets is defined for finite sets as in
?
Def. 1 and
( for functions f : M → N by f : P(M ) → P(N ) with
f (x)
;x ∈ M
f ? (x) =
? 0
0
{f (x ) | x ∈ x} ; else
Example 2 (Functor P). Given sets M = {u, v, w, u0 , v 0 } and N = {n1 , n2 , n3 , n4 , n5 , n6 }
with f : M → N and f : u7→n3 ; v7→n3 ; w7→n1
u0 7→n5 ; v 0 7→n5 ;
?
then we have f : P(M ) → P(N ) with for example
f ? ({u, v, w, {u, v}, {v, {w, ∅}}}) = {n3 , n1 , {n3 }, {n3 , {n1 , ∅}}}
Lemma 2 (P preserves injections). Given injective function f : M → N
then f ? : P(M ) → P(N ) is injective.
5
Proof. By induction1 over the depth of the superpower sets, so n is the number
of nested parentheses:
IA (n = 0) atomic nodes Given x1 , x2 ∈ P(M ) with x1 6= x2 .
Since f injective, f ? (x1 ) = f (x1 ) 6= f (x2 ) = f ? (x2 ).
IB Let f ? : P(M ) → P(N ) be injective for all sets with at most n nested
parentheses.
IS Given M1 , M2 ∈ P(M ) with M1 6= M2 having both n + 1 nested parentheses.
Let x ∈ M1 ∧ x ∈
/ M2 .
Hence f ? (x) ∈ f ? (M1 ).
x∈
/ M2 implies for all m ∈ M2 that x 6= m.
x and m have at most n nested parentheses.
f ? (x) 6= f ? (m) for all m ∈ M2 as f ? is injective for all sets with at most n
nested parentheses.
Thus f ? (x) ∈
/ f ? (M2 )
So, P(M1 ) 6= P(M2 ).
Lemma 3 (P preserves pullbacks along injective morphisms).
Proof. Given a pullback diagram (P B) and the diagram (1) in Sets with g1 :
C ,→ D injective.
Pullbacks and the super powerset functor (see Lemma 2) preserve injections, so
πB : A ,→ B, P(πB ) : P(A) ,→ P(B) and πP(B) : P ,→ P(B) are injective.

y
/B
πB
PZ A
πC

C
(P B)
f1
g1
/D
πP(B)
h̄
h
πP(C)
(2)

P(A) πB ?
&
/ P(B)
(1)
f1 ?
(3)
f πC ?

g1 ?
P(C) Since (P B) is a pullback diagram we have A = {(b, c) | f1 (b) = g1 (c)}.
(1) commutes, since P is a functor.
/ P(D)
Let P be the pullback of (P(D), f1 ? , g1 ? ), so f1 ? ◦ πP(B) = πP(C) ◦ g1 ? .
Hence, P = {(B 0 , C 0 ) | f1 ? (B 0 ) = g1 ? (C 0 )} ⊆ P(B) × P(C).
Moreover, there is the unique h : P(A) → P s.t. h(A0 ) = (πB ? (A0 ), f πC ? (A0 ))
for all A0 ⊆ A so that the diagrams (2) and (3) commute along h:
πP(B) ◦ h = πB ? and πP(C) ◦ h = πC ? .
We define h̄ : P → P(A) with
1
To be precise this is an Noetherian induction see Appendix A.3
6


(b, c) ; if X = b ∈ B, Y = c ∈ C
h̄((X, Y )) = {(x, y) | x ∈ X ∩ B, y ∈ Y ∩ C, f1 (x) = g1 (y)}

S

∪ (X 0 ,Y 0 )∈(X−B)×(Y −C) h̄(X 0 , Y 0 ) ; else
and have:
1. h̄ is well-defined since h̄(X, Y ) ∈ P(A).
2. (2) commutes along h̄, i.e. πB ? ◦ h̄ = πP(B) (X, Y ) by induction over the
number of nested parentheses n:
IA (n = 0, i.e. atomic nodes): Given (b, c) ∈ P with b ∈ B and c ∈ C.
πB ? ◦ h̄(b, c) = πB ? (b, c) = b = πP(B) (b, c)
IB Let be πB ? ◦ h̄(X, Y ) = πP(B) (X, Y ) for sets with at most n nested
parentheses.
IS Given (X̂, Ŷ ) ∈ P with n + 1 nested parentheses.
Let X̂ = B̂ ∪ X with B̂ ⊆ B and X ∩ B = ∅.
Let Ŷ = Ĉ ∪ Y with Ĉ ⊆ C and Y ∩ C = ∅.
X and Y have at most n nested parentheses.
πB ? ◦ h̄(X̂, Ŷ )
[
= πB ? ◦ {(x, y) | x ∈ B̂, y ∈ Ĉ f1 (x) = g1 (y)} ∪
h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
= {x | x ∈ B̂ ∧ ∃y ∈ Ĉ : f1 (x) = g1 (y)} ∪
[
πB ? ◦ h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
[
= B̂ ∪
πB ? ◦ h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
IB
[
= B̂ ∪
πP(B) (X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
[
= B̂ ∪
X0
(X 0 ,Y 0 )∈(X×Y )
= B̂ ∪ X
= X̂
= πP(B) (X̂, Ŷ )
Now we show P ∼
= P(A):
– h ◦ h̄ = idP ,
since πP(B) is injective and πP(B) ◦ h ◦ h̄ = πB ? ◦ h̄ = πP(B) ◦ idP
– h̄ ◦ h = idP(A) ,
since πB ? is injective and πB ? ◦ h̄ ◦ h = πP(B) ◦ h = πB ? = πB ? ◦ idP(A) .
Based on F -graphs (see Jä15b, Sch99), that is a family of graph categories
induced by a comma category construction using a functor F , we can define the
category of corecursive F -graphs.
7
Example 3 (Corecursive F -Graph). In Fig. 2 the following corecursive F -graphs
Fig. 2. cG-morphism based on P
are illustrated and a morphism in between.
G2 = (ngb2 : E2 → P(N2 ))
G1 = (ngb1 : E1 → P(N1 ))
with ngb2 : a 7→ {n1 , n2 }
with ngb1 : x 7→ {{u}, {v}}
b 7→ {{n1 , n2 }, {n3 }, n3 }
y 7→ {u, w}
c 7→ {{n3 }}
z 7→ {u, w}
Note, that we only have the corecursion of nodes, but the nodes that contain
others do not have a name themselves. Edges are hyperedges given as a subset
of the superpower set, but they may have incident vertices as well as nodes
containing nodes.
Definition 2 (Corecursive F -Graph and the category of corecursive
graphs). The category of corecursive graphs crFGraph is given by a comma
category crFGraph =< IdSets ↓ P >.
cG-morphisms are given by mappings of the nodes and arcs f = (fcN , fcE ) :
G1 → G2 with fcN : cN1 → cN2 and fcE : cE1 → cE2 so that:
– fcN ? ◦ con1 = con2 ◦ fcN
– fcE ? ◦ ngb1 = ngb2 ◦ fcE
2.2
Node Corecursion Based on P
Definition 3 (Superpower set P). Given a finite set M and P(M ) the power
set of M then we define the superpower set P(M )
1. P(M ) ⊂ P(M )
2. If M 0 ⊂ P(M ) then M 0 ∈ P(M ).
P(M ) is the smallest set satisfying 1. and 2.
8
The use of the strict subset ensures that Russell’s antinomy cannot occur.
Note that this superpower set construction P is well-founded sets with the ordering with respect to the number of parentheses (see Appendix A.3).
Lemma 4 (P is a functor). P : Sets → Sets is defined for sets as in Def. 3
and for functions
f : M → N by f ? : P(M ) → P(N ) with
(
{f (x)}
;x ∈ M
f ? ({x}) =
? 0
0
{f (x ) | x ∈ x} ; else
Example 4 (Functor P). Given sets M = {u, v, w, u0 , v 0 } and N = {n1 , n2 , n3 , n4 , n5 , n6 }
with f : M → N and f : u7→n3 ; v7→n3 ; w7→n1
u0 7→n5 ; v 0 7→n5 ;
?
then we have f : P(M ) → P(N ) with for example
f ? ({{u, v}, {v, {w, ∅}}}) = {{n3 }, {n3 , {n1 , ∅}}}
Lemma 5 (P preserves injections). Given an injective function f : M → N
then f ? : P(M ) → P(N ) is injective.
Proof. By induction2 over the depth of the superpower sets, so n is the number
of nested parentheses:
IA (n = 1) i.e. sets Given M1 , M2 ⊆ M with M1 6= M2 .
Let x ∈ M1 ∧ x ∈
/ M2 . Hence f (x) ∈ f (M1 ) ∧ f (x) ∈
/ f (M2 ) as f is injective.
So, P(M1 ) 6= P(M2 ).
IB Let f ? : P(M ) → P(N ) be injective for all sets with at most n nested
parentheses.
IS Given M1 , M2 ∈ P(M ) with M1 6= M2 having both n+1 nested parentheses.
Let x ∈ M1 ∧ x ∈
/ M2 .
Hence f ? (x) ∈ f ? (M1 ).
x∈
/ M2 implies for all m ∈ M2 that x 6= m.
x and m have at most n nested parentheses.
f ? (x) 6= f ? (m) for all m ∈ M2 as f ? is injective for all sets with at most n
nested parentheses.
Thus f ? (x) ∈
/ f ? (M2 )
So, P(M1 ) 6= P(M2 ).
Lemma 6 (P preserves pullbacks along injective morphisms).
Proof. Given a pullback diagram (P B) and the diagram (1) in Sets with g1 :
C ,→ D injective.
Pullbacks and the superpower set functor (see Lemma 5) preserve injections, so
πB : A ,→ B, P(πB ) : P(A) ,→ P(B) and πP(B) : P ,→ P(B) are injective.
2
To be precise this is an Noetherian induction see Appendix A.3
9
A

πC

C
πB
/B
(P B)
f1
g1
/D
PZ
y
πP(B)
h̄
h
πP(C)
(2)

P(A)
πB ?
&
/ P(B)
(1)
f1 ?
(3)
f πC ?

/ P(D)
g1 ?
P(C)
Since (P B) is a pullback diagram we have A = {(b, c) | f1 (b) = g1 (c)}.
(1) commutes, since P is a functor.
Let P be the pullback of (P(D), f1 ? , g1 ? ), so f1 ? ◦ πP(B) = πP(C) ◦ g1 ? .
Hence, P = {(B 0 , C 0 ) | f1 ? (B 0 ) = g1 ? (C 0 )} ⊆ P(B) × P(C).
Moreover, there is the unique h : P(A) → P s.t. h(A0 ) = (πB ? (A0 ), f πC ? (A0 ))
for all A0 ⊆ A so that the diagrams (2) and (3) commute along h:
πP(B) ◦ h = πB ? and πP(C) ◦ h = πC ? .
We define h̄ : P → P(A) with
h̄(X, Y ) = {(x, y) | x ∈ X∩B, y ∈ Y ∩C, f1 (x) = g1 (y)}∪
[
h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X−B)×(Y −C)
and have:
1. h̄ is well-defined since h̄(X, Y ) ∈ P(A).
2. (2) commutes along h̄, i.e. πB ? ◦ h̄ = πP(B) (X, Y ) by induction over the
number of nested parentheses n:
IA (n = 1, i.e. sets): πB ? ◦ h̄(∅, ∅) = πB ? (∅) = ∅ = πP(B) (∅, ∅))
For X ⊆ B and Y ⊆ C
πB ? ◦ h̄(X, Y )
= πB ? ({(x, y) | x ∈ X, y ∈ Y, f1 (x) = g1 (y)})
= {x | x ∈ X ∧ ∃; y ∈ Y : f1 (x) = g1 (y)})
=X
= πP(B) (X, Y )
IB Let be πB ? ◦ h̄(X, Y ) = πP(B) (X, Y ) for sets with at most n nested
parentheses.
IS Given (X̂, Ŷ ) ∈ P with n + 1 nested parentheses.
Let X̂ = B̂ ∪ X with B̂ ⊆ B and X ∩ B = ∅.
Let Ŷ = Ĉ ∪ Y with Ĉ ⊆ C and Y ∩ C = ∅.
10
X and Y have at most n nested parentheses.
πB ? ◦ h̄(X̂, Ŷ )
[
= πB ? ◦ {(x, y) | x ∈ B̂, y ∈ Ĉ f1 (x) = g1 (y)} ∪
h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
= {x | x ∈ B̂ ∧ ∃y ∈ Ĉ : f1 (x) = g1 (y)} ∪
[
πB ? ◦ h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
[
= B̂ ∪
(X 0 ,Y 0 )∈(X×Y
IB
πB ? ◦ h̄(X 0 , Y 0 )
)
[
= B̂ ∪
πP(B) (X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
[
= B̂ ∪
(X 0 ,Y 0 )∈(X×Y
X0
)
= B̂ ∪ X
= X̂
= πP(B) (X̂, Ŷ )
Now we show P ∼
= P(A):
– h ◦ h̄ = idP ,
since πP(B) is injective and πP(B) ◦ h ◦ h̄ = πB ? ◦ h̄ = πP(B) ◦ idP
– h̄ ◦ h = idP(A) ,
since πB ? is injective and πB ? ◦ h̄ ◦ h = πP(B) ◦ h = πB ? = πB ? ◦ idP(A) .
Based on F -graphs (see Jä15b, Sch99), that is a family of graph categories
induced by a comma category construction using a functor F , we can define
the category of corecursive F -graphs.
Example 5 (Corecursive F -Graph). In Fig. 3 the following corecursive F -graphs
are illustrated and a morphism in between.
G3 = (ngb3 : E3 → P(N3 ))
G4 = (ngb4 : E4 → P(N4 ))
with c3 : x 7→ {{{u}}, {{v}}}
with ngb4 : a 7→ {{n1 }, {n4 }}
y 7→ {{u}, {w}}
b 7→ {{n1 , n4 }, {n3 }, {{n3 }}}
z 7→ {{u}, {w}}
c 7→ {{{n3 }}}
Note, that we only have the corecursion of nodes, but the nodes that contain
others do not have a name themselves. Edges are hyperedges given as a subset
of the superpower set, but they only have neighbours that are nodes containing
nodes. They cannot have incident vertices.
Definition 4 (Corecursive F -Graph and the category of corecursive
graphs). The category of corecursive graphs crFGraph is given by a comma
category crFGraph =< IdSets ↓ P >.
11
Fig. 3. cG-morphism based on P
cG-morphisms are given by mappings of the nodes and arcs f = (fcN , fcE ) :
G1 → G2 with fcN : cN1 → cN2 and fcE : cE1 → cE2 so that:
– fcN ? ◦ con1 = con2 ◦ fcN
– fcE ? ◦ ngb1 = ngb2 ◦ fcE
2.3
Node recursion based on P ω
Definition 5 (Superpower set P ω ). Given a set M we define P 0 (M ) = M
and P 1 (M ) = P(M ) the power set of M . Then P i+1 (M ) = P(P i (M ))
P ω (M ) =
[
P i (M )
i∈N0
Note that this superpower set construction P ω is well-founded sets with the
ordering with respect to the number of parentheses (see Appendix A.3).
it differes from the other notions, as in each subset there are only subsets that
the the same depth in terms of nesting. So, for some non-empty set M with
m ∈ M , we have {m, M } ∈
/ P ω (M ) but {m, M } ∈ P(M ) and {m, M } ∈ P(M ).
Lemma 7 (P ω is a functor). P ω : Sets → Sets is defined for sets as in Def. 5
and for functions
f : M → N by f ? : P ω (M ) → P ω (N ) with
(
{f (x)}
;x ∈ M
f ? ({x}) =
? 0
0
{f (x ) | x ∈ x} ; else
Example 6 (Functor P ω ). Given sets M = {u, v, w, u0 , v 0 } and N = {n1 , n2 , n3 , n4 , n5 , n6 }
with f : M → N and f : u7→n3 ; v7→n3 ; w7→n1
u0 7→n5 ; v 0 7→n5 ;
?
ω
then we have f : P (M ) → P ω (N ) with for example
f ? ({{u, v}, {∅, {w, ∅}}}) = {{n3 }, {∅, {n1 , ∅}}}
12
Lemma 8 (P ω preserves injections). Given injective function f : M → N
then f ? : P ω (M ) → P ω (N ) is injective.
Proof. By induction3 over the depth of the superpower sets, so n is the number
of nested parentheses:
IA (n = 0) atomic nodes Given x1 , x2 ∈ P ω (M ) with x1 6= x2 .
Since f injective, f ? (x1 ) = f (x1 ) 6= f (x2 ) = f ? (x2 ).
IB Let f ? : P ω (M ) → P ω (N ) be injective for all sets with at most n nested
parentheses.
IS Given M1 , M2 ∈ P ω (M ) with M1 6= M2 having both n+1 nested parentheses.
Let x ∈ M1 ∧ x ∈
/ M2 .
Hence f ? (x) ∈ f ? (M1 ).
x∈
/ M2 implies for all m ∈ M2 that x 6= m.
x and m have at most n nested parentheses.
f ? (x) 6= f ? (m) for all m ∈ M2 as f ? is injective for all sets with at most n
nested parentheses.
Thus f ? (x) ∈
/ f ? (M2 )
ω
So, P (M1 ) 6= P ω (M2 ).
Lemma 9 (P ω preserves pullbacks along injective morphisms).
Proof. Given a pullback diagram (P B) and the diagram (1) in Sets with g1 :
C ,→ D injective.
Pullbacks and the superpower set functor (see Lemma 8) preserve injections, so
πB : A ,→ B, P ω (πB ) : P ω (A) ,→ P ω (B) and πP ω (B) : P ,→ P ω (B) are injective.

y
/B
πB
P[
A
πC

C
(P B)
f1
g1
/D
πP ω (B)
h̄
h
πP ω (C)
(2)
P ω (A) 
πB ?
&
/ P ω (B)
(1)
f1 ?
(3)
f πC ?

/ P ω (D)
g1 ?
P ω (C) Since (P B) is a pullback diagram we have A = {(b, c) | f1 (b) = g1 (c)}.
(1) commutes, since P ω is a functor.
Let P be the pullback of (P ω (D), f1 ? , g1 ? ), so f1 ? ◦ πP ω (B) = πP ω (C) ◦ g1 ? .
Hence, P = {(B 0 , C 0 ) | f1 ? (B 0 ) = g1 ? (C 0 )} ⊆ P ω (B) × P ω (C).
Moreover, there is the unique h : P ω (A) → P s.t. h(A0 ) = (πB ? (A0 ), f πC ? (A0 ))
for all A0 ⊆ A so that the diagrams (2) and (3) commute along h:
πP ω (B) ◦ h = πB ? and πP ω (C) ◦ h = πC ? .
We define h̄ : P → P ω (A) with
3
To be precise this is an Noetherian induction see Appendix A.3
13


(b, c) ; if X = b ∈ B, Y = c ∈ C
h̄((X, Y )) = {(x, y) | x ∈ X ∩ B, y ∈ Y ∩ C, f1 (x) = g1 (y)}

S

∪ (X 0 ,Y 0 )∈(X−B)×(Y −C) h̄(X 0 , Y 0 ) ; else
and have:
1. h̄ is well-defined since h̄(X, Y ) ∈ P ω (A).
2. (2) commutes along h̄, i.e. πB ? ◦ h̄ = πP ω (B) (X, Y ) by induction over the
number of nested parentheses n:
IA (n = 0, i.e. atomic nodes): Given (b, c) ∈ P with b ∈ B and c ∈ C.
πB ? ◦ h̄(b, c) = πB ? (b, c) = b = πP ω (B) (b, c)
IB Let be πB ? ◦ h̄(X, Y ) = πP ω (B) (X, Y ) for sets with at most n nested
parentheses.
IS Given (X̂, Ŷ ) ∈ P with n + 1 nested parentheses.
Let X̂ = B̂ ∪ X with B̂ ⊆ B and X ∩ B = ∅.
Let Ŷ = Ĉ ∪ Y with Ĉ ⊆ C and Y ∩ C = ∅.
X and Y have at most n nested parentheses.
πB ? ◦ h̄(X̂, Ŷ )
[
= πB ? ◦ {(x, y) | x ∈ B̂, y ∈ Ĉ f1 (x) = g1 (y)} ∪
h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
= {x | x ∈ B̂ ∧ ∃y ∈ Ĉ : f1 (x) = g1 (y)} ∪
[
πB ? ◦ h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
[
= B̂ ∪
πB ? ◦ h̄(X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
IB
[
= B̂ ∪
πP ω (B) (X 0 , Y 0 )
(X 0 ,Y 0 )∈(X×Y )
[
= B̂ ∪
X0
(X 0 ,Y 0 )∈(X×Y )
= B̂ ∪ X
= X̂
= πP ω (B) (X̂, Ŷ )
Now we show P ∼
= P ω (A):
– h ◦ h̄ = idP ,
since πP ω (B) is injective and πP ω (B) ◦ h ◦ h̄ = πB ? ◦ h̄ = πP ω (B) ◦ idP
– h̄ ◦ h = idP ω (A) ,
since πB ? is injective and πB ? ◦ h̄ ◦ h = πP ω (B) ◦ h = πB ? = πB ? ◦ idP ω (A) .
Based on F -graphs (see Jä15b, Sch99), that is a family of graph categories
induced by a comma category construction using a functor F , we can define
the category of corecursive F -graphs.
14
Fig. 4. cG-morphism based on P ω
Example 7 (Corecursive F -Graph based on P ω ). In Fig. 4 the following corecursive F -graphs are illustrated and a morphism in between.
G5 = (ngb5 : E5 → P ω (N5 ))
G6 = (ngb6 : E6 → P ω (N6 ))
with ngb5 : x 7→ {{{u}}, {{v}}}
with ngb6 : a 7→ {{n1 }, {n2 }}
y 7→ {{u}, {w}}
b 7→ {{n1 , n2 }, {n3 }, n3 }
z 7→ {{u}, {w}}
c 7→ {{n3 }}
Note, that we only have the corecursion of nodes, but the nodes that contain
others do not have a name themselves. Edges are hyperedges given as a subset
of the superpower set, but they cannot have incident vertices.
Definition 6 (Corecursive F -Graph and the category of corecursive
graphs). The category of corecursive graphs crFGraph is given by a comma
category crFGraph =< IdSets ↓ P ω >.
cG-morphisms are given by mappings of the nodes and arcs f = (fcN , fcE ) :
G1 → G2 with fcN : cN1 → cN2 and fcE : cE1 → cE2 so that:
– fcN ? ◦ con1 = con2 ◦ fcN
– fcE ? ◦ ngb1 = ngb2 ◦ fcE
2.4
Differences between P, P and P ω
We have for any set S that P(M ) ⊆ P(M ) and P ω (M ) ⊆ P(M ). The graphs in
examples ex. 5, ex. 3 and ex. 7 and the superpower set functors are listed in the
table below stating which graph can be constructed using which functor.
P
P
Pω
1. because {{n1 }, {{n2 }}} ∈
/ P ω ({n1 , n2 , n3 })
G1
yes yes yes
2. because u, w ∈
/ P({u, v, w})
G2
yes yes no see 1
3. because {n1 , {n2 }} ∈
/ P({n1 , n2 , n3 })
G3 no see 2 yes yes
4. because {n1 , {n2 }} ∈
/ P ω ({n1 , n2 , n3 })
G4 no see 3 yes no see 4
5. because n1 ∈
/ P({n1 , n2 , n3 })
G5 no see 2 yes yes
G6 no see 5 yes yes
15
M-adhesive Categories of F -Coalgebras
3
A endofunctor F : Sets → Sets gives rise the category of coalgebras SetsF with
αM
F (M ) – also denoted by (M, αM ) – being the objects and morphisms
M ←−
f : (M, αM ) → (N, αN ) – called F -homomorphism – so that (1) commutes in
Sets (see Rut00 ):
αM
/ F (M )
f
(1)
F (f )
N
αN
M
/ F (N )
Lemma 10 (Pullbacks along injections in SetsF ). Given a functor F :
Sets → Sets that preserves pullbacks along an injective morphism, then SetsF
has pullbacks along an injective F-homomorphism.
f
g
Proof. Given (B, αB ) ,→ (D, αD ) ← (C, αC ). Then we have (PB1) in Sets
below. This results in (P B2) since F preserves pullbacks along an injective morphism. αA is the unique induced morphism for F (g)◦(αC ◦πC ) = F (f )◦(αB ◦πB ).
So, (1) commutes.
(A, αA ) is pullback in SetsF because we have the diagrams below
in Sets :
in SetsF :
αX
/ F (X)
(X, αX )
X
F (g 0 )
h
g
A h
0
f0
πB
B h
}
/ F (B)
k
αB
πC
h
F (h)
/ F (A)
k
αA
(P B1)
F (f 0 )
F (πB )
F (πC )
f
z
(B, αB
l)
f0
πB
πC
(1)
(P B2)
C
(A, αA
l)
g0
/ F (C)
αC
(C, αC )
f
F (f )
g
F (g)
g
z
}
αD
/ F (D)
(D, αD )
D
The comparison object (X, αX ) with f ◦ g 0 = g ◦ f 0 in SetsF leads in Sets to the
induced morphisms h : X → A and F (h) : F (X) → F (A) commuting the corresponding triangles. As F (A) is pullback in Sets, we have F (h) ◦ αX = αA ◦ h.
Hence, h is the induced morphism in SetsF as well.
Corollary 1 (Pullbacks along injections in SetsF ). Given a functor F :
Sets → Sets that preserves pullbacks along an injective morphism, then SetsF
has pullbacks along an injective F-homomorphism.
16
Concerning the Vertical Weak VK Square
Definition 7 (Class of monomorphisms M). Let M be a class of monomorphisms in Sets that is PO-PB-compatible, that is:
1. Pushouts along M -morphisms exist and M is stable under pushouts.
2. Pullbacks along M -morphisms exist and M is stable under pullbacks.
3. M contains all identities and is closed under composition.
According to Prop. 4.7 in Rut00 if f : M → N is injective in Sets then f
is an F -monomorphism in SetsF . Obviously the class of all injective functions
f
MF = {(A, αA ) ,→ (B, αB ) | f is injective in Sets } is PO-PB-compatible.
Theorem 1 ((SetsF , MF ) is an M-Adhesive Category). If F preserves
pullbacks along injective morphisms, then (SetsF , MF ) is an M-adhesive category.
Proof. (SetsF , MF ) is an M-adhesive category:
1. Pushouts in SetsF along m ∈ MF exist, since SetsF is finitely cocomplete
(Thm 4.2 Rut00) for arbitrary F : Sets → Sets.
2. and they are vertical weak VK squares, i.e. for all commutative cubes (2)
where all vertical morphisms a, b, c, d are in M with the given pushout (1)
in the bottom and the back squares being pullbacks.
Then following holds :
The top square is a pushout if and only if the front squares are pullbacks.
0
(A0 , αA
)
(2)
0
f
m0 )
r
a
(A, αA ) m∈M / (B, αB )
0
0
)
)
(C 0 , αC
(B 0 , αB
0
g
0
n
)
g
r
f
(1)
0
)
(D0 , αD
c
b
/ (D, αD )
n
(C, αC )
d
(A, αA )
m )
r f
(C, αC )
(B, αB )
g
n )
r
(D, αD )
Since (finite) colimits and pullbacks along M-morphisms are constructed on
the underlying set, square (1) and the VK-cube are given for the underlying
sets in Sets as well.
0
0
0
0
⇒ If in SetsF (B 0 , αB
) → (D0 , αD
) ← (C 0 , αC
) is pushout over (B 0 , αB
)←
0
0
0
0
0
0
0
0
0
(A , αA ) → (C , αC ) then B → D ← C is pushout over B ← A → C 0
in Sets as pushout are constructed on the underlying sets. As Sets together with the class of injective morphisms is an adhesive category (see
Thm 4.6 in EEPT06), we have the front squares are pullbacks in Sets.
As the vertical morphisms are injective the front squares are pullbacks
in SetsF provided that F preserves pullbacks along injections.
17
⇐ Let the front squares be pullbacks in SetsF , then the squares of the
underlying sets are pullbacks in Sets. So the top square in pushout in
Sets and hence in SetsF .
The following corollary allows M transformation systems for various dynamic
systems based on F -coalgebras of functors the preserve pullbacks along injective
morphisms.
Corollary 2 (M transformation systems for F -coalgebras). We obtain
– M-transformation systems for finitely branching non-deterministic transition systems SetsPfin , where (Q, αQ : Q → Pf in (Q) as finite power set
functor Pf in preserves pullbacks along injective morphisms.
– M-transformation systems for infinite binary trees SetsA× × over an alphabet A with since the product functor preserves limits.
– M-transformation systems for labelled transition systems over a signature
Σ with SetsP(Σ× ) , since the composition preserves pullback-preservation.
Example 8 (Transformation of a finitely branching non-deterministic transition
system). Given the transition system (K, αK ) with K = N and αK (n) = {2n +
1, 2n + 2} that is a full infinite binary tree. The rule is L ← K → R and te
morphisms are all set inclusions. The application of the rule to Q leads to the
transformation step given in as illustrated in Fig. 5.
Fig. 5. Transformation step in CoalgPf in
Although Kah14 has already approached the coalgebraic representation of
DPO-transformations this approach is far more general as its considers arbitrary
coalgebras based on functors preserving pullbacks.
18
3.1
Endofunctors and Pullbacks
A functor F : C → D is called (weak) pullback preserving if it maps (weak) pullback squares to (weak) pullback squares: that is, if F applied a (weak) pullback
square in the category C forms a (weak) pullback square in D. (Def. 4.2.1(ii)
Jac16). This obviously implies that F preserves pullbacks weakly, i.e. it maps
pullback squares to (weak) pullback squares (Rut00, Ada05). Many coalegebraic
results require that F preserves pullbacks weakly This comprises the powerset functors, and arbitrary product, coproduct, power or composite of functors
weakly preserving pullbacks (Ada05). Jac16 states that a weak pullback preserving functor preserves (ordinary) pullbacks of monos (exercise 4.2.5 in Jac16). So,
we have
– F is (weak) pullback preserving =⇒ F preserves pullbacks weakly.
– F is (weak) pullback preserving =⇒ F preserves pullback along monomorphims.
Seemingly, all three notions hold for the power-set functors, and arbitrary product, coproduct, power or composite of functors. But it remains an open question
if these notions are equivalent at least in Sets or in arbitrary categories.
4
Edge Corecursion
In this section we investigate the corecursion of edges, that is neighbours of
edges can again be edges, as in Fig. 1(a). In Rut00 it is shown that graphs with
undirected edges can be considered as many sorted coalgebras using the functor
(!,<s,t>)
F : Sets × Sets → Sets × Sets with F (V, E) = (V, E) → (1, V × V ) where
1 is the final object and ! the corresponding final morphism. In Jä15b the notion
of F -graphs based on comma-categories is investigated and in Jä15a extended
to coalgebras. The functors investigated in Jä15a are the product, the coproduct
and several powerset functors.
This can be extended to various types of corecursive edges.
Definition 8 (Corecursive hyperedges). Given a set of vertices V and a set
of edge names cE and a function yielding the neighbours ngb : cE → P(V ] cE).
Then the category of coalgebras CoalgF1 over F1 : Sets × Sets → Sets × Sets
with F1 (V, cE) = (1, P(V ] cE) yields the category of graphs with corecursive
hyperedges.
The class M is given by the class of pairs of injective morphisms < fV , fcE >.
Lemma 11 ((CoalgF1 , M) is an M-adhesive category).
Proof. F preserves pullbacks along monomorphisms, as the first component is a
pullback of the final object in Sets and the powerset functor preserves pullback
of monos (see Lemma 12) and the coproduct functor as well (see Lemma 13).
19
Corollary 3 (Corecursive undirected edges). Given a set of vertices V
and a set of edge names cE and a function yielding the neighbours ngb : cE →
P (1,2) (V ]cE). Then the category of coalgebras CoalgF2 over F2 : Sets×Sets →
Sets × Sets with F2 (V, cE) = (1, P (1,2) (V ] cE) yields the category of graphs
with corecursive undirected edges.
The class M is given by the class of pairs of injective morphisms < fV , fcE >
and (CoalgF2 , M) is an M-adhesive category.
Corollary 4 (Corecursive directed edges). Given a set of vertices V and
a set of edge names cE and a function yielding the neighbours ngb : cE →
(V ] cE) × (V ] cE). Then the category of coalgebras CoalgF3 over F3 : Sets ×
Sets → Sets × Sets with F3 (V, cE) = (1, (V ] cE) × (V ] cE) yields the category
of graphs with corecursive directed edges.
The class M is given by the class of pairs of injective morphisms < fV , fcE >
and (CoalgF3 , M) is an M-adhesive category.
And again, these edge concepts can be mixed as well see Jä15b.
5
Corecursive Graphs
To obtain corecursive graph as given in Sect. 1 we construct graphs as cG =
(cN, cE, con : cN → P(V ), ngb : cE → P(P(cN ) ] cE)). These graphs can be
considered to be an coalgebra over F : Sets × Sets → Sets × Sets with for
example F(cN, cE) = (P(cN ), P(P(cN ) ] cE)).
Definition 9 (Corecursive graph). Let the corecursive graph functor F :
Sets × Sets → Sets × Sets be given with F(V, E) = (F(V ), P(F(V ) ] E)) where
F preserves pullbacks along monomorphisms provided F preserves injections and
pullbacks along injective morphisms and P is a powerset functor.
According to Lemma 14 in Appendix A.2 the functor F preserves pullbacks along
monomorphisms., so the have:
Corollary 5 (Corecursive graphs yield an M-adhesive category.). The
class M is given by the class of pairs of injective morphisms < fV , fcE > and
(CoalgF , M) is an M-adhesive category.
Definition 10 (Properties of corecursive nodes).
1.
2.
3.
4.
Nodes are unique if c is injective.
Vertices are the atomic nodes that refer to themselves: V = {n | c(n) = n}
Nodes are containers if c(n) ∈ P(cN ) − cN
The set of nodes is well-founded if and only if
– X ∈ cN ∧ Y ∈ con(X) implies, that Y ∈ con(cN )
– X ∈ con(cN ) ∧ Y ∈ (X − cN ) implies, that Y ∈ con(cN )
5. The set of nodes is hierarchical if and only if con(n) ∩ con(n0 ) 6= ∅ implies
n = n0 .
20
Definition 11 (Properties of corecursive edges).
1. The set of atomic hyperedges E := {e ∈ cE | ngb(e) ∈ P(cN )}.
+
+
2. Edges are node-based if the
S function ngb+ : cE → P(cN ) defined by ngb (e) =
{n ∈ cN | n ∈ ngb(e)} ∪ x∈ngb(e) ngb (x) is well-defined.
3. Edges are atomic if they are node-based and if the function ngb + (E) ⊆ V
only yields vertices.
Analogously the properties for (un-)directed edges.
Depending on the choice of the underlying functors and af the specific restriction we obtain different types of graph.
definition
functors categorical construction trafos remarks
ngb : E → P(N )
P
comma category
X
see Fig. 3 and row 1 in table 2
ngb : E → P(N )
P
comma category
X
see Fig. 2 and row 2 in table 2
Pω
comma category
X
see Fig. 4
X
and row 3 in table 2
X
and row 4 in table 2
X
and row 5 in table 2
X
and row 6 in table 2
X
hierarchical graphs
F determines edge type,
see Sect. 6.4
X
see Fig. 1(b)
X
hierarchical graphs,
see Sect. 6.4
X
see Fig. 1(a) and
row 7 in table 2
X
bigraphs see Sect. 6.3
ngb : E → P ω (N )
comma category,
coalgebra,
product category
comma category,
con : cN → P(cN )
(1,2)
coalgebra,
P,
P
ngb : E → P(cN )(1,2)
product category
comma category,
con : cN → P(cN )
coalgebra,
P
s, t : E → cN
product category
comma category,
con : cN → P(cN )
P, ( )∗ coalgebra,
∗
s, t : E → (cN )
product category
comma category,
con : cN → P(cN )
∗
P, ( ) , F coalgebra,
ngb : E → F (N )
product category
` coalgebra,
con = !
P,
ngb : E → P(cN ] cE)
coproduct category
comma category,
con = !
`
coalgebra,
ngb : E → cN ∗ × P, P,
product category
P ω (cN )
comma category,
`
con : cN → P(cN )
coalgebra,
P, P,
ngb : E → P(cN ] E)
coproduct category
comma category,
`
c : cN → P(cN )
coalgebra,
P, P,
s, t : cE → P(cN ] cE)
product category
con : cN → P(cN )
ngb : E → P(cN )
P, P
Table 1. Involved functors
21
Below we give a short characterisation of edges and nodes.
no definition
1 ngb : E → P(N )
2 ngb : E → P(N )
con : cN → P(cN )
ngb : E → P(cN )
con : cN → P(cN )
4
ngb : E → P(cN )(1,2)
con : cN → P(cN )
5
s, t : E → cN
con : cN → P(cN )
6
s, t : E → (cN )∗
3
7
con : cN → P(cN )
ngb : E → P(cN ] E)
nodes
containers do not have a name
every node is a container
containers do not have a name
atomic nodes may exist
containers have a name
atomic nodes may exist
containers have a name
atomic nodes may exist
containers have a name
atomic nodes may exist
containers have a name
atomic nodes may exist
containers have a name
atomic nodes may exist
edges
hyperedges without order
hyperedges without order
hyperedges without order
undirected edges
directed edges
directed hyperedges with an
order (as in EEPT06)
corecursive edges
Table 2. Nodes and edges
6
6.1
Related Work
Recursive Sets
A set M of integers is said to be recursive (see e.g. Rog87) if there is a total
recursive function f (x) such that f (x) = 1 for x ∈ M and f(x) = 0 for x ∈
/ M.
Any recursive set is also recursively enumerable.
Finite sets, sets with finite complements, the odd numbers, and the prime numbers are all examples of recursive sets. The union and intersection of two recursive
sets are themselves recursive, as is the complement of a recursive set.
6.2
Recursive Graphs
Bea76 is concerned with recursive function theory that are analogous to certain
problems in chromatic graph theory and introduces the following definition of
recursive graphs according to Rem86. A recursive graph G = (V, E) is recursive,
if V , the set of vertices is a recursive subset of the natural numbers N and E, the
set of edges is a recursive subset of N(2) , the set of unordered pairs from N. These
recursive graphs have an infinite amount of nodes that need to be computed by
a recursive function. In contrast the recursive graph we introduce here have a
finite number of nodes, but a recursive structure.
22
6.3
Bigraphs as a Corecursive Graphs
Bigraphs Mil06 originate in process calculi for concurrent systems and provide
a graphical model of computation. Nodes in bigraphs are possibly nested places
representing computational objects and hyperedges representing connections in
between. A bigraph is composed of two graphs: a place graph and a link graph.
So, they emphasize interplay between physical locality and virtual connectivity.
Bigraphs may be composed and have a bisimulation that is a congruence wrt.
composition. Categorically, bigraphs are given as morphisms in a symmetric
partial monoidal category where the objects are interfaces. The composition of
bigraphs is defined by the composition of morphisms. Reaction rules allow the
reconfiguration of bigraphs. A bigraphical reactive system consists of a set of
bigraphs and a set of reaction rules, which can be used to reconfigure the set of
bigraphs.
Nevertheless, often only their graphical representation is used DD05, WW12,
Wor13, BCRS16. Here we present a version that abstracts from the categorical
foundations and give bigraphs as a special cases of corecursive graphs. Hence we
have a rules and a transformation system as well.
According to wikipedia wik16 bigraph is a 5-tuple:
(V, E, ctrl, prnt, link) : hk, Xi → hm, Y i, where V is a set of nodes, E is a set of
edges, ctrl is the control map that assigns controls to nodes,prnt is the parent
map that defines the nesting of nodes, and link is the link map that defines
the link structure. The notation hk, Xi → hm, Y i indicates that the bigraph has
k holes (sites) and a set of inner names X and m regions, with a set of outer
names Y . These are respectively known as the inner and outer interfaces of the
bigraph.
Below we investigate the relation of bigraphs to corecursive graphs within a
small example: In Fig. 6(a) we have an introductory example from Mil06 that
we represent as a corecursive graph in Fig. 6(b). The corecursive graph has
(a) From Mil06
(b) Bigraph as corecursive graph
well-founded and hierarchical nodes, where the contains function represents the
parent function, so con = prnt. The function cntrl yields basically the in- and
out degree of each node. The link function yields hyperedges, which we represent
23
as directed hyperedges. Hyperedges connecting outer names are represented as
directed hyperedges with the arc itself as the target. Hyperedges connecting
inner names are represented as directed hyperedges with the arc itself as the
source. The regions correspond to the roots 0, 1 of the forests given by con and
the site are the distinguished atomic nodes 0, 1, 2.
The nodes cN = {0, 1, v0 , v1 , v2 , v3 , 0, 1, 2} and the contains function con :
cN → P(cN ), yield the place graph. The directed nested hyperedges cE =
{e1 , e2 , e3 , e4 , e5 } with s, t : cE → P(cN ] cE), yield the link graph. We have:
con : 07→{v0 , v2 }
17→{v3 , 1}
s : e1 7→{v1 , v2 , v3 } t : e1 7→{v1 , v2 , v3 }
v0 7→{v1 }
y0 7→{v2 }
y0 7→{v2 }
v1 7→{0}
y1 7→{v2 , v3 }
y1 7→{v2 , v3 }
and
v2 7→v2
x0 7→{x0 }
x0 7→{x0 }
v3 7→{2}
x1 7→{x1 }
x1 7→{x1 }
i7→i;for 0 ≤ i ≤ 2
6.4
Hierarchical Graphs
Many possibilities to define hierarchical graphs have already been investigated,
e.g. EHR94, BH01, BCM10, Bus02, BKK05. Here we sketch how two of them
could be considered as corecursive graphs, namely DHP02 and BKK05.
Hierarchical Hypergraphs as inDHP02 Hypergraphs H = (V, E, att, lab) in
DHP02 consist of two finite sets V and E of nodes (or vertices) and hyperedges.
These are equipped with an order, so the attachment function is defined by
att : E → V ∗ . The hierarchy is given in layers, so that edges are within one layer.
Hierarchical graphs < G, F, cts : F → H >∈ H are given with special edges F
that contain possibly hierarchical subgraphs. Fig. 6 depicts a hierarchical graph
Fig. 6. Example of hierachical graphs DHP02
that can be considered to be a corecursive graph with con = ! and ngb : E →
24
cN ∗ × P ω (cN ) so that edges are node-based. we have:
ngb : a7→< xyz, ∅ >
b7→< nm, ∅ >
c7→< v2v4, ∅ >
e1 7→< v1v2v3, {x, y, z} >
e2 7→< v4, {n, m} >
Hierarchical Hypergraphs as in BKK05 In this approach graphs are grouped
into packages via a coupling graph. A hierarchical graph is a system H =
(G, D, B), where G is a graph some graph type, P is a rooted directed acyclic
graph, and B is a bipartite coupling graph whose partition contains the nodes
of NG and of NP . All edges are oriented from the first NG to the second set
of nodes NP and every node in NG is connected to at least one node in NP .
For this approach we can consider corecursive graphs with con : cN → P(cN )
Fig. 7. Example of hierachical graphs BKK05
that are well-founded. The packages are the nodes that are not atomic. The
edge function is given by ngb : E → F (N ) where F determines the type
of the underlying graphs. Additionally a completeness condition has to hold:
∀n ∈ cN : con(n) = n ⇒ ∃p ∈ cN : n ∈ con(p)
We have:
cN = {n, m, x, y, z, p1, p2, p3}

v
; if v ∈ {n, m, x, y, z}



{x, y, z} ; if v = p1
con(v) =

{n, m}
; if v = p2



{p1, p2} ; if v = p3
7
Conclusion
We have presented an approach to graphs that allows arbitrarily nested nodes
and edges being attached to nodes, sets of nodes and edges. This gives rise to
an abstract notion of graphs based on different functors.
25
References
[Ada05]Adamek, Jiri: Introduction to coalgebra. In: Theory and Applications
of Categories 14 (2005), 157–199. http://www.tac.mta.ca/tac/volumes/14/8/
14-08abs.html
[BCM10]Bruni, Roberto ; Corradini, Andrea ; Montanari, Ugo: Modeling a Service
and Session Calculus with Hierarchical Graph Transformation. In: ECEASST 30
(2010). http://journal.ub.tu-berlin.de/index.php/eceasst/article/view/
427
[BCRS16]Benford, Steve ; Calder, Muffy ; Rodden, Tom ; Sevegnani, Michele: On
Lions, Impala, and Bigraphs: Modelling Interactions in Physical/Virtual Spaces. In:
ACM Trans. Comput.-Hum. Interact. 23 (2016), Nr. 2, 9:1–9:56. http://dx.doi.
org/10.1145/2882784. – DOI 10.1145/2882784. – ISSN 1073–0516
[Bea76]Bean, Dwight R.: Effective coloration. In: Journal of Symbolic Logic 41
(1976), Nr. 2, S. 469–480. http://dx.doi.org/10.1017/S0022481200051549. –
DOI 10.1017/S0022481200051549
[BH01]Busatto, Giorgio ; Hoffmann, Berthold: Comparing Notions of Hierarchical Graph Transformation. In: Electr. Notes Theor. Comput. Sci. 50 (2001),
Nr. 3, 310–317. http://dx.doi.org/10.1016/S1571-0661(04)00184-7. – DOI
10.1016/S1571–0661(04)00184–7
[BKK05]Busatto, Giorgio ; Kreowski, Hans-Jörg ; Kuske, Sabine: Abstract hierarchical graph transformation. In: Mathematical Structures in Computer Science 15
(2005), Nr. 4, 773–819. http://dx.doi.org/10.1017/S0960129505004846. – DOI
10.1017/S0960129505004846
[Bus02]Busatto, Giorgio: An abstract model of hierarchical graphs and hierarchical
graph transformation, University of Paderborn, Germany, Diss., 2002. http://
ubdata.uni-paderborn.de/ediss/17/2002/busatto/disserta.pdf
[DD05]Debois, Søren ; Damgaard, Troels C.: Bigraphs by Example. 2005
[DHP02]Drewes, Frank ; Hoffmann, Berthold ; Plump, Detlef: Hierarchical Graph
Transformation. In: J. Comput. Syst. Sci. 64 (2002), Nr. 2, 249–283. http://dx.
doi.org/10.1006/jcss.2001.1790. – DOI 10.1006/jcss.2001.1790. – ISSN 0022–
0000
[EEPT06]Ehrig, H. ; Ehrig, K. ; Prange, U. ; Taentzer, G.: Fundamentals of
Algebraic Graph Transformation. Springer, 2006 (EATCS Monographs in TCS)
[EHR94]Ehrenfeucht, Andrzej ; Harju, Tero ; Rozenberg, Grzegorz: Group Based
Graph Transformations and Hierarchical Representations of Graphs. In: Cuny,
Janice E. (Hrsg.) ; Ehrig, Hartmut (Hrsg.) ; Engels, Gregor (Hrsg.) ; Rozenberg,
Grzegorz (Hrsg.): Graph Gramars and Their Application to Computer Science, 5th
International Workshop, Williamsburg, VA, USA, November 13-18, 1994, Selected
Papers Bd. 1073, Springer, 1994 (Lecture Notes in Computer Science), 502–520
[Jä15a]Jäkel, C.: A coalgebraic model of graphs. 2015
[Jä15b]Jäkel, C.: A unified categorical approach to graphs. 2015
[Jac16]Jacobs, Bart: Introduction to Coalgebra: Towards Mathematics of States and
Observation. Bd. 59. Cambridge University Press, 2016
[Kah14]Kahl, Wolfram: Graph Transformation with Symbolic Attributes via Monadic
Coalgebra Homomorphisms. In: ECEASST 71 (2014). http://journal.ub.
tu-berlin.de/eceasst/article/view/999
[Mil06]Milner, Robin: Pure bigraphs: Structure and dynamics. In: Inf. Comput. 204
(2006), Nr. 1, 60–122. http://dx.doi.org/10.1016/j.ic.2005.07.003. – DOI
10.1016/j.ic.2005.07.003
26
Q0
[Rem86]Remmel, J.B.:
Graph colorings and recursively bounded
1 -classes.
In: Annals of Pure and Applied Logic 32 (1986), S. 185 – 194.
http:
//dx.doi.org/http://dx.doi.org/10.1016/0168-0072(86)90051-5. –
DOI
http://dx.doi.org/10.1016/0168–0072(86)90051–5. – ISSN 0168–0072
[Rog87]Rogers, H.: Theory of Recursive Functions and Effective Computability. MIT
Press, 1987
[Rut00]Rutten, J.J.M.M.: Universal coalgebra: a theory of systems. In: Theoretical
Computer Science 249 (2000), Nr. 1, 3 - 80. http://dx.doi.org/http://dx.doi.
org/10.1016/S0304-3975(00)00056-6. – DOI http://dx.doi.org/10.1016/S0304–
3975(00)00056–6. – ISSN 0304–3975
[Sch99]Schneider, H. J.: Describing systems of processes by means of high-level replacement. In: Handbook of Graph Grammars and Computing by Graph Transformation, Volume 3. World Scientific, 1999, S. 401–450
[wik16]wikipedia: Bigraph. https://en.wikipedia.org/wiki/Bigraph. Version: 2016
[Wor13]Worboys, Michael F.: Using bigraphs to model topological graphs embedded
in orientable surfaces. In: Theor. Comput. Sci. 484 (2013), 56–69. http://dx.doi.
org/10.1016/j.tcs.2013.02.018. – DOI 10.1016/j.tcs.2013.02.018
[WW12]Walton, Lisa ; Worboys, Michael F.: A Qualitative Bigraph Model for
Indoor Space. In: Xiao, Ningchuan (Hrsg.) ; Kwan, Mei-Po (Hrsg.) ; Goodchild,
Michael F. (Hrsg.) ; Shekhar, Shashi (Hrsg.): Geographic Information Science 7th International Conference, GIScience 2012, Columbus, OH, USA, September
18-21, 2012. Proceedings Bd. 7478, Springer, 2012 (Lecture Notes in Computer
Science). – ISBN 978–3–642–33023–0, S. 226–240
A
Appendix
A.1
Power Set Functor
Definition 12 (P, P (i,j) Pf in ). P, P (i,j , Pf in : Sets → Sets with
– P(M ) = {M 0 ⊆ M },
– P (i,j) (M ) = {M 0 ⊆ M | i ≤ |M | ≤ j} and
– Pf in (M ) = {M 0 ⊆ M | |M | ∈ N}
so that f : M → N with P(f )(M 0 ) = f (M 0 ), the same for P (i,j) (f ) and
Pf in (f )
Contrary to Lemma A.39 in EEPT06 the covariant powerset functor P does
not preserve pullbacks.
Given a pullback diagram (P B) in Sets with D = {d}, B = {1, 2} and
C = {c, c0 }.
Then A = {(1, c), (2, c), (1, c0 ), (2, c0 )} is PB with the corresponding projections.
(P, πP(B) , πP(C) ) is the pullback in Sets over (P(D), P(f1 ), P(g1 )).
P = {(B, C) | f1 (B) = g1 (C)} = {(∅, ∅)}∪{{1, }, {2}, {1, 2}}×{{c}, {c0 }, {c, c0 }}.
Unfortunately |P | = 10 6= 16 = |P(A)|.
Lemma 12 (P : Sets → Sets preserves pullbacks along injective functions).
27
Proof. Given a pullback (PB) in Sets and diagram (1) as above with g1 : C ,→ A
injective.
Pullbacks and the powerset functor preserve injections, so
πB : A ,→ B, P(πB ) : P(A) ,→ P(B) and πP(b) : P ,→ P(B) are injective.

y
/B
πB
PZ
A
πC

C
(P B)
f1
g1
/D
h̄
πP(B)
πP(C)

P(A) h
(2)
P(πB )
&
/ P(B)
(1)
P(f1 )
(3)
P(πC )

P(C) P(g1 ) / P(D)
Since (P B) is a pullback diagram we have A = {(b, c) | f1 (b) = g1 (c)}.
(1) commutes, since P is a functor.
h : P(A) → P is given by h(A0 ) = (P(πB )(A0 ), P(πC )(A0 )) the induced PB
morphism so that, P(πB ) ◦ h = πP(B) and P(πC ) ◦ h = πP(C) .
We define h̄ : P → P(A) with
h̄(X, Y ) = {(x, y) | x ∈ X, y ∈ Y, f1 (x) = g1 (y)} = (X × Y ) ∩ A
and have:
1. h̄ is well-defined since h̄(X, Y ) ∈ P(A).
2. (2) commutes along h̄, i.e. P(πB ) ◦ h̄ = πP(B) (X, Y )
For (X, Y ) ∈ P we have
P(πB ) ◦ h̄(X, Y )
= P(πB ){(x, y) | x ∈ X, y ∈ Y, f1 (x) = g1 (y)}
= {x | x ∈ X ∧ ∃; y ∈ Y : f1 (x) = g1 (y)})
=X
= πP(B) (X, Y )
We show P ∼
= P(A):
– h ◦ h̄(X, Y ) = idP :
For each (X, Y ) ∈ P we have
h ◦ h̄(X, Y ) = h({(x, y) | x ∈, y ∈ Y, f1 (x) = g1 (y)})
= h({(x, y) | x ∈ X, y ∈ Y f1 (x) = g1 (y)})
= ({x | x ∈ X ∧ ∃; y ∈ Y : f1 (x) = g1 (y)}), {y | y ∈ Y ∧ ∃x ∈ X, : f1 (x) = g1 (y)})
= (X, Y )
– h̄ ◦ h = idP(A) :
Since P(πB ) is injective P(πB ) ◦ h̄ ◦ h = πP(B) ◦ h = P(πB ) = P(πB ) ◦ idP(A)
we have h̄ ◦ h = idP(A)
28
Corollary 6 (P (i,j) , Pf in : Sets → Sets preserve pullbacks along injective
functions).
A.2
Miscellaneous
The coproduct in Sets is the disjoint union and can be considered a functor
from the functor category [I, Sets] to Sets where I a small, discrete category.
`
Lemma 13 ( : I → Sets preserves pullbacks).
Proof. Given pullbacks (PB) in Sets for the index category I and diagram (1).
Ai
πBi
/ Bi
πCi
(P B)
fi
gi
/ Di
Ci
X
ĝi
h
`!
(2)
(Ai )
`
(πBi )
%
/ `(Bi )
(1)
`
(fi )
fˆi
(3)
`
(πCi )
# `
(Ci )
`
(gi )
/ `(Di )
`
(1) commutes since
is a functor.
`
For each X with gi ◦ fˆi = fi ◦ ĝi there is the unique h : X → (Ai ) with
h(x) = (ci , bi ) with ĝi (x) = bi and fˆi (x) = ci , so that (2) and (3) commute.
Lemma 14 (F preserves pullbacks along monos). Let the corecursive graph
functor F : Sets × Sets → Sets × Sets be given with F(V, E) = (F(V ), P(F(V ) ]
E)). F preserves pullbacks along monomorphisms provided F and P preserve
injections and pullbacks along injective morphisms.
Proof. Given pullback (P B1) and (P B2) in Sets with the momomorphisms fV
and fE and diagram (1).
AV _
πBV
/ BV
_
AE _
πBE
/ BE
_
πCV
(P B)
fV
πCE
(P B)
fE
gE
/ DE
CV gV / DV
CE
leading to the following pullbacks, due to the assumptiona on F
F(A V )
_
F(πBV )
/ F(BV )
_
F(πCV )
(P B3)
F(fV )
F(gV )
/ F(DV )
F(CV )
29
and due to Lemma 13 and Lemma 12 (resp. Cor. 6).
P(F(AV ) ] AE ))
_
P(F(πBV )]πBE ))
/ P(F(BV ) ] BE ))
_
P(F(πCV )]πCE ))
(P B4)
P(F(fV )]fE ))
P(F(gV )]gE ))
/ P(F(DV ) ] DE ))
P(F(CV ) ] CE ))
Then we have:
X
ĝ
h
fˆ
(3)
(
F(AV , AE )
_
*
/ F(BV , BE )
_
(2)
(1)
F(fV ,fE )
F(gV ,gE )
/ F(DV , DE )
)
F(CV , CE )
(1) commutes since F is a functor.
For each X with F(gV , gE ) ◦ fˆ = F(fV , fE ) ◦ ĝ there is the induced pullback
morphism h : X → F(AV , AE ) with (h1 , h2 ), so that (2) and (3) commute.
h1 : X → P(AV ) is the induced pullback morphism of (P B3) for the projection
of the first component and h2 : X → P(P(AV ) ] AE )) is the induced pullback
morphism of (P B4) for the projection of the first component.
A.3
Noetherian Induction
A set S together with a binary relation R over S is well-founded if and only if
every non-empty subset S 0 ⊆ S has a minimal element; that is,
∀S 0 ⊆ S (S 0 6= ∅ ⇒ ∃x ∈ S 0 ∀s ∈ S 0 (s, x) ∈
/ R)
Examples of relations that are not well-founded include the negative integers
Z− with the usual order, since any unbounded subset has no least element. The
powerset of a set together with the inclusion of sets is a well-founded set if and
only if the set is finite. Note, that the superpower sets are well-founded even for
infinite sets, since we employ a different order.
Well-founded sets allow Noetherian induction:
Given a property P for an order relation R of a wellfounded set S, then we have:
– P (x) holds for all minimal elements of S.
– x ∈ S and P (x) holds for all yRx then P (x) holds.
Then P (x) holds for all x ∈ S.
Lemma 15 (P(S) is well-founded). Let R ⊆ P(S) × P(S) be given by A R B
iff np(A) ≤ np(B) with np : P(S) → N
30
– s ∈ S ⇒ np(s) = 0
– np(∅) = 1
– (Xi )i∈I ∈ S ⇒ np({Xi |i ∈ I}) = max{np(Xi )|i ∈ I} + 1 with I ⊆ N
Proof. Due to the inductive definition of P.
Lemma 16 (P(S) is well-founded). Let R ⊆ P(S)×P(S) be given by A R B
iff np(A) ≤ np(B) with np : P(S) → N
– np(∅) = 1
– (Xi )i∈I ∈ S ⇒ np({Xi |i ∈ I}) = max{np(Xi )|i ∈ I} + 1 with I ⊆ N
Proof. Due to the inductive definition of P.
Lemma 17 (P ω (S) is wellfounded). Let R ⊆ P ω (S) × P ω (S) be given by
A R B iff np(A) ≤ np(B) with np : P ω (S) → N
– s ∈ S ⇒ np(s) = 0
– np(∅) = 1
– (Xi )i∈I ∈ S ⇒ np({Xi |i ∈ I}) = max{np(Xi )|i ∈ I} + 1 with I ⊆ N
Proof. Due to the inductive definition of P ω .