Equivalence to solving Boolean equation systems For the case of innite state spaces we introduced innite Boolean
A.1 Proofs of Chapter 3.
Proposition 3.5 The solution of [] is .
The solution of [(X =f)E] is the lexicographically least
(w.r.t (X =f)E) environment 1 satisfying:
(1) f(1) = 1(X) and
(2) 1 is the solution of [E][X =1(X)].
Proof: Assume that = . The case = is dually. (3) 1 = [E][X=1(X)] from (2)
(4) 1(X) = f([E] [X =1(X)]) from (1)
(5) 1(X) T
fajaf([E] [X=a])g from (3) and (4)
on the other hand for (6) 0 1 def = [E][X =X:f([E])] (7) f(0 1) = 0 1(X) (8) 0
1(X) 1(X) 1 is lex. least env.
fullling (1) and (2)
(9) 1(X) = X:f([E])] from (5) and (8)
Corollary 3.7If [E] = 0 then [
E(i)]
0= 0 for 1
in.
Proof: Follows directly from proposition 3.5
Proposition 3.9 Let X:f be a xpoint expression over a lattice (A;)
and an arbitrary environment. Then (X:f)() = ([
E
(X:f)])(X).Proof: For the proof of this proposition we need a property of Boolean equation systems concerning the independence of equations with dif- ferent variables.
Lemma 3.10 LetE1andE2 be xpoint-equation systems, such that lhs(E1)\lhs(E2) =;,
lhs(E1)\rhs(E2) =;, lhs(E2)\rhs(E1) =;.
Then [E1][E2] = [E1E2].
The proof of proposition 3.9 is now by induction on the structure of
E.
Assume X:f is an unnested expression, i.e.
E
(X:f) = X:f, andan environment.
([X:f])(X) = ([][X=X:f([])])(X) = ( [X=X:f()])(X) = (X:f)()
The same holds for unnested X:f
Now assume that 1X1:f1;:::;lXl:fl are the direct xpoint sub-
formulae of X:f (and by assumption the names of variables in xpoint expressions are unique, such that X1 does not occur in
2X2:f2;:::;lXl:fletc.). Furthermore let for 1il and SA
[
E
(iXi:fi)] [X=S] def = [Ei] [X=S] = (iXi:fi)([X=S]) ([X:f])(X) = ([(X:E
0(f))E
( 1X1:f1):::E
(lXl:fl)] )(X) = ([(X:E
0(f)) E1:::El] )(X) = ([E1:::El] [X=X:(E
0(f)([ E1:::El]))])(X)A.1. Proofs of Chapter 3. 147 = X:(
E
0(f)([ E1:::El])) ( lemma 3.10) = X:(E
0(f)([ E1]:::[El]) = X:(E
0(f)( [X 1=1X1:f1;:::;lXl:fl)) = (X:f)()Again the same holds for nested X:f.
Lemma 3.11 If 12 then [E]1[E]2.
Proof: by induction.
For all 1 2 it is the case that []1= 1 2 = []2.
induction hypothesis: Assume that for all 12it is [E]1[E]2.
induction step: [E]1 [E]2 X:f([E]1) X:f([E]2) (f and X : are monotone) 1[X=X:f([E]1)] 2[X=X:f([E]1)] ( denition of) [E]1[X=X:f([E]1)] [E]2[X=X:f([E]1)] (ind. hyp.) [(X =f)E]1 [(X =f)E]2 (denition of semantics) Lemma 3.14 IfE1E2 thenEE1EE2. If E1-E2 thenEE1-EE2.
Proof: For the second part we show [(X =f)E1][(X =f)E2].
The lemma as stated follows then from iterative application of the weaker statement.
[(X =f)E1] = [E1] [X=X:f([E1])] [E1] [X=X:f([E2])] [E2] [X=X:f([E2])]
= [(X =f)E2] :
Lemma 3.16 IfE1E2 then alsoE1-E2
Proof: by structural induction Assume f g. Then
[X =f] = [X=(X:f)()]
[X=(X:g)()]
= [X =g]
Assume f g andE1E2 with [E1][E2].
[(X =f)E1] = [E1] [X=X:f([E1])] [E1] [X=X:g([E1])] [E1] [X=X:g([E2])] [E2] [X=X:g([E2])] = [(X =g)E2] Lemma 3.18 If ([(X =f)E])(X) = ([(X =g) E])(X) then [(X =f)E] = [(X =g)E]:
Proof: Follows directly from proposition 3.5.
Lemma 3.19 Let E E1 (X =f)E2, ([E])(X) = a, and E 0 E1 (X =a)E2. Then [E] = [E 0] .
Proof: Note that here we can not simply apply proposition 3.5 or lemma 3.14, because the equivalence [(X =f)E2] = [(X =a)E2]
does not hold for all environments .
The proof is done by contradiction. We assume that for [E 0]
def
= 0
1 it
is 0
1 6= 1 and derive an innite number of subsystems ofE andE 0,
A.1. Proofs of Chapter 3. 149
1 and 0
1 coincide in all variables which are not bound in E, or E 0
respectively. Let n be the number of equations ofE. For all i, 1in
holds, [E(i)]1= 1.
Now choose the rst variable Y of var(E) (rst with respect to the
order of equations in E), for which holds 1(Y ) 6= 0
1(Y ), such that
for all previous variables 1 and 0
1 coincide. Fix the i such that
E(i)(iY = g)E(i+1), andE 0(i) (iY = g)E 0(i+1). 1 = [E(i)]1 = [(iY =g)E(i+1)]1 = [E(i+1)] 1[Y=iY:g([E(i+1)]1)] 0 1 = [E 0(i)] 1 = [(iY =g)E 0(i+1)] 1 = [E 0(i+1)] 1[Y=iY:g([E 0(i+1)] 1)] Hence, because 1(Y )6= 0 1(Y ) also iY:g([E(i+1)]1)]6= iY:g([E 0(i+1)] 1)], and therefore [E(i+1)]16= [E 0(i+1)] 1 def = 00 1
On the other hand still 1(X) = a and also 00
1(X) = a. Therefore we
can apply the same argumentation toE(i+1), 1,E
0(i+1)and 00
1, and so
on. Altogether we can derive that there must be an innite number of subsystemsE(i)andE
0(i)having dierent solutions relative to
1.
Lemma 3.20 [E1 (X = a)E2] = [E1 E2] [X=a].
Proof: For all environments we have [(X =a)E2] = [E2] [X=a].
For someE;E
0and all environments let [
E] = [E 0] [X=a]. Then [(Y =f) E] = [E][Y=Y:f([E])] = [E 0] [X=a][Y=Y:f([ E 0] [X=a])] = [(Y =f) E 0] [X=a]:
Lemma 3.21 Let 1 def = [E1(X1=f1) (X2=f2)E2], and 2 def = [E1(X2=f2) (X1=f1)E2]. Then 1= 2.
Proof: follows from Bekic's theorem and the transformation from nested xpoints to xpoint-equation systems in proposition 3.9.
Lemma 3.22 If X1 is not free in f2, X2 is not free in f1, 1 def = [E1(1X1=f1) (2X2=f2)E2] 2 def = [E1(2X2=f2) (1X1=f1)E2] Then 1= 2.
Proof: Straightforward application of the denition of the semantics shows that
[(1X1=f1) (2X2=f2)E2] = (2X2=f2) (1X1=f1)E2]
for all environments . Then lemma 3.14 can be applied.
Lemma 3.23 Let 1 def = [E1(X1=f1) (X2=f2)E2] , and 2 def = [E1(X2=f2) (X1=f1)E2] .
Then it is 1 2, and moreover, if the inequality is strict then
1(X1) < 2(X1) and 1(X2) < 2(X2).
Proof: According to lemma 3.14 it suces for the rst part of the proposition to show that for all environments it is
[(X1=f1) (X2=f2)E2] [(X2=f2) (X1=f1)E2] . Let [(X1=f1) (X2=f2)E2] def = 0 1. We know that f2( 0 1) = 0 1(X2) (proposition 3.5), [(X1=f1)E2] 0 1= 0 1 (lemmata 3.19, 3.20)
Due to proposition 3.5 these are the two properties which the solution 0
A.1. Proofs of Chapter 3. 151
solution 0
2 is the lexicographic least one of those environments 0
having these properties. Hence the solution 0
2 is lexicographically
lower or equal to 1, i.e. 0
2(X2) 0
1(X2).
If 0
2(X2) = 0
1(X2) then applying lemmata 3.19, 3.20 shows that both
solutions must be equal. 0 1 = [(X1=f1) (X2=f2)E2] = [(X1=f1)E2] [X2= 0 1(X2)] = [(X1=f1)E2] [X2= 0 2(X2)] = [(X2=f2) (X1=f1)E2] : If 0 2(X2) > 0 1(X2) then 0 2 0 1 and [X2=0 2(X2)] > [X2=0 1(X2)]
and with lemma 3.11 also 0 2 = [(X1=f1)E2] [X2= 0 2(X2)] [(X1=f1)E2] [X2= 0 1(X2)] = 0 1: Lemma 3.24 Let 1 def = [E1(X =f)E2], and 2 def = [E1(X =f) E2].
Then it is 1 2, and moreover, if the inequality is strict then
1(X) < 2(X).
Proof: In order to prove the rst part of the lemma and according to lemma 3.14 it suces to show that [(X =f)E2][(X=f)E2].
[(X =f)E2] = [E2] [X=X0:f([E2] [X=X0])] [E2] [X=X0:f([E2] [X=X0])]
= [(X=f)E2] :
For the second part of the lemma assume that the solutions coincide at X and show that then they must be identical. Substitute the solution 1(X) = 2(X) = a in the equation systems due to lemma 3.19 and
[E1 (X =f)E2] = [E1(X =a) E2] = [E1E2] [X=a] = [E1(X =a)E2] = [E1(X =f) E2]: Lemma 3.25 ([(X =f1^f2)E])(Y ) = ([(X =f1^X 0) (0X0=f 2)E])(Y ), ([(X =f1_f2)E])(Y ) = ([(X =f1_X 0) (0X0=f 2)E])(Y ),
where X0 is a new variable, i.e. (*) X0 does not occur on the right
hand side ofE or in f1 or f2, and (**) Y 6= X 0.
Proof: by straightforward application of the denition of the seman- tics. ([(X =f1^X 0) (0X0=f 2)E])(Y ) = ([(0X0=f 2)E][X=X:(f1^X 0)([(0X0=f 2)E])])(Y ) = ([(0X0=f 2)E] [X=X:(f1([(0X0=f 2)E])^X 0([(0X0=f 2)E]))])(Y ) = ([(0X0=f 2)E] [X=X:(f1([E][X 0=:::]) ^X 0([ E][X 0=0X0:f 2([E])]))])(Y ) = ([(0X0=f 2)E][X=X:(f1([E])^ 0X0:f 2([E]))])(Y ) = ([(0X0=f 2)E][X=X:(f1([E])^f2([E]))])(Y ) () = ([(0X0=f 2)E][X=X:(f1^f2)([E])])(Y ) () = ([E][X=X:(f1^f2)([E])][X 0=:::])(Y ) = ([E][X=X:(f1^f2)([E])](Y ) ()() = ([(X =f1^f2)E])(Y )
The proof for _is analogous.
Lemma 3.26 Let 1 def = [E1(X1=f) (X2=f)E2] 0 2 def = [E1[X1=X2] (X2=f[X1=X2])E2[X1=X2]] 2 def = 0 2[X1=0 2(X2)] Then 1= 2.
A.1. Proofs of Chapter 3. 153
Proof: We will show the lemma for the case of = . The other case of = is dual. Moreover the proof is done for E1 . The
generalization to arbitrary E1 follows then by lemma 3.14 and 3.19.
For the proof here the alternative characterization of the solution of a xpoint-equation system in proposition 3.5 turned out to be more suitable. Show that 2 1: (1) 1(X1) = 1(X2) proposition 3.5 (2) 1(X2) = f(1) proposition 3.5 (3) [E2[X1=X2]]1 = [E2]1 (1),(2), proposition 3.5 (4) [E2]1 = 1 corollary 3.7
Hence, with proposition 3.5, it is 21.
Show that 1 2: (1) [E2[X1=X2]]2 = 2 proposition 3.5 (2) 2(X1) = 2(X2) by denition (3) [E2]2 = 2 (1),(2), lemma 3.19 (4) f(2) = 2(X2) proposition 3.5 (5) [(X2=f)E2]2 2 (3), (4), proposition 3.5 (6) f([(X2=f)E2]2) f(2) (5), monotonicity off (7) X1:f([(X2=f)E2]2) 2(X1) (2), (4), (6), Theo. 2.16 (8) 1(X1) 2(X1) (7) (9) [(X2=f)E2]1 [(X2=f)E2]2 (8) & proposition 3.11 (10) 1= [(X2=f)E2]1 2 (9), (5), prop 3.5
Proposition 3.30 Let E be a Boolean equation system, X = f a
Boolean equation, an environment, b =false and b =true. Then
for the solution of a Boolean equation system holds: [[]] =
[[(X=f)E]] = [[E]][X =f([[E]][X=b])].
Proposition 3.31 For each Boolean equation systemE there exists a
Boolean equation systemE
0in standard form and a renaming function
, such that ([[E]])(X) = ([[E
0]])((X)), and E
0has size linear in the
size ofE.
Proof: The transformation from a Boolean equation system E into
standard form is performed by introduction of additional variables (proposition 3.25). The number of additional variables is linear in the size of the right-hand side expressions of E. The size of the right-
hand side expressions of E
0 is linear in the size of the right-hand side
expressions ofE. Renaming does not in uence the size.
Lemma 3.35 ([[E]])(X) =falsei ([[E]])(X) =true.
Proof: by induction on the structure ofE
([[]])(X) = (X) = (X) = ([[]])(X) = ([[]])(X)
induction hypothesis: ([[E]])(X) = ([[E]])(X)
Show ([[(Y =f) E]])(X) = ([[(Y =f)E]])(X)
([[(Y =f)E]])(X)
= ([[E]][Y=f([[E]][Y=false])])(X) denition of semantics
= ([[E]][Y=f([[E]][Y=false])])(X) induction hypothesis
= ([[E]][Y=f([[E]][Y=false])])(X) complementation of
= ([[E]][Y=f([[E]][Y=false])])(X) de Morgan
= [[E]][Y=f([[E]][Y=false])])(X) induction hypothesis
= [[E]][Y=f([[E]][Y=true])(X) complementation of
A.1. Proofs of Chapter 3. 155
Proposition 3.36 Given a Boolean equation system E and an envi-
ronment there exist Boolean equation systems E 0 and E 00 with the properties: E 0is in conjunctive form, E 0 E, and [[E 0]] = [[ E]]. ForE
00 the dual properties hold: E 00is in disjunctive form, E 00 E, and [[E 00]] = [[ E]].
For the proof of this proposition we need lemmata A.1 and A.2.
Lemma A.1
Given Boolean equation systems E;E1;E2 with theproperties:
(1) E1;E2are in conjunctive form,
(2) E1E,E2E,
(3) [[E1]] [X=false] = [[E]][X=false],
(4) [[E2]] [X=true] = [[E]][X=true].
Then there exists a Boolean equation systemE3in conjunctive form,
such thatE3E and
[[E3]][X=false] = [[E]][X=false], [[E3]][X=true] = [[E]][X=true].
Proof: Assume
E1= (1X1=f1):::(nXn=fn) and E2= (1X1=g1):::(nXn=gn).
Let iXi=fi be an equation of E3, if ([[E1]][X=false])(Xi) =true and
iXi=gi, if ([[E1]] [X=false])(Xi) =false.
By construction ofE3follows
(5) [[E1]] [X=false][[E3]][X=false],
(6) E3E, and
From (3), (5), (6) and proposition 3.16 follows that [[E3]] [X=false] = [[E]][X=false].
We also know that [[E2]][X=true] [[E3]] [X=true], because at the
variables whereE2 andE3dier E3has the solutiontruefor [X=false]
and hence also for [X=true].
With (4) and (6) follows that [[E3]] [X=true] = [[E]][X=true].
Lemma A.2
Given Boolean equation systems E;E1;E2 with theproperties:
(1) E1;E2are in disjunctive form,
(2) E1E,E2E,
(3) [[E1]] [X=false] = [[E]][X=false],
(4) [[E2]] [X=true] = [[E]][X=true].
Then there exists a Boolean equation systemE3in disjunctive form,
such thatE3E and
[[E3]][X=false] = [[E]][X=false], [[E3]][X=true] = [[E]][X=true].
Proofanalogous to the proof of lemma A.1
Proofof proposition 3.36: by induction
Here we assume that the Boolean equation system is in normal form, i.e. each right hand side expression is either a conjunction or a disjunc- tion of two variables. Then we have to investigate the equations which have a disjunction as right hand side and show that we can select one of the disjuncts preserving the solution.
[[X=(Xi_Xj)]] = [X=(Xi_Xj)( [X=b])] = [X= [X=b](Xi)_ [X=b](Xj)] = [X= [X=b](Xi)] ( if (Xi_Xj)( 0) = true then assume wlogXi(
0) = true)
A.1. Proofs of Chapter 3. 157
Now assume that forE; there existsE1 such that [[E]] = [[E1]]. Let
1 def
= [X=b]
2 def
= [X=(Xi_Xj) ([[E]][X=b])]
3 def
= [X=b]; wheretrue=falseandfalse=true
[[(X=Xi_Xj)E]] = [[E]] [X=(Xi_Xj)([[E]][X=b])]
= [[E]] [X=(Xi_Xj)([[E]]1)]
= [[E]]2
= ()
We have to consider two cases:
(i) (Xi_Xj)([[E]]1) = b, and hence 1= 2. Then there existsE1
such that [[E]]i= [[E1]]i for i = 1;2.
() = [[E1]] [X=(Xi_Xj)([[E1]][X=b])]
= [[E1]] [X=(Xi)([[E1]][X=b])] ( as in the base case:
choose a disjunct which gives the correct result)
= [[(X=Xi)E1]]
(ii) (Xi_Xj)([[E]]1)6= b, and hence 2 = 3. Now there exists a
dierent equation system for either i, E1 with [[E]]1= [[E1]]1
andE3 with [[E]]3= [[E3]]3.
Then due to proposition A.1 there existsE4with [[E4]]1= [[E]]1
and [[E4]]3= [[E]]3. Hence
() = [[E4]] [X=(Xi_Xj)([[E4]][X=b])]
= [[E4]] [X=(Xi)([[E4]][X=b])] (again choose a suitable disjunct)
= [[(X=Xi)E4]]:
The proof for the dual fact, that there exists a conjunctive system which has the same solution asE works analogously.