the microcosm principle and concurrency in coalgebras

38

Upload: radwan

Post on 15-Jan-2016

45 views

Category:

Documents


0 download

DESCRIPTION

The Microcosm Principle and Concurrency in Coalgebras. Bart Jacobs Radboud Univ. Nijmegen, NL Technical Univ. Eindhoven, NL Ana Sokolova Univ. Salzburg, Austria. Ichiro Hasuo Kyoto University, Japan PRESTO Promotion Program, Japan. 1-slide review of coalgebra / coinduction. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Microcosm Principle  and Concurrency in  Coalgebras
Page 2: The Microcosm Principle  and Concurrency in  Coalgebras

CategoricalCategorical theory of state-based systemsCategoricalCategorical theory of state-based systemsin Sets : bisimilarityin Kleisli: trace semantics

[Hasuo,Jacobs,Sokolova LMCS´07]

in Sets : bisimilarityin Kleisli: trace semantics

[Hasuo,Jacobs,Sokolova LMCS´07]

Page 3: The Microcosm Principle  and Concurrency in  Coalgebras
Page 4: The Microcosm Principle  and Concurrency in  Coalgebras

aids compositional compositional verificationverification

aids compositional compositional verificationverification

„„bisimilarity is a bisimilarity is a congruence“congruence“

„„bisimilarity is a bisimilarity is a congruence“congruence“

Page 5: The Microcosm Principle  and Concurrency in  Coalgebras

Final coalgebra semantics as“process semantics”.

“Coalgebraic compositionality”

|| : CoalgF x CoalgF CoalgF o composing coalgebras/systems || : CoalgF x CoalgF CoalgF o composing coalgebras/systems

|| : Z x Z Z o composing behavior

|| : Z x Z Z o composing behavior

operation on operation on

NFAsNFAs

operation on operation on

regular regular languageslanguages

Page 6: The Microcosm Principle  and Concurrency in  Coalgebras

The same “algebraic theory”◦ operations (binary ||)◦ equations (e.g. associativity of ||)

is carried by◦ the category CoalgF and◦ its object Z 2 CoalgFin a nested manner!

“Microcosm principle” (Baez & Dolan)

with

o operations operations binary ||

o equationsequationse.g. assoc. of ||

XX 22 CC XX 22 CC

Page 7: The Microcosm Principle  and Concurrency in  Coalgebras

We name this principle the microcosm principle, after the theory, common in pre-modern correlative cosmologies, that every feature of the microcosm (e.g. the human soul) corresponds to some feature of the macrocosm.

John Baez & James DolanHigher-Dimensional Algebra III:

n-Categories and the Algebra of OpetopesAdv. Math. 1998

Page 8: The Microcosm Principle  and Concurrency in  Coalgebras

You may have seen it◦ “a monoid is in a monoidal category”

inner depends on

outer

inner depends on

outer

Page 9: The Microcosm Principle  and Concurrency in  Coalgebras

Answer

Page 10: The Microcosm Principle  and Concurrency in  Coalgebras

concurrency/concurrency/compositionalitycompositionality

mathematicsmathematics

microcosm for microcosm for concurrencyconcurrency((|| || and and ||||))

microcosm for microcosm for concurrencyconcurrency((|| || and and ||||))

parallel compositionparallel compositionvia via syncsync nat. trans. nat. trans.

parallel compositionparallel compositionvia via syncsync nat. trans. nat. trans.

2-categorical formulation2-categorical formulation

for arbitrary algebraic

theory

for arbitrary algebraic

theory

Page 11: The Microcosm Principle  and Concurrency in  Coalgebras

Parallel composition of coalgebrasvia

syncX,Y : FX FY F(X Y)

Page 12: The Microcosm Principle  and Concurrency in  Coalgebras

If the base category C has a tensor

: C x C C and F : C C comes with natural

transformationsyncX,Y : FX FY F(X Y)

then we have : CoalgF x CoalgF CoalgF

bifunctor CoalgF x CoalgF CoalgF

usually denoted by (tensor)

Theorem : CoalgF x CoalgF CoalgF : CoalgF x CoalgF CoalgF

