The rewrite relation of the following TRS is considered.
sort(nil) | → | nil | (1) |
sort(cons(x,y)) | → | insert(x,sort(y)) | (2) |
insert(x,nil) | → | cons(x,nil) | (3) |
insert(x,cons(v,w)) | → | choose(x,cons(v,w),x,v) | (4) |
choose(x,cons(v,w),y,0) | → | cons(x,cons(v,w)) | (5) |
choose(x,cons(v,w),0,s(z)) | → | cons(v,insert(x,w)) | (6) |
choose(x,cons(v,w),s(y),s(z)) | → | choose(x,cons(v,w),y,z) | (7) |
sort#(cons(x,y)) | → | sort#(y) | (8) |
insert#(x,cons(v,w)) | → | choose#(x,cons(v,w),x,v) | (9) |
choose#(x,cons(v,w),0,s(z)) | → | insert#(x,w) | (10) |
sort#(cons(x,y)) | → | insert#(x,sort(y)) | (11) |
choose#(x,cons(v,w),s(y),s(z)) | → | choose#(x,cons(v,w),y,z) | (12) |
The dependency pairs are split into 2 components.
sort#(cons(x,y)) | → | sort#(y) | (8) |
[insert#(x1, x2)] | = | 0 |
[s(x1)] | = | 0 |
[insert(x1, x2)] | = | 0 |
[choose#(x1,...,x4)] | = | 0 |
[sort#(x1)] | = | x1 + 0 |
[0] | = | 0 |
[nil] | = | 0 |
[sort(x1)] | = | 0 |
[choose(x1,...,x4)] | = | 0 |
[cons(x1, x2)] | = | x2 + 1 |
sort#(cons(x,y)) | → | sort#(y) | (8) |
The dependency pairs are split into 0 components.
choose#(x,cons(v,w),s(y),s(z)) | → | choose#(x,cons(v,w),y,z) | (12) |
choose#(x,cons(v,w),0,s(z)) | → | insert#(x,w) | (10) |
insert#(x,cons(v,w)) | → | choose#(x,cons(v,w),x,v) | (9) |
[insert#(x1, x2)] | = | x1 + x2 + 1 |
[s(x1)] | = | 1 |
[insert(x1, x2)] | = | 0 |
[choose#(x1,...,x4)] | = | x1 + x2 + 0 |
[sort#(x1)] | = | 0 |
[0] | = | 1 |
[nil] | = | 0 |
[sort(x1)] | = | 0 |
[choose(x1,...,x4)] | = | 0 |
[cons(x1, x2)] | = | x1 + x2 + 2 |
choose#(x,cons(v,w),0,s(z)) | → | insert#(x,w) | (10) |
insert#(x,cons(v,w)) | → | choose#(x,cons(v,w),x,v) | (9) |
The dependency pairs are split into 1 component.
choose#(x,cons(v,w),s(y),s(z)) | → | choose#(x,cons(v,w),y,z) | (12) |
[insert#(x1, x2)] | = | 1 |
[s(x1)] | = | x1 + 1 |
[insert(x1, x2)] | = | 0 |
[choose#(x1,...,x4)] | = | x4 + 0 |
[sort#(x1)] | = | 0 |
[0] | = | 1 |
[nil] | = | 0 |
[sort(x1)] | = | 0 |
[choose(x1,...,x4)] | = | 0 |
[cons(x1, x2)] | = | 2 |
choose#(x,cons(v,w),s(y),s(z)) | → | choose#(x,cons(v,w),y,z) | (12) |
The dependency pairs are split into 0 components.