Certification Problem

Input (TPDB TRS_Standard/AProVE_07/otto06)

The rewrite relation of the following TRS is considered.

app(x,y) helpa(0,plus(length(x),length(y)),x,y) (1)
plus(x,0) x (2)
plus(x,s(y)) s(plus(x,y)) (3)
length(nil) 0 (4)
length(cons(x,y)) s(length(y)) (5)
helpa(c,l,ys,zs) if(ge(c,l),c,l,ys,zs) (6)
ge(x,0) true (7)
ge(0,s(x)) false (8)
ge(s(x),s(y)) ge(x,y) (9)
if(true,c,l,ys,zs) nil (10)
if(false,c,l,ys,zs) helpb(c,l,greater(ys,zs),smaller(ys,zs)) (11)
greater(ys,zs) helpc(ge(length(ys),length(zs)),ys,zs) (12)
smaller(ys,zs) helpc(ge(length(ys),length(zs)),zs,ys) (13)
helpc(true,ys,zs) ys (14)
helpc(false,ys,zs) zs (15)
helpb(c,l,cons(y,ys),zs) cons(y,helpa(s(c),l,ys,zs)) (16)

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.
app#(x,y) helpa#(0,plus(length(x),length(y)),x,y) (17)
app#(x,y) plus#(length(x),length(y)) (18)
app#(x,y) length#(x) (19)
app#(x,y) length#(y) (20)
plus#(x,s(y)) plus#(x,y) (21)
length#(cons(x,y)) length#(y) (22)
helpa#(c,l,ys,zs) if#(ge(c,l),c,l,ys,zs) (23)
helpa#(c,l,ys,zs) ge#(c,l) (24)
ge#(s(x),s(y)) ge#(x,y) (25)
if#(false,c,l,ys,zs) helpb#(c,l,greater(ys,zs),smaller(ys,zs)) (26)
if#(false,c,l,ys,zs) greater#(ys,zs) (27)
if#(false,c,l,ys,zs) smaller#(ys,zs) (28)
greater#(ys,zs) helpc#(ge(length(ys),length(zs)),ys,zs) (29)
greater#(ys,zs) ge#(length(ys),length(zs)) (30)
greater#(ys,zs) length#(ys) (31)
greater#(ys,zs) length#(zs) (32)
smaller#(ys,zs) helpc#(ge(length(ys),length(zs)),zs,ys) (33)
smaller#(ys,zs) ge#(length(ys),length(zs)) (34)
smaller#(ys,zs) length#(ys) (35)
smaller#(ys,zs) length#(zs) (36)
helpb#(c,l,cons(y,ys),zs) helpa#(s(c),l,ys,zs) (37)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 4 components.