Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/ExIntrod_GM04_GM)
The rewrite relation of the following TRS is considered.
a__nats |
→ |
a__adx(a__zeros) |
(1) |
a__zeros |
→ |
cons(0,zeros) |
(2) |
a__incr(cons(X,Y)) |
→ |
cons(s(X),incr(Y)) |
(3) |
a__adx(cons(X,Y)) |
→ |
a__incr(cons(X,adx(Y))) |
(4) |
a__hd(cons(X,Y)) |
→ |
mark(X) |
(5) |
a__tl(cons(X,Y)) |
→ |
mark(Y) |
(6) |
mark(nats) |
→ |
a__nats |
(7) |
mark(adx(X)) |
→ |
a__adx(mark(X)) |
(8) |
mark(zeros) |
→ |
a__zeros |
(9) |
mark(incr(X)) |
→ |
a__incr(mark(X)) |
(10) |
mark(hd(X)) |
→ |
a__hd(mark(X)) |
(11) |
mark(tl(X)) |
→ |
a__tl(mark(X)) |
(12) |
mark(cons(X1,X2)) |
→ |
cons(X1,X2) |
(13) |
mark(0) |
→ |
0 |
(14) |
mark(s(X)) |
→ |
s(X) |
(15) |
a__nats |
→ |
nats |
(16) |
a__adx(X) |
→ |
adx(X) |
(17) |
a__zeros |
→ |
zeros |
(18) |
a__incr(X) |
→ |
incr(X) |
(19) |
a__hd(X) |
→ |
hd(X) |
(20) |
a__tl(X) |
→ |
tl(X) |
(21) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
prec(a__nats) |
= |
4 |
|
stat(a__nats) |
= |
mul
|
prec(a__zeros) |
= |
3 |
|
stat(a__zeros) |
= |
mul
|
prec(cons) |
= |
0 |
|
stat(cons) |
= |
mul
|
prec(0) |
= |
1 |
|
stat(0) |
= |
mul
|
prec(zeros) |
= |
2 |
|
stat(zeros) |
= |
mul
|
prec(a__hd) |
= |
3 |
|
stat(a__hd) |
= |
mul
|
prec(mark) |
= |
3 |
|
stat(mark) |
= |
mul
|
prec(a__tl) |
= |
3 |
|
stat(a__tl) |
= |
mul
|
prec(nats) |
= |
4 |
|
stat(nats) |
= |
mul
|
prec(hd) |
= |
3 |
|
stat(hd) |
= |
mul
|
prec(tl) |
= |
3 |
|
stat(tl) |
= |
mul
|
π(a__nats) |
= |
[] |
π(a__adx) |
= |
1 |
π(a__zeros) |
= |
[] |
π(cons) |
= |
[1,2] |
π(0) |
= |
[] |
π(zeros) |
= |
[] |
π(a__incr) |
= |
1 |
π(s) |
= |
1 |
π(incr) |
= |
1 |
π(adx) |
= |
1 |
π(a__hd) |
= |
[1] |
π(mark) |
= |
[1] |
π(a__tl) |
= |
[1] |
π(nats) |
= |
[] |
π(hd) |
= |
[1] |
π(tl) |
= |
[1] |
all of the following rules can be deleted.
a__nats |
→ |
a__adx(a__zeros) |
(1) |
a__zeros |
→ |
cons(0,zeros) |
(2) |
a__hd(cons(X,Y)) |
→ |
mark(X) |
(5) |
a__tl(cons(X,Y)) |
→ |
mark(Y) |
(6) |
mark(nats) |
→ |
a__nats |
(7) |
mark(zeros) |
→ |
a__zeros |
(9) |
mark(cons(X1,X2)) |
→ |
cons(X1,X2) |
(13) |
mark(0) |
→ |
0 |
(14) |
mark(s(X)) |
→ |
s(X) |
(15) |
a__zeros |
→ |
zeros |
(18) |
1.1 Rule Removal
Using the
prec(cons) |
= |
0 |
|
stat(cons) |
= |
lex
|
prec(a__adx) |
= |
3 |
|
stat(a__adx) |
= |
lex
|
prec(adx) |
= |
3 |
|
stat(adx) |
= |
lex
|
prec(mark) |
= |
3 |
|
stat(mark) |
= |
lex
|
prec(tl) |
= |
1 |
|
stat(tl) |
= |
lex
|
prec(a__tl) |
= |
2 |
|
stat(a__tl) |
= |
lex
|
prec(a__nats) |
= |
5 |
|
stat(a__nats) |
= |
lex
|
prec(nats) |
= |
4 |
|
stat(nats) |
= |
lex
|
π(a__incr) |
= |
1 |
π(cons) |
= |
[2,1] |
π(s) |
= |
1 |
π(incr) |
= |
1 |
π(a__adx) |
= |
[1] |
π(adx) |
= |
[1] |
π(mark) |
= |
[1] |
π(hd) |
= |
1 |
π(a__hd) |
= |
1 |
π(tl) |
= |
[1] |
π(a__tl) |
= |
[1] |
π(a__nats) |
= |
[] |
π(nats) |
= |
[] |
all of the following rules can be deleted.
a__adx(cons(X,Y)) |
→ |
a__incr(cons(X,adx(Y))) |
(4) |
mark(tl(X)) |
→ |
a__tl(mark(X)) |
(12) |
a__nats |
→ |
nats |
(16) |
a__tl(X) |
→ |
tl(X) |
(21) |
1.1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(a__incr) |
= |
4 |
|
weight(a__incr) |
= |
1 |
|
|
|
prec(s) |
= |
8 |
|
weight(s) |
= |
0 |
|
|
|
prec(incr) |
= |
0 |
|
weight(incr) |
= |
1 |
|
|
|
prec(mark) |
= |
7 |
|
weight(mark) |
= |
2 |
|
|
|
prec(adx) |
= |
2 |
|
weight(adx) |
= |
1 |
|
|
|
prec(a__adx) |
= |
3 |
|
weight(a__adx) |
= |
1 |
|
|
|
prec(hd) |
= |
5 |
|
weight(hd) |
= |
1 |
|
|
|
prec(a__hd) |
= |
6 |
|
weight(a__hd) |
= |
1 |
|
|
|
prec(cons) |
= |
1 |
|
weight(cons) |
= |
0 |
|
|
|
all of the following rules can be deleted.
a__incr(cons(X,Y)) |
→ |
cons(s(X),incr(Y)) |
(3) |
mark(adx(X)) |
→ |
a__adx(mark(X)) |
(8) |
mark(incr(X)) |
→ |
a__incr(mark(X)) |
(10) |
mark(hd(X)) |
→ |
a__hd(mark(X)) |
(11) |
a__adx(X) |
→ |
adx(X) |
(17) |
a__incr(X) |
→ |
incr(X) |
(19) |
a__hd(X) |
→ |
hd(X) |
(20) |
1.1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.