• Aucun résultat trouvé

A graph structure over the category of sets and partial functions

N/A
N/A
Protected

Academic year: 2022

Partager "A graph structure over the category of sets and partial functions"

Copied!
12
0
0

Texte intégral

(1)

C AHIERS DE

TOPOLOGIE ET GÉOMÉTRIE DIFFÉRENTIELLE CATÉGORIQUES

Y OSHIHIRO M IZOGUCHI

A graph structure over the category of sets and partial functions

Cahiers de topologie et géométrie différentielle catégoriques, tome 34, n

o

1 (1993), p. 2-12

<http://www.numdam.org/item?id=CTGDC_1993__34_1_2_0>

© Andrée C. Ehresmann et les auteurs, 1993, tous droits réservés.

L’accès aux archives de la revue « Cahiers de topologie et géométrie différentielle catégoriques » implique l’accord avec les conditions générales d’utilisation (http://www.numdam.org/conditions). Toute utilisation commerciale ou impression systématique est constitutive d’une infraction pénale. Toute copie ou impression de ce fichier doit contenir la présente mention de copyright.

(2)

A GRAPH STRUCTURE OVER THE CATEGORY OF SETS AND PARTIAL FUNCTIONS

by

Yoshihiro MIZOGUCHI

CAHIERS DE TOPOLOGIE ET GÉOMÉTRIE DIFFÉRENTIELLE

CATÉGORIQUES

VOL. XXXIV-1 (1993)

R6sum6. En 1984 Raoult a

propose

une formulation des r64critures des

graphes

utilisant des sommes fibr6es dans la

cat6gorie

des

graphes

et des fonctions

partielles.

Cette note

generalise

sa m4thode et propose une structure

alg4brique

de

graphe

pour introduire un cadre

plus general

pour les r66critures de

graphes

et donner une demonstration

simple

du th6or6me

d’existence de sommes fibr6es a 1’aide du calcul relationnel.

1 Introduction

There are many researches about

graph

grammars and

graph rewritings

us-

ing

the

category theory.

The structure of a directed

graph

is a function

from the set E of

edges

to the

product

set V x V of the source vertices set

and destination vertices set.

Ehrig[4]

characterized the

graph

grammar and

rewriting

rules

using

two

pushout

squares and

pushout complements

in the

category

of

graphs.

As the

category

of

graphs

is considered as a functor

category

over the

category

of sets and

functions,

it becomes a

topos

and has various useful

properties.

The existence theorem of

pushout comple-

ments in a

topos including

the

category

of

graph

was

generally proved by Kawahara[7].

L6we and

Ehrig[3, 11]

also formulated

graph rewritings using

a

single pushout

in the

category

of

graphs

based on sets and

partial

functions.

Raoult and

Kennaway’s approach[13, 9]

was different from

Ehrig’s

for-

malization of

graph rewritings.

The

graph

structure in

[13]

is a function

from a vertex set V to the set V* of finite

strings

of vertices and Raoult defined

graph rewritings by

a

single pushout

square

using partial

functions.

This paper

generalizes

Raoult’s method. For an endofunctor on the cat- egory Pfn of sets and

partial

functions we consider a

graph

structure as a

function V -&#x3E; TV from a vertex set V to

TV,

where T is an endofunctor

on Pfn. That

is,

we treat the

coalgebras

over Pfn. In the case TV = V*

the structure is the same as Raoult’s one. We prove an existence theorem

(3)

of

pushouts

in our

general settings avoiding

many kind of conditional checks and case divisions

by using

the relational calculus. The relational calcu-

lus,

a

theory

of

binary relations,

has been

originally applied

to the area of

topology

and

homological algebra[l, 2, 5]. Recently

it has been used in the

area of

computer

science for

representing

the notion of nondeterminism in automata

theory [6],

the

theory

of assertion semantics of

programs[8]

and

characterization

of

pushouts

in the

theory

of

graph grammars[7].

Our main result on the existence theorem of

pushouts produces

a mod-

ification of Raoult’s result

[13, Proposition 5]

which lacked a condition. A counter

example

to his result is

given.

2 Preliminary

In this

section,

we recall some relational notations and

properties

of the category Pfn of sets and

partial

functions.

Let

A,

B and C be sets. When a is a subset of A X

B,

we call a a relation

from A to B and denote it

by

a : A -&#x3E; B. For relations a : A - B and

B :

B -

C,

we define a

composite

relation

a(3 :

A -&#x3E; C

by a B = {(a, c)

E

A X

Cl(a, b)

E

a, (b, c)

E

(3

for some b E

B}.

For relation a : A -

B,

we define the inverse relation

ab #:

B - A

by ab

=

((b, a)

E B x

Al (a, b)

E

a}.

We

identify

a function

f :

A - B with a relation

((a, f(a))

E A x

Bla

E

A}

(the graph

of

f).

The

unique

function from a set X to one

point

set 1 =

{*}

is denoted

by HX :

X - 1. We define a subset

dom(a)

of A for a relation

a : i A - B

by dom(a) = {a

E

Al(a, *)

E

aHA}

and a relation

d(a) :

A - A

by d( f )

=

((a, a)

E A X

Ala

E

dom(a)}.

For two relations

a,(3 :

A -

B,

a

U (3

and a n

(3

denote the set union and

intersection, respectively.

A

partial function

is a relation

f :

A 2013B

satisfying f # f

C

idB

and

denote it

by f :

A -

B,

where

idB :

B - B is a

identity

function of B. A

partial

function

f :

A - B is a

(total) function

if it satisfies

idA

C

f f #.

Lemma 2.1 Let

a, a’ :

A -

B,

and

(3, (3’ :

B - C be relations.

(4)

Lemma 2.2 Let

f :

A -

B,

g : A -

B,

h : B - C be

partial functions.

(1) f

is a total

function if

and

only if filB = QA -

Proposition

2.3

(Law

of

Puppe-Calenko) If

a : A -

B, B :

B - C

and q :

A - C are

relations,

then

a B

n y C

a(Q

n

a#y).

Fact 2.4 The

category

Pfn has

pushouts.

Let

be a

pushout

square in Pfn. For any

functions

x : B -

S,

y : C -&#x3E; S

satisfying f x =

gy, there exists a

unique function

t : D - S such that ht = x and ht = y, where t =

hüx

u

kÜy.

Lemma 2.5 For the

pushout

square in Fact

2.4,

3 Graphs

over

Pfn

In this

section,

we introduce an abstract definition of a

category

which rep-

resents

graphs

and

graph homomorphisms. Graph rewritings

are

defined by using

a

single pushout

in the

category.

We prove a necessary and suffi- cient condition for existence of

pushouts.

Some concrete

categories

of

graphs including Raoult’s[13]

definition are shown.

Let T : Pfn -&#x3E; Pfn be an endofunctor. A

graph

constructed

by

T is a

pair (A, a)

of a set A and a total function a : A -&#x3E; T A. A

graph morphism

f : (A, a)

-&#x3E;

(B, b)

is a

partial

function

f : A -

B

satisfying f b

=

d( f )aT f .

The

graph category G(T)

is the

category

of

graphs

and

graph morphisms

associated with T.

(5)

Lemma 3.1 Let T : Pfn -&#x3E; Pfn be a

functor,

a : A -&#x3E;

T A,

b : B -&#x3E; T B and c : C -&#x3E; TC total

functions

and

f :

A - B and g : B -&#x3E; C

partial functions. If fb= d( f )aT f

and gc =

d(g)bTg

then

fgc

=

d(fg)aT(fg).

That is

G(T)

is in

fact

a

category.

Proof.

It follows from a

simple

relational

computation:

Choosing

a suitable functor

T,

we consider the several kinds of

graph

structures.

Example

3.2

(Kleene functor)

We define the Kleene functor * : Pfn -&#x3E;

Pfn as follows. Let

A, B

be sets

and f :

A -&#x3E; B a

partial

function. *A = A*

is the set of finite

strings

over A. We define

* f (= f* ) :

A* -&#x3E; B* as follows:

An

object

of

G(*)

can be seen as a kind of directed

graph

and a

morphism

of

G(*)

is a

node-mapping

which preserves

out-edges

but not

in-edges.

The

category G(* )

is

equivalent

to what is considered

by Raoult[13].

Example

3.3

( Powerset functor)

We define the power set functor P : Pfn -&#x3E; Pfn as follows. Let

A,

B be sets and

f :

A -&#x3E; B a

partial

function.

P(A)

is the set of all subsets of A and

P f : P(A) -&#x3E; P(B)

is defined

by P f (X ) - f (X ),

for all X C A. An

object

of

G(P)

is a kind of directed

graph

in which the

out-edges

of a node are not orderd and there cannot be

multiple edges

between the same nodes.

Example

3.4 A set

NA

of functions from A to the set N =

{o, 1,...}

of natural numbers is defined

by NA

=

{f :

A -&#x3E;

NlExEAf(a)

is

finite.}.

We define the functor W : Set Set as follows. Let

A, B

be sets and

f : A -

B a

partial

function.

W(A)

=

NA

and

W f : NA -&#x3E; NB

is defined

as

Wf (a)(y) -&#x3E; E{a(x)lf(x)

= y, x E

A}, (a

E

NA, y E B).

An

objects

of

G(W)

are a type of

edge-weighted

directed

graph.

(6)

We can treat labeled

graph

structure

choosing

a functor like next two

examples.

Example

3.5

(L-labeled

Kleene

functor)

We fix a set L of labels for

edges.

We

define

a functor

(L

x

-)* :

Pfn -&#x3E; Pfn as follows. For a set

A, (L

x

A)*

is the set of finite

strings

of

pairs

of a label and an element of

A. Other definition of the functor is similar to

Example

3.2. An

object

of

G((L x -)*)

is similar to the closed term

hypergraph

of

Kennaway [10].

Example

3.6

(L-labeled powerset functor)

We

similarly

define a func-

tor

P(L x -) :

Pfn - Pfn like

Example

3.3 and

Example

3.5.

Theorem 3.7 Let

f : (A, a)

-

(B, b) and g : (A, a)

-&#x3E;

(C, c) be morphisms in G(T). If the

square f

is a

pushout

in

Pfn,

then there exists a

unique-partial function

such that hd =

d(h)bTh,

kd =

d(k)cTk.

When that is so, the square

(2)

is a

pushout

in

G(T) if

and

only if

b =

(hObTh)

u

(k#cTk)

and b is a total

function.

Proof.

We first show

f d(h)bT h

=

gd(k)cTk.

(7)

Since the square

(1)

is a

pushout

in

Pfn,

there exist a

unique partial

function

d : D -&#x3E; TD such that hd =

d(h)bTh

and hd -

d(k)cTk,

where d =

(hObTh)

u

(k#cTk), by

Fact 2.4. Assume the square

(2)

is a

pushout. Graph morphisms h and k satisfys

hb =

d(h)bT h

and hb =

d(k)cTk.

Since

h#d(h)=

ha, k#d(k) = k#

and

(h#hUk#k)

=

idD,

we have b =

(h#hUk#k)d = (hUbTh)U (kbcTkl. Conversely,

assume 6 =

(hObTh)

U

(k#cTk). is

a total function. Let

(S, s)

be an

object

in

G(T),

and

x: B -&#x3E; S, y : C -&#x3E; S morphisms

in

G(T) satisfying f x

= gy. Since the square

(1)

is a

pushout

in

Pfn,

there exist

a

unique partial

function t : D -&#x3E; S such that ht = x and ht = y, where t =

hUx U kUy, by

Fact 2.4. We

only

need to show that t is a

graph morphism.

Since

h#xHs = hOd(h)d(x)flB

=

h#d(x)hHD

and

k#yHs

=

k#d(y)kHD,

we

have

d(t)

=

hod(x)h

U

kld(y)k.

Since

and

k’d(y)k6Tt

=

koys,

we obtain

d(t)btt

=

hoxs

u

k#ys

= ts. That is t is

a

graph morphism.

So the square

(2)

is a

pushout

in

G(T).

Corollary

3.8 Let

f : ( A, a)

-&#x3E;

(B, b) and g : (A, a)

-

(C, c)

be

morphisms

in

G(T). If

the square f

is a

pushout

in

Pfn,

then the

following

conditions are

equivalent:

is a total

function.

(8)

if and

only

if

kf2D

C

cTkf2TD-

So we have shown that

(2)

and

(3)

are

equivalent.

Next we show the

equivalence

of

(3)

and

(1).

Assume

hQD

C

bThS2TD

and

kf2D

C

cTkHTD.

Since

hbh

U

k#k

=

idD by

Lemma

2.5,

we have

f2D

C

(hOhS2D)

U

(kOkS2D)

C

(h#bThHTD)

u

(k#cTkHTD)

C

df2TD.

This means

d is a total function.

Conversely,

assume d is a total function. Since hd =

d(h)bTh

means

d(h)

=

d(h)

n

d(bTh),

we have

d(h)

C

d(bTh). Similaly

d(k)

C

d(cTk).

We note that if T=P,T=W and T=P(Lx-), then Tf

:TA-&#x3E;TB is a total function for any

partial

function

f :

A -&#x3E; B. This property is very convenient for existence of

pushouts.

Corollary

3.9 The

categories G(P), G(W)

and

G(P(L x- ))

have

pushouts.

4 Observations

In this

section,

we

provide

the

proof

of Raoult’s

Proposition

5 in a view

point

of our framework.

Let

f :

A -&#x3E; B and g : A -&#x3E; C be

partial

functions. We define a relation

r(f,g) : A -&#x3E;

1

by r(f,g)

=

ula :

A -

11ffüa

= a and

gg0a

=

a},

that is

r(f,g)

is the maximum relation

satisfying f f#r(f,g) = r(f,g)

and

gg#r(f,g)

=

r(f,g).

be a

pushout

in (

Proof.

It is obvious

ff#fhHD = fhHD

and

gg0f hf2D

=

f hf2D.

Asuume a

relation a : A -&#x3E; 1 satisfies

ff# a

= a and

gg0a

= a . Since

f0a :

B -&#x3E; 1 and

gaa :

C -&#x3E; 1 are

partial

functions and D is a

pushout,

there exist a

unique

function

B :

D -&#x3E; 1 such that

hB

=

f#a

and

k# = g"a

hold. We obtain

fhHD D ff# a

= a. So

fhHD

is the maximum relation.

(9)

Lemma 4.2 Under the situation

of

Theorem 3.7, consider the

functor

T =

* . Then

following five

conditions are

equivalent:

where

Proof.

Since

d( f )aT f

=

f b

and

d(f)f

=

f ,

we have

b# f#fhHB = (Tf)#a#

fhHB.

This means

b( f (A’))

=

T f (a(A’)).

So

(1)

and

(3)

are

equivalent. (3)

and

(5)

are

equivalent by (Tf)-1(dom(h)*) = (A’)*. Similarly, (2),(4)

and

(5)

are

equivalent,

because of

r(f,g)

=

gkHD.

Using

the last

lemma,

condition

(2)

in

Corollary

3.8 is

replaced

to the

form in the next

proposition.

The next

proposition

which was

originally proved by

Raoult

[13, Proposition 5]

is a

special

case of Theorem 3.7.

Proposition

4.3 Let the square

is a

pushout

in Pfn. A commutative

diagram

in

G(*)

is a

pushout

in

G(*) if

and

only if

the

following

conditions

(1), (2)

and

(3)

hold:

and

(10)

where

The next

example

is a counter

example

of Raoult’s

Proposition 5[13]

which lack a condition

(3)

of

Proposition

4.3.

Example

4.4 Let A =

{x1 -&#x3E; x2, x3}, B

=

{y1

-

y2}

and C =

fz,

-

z2}

be

graphs.

Define

graph morphisms f : A -

B and g : A -&#x3E; C

by f (x1 )

= yl,

f (x2)

=

f (x3) -

y2,

g(x1)

= zi and

9(X2)

= z2. The value of

9(X3)

is

undefined(cf. Figure 1).

It is easy to check A’ =

{x1}.

and the condition in

Proposition 4.3(3)

does not hold. Consider the

pushout

in the

category

Pfn. Since D is a one

point set, h and k

are not

graph

morphisms.

(11)

Acknowledgments

The author would like to thank Professor Yasuo Kawahara for the valuable

suggestions

and

encouragement during

the course of this

study.

The author

wishes to thank a referee for his constructive comments to

improve

this

manuscript.

References

[1]

M.S. Calenko. The structures of

correspondence categories.

Soviet

Math.

Dokl., 18(1977),

1498-1502.

[2]

M.S.

Calenko,

V.B.

Gisin,

and D.A. Raikov. Ordered

categories

with

involution. Dissertations

Mathematics, 227(1984).

[3]

H.

Ehrig,

M.

Korff,

and M. Löwe. Tutorial introduction to the

algebraic approach

of

graph

grammars based on double and

single pushouts.

Lec-

ture Notes in

Computer Science, 532(1990),

24-37.

[4]

H.

Ehrig,

M.

Nagl,

G.

Rozenberg,

and A.

Rosenfeld,

editors.

Graph-

grammars and their

application to computer science,

volume 291 of Lec-

ture Notes in

Computer

Science.

Springer-Verlag,

1986.

[5]

Y. Kawahara. Relations in

categories

with

pullbacks.

Mem. Fac. Sci.

Kyushu University, Ser.A27(1973),

149-173.

[6]

Y. Kawahara.

Applications

of relational calculus to

computer

mathe- matics. Bull.

of Informatics

and

Cybernetics, 23(1988),

67-78.

[7]

Y. Kawahara.

Pushout-complements

and basic concepts of grammars in

toposes.

Theoretical

Computer Science, 77(1990),

267-289.

[8]

Y. Kawahara and Y.

Mizoguchi. Categorical

assertion semantics in toposes. Advances

Softw.

Sci. and

Tech.,

in press.

[9]

R.

Kennaway.

On "On

graph rewritings".

Theoretical

Computer

Sci-

ence,

52(1987),

37-58.

[10]

R.

Kennaway. Graph rewriting

in some

categories

of

partial morphisms.

Lecture Notes in

Computer Science, 532(1990),

490-504.

(12)

[11]

M. Löwe and H.

Ehrig. Algebraic approach

to

graph

transformation based on

single pushout

derivations. Lecture Notes in

Computer Science, 484(1990),

338-353.

[12]

Y.

Mizoguchi

and Y. Kawahara.

Graph rewritings

without

gluing

con-

ditions. RIFIS Tech.

Report CS-42, Kyushu University,

1991.

[13]

J.C. Raoult. On

graph rewritings.

Theoretical

Computer Science,

32(1984), 1-24.

Yoshihiro

Mizoguchi

Department

of

Control Engineering

and Science

Kyushu

Institute of

Technology

lizuka

820,

JAPAN

Email:

[email protected]

Références

Documents relatifs

There is a general result for the existence of pushouts in a category C P of partial morphisms based on the notions final triple and hereditary pushout in the underlying category C

Using standard monotone class arguments and monotone convergence theorem, it suffices to prove the result for continuous (non-negative) functions with compact support contained in

This paper establishes some properties of invex sets and nonsmooth [gen- eralized] invex functions on open and arbitrary (nonempty) sets.. It is divided into

This relation can then become an object for any relation S(X) whose argument refers to a binary relation. Thus, the possibility to abstract relations is a means for

the strong dual of any partial Hilbert space is isomorphic to a closed subspace of an amplitude space.. We then consider cover spaces on the unit sphere of a

L’accès aux archives de la revue « Annali della Scuola Normale Superiore di Pisa, Classe di Scienze » ( http://www.sns.it/it/edizioni/riviste/annaliscienze/ ) implique l’accord

Article numérisé dans le cadre du programme Numérisation de documents anciens mathématiques.. PULLBACK AND PUSHOUT SQUARES IN A SPECIAL DOUBLE CATEGORY WITH CONNECTION.. by

In Section 2 it is argued contrary to Quine that classical set theory can better be interpreted following Russell as a theory of properties or attributes rather