Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/ExSec11_1_Luc02a_Z)

The rewrite relation of the following TRS is considered.

terms(N) cons(recip(sqr(N)),n__terms(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)
first(X1,X2) n__first(X1,X2) (15)
activate(n__terms(X)) terms(X) (16)
activate(n__first(X1,X2)) first(X1,X2) (17)
activate(X) X (18)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(terms) = 6 stat(terms) = mul
prec(cons) = 1 stat(cons) = mul
prec(sqr) = 5 stat(sqr) = mul
prec(s) = 3 stat(s) = mul
prec(0) = 2 stat(0) = mul
prec(add) = 4 stat(add) = lex
prec(dbl) = 5 stat(dbl) = mul
prec(first) = 6 stat(first) = mul
prec(nil) = 0 stat(nil) = mul
prec(n__first) = 1 stat(n__first) = mul
prec(activate) = 6 stat(activate) = mul

π(terms) = [1]
π(cons) = [1,2]
π(recip) = 1
π(sqr) = [1]
π(n__terms) = 1
π(s) = [1]
π(0) = []
π(add) = [2,1]
π(dbl) = [1]
π(first) = [1,2]
π(nil) = []
π(n__first) = [1,2]
π(activate) = [1]
π(half) = 1

all of the following rules can be deleted.
terms(N) cons(recip(sqr(N)),n__terms(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(s(0)) 0 (11)
half(s(s(X))) s(half(X)) (12)
half(dbl(X)) X (13)
terms(X) n__terms(X) (14)
first(X1,X2) n__first(X1,X2) (15)
activate(n__first(X1,X2)) first(X1,X2) (17)
activate(X) X (18)

1.1 Rule Removal

Using the linear polynomial interpretation over the naturals
[half(x1)] = 2 + 1 · x1
[0] = 2
[activate(x1)] = 2 + 1 · x1
[n__terms(x1)] = 2 + 2 · x1
[terms(x1)] = 2 · x1
all of the following rules can be deleted.
half(0) 0 (10)
activate(n__terms(X)) terms(X) (16)

1.1.1 R is empty

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