Certification Problem
Input (TPDB TRS_Standard/Transformed_CSR_04/Ex9_BLR02_L)
The rewrite relation of the following TRS is considered.
filter(cons(X),0,M) |
→ |
cons(0) |
(1) |
filter(cons(X),s(N),M) |
→ |
cons(X) |
(2) |
sieve(cons(0)) |
→ |
cons(0) |
(3) |
sieve(cons(s(N))) |
→ |
cons(s(N)) |
(4) |
nats(N) |
→ |
cons(N) |
(5) |
zprimes |
→ |
sieve(nats(s(s(0)))) |
(6) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by ttt2 @ termCOMP 2023)
1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(zprimes) |
= |
4 |
|
weight(zprimes) |
= |
7 |
|
|
|
prec(nats) |
= |
3 |
|
weight(nats) |
= |
1 |
|
|
|
prec(sieve) |
= |
1 |
|
weight(sieve) |
= |
4 |
|
|
|
prec(s) |
= |
7 |
|
weight(s) |
= |
0 |
|
|
|
prec(filter) |
= |
0 |
|
weight(filter) |
= |
1 |
|
|
|
prec(0) |
= |
6 |
|
weight(0) |
= |
2 |
|
|
|
prec(cons) |
= |
2 |
|
weight(cons) |
= |
1 |
|
|
|
all of the following rules can be deleted.
filter(cons(X),0,M) |
→ |
cons(0) |
(1) |
filter(cons(X),s(N),M) |
→ |
cons(X) |
(2) |
sieve(cons(0)) |
→ |
cons(0) |
(3) |
sieve(cons(s(N))) |
→ |
cons(s(N)) |
(4) |
nats(N) |
→ |
cons(N) |
(5) |
zprimes |
→ |
sieve(nats(s(s(0)))) |
(6) |
1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.