Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex2_Luc03b_Z)

The rewrite relation of the following TRS is considered.

fst(0,Z) nil (1)
fst(s(X),cons(Y,Z)) cons(Y,n__fst(activate(X),activate(Z))) (2)
from(X) cons(X,n__from(s(X))) (3)
add(0,X) X (4)
add(s(X),Y) s(n__add(activate(X),Y)) (5)
len(nil) 0 (6)
len(cons(X,Z)) s(n__len(activate(Z))) (7)
fst(X1,X2) n__fst(X1,X2) (8)
from(X) n__from(X) (9)
add(X1,X2) n__add(X1,X2) (10)
len(X) n__len(X) (11)
activate(n__fst(X1,X2)) fst(X1,X2) (12)
activate(n__from(X)) from(X) (13)
activate(n__add(X1,X2)) add(X1,X2) (14)
activate(n__len(X)) len(X) (15)
activate(X) X (16)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the linear polynomial interpretation over the naturals
[fst(x1, x2)] = 2 + 2 · x1 + 2 · x2
[0] = 0
[nil] = 0
[s(x1)] = 1 + 1 · x1
[cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[n__fst(x1, x2)] = 1 · x1 + 1 · x2
[activate(x1)] = 2 + 2 · x1
[from(x1)] = 2 + 2 · x1
[n__from(x1)] = 1 · x1
[add(x1, x2)] = 1 + 2 · x1 + 2 · x2
[n__add(x1, x2)] = 1 · x1 + 2 · x2
[len(x1)] = 1 + 2 · x1
[n__len(x1)] = 1 · x1
all of the following rules can be deleted.
fst(0,Z) nil (1)
fst(s(X),cons(Y,Z)) cons(Y,n__fst(activate(X),activate(Z))) (2)
add(0,X) X (4)
len(nil) 0 (6)
fst(X1,X2) n__fst(X1,X2) (8)
from(X) n__from(X) (9)
add(X1,X2) n__add(X1,X2) (10)
len(X) n__len(X) (11)
activate(n__add(X1,X2)) add(X1,X2) (14)
activate(n__len(X)) len(X) (15)
activate(X) X (16)

1.1 Rule Removal

Using the
prec(from) = 1 stat(from) = mul
prec(cons) = 0 stat(cons) = lex
prec(add) = 3 stat(add) = mul
prec(n__add) = 2 stat(n__add) = lex
prec(activate) = 1 stat(activate) = mul
prec(len) = 4 stat(len) = mul
prec(n__fst) = 5 stat(n__fst) = mul
prec(fst) = 5 stat(fst) = mul

π(from) = [1]
π(cons) = [2,1]
π(n__from) = 1
π(s) = 1
π(add) = [1,2]
π(n__add) = [2,1]
π(activate) = [1]
π(len) = [1]
π(n__len) = 1
π(n__fst) = [1,2]
π(fst) = [1,2]

all of the following rules can be deleted.
from(X) cons(X,n__from(s(X))) (3)
add(s(X),Y) s(n__add(activate(X),Y)) (5)
len(cons(X,Z)) s(n__len(activate(Z))) (7)
activate(n__fst(X1,X2)) fst(X1,X2) (12)

1.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) (13)

1.1.1.1 R is empty

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