YES
Confluence Proof
Confluence Proof
by Hakusan
Input
The rewrite relation of the following TRS is considered.
s(p(x)) |
→ |
x |
p(s(x)) |
→ |
x |
+(x,0) |
→ |
x |
+(x,s(y)) |
→ |
s(+(x,y)) |
+(x,p(y)) |
→ |
p(+(x,y)) |
-(0,0) |
→ |
0 |
-(x,s(y)) |
→ |
p(-(x,y)) |
-(x,p(y)) |
→ |
s(-(x,y)) |
-(p(x),y) |
→ |
p(-(x,y)) |
-(s(x),y) |
→ |
s(-(x,y)) |
Proof
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 = s(x1_1) {1}←s(p(s(x1_1)))→ε s(x1_1) = t can be joined as follows.
s
↔
t
-
The critical peak s = p(x1_1) {1}←p(s(p(x1_1)))→ε p(x1_1) = t can be joined as follows.
s
↔
t
-
The critical peak s = +(y1,x1_1) {2}←+(y1,s(p(x1_1)))→ε s(+(y1,p(x1_1))) = t can be joined as follows.
s
↔ s(p(+(y1,x1_1))) ↔
t
-
The critical peak s = +(y1,x1_1) {2}←+(y1,p(s(x1_1)))→ε p(+(y1,s(x1_1))) = t can be joined as follows.
s
↔ p(s(+(y1,x1_1))) ↔
t
-
The critical peak s = p(-(x0_1,s(y2))) {ε}←-(p(x0_1),s(y2))→ε p(-(p(x0_1),y2)) = t can be joined as follows.
s
↔ p(p(-(x0_1,y2))) ↔
t
-
The critical peak s = s(-(x0_1,s(y2))) {ε}←-(s(x0_1),s(y2))→ε p(-(s(x0_1),y2)) = t can be joined as follows.
s
↔ s(p(-(x0_1,y2))) ↔ -(x0_1,y2) ↔ p(s(-(x0_1,y2))) ↔
t
-
The critical peak s = -(y1,x1_1) {2}←-(y1,s(p(x1_1)))→ε p(-(y1,p(x1_1))) = t can be joined as follows.
s
↔ p(s(-(y1,x1_1))) ↔
t
-
The critical peak s = p(-(x0_1,p(y2))) {ε}←-(p(x0_1),p(y2))→ε s(-(p(x0_1),y2)) = t can be joined as follows.
s
↔ p(s(-(x0_1,y2))) ↔ -(x0_1,y2) ↔ s(p(-(x0_1,y2))) ↔
t
-
The critical peak s = s(-(x0_1,p(y2))) {ε}←-(s(x0_1),p(y2))→ε s(-(s(x0_1),y2)) = t can be joined as follows.
s
↔ s(s(-(x0_1,y2))) ↔
t
-
The critical peak s = -(y1,x1_1) {2}←-(y1,p(s(x1_1)))→ε s(-(y1,s(x1_1))) = t can be joined as follows.
s
↔ s(p(-(y1,x1_1))) ↔
t
-
The critical peak s = p(-(p(y1),x0_2)) {ε}←-(p(y1),s(x0_2))→ε p(-(y1,s(x0_2))) = t can be joined as follows.
s
↔ p(p(-(y1,x0_2))) ↔
t
-
The critical peak s = s(-(p(y1),x0_2)) {ε}←-(p(y1),p(x0_2))→ε p(-(y1,p(x0_2))) = t can be joined as follows.
s
↔ s(p(-(y1,x0_2))) ↔ -(y1,x0_2) ↔ p(s(-(y1,x0_2))) ↔
t
-
The critical peak s = -(x1_1,y2) {1}←-(p(s(x1_1)),y2)→ε p(-(s(x1_1),y2)) = t can be joined as follows.
s
↔ p(s(-(x1_1,y2))) ↔
t
-
The critical peak s = p(-(s(y1),x0_2)) {ε}←-(s(y1),s(x0_2))→ε s(-(y1,s(x0_2))) = t can be joined as follows.
s
↔ p(s(-(y1,x0_2))) ↔ -(y1,x0_2) ↔ s(p(-(y1,x0_2))) ↔
t
-
The critical peak s = s(-(s(y1),x0_2)) {ε}←-(s(y1),p(x0_2))→ε s(-(y1,p(x0_2))) = t can be joined as follows.
s
↔ s(s(-(y1,x0_2))) ↔
t
-
The critical peak s = -(x1_1,y2) {1}←-(s(p(x1_1)),y2)→ε s(-(p(x1_1),y2)) = t can be joined as follows.
s
↔ s(p(-(x1_1,y2))) ↔
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,s(p(x1_1))) |
→ |
+(y1,x1_1) |
+(y1,s(p(x1_1))) |
→ |
s(+(y1,p(x1_1))) |
+(y1,p(s(x1_1))) |
→ |
+(y1,x1_1) |
+(y1,p(s(x1_1))) |
→ |
p(+(y1,s(x1_1))) |
-(p(x0_1),s(y2)) |
→ |
p(-(x0_1,s(y2))) |
-(p(x0_1),s(y2)) |
→ |
p(-(p(x0_1),y2)) |
-(s(x0_1),s(y2)) |
→ |
s(-(x0_1,s(y2))) |
-(s(x0_1),s(y2)) |
→ |
p(-(s(x0_1),y2)) |
-(y1,s(p(x1_1))) |
→ |
-(y1,x1_1) |
-(y1,s(p(x1_1))) |
→ |
p(-(y1,p(x1_1))) |
-(p(x0_1),p(y2)) |
→ |
p(-(x0_1,p(y2))) |
-(p(x0_1),p(y2)) |
→ |
s(-(p(x0_1),y2)) |
-(s(x0_1),p(y2)) |
→ |
s(-(x0_1,p(y2))) |
-(s(x0_1),p(y2)) |
→ |
s(-(s(x0_1),y2)) |
-(y1,p(s(x1_1))) |
→ |
-(y1,x1_1) |
-(y1,p(s(x1_1))) |
→ |
s(-(y1,s(x1_1))) |
-(p(y1),s(x0_2)) |
→ |
p(-(p(y1),x0_2)) |
-(p(y1),s(x0_2)) |
→ |
p(-(y1,s(x0_2))) |
-(p(y1),p(x0_2)) |
→ |
s(-(p(y1),x0_2)) |
-(p(y1),p(x0_2)) |
→ |
p(-(y1,p(x0_2))) |
-(p(s(x1_1)),y2) |
→ |
-(x1_1,y2) |
-(p(s(x1_1)),y2) |
→ |
p(-(s(x1_1),y2)) |
-(s(y1),s(x0_2)) |
→ |
p(-(s(y1),x0_2)) |
-(s(y1),s(x0_2)) |
→ |
s(-(y1,s(x0_2))) |
-(s(y1),p(x0_2)) |
→ |
s(-(s(y1),x0_2)) |
-(s(y1),p(x0_2)) |
→ |
s(-(y1,p(x0_2))) |
-(s(p(x1_1)),y2) |
→ |
-(x1_1,y2) |
-(s(p(x1_1)),y2) |
→ |
s(-(p(x1_1),y2)) |
Relative termination of P / R is proven as follows.
1.1 Rule Removal
Using the
recursive path order with the following precedence and status
prec(0) |
= |
0 |
|
stat(0) |
= |
lex
|
prec(-) |
= |
3 |
|
stat(-) |
= |
lex
|
prec(+) |
= |
1 |
|
stat(+) |
= |
lex
|
prec(s) |
= |
0 |
|
stat(s) |
= |
lex
|
prec(p) |
= |
0 |
|
stat(p) |
= |
lex
|
all rules of R could be removed.
Moreover,
all rules of S could be removed.
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.2 (Weakly) Orthogonal
Confluence is proven since the TRS is (weakly) orthogonal.
Tool configuration
Hakusan