Certification Problem

Input (TPDB TRS_Standard/AG01/#3.55)

The rewrite relation of the following TRS is considered.

minus(x,0) x (1)
minus(s(x),s(y)) minus(x,y) (2)
quot(0,s(y)) 0 (3)
quot(s(x),s(y)) s(quot(minus(x,y),s(y))) (4)
le(0,y) true (5)
le(s(x),0) false (6)
le(s(x),s(y)) le(x,y) (7)
app(nil,y) y (8)
app(add(n,x),y) add(n,app(x,y)) (9)
low(n,nil) nil (10)
low(n,add(m,x)) if_low(le(m,n),n,add(m,x)) (11)
if_low(true,n,add(m,x)) add(m,low(n,x)) (12)
if_low(false,n,add(m,x)) low(n,x) (13)
high(n,nil) nil (14)
high(n,add(m,x)) if_high(le(m,n),n,add(m,x)) (15)
if_high(true,n,add(m,x)) high(n,x) (16)
if_high(false,n,add(m,x)) add(m,high(n,x)) (17)
quicksort(nil) nil (18)
quicksort(add(n,x)) app(quicksort(low(n,x)),add(n,quicksort(high(n,x)))) (19)

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.
if_low#(false,n,add(m,x)) low#(n,x) (20)
if_low#(true,n,add(m,x)) low#(n,x) (21)
quicksort#(add(n,x)) high#(n,x) (22)
quicksort#(add(n,x)) app#(quicksort(low(n,x)),add(n,quicksort(high(n,x)))) (23)
quicksort#(add(n,x)) low#(n,x) (24)
quicksort#(add(n,x)) quicksort#(high(n,x)) (25)
if_high#(true,n,add(m,x)) high#(n,x) (26)
le#(s(x),s(y)) le#(x,y) (27)
quicksort#(add(n,x)) quicksort#(low(n,x)) (28)
low#(n,add(m,x)) le#(m,n) (29)
quot#(s(x),s(y)) quot#(minus(x,y),s(y)) (30)
high#(n,add(m,x)) le#(m,n) (31)
app#(add(n,x),y) app#(x,y) (32)
minus#(s(x),s(y)) minus#(x,y) (33)
if_high#(false,n,add(m,x)) high#(n,x) (34)
high#(n,add(m,x)) if_high#(le(m,n),n,add(m,x)) (35)
low#(n,add(m,x)) if_low#(le(m,n),n,add(m,x)) (36)
quot#(s(x),s(y)) minus#(x,y) (37)

1.1 Dependency Graph Processor

The dependency pairs are split into 7 components.