Rewriting structured cospans Daniel Cicala SYCO 4 22 May 2019 - - PowerPoint PPT Presentation

rewriting structured cospans daniel cicala syco 4 22 may
SMART_READER_LITE
LIVE PREVIEW

Rewriting structured cospans Daniel Cicala SYCO 4 22 May 2019 - - PowerPoint PPT Presentation

Rewriting structured cospans Daniel Cicala SYCO 4 22 May 2019 outline motivation part i. part ii. structured cospans rewriting structured cospans part iii. inductive rewriting part iv. part i. motivation motivation Systems abound.


slide-1
SLIDE 1

Rewriting structured cospans Daniel Cicala SYCO 4 22 May 2019

slide-2
SLIDE 2
  • utline

part i. motivation part ii. structured cospans part iii. rewriting structured cospans part iv. inductive rewriting

slide-3
SLIDE 3

part i. motivation

slide-4
SLIDE 4

motivation

Systems abound. natural sciences chemical reactions ecological systems classical and quantum physical systems social sciences social networks WORLD3 model engineering power grid hardware and software networks logistics

slide-5
SLIDE 5

motivation

The grand ambition is... to create a general mathematical theory for compositional systems

slide-6
SLIDE 6

motivation

How do we embark on creating a fully general mathematical theory

  • f systems?

look to linguistics

slide-7
SLIDE 7

motivation

Syntax vs. Semantics syntax rules of grammar and sentence composition semantics meaning of words and sentences

slide-8
SLIDE 8

motivation

ingredients for syntax “alphabet” for systems rules for combining “letters” and “words” field-specific alphabet examples Chemical Reaction Network Petri Net Control Network Feynman Diagram

slide-9
SLIDE 9

motivation

a toy example illustrating our goals. We want to connect systems together

25Ω 35Ω

  • 25Ω

35Ω

‘rewrite’ systems into equivalent systems

25Ω 35Ω 60Ω

slide-10
SLIDE 10

motivation

Our goal is to ... create syntax for compositional systems (Baez, Courser) ... onto these terms, introduce rewriting Compositional systems requires composing together systems to create new systems. Make systems the arrows of a category! To rewrite systems, we borrow from the theory of adhesive categories or, more strictly, topos theory. Make systems the objects of a topos!

slide-11
SLIDE 11

motivation

make systems arrows in a category + make systems objects in a topos use double categories

slide-12
SLIDE 12

part ii. structured cospans part iia. structured cospans as arrows

slide-13
SLIDE 13

structured cospans structured cospans as arrows

How to read a structured cospan: inputs → system ← outputs This is a diagram in a category. How do we tame this data? Given an adjunction A X

L R

⊥ between topoi a structured cospan is a diagram in X of form La → x ← Lb

slide-14
SLIDE 14

structured cospans structured cospans as arrows

  • theorem. (Baez, Courser)

Given an adjunction A X

L R

⊥ between topoi, there is a category LCsp comprised of

  • bjects

those of A arrows structured cospans La → x ← Lb.

slide-15
SLIDE 15

structured cospans structured cospans as arrows

We fit open graphs into this framework using the adjunction Set Graph

L R

⊥ defined by La := edgeless graph with node set a Rg := underlying set of nodes of g

slide-16
SLIDE 16

structured cospans structured cospans as arrows

  • is of the form La → x ← Lb where

La is a three element set Lb is a two element set

slide-17
SLIDE 17

part iib. structured cospans as objects

slide-18
SLIDE 18

structured cospans structured cospans as objects

The mechanisms of rewriting are designed for objects of a category. definition. Fix an adjunction A X

L R

⊥ between topoi. The category LStrCsp has

  • bjects

structured cospans La → x ← Lb arrows triples (f , g, h) fitting into commuting diagrams La x Lb La′ x′ Lb′

Lf g Lh

slide-19
SLIDE 19

structured cospans structured cospans as objects

The mechanisms for rewriting work for the objects of a topos.

  • theorem. (dc)

The category LStrCsp is a topos.

slide-20
SLIDE 20

part iii. rewriting part iiia. double pushout rewriting

slide-21
SLIDE 21

rewriting dpo rewriting

example. Suppose we model the internet with graphs via nodes := websites edges := links but are uninterested in self-linking websites.

slide-22
SLIDE 22

rewriting dpo rewriting

A rewrite rule that removes a loop is given by

  • A rewrite rule derived from this is
slide-23
SLIDE 23

rewriting dpo rewriting

Double pushout rewriting was axiomatised using adhesive categories, of which topoi are an example. definition. A rewrite rule is a span with monic legs in a topos: ℓ ֋ k ֌ r A grammar is a pair (X, P) with X a topos and P a set of rewrite rules in X.

