The rewrite relation of the following TRS is considered.
from(X) | → | cons(X,n__from(s(X))) | (1) |
head(cons(X,XS)) | → | X | (2) |
2nd(cons(X,XS)) | → | head(activate(XS)) | (3) |
take(0,XS) | → | nil | (4) |
take(s(N),cons(X,XS)) | → | cons(X,n__take(N,activate(XS))) | (5) |
sel(0,cons(X,XS)) | → | X | (6) |
sel(s(N),cons(X,XS)) | → | sel(N,activate(XS)) | (7) |
from(X) | → | n__from(X) | (8) |
take(X1,X2) | → | n__take(X1,X2) | (9) |
activate(n__from(X)) | → | from(X) | (10) |
activate(n__take(X1,X2)) | → | take(X1,X2) | (11) |
activate(X) | → | X | (12) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
from#(z0) |
from#(z0) |
head#(cons(z0,z1)) |
2nd#(cons(z0,z1)) |
take#(0,z0) |
take#(s(z0),cons(z1,z2)) |
take#(z0,z1) |
sel#(0,cons(z0,z1)) |
sel#(s(z0),cons(z1,z2)) |
activate#(n__from(z0)) |
activate#(n__take(z0,z1)) |
activate#(z0) |
head(cons(z0,z1)) | → | z0 | (17) |
2nd(cons(z0,z1)) | → | head(activate(z1)) | (19) |
sel(0,cons(z0,z1)) | → | z0 | (27) |
sel(s(z0),cons(z1,z2)) | → | sel(z0,activate(z2)) | (29) |
2nd#(cons(z0,z1)) | → | c3(head#(activate(z1)),activate#(z1)) | (20) |
sel#(0,cons(z0,z1)) | → | c7 | (28) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4] | = | 0 |
[c5(x1)] | = | 1 · x1 + 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1)] | = | 1 · x1 + 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[c11] | = | 0 |
[activate(x1)] | = | 1 + 1 · x1 |
[from(x1)] | = | 1 + 1 · x1 |
[take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[from#(x1)] | = | 0 |
[head#(x1)] | = | 0 |
[2nd#(x1)] | = | 1 + 1 · x1 |
[take#(x1, x2)] | = | 0 |
[sel#(x1, x2)] | = | 1 |
[activate#(x1)] | = | 0 |
[n__from(x1)] | = | 1 + 1 · x1 |
[n__take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 1 |
[nil] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[cons(x1, x2)] | = | 1 · x1 + 0 |
from#(z0) | → | c | (14) |
from#(z0) | → | c1 | (16) |
head#(cons(z0,z1)) | → | c2 | (18) |
2nd#(cons(z0,z1)) | → | c3(head#(activate(z1)),activate#(z1)) | (20) |
take#(0,z0) | → | c4 | (22) |
take#(s(z0),cons(z1,z2)) | → | c5(activate#(z2)) | (24) |
take#(z0,z1) | → | c6 | (26) |
sel#(0,cons(z0,z1)) | → | c7 | (28) |
sel#(s(z0),cons(z1,z2)) | → | c8(sel#(z0,activate(z2)),activate#(z2)) | (30) |
activate#(n__from(z0)) | → | c9(from#(z0)) | (32) |
activate#(n__take(z0,z1)) | → | c10(take#(z0,z1)) | (34) |
activate#(z0) | → | c11 | (36) |
head#(cons(z0,z1)) | → | c2 | (18) |
sel#(s(z0),cons(z1,z2)) | → | c8(sel#(z0,activate(z2)),activate#(z2)) | (30) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4] | = | 0 |
[c5(x1)] | = | 1 · x1 + 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1)] | = | 1 · x1 + 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[c11] | = | 0 |
[activate(x1)] | = | 1 + 1 · x1 |
[from(x1)] | = | 1 + 1 · x1 |
[take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[from#(x1)] | = | 0 |
[head#(x1)] | = | 1 |
[2nd#(x1)] | = | 1 + 1 · x1 |
[take#(x1, x2)] | = | 0 |
[sel#(x1, x2)] | = | 1 · x1 + 0 |
[activate#(x1)] | = | 0 |
[n__from(x1)] | = | 1 + 1 · x1 |
[n__take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 1 |
[nil] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[cons(x1, x2)] | = | 1 · x1 + 0 |
from#(z0) | → | c | (14) |
from#(z0) | → | c1 | (16) |
head#(cons(z0,z1)) | → | c2 | (18) |
2nd#(cons(z0,z1)) | → | c3(head#(activate(z1)),activate#(z1)) | (20) |
take#(0,z0) | → | c4 | (22) |
take#(s(z0),cons(z1,z2)) | → | c5(activate#(z2)) | (24) |
take#(z0,z1) | → | c6 | (26) |
sel#(0,cons(z0,z1)) | → | c7 | (28) |
sel#(s(z0),cons(z1,z2)) | → | c8(sel#(z0,activate(z2)),activate#(z2)) | (30) |
activate#(n__from(z0)) | → | c9(from#(z0)) | (32) |
activate#(n__take(z0,z1)) | → | c10(take#(z0,z1)) | (34) |
activate#(z0) | → | c11 | (36) |
take#(0,z0) | → | c4 | (22) |
take#(z0,z1) | → | c6 | (26) |
activate#(n__from(z0)) | → | c9(from#(z0)) | (32) |
activate#(z0) | → | c11 | (36) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4] | = | 0 |
[c5(x1)] | = | 1 · x1 + 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1)] | = | 1 · x1 + 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[c11] | = | 0 |
[activate(x1)] | = | 1 + 1 · x1 |
[from(x1)] | = | 1 |
[take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[from#(x1)] | = | 0 |
[head#(x1)] | = | 1 · x1 + 0 |
[2nd#(x1)] | = | 1 + 1 · x1 |
[take#(x1, x2)] | = | 1 |
[sel#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[activate#(x1)] | = | 1 |
[n__from(x1)] | = | 0 |
[n__take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 1 |
[nil] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[cons(x1, x2)] | = | 1 + 1 · x2 |
from#(z0) | → | c | (14) |
from#(z0) | → | c1 | (16) |
head#(cons(z0,z1)) | → | c2 | (18) |
2nd#(cons(z0,z1)) | → | c3(head#(activate(z1)),activate#(z1)) | (20) |
take#(0,z0) | → | c4 | (22) |
take#(s(z0),cons(z1,z2)) | → | c5(activate#(z2)) | (24) |
take#(z0,z1) | → | c6 | (26) |
sel#(0,cons(z0,z1)) | → | c7 | (28) |
sel#(s(z0),cons(z1,z2)) | → | c8(sel#(z0,activate(z2)),activate#(z2)) | (30) |
activate#(n__from(z0)) | → | c9(from#(z0)) | (32) |
activate#(n__take(z0,z1)) | → | c10(take#(z0,z1)) | (34) |
activate#(z0) | → | c11 | (36) |
take(z0,z1) | → | n__take(z0,z1) | (25) |
from(z0) | → | cons(z0,n__from(s(z0))) | (13) |
take(s(z0),cons(z1,z2)) | → | cons(z1,n__take(z0,activate(z2))) | (23) |
activate(n__take(z0,z1)) | → | take(z0,z1) | (33) |
take(0,z0) | → | nil | (21) |
from(z0) | → | n__from(z0) | (15) |
activate(n__from(z0)) | → | from(z0) | (31) |
activate(z0) | → | z0 | (35) |
from#(z0) | → | c | (14) |
from#(z0) | → | c1 | (16) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4] | = | 0 |
[c5(x1)] | = | 1 · x1 + 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1)] | = | 1 · x1 + 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[c11] | = | 0 |
[activate(x1)] | = | 1 + 1 · x1 |
[from(x1)] | = | 1 |
[take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[from#(x1)] | = | 1 |
[head#(x1)] | = | 1 · x1 + 0 |
[2nd#(x1)] | = | 1 + 1 · x1 |
[take#(x1, x2)] | = | 1 |
[sel#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[activate#(x1)] | = | 1 |
[n__from(x1)] | = | 0 |
[n__take(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 1 |
[nil] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[cons(x1, x2)] | = | 1 + 1 · x2 |
from#(z0) | → | c | (14) |
from#(z0) | → | c1 | (16) |
head#(cons(z0,z1)) | → | c2 | (18) |
2nd#(cons(z0,z1)) | → | c3(head#(activate(z1)),activate#(z1)) | (20) |
take#(0,z0) | → | c4 | (22) |
take#(s(z0),cons(z1,z2)) | → | c5(activate#(z2)) | (24) |
take#(z0,z1) | → | c6 | (26) |
sel#(0,cons(z0,z1)) | → | c7 | (28) |
sel#(s(z0),cons(z1,z2)) | → | c8(sel#(z0,activate(z2)),activate#(z2)) | (30) |
activate#(n__from(z0)) | → | c9(from#(z0)) | (32) |
activate#(n__take(z0,z1)) | → | c10(take#(z0,z1)) | (34) |
activate#(z0) | → | c11 | (36) |
take(z0,z1) | → | n__take(z0,z1) | (25) |
from(z0) | → | cons(z0,n__from(s(z0))) | (13) |
take(s(z0),cons(z1,z2)) | → | cons(z1,n__take(z0,activate(z2))) | (23) |
activate(n__take(z0,z1)) | → | take(z0,z1) | (33) |
take(0,z0) | → | nil | (21) |
from(z0) | → | n__from(z0) | (15) |
activate(n__from(z0)) | → | from(z0) | (31) |
activate(z0) | → | z0 | (35) |
take#(s(z0),cons(z1,z2)) | → | c5(activate#(z2)) | (24) |
activate#(n__take(z0,z1)) | → | c10(take#(z0,z1)) | (34) |
[c] | = | 0 |
[c1] | = | 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4] | = | 0 |
[c5(x1)] | = | 1 · x1 + 0 |
[c6] | = | 0 |
[c7] | = | 0 |
[c8(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c9(x1)] | = | 1 · x1 + 0 |
[c10(x1)] | = | 1 · x1 + 0 |
[c11] | = | 0 |
[activate(x1)] | = | 1 · x1 + 0 |
[from(x1)] | = | 0 |
[take(x1, x2)] | = | 1 + 1 · x2 |
[from#(x1)] | = | 0 |
[head#(x1)] | = | 0 |
[2nd#(x1)] | = | 2 · x1 + 0 |
[take#(x1, x2)] | = | 1 + 2 · x2 |
[sel#(x1, x2)] | = | 2 · x1 · x2 + 0 |
[activate#(x1)] | = | 2 · x1 + 0 |
[n__from(x1)] | = | 0 |
[n__take(x1, x2)] | = | 1 + 1 · x2 |
[0] | = | 2 |
[nil] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
[cons(x1, x2)] | = | 1 · x2 + 0 |
from#(z0) | → | c | (14) |
from#(z0) | → | c1 | (16) |
head#(cons(z0,z1)) | → | c2 | (18) |
2nd#(cons(z0,z1)) | → | c3(head#(activate(z1)),activate#(z1)) | (20) |
take#(0,z0) | → | c4 | (22) |
take#(s(z0),cons(z1,z2)) | → | c5(activate#(z2)) | (24) |
take#(z0,z1) | → | c6 | (26) |
sel#(0,cons(z0,z1)) | → | c7 | (28) |
sel#(s(z0),cons(z1,z2)) | → | c8(sel#(z0,activate(z2)),activate#(z2)) | (30) |
activate#(n__from(z0)) | → | c9(from#(z0)) | (32) |
activate#(n__take(z0,z1)) | → | c10(take#(z0,z1)) | (34) |
activate#(z0) | → | c11 | (36) |
take(z0,z1) | → | n__take(z0,z1) | (25) |
from(z0) | → | cons(z0,n__from(s(z0))) | (13) |
take(s(z0),cons(z1,z2)) | → | cons(z1,n__take(z0,activate(z2))) | (23) |
activate(n__take(z0,z1)) | → | take(z0,z1) | (33) |
take(0,z0) | → | nil | (21) |
from(z0) | → | n__from(z0) | (15) |
activate(n__from(z0)) | → | from(z0) | (31) |
activate(z0) | → | z0 | (35) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).