Certification Problem

Input (TPDB TRS_Innermost/Mixed_innermost/wiehe14)

The rewrite relation of the following TRS is considered.

even(0) true (1)
even(s(0)) false (2)
even(s(s(x))) even(x) (3)
half(0) 0 (4)
half(s(s(x))) s(half(x)) (5)
plus(s(x),s(y)) s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) (6)
plus(s(x),x) plus(if(gt(x,x),id(x),id(x)),s(x)) (7)
plus(zero,y) y (8)
plus(id(x),s(y)) s(plus(x,if(gt(s(y),y),y,s(y)))) (9)
id(x) x (10)
if(true,x,y) x (11)
if(false,x,y) y (12)
not(x) if(x,false,true) (13)
gt(s(x),zero) true (14)
gt(zero,y) false (15)
gt(s(x),s(y)) gt(x,y) (16)
times(0,y) 0 (17)
times(s(x),y) if_times(even(s(x)),s(x),y) (18)
if_times(true,s(x),y) plus(times(half(s(x)),y),times(half(s(x)),y)) (19)
if_times(false,s(x),y) plus(y,times(x,y)) (20)
The evaluation strategy is innermost.

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Dependency Pair Transformation

The following set of initial dependency pairs has been identified.
even#(s(s(x))) even#(x) (21)
half#(s(s(x))) half#(x) (22)
plus#(s(x),s(y)) plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) (23)
plus#(s(x),s(y)) if#(gt(x,y),x,y) (24)
plus#(s(x),s(y)) gt#(x,y) (25)
plus#(s(x),s(y)) if#(not(gt(x,y)),id(x),id(y)) (26)
plus#(s(x),s(y)) not#(gt(x,y)) (27)
plus#(s(x),s(y)) id#(x) (28)
plus#(s(x),s(y)) id#(y) (29)
plus#(s(x),x) plus#(if(gt(x,x),id(x),id(x)),s(x)) (30)
plus#(s(x),x) if#(gt(x,x),id(x),id(x)) (31)
plus#(s(x),x) gt#(x,x) (32)
plus#(s(x),x) id#(x) (33)
plus#(id(x),s(y)) plus#(x,if(gt(s(y),y),y,s(y))) (34)
plus#(id(x),s(y)) if#(gt(s(y),y),y,s(y)) (35)
plus#(id(x),s(y)) gt#(s(y),y) (36)
not#(x) if#(x,false,true) (37)
gt#(s(x),s(y)) gt#(x,y) (38)
times#(s(x),y) if_times#(even(s(x)),s(x),y) (39)
times#(s(x),y) even#(s(x)) (40)
if_times#(true,s(x),y) plus#(times(half(s(x)),y),times(half(s(x)),y)) (41)
if_times#(true,s(x),y) times#(half(s(x)),y) (42)
if_times#(true,s(x),y) half#(s(x)) (43)
if_times#(false,s(x),y) plus#(y,times(x,y)) (44)
if_times#(false,s(x),y) times#(x,y) (45)

1.1 Dependency Graph Processor

The dependency pairs are split into 5 components.