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

1.1.1 Dependency Graph Processor

The dependency pairs are split into 7 components.