The rewrite relation of the following TRS is considered.
|
originates from |
|
sort#(cons(z0,z1)) |
→ |
c1(insert#(z0,sort(z1)),sort#(z1)) |
(10) |
|
originates from |
sort(cons(z0,z1)) |
→ |
insert(z0,sort(z1)) |
(9) |
|
insert#(z0,nil) |
→ |
c2 |
(12) |
|
originates from |
insert(z0,nil) |
→ |
cons(z0,nil) |
(11) |
|
insert#(z0,cons(z1,z2)) |
→ |
c3(choose#(z0,cons(z1,z2),z0,z1)) |
(14) |
|
originates from |
insert(z0,cons(z1,z2)) |
→ |
choose(z0,cons(z1,z2),z0,z1) |
(13) |
|
choose#(z0,cons(z1,z2),z3,0) |
→ |
c4 |
(16) |
|
originates from |
choose(z0,cons(z1,z2),z3,0) |
→ |
cons(z0,cons(z1,z2)) |
(15) |
|
choose#(z0,cons(z1,z2),0,s(z3)) |
→ |
c5(insert#(z0,z2)) |
(18) |
|
originates from |
choose(z0,cons(z1,z2),0,s(z3)) |
→ |
cons(z1,insert(z0,z2)) |
(17) |
|
choose#(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
c6(choose#(z0,cons(z1,z2),z3,z4)) |
(20) |
|
originates from |
choose(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
choose(z0,cons(z1,z2),z3,z4) |
(19) |
|
Moreover, we add the following terms to the innermost strategy.
sort#(nil) |
→ |
c |
(8) |
sort#(cons(z0,z1)) |
→ |
c1(insert#(z0,sort(z1)),sort#(z1)) |
(10) |
insert#(z0,nil) |
→ |
c2 |
(12) |
insert#(z0,cons(z1,z2)) |
→ |
c3(choose#(z0,cons(z1,z2),z0,z1)) |
(14) |
choose#(z0,cons(z1,z2),z3,0) |
→ |
c4 |
(16) |
choose#(z0,cons(z1,z2),0,s(z3)) |
→ |
c5(insert#(z0,z2)) |
(18) |
choose#(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
c6(choose#(z0,cons(z1,z2),z3,z4)) |
(20) |
sort#(nil) |
→ |
c |
(8) |
sort#(cons(z0,z1)) |
→ |
c1(insert#(z0,sort(z1)),sort#(z1)) |
(10) |
insert#(z0,nil) |
→ |
c2 |
(12) |
insert#(z0,cons(z1,z2)) |
→ |
c3(choose#(z0,cons(z1,z2),z0,z1)) |
(14) |
choose#(z0,cons(z1,z2),z3,0) |
→ |
c4 |
(16) |
choose#(z0,cons(z1,z2),0,s(z3)) |
→ |
c5(insert#(z0,z2)) |
(18) |
choose#(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
c6(choose#(z0,cons(z1,z2),z3,z4)) |
(20) |
sort#(nil) |
→ |
c |
(8) |
sort#(cons(z0,z1)) |
→ |
c1(insert#(z0,sort(z1)),sort#(z1)) |
(10) |
insert#(z0,nil) |
→ |
c2 |
(12) |
insert#(z0,cons(z1,z2)) |
→ |
c3(choose#(z0,cons(z1,z2),z0,z1)) |
(14) |
choose#(z0,cons(z1,z2),z3,0) |
→ |
c4 |
(16) |
choose#(z0,cons(z1,z2),0,s(z3)) |
→ |
c5(insert#(z0,z2)) |
(18) |
choose#(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
c6(choose#(z0,cons(z1,z2),z3,z4)) |
(20) |
choose(z0,cons(z1,z2),0,s(z3)) |
→ |
cons(z1,insert(z0,z2)) |
(17) |
sort(nil) |
→ |
nil |
(1) |
insert(z0,cons(z1,z2)) |
→ |
choose(z0,cons(z1,z2),z0,z1) |
(13) |
sort(cons(z0,z1)) |
→ |
insert(z0,sort(z1)) |
(9) |
insert(z0,nil) |
→ |
cons(z0,nil) |
(11) |
choose(z0,cons(z1,z2),z3,0) |
→ |
cons(z0,cons(z1,z2)) |
(15) |
choose(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
choose(z0,cons(z1,z2),z3,z4) |
(19) |
sort#(nil) |
→ |
c |
(8) |
sort#(cons(z0,z1)) |
→ |
c1(insert#(z0,sort(z1)),sort#(z1)) |
(10) |
insert#(z0,nil) |
→ |
c2 |
(12) |
insert#(z0,cons(z1,z2)) |
→ |
c3(choose#(z0,cons(z1,z2),z0,z1)) |
(14) |
choose#(z0,cons(z1,z2),z3,0) |
→ |
c4 |
(16) |
choose#(z0,cons(z1,z2),0,s(z3)) |
→ |
c5(insert#(z0,z2)) |
(18) |
choose#(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
c6(choose#(z0,cons(z1,z2),z3,z4)) |
(20) |
choose(z0,cons(z1,z2),0,s(z3)) |
→ |
cons(z1,insert(z0,z2)) |
(17) |
sort(nil) |
→ |
nil |
(1) |
insert(z0,cons(z1,z2)) |
→ |
choose(z0,cons(z1,z2),z0,z1) |
(13) |
sort(cons(z0,z1)) |
→ |
insert(z0,sort(z1)) |
(9) |
insert(z0,nil) |
→ |
cons(z0,nil) |
(11) |
choose(z0,cons(z1,z2),z3,0) |
→ |
cons(z0,cons(z1,z2)) |
(15) |
choose(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
choose(z0,cons(z1,z2),z3,z4) |
(19) |
sort#(nil) |
→ |
c |
(8) |
sort#(cons(z0,z1)) |
→ |
c1(insert#(z0,sort(z1)),sort#(z1)) |
(10) |
insert#(z0,nil) |
→ |
c2 |
(12) |
insert#(z0,cons(z1,z2)) |
→ |
c3(choose#(z0,cons(z1,z2),z0,z1)) |
(14) |
choose#(z0,cons(z1,z2),z3,0) |
→ |
c4 |
(16) |
choose#(z0,cons(z1,z2),0,s(z3)) |
→ |
c5(insert#(z0,z2)) |
(18) |
choose#(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
c6(choose#(z0,cons(z1,z2),z3,z4)) |
(20) |
choose(z0,cons(z1,z2),0,s(z3)) |
→ |
cons(z1,insert(z0,z2)) |
(17) |
sort(nil) |
→ |
nil |
(1) |
insert(z0,cons(z1,z2)) |
→ |
choose(z0,cons(z1,z2),z0,z1) |
(13) |
sort(cons(z0,z1)) |
→ |
insert(z0,sort(z1)) |
(9) |
insert(z0,nil) |
→ |
cons(z0,nil) |
(11) |
choose(z0,cons(z1,z2),z3,0) |
→ |
cons(z0,cons(z1,z2)) |
(15) |
choose(z0,cons(z1,z2),s(z3),s(z4)) |
→ |
choose(z0,cons(z1,z2),z3,z4) |
(19) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).