Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/ExSec11_1_Luc02a_FR)

The rewrite relation of the following TRS is considered.

terms(N) cons(recip(sqr(N)),n__terms(n__s(N))) (1)
sqr(0) 0 (2)
sqr(s(X)) s(add(sqr(X),dbl(X))) (3)
dbl(0) 0 (4)
dbl(s(X)) s(s(dbl(X))) (5)
add(0,X) X (6)
add(s(X),Y) s(add(X,Y)) (7)
first(0,X) nil (8)
first(s(X),cons(Y,Z)) cons(Y,n__first(X,activate(Z))) (9)
half(0) 0 (10)
half(s(0)) 0 (11)
half(s(s(X))) s(half(X)) (12)
half(dbl(X)) X (13)
terms(X) n__terms(X) (14)
s(X) n__s(X) (15)
first(X1,X2) n__first(X1,X2) (16)
activate(n__terms(X)) terms(activate(X)) (17)
activate(n__s(X)) s(activate(X)) (18)
activate(n__first(X1,X2)) first(activate(X1),activate(X2)) (19)
activate(X) X (20)

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

1.1 R is empty

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