process algebra (2if45) basic notions of equational theory
DESCRIPTION
Process Algebra (2IF45) Basic notions of Equational theory. Dr. Suzana Andova. Deduction system for “Counting down”. Language (signature) 0 “zero ” s (_) “ successor function” a (_, _) “ addition” m (_, _) “ multiplication”. Deduction rules. 0 . . . . . - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/1.jpg)
Process Algebra (2IF45)
Basic notions of Equational theory
Dr. Suzana Andova
![Page 2: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/2.jpg)
2
Deduction system for “Counting down”
Process Algebra (2IF45)
Language (signature)
0 “zero”
s(_) “successor function”
a(_, _) “addition”
m(_, _) “multiplication”
s(s(0))
s(0)
0
1
1
0
1
1
y y’
a(x,y) a(x, y’)
s(x) x1
1
1 x x’ , y a(x,y) x’
x, y a(x,y)
Deduction rules
Terms s(s(0))
a(s(0),s(0))
a(s(0),0)
0
1
1
Terms a(s(0),s(0))
![Page 3: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/3.jpg)
3
Deduction system for “Counting down”
Process Algebra (2IF45)
Language (signature)
0 “zero”
s(_) “successor function”
a(_, _) “addition”
m(_, _) “multiplication”
s(s(0))
s(0)
0
1
1
0
1
1
y y’
a(x,y) a(x, y’)
s(x) x1
1
1 x x’ , y a(x,y) x’
x, y a(x,y)
Deduction rules
Terms s(s(0))
a(s(0),s(0))
a(s(0),0)
0
1
1
Terms a(s(0),s(0))
specification
dynamic behaviour
equivalent behaviours
equal specification
![Page 4: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/4.jpg)
4
Deduction system vs. Equational theory
Process Algebra (2IF45)
Language (signature) 0 “zero”
s(_) “successor function”
a(_, _) “addition”
0
1
1 y y’ a(x,y) a(x, y’)
s(x) x1
1
1 x x’ , y a(x,y) x’
x, y a(x,y)
Deduction rules
Terms e.g. a(s(0),s(0)), 0,. a(x,y)
s(s(0))
s(0)
0
1
1
a(s(0),s(0))
a(s(0),0)
0
1
1
Equivalence relation
Equalities on terms
…├ a(s(0),s(0)) = s(s(0))
![Page 5: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/5.jpg)
5 Process Algebra (2IF45)
componts’ specifications
Equational theory
the whole system specification
the state space
reductionon specification
reductionon specification
reductionon LTSs
composition by axiom
SOS rules
• simpler• smaller• in a particular form (basic)• …
![Page 6: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/6.jpg)
6
Example: Towards Equational theory for Arithmetic of Natural numbers P(eano) A(rith.)
Process Algebra (2IF45)
a(0,s(0))
0
1
s(0)
0
1
So we need a set of axioms from which we can derive:
PA ├ a(0,s(0)) = …..= s(0) and also PA ├ a(0,0) = …..= 0 and also …..
a(0,0) 0
1. Maybe axioms
(Ax11) a(0,s(0)) = s(0)(Ax12) a(0,0) = 0
2. Maybe axioms
(Ax21) a(0,s(x)) = s(x)(Ax22) a(0,0) = 0
3. Maybe axioms
(Ax31) a(0,y) = y
![Page 7: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/7.jpg)
7
Example: Towards Equational theory for Arithmetic of Natural numbers PA (cont.)
Process Algebra (2IF45)
a(0,s(0))
0
1
s(a(0,0))
0
1
So we need a set of axioms from which we can derive:
PA ├ a(0,s(0)) = …..= s(a(0,0)) and also PA ├ a(s(0),s(0)) = …..= s(s(0)) …..
1’. Maybe axioms
(Ax11) a(s(0),s(0)) = s(s(0))(Ax12) a(0,s(0)) = s(0)
2’. Maybe axioms
(Ax21) a(s(x),s(y)) = s(s(a(x,y)))
3’. Maybe axioms
(Ax31) a(x,s(y)) = s(a(x,y))(Ax32) a(s(x),y) = s(a(x,y))
![Page 8: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/8.jpg)
8
Example: Towards Equational theory for Arithmetic of Natural numbers PA (cont.)
Process Algebra (2IF45)
(Ax11) a(s(0),s(0)) = s(s(0))(Ax12) a(0,s(0)) = s(0)
(Ax21) a(s(x),s(y)) = s(s(a(x,y)))
(Ax31) a(x,s(y)) = s(a(x,y))(Ax32) a(s(x),y) = s(a(x,y))
1. Maybe axioms
(Ax11) a(0,s(0)) = s(0)(Ax12) a(0,0) = 0
2. Maybe axioms
(Ax21) a(0,s(x)) = s(x)(Ax22) a(0,0) = 0
3. Maybe axioms
(Ax31) a(0,y) = ynot generalinfinite
![Page 9: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/9.jpg)
9
Example: Towards Equational theory for Arithmetic of Natural numbers PA (cont.)
Process Algebra (2IF45)
(Ax11) a(s(0),s(0)) = s(s(0))(Ax12) a(0,s(0)) = s(0)
(Ax21) a(s(x),s(y)) = s(s(a(x,y)))
(Ax31) a(x,s(y)) = s(a(x,y))(Ax32) a(s(x),y) = s(a(x,y))
1. Maybe axioms
(Ax11) a(0,s(0)) = s(0)(Ax12) a(0,0) = 0
2. Maybe axioms
(Ax21) a(0,s(x)) = s(x)(Ax22) a(0,0) = 0
3. Maybe axioms
(Ax31) a(0,y) = ynot generalinfinite
inst
ance
of
![Page 10: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/10.jpg)
10
Example: Towards Equational theory for Arithmetic of Natural numbers PA (cont.)
Process Algebra (2IF45)
(Ax11) a(s(0),s(0)) = s(s(0))(Ax12) a(0,s(0)) = s(0)
(Ax21) a(s(x),s(y)) = s(s(a(x,y)))
(Ax31) a(x,s(y)) = s(a(x,y))(Ax32) a(s(x),y) = s(a(x,y))
1. Maybe axioms
(Ax11) a(0,s(0)) = s(0)(Ax12) a(0,0) = 0
3. Maybe axioms
(Ax31) a(0,y) = ynot generalinfinite
3. Maybe axioms
(Ax31) a(0,y) = y
? but can we derive here
a(s(x),0) = s(x) ?
![Page 11: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/11.jpg)
11
Example: Equational theory for Arithmetic of Natural numbers PA (cont.)
Process Algebra (2IF45)
(Ax31) a(x,s(y)) = s(a(x,y))(Ax32) a(s(x),y) = s(a(x,y))
3. Maybe axioms
(Ax31) a(0,y) = y
Axioms in PA
(PA1) a(x,0) = x(PA2) a(x,s(y)) = s(a(x,y))
![Page 12: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/12.jpg)
12
Equational Theory
Process Algebra (2IF45)
Question: • What did we have to take into account during our quest for the right set of axioms?
Answer: • Consistency between
bisimulation and
derivation in PA using the axioms
![Page 13: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/13.jpg)
13
Consistency
Process Algebra (2IF45)
Questions: • How do you understand “consistency” between the deduction system (semantics) and the equational theory?
Answer: • Consistency is two-directional
1. Everything that I am able to derive equal using the axioms must be bisimilar, namely
if PA ├ t = r then t r
2. Everything that I can show bisimilar, I have to be able to derive equial using the axioms, namely
if t r then PA ├ t = r
soundness
completeness
![Page 14: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/14.jpg)
14
Consistency
Process Algebra (2IF45)
Questions: • How do you understand “consistency” between the deduction system (semantics) and the equational theory?
Answer: • Consistency is two-directional
1. Everything that I am able to derive equal using the axiomsmust be bisimilar, namely
if PA ├ t = r then t r
2. Every closed terms that I can show bisimilar, I have to be able to derive equial using the axioms, namely
if t r then PA ├ t = r, for t and r closed terms
soundness
ground completeness
![Page 15: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/15.jpg)
15
Prerequisites for soundness of axioms
Process Algebra (2IF45)
Questions:• Are we on a safe ground now?
Soundness: Everything that I am able to derive equal using the axioms must be bisimilar, namely
if PA ├ t = r then t r
![Page 16: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/16.jpg)
16
Derivation in equational theory
Process Algebra (2IF45)
Questions:• What is allowed (can be used) in derivation?
PA ├ t = r
1.Axioms (as ‘basic’ equalities)
2.Properties of = such as• reflexivity PA ├ t = t • symmetry if PA ├ t = r then PA ├ r = t • transitivity if PA ├ t = r and PA ├ r = u then PA ├ t = u
3.Substitution (substituting variables by terms)e.g. from PA ├ a(x,y) = a(y,x) follows PA ├ a(s(0),0) = a(0, s(0)) where s(0)/x and 0/y
4.Context rule
![Page 17: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/17.jpg)
17
Derivation in equational theory
Process Algebra (2IF45)
Questions:• What is allowed (can be used) in derivation?
PA ├ t = r
4.Context rulee.g. if PA ├ t1 = r1 and PA ├ t2 = r2
then PA├ s(t1) = s(r1) and also PA├ a(t1 ,t2) = a(r1, r2) …
‘Mapping’ the context rule back to semantics and
e.g. if PA ├ t1 r1 and PA ├ t2 r2
then PA├ s(t1) s(r1)
and also PA├ a(t1 ,t2) a(r1, r2) …
![Page 18: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/18.jpg)
18
Prerequisites for soundness
Process Algebra (2IF45)
‘Mapping’ the context rule back to semantics and
e.g. if t1 r1 and t2 r2
then s(t1) s(r1)
and also a(t1 ,t2) a(r1, r2) …
a(0,s(0))
0
1
s(a(0,0))
0
1
Sincethen
a(0,s(0))
0
1
s(a(0,0))
0
1
s(a(0,s(0)))
1
s(s(a(0,0)))
1
congruence
![Page 19: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/19.jpg)
19
Prerequisites for soundnessCongruence relation
Process Algebra (2IF45)
Congruence relation1. it is equivalence relation
• reflexive• symmetric• transitive
2. it is preserved by any context C[ _ ]
if t1 r1 then C[t1] C[r1]
Examples: Bisimilarity is congruence on the set of all terms
![Page 20: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/20.jpg)
20 Process Algebra (2IF45)
Prerequisites for soundnessCongruence relation
!tea !coffee
?coin
!tea !coffee
?coin ?coin
complete trace equivalent LTSs {?coin !coffee, ?coin !tea}
put in the context “communicate with the User”
!coin ?coffee
coin
coffee coffee
coin coin
NOT complete trace equivalent LTSs {coin coffee} vs. {coin coffee, coin}
![Page 21: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/21.jpg)
21
Towards ground completeness
Process Algebra (2IF45)
Questions:• Is the set of axioms in PA (PA1) a(x,0) = x
(PA2) a(x,s(y)) = s(a(x,y))ground complete wrt the derivation rules and ?
Every closed terms that I can show bisimilar, I have to be able to derive equal using the axioms, namely
if t r then PA ├ t = r, for t and r closed terms
• What about PA ├ a(t,r) = a(r,t)? Can we derive this equality from the two axioms, for closed terms t and r?
![Page 22: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/22.jpg)
22
Towards ground completeness
Process Algebra (2IF45)
Working with closed terms: 1. Basic terms
• defined in a structural way, such as: I. 0 is a basic term in PAII. if t is a basic term in PA then s(t) is also a basic term in
PA• Thus, in PA basic terms are 0, s(0), s(s(0)), ….
2. Elimination of ‘other’ operators from the signature• In PA every closed term can be rewritten to a basic term, e.g.
PA ├ a(s(0),a(s(0),0)) = s(s(0))
• the elimination proof goes by structural induction on the structure on closed terms
3.Any property on closed terms can be proven by structural induction on basic terms only instead on all closed terms
![Page 23: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/23.jpg)
23
Towards ground completeness
Process Algebra (2IF45)
Property1: For any closed term t, PA ├ a(0, t) = t.
Proof: By structural induction on basic terms (knowing the elimination property)
Basic step t 0. Directly from PA1
Inductive step t s(t’) for some basic term t’. DerivePA ├ a(0, t) = a(0, s(t’)) = s(a(0,t’)) = s(t’) = t
PA2 by induction
![Page 24: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/24.jpg)
24
Towards ground completeness
Process Algebra (2IF45)
Property2: For any closed term t and r, PA ├ a(s(t), r) = a(t, s(r)).
Proof: By structural induction on basic terms (knowing the elimination property)
Basic step r 0. PA ├ a(s(t), r) = a(s(t), 0) = s(t) by axiom PA1PA ├ a(t, s(r)) = a(t, s(0)) = s(a(t, 0)) = s(t) by PA2 and PA1
Inductive step r s(r’) for some basic term r’. DerivePA ├ a(s(t), r) = a(s(t), s(r’)) = s( a(s(t), r’) ) = s( a(t, s(r’)) )
= a( t, s(s(r’)) ) = a(t, s(r))
PA2 by induction
PA2
![Page 25: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/25.jpg)
25
Towards ground completeness
Process Algebra (2IF45)
Property3: For any closed term t and r, PA ├ a(t, r) = a(r, t).
Proof: Home Work
![Page 26: Process Algebra (2IF45) Basic notions of Equational theory](https://reader033.vdocument.in/reader033/viewer/2022051115/568143fc550346895db09104/html5/thumbnails/26.jpg)
Process Algebra (2IF45)
Basic Process Algebra
Dr. Suzana Andova