Certification Problem

Input (TPDB TRS_Standard/AProVE_07/thiemann07)

The rewrite relation of the following TRS is considered.

car(cons(x,l)) x (1)
cddr(nil) nil (2)
cddr(cons(x,nil)) nil (3)
cddr(cons(x,cons(y,l))) l (4)
cadr(cons(x,cons(y,l))) y (5)
isZero(0) true (6)
isZero(s(x)) false (7)
plus(x,y) ifplus(isZero(x),x,y) (8)
ifplus(true,x,y) y (9)
ifplus(false,x,y) s(plus(p(x),y)) (10)
times(x,y) iftimes(isZero(x),x,y) (11)
iftimes(true,x,y) 0 (12)
iftimes(false,x,y) plus(y,times(p(x),y)) (13)
p(s(x)) x (14)
p(0) 0 (15)
shorter(nil,y) true (16)
shorter(cons(x,l),0) false (17)
shorter(cons(x,l),s(y)) shorter(l,y) (18)
prod(l) if(shorter(l,0),shorter(l,s(0)),l) (19)
if(true,b,l) s(0) (20)
if(false,b,l) if2(b,l) (21)
if2(true,l) car(l) (22)
if2(false,l) prod(cons(times(car(l),cadr(l)),cddr(l))) (23)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Switch to Innermost Termination

The TRS is overlay and locally confluent:

10

Hence, it suffices to show innermost termination in the following.

1.1 Dependency Pair Transformation

The following set of initial dependency pairs has been identified.
plus#(x,y) ifplus#(isZero(x),x,y) (24)
plus#(x,y) isZero#(x) (25)
ifplus#(false,x,y) plus#(p(x),y) (26)
ifplus#(false,x,y) p#(x) (27)
times#(x,y) iftimes#(isZero(x),x,y) (28)
times#(x,y) isZero#(x) (29)
iftimes#(false,x,y) plus#(y,times(p(x),y)) (30)
iftimes#(false,x,y) times#(p(x),y) (31)
iftimes#(false,x,y) p#(x) (32)
shorter#(cons(x,l),s(y)) shorter#(l,y) (33)
prod#(l) if#(shorter(l,0),shorter(l,s(0)),l) (34)
prod#(l) shorter#(l,0) (35)
prod#(l) shorter#(l,s(0)) (36)
if#(false,b,l) if2#(b,l) (37)
if2#(true,l) car#(l) (38)
if2#(false,l) prod#(cons(times(car(l),cadr(l)),cddr(l))) (39)
if2#(false,l) times#(car(l),cadr(l)) (40)
if2#(false,l) car#(l) (41)
if2#(false,l) cadr#(l) (42)
if2#(false,l) cddr#(l) (43)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 4 components.