S
YNTACTIC
T
HEORY FOR
B
IGRAPHS
Troels C. Damgaard ([email protected])
Joint work with Lars Birkedal, Arne John Glenstrup, and Robin Milner
Bigraphical Programming Languages (BPL) Group IT University of Copenhagen
R
ELEVANT PUBLICATIONS
Damgaard and Birkedal.Axiomatizing Binding Bigraphs. Nordic Journal of Computing, 2006.,
Birkedal, Damgaard, Glenstrup and Milner.Matching of Bigraphs. InProceedings of Graph Transformation for Verification and Concurrency Workshop 2006, Electronic Notes in Theoretical Computer Science . Elsevier, 2007., and
Damgaard.Syntactic Theory for Bigraphs.
Masters Thesis. IT University of Copenhagen, 2006. (with expanded introduction and overviews).
See my webpage for more information (e.g., links to more publications and to the BPL group):
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGE Expressing Bigraphs Language3
N
ORMALF
ORMT
HEOREM(
S)
4E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHING Background — Bigraphical Reactive Systems CharacterizationRules — Details
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGEExpressing Bigraphs Language
3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHINGBackground — Bigraphical Reactive Systems Characterization
Rules — Details
6
C
URRENT ANDF
UTUREW
ORKI
NTRODUCING
B
IGRAPHS
B
IGRAPHS AND BIGRAPHICAL REACTIVE SYSTEMS(BRS
S)
In one line: Agraphicalmodel ofmobile computationthat emphasizes both
localityandconnectivity— due to Milner and coworkers. Developed with two main aims
to modeldirectlyimportant aspects of ubiquitous systems, and to provide ageneral theoryfor reactive systems, where many existing calculi for mobility and concurrency may be represented and investigated. In particular, the theory provides us with tools to derive from a BRS alabelled transition systemwhose associated bisimulation relation is a congruence relation.
I
NTRODUCING BIGRAPHS
(
CONT
.)
S
O WHAT IS A BIGRAPH?
Essentially, abigraphis
aplace graph— a forest, and alink graph— a (hyper-)graph sharing nodes.
I
NTRODUCING BIGRAPHS
(
CONT
.)
ABIGRAPH—A COMBINATION OF A PLACE GRAPH AND A LINK GRAPH These are examples ofplaceandlinkgraphs:
A B
IGRAPH
M
ODEL OF AN
O
FFICE
A=
Aconsists of
roots(dashed boxes),
nodes(solid boxes), and
links(green lines).
Each node has acontrol(in sans serif) indicating the number and type of
portsfor linkage.
B
IGRAPHS ARE
C
OMPOSABLE
A=
Non-ground bigraphs containholes(or sites) and/orinner names.
B=
B
INDING BIGRAPHS
A=
Bindingbigraphs, enforce a scoping discipline on linkage connected to a binding ports or local outer names —binders.
Allpeers (inner names or ports) linked to a binder, must be nestedwithin
I
NTERFACES
B:h2,({x},∅),{x,z}i → h2,(∅,∅),∅i
C:h0,(),∅i → h2,({x},∅),{x,z}i
Formally, a bigraph is a morphism in a category ofinterfaces, hence, bigraph composition is simply the categorical composition.
For example,BandCcompose exactly, because theinnerfaceofBis
equalto theouterfaceofC.
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGE Expressing Bigraphs Language3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHINGBackground — Bigraphical Reactive Systems Characterization
Rules — Details
6
C
URRENT ANDF
UTUREW
ORKM
OTIVATION
EXPRESSINGBIGRAPHS
How togivea bigraph? Two basic approaches —
C
ONSTRUCT GRAPH STRUCTURE DIRECTLYBigraphs are simply a collection of certain graphs. We can just give
explicit sets of constituents (i.e,nodes,links,names,controls, etc.); and, a number of maps to build bigraph structure (i.e.,nesting,linking, etc.).
C
ONSTRUCT INDUCTIVELY FROM SET OF ELEMENTARY BIGRAPHS Construct bigraphsinductivelyas the smallest set of bigraphs built froma set ofelementary bigraphs; and, a fewoperators.
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE FOR
B
IGRAPHS
(
CONT
.)
L
ANGUAGE
C
ONSIDERATIONS
The terms in the language are explicitly typed withinterfaces— determining when tensor product, composition, and abstraction iswell defined.
Hence, formation rules ensurewell formedterms denote bigraphs.
Theinterfacefor expressions can be determined by induction.
Similarly, thebigraphdenoted by an expression can be determined by induction.
C
ONCLUSION
T
HEOREM(C
OMPLETENESS OFL
ANGUAGE)
All binding bigraphs can be expressed using composition, tensor product⊗, and abstraction( ), from constants
1,merge2,y/X, /x,K~y(X~), π,pUq.
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGEExpressing Bigraphs Language
3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHINGBackground — Bigraphical Reactive Systems Characterization
Rules — Details
6
C
URRENT ANDF
UTUREW
ORKM
OTIVATION
M
OTIVATIONAs a basis for structured analysis of bigraphs — we develop anormal form theoremthat
details a number of subclasses of bigraphs (overview, next slide); gives a correspondingexpression formatfor each class.
N
ORMAL
F
ORMS
THEDISCRETEVARIANT FOR MATCHING We analyze bigraphs and define
discrete decomposition — separating a bigraphBinto a global link graph
wand a discrete bigraphD, which has one-one linkage to global outer names;
decomposing a discrete bigraphDinto separate roots — discreteprimes
P; and,
decomposing discrete primesPinto separatenodesandholes.
N
ORMAL
F
ORMS
(
CONT
.)
THEDISCRETEVARIANT FOR MATCHING We analyze bigraphs and define
discretedecomposition — separating a bigraphBinto agloballink graph wand adiscretebigraphD, which has one-one linkage to global outer names;
decomposing a discrete bigraphDinto separate roots — discrete primes
P; and,
decomposing discrete primesPinto separatenodesandholes.
N
ORMAL
F
ORMS
(
CONT
.)
THEDISCRETEVARIANT FOR MATCHING We analyze bigraphs and define
discretedecomposition — separating a bigraphBinto agloballink graph wand adiscretebigraphD, which has one-one linkage to global outer names;
decomposing a discrete bigraphDinto separate roots — discreteprimes
P; and,
decomposing discrete primesPinto separate nodes and holes .
C
ONCLUSION
MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE NORMAL FORM
Main theorem states soundness and completeness of the normal form;
and takes about two pages to state in full detail.
T
HEOREM(
Schema
: N
ORMALF
ORM)
Any bigraph of classCcan be expressed on the format E .
For any other expression E0on this format, the requirementsR1, . . . ,Rn−1
(between constituents of E and E0) hold.
C
ONCLUSION
MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE NORMAL FORM
Main theorem states soundness and completeness of the normal form; and takes about two pages to state in full detail.
T
HEOREM(
Schema
: N
ORMALF
ORM)
Any bigraph of classCcan be expressed on the format E .
For any other expression E0on this format, the requirementsR1, . . . ,Rn−1
(between constituents of E and E0) hold.
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGEExpressing Bigraphs Language
3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHINGBackground — Bigraphical Reactive Systems Characterization
Rules — Details
M
OTIVATION
M
OTIVATIONWould like to reason about graph equality on thetermlevel — i.e., to reason
syntacticallyabout equality of bigraphs.
For example, we might like to show that:
pcy1⊗pdaz0
(1⊗1) = pcy11⊗pdaz01
,
y/x x/z=y/z.
We give a syntactic equational theory by stating basic equalities between bigraph expressions — extending work forpurebigraphs by Milner.
C
ATEGORICAL AXIOMS
Categorical axioms deal with basic properties like
associativity of composition and tensor product,A(BC) = (AB)Cand A⊗(B⊗C) = (A⊗B)⊗C,
unit for composition and tensor products (identities on certain interfaces), and handling symmetries (permutations on the place graph structure)
(C1) AidI = A =idJ A (A:I→J) (C2) A(BC) = (AB)C (C3) A⊗id = A =id⊗A (C4) A⊗(B⊗C) = (A⊗B)⊗C (C5) idI⊗idJ = idI⊗J (C6) (A1⊗B1)(A0⊗B0) = (A1A0)⊗(B1B0) (C7) γI, = idI (C8) γ γ = id
G
LOBAL LINK AXIOMS
Link axioms mainly state the ways in which compositions oflinkingscan be equally expressed without composition.
(L1) x/x = idx
(L2) /y y/x = /x
(L3) /y y = id
P
LACING AND ION AXIOMS
Place axioms explain the basic ways in whichplacingexpressions for equal bigraphs can vary.
(P1) merge2(1⊗id1) = id1
(P2) merge2(merge2⊗id1) = merge2(id1⊗merge2)
(P3) merge2γ1,1,(∅,∅) = merge2
Two axioms for ions deal with renaming of the names on both the interfaces of an ion.
(N1) (id1⊗α)K~y(X~) = Kα(~y)(~X)
B
INDING AXIOMS
Binding axioms state basic equalitites between expressions with the
abstractionoperator and/or theconcretionconstant.
(∅)P=P abstracting no names is the same as not abstracting.
(Y)pYq=id(Y) abstracting a concretion of the namesY is just
an identity onY.
(pXqZ ⊗idY)(X)P=P “concreting” an abstraction of the namesX
gives you back the bigraphPthat you started with.
(idX ⊗(Y)P))G= extending the scope of an abstraction over a set (Y)(P⊗idX)G of global namesX is ok, when the entire expression
has a local innerface.
C
ONCLUSION
MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE EQUATIONAL THEORY
T
HEOREM(S
OUNDNESS AND COMPLETENESS)
For all binding bigraph expressions E and F ,[[E]] = [[F]], i.e.,E and F denote the same bigraph iff`E =F .
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGEExpressing Bigraphs Language
3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHING Background — Bigraphical Reactive Systems CharacterizationRules — Details
6
C
URRENT ANDF
UTUREW
ORKA
DDING
D
YNAMICS
We buildbigraphical reactive systems(BRS) by giving a set of rewriting rules; expressed essentially as a pair of bigraphs, like those below:
A
DDING
D
YNAMICS
(
CONT
.)
T
HE MATCHING PROBLEMTo determine, whether and how a redexmatchesa bigraph.
Suppressing some detail — aredexRmatches a groundagenta, ifa decomposes, s.t.,
a=C(R⊗idZ)d
— forcontextC, and discreteparameterd. We can illustrate a match schematically, like this:
M
OTIVATION
So, we have definitions
D
EFINITION(A
BIGRAPH)
“Official” definition:G= (V,E,ctrl,link,prnt) :I →J
D
EFINITION(A
MATCH IN BIGRAPHS)
“Official” definition: [. . . ]a=C(R⊗idZ)d, whereCis a context, andd a
discrete parameter [. . . ]
P
ROBLEM(C
ONSTRUCTING A CONTEXT AND PARAMETER)
How to construct a contextCand parameterd, given agentaand redexR? Instead, we
M
ATCHING
S
ENTENCES
We define a new representation for amatch— as arelation— and look to inductively characterize this relation.
D
EFINITION(M
ATCHING SENTENCE)
ωa, ωR, ωC`a,R,→C,d
forwirings(essentially, link graphs)ωa,ωR,ωCanddiscretebigraphsa,R,C, d.
a,d are ground,
RandCare products of discrete primes,
M
ATCHING
S
ENTENCES
(
CONT
.)
D
EFINITION(
V
ALID MATCHING SENTENCE)
A matching sentence as above isvalidiffR
ULES FOR
D
ERIVING
V
ALID
M
ATCHING
S
ENTENCES
M
ATCHING RULESWe give a set of rules forderivingvalid matching sentences. We take two axioms,
one concerned with introducing nonconnected linkage; and,
one, which allows to conclude when we have roots with equal structure in agent and parameter (up to certain renamings).
And seven rules, most of which serve to introduce an elementary bigraph or operator. For example, PRODUCT ωa, ωR, ωC||ω` a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e , and, MERGE ωa, ωR, ωC`a,R,→C,d aglobal .
R
ULES
— I
LLUSTRATED
R
ULES
— I
LLUSTRATED
(
CONT
.)
R
ULES
- D
ETAILS
CLOSE σa, σR,idYR⊗σC`a,R,→C,d σC:→Y]YC σR:→U]YR (id⊗/(YR]YC))σa,(id⊗/YR)σR,(id⊗/YC)σC`a,R,→C,d PERM ωa, ωR, ωC`a,Nmi Pπ−1(i),→C,(π⊗id)d ωa, ωR, ωC `a,Nmi Pi,→Cπ,d PRODUCT ωa, ωR, ωC||ω`a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e LSUB σa⊗ωa, ωR, σC⊗ωC`p,R,→P,d σa:Z →W σC:U→W P:U]X ωa, ωR, ωC`(σba⊗id)(Z)p,R,→(cσC⊗id)(U)P,dR
ULES
- D
ETAILS
(
CONT
.)
ION ωa, ωR, ωC`(( ~ v)/(X~)⊗id)p,R,→((~v)/(~Z)⊗id)P,d α=~y/~u σ:{~y} → σ||ωa, ωR, σα||ωC`(K~y(~X)⊗id)p,R,→(K~u(~Z)⊗id)P,d SWITCH ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P:→ hW]Yi σ:W→U ωa, ωR, ωC`p,(bσ⊗id)(W)P,→pUq,d PRIME-AXIOM α:X →U β:Z → σL:Y →U p:hY]Zi σ(σL⊗β),id, σ`p,id(X),→pαq,(X)(α−1σL⊗β⊗id1)p WIRING-AXIOM y,X,y/X`id,id,→id,id Rules — illustratedC
ONCLUSION
MAIN RESULT-SOUNDNESS AND COMPLETENESS OF THE RULES
T
HEOREM(S
OUNDNESS)
The rules for matching aresound, that is, any matching sentence that can be derived is valid.
T
HEOREM(C
OMPLETENESS)
The rules for matching arecomplete, that is, any valid matching sentence can be derived from the rules.
The equality theory and normal forms are employed heavily to prove these theorems.
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGEExpressing Bigraphs Language
3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHINGBackground — Bigraphical Reactive Systems Characterization
Rules — Details
6
C
URRENT ANDF
UTUREW
ORKC
URRENT WORK
T
ERM MATCHINGIn the BPL group we build a tool to experiment with bigraphical reactive systems.
Bigraphs are represented using aterm languagewithconstantsandoperators
corresponding exactly to the elementary bigraphs and combinators.
Based on the work presented — we use a simple approach to implementing matching in such a tool:
First step: Recast rules to work onterms— one simply has to add a single ruleSTRUCTto allow application of structural congruence on terms.
C
URRENT WORK
(
CONT
.)
N
ORMAL INFERENCESTo specialize the characterization into an algorithm, for mechanicallyfinding
matches, definenormalinferences; kinds of inferences that are
completein the sense that all valid matching sentences can be inferred; and,
suitablerestricted, s.t. inferences can be built mechanically with minimum amount of search.
In particular, normal inference definitions for term matching needs to address preciselyhowandwhereto apply structural congruence.
N
ORMAL INFERENCE VS.
ALGORITHMIC APPROACHEach definition of normal inferences correspond to a differentalgorithmic approachto matching.
F
UTURE
W
ORK
O
N MATCHINGTerm-based matching using normal inferences is
nice— it is firmly based on the theory presented here; and
problematic— the pilot-version, we are currently testing, is horribly inefficient.
Hence, we aim (and hope to be able) to build more efficient methods; while retaining our formal foundation.
Some ideas:
Work with aterm normal formmore suited for matching. Instead of matching links “online” while building an inference, derive a set ofconstraintsfor these.
T
HANK
Y
OU
!
O
UTLINE
1
B
ACKGROUND— B
IGRAPHS2
T
ERML
ANGUAGEExpressing Bigraphs Language
3
N
ORMALF
ORMT
HEOREM(
S)
4
E
QUATIONALT
HEORY5
C
HARACTERIZATION OFM
ATCHINGBackground — Bigraphical Reactive Systems Characterization
Rules — Details
O
UTLINE OF
A
PPENDICES
Term Language Normal Form Rules — Illustrated TheSWITCHrule Proof Method
I
NDUCTIVE
L
ANGUAGE
DETAILS
D
EFINITION(I
NDUCTIVE LANGUAGE FOR BINDING BIGRAPHS)
The smallest set of bigraphs built by three operators —
composition,
tensor product⊗(juxtaposition),
andabstraction(Y)Pof namesY onprimesP;
from the identities on all interfaces and a set of elementary bigraphs. (Details on elementary bigraphs and abstraction — next slides.)
E
LEMENTARY
B
IGRAPHS
PLACINGS
D
EFINITION(2
KINDS OFPLACING)
Merge mergen:hn, ~∅,∅i → h1,[∅],∅i
Permutation π π~X :hm, ~X,Xi → hm, π(X~),Xi
(E
XAMPLES) M
ERGE AND PERMUTATIONmerge3= 0 1 2 {07→2,17→0,27→1}[{x},∅,{y}]= 1 2 0 x x y y Back to overview
T
ERM
C
ONSTANTS
LINKINGS
D
EFINITION(2
BASIC KINDS OFLINKINGS)
Substitutionσ ~y/~X:h0,[ ],Xi → h0,[ ],Yi Closure /X :h0,[ ],Xi →id
(E
XAMPLES) L
INKINGS Plain substitution [y1,y2,y3]/[{x1,x2},{},{x3}] = x1 y1 x2 y2 x3 y3 Renaming α [y1,y2,y3]/[x1,x2,x3] = x1 y1 x2 y2 x3 y3 Closure /{x1,x2,x3}= x 1 x2 x3 (id ⊗/{z,z }) y1 y2E
LEMENTARY
B
IGRAPHS
(
CONT
.)
CONCRETIONS AND IONS
D
EFINITION(
C
ONCRETIONS ANDI
ONS)
Concretion pXq :h1,[X],Xi → h1,[∅],Xi
Ion K~y(~X):h1,(X),Xi → h1,(∅),Yi
(E
XAMPLES) C
ONCRETIONS AND IONSp{x1,x2}q= 0 x1 x1 x2 x2 K[y1,y2]([{x1},{x2,x3},{}])= K y1y2 x1x2x3 Back to overview
O
PERATORS
(
CONT
.)
ABSTRACTION(COMPOSITION AND TENSOR PRODUCT)
(Standard categorical composition and tensor product as defined earlier.)
D
EFINITION(
A
BSTRACTION)
Abstraction (Y)P:I→ h1,[Y],Z]Yi(E
XAMPLE) A
BSTRACTION ({y1,y2})({y3})p{y1,y2,y3,z}q= 0 y1 y1 y2 y2 y3 y3 z zB
IGRAPH
A
—
A MODEL OF AN OFFICE
A=
N
ORMAL
F
ORM
THENAME-DISCRETEVARIANT–FOR THE EQUATIONAL THEORY
We define and prove that four forms of binding bigraph expressions generate all binding bigraphs, and that those forms are unique up to certain specified isomorphisms.
D
EFINITION(B
INDING DISCRETE NORMAL FORM(BDNF))
MDNF M ::= (K~y(~X)⊗idZ)P PDNF P ::= (YB) merge n+k⊗idY Nn ipαiq ⊗Nk i Mi π DDNF D ::= (P0⊗. . .⊗Pn−1)π⊗α BDNF B ::= ω⊗Nn i σbi D More details for each form on the next pages.
N
ORMAL
F
ORM
(
CONT
.)
DETAILS
F
REE DISCRETE MOLECULES—
MDNFAnyfree discrete moleculeM :I→ h1,{~y} ]Zican be expressed as
(K~y(~X)⊗idZ)P
whereP:I→ h1,({X~}),{X~} ]Ziis a name-discrete prime.
This expression isuniqueup to renaming of the local names on the innerface of the ion, and (correspondingly) on the outer face of the primeP.
(For formal details see [Damgaard, Birkedal, ’06].)
N
ORMAL
F
ORM
(
CONT
.)
DETAILS
N
AME-
DISCRETE PRIMES—
PDNFAnyname-discrete primeP:I→ h1,YB,Yican be expressed as
(YB) mergen+k⊗idY(pα0q⊗ · · · ⊗pαn−1q⊗M0⊗ · · · ⊗Mk−1)π
where everyMi :→ hYiMiis a free discrete molecule, and for renamings
αi :→YiC, we haveY = (
U
i∈nYiC)]
U
i∈kYiM.
This expression isuniqueup to reordering of the concretions and molecules, and the ordering of the sites inside the molecules; the permutationπchanges accordingly to preserve the innerface.
N
ORMAL
F
ORM
(
CONT
.)
DETAILS
N
AME-
DISCRETE BIGRAPHS—
DDNFAnyname-discrete bigraphDwith outer widthncan be expressed as
(P0⊗. . .⊗Pn−1)π⊗α
where everyPi is a name-discrete prime,αis a renaming, andπis a
permutation.
This expression isuniqueup to reordering of the the sites inside the primes; the permutationπchanges accordingly to preserve the innerface.
(For formal details see [Damgaard, Birkedal, ’06].)
N
ORMAL
F
ORM
(
CONT
.)
DETAILS
B
IGRAPHS—
BDNFAnybigraphG:I→ hn, ~YB,{Y~B} ]YFican be expressed as
ω⊗ n O i b σi ! D
whereD:I→ hn, ~X,{X~} ]Ziis name-discrete,ω:Z →YFis a (global)
wiring, and eachσbi : (X~i)→(Y~Bi)is a local substitution on the bound names
ofD.
The expression isuniqueup to (local and global) renamings on the innerface of the wiring and (correspondingly) on the outerface ofD.
R
ULES
— I
LLUSTRATED
R
ULES— I
LLUSTRATEDThis section contains illustrated versions of the rules.
R
ULES
— D
ETAILS
PREMISE CLOSE σa, σR,idYR⊗σC`a,R,→C,d σC:→Y]YC σR:→U]YR (id⊗/(YR]YC))σa,(id⊗/YR)σR,(id⊗/YC)σC`a,R,→C,d IfR
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION CLOSE σa, σR,idYR⊗σC`a,R,→C,d σC:→Y]YC σR:→U]YR (id⊗/(YR]YC))σa,(id⊗/YR)σR,(id⊗/YC)σC`a,R,→C,d ThenR
ULES
— D
ETAILS
(
CONT
.)
PREMISE PERM ωa, ωR, ωC`a,Nmi Pπ−1(i),→C,(π⊗id)d ωa, ωR, ωC`a,Nmi Pi ,→Cπ,d IfR
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION PERM ωa, ωR, ωC`a,Nmi Pπ−1(i),→C,(π⊗id)d ωa, ωR, ωC`a,Nmi Pi ,→Cπ,d ThenR
ULES
— D
ETAILS
(
CONT
.)
PREMISE PRODUCT ωa, ωR, ωC||ω`a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e IfR
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION PRODUCT ωa, ωR, ωC||ω`a,R,→C,d ωb, ωS, ωD||ω`b,S,→D,e ωa||ωb, ωR||ωS, ωC||ωD||ω`a⊗b,R⊗S,→C⊗D,d⊗e ThenR
ULES
— D
ETAILS
(
CONT
.)
PREMISE
LSUB σa⊗ωa, ωR, σC⊗ωC`p,R,→P,d σa:Z →W σC:U→W
ωa, ωR, ωC`(σba⊗id)(Z)p,R,→(cσC⊗id)(U)P,d
R
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION
LSUB σa⊗ωa, ωR, σC⊗ωC`p,R,→P,d σa:Z →W σC:U→W
ωa, ωR, ωC`(σba⊗id)(Z)p,R,→(cσC⊗id)(U)P,d
R
ULES
— D
ETAILS
(
CONT
.)
PREMISE
MERGE ωa, ωR, ωC`a,R,→C,d aglobal
ωa, ωR, ωC`(merge⊗id)a,R,→(merge⊗id)C,d
R
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION
MERGE ωa, ωR, ωC`a,R,→C,d aglobal
ωa, ωR, ωC`(merge⊗id)a,R,→(merge⊗id)C,d
R
ULES
— D
ETAILS
(
CONT
.)
PREMISE ION ωa, ωR, ωC`((~v)/(X~)⊗id)p,R,→((~v)/(~Z)⊗id)P,d α=~y/~u σ:{~y} → σ||ωa, ωR, σα||ωC`(K~y(~X)⊗id)p,R,→(K~u(~Z)⊗id)P,d IfR
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION ION ωa, ωR, ωC`((~v)/(X~)⊗id)p,R,→((~v)/(~Z)⊗id)P,d α=~y/~u σ:{~y} → σ||ωa, ωR, σα||ωC`(K~y(~X)⊗id)p,R,→(K~u(~Z)⊗id)P,d ThenR
ULES
— D
ETAILS
(
CONT
.)
PREMISE SWITCH ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P:→ hW]Yi σ:W→U ωa, ωR, ωC`p,(σb⊗id)(W)P,→pUq,d IfR
ULES
— D
ETAILS
(
CONT
.)
CONCLUSION SWITCH ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P:→ hW]Yi σ:W→U ωa, ωR, ωC`p,(σb⊗id)(W)P,→pUq,d ThenT
HE SWITCH RULE
All rules work, intuitively, by comparing structure in the agent and context position
ωa, ωR, ωC`a,R,→C,d.
A single rule,SWITCH, allows us (essentially) toswitchredex structure to the context position, when the context contains only a hole.
SWITCH
ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P :→ hW]Yi σ:W →U ωa, ωR, ωC`p,(bσ⊗id)(W)P ,→pαq,d
Intuitively,SWITCHallows us to
build inferences by initially seeking to match agent and context; and, when reaching aholein the context,switchredex structure to the context position in the matching sentence.
T
HE SWITCH RULE
All rules work, intuitively, by comparing structure in the agent and context position
ωa, ωR, ωC`a,R,→C,d.
A single rule,SWITCH, allows us (essentially) toswitchredex structure to the context position, when the context contains only a hole.
SWITCH
ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P :→ hW]Yi σ:W →U ωa, ωR, ωC`p,(bσ⊗id)(W)P ,→pαq,d
Intuitively,SWITCHallows us to
build inferences by initially seeking to match agent and context; and, when reaching aholein the context,switchredex structure to the context position in the matching sentence.
T
HE SWITCH RULE
All rules work, intuitively, by comparing structure in the agent and context position
ωa, ωR, ωC`a,id,→R,d.
A single rule,SWITCH, allows us (essentially) toswitchredex structure to the context position, when the context contains only a hole.
SWITCH
ωa,id, ωC(σ⊗ωR⊗id)`p,id,→P,d P :→ hW]Yi σ:W →U ωa, ωR, ωC`p,(bσ⊗id)(W)P ,→pαq,d
Intuitively,SWITCHallows us to
P
ROOF
M
ETHOD
(C
OMPLETENESS
)
D
EFINITIONThe size of a matching sentenceωa, ωR, ωC`a,R,→C,dis the number of ions ina.
P
ROOF METHODEstablish a series of lemmas that express how a valid sentence may be derived by applications of inference rules to valid sentences of lesser or equal size.
Use normal form theorems to help
I decompose components of given valid sentence; and,
I verify that the claimed valid sentences, do exist.
— in particular, unicity results for normal form theorems yield a number of equalities for decomposed parts, which help here.
Lemmas and main theorem on following pages.
P
ROOF
M
ETHOD
(C
OMPLETENESS
) (
CONT
.)
L
EMMA(1)
Every valid sentenceωa, ωR, ωCa,R,→C,d is provable using theCLOSE and thePERMrule on a valid sentence, of equal size, of the form
σa, σR, σCa,S,→Nni Pi,e.
L
EMMA(2)
Every valid sentenceσa, σR, σCa,R,→P⊗Nni Pi,d , with P and Pi prime
and discrete, is provable using thePRODUCTrule on valid sentences, of lesser or equal size, of the formσP
a, σPR, σPC||σCS p,S,→P,e and σaC, σRC, σCC||σCSa0,R0,→Nn
P
ROOF
M
ETHOD
(C
OMPLETENESS
) (
CONT
.)
L
EMMA(3)
Every valid sentenceσa, σR, σCa,R,→id,d is provable usingPRODUCT
andWIRING-AXIOM.
L
EMMA(4)
Every valid sentenceωa, ωR, ωCp,R,→P,d , with p and P prime and discrete, is provable using theLSUBrule on a valid sentence, of lesser or equal size, of the formω0a, ωR0, ωC0 p0,R,→P0,d , where p0and P0are discrete free primes.
P
ROOF
M
ETHOD
(C
OMPLETENESS
) (
CONT
.)
L
EMMA(5)
Every valid sentenceσa, σR, σCp,R,→P,d , with p and P discrete and free primes, is provable usingMERGE,PRODUCT(iterated), andSWITCHrules on valid sentences, each of lesser or equal size, and each on one of two forms:
σa0, σR0, σC0 pN,id,→PN,e, where pnand PNare free discrete primes,
σa0, σR0, σC0 m,S,→M,e, where m and M are free discrete molecules.
L
EMMA(6)
Every valid sentenceσa, σR, σCm,R,→M,d , with m and M free discrete molecules, is provable using theIONrule on a valid sentence
σa0, σR0, σC0 p,R,→P,d , of lesser size, where p and P are discrete primes.
P
ROOF
M
ETHOD
(C
OMPLETENESS
) (
CONT
.)
T
HEOREMThe rules for matching are complete, that is, any valid matching sentence can be derived from the rules.
P
ROOF.
By induction on the size of a sentence. By the lemmas above, we have that all valid sentences with sizencan be derived from valid sentences of the form σa, σR, σCm,R,→M,d, withmandM free discrete molecules, of size less than or equal ton. By Lemma 6, these can be derived from sentences of size less thann.