: C x C C : C x C C

liftinglifting

Page 13: The Microcosm Principle  and Concurrency in  Coalgebras

????

????F

X Y

(X Y)

FX FYc d

syncX,Y

on base category

on base category

different different syncsync

different different syncsync

different different

different different

Page 14: The Microcosm Principle  and Concurrency in  Coalgebras

CSP-style (Hoare)

CCS-style (Milner)Assuming

C = Sets, F = Pfin( x _)C = Sets, F = Pfin( x _)

F-coalgebra = LTSF-coalgebra = LTS

x : Sets x Sets Sets x : Sets x Sets Sets

Page 15: The Microcosm Principle  and Concurrency in  Coalgebras

|| “composition of states/behavior” arises by coinduction

Page 16: The Microcosm Principle  and Concurrency in  Coalgebras

C has tensor F has syncX,Y : FX FY F(X Y)there is a final coalgebra Z FZ

C has tensor F has syncX,Y : FX FY F(X Y)there is a final coalgebra Z FZ

Page 17: The Microcosm Principle  and Concurrency in  Coalgebras

When is

: CoalgF x CoalgF CoalgF

associative?associative? Answer When

◦ : C x C C is associative, and◦sync is “associative”

Page 18: The Microcosm Principle  and Concurrency in  Coalgebras

2-categorical formulation ofthe microcosm principle

Page 19: The Microcosm Principle  and Concurrency in  Coalgebras

examples

omonoid in monoidal category

ofinal coalg. in CoalgF with

oreg. lang. vs. NFAs

examples

omonoid in monoidal category

ofinal coalg. in CoalgF with

oreg. lang. vs. NFAs

Page 20: The Microcosm Principle  and Concurrency in  Coalgebras

A Lawvere theoryLawvere theory LL is a small category s.t.

o L’s objects are natural numbers

o L has finite products

Page 21: The Microcosm Principle  and Concurrency in  Coalgebras

m (binary)e (nullary)m (binary)e (nullary)

assoc. of munit law assoc. of munit law

other arrows:other arrows:o projectionso composed terms

other arrows:other arrows:o projectionso composed terms

Page 22: The Microcosm Principle  and Concurrency in  Coalgebras

o a set with L-structure LL-set-set(product-preserving)

XX 22 CC XX 22 CC what about nested models?

Page 23: The Microcosm Principle  and Concurrency in  Coalgebras

o a categorycategory with L-structure LL-category-category(product-preserving)

NB. our focus is on strictstrict alg. structuresNB. our focus is on strictstrict alg. structures

Page 24: The Microcosm Principle  and Concurrency in  Coalgebras

Given an L-category C,

an LL-object-object X in it is a laxlax natural transformationcompatible with products.

X: carrier obj.

Page 25: The Microcosm Principle  and Concurrency in  Coalgebras

C: L-category F: C C, lax L-functor CoalgF is an L-category

C: L-category F: C C, lax L-functor CoalgF is an L-category

lax L-functor?

lax lax natur. trans..

lax L-functor?

lax lax natur. trans..

lax naturality?lax naturality?lax naturality?lax naturality?

...

GeneralizesGeneralizes

C: L-category Z 2 C , final object

Z is an L-object

C: L-category Z 2 C , final object

Z is an L-object

GeneralizesGeneralizes

Page 26: The Microcosm Principle  and Concurrency in  Coalgebras

C is an L-category F : C C is a lax L-functor there is a final coalgebra Z FZ

C is an L-category F : C C is a lax L-functor there is a final coalgebra Z FZ

by coinduction

subsumessubsumes

Page 27: The Microcosm Principle  and Concurrency in  Coalgebras

associativeassociative

: CoalgF x CoalgF CoalgF

associativeassociative

: CoalgF x CoalgF CoalgF

associativeassociative

: C x C C

associativeassociative

: C x C C

liftinglifting

Page 28: The Microcosm Principle  and Concurrency in  Coalgebras

equations are built-in in L◦ as

how about „assoc“ of sync?

◦ automaticvia “coherencecoherence condition“

