The rewrite relation of the following TRS is considered.
bsort(nil) | → | nil | (1) |
bsort(.(x,y)) | → | last(.(bubble(.(x,y)),bsort(butlast(bubble(.(x,y)))))) | (2) |
bubble(nil) | → | nil | (3) |
bubble(.(x,nil)) | → | .(x,nil) | (4) |
bubble(.(x,.(y,z))) | → | if(<=(x,y),.(y,bubble(.(x,z))),.(x,bubble(.(y,z)))) | (5) |
last(nil) | → | 0 | (6) |
last(.(x,nil)) | → | x | (7) |
last(.(x,.(y,z))) | → | last(.(y,z)) | (8) |
butlast(nil) | → | nil | (9) |
butlast(.(x,nil)) | → | nil | (10) |
butlast(.(x,.(y,z))) | → | .(x,butlast(.(y,z))) | (11) |
bsort#(.(x,y)) | → | bubble#(.(x,y)) | (12) |
butlast#(.(x,.(y,z))) | → | butlast#(.(y,z)) | (13) |
last#(.(x,.(y,z))) | → | last#(.(y,z)) | (14) |
bubble#(.(x,.(y,z))) | → | bubble#(.(x,z)) | (15) |
bsort#(.(x,y)) | → | bubble#(.(x,y)) | (12) |
bsort#(.(x,y)) | → | bsort#(butlast(bubble(.(x,y)))) | (16) |
bsort#(.(x,y)) | → | last#(.(bubble(.(x,y)),bsort(butlast(bubble(.(x,y)))))) | (17) |
bubble#(.(x,.(y,z))) | → | bubble#(.(y,z)) | (18) |
bsort#(.(x,y)) | → | butlast#(bubble(.(x,y))) | (19) |
The dependency pairs are split into 4 components.
bsort#(.(x,y)) | → | bsort#(butlast(bubble(.(x,y)))) | (16) |
[bubble#(x1)] | = |
|
||||||||||||
[butlast#(x1)] | = |
|
||||||||||||
[<=(x1, x2)] | = |
|
||||||||||||
[bsort#(x1)] | = |
|
||||||||||||
[butlast(x1)] | = |
|
||||||||||||
[last#(x1)] | = |
|
||||||||||||
[if(x1, x2, x3)] | = |
|
||||||||||||
[0] | = |
|
||||||||||||
[last(x1)] | = |
|
||||||||||||
[nil] | = |
|
||||||||||||
[.(x1, x2)] | = |
|
||||||||||||
[bubble(x1)] | = |
|
||||||||||||
[bsort(x1)] | = |
|
bubble(.(x,nil)) | → | .(x,nil) | (4) |
bubble(nil) | → | nil | (3) |
bubble(.(x,.(y,z))) | → | if(<=(x,y),.(y,bubble(.(x,z))),.(x,bubble(.(y,z)))) | (5) |
butlast(.(x,nil)) | → | nil | (10) |
butlast(.(x,.(y,z))) | → | .(x,butlast(.(y,z))) | (11) |
butlast(nil) | → | nil | (9) |
bsort#(.(x,y)) | → | bsort#(butlast(bubble(.(x,y)))) | (16) |
The dependency pairs are split into 0 components.
last#(.(x,.(y,z))) | → | last#(.(y,z)) | (14) |
[bubble#(x1)] | = | 0 |
[butlast#(x1)] | = | 0 |
[<=(x1, x2)] | = | 1 |
[bsort#(x1)] | = | 0 |
[butlast(x1)] | = | 36459 |
[last#(x1)] | = | x1 + 0 |
[if(x1, x2, x3)] | = | x1 + 0 |
[0] | = | 0 |
[last(x1)] | = | 0 |
[nil] | = | 36460 |
[.(x1, x2)] | = | x2 + 1 |
[bubble(x1)] | = | 36461 |
[bsort(x1)] | = | 0 |
bubble(.(x,nil)) | → | .(x,nil) | (4) |
bubble(nil) | → | nil | (3) |
bubble(.(x,.(y,z))) | → | if(<=(x,y),.(y,bubble(.(x,z))),.(x,bubble(.(y,z)))) | (5) |
last#(.(x,.(y,z))) | → | last#(.(y,z)) | (14) |
The dependency pairs are split into 0 components.
butlast#(.(x,.(y,z))) | → | butlast#(.(y,z)) | (13) |
[bubble#(x1)] | = | 0 |
[butlast#(x1)] | = | x1 + 0 |
[<=(x1, x2)] | = | 1 |
[bsort#(x1)] | = | 0 |
[butlast(x1)] | = | 2998 |
[last#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x1 + 0 |
[0] | = | 0 |
[last(x1)] | = | 0 |
[nil] | = | 36460 |
[.(x1, x2)] | = | x2 + 1 |
[bubble(x1)] | = | 36461 |
[bsort(x1)] | = | 0 |
bubble(.(x,nil)) | → | .(x,nil) | (4) |
bubble(nil) | → | nil | (3) |
bubble(.(x,.(y,z))) | → | if(<=(x,y),.(y,bubble(.(x,z))),.(x,bubble(.(y,z)))) | (5) |
butlast#(.(x,.(y,z))) | → | butlast#(.(y,z)) | (13) |
The dependency pairs are split into 0 components.
bubble#(.(x,.(y,z))) | → | bubble#(.(y,z)) | (18) |
bubble#(.(x,.(y,z))) | → | bubble#(.(x,z)) | (15) |
[bubble#(x1)] | = | x1 + 0 |
[butlast#(x1)] | = | 0 |
[<=(x1, x2)] | = | 1 |
[bsort#(x1)] | = | 0 |
[butlast(x1)] | = | 30205 |
[last#(x1)] | = | 0 |
[if(x1, x2, x3)] | = | x1 + 30206 |
[0] | = | 0 |
[last(x1)] | = | 0 |
[nil] | = | 30206 |
[.(x1, x2)] | = | x2 + 1 |
[bubble(x1)] | = | 30207 |
[bsort(x1)] | = | 0 |
bubble(.(x,nil)) | → | .(x,nil) | (4) |
bubble(nil) | → | nil | (3) |
bubble(.(x,.(y,z))) | → | if(<=(x,y),.(y,bubble(.(x,z))),.(x,bubble(.(y,z)))) | (5) |
bubble#(.(x,.(y,z))) | → | bubble#(.(y,z)) | (18) |
bubble#(.(x,.(y,z))) | → | bubble#(.(x,z)) | (15) |
The dependency pairs are split into 0 components.