Certification Problem

Input (TPDB TRS_Standard/Transformed_CSR_04/Ex15_Luc98_GM)

The rewrite relation of the following TRS is considered.

a__and(true,X) mark(X) (1)
a__and(false,Y) false (2)
a__if(true,X,Y) mark(X) (3)
a__if(false,X,Y) mark(Y) (4)
a__add(0,X) mark(X) (5)
a__add(s(X),Y) s(add(X,Y)) (6)
a__first(0,X) nil (7)
a__first(s(X),cons(Y,Z)) cons(Y,first(X,Z)) (8)
a__from(X) cons(X,from(s(X))) (9)
mark(and(X1,X2)) a__and(mark(X1),X2) (10)
mark(if(X1,X2,X3)) a__if(mark(X1),X2,X3) (11)
mark(add(X1,X2)) a__add(mark(X1),X2) (12)
mark(first(X1,X2)) a__first(mark(X1),mark(X2)) (13)
mark(from(X)) a__from(X) (14)
mark(true) true (15)
mark(false) false (16)
mark(0) 0 (17)
mark(s(X)) s(X) (18)
mark(nil) nil (19)
mark(cons(X1,X2)) cons(X1,X2) (20)
a__and(X1,X2) and(X1,X2) (21)
a__if(X1,X2,X3) if(X1,X2,X3) (22)
a__add(X1,X2) add(X1,X2) (23)
a__first(X1,X2) first(X1,X2) (24)
a__from(X) from(X) (25)

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
[a__and(x1, x2)] = 2 + 1 · x1 + 2 · x2
[true] = 1
[mark(x1)] = 2 · x1
[false] = 1
[a__if(x1, x2, x3)] = 2 + 2 · x1 + 2 · x2 + 2 · x3
[a__add(x1, x2)] = 2 + 1 · x1 + 2 · x2
[0] = 1
[s(x1)] = 1 · x1
[add(x1, x2)] = 1 + 1 · x1 + 2 · x2
[a__first(x1, x2)] = 2 + 1 · x1 + 2 · x2
[nil] = 1
[cons(x1, x2)] = 1 + 1 · x1 + 1 · x2
[first(x1, x2)] = 1 + 1 · x1 + 2 · x2
[a__from(x1)] = 2 + 2 · x1
[from(x1)] = 1 + 1 · x1
[and(x1, x2)] = 1 + 1 · x1 + 2 · x2
[if(x1, x2, x3)] = 1 + 2 · x1 + 2 · x2 + 2 · x3
all of the following rules can be deleted.
a__and(true,X) mark(X) (1)
a__and(false,Y) false (2)
a__if(true,X,Y) mark(X) (3)
a__if(false,X,Y) mark(Y) (4)
a__add(0,X) mark(X) (5)
a__add(s(X),Y) s(add(X,Y)) (6)
a__first(0,X) nil (7)
a__first(s(X),cons(Y,Z)) cons(Y,first(X,Z)) (8)
mark(true) true (15)
mark(false) false (16)
mark(0) 0 (17)
mark(nil) nil (19)
mark(cons(X1,X2)) cons(X1,X2) (20)
a__and(X1,X2) and(X1,X2) (21)
a__if(X1,X2,X3) if(X1,X2,X3) (22)
a__add(X1,X2) add(X1,X2) (23)
a__first(X1,X2) first(X1,X2) (24)
a__from(X) from(X) (25)

1.1 Rule Removal

Using the linear polynomial interpretation over the naturals
[a__from(x1)] = 2 + 2 · x1
[cons(x1, x2)] = 1 · x1 + 1 · x2
[from(x1)] = 1 · x1
[s(x1)] = 1 + 1 · x1
[mark(x1)] = 2 + 2 · x1
[and(x1, x2)] = 1 + 2 · x1 + 1 · x2
[a__and(x1, x2)] = 1 · x1 + 2 · x2
[if(x1, x2, x3)] = 1 + 2 · x1 + 1 · x2 + 1 · x3
[a__if(x1, x2, x3)] = 1 + 1 · x1 + 2 · x2 + 2 · x3
[add(x1, x2)] = 2 + 2 · x1 + 1 · x2
[a__add(x1, x2)] = 1 + 2 · x1 + 2 · x2
[first(x1, x2)] = 2 + 2 · x1 + 2 · x2
[a__first(x1, x2)] = 1 · x1 + 1 · x2
all of the following rules can be deleted.
a__from(X) cons(X,from(s(X))) (9)
mark(and(X1,X2)) a__and(mark(X1),X2) (10)
mark(if(X1,X2,X3)) a__if(mark(X1),X2,X3) (11)
mark(add(X1,X2)) a__add(mark(X1),X2) (12)
mark(first(X1,X2)) a__first(mark(X1),mark(X2)) (13)
mark(s(X)) s(X) (18)

1.1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(mark) = 2 weight(mark) = 1
prec(from) = 0 weight(from) = 1
prec(a__from) = 1 weight(a__from) = 2
all of the following rules can be deleted.
mark(from(X)) a__from(X) (14)

1.1.1.1 R is empty

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