LL-structure -structure on CoalgF

LL-structure -structure on CoalgF

LL-structure -structure on C

LL-structure -structure on C

liftinglifting

Page 29: The Microcosm Principle  and Concurrency in  Coalgebras

Related to the study of bialgebraic structures [Turi-Plotkin, Bartels, Klin, …] ◦Algebraic structures on coalgebras

In the current work:◦Equations, not only operations, are also an integral

part◦Algebraic structures are nested, higher-

dimensional

Page 30: The Microcosm Principle  and Concurrency in  Coalgebras

“Pseudo” algebraic structures◦ monoidal category (cf. strictly monoidal category)◦ equations hold up-to-isomorphism◦ L CAT, product-preserving pseudo-functor?

Microcosm principle for full GSOS

Page 31: The Microcosm Principle  and Concurrency in  Coalgebras

concurrency/concurrency/compositionalitycompositionality

mathematicsmathematics

microcosm for microcosm for concurrencyconcurrency((|| || and and ||||))

microcosm for microcosm for concurrencyconcurrency((|| || and and ||||))

parallel compositionparallel compositionvia via syncsync nat. trans. nat. trans.

parallel compositionparallel compositionvia via syncsync nat. trans. nat. trans.

2-categorical formulation2-categorical formulation

for arbitrary algebraic

theory

for arbitrary algebraic

theory

Thanks for your attention!Thanks for your attention!Ichiro Hasuo (Kyoto, Japan)http://www.cs.ru.nl/~ichiro

Thanks for your attention!Thanks for your attention!Ichiro Hasuo (Kyoto, Japan)http://www.cs.ru.nl/~ichiro

Page 32: The Microcosm Principle  and Concurrency in  Coalgebras

Microcosm principle : same algebraic structure◦on a category C and◦on an object X 2 C

2-categorical formulation:

Concurrency in coalgebras as a CS example Thank you for your attention!

Ichiro Hasuo, Kyoto U., Japanhttp://www.cs.ru.nl/~ichiro

Thank you for your attention!Ichiro Hasuo, Kyoto U., Japanhttp://www.cs.ru.nl/~ichiro

Page 33: The Microcosm Principle  and Concurrency in  Coalgebras

Take F = Pfin ( £ _) in Sets.

System as coalgebra:

Behavior by coinduction:

◦ in Sets: bisimilarity◦ in certain Kleisli categories: trace equivalence

[Hasuo,Jacobs,Sokolova,CMCS’06]

the set of finitely branching edges labeled with infinite-depthtrees,

such as

xprocess

graph of x

Page 34: The Microcosm Principle  and Concurrency in  Coalgebras

Note:Asynchronous/interleaving compositions don’t fit in this framework◦ such as ◦ We have to use, instead of F,

the cofree comonad on F

Page 35: The Microcosm Principle  and Concurrency in  Coalgebras

Presentation of an algebraic theory as a category: ◦ objects: 0, 1, 2, 3, … “arities”◦ arrows: “terms (in a context)”

◦ commuting diagrams are understood as “equations”

~ unit law ~ assoc. law

◦ arises from (single-sorted) algebraic specification (, E) as the syntactic category FP-sketch

projections

operation

composed term

Page 36: The Microcosm Principle  and Concurrency in  Coalgebras

In a coalgebraic study of concurrency,

Nested algebraic structures ◦ on a category C and◦ on an object X 2 C arise naturally (microcosm principle)

Our contributions:◦ Syntactic formalization of microcosm principle◦ 2-categorical formalization with Lawvere theories◦ Application to coalgebras:

generic compositionality theorem

Page 37: The Microcosm Principle  and Concurrency in  Coalgebras

A Lawvere theory L is for ◦ operations, and ◦ equations (e.g. associativity, commutativity)

CoalgF is an L-category Parallel composition is automatically associative (for example)◦ Ultimately, this is due to the coherence condition on the lax

L-functor F

Possible application : Study of syntactic formats that ensure associativity/commutativity (future work)

Page 38: The Microcosm Principle  and Concurrency in  Coalgebras