YES
Confluence Proof
Confluence Proof
by Hakusan
Input
The rewrite relation of the following TRS is considered.
+(x,0) |
→ |
x |
+(x,s(y)) |
→ |
s(+(x,y)) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
+(+(x,y),z) |
→ |
+(x,+(y,z)) |
Proof
1 Compositional Rule Labeling with Parallel Critical Pairs
Confluence is proven by compositional rule labeling with parallel critical pairs.
The following labeling functions phi and psi are used (if only one is displayed, then phi = psi).
-
+(x,0)→x ↦ 0
-
+(x,s(y))→s(+(x,y)) ↦ 0
-
+(x,+(y,z))→+(+(x,y),z) ↦ 0
-
+(+(x,y),z)→+(x,+(y,z)) ↦ 1
-
+(x,0)→x ↦ 0
-
+(x,s(y))→s(+(x,y)) ↦ 0
-
+(x,+(y,z))→+(+(x,y),z) ↦ 0
-
+(+(x,y),z)→+(x,+(y,z)) ↦ 2
The non-0-0 parallel critical pairs are joined as follows.
-
The parallel-phi-root-psi critical pairs can be joined as follows. Here,
↔ is always chosen as an appropriate rewrite relation which
is automatically inferred by the certifier.
-
The critical peak s = +(x0_1,+(x0_2,0)) {ε}←1 +(+(x0_1,x0_2),0) 0→ε +(x0_1,x0_2) = t can be joined as follows.
s
↔ +(x0_1,+(x0_2,0)) ↔ +(x0_1,x0_2) ↔
t
-
The critical peak s = +(x0_1,+(x0_2,s(y2))) {ε}←1 +(+(x0_1,x0_2),s(y2)) 0→ε s(+(+(x0_1,x0_2),y2)) = t can be joined as follows.
s
↔ +(+(x0_1,x0_2),s(y2)) ↔ s(+(+(x0_1,x0_2),y2)) ↔
t
-
The critical peak s = +(x0_1,+(x0_2,+(y2,y3))) {ε}←1 +(+(x0_1,x0_2),+(y2,y3)) 0→ε +(+(+(x0_1,x0_2),y2),y3) = t can be joined as follows.
s
↔ +(x0_1,+(+(x0_2,y2),y3)) ↔ +(+(x0_1,+(x0_2,y2)),y3) ↔
t
-
The critical peak s = +(y1,+(x1_1,+(x1_2,y3))) {2}←1 +(y1,+(+(x1_1,x1_2),y3)) 0→ε +(+(y1,+(x1_1,x1_2)),y3) = t can be joined as follows.
s
↔ +(y1,+(x1_1,+(x1_2,y3))) ↔ +(+(y1,x1_1),+(x1_2,y3)) ↔ +(+(+(y1,x1_1),x1_2),y3) ↔ +(+(y1,+(x1_1,x1_2)),y3) ↔
t
-
The critical peak s = +(y1,y2) {ε}←0 +(+(y1,y2),0) 2→ε +(y1,+(y2,0)) = t can be joined as follows.
s
↔ +(y1,y2) ↔ +(y1,+(y2,0)) ↔
t
-
The critical peak s = s(+(+(y1,y2),x0_2)) {ε}←0 +(+(y1,y2),s(x0_2)) 2→ε +(y1,+(y2,s(x0_2))) = t can be joined as follows.
s
↔ s(+(y1,+(y2,x0_2))) ↔ +(y1,s(+(y2,x0_2))) ↔ +(y1,+(y2,s(x0_2))) ↔
t
-
The critical peak s = +(+(+(y1,y2),x0_2),x0_3) {ε}←0 +(+(y1,y2),+(x0_2,x0_3)) 2→ε +(y1,+(y2,+(x0_2,x0_3))) = t can be joined as follows.
s
↔ +(+(+(y1,y2),x0_2),x0_3) ↔ +(+(y1,y2),+(x0_2,x0_3)) ↔ +(y1,+(y2,+(x0_2,x0_3))) ↔
t
-
The critical peak s = +(y1,y3) {1}←0 +(+(y1,0),y3) 2→ε +(y1,+(0,y3)) = t can be joined as follows.
s
↔ +(y1,y3) ↔ +(+(y1,0),y3) ↔ +(y1,+(0,y3)) ↔
t
-
The critical peak s = +(s(+(y1,x1_2)),y3) {1}←0 +(+(y1,s(x1_2)),y3) 2→ε +(y1,+(s(x1_2),y3)) = t can be joined as follows.
s
↔ +(s(+(y1,x1_2)),y3) ↔ +(+(y1,s(x1_2)),y3) ↔ +(y1,+(s(x1_2),y3)) ↔
t
-
The critical peak s = +(+(+(y1,x1_2),x1_3),y3) {1}←0 +(+(y1,+(x1_2,x1_3)),y3) 2→ε +(y1,+(+(x1_2,x1_3),y3)) = t can be joined as follows.
s
↔ +(+(+(y1,x1_2),x1_3),y3) ↔ +(+(y1,+(x1_2,x1_3)),y3) ↔ +(y1,+(+(x1_2,x1_3),y3)) ↔
t
-
The critical peak s = +(+(x1_1,+(x1_2,y2)),y3) {1}←1 +(+(+(x1_1,x1_2),y2),y3) 2→ε +(+(x1_1,x1_2),+(y2,y3)) = t can be joined as follows.
s
↔ +(+(x1_1,+(x1_2,y2)),y3) ↔ +(+(+(x1_1,x1_2),y2),y3) ↔ +(+(x1_1,x1_2),+(y2,y3)) ↔
t
-
The parallel-psi-root-phi critical pairs can be joined as follows. Here,
↔ is always chosen as an appropriate rewrite relation which
is automatically inferred by the certifier.
-
The critical peak s = +(x0_1,+(x0_2,0)) {ε}←2 +(+(x0_1,x0_2),0) 0→ε +(x0_1,x0_2) = t can be joined as follows.
s
↔ +(+(x0_1,x0_2),0) ↔ +(x0_1,x0_2) ↔
t
-
The critical peak s = +(x0_1,+(x0_2,s(y2))) {ε}←2 +(+(x0_1,x0_2),s(y2)) 0→ε s(+(+(x0_1,x0_2),y2)) = t can be joined as follows.
s
↔ +(x0_1,+(x0_2,s(y2))) ↔ +(+(x0_1,x0_2),s(y2)) ↔ s(+(+(x0_1,x0_2),y2)) ↔
t
-
The critical peak s = +(x0_1,+(x0_2,+(y2,y3))) {ε}←2 +(+(x0_1,x0_2),+(y2,y3)) 0→ε +(+(+(x0_1,x0_2),y2),y3) = t can be joined as follows.
s
↔ +(+(x0_1,x0_2),+(y2,y3)) ↔ +(+(+(x0_1,x0_2),y2),y3) ↔ +(+(x0_1,x0_2),+(y2,y3)) ↔
t
-
The critical peak s = +(y1,+(x1_1,+(x1_2,y3))) {2}←2 +(y1,+(+(x1_1,x1_2),y3)) 0→ε +(+(y1,+(x1_1,x1_2)),y3) = t can be joined as follows.
s
↔ +(y1,+(+(x1_1,x1_2),y3)) ↔ +(+(y1,+(x1_1,x1_2)),y3) ↔
t
-
The critical peak s = +(y1,y2) {ε}←0 +(+(y1,y2),0) 1→ε +(y1,+(y2,0)) = t can be joined as follows.
s
↔ +(y1,y2) ↔ +(y1,+(y2,0)) ↔
t
-
The critical peak s = s(+(+(y1,y2),x0_2)) {ε}←0 +(+(y1,y2),s(x0_2)) 1→ε +(y1,+(y2,s(x0_2))) = t can be joined as follows.
s
↔ s(+(+(y1,y2),x0_2)) ↔ +(+(y1,y2),s(x0_2)) ↔ +(y1,+(y2,s(x0_2))) ↔
t
-
The critical peak s = +(+(+(y1,y2),x0_2),x0_3) {ε}←0 +(+(y1,y2),+(x0_2,x0_3)) 1→ε +(y1,+(y2,+(x0_2,x0_3))) = t can be joined as follows.
s
↔ +(+(+(y1,y2),x0_2),x0_3) ↔ +(+(y1,y2),+(x0_2,x0_3)) ↔ +(y1,+(y2,+(x0_2,x0_3))) ↔
t
-
The critical peak s = +(y1,y3) {1}←0 +(+(y1,0),y3) 1→ε +(y1,+(0,y3)) = t can be joined as follows.
s
↔ +(y1,y3) ↔ +(+(y1,0),y3) ↔ +(y1,+(0,y3)) ↔
t
-
The critical peak s = +(s(+(y1,x1_2)),y3) {1}←0 +(+(y1,s(x1_2)),y3) 1→ε +(y1,+(s(x1_2),y3)) = t can be joined as follows.
s
↔ +(s(+(y1,x1_2)),y3) ↔ +(+(y1,s(x1_2)),y3) ↔ +(y1,+(s(x1_2),y3)) ↔
t
-
The critical peak s = +(+(+(y1,x1_2),x1_3),y3) {1}←0 +(+(y1,+(x1_2,x1_3)),y3) 1→ε +(y1,+(+(x1_2,x1_3),y3)) = t can be joined as follows.
s
↔ +(+(+(y1,x1_2),x1_3),y3) ↔ +(+(y1,+(x1_2,x1_3)),y3) ↔ +(y1,+(+(x1_2,x1_3),y3)) ↔
t
-
The critical peak s = +(+(x1_1,+(x1_2,y2)),y3) {1}←2 +(+(+(x1_1,x1_2),y2),y3) 1→ε +(+(x1_1,x1_2),+(y2,y3)) = t can be joined as follows.
s
↔ +(+(+(x1_1,x1_2),y2),y3) ↔ +(+(x1_1,x1_2),+(y2,y3)) ↔
t
The remaining rules are handled recursively.
+(x,0) |
→ |
x |
+(x,s(y)) |
→ |
s(+(x,y)) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
1.1 Compositional Parallel Critical Pair Systems
All parallel critical pairs of the TRS R are joinable by R.
This can be seen as follows:
The parallel critical pairs can be joined as follows. Here,
↔ is always chosen as an appropriate rewrite relation which
is automatically inferred by the certifier.
-
The critical peak s = +(y1,y2) {2}←+(y1,+(y2,0))→ε +(+(y1,y2),0) = t can be joined as follows.
s
↔
t
-
The critical peak s = +(y1,s(+(y2,x1_2))) {2}←+(y1,+(y2,s(x1_2)))→ε +(+(y1,y2),s(x1_2)) = t can be joined as follows.
s
↔ s(+(y1,+(y2,x1_2))) ↔ s(+(+(y1,y2),x1_2)) ↔
t
-
The critical peak s = +(y1,+(+(y2,x1_2),x1_3)) {2}←+(y1,+(y2,+(x1_2,x1_3)))→ε +(+(y1,y2),+(x1_2,x1_3)) = t can be joined as follows.
s
↔ +(+(y1,+(y2,x1_2)),x1_3) ↔ +(+(+(y1,y2),x1_2),x1_3) ↔
t
The TRS C is chosen as:
There are no rules.
Consequently, PCPS(R,C) is included in the following TRS P where
steps are used to show that certain pairs are C-convertible.
+(y1,+(y2,0)) |
→ |
+(y1,y2) |
+(y1,+(y2,0)) |
→ |
+(+(y1,y2),0) |
+(y1,+(y2,s(x1_2))) |
→ |
+(y1,s(+(y2,x1_2))) |
+(y1,+(y2,s(x1_2))) |
→ |
+(+(y1,y2),s(x1_2)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(y1,+(+(y2,x1_2),x1_3)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(+(y1,y2),+(x1_2,x1_3)) |
Relative termination of P / R is proven as follows.
1.1.1 Rule Removal
Using the
linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1
over the naturals
[+(x1, x2)] |
= |
· x1 + · x2 +
|
[0] |
= |
|
[s(x1)] |
= |
· x1 +
|
the
rules
+(y1,+(y2,0)) |
→ |
+(+(y1,y2),0) |
+(y1,+(y2,s(x1_2))) |
→ |
+(y1,s(+(y2,x1_2))) |
+(y1,+(y2,s(x1_2))) |
→ |
+(+(y1,y2),s(x1_2)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(y1,+(+(y2,x1_2),x1_3)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(+(y1,y2),+(x1_2,x1_3)) |
remain in R.
Moreover,
the
rules
+(x,s(y)) |
→ |
s(+(x,y)) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
remain in S.
1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1
over the naturals
[+(x1, x2)] |
= |
· x1 + · x2 +
|
[0] |
= |
|
[s(x1)] |
= |
· x1 +
|
the
rules
+(y1,+(y2,0)) |
→ |
+(+(y1,y2),0) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(y1,+(+(y2,x1_2),x1_3)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(+(y1,y2),+(x1_2,x1_3)) |
remain in R.
Moreover,
the
rules
+(x,s(y)) |
→ |
s(+(x,y)) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
remain in S.
1.1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1
over the naturals
[+(x1, x2)] |
= |
· x1 + · x2 +
|
[0] |
= |
|
[s(x1)] |
= |
· x1 +
|
the
rules
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(y1,+(+(y2,x1_2),x1_3)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(+(y1,y2),+(x1_2,x1_3)) |
remain in R.
Moreover,
the
rules
+(x,s(y)) |
→ |
s(+(x,y)) |
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
remain in S.
1.1.1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1
over the naturals
[+(x1, x2)] |
= |
· x1 + · x2 +
|
[s(x1)] |
= |
· x1 +
|
the
rules
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(y1,+(+(y2,x1_2),x1_3)) |
+(y1,+(y2,+(x1_2,x1_3))) |
→ |
+(+(y1,y2),+(x1_2,x1_3)) |
remain in R.
Moreover,
the
rule
+(x,+(y,z)) |
→ |
+(+(x,y),z) |
remains in S.
1.1.1.1.1.1.1 Rule Removal
Using the
linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1
over the naturals
[+(x1, x2)] |
= |
· x1 + · x2 +
|
all rules of R could be removed.
Moreover,
all rules of S could be removed.
1.1.1.1.1.1.1.1 R is empty
There are no rules in the TRS R. Hence, R/S is relative terminating.
Confluence of C is proven as follows.
1.1.2 (Weakly) Orthogonal
Confluence is proven since the TRS is (weakly) orthogonal.
Tool configuration
Hakusan