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 AProVE @ termCOMP 2023)

1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(0) = 1 weight(0) = 3
prec(zprimes) = 5 weight(zprimes) = 8
prec(cons) = 3 weight(cons) = 1
prec(s) = 4 weight(s) = 1
prec(sieve) = 6 weight(sieve) = 0
prec(nats) = 2 weight(nats) = 2
prec(filter) = 0 weight(filter) = 0
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.