Certification Problem

Input (TPDB TRS_Standard/Secret_07_TRS/secret4)

The rewrite relation of the following TRS is considered.

a(h,h,h,x) s(x) (1)
a(l,x,s(y),h) a(l,x,y,s(h)) (2)
a(l,x,s(y),s(z)) a(l,x,y,a(l,x,s(y),z)) (3)
a(l,s(x),h,z) a(l,x,z,z) (4)
a(s(l),h,h,z) a(l,z,h,z) (5)
+(x,h) x (6)
+(h,x) x (7)
+(s(x),s(y)) s(s(+(x,y))) (8)
+(+(x,y),z) +(x,+(y,z)) (9)
s(h) 1 (10)
app(nil,k) k (11)
app(l,nil) l (12)
app(cons(x,l),k) cons(x,app(l,k)) (13)
sum(cons(x,nil)) cons(x,nil) (14)
sum(cons(x,cons(y,l))) sum(cons(a(x,y,h,h),l)) (15)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(a) = 2 stat(a) = lex
prec(h) = 0 stat(h) = lex
prec(s) = 1 stat(s) = lex
prec(+) = 3 stat(+) = lex
prec(1) = 1 stat(1) = lex
prec(app) = 6 stat(app) = lex
prec(nil) = 4 stat(nil) = lex
prec(cons) = 5 stat(cons) = lex

π(a) = [1,2,3,4]
π(h) = []
π(s) = [1]
π(+) = [1,2]
π(1) = []
π(app) = [2,1]
π(nil) = []
π(cons) = [2,1]
π(sum) = 1

all of the following rules can be deleted.
a(h,h,h,x) s(x) (1)
a(l,x,s(y),h) a(l,x,y,s(h)) (2)
a(l,x,s(y),s(z)) a(l,x,y,a(l,x,s(y),z)) (3)
a(l,s(x),h,z) a(l,x,z,z) (4)
a(s(l),h,h,z) a(l,z,h,z) (5)
+(x,h) x (6)
+(h,x) x (7)
+(s(x),s(y)) s(s(+(x,y))) (8)
+(+(x,y),z) +(x,+(y,z)) (9)
s(h) 1 (10)
app(nil,k) k (11)
app(l,nil) l (12)
app(cons(x,l),k) cons(x,app(l,k)) (13)
sum(cons(x,cons(y,l))) sum(cons(a(x,y,h,h),l)) (15)

1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(nil) = 1 weight(nil) = 1
prec(sum) = 2 weight(sum) = 0
prec(cons) = 0 weight(cons) = 0
all of the following rules can be deleted.
sum(cons(x,nil)) cons(x,nil) (14)

1.1.1 R is empty

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