Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/Ex6_9_Luc02c_C)
The rewrite relation of the following TRS is considered.
active(2nd(cons1(X,cons(Y,Z)))) |
→ |
mark(Y) |
(1) |
active(2nd(cons(X,X1))) |
→ |
mark(2nd(cons1(X,X1))) |
(2) |
active(from(X)) |
→ |
mark(cons(X,from(s(X)))) |
(3) |
active(2nd(X)) |
→ |
2nd(active(X)) |
(4) |
active(cons(X1,X2)) |
→ |
cons(active(X1),X2) |
(5) |
active(from(X)) |
→ |
from(active(X)) |
(6) |
active(s(X)) |
→ |
s(active(X)) |
(7) |
active(cons1(X1,X2)) |
→ |
cons1(active(X1),X2) |
(8) |
active(cons1(X1,X2)) |
→ |
cons1(X1,active(X2)) |
(9) |
2nd(mark(X)) |
→ |
mark(2nd(X)) |
(10) |
cons(mark(X1),X2) |
→ |
mark(cons(X1,X2)) |
(11) |
from(mark(X)) |
→ |
mark(from(X)) |
(12) |
s(mark(X)) |
→ |
mark(s(X)) |
(13) |
cons1(mark(X1),X2) |
→ |
mark(cons1(X1,X2)) |
(14) |
cons1(X1,mark(X2)) |
→ |
mark(cons1(X1,X2)) |
(15) |
proper(2nd(X)) |
→ |
2nd(proper(X)) |
(16) |
proper(cons(X1,X2)) |
→ |
cons(proper(X1),proper(X2)) |
(17) |
proper(from(X)) |
→ |
from(proper(X)) |
(18) |
proper(s(X)) |
→ |
s(proper(X)) |
(19) |
proper(cons1(X1,X2)) |
→ |
cons1(proper(X1),proper(X2)) |
(20) |
2nd(ok(X)) |
→ |
ok(2nd(X)) |
(21) |
cons(ok(X1),ok(X2)) |
→ |
ok(cons(X1,X2)) |
(22) |
from(ok(X)) |
→ |
ok(from(X)) |
(23) |
s(ok(X)) |
→ |
ok(s(X)) |
(24) |
cons1(ok(X1),ok(X2)) |
→ |
ok(cons1(X1,X2)) |
(25) |
top(mark(X)) |
→ |
top(proper(X)) |
(26) |
top(ok(X)) |
→ |
top(active(X)) |
(27) |
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
[active(x1)] |
= |
1 + 2 · x1
|
[2nd(x1)] |
= |
1 + 2 · x1
|
[cons1(x1, x2)] |
= |
1 + 2 · x1 + 2 · x2
|
[cons(x1, x2)] |
= |
1 + 1 · x1 + 1 · x2
|
[mark(x1)] |
= |
1 + 1 · x1
|
[from(x1)] |
= |
2 + 2 · x1
|
[s(x1)] |
= |
1 · x1
|
[proper(x1)] |
= |
1 · x1
|
[ok(x1)] |
= |
2 + 2 · x1
|
[top(x1)] |
= |
1 · x1
|
all of the following rules can be deleted.
active(2nd(cons1(X,cons(Y,Z)))) |
→ |
mark(Y) |
(1) |
active(2nd(cons(X,X1))) |
→ |
mark(2nd(cons1(X,X1))) |
(2) |
active(from(X)) |
→ |
mark(cons(X,from(s(X)))) |
(3) |
active(cons(X1,X2)) |
→ |
cons(active(X1),X2) |
(5) |
active(from(X)) |
→ |
from(active(X)) |
(6) |
2nd(mark(X)) |
→ |
mark(2nd(X)) |
(10) |
from(mark(X)) |
→ |
mark(from(X)) |
(12) |
cons1(mark(X1),X2) |
→ |
mark(cons1(X1,X2)) |
(14) |
cons1(X1,mark(X2)) |
→ |
mark(cons1(X1,X2)) |
(15) |
2nd(ok(X)) |
→ |
ok(2nd(X)) |
(21) |
cons(ok(X1),ok(X2)) |
→ |
ok(cons(X1,X2)) |
(22) |
cons1(ok(X1),ok(X2)) |
→ |
ok(cons1(X1,X2)) |
(25) |
top(mark(X)) |
→ |
top(proper(X)) |
(26) |
top(ok(X)) |
→ |
top(active(X)) |
(27) |
1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(active) |
= |
6 |
|
weight(active) |
= |
3 |
|
|
|
prec(2nd) |
= |
0 |
|
weight(2nd) |
= |
1 |
|
|
|
prec(s) |
= |
5 |
|
weight(s) |
= |
2 |
|
|
|
prec(mark) |
= |
2 |
|
weight(mark) |
= |
1 |
|
|
|
prec(proper) |
= |
8 |
|
weight(proper) |
= |
0 |
|
|
|
prec(from) |
= |
7 |
|
weight(from) |
= |
2 |
|
|
|
prec(ok) |
= |
4 |
|
weight(ok) |
= |
1 |
|
|
|
prec(cons1) |
= |
1 |
|
weight(cons1) |
= |
0 |
|
|
|
prec(cons) |
= |
3 |
|
weight(cons) |
= |
0 |
|
|
|
all of the following rules can be deleted.
active(2nd(X)) |
→ |
2nd(active(X)) |
(4) |
active(s(X)) |
→ |
s(active(X)) |
(7) |
active(cons1(X1,X2)) |
→ |
cons1(active(X1),X2) |
(8) |
active(cons1(X1,X2)) |
→ |
cons1(X1,active(X2)) |
(9) |
cons(mark(X1),X2) |
→ |
mark(cons(X1,X2)) |
(11) |
s(mark(X)) |
→ |
mark(s(X)) |
(13) |
proper(2nd(X)) |
→ |
2nd(proper(X)) |
(16) |
proper(cons(X1,X2)) |
→ |
cons(proper(X1),proper(X2)) |
(17) |
proper(from(X)) |
→ |
from(proper(X)) |
(18) |
proper(s(X)) |
→ |
s(proper(X)) |
(19) |
proper(cons1(X1,X2)) |
→ |
cons1(proper(X1),proper(X2)) |
(20) |
from(ok(X)) |
→ |
ok(from(X)) |
(23) |
s(ok(X)) |
→ |
ok(s(X)) |
(24) |
1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.