Certification Problem
Input (TPDB TRS_Innermost/Transformed_CSR_innermost_04/MYNAT_nosorts_GM)
The rewrite relation of the following TRS is considered.
a__and(tt,X) |
→ |
mark(X) |
(1) |
a__plus(N,0) |
→ |
mark(N) |
(2) |
a__plus(N,s(M)) |
→ |
s(a__plus(mark(N),mark(M))) |
(3) |
a__x(N,0) |
→ |
0 |
(4) |
a__x(N,s(M)) |
→ |
a__plus(a__x(mark(N),mark(M)),mark(N)) |
(5) |
mark(and(X1,X2)) |
→ |
a__and(mark(X1),X2) |
(6) |
mark(plus(X1,X2)) |
→ |
a__plus(mark(X1),mark(X2)) |
(7) |
mark(x(X1,X2)) |
→ |
a__x(mark(X1),mark(X2)) |
(8) |
mark(tt) |
→ |
tt |
(9) |
mark(0) |
→ |
0 |
(10) |
mark(s(X)) |
→ |
s(mark(X)) |
(11) |
a__and(X1,X2) |
→ |
and(X1,X2) |
(12) |
a__plus(X1,X2) |
→ |
plus(X1,X2) |
(13) |
a__x(X1,X2) |
→ |
x(X1,X2) |
(14) |
The evaluation strategy is innermost.Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
prec(a__and) |
= |
1 |
|
stat(a__and) |
= |
lex
|
prec(tt) |
= |
2 |
|
stat(tt) |
= |
mul
|
prec(a__plus) |
= |
3 |
|
stat(a__plus) |
= |
lex
|
prec(0) |
= |
4 |
|
stat(0) |
= |
mul
|
prec(s) |
= |
0 |
|
stat(s) |
= |
mul
|
prec(a__x) |
= |
5 |
|
stat(a__x) |
= |
mul
|
prec(and) |
= |
1 |
|
stat(and) |
= |
lex
|
prec(plus) |
= |
3 |
|
stat(plus) |
= |
lex
|
prec(x) |
= |
5 |
|
stat(x) |
= |
mul
|
π(a__and) |
= |
[1,2] |
π(tt) |
= |
[] |
π(mark) |
= |
1 |
π(a__plus) |
= |
[1,2] |
π(0) |
= |
[] |
π(s) |
= |
[1] |
π(a__x) |
= |
[1,2] |
π(and) |
= |
[1,2] |
π(plus) |
= |
[1,2] |
π(x) |
= |
[1,2] |
all of the following rules can be deleted.
a__and(tt,X) |
→ |
mark(X) |
(1) |
a__plus(N,0) |
→ |
mark(N) |
(2) |
a__plus(N,s(M)) |
→ |
s(a__plus(mark(N),mark(M))) |
(3) |
a__x(N,0) |
→ |
0 |
(4) |
a__x(N,s(M)) |
→ |
a__plus(a__x(mark(N),mark(M)),mark(N)) |
(5) |
1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(tt) |
= |
8 |
|
weight(tt) |
= |
1 |
|
|
|
prec(0) |
= |
0 |
|
weight(0) |
= |
1 |
|
|
|
prec(mark) |
= |
9 |
|
weight(mark) |
= |
0 |
|
|
|
prec(s) |
= |
6 |
|
weight(s) |
= |
1 |
|
|
|
prec(and) |
= |
1 |
|
weight(and) |
= |
0 |
|
|
|
prec(a__and) |
= |
2 |
|
weight(a__and) |
= |
0 |
|
|
|
prec(plus) |
= |
3 |
|
weight(plus) |
= |
0 |
|
|
|
prec(a__plus) |
= |
4 |
|
weight(a__plus) |
= |
0 |
|
|
|
prec(x) |
= |
5 |
|
weight(x) |
= |
0 |
|
|
|
prec(a__x) |
= |
7 |
|
weight(a__x) |
= |
0 |
|
|
|
all of the following rules can be deleted.
mark(and(X1,X2)) |
→ |
a__and(mark(X1),X2) |
(6) |
mark(plus(X1,X2)) |
→ |
a__plus(mark(X1),mark(X2)) |
(7) |
mark(x(X1,X2)) |
→ |
a__x(mark(X1),mark(X2)) |
(8) |
mark(tt) |
→ |
tt |
(9) |
mark(0) |
→ |
0 |
(10) |
mark(s(X)) |
→ |
s(mark(X)) |
(11) |
a__and(X1,X2) |
→ |
and(X1,X2) |
(12) |
a__plus(X1,X2) |
→ |
plus(X1,X2) |
(13) |
a__x(X1,X2) |
→ |
x(X1,X2) |
(14) |
1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.