Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex1_Luc02b_Z)

The rewrite relation of the following TRS is considered.

from(X) cons(X,n__from(s(X))) (1)
first(0,Z) nil (2)
first(s(X),cons(Y,Z)) cons(Y,n__first(X,activate(Z))) (3)
sel(0,cons(X,Z)) X (4)
sel(s(X),cons(Y,Z)) sel(X,activate(Z)) (5)
from(X) n__from(X) (6)
first(X1,X2) n__first(X1,X2) (7)
activate(n__from(X)) from(X) (8)
activate(n__first(X1,X2)) first(X1,X2) (9)
activate(X) X (10)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(from) = 4 stat(from) = lex
prec(cons) = 0 stat(cons) = mul
prec(s) = 2 stat(s) = mul
prec(first) = 4 stat(first) = lex
prec(0) = 5 stat(0) = mul
prec(nil) = 3 stat(nil) = mul
prec(n__first) = 1 stat(n__first) = lex
prec(activate) = 4 stat(activate) = lex
prec(sel) = 6 stat(sel) = lex

π(from) = [1]
π(cons) = [1,2]
π(n__from) = 1
π(s) = [1]
π(first) = [2,1]
π(0) = []
π(nil) = []
π(n__first) = [1,2]
π(activate) = [1]
π(sel) = [1,2]

all of the following rules can be deleted.
from(X) cons(X,n__from(s(X))) (1)
first(0,Z) nil (2)
first(s(X),cons(Y,Z)) cons(Y,n__first(X,activate(Z))) (3)
sel(0,cons(X,Z)) X (4)
sel(s(X),cons(Y,Z)) sel(X,activate(Z)) (5)
from(X) n__from(X) (6)
first(X1,X2) n__first(X1,X2) (7)
activate(n__first(X1,X2)) first(X1,X2) (9)
activate(X) X (10)

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) (8)

1.1.1 R is empty

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