Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/Ex4_7_77_Bor03_GM)
The rewrite relation of the following TRS is considered.
a__zeros |
→ |
cons(0,zeros) |
(1) |
a__tail(cons(X,XS)) |
→ |
mark(XS) |
(2) |
mark(zeros) |
→ |
a__zeros |
(3) |
mark(tail(X)) |
→ |
a__tail(mark(X)) |
(4) |
mark(cons(X1,X2)) |
→ |
cons(mark(X1),X2) |
(5) |
mark(0) |
→ |
0 |
(6) |
a__zeros |
→ |
zeros |
(7) |
a__tail(X) |
→ |
tail(X) |
(8) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
linear polynomial interpretation over the naturals
[a__zeros] |
= |
2 |
[cons(x1, x2)] |
= |
2 · x1 + 2 · x2
|
[0] |
= |
0 |
[zeros] |
= |
1 |
[a__tail(x1)] |
= |
2 + 2 · x1
|
[mark(x1)] |
= |
2 · x1
|
[tail(x1)] |
= |
1 + 2 · x1
|
all of the following rules can be deleted.
a__tail(cons(X,XS)) |
→ |
mark(XS) |
(2) |
a__zeros |
→ |
zeros |
(7) |
a__tail(X) |
→ |
tail(X) |
(8) |
1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(a__zeros) |
= |
6 |
|
weight(a__zeros) |
= |
2 |
|
|
|
prec(0) |
= |
0 |
|
weight(0) |
= |
1 |
|
|
|
prec(zeros) |
= |
2 |
|
weight(zeros) |
= |
1 |
|
|
|
prec(mark) |
= |
3 |
|
weight(mark) |
= |
2 |
|
|
|
prec(tail) |
= |
4 |
|
weight(tail) |
= |
2 |
|
|
|
prec(a__tail) |
= |
5 |
|
weight(a__tail) |
= |
1 |
|
|
|
prec(cons) |
= |
1 |
|
weight(cons) |
= |
0 |
|
|
|
all of the following rules can be deleted.
a__zeros |
→ |
cons(0,zeros) |
(1) |
mark(zeros) |
→ |
a__zeros |
(3) |
mark(tail(X)) |
→ |
a__tail(mark(X)) |
(4) |
mark(cons(X1,X2)) |
→ |
cons(mark(X1),X2) |
(5) |
mark(0) |
→ |
0 |
(6) |
1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.