Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/Ex4_Zan97_Z)
The rewrite relation of the following TRS is considered.
f(X) |
→ |
cons(X,n__f(g(X))) |
(1) |
g(0) |
→ |
s(0) |
(2) |
g(s(X)) |
→ |
s(s(g(X))) |
(3) |
sel(0,cons(X,Y)) |
→ |
X |
(4) |
sel(s(X),cons(Y,Z)) |
→ |
sel(X,activate(Z)) |
(5) |
f(X) |
→ |
n__f(X) |
(6) |
activate(n__f(X)) |
→ |
f(X) |
(7) |
activate(X) |
→ |
X |
(8) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
prec(f) |
= |
4 |
|
stat(f) |
= |
mul
|
prec(cons) |
= |
0 |
|
stat(cons) |
= |
mul
|
prec(g) |
= |
3 |
|
stat(g) |
= |
mul
|
prec(0) |
= |
1 |
|
stat(0) |
= |
mul
|
prec(s) |
= |
2 |
|
stat(s) |
= |
mul
|
prec(sel) |
= |
5 |
|
stat(sel) |
= |
lex
|
prec(activate) |
= |
4 |
|
stat(activate) |
= |
mul
|
π(f) |
= |
[1] |
π(cons) |
= |
[1,2] |
π(n__f) |
= |
1 |
π(g) |
= |
[1] |
π(0) |
= |
[] |
π(s) |
= |
[1] |
π(sel) |
= |
[1,2] |
π(activate) |
= |
[1] |
all of the following rules can be deleted.
f(X) |
→ |
cons(X,n__f(g(X))) |
(1) |
g(0) |
→ |
s(0) |
(2) |
g(s(X)) |
→ |
s(s(g(X))) |
(3) |
sel(0,cons(X,Y)) |
→ |
X |
(4) |
sel(s(X),cons(Y,Z)) |
→ |
sel(X,activate(Z)) |
(5) |
f(X) |
→ |
n__f(X) |
(6) |
activate(X) |
→ |
X |
(8) |
1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(activate) |
= |
2 |
|
weight(activate) |
= |
1 |
|
|
|
prec(n__f) |
= |
0 |
|
weight(n__f) |
= |
1 |
|
|
|
prec(f) |
= |
1 |
|
weight(f) |
= |
2 |
|
|
|
all of the following rules can be deleted.
activate(n__f(X)) |
→ |
f(X) |
(7) |
1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.