slide-24
SLIDE 24

rewriting rewriting structured cospans

definition. Given a grammar, a derived rewrite rule is one that appears at the bottom of a DPO diagram ℓ k r g d h with the top row belonging to P. The rewrite relation on a grammar g ∗ h is the transitive and reflexive closure of the relation induced by the derived rewrite rules.

slide-25
SLIDE 25

part iii. rewriting part iiib. rewriting structured cospans

slide-26
SLIDE 26

rewriting rewriting structured cospans

Because LStrCsp is a topos, we can rewrite structured cospans. A rewrite rule of structured cospans is a commuting diagram of form

La x Lb Lc y Ld Le z Lf

∼ = ∼ = ∼ = ∼ =

taken up to isomorphism.

slide-27
SLIDE 27

rewriting rewriting structured cospans

Here is a rewrite rule of open graphs

slide-28
SLIDE 28

rewriting rewriting structured cospans

Here is a derived rewrite rule of open graphs

slide-29
SLIDE 29

rewriting rewriting structured cospans

  • theorem. (dc)

For any adjunction

A X

L R

between topoi with L preserving pullbacks, there is a symmetric monoidal double category LRewrite comprised of

  • bjects

the objects of A

  • ver. arrows

isomorphisms in A

  • hor. arrows

structured cospans La → x ← Lb squares rewrites of structured cospans

La x Lb Lc y Ld Le z Lf

∼ = ∼ = ∼ = ∼ =

slide-30
SLIDE 30

part iv. inductive rewriting part iva. background

slide-31
SLIDE 31

inductive rewriting background

Given a closed system, we want to capture all of its rewritings. The previous section discussed operational rewriting, where the class of rewritings is obtained by applying rewrite rules. Inductive rewriting builds this class from a set of basic rewritings.

slide-32
SLIDE 32

inductive rewriting background

Decompose a closed system into “basic” open subsystems

· · · . . . · · · . . .

Rewrite basic open subsystems to generate all rewritings

· · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . . · · · . . .

slide-33
SLIDE 33

inductive rewriting background

The basic open subsystems come from a grammar. starting data. a grammar (X, P) for X a topos L ⊣ R : A ⇄ X with monic counit & L pullback preserving

slide-34
SLIDE 34

inductive rewriting background

example. L ⊣ R : Set ⇄ Graph has a monic counit.

  • LR

action

  • ε

counit

slide-35
SLIDE 35

inductive rewriting background

definition. Given a grammar (X, P) L ⊣ R : A ⇄ X with monic counit ε a discrete grammar (X, PLR) has rewrite rules ℓ ֋ k

ε

← − LRk

ε

− → k ֌ r for each rewrite rule ℓ ֋ k ֌ r

slide-36
SLIDE 36

inductive rewriting background

If P has a rewriting rule

  • the associated rule in PLR is
slide-37
SLIDE 37

part iv inductive rewriting part ivb. characterization results

slide-38
SLIDE 38

inductive rewriting results

  • theorem. (dc)

(X, P) is a grammar L ⊣ R : X ⇄ A: R has a monic counit ε ℓ ← k → r in P implies Sub(k) has all meets. The rewriting relation for (X, P) and (X, PLR) are equal.

*this generalizes a result in DPO graph rewriting by Ehrig, et. al.

slide-39
SLIDE 39

inductive rewriting results

definition. We can functorially assign a grammar (LStrCsp, P) to its language, Lang(LStrCsp, P), the double category comprised of

  • bjects
  • bjects from A
  • vert. arrows

invertible legged spans in A

  • hor. arrows

structured cospans squares generated by the rewrites derived from P

slide-40
SLIDE 40

inductive rewriting results

definition. (X, P) is a grammar. (L ⊣ R): X ⇄ A has a monic counit Define (LStrCsp, PLR) to have rewrites

LR0 ℓ LRk LR0 LRk LRk LR0 r LRk

∼ = ∼ = ∼ = ∼ =

and

LRk ℓ LR0 LRk LRk LR0 LRk r LR0

∼ = ∼ = ∼ = ∼ =

for each ℓ ֋ k ֌ r in P.

slide-41
SLIDE 41

inductive rewriting results

  • theorem. (dc)

(X, P) is a grammar (L ⊣ R): X ⇄ A has monic counit ℓ ֋ k ֌ r in P implies Sub(k) has all meets g, h ∈ X g ∗ h if and only if Lang(LStrCsp, PLR) has a square

LR0 g LR0 LR0 d LR0 LR0 h LR0

*this generalizes work by Gadducci and Heckel

slide-42
SLIDE 42

the end