Certification Problem

Input (TPDB TRS_Standard/AProVE_04/IJCAR_26a)

The rewrite relation of the following TRS is considered.

p(0) 0 (1)
p(s(x)) x (2)
plus(x,0) x (3)
plus(0,y) y (4)
plus(s(x),y) s(plus(x,y)) (5)
plus(s(x),y) s(plus(p(s(x)),y)) (6)
plus(x,s(y)) s(plus(x,p(s(y)))) (7)
times(0,y) 0 (8)
times(s(0),y) y (9)
times(s(x),y) plus(y,times(x,y)) (10)
div(0,y) 0 (11)
div(x,y) quot(x,y,y) (12)
quot(0,s(y),z) 0 (13)
quot(s(x),s(y),z) quot(x,y,z) (14)
quot(x,0,s(z)) s(div(x,s(z))) (15)
div(div(x,y),z) div(x,times(y,z)) (16)
eq(0,0) true (17)
eq(s(x),0) false (18)
eq(0,s(y)) false (19)
eq(s(x),s(y)) eq(x,y) (20)
divides(y,x) eq(x,times(div(x,y),y)) (21)
prime(s(s(x))) pr(s(s(x)),s(x)) (22)
pr(x,s(0)) true (23)
pr(x,s(s(y))) if(divides(s(s(y)),x),x,s(y)) (24)
if(true,x,y) false (25)
if(false,x,y) pr(x,y) (26)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by NaTT @ termCOMP 2023)

1 Dependency Pair Transformation

The following set of initial dependency pairs has been identified.
plus#(s(x),y) p#(s(x)) (27)
quot#(s(x),s(y),z) quot#(x,y,z) (28)
prime#(s(s(x))) pr#(s(s(x)),s(x)) (29)
plus#(x,s(y)) p#(s(y)) (30)
times#(s(x),y) times#(x,y) (31)
plus#(s(x),y) plus#(x,y) (32)
if#(false,x,y) pr#(x,y) (33)
quot#(x,0,s(z)) div#(x,s(z)) (34)
eq#(s(x),s(y)) eq#(x,y) (35)
times#(s(x),y) plus#(y,times(x,y)) (36)
div#(x,y) quot#(x,y,y) (37)
divides#(y,x) div#(x,y) (38)
div#(div(x,y),z) times#(y,z) (39)
divides#(y,x) times#(div(x,y),y) (40)
pr#(x,s(s(y))) if#(divides(s(s(y)),x),x,s(y)) (41)
plus#(s(x),y) plus#(p(s(x)),y) (42)
plus#(x,s(y)) plus#(x,p(s(y))) (43)
divides#(y,x) eq#(x,times(div(x,y),y)) (44)
pr#(x,s(s(y))) divides#(s(s(y)),x) (45)
div#(div(x,y),z) div#(x,times(y,z)) (46)

1.1 Dependency Graph Processor

The dependency pairs are split into 5 components.