Certification Problem

Input (TPDB TRS_Standard/AProVE_07/thiemann06)

The rewrite relation of the following TRS is considered.

p(s(x)) x (1)
p(0) 0 (2)
le(0,y) true (3)
le(s(x),0) false (4)
le(s(x),s(y)) le(x,y) (5)
average(x,y) if(le(x,0),le(y,0),le(y,s(0)),le(y,s(s(0))),x,y) (6)
if(true,b1,b2,b3,x,y) if2(b1,b2,b3,x,y) (7)
if(false,b1,b2,b3,x,y) average(p(x),s(y)) (8)
if2(true,b2,b3,x,y) 0 (9)
if2(false,b2,b3,x,y) if3(b2,b3,x,y) (10)
if3(true,b3,x,y) 0 (11)
if3(false,b3,x,y) if4(b3,x,y) (12)
if4(true,x,y) s(0) (13)
if4(false,x,y) average(s(x),p(p(y))) (14)

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.
le#(s(x),s(y)) le#(x,y) (15)
average#(x,y) if#(le(x,0),le(y,0),le(y,s(0)),le(y,s(s(0))),x,y) (16)
average#(x,y) le#(x,0) (17)
average#(x,y) le#(y,0) (18)
average#(x,y) le#(y,s(0)) (19)
average#(x,y) le#(y,s(s(0))) (20)
if#(true,b1,b2,b3,x,y) if2#(b1,b2,b3,x,y) (21)
if#(false,b1,b2,b3,x,y) average#(p(x),s(y)) (22)
if#(false,b1,b2,b3,x,y) p#(x) (23)
if2#(false,b2,b3,x,y) if3#(b2,b3,x,y) (24)
if3#(false,b3,x,y) if4#(b3,x,y) (25)
if4#(false,x,y) average#(s(x),p(p(y))) (26)
if4#(false,x,y) p#(p(y)) (27)
if4#(false,x,y) p#(y) (28)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 2 components.