The rewrite relation of the following TRS is considered.
selects(x',revprefix,Cons(x,xs)) | → | Cons(Cons(x',revapp(revprefix,Cons(x,xs))),selects(x,Cons(x',revprefix),xs)) | (1) |
select(Cons(x,xs)) | → | selects(x,Nil,xs) | (2) |
revapp(Cons(x,xs),rest) | → | revapp(xs,Cons(x,rest)) | (3) |
selects(x,revprefix,Nil) | → | Cons(Cons(x,revapp(revprefix,Nil)),Nil) | (4) |
select(Nil) | → | Nil | (5) |
revapp(Nil,rest) | → | rest | (6) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
selects#(z0,z1,Cons(z2,z3)) |
selects#(z0,z1,Nil) |
select#(Cons(z0,z1)) |
select#(Nil) |
revapp#(Cons(z0,z1),z2) |
revapp#(Nil,z0) |
selects(z0,z1,Cons(z2,z3)) | → | Cons(Cons(z0,revapp(z1,Cons(z2,z3))),selects(z2,Cons(z0,z1),z3)) | (7) |
selects(z0,z1,Nil) | → | Cons(Cons(z0,revapp(z1,Nil)),Nil) | (9) |
select(Cons(z0,z1)) | → | selects(z0,Nil,z1) | (11) |
select(Nil) | → | Nil | (5) |
revapp(Cons(z0,z1),z2) | → | revapp(z1,Cons(z0,z2)) | (14) |
revapp(Nil,z0) | → | z0 | (16) |
select#(Nil) | → | c3 | (13) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[selects#(x1, x2, x3)] | = | 0 |
[select#(x1)] | = | 1 · x1 + 0 + 1 · x1 · x1 + 1 · x1 · x1 · x1 |
[revapp#(x1, x2)] | = | 0 |
[Cons(x1, x2)] | = | 0 |
[Nil] | = | 1 |
selects#(z0,z1,Cons(z2,z3)) | → | c(revapp#(z1,Cons(z2,z3)),selects#(z2,Cons(z0,z1),z3)) | (8) |
selects#(z0,z1,Nil) | → | c1(revapp#(z1,Nil)) | (10) |
select#(Cons(z0,z1)) | → | c2(selects#(z0,Nil,z1)) | (12) |
select#(Nil) | → | c3 | (13) |
revapp#(Cons(z0,z1),z2) | → | c4(revapp#(z1,Cons(z0,z2))) | (15) |
revapp#(Nil,z0) | → | c5 | (17) |
selects#(z0,z1,Nil) | → | c1(revapp#(z1,Nil)) | (10) |
select#(Cons(z0,z1)) | → | c2(selects#(z0,Nil,z1)) | (12) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[selects#(x1, x2, x3)] | = | 3 |
[select#(x1)] | = | 2 + 3 · x1 |
[revapp#(x1, x2)] | = | 0 |
[Cons(x1, x2)] | = | 3 + 1 · x1 |
[Nil] | = | 0 |
selects#(z0,z1,Cons(z2,z3)) | → | c(revapp#(z1,Cons(z2,z3)),selects#(z2,Cons(z0,z1),z3)) | (8) |
selects#(z0,z1,Nil) | → | c1(revapp#(z1,Nil)) | (10) |
select#(Cons(z0,z1)) | → | c2(selects#(z0,Nil,z1)) | (12) |
select#(Nil) | → | c3 | (13) |
revapp#(Cons(z0,z1),z2) | → | c4(revapp#(z1,Cons(z0,z2))) | (15) |
revapp#(Nil,z0) | → | c5 | (17) |
selects#(z0,z1,Cons(z2,z3)) | → | c(revapp#(z1,Cons(z2,z3)),selects#(z2,Cons(z0,z1),z3)) | (8) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[selects#(x1, x2, x3)] | = | 1 + 1 · x1 + 1 · x3 |
[select#(x1)] | = | 1 · x1 + 0 |
[revapp#(x1, x2)] | = | 0 |
[Cons(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[Nil] | = | 1 |
selects#(z0,z1,Cons(z2,z3)) | → | c(revapp#(z1,Cons(z2,z3)),selects#(z2,Cons(z0,z1),z3)) | (8) |
selects#(z0,z1,Nil) | → | c1(revapp#(z1,Nil)) | (10) |
select#(Cons(z0,z1)) | → | c2(selects#(z0,Nil,z1)) | (12) |
select#(Nil) | → | c3 | (13) |
revapp#(Cons(z0,z1),z2) | → | c4(revapp#(z1,Cons(z0,z2))) | (15) |
revapp#(Nil,z0) | → | c5 | (17) |
revapp#(Nil,z0) | → | c5 | (17) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[selects#(x1, x2, x3)] | = | 1 · x1 + 0 + 1 · x3 |
[select#(x1)] | = | 1 + 1 · x1 |
[revapp#(x1, x2)] | = | 1 |
[Cons(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[Nil] | = | 1 |
selects#(z0,z1,Cons(z2,z3)) | → | c(revapp#(z1,Cons(z2,z3)),selects#(z2,Cons(z0,z1),z3)) | (8) |
selects#(z0,z1,Nil) | → | c1(revapp#(z1,Nil)) | (10) |
select#(Cons(z0,z1)) | → | c2(selects#(z0,Nil,z1)) | (12) |
select#(Nil) | → | c3 | (13) |
revapp#(Cons(z0,z1),z2) | → | c4(revapp#(z1,Cons(z0,z2))) | (15) |
revapp#(Nil,z0) | → | c5 | (17) |
revapp#(Cons(z0,z1),z2) | → | c4(revapp#(z1,Cons(z0,z2))) | (15) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4(x1)] | = | 1 · x1 + 0 |
[c5] | = | 0 |
[selects#(x1, x2, x3)] | = | 1 · x2 + 0 + 1 · x3 · x3 + 2 · x2 · x3 |
[select#(x1)] | = | 2 · x1 · x1 + 0 |
[revapp#(x1, x2)] | = | 1 · x1 + 0 |
[Cons(x1, x2)] | = | 1 + 1 · x2 |
[Nil] | = | 0 |
selects#(z0,z1,Cons(z2,z3)) | → | c(revapp#(z1,Cons(z2,z3)),selects#(z2,Cons(z0,z1),z3)) | (8) |
selects#(z0,z1,Nil) | → | c1(revapp#(z1,Nil)) | (10) |
select#(Cons(z0,z1)) | → | c2(selects#(z0,Nil,z1)) | (12) |
select#(Nil) | → | c3 | (13) |
revapp#(Cons(z0,z1),z2) | → | c4(revapp#(z1,Cons(z0,z2))) | (15) |
revapp#(Nil,z0) | → | c5 | (17) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).