Certification Problem

Input (TPDB TRS_Standard/AProVE_07/otto02)

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,ys,zs) (11)
take(0,cons(x,xs),ys) x (12)
take(0,nil,cons(y,ys)) y (13)
take(s(c),cons(x,xs),ys) take(c,xs,ys) (14)
take(s(c),nil,cons(y,ys)) take(c,nil,ys) (15)
helpb(c,l,ys,zs) cons(take(c,ys,zs),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,ys,zs) (26)
take#(s(c),cons(x,xs),ys) take#(c,xs,ys) (27)
take#(s(c),nil,cons(y,ys)) take#(c,nil,ys) (28)
helpb#(c,l,ys,zs) take#(c,ys,zs) (29)
helpb#(c,l,ys,zs) helpa#(s(c),l,ys,zs) (30)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 5 components.