Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex2_Luc03b_GM)

The rewrite relation of the following TRS is considered.

a__fst(0,Z) nil (1)
a__fst(s(X),cons(Y,Z)) cons(mark(Y),fst(X,Z)) (2)
a__from(X) cons(mark(X),from(s(X))) (3)
a__add(0,X) mark(X) (4)
a__add(s(X),Y) s(add(X,Y)) (5)
a__len(nil) 0 (6)
a__len(cons(X,Z)) s(len(Z)) (7)
mark(fst(X1,X2)) a__fst(mark(X1),mark(X2)) (8)
mark(from(X)) a__from(mark(X)) (9)
mark(add(X1,X2)) a__add(mark(X1),mark(X2)) (10)
mark(len(X)) a__len(mark(X)) (11)
mark(0) 0 (12)
mark(s(X)) s(X) (13)
mark(nil) nil (14)
mark(cons(X1,X2)) cons(mark(X1),X2) (15)
a__fst(X1,X2) fst(X1,X2) (16)
a__from(X) from(X) (17)
a__add(X1,X2) add(X1,X2) (18)
a__len(X) len(X) (19)

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(len) = 0 status(len) = [1] list-extension(len) = Lex
prec(a__len) = 1 status(a__len) = [1] list-extension(a__len) = Lex
prec(add) = 0 status(add) = [2, 1] list-extension(add) = Lex
prec(a__add) = 2 status(a__add) = [2, 1] list-extension(a__add) = Lex
prec(from) = 0 status(from) = [1] list-extension(from) = Lex
prec(a__from) = 2 status(a__from) = [1] list-extension(a__from) = Lex
prec(fst) = 0 status(fst) = [1, 2] list-extension(fst) = Lex
prec(mark) = 3 status(mark) = [1] list-extension(mark) = Lex
prec(cons) = 0 status(cons) = [1, 2] list-extension(cons) = Lex
prec(s) = 0 status(s) = [1] list-extension(s) = Lex
prec(nil) = 0 status(nil) = [] list-extension(nil) = Lex
prec(a__fst) = 1 status(a__fst) = [1, 2] list-extension(a__fst) = Lex
prec(0) = 0 status(0) = [] list-extension(0) = Lex
and the following Max-polynomial interpretation
[len(x1)] = max(0, 0 + 1 · x1)
[a__len(x1)] = 0 + 1 · x1
[add(x1, x2)] = max(0, 2 + 1 · x1, 1 + 1 · x2)
[a__add(x1, x2)] = max(0, 2 + 1 · x1, 1 + 1 · x2)
[from(x1)] = max(0, 2 + 1 · x1)
[a__from(x1)] = max(0, 2 + 1 · x1)
[fst(x1, x2)] = 0 + 1 · x1 + 1 · x2
[mark(x1)] = max(0, 0 + 1 · x1)
[cons(x1, x2)] = max(2, 1 + 1 · x1, 0 + 1 · x2)
[s(x1)] = max(0, 0 + 1 · x1)
[nil] = max(2)
[a__fst(x1, x2)] = 0 + 1 · x1 + 1 · x2
[0] = max(2)
all of the following rules can be deleted.
a__fst(0,Z) nil (1)
a__fst(s(X),cons(Y,Z)) cons(mark(Y),fst(X,Z)) (2)
a__from(X) cons(mark(X),from(s(X))) (3)
a__add(0,X) mark(X) (4)
a__add(s(X),Y) s(add(X,Y)) (5)
a__len(nil) 0 (6)
a__len(cons(X,Z)) s(len(Z)) (7)
mark(fst(X1,X2)) a__fst(mark(X1),mark(X2)) (8)
mark(from(X)) a__from(mark(X)) (9)
mark(add(X1,X2)) a__add(mark(X1),mark(X2)) (10)
mark(len(X)) a__len(mark(X)) (11)
mark(0) 0 (12)
mark(s(X)) s(X) (13)
mark(nil) nil (14)
mark(cons(X1,X2)) cons(mark(X1),X2) (15)
a__fst(X1,X2) fst(X1,X2) (16)
a__from(X) from(X) (17)
a__add(X1,X2) add(X1,X2) (18)
a__len(X) len(X) (19)

1.1 R is empty

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