4 Completeness of CKA
4.1 Preclosure
To get to a closure of a parallel composition, we first need an operator on terms that is not a closure quite yet, but whoseBKA-semantics is “closed enough” to cover the non-sequential elements of theCKA-semantics of the term.
Definition 4.2. Lete∈ T. Apreclosureofeis a terme˜∈ T such that˜e≡CKAe.
Moreover, if U ∈eCKA is non-sequential, thenU ∈˜eBKA.
Example 4.2. Suppose thate0e1= (ab)c. A preclosure ofe0e1could be
˜
e=abc+ (a·b+b·a)c+ (b·c+c·b)a+ (a·c+c·a)b To verify this, note thateCKA˜eby construction; remains to show that ˜eCKAe.
This is fairly straightforward: sincea·b+b·aCKAab, we have (a·b+b·a)cCKA
e; the other terms are treated similarly. Consequently, e ≡CKA ˜e. Furthermore, there are seven non-sequential pomsets ineCKA; they are
abc abc bac bca cba acb cab Each of these pomsets is found in˜eBKA. It should be noted that ˜eisnota closure ofe; to see this, consider for instance thatabc∈eCKA, whileabc∈˜eBKA.
The remainder of this section is dedicated to showing that, under the induc- tion hypothesis, we can construct a preclosure for any parallelly composed term.
This is not perfectly straightforward; for instance, consider the terme0e1dis- cussed in Example4.2. At first glance, one might be tempted to choosee0↓ e1↓ as a preclosure, sincee0↓ande1↓exist by the induction hypothesis. In that case, e0↓=ab+a·b+b·ais a closure ofe0. Furthermore,e1↓=cis a closure ofe1, by Lemma4.2. However, e0↓ e1↓ is not a preclosure ofe0e1, since (a·c)b is non-sequential and found in e0e1CKA, but not ine0↓ e1↓BKA.
The problem is that the preclosure of e0 and e1 should also allow (partial) sequentialisation of parallel parts ofe0 and e1; in this case, we need to sequen- tialise the a part of a b with c, and leave b untouched. To do so, we need to be able to split e0 e1 into pairs of constituent terms, each of which rep- resents a possible way to divvy up its parallel parts. For instance, we can split e0e1= (ab)c parallelly intoabandc, but also intoaandbc, or into acand b. The definition below formalises this procedure.
Definition 4.3. Let e∈ T;Δe is the smallest relation on T such that
1Δee eΔe1
Δe0 r Δe1+e0 r
Δe1 r Δe0+e1r
Δer Δe r Δe0 r (e1) = 1
Δe0·e1 r
Δe1 r (e0) = 1 Δe0·e1r
0Δe0 r0 1Δe1 r1
01Δe0e1r0r1
Given e ∈ T, we refer to Δe as the parallel splitting relation of e, and to the elements of Δe as parallel splices of e. Before we can use Δe to construct the preclosure of e, we go over a number of properties of the parallel splitting relation. The first of these properties is that a givene∈ T has only finitely many parallel splices. This will be useful later, when we involve all parallel splices of ein building a new term, i.e., to guarantee that the constructed term is finite.
Lemma 4.4. Fore∈ T,Δe is finite.
We furthermore note that the parallel composition of any parallel splice ofe is ordered below e byBKA. This guarantees that parallel splices never contain extra information, i.e., that their semantics do not contain pomsets that do not occur in the semantics ofe. It also allows us to bound the width of the parallel splices by the width of the term being split, as a result of Lemma 3.10.
Lemma 4.5. Lete∈ T. If Δer, thenrBKAe.
Corollary 4.1. Let e∈ T. If Δer, then ||+|r| ≤ |e|.
Finally, we show thatΔeisdensewhen it comes to parallel pomsets, meaning that if we have a parallelly composed pomset in the semantics ofe, then we can find a parallel splice where one parallel component is contained in the semantics of one side of the pair, and the other component in that of the other.
Lemma 4.6. Let e ∈ T, and let V, W be pomsets such that V W ∈ eBKA. Then there exist, r∈ T withΔersuch that V ∈BKA andW ∈rBKA. Proof. The proof proceeds by induction one. In the base, we can discount the case wheree= 0, for then the claim holds vacuously. This leaves us two cases.
– Ife = 1, then V W ∈ eBKA entails V W = 1. By Lemma 3.1, we find thatV =W = 1. Since 1Δe1 by definition ofΔe, the claim follows when we choose=r= 1.
– Ife=afor somea∈Σ, thenV W ∈eBKA entailsV W =a. By Lemma 3.1, we find that either V = 1 and W = a, or V =a and W = 1. In the former case, we can choose= 1 and r=a, while in the latter case we can choose=a andr= 1. It is then easy to see that our claim holds in either case.
For the inductive step, there are four cases to consider.
– Ife=e0+e1, thenU0U1∈eiBKA for somei∈2. But then, by induction, we find, r∈ T withΔei rsuch thatV ∈BKA andW ∈rBKA. Since this implies thatΔer, the claim follows.
– Ife=e0·e1, then there exist pomsetsU0, U1such thatV W =U0·U1, and Ui∈eiBKA for alli∈2. By Lemma3.1, there are two cases to consider.
• Suppose thatUi = 1 for some i ∈2, meaning that V W =U0·U1 = U1−i ∈e1−iBKA for thisi. By induction, we find , r∈ T withΔe1−i r, andV ∈BKAas well asW ∈rBKA. SinceUi= 1∈eiBKA, we have that (ei) = 1 by Lemma3.9, and thusΔer.
• Suppose that V = 1 or W = 1. In the former case, V W = W = U0·U1 ∈ eCKA. We then choose = 1 and r = e to satisfy the claim.
In the latter case, we can choose =e and r = 1 to satisfy the claim analogously.
– Ife=e0 e1, then there exist pomsetsU0, U1 such thatV W =U0 U1, andUi∈eiBKA for alli∈2. By Lemma3.5, we find pomsetsV0, V1, W0, W1 such thatV =V0V1,W =W0W1, andUi =ViWi fori∈2. For i∈2, we then find by inductioni, ri∈ T with iΔei ri such thatVi∈iBKA and Wi∈riBKA. We then choose=01 andr=r0r1. Since V =V0V1, it follows thatV ∈BKA, and similarly we find thatW ∈rBKA. SinceΔer, the claim follows.
– If e = e0, then there exist U0, U1, . . . , Un−1 ∈ e0BKA such that V W = U0·U1· · ·Un−1. Ifn= 0, i.e., V W = 1, thenV =W = 1. In that case, we can choose =e and r= 1 to find that Δer, V ∈BKA andW ∈rBKA, satisfying the claim.
If n > 0, we can assume without loss of generality that, for 0 ≤ i < n, it holds thatUi= 1. By Lemma 3.1, there are two subcases to consider.
• Suppose that V, W = 1; then n = 1 (for otherwise Uj = 1 for some 0 ≤ j < n by Lemma 3.1, which contradicts the above). Since V W =U0 ∈e0BKA, we find by induction , r∈ T with Δe0 rsuch that V ∈BKAandW ∈rBKA. The claim then follows by the fact thatΔer.
• Suppose that V = 1 or W = 1. In the former case, V W = W = U0·U1· · ·Un−1 ∈eCKA. We then choose = 1 andr=eto satisfy the claim. In the latter case, we can choose =e and r= 1 to satisfy the
claim analogously.
Example 4.3. LetU =acandV =b, and note thatU V ∈e0e1CKA. We can then find thataΔa1 and 1Δbb, and thusa1Δe0 1b. Since alsocΔc1, it follows that (a1)cΔe0e1 (1b)1. We can then choose= (a1)c andr= (1b)1 to find thatU ∈BKA andV ∈rBKA, whileΔe0e1r.
With parallel splitting in hand, we can define an operator on terms that combines all parallel splices of a parallel composition in a way that accounts for all of their downward closures.
Definition 4.4. Let e, f ∈ T, and suppose that, for every g ∈ T such that
|g|<|e|+|f|, there exists a closureg↓. The term ef is defined as follows:
ef ef +
Δefr
||,|r|<|ef|
↓ r↓
Note thatef is well-defined: the sum is finite sinceΔef is finite by Lemma 4.4, and furthermore↓andr↓ exist, as we required that||,|r|<|ef|. Example 4.4. Let us computee0e1 and verify that we obtain a preclosure of e0e1. Working through the definition, we see thatΔe0e1 consists of the pairs
(11)1,(ab)c (11)c,(ab)1 (1b)1,(a1)c (1b)c,(a1)1 (a1)1,(1b)c (a1)c,(1b)1 Since closure is invariant with respect to≡CKA, we can simplify these terms by applying the axioms ofCKA. After folding the unit subterms, we are left with 1, abc c, ab b, ac bc, a a, bc ac, b
Recall that ab+a·b+b·ais a closure ofab. Now, we find that e0e1= (ab)c+c(ab+a·b+b·a)
+b(ac+a·c+c·a) + (bc+b·c+c·b)a +a(bc+b·c+c·b) + (ac+a·c+c·a)b
≡CKAabc+a(b·c+c·b) +b(a·c+c·a) +c(a·b+b·a) which was shown to be a preclosure ofe0e1 in Example4.2.
The general proof of correctness foras a preclosure plays out as follows.
Lemma 4.7. Lete, f ∈ T, and suppose that, for everyg∈ T with|g|<|e|+|f|, there exists a closureg↓. Thenef is a preclosure ofef.
Proof. We start by showing thatef ≡CKAef. First, note thatef BKAef by definition ofef. For the other direction, suppose that, r∈ T are such that Δef r. By definition of closure, we know that ↓ r↓ ≡CKA r. By Lemma 4.5, we haverBKAef. Since every subterm ofef is ordered belowef byCKA, we have thatef CKAef. It then follows thatef ≡CKAef.
For the second requirement, suppose thatX ∈ efCKA is non-sequential.
We then know that there exists a Y ∈efBKA such that X Y. This leaves us two cases to consider.
– IfX is empty or primitive, thenY =X by Lemma 3.2, thusX ∈efBKA. By the fact thatef BKAef and by Lemma3.8, we findX ∈efBKA. – IfX =X0X1 for non-empty pomsetsX0 and X1, then by Lemma3.3 we find non-empty pomsetsY0 and Y1 withY =Y0 Y1 such thatXi Yi for i∈ 2. By Lemma 4.6, we find , r∈ T with Δef r such that Y0 ∈ BKA andY1∈rBKA. By Lemma3.11, we find that||,|r| ≥1. Corollary4.1then allows us to conclude that||,|r|<|ef|.
This means that↓ r↓BKAef. SinceX0 ∈↓BKA and X1∈r↓BKA by definition of closure, we can derive by Lemma3.8that
X =X0X1∈↓ r↓BKA⊆efBKA