Certification Problem

Input (TPDB TRS_Standard/AProVE_07/thiemann16)

The rewrite relation of the following TRS is considered.

check(0) zero (1)
check(s(0)) odd (2)
check(s(s(0))) even (3)
check(s(s(s(x)))) check(s(x)) (4)
half(0) 0 (5)
half(s(0)) 0 (6)
half(s(s(x))) s(half(x)) (7)
plus(0,y) y (8)
plus(s(x),y) s(plus(x,y)) (9)
times(x,y) timesIter(x,y,0) (10)
timesIter(x,y,z) if(check(x),x,y,z,plus(z,y)) (11)
p(s(x)) x (12)
p(0) 0 (13)
if(zero,x,y,z,u) z (14)
if(odd,x,y,z,u) timesIter(p(x),y,u) (15)
if(even,x,y,z,u) plus(timesIter(half(x),y,half(z)),timesIter(half(x),y,half(s(z)))) (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.
check#(s(s(s(x)))) check#(s(x)) (17)
half#(s(s(x))) half#(x) (18)
plus#(s(x),y) plus#(x,y) (19)
times#(x,y) timesIter#(x,y,0) (20)
timesIter#(x,y,z) if#(check(x),x,y,z,plus(z,y)) (21)
timesIter#(x,y,z) check#(x) (22)
timesIter#(x,y,z) plus#(z,y) (23)
if#(odd,x,y,z,u) timesIter#(p(x),y,u) (24)
if#(odd,x,y,z,u) p#(x) (25)
if#(even,x,y,z,u) plus#(timesIter(half(x),y,half(z)),timesIter(half(x),y,half(s(z)))) (26)
if#(even,x,y,z,u) timesIter#(half(x),y,half(z)) (27)
if#(even,x,y,z,u) half#(x) (28)
if#(even,x,y,z,u) half#(z) (29)
if#(even,x,y,z,u) timesIter#(half(x),y,half(s(z))) (30)
if#(even,x,y,z,u) half#(s(z)) (31)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 4 components.