The rewrite relation of the following TRS is considered.
qsort(nil) | → | nil | (1) |
qsort(.(x,y)) | → | ++(qsort(lowers(x,y)),.(x,qsort(greaters(x,y)))) | (2) |
lowers(x,nil) | → | nil | (3) |
lowers(x,.(y,z)) | → | if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) | (4) |
greaters(x,nil) | → | nil | (5) |
greaters(x,.(y,z)) | → | if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) | (6) |
qsort#(.(x,y)) | → | lowers#(x,y) | (7) |
greaters#(x,.(y,z)) | → | greaters#(x,z) | (8) |
lowers#(x,.(y,z)) | → | lowers#(x,z) | (9) |
greaters#(x,.(y,z)) | → | greaters#(x,z) | (8) |
qsort#(.(x,y)) | → | qsort#(greaters(x,y)) | (10) |
qsort#(.(x,y)) | → | qsort#(lowers(x,y)) | (11) |
lowers#(x,.(y,z)) | → | lowers#(x,z) | (9) |
qsort#(.(x,y)) | → | greaters#(x,y) | (12) |
The dependency pairs are split into 3 components.
qsort#(.(x,y)) | → | qsort#(lowers(x,y)) | (11) |
qsort#(.(x,y)) | → | qsort#(greaters(x,y)) | (10) |
[lowers(x1, x2)] | = | x2 + 1 |
[greaters(x1, x2)] | = | x2 + 1 |
[<=(x1, x2)] | = | 1 |
[++(x1, x2)] | = | 0 |
[qsort(x1)] | = | 0 |
[qsort#(x1)] | = | x1 + 0 |
[if(x1, x2, x3)] | = | x2 + 0 |
[lowers#(x1, x2)] | = | 0 |
[nil] | = | 1 |
[greaters#(x1, x2)] | = | 0 |
[.(x1, x2)] | = | x2 + 2 |
lowers(x,.(y,z)) | → | if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) | (4) |
lowers(x,nil) | → | nil | (3) |
greaters(x,nil) | → | nil | (5) |
greaters(x,.(y,z)) | → | if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) | (6) |
qsort#(.(x,y)) | → | qsort#(lowers(x,y)) | (11) |
qsort#(.(x,y)) | → | qsort#(greaters(x,y)) | (10) |
The dependency pairs are split into 0 components.
greaters#(x,.(y,z)) | → | greaters#(x,z) | (8) |
greaters#(x,.(y,z)) | → | greaters#(x,z) | (8) |
[lowers(x1, x2)] | = | x2 + 1 |
[greaters(x1, x2)] | = | x2 + 40651 |
[<=(x1, x2)] | = | 1 |
[++(x1, x2)] | = | 0 |
[qsort(x1)] | = | 0 |
[qsort#(x1)] | = | x1 + 0 |
[if(x1, x2, x3)] | = | x2 + 0 |
[lowers#(x1, x2)] | = | 0 |
[nil] | = | 1 |
[greaters#(x1, x2)] | = | x2 + 0 |
[.(x1, x2)] | = | x2 + 1 |
lowers(x,.(y,z)) | → | if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) | (4) |
lowers(x,nil) | → | nil | (3) |
greaters(x,nil) | → | nil | (5) |
greaters(x,.(y,z)) | → | if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) | (6) |
greaters#(x,.(y,z)) | → | greaters#(x,z) | (8) |
greaters#(x,.(y,z)) | → | greaters#(x,z) | (8) |
The dependency pairs are split into 0 components.
lowers#(x,.(y,z)) | → | lowers#(x,z) | (9) |
lowers#(x,.(y,z)) | → | lowers#(x,z) | (9) |
[lowers(x1, x2)] | = | x2 + 1 |
[greaters(x1, x2)] | = | x2 + 1424 |
[<=(x1, x2)] | = | 1 |
[++(x1, x2)] | = | 0 |
[qsort(x1)] | = | 0 |
[qsort#(x1)] | = | x1 + 0 |
[if(x1, x2, x3)] | = | x2 + 0 |
[lowers#(x1, x2)] | = | x2 + 0 |
[nil] | = | 1 |
[greaters#(x1, x2)] | = | 0 |
[.(x1, x2)] | = | x2 + 1 |
lowers(x,.(y,z)) | → | if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) | (4) |
lowers(x,nil) | → | nil | (3) |
greaters(x,nil) | → | nil | (5) |
greaters(x,.(y,z)) | → | if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) | (6) |
lowers#(x,.(y,z)) | → | lowers#(x,z) | (9) |
lowers#(x,.(y,z)) | → | lowers#(x,z) | (9) |
The dependency pairs are split into 0 components.