Certification Problem

Input (TPDB TRS_Standard/CiME_04/list-sum-prod-assoc)

The rewrite relation of the following TRS is considered.

+(x,0) x (1)
+(0,x) x (2)
+(s(x),s(y)) s(s(+(x,y))) (3)
+(+(x,y),z) +(x,+(y,z)) (4)
*(x,0) 0 (5)
*(0,x) 0 (6)
*(s(x),s(y)) s(+(*(x,y),+(x,y))) (7)
*(*(x,y),z) *(x,*(y,z)) (8)
sum(nil) 0 (9)
sum(cons(x,l)) +(x,sum(l)) (10)
prod(nil) s(0) (11)
prod(cons(x,l)) *(x,prod(l)) (12)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(+) = 2 stat(+) = lex
prec(0) = 0 stat(0) = mul
prec(s) = 1 stat(s) = mul
prec(*) = 3 stat(*) = lex
prec(sum) = 4 stat(sum) = mul
prec(nil) = 0 stat(nil) = mul
prec(cons) = 5 stat(cons) = mul
prec(prod) = 1 stat(prod) = mul

π(+) = [1,2]
π(0) = []
π(s) = [1]
π(*) = [1,2]
π(sum) = [1]
π(nil) = []
π(cons) = [1,2]
π(prod) = [1]

all of the following rules can be deleted.
+(x,0) x (1)
+(0,x) x (2)
+(s(x),s(y)) s(s(+(x,y))) (3)
+(+(x,y),z) +(x,+(y,z)) (4)
*(x,0) 0 (5)
*(0,x) 0 (6)
*(s(x),s(y)) s(+(*(x,y),+(x,y))) (7)
*(*(x,y),z) *(x,*(y,z)) (8)
sum(nil) 0 (9)
sum(cons(x,l)) +(x,sum(l)) (10)
prod(cons(x,l)) *(x,prod(l)) (12)

1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(nil) = 0 weight(nil) = 1
prec(0) = 3 weight(0) = 2
prec(prod) = 2 weight(prod) = 2
prec(s) = 1 weight(s) = 1
all of the following rules can be deleted.
prod(nil) s(0) (11)

1.1.1 R is empty

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