Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex7_BLR02_Z)

The rewrite relation of the following TRS is considered.

from(X) cons(X,n__from(s(X))) (1)
head(cons(X,XS)) X (2)
2nd(cons(X,XS)) head(activate(XS)) (3)
take(0,XS) nil (4)
take(s(N),cons(X,XS)) cons(X,n__take(N,activate(XS))) (5)
sel(0,cons(X,XS)) X (6)
sel(s(N),cons(X,XS)) sel(N,activate(XS)) (7)
from(X) n__from(X) (8)
take(X1,X2) n__take(X1,X2) (9)
activate(n__from(X)) from(X) (10)
activate(n__take(X1,X2)) take(X1,X2) (11)
activate(X) X (12)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(from) = 4 stat(from) = mul
prec(cons) = 1 stat(cons) = mul
prec(s) = 2 stat(s) = mul
prec(head) = 5 stat(head) = mul
prec(2nd) = 6 stat(2nd) = mul
prec(activate) = 4 stat(activate) = mul
prec(take) = 4 stat(take) = mul
prec(0) = 3 stat(0) = mul
prec(nil) = 3 stat(nil) = mul
prec(n__take) = 0 stat(n__take) = mul
prec(sel) = 7 stat(sel) = lex

π(from) = [1]
π(cons) = [1,2]
π(n__from) = 1
π(s) = [1]
π(head) = [1]
π(2nd) = [1]
π(activate) = [1]
π(take) = [1,2]
π(0) = []
π(nil) = []
π(n__take) = [1,2]
π(sel) = [1,2]

all of the following rules can be deleted.
from(X) cons(X,n__from(s(X))) (1)
head(cons(X,XS)) X (2)
2nd(cons(X,XS)) head(activate(XS)) (3)
take(0,XS) nil (4)
take(s(N),cons(X,XS)) cons(X,n__take(N,activate(XS))) (5)
sel(0,cons(X,XS)) X (6)
sel(s(N),cons(X,XS)) sel(N,activate(XS)) (7)
from(X) n__from(X) (8)
take(X1,X2) n__take(X1,X2) (9)
activate(n__take(X1,X2)) take(X1,X2) (11)
activate(X) X (12)

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__from) = 0 weight(n__from) = 1
prec(from) = 1 weight(from) = 2
all of the following rules can be deleted.
activate(n__from(X)) from(X) (10)

1.1.1 R is empty

There are no rules in the TRS. Hence, it is terminating.