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 ttt2 @ termCOMP 2023)

1 Dependency Pair Transformation

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

1.1 Dependency Graph Processor

The dependency pairs are split into 5 components.