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

1 Rule Removal

Using the Weighted Path Order with the following precedence and status
prec(sel) = 0 status(sel) = [1, 2] list-extension(sel) = Lex
prec(n__first) = 0 status(n__first) = [2, 1] list-extension(n__first) = Lex
prec(activate) = 6 status(activate) = [1] list-extension(activate) = Lex
prec(nil) = 0 status(nil) = [] list-extension(nil) = Lex
prec(first) = 1 status(first) = [2, 1] list-extension(first) = Lex
prec(0) = 0 status(0) = [] list-extension(0) = Lex
prec(cons) = 0 status(cons) = [2, 1] list-extension(cons) = Lex
prec(n__from) = 0 status(n__from) = [1] list-extension(n__from) = Lex
prec(s) = 0 status(s) = [1] list-extension(s) = Lex
prec(from) = 1 status(from) = [1] list-extension(from) = Lex
and the following Max-polynomial interpretation
[sel(x1, x2)] = max(2, 5 + 1 · x1, 1 + 1 · x2)
[n__first(x1, x2)] = 1 + 1 · x1 + 1 · x2
[activate(x1)] = max(0, 0 + 1 · x1)
[nil] = max(0)
[first(x1, x2)] = 1 + 1 · x1 + 1 · x2
[0] = max(0)
[cons(x1, x2)] = max(0, 0 + 1 · x1, 0 + 1 · x2)
[n__from(x1)] = max(0, 0 + 1 · x1)
[s(x1)] = max(0, 0 + 1 · x1)
[from(x1)] = max(0, 0 + 1 · x1)
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__from(X)) from(X) (8)
activate(n__first(X1,X2)) first(X1,X2) (9)
activate(X) X (10)

1.1 R is empty

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