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