Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex15_Luc98_FR)

The rewrite relation of the following TRS is considered.

and(true,X) activate(X) (1)
and(false,Y) false (2)
if(true,X,Y) activate(X) (3)
if(false,X,Y) activate(Y) (4)
add(0,X) activate(X) (5)
add(s(X),Y) s(n__add(activate(X),activate(Y))) (6)
first(0,X) nil (7)
first(s(X),cons(Y,Z)) cons(activate(Y),n__first(activate(X),activate(Z))) (8)
from(X) cons(activate(X),n__from(n__s(activate(X)))) (9)
add(X1,X2) n__add(X1,X2) (10)
first(X1,X2) n__first(X1,X2) (11)
from(X) n__from(X) (12)
s(X) n__s(X) (13)
activate(n__add(X1,X2)) add(activate(X1),X2) (14)
activate(n__first(X1,X2)) first(activate(X1),activate(X2)) (15)
activate(n__from(X)) from(X) (16)
activate(n__s(X)) s(X) (17)
activate(X) X (18)

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(n__from) = 0 status(n__from) = [1] list-extension(n__from) = Lex
prec(n__s) = 0 status(n__s) = [1] list-extension(n__s) = Lex
prec(from) = 1 status(from) = [1] list-extension(from) = Lex
prec(n__first) = 0 status(n__first) = [1, 2] list-extension(n__first) = Lex
prec(cons) = 0 status(cons) = [1, 2] list-extension(cons) = Lex
prec(nil) = 0 status(nil) = [] list-extension(nil) = Lex
prec(first) = 1 status(first) = [2, 1] list-extension(first) = Lex
prec(n__add) = 0 status(n__add) = [1, 2] list-extension(n__add) = Lex
prec(s) = 2 status(s) = [1] list-extension(s) = Lex
prec(add) = 3 status(add) = [2, 1] list-extension(add) = Lex
prec(0) = 0 status(0) = [] list-extension(0) = Lex
prec(if) = 0 status(if) = [3, 2, 1] list-extension(if) = Lex
prec(false) = 0 status(false) = [] list-extension(false) = Lex
prec(activate) = 4 status(activate) = [1] list-extension(activate) = Lex
prec(and) = 0 status(and) = [1, 2] list-extension(and) = Lex
prec(true) = 0 status(true) = [] list-extension(true) = Lex
and the following Max-polynomial interpretation
[n__from(x1)] = max(1, 1 + 1 · x1)
[n__s(x1)] = 0 + 1 · x1
[from(x1)] = max(0, 1 + 1 · x1)
[n__first(x1, x2)] = max(1, 3 + 1 · x1, 2 + 1 · x2)
[cons(x1, x2)] = max(0, 1 + 1 · x1, 0 + 1 · x2)
[nil] = max(1)
[first(x1, x2)] = max(3, 3 + 1 · x1, 2 + 1 · x2)
[n__add(x1, x2)] = max(0, 2 + 1 · x1, 1 + 1 · x2)
[s(x1)] = max(0, 0 + 1 · x1)
[add(x1, x2)] = max(0, 2 + 1 · x1, 1 + 1 · x2)
[0] = max(0)
[if(x1, x2, x3)] = max(6, 5 + 1 · x1, 5 + 1 · x2, 5 + 1 · x3)
[false] = max(0)
[activate(x1)] = max(0, 0 + 1 · x1)
[and(x1, x2)] = 1 + 1 · x1 + 1 · x2
[true] = max(0)
all of the following rules can be deleted.
and(true,X) activate(X) (1)
and(false,Y) false (2)
if(true,X,Y) activate(X) (3)
if(false,X,Y) activate(Y) (4)
add(0,X) activate(X) (5)
add(s(X),Y) s(n__add(activate(X),activate(Y))) (6)
first(0,X) nil (7)
first(s(X),cons(Y,Z)) cons(activate(Y),n__first(activate(X),activate(Z))) (8)
from(X) cons(activate(X),n__from(n__s(activate(X)))) (9)
add(X1,X2) n__add(X1,X2) (10)
first(X1,X2) n__first(X1,X2) (11)
from(X) n__from(X) (12)
s(X) n__s(X) (13)
activate(n__add(X1,X2)) add(activate(X1),X2) (14)
activate(n__first(X1,X2)) first(activate(X1),activate(X2)) (15)
activate(n__from(X)) from(X) (16)
activate(n__s(X)) s(X) (17)
activate(X) X (18)

1.1 R is empty

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