The rewrite relation of the following TRS is considered.
eq(0,0) | → | true | (1) |
eq(0,s(m)) | → | false | (2) |
eq(s(n),0) | → | false | (3) |
eq(s(n),s(m)) | → | eq(n,m) | (4) |
le(0,m) | → | true | (5) |
le(s(n),0) | → | false | (6) |
le(s(n),s(m)) | → | le(n,m) | (7) |
min(cons(0,nil)) | → | 0 | (8) |
min(cons(s(n),nil)) | → | s(n) | (9) |
min(cons(n,cons(m,x))) | → | if_min(le(n,m),cons(n,cons(m,x))) | (10) |
if_min(true,cons(n,cons(m,x))) | → | min(cons(n,x)) | (11) |
if_min(false,cons(n,cons(m,x))) | → | min(cons(m,x)) | (12) |
replace(n,m,nil) | → | nil | (13) |
replace(n,m,cons(k,x)) | → | if_replace(eq(n,k),n,m,cons(k,x)) | (14) |
if_replace(true,n,m,cons(k,x)) | → | cons(m,x) | (15) |
if_replace(false,n,m,cons(k,x)) | → | cons(k,replace(n,m,x)) | (16) |
sort(nil) | → | nil | (17) |
sort(cons(n,x)) | → | cons(min(cons(n,x)),sort(replace(min(cons(n,x)),n,x))) | (18) |
if_min#(false,cons(n,cons(m,x))) | → | min#(cons(m,x)) | (19) |
min#(cons(n,cons(m,x))) | → | if_min#(le(n,m),cons(n,cons(m,x))) | (20) |
sort#(cons(n,x)) | → | min#(cons(n,x)) | (21) |
eq#(s(n),s(m)) | → | eq#(n,m) | (22) |
sort#(cons(n,x)) | → | sort#(replace(min(cons(n,x)),n,x)) | (23) |
sort#(cons(n,x)) | → | replace#(min(cons(n,x)),n,x) | (24) |
min#(cons(n,cons(m,x))) | → | le#(n,m) | (25) |
sort#(cons(n,x)) | → | min#(cons(n,x)) | (21) |
le#(s(n),s(m)) | → | le#(n,m) | (26) |
replace#(n,m,cons(k,x)) | → | if_replace#(eq(n,k),n,m,cons(k,x)) | (27) |
if_min#(true,cons(n,cons(m,x))) | → | min#(cons(n,x)) | (28) |
if_replace#(false,n,m,cons(k,x)) | → | replace#(n,m,x) | (29) |
replace#(n,m,cons(k,x)) | → | eq#(n,k) | (30) |
The dependency pairs are split into 5 components.
sort#(cons(n,x)) | → | sort#(replace(min(cons(n,x)),n,x)) | (23) |
[le(x1, x2)] | = | x2 + 0 |
[s(x1)] | = | x1 + 30952 |
[le#(x1, x2)] | = | 0 |
[if_min#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | 1 |
[false] | = | 2 |
[min#(x1)] | = | 0 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[sort#(x1)] | = | x1 + 0 |
[0] | = | 30952 |
[if_replace(x1,...,x4)] | = | x3 + x4 + 1424 |
[nil] | = | 1 |
[sort(x1)] | = | 0 |
[replace#(x1, x2, x3)] | = | 0 |
[if_replace#(x1,...,x4)] | = | 0 |
[min(x1)] | = | 30951 |
[cons(x1, x2)] | = | x1 + x2 + 1425 |
[if_min(x1, x2)] | = | x2 + 0 |
[replace(x1, x2, x3)] | = | x2 + x3 + 1424 |
if_replace(true,n,m,cons(k,x)) | → | cons(m,x) | (15) |
if_replace(false,n,m,cons(k,x)) | → | cons(k,replace(n,m,x)) | (16) |
le(0,m) | → | true | (5) |
le(s(n),s(m)) | → | le(n,m) | (7) |
replace(n,m,cons(k,x)) | → | if_replace(eq(n,k),n,m,cons(k,x)) | (14) |
replace(n,m,nil) | → | nil | (13) |
le(s(n),0) | → | false | (6) |
sort#(cons(n,x)) | → | sort#(replace(min(cons(n,x)),n,x)) | (23) |
The dependency pairs are split into 0 components.
if_replace#(false,n,m,cons(k,x)) | → | replace#(n,m,x) | (29) |
replace#(n,m,cons(k,x)) | → | if_replace#(eq(n,k),n,m,cons(k,x)) | (27) |
[le(x1, x2)] | = | x2 + 0 |
[s(x1)] | = | x1 + 30952 |
[le#(x1, x2)] | = | 0 |
[if_min#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | 1 |
[false] | = | 2 |
[min#(x1)] | = | 0 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[sort#(x1)] | = | x1 + 0 |
[0] | = | 6 |
[if_replace(x1,...,x4)] | = | x3 + x4 + 17678 |
[nil] | = | 1 |
[sort(x1)] | = | 0 |
[replace#(x1, x2, x3)] | = | x3 + 1 |
[if_replace#(x1,...,x4)] | = | x4 + 0 |
[min(x1)] | = | 5 |
[cons(x1, x2)] | = | x2 + 2 |
[if_min(x1, x2)] | = | x2 + 0 |
[replace(x1, x2, x3)] | = | x2 + x3 + 17678 |
if_replace(true,n,m,cons(k,x)) | → | cons(m,x) | (15) |
if_replace(false,n,m,cons(k,x)) | → | cons(k,replace(n,m,x)) | (16) |
le(0,m) | → | true | (5) |
le(s(n),s(m)) | → | le(n,m) | (7) |
replace(n,m,cons(k,x)) | → | if_replace(eq(n,k),n,m,cons(k,x)) | (14) |
replace(n,m,nil) | → | nil | (13) |
le(s(n),0) | → | false | (6) |
if_replace#(false,n,m,cons(k,x)) | → | replace#(n,m,x) | (29) |
replace#(n,m,cons(k,x)) | → | if_replace#(eq(n,k),n,m,cons(k,x)) | (27) |
The dependency pairs are split into 0 components.
eq#(s(n),s(m)) | → | eq#(n,m) | (22) |
[le(x1, x2)] | = | x2 + 0 |
[s(x1)] | = | x1 + 30952 |
[le#(x1, x2)] | = | 0 |
[if_min#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | 1 |
[false] | = | 2 |
[min#(x1)] | = | 0 |
[true] | = | 0 |
[eq#(x1, x2)] | = | x2 + 0 |
[sort#(x1)] | = | x1 + 0 |
[0] | = | 6 |
[if_replace(x1,...,x4)] | = | x3 + x4 + 17678 |
[nil] | = | 1 |
[sort(x1)] | = | 0 |
[replace#(x1, x2, x3)] | = | 1 |
[if_replace#(x1,...,x4)] | = | 0 |
[min(x1)] | = | 5 |
[cons(x1, x2)] | = | x2 + 1 |
[if_min(x1, x2)] | = | x2 + 2 |
[replace(x1, x2, x3)] | = | x2 + x3 + 17678 |
if_replace(true,n,m,cons(k,x)) | → | cons(m,x) | (15) |
if_replace(false,n,m,cons(k,x)) | → | cons(k,replace(n,m,x)) | (16) |
le(0,m) | → | true | (5) |
le(s(n),s(m)) | → | le(n,m) | (7) |
replace(n,m,cons(k,x)) | → | if_replace(eq(n,k),n,m,cons(k,x)) | (14) |
replace(n,m,nil) | → | nil | (13) |
le(s(n),0) | → | false | (6) |
eq#(s(n),s(m)) | → | eq#(n,m) | (22) |
The dependency pairs are split into 0 components.
if_min#(true,cons(n,cons(m,x))) | → | min#(cons(n,x)) | (28) |
min#(cons(n,cons(m,x))) | → | if_min#(le(n,m),cons(n,cons(m,x))) | (20) |
if_min#(false,cons(n,cons(m,x))) | → | min#(cons(m,x)) | (19) |
[le(x1, x2)] | = | x2 + 1 |
[s(x1)] | = | x1 + 30952 |
[le#(x1, x2)] | = | 0 |
[if_min#(x1, x2)] | = | x2 + 0 |
[eq(x1, x2)] | = | 1 |
[false] | = | 2 |
[min#(x1)] | = | x1 + 1 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[sort#(x1)] | = | x1 + 0 |
[0] | = | 6 |
[if_replace(x1,...,x4)] | = | x3 + x4 + 17678 |
[nil] | = | 1 |
[sort(x1)] | = | 0 |
[replace#(x1, x2, x3)] | = | 1 |
[if_replace#(x1,...,x4)] | = | 0 |
[min(x1)] | = | 5 |
[cons(x1, x2)] | = | x1 + x2 + 2 |
[if_min(x1, x2)] | = | x2 + 0 |
[replace(x1, x2, x3)] | = | x2 + x3 + 17678 |
if_replace(true,n,m,cons(k,x)) | → | cons(m,x) | (15) |
if_replace(false,n,m,cons(k,x)) | → | cons(k,replace(n,m,x)) | (16) |
le(0,m) | → | true | (5) |
le(s(n),s(m)) | → | le(n,m) | (7) |
replace(n,m,cons(k,x)) | → | if_replace(eq(n,k),n,m,cons(k,x)) | (14) |
replace(n,m,nil) | → | nil | (13) |
le(s(n),0) | → | false | (6) |
if_min#(true,cons(n,cons(m,x))) | → | min#(cons(n,x)) | (28) |
min#(cons(n,cons(m,x))) | → | if_min#(le(n,m),cons(n,cons(m,x))) | (20) |
if_min#(false,cons(n,cons(m,x))) | → | min#(cons(m,x)) | (19) |
The dependency pairs are split into 0 components.
le#(s(n),s(m)) | → | le#(n,m) | (26) |
[le(x1, x2)] | = | x2 + 1 |
[s(x1)] | = | x1 + 30952 |
[le#(x1, x2)] | = | x2 + 0 |
[if_min#(x1, x2)] | = | 0 |
[eq(x1, x2)] | = | 1 |
[false] | = | 2 |
[min#(x1)] | = | 1 |
[true] | = | 0 |
[eq#(x1, x2)] | = | 0 |
[sort#(x1)] | = | x1 + 0 |
[0] | = | 1684 |
[if_replace(x1,...,x4)] | = | x3 + x4 + 17678 |
[nil] | = | 1 |
[sort(x1)] | = | 0 |
[replace#(x1, x2, x3)] | = | 1 |
[if_replace#(x1,...,x4)] | = | 0 |
[min(x1)] | = | 1683 |
[cons(x1, x2)] | = | x1 + x2 + 841 |
[if_min(x1, x2)] | = | x2 + 0 |
[replace(x1, x2, x3)] | = | x2 + x3 + 17678 |
if_replace(true,n,m,cons(k,x)) | → | cons(m,x) | (15) |
if_replace(false,n,m,cons(k,x)) | → | cons(k,replace(n,m,x)) | (16) |
le(0,m) | → | true | (5) |
le(s(n),s(m)) | → | le(n,m) | (7) |
replace(n,m,cons(k,x)) | → | if_replace(eq(n,k),n,m,cons(k,x)) | (14) |
replace(n,m,nil) | → | nil | (13) |
le(s(n),0) | → | false | (6) |
le#(s(n),s(m)) | → | le#(n,m) | (26) |
The dependency pairs are split into 0 components.