The rewrite relation of the following TRS is considered.
plus_x#1(0,x8) | → | x8 | (1) |
plus_x#1(S(x12),x14) | → | S(plus_x#1(x12,x14)) | (2) |
map#2(plus_x(x2),Nil) | → | Nil | (3) |
map#2(plus_x(x6),Cons(x4,x2)) | → | Cons(plus_x#1(x6,x4),map#2(plus_x(x6),x2)) | (4) |
main(x5,x12) | → | map#2(plus_x(x12),x5) | (5) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
plus_x#1#(0,z0) |
plus_x#1#(S(z0),z1) |
map#2#(plus_x(z0),Nil) |
map#2#(plus_x(z0),Cons(z1,z2)) |
main#(z0,z1) |
plus_x#1(0,z0) | → | z0 | (6) |
plus_x#1(S(z0),z1) | → | S(plus_x#1(z0,z1)) | (8) |
map#2(plus_x(z0),Nil) | → | Nil | (10) |
map#2(plus_x(z0),Cons(z1,z2)) | → | Cons(plus_x#1(z0,z1),map#2(plus_x(z0),z2)) | (12) |
main(z0,z1) | → | map#2(plus_x(z1),z0) | (14) |
plus_x#1#(0,z0) | → | c | (7) |
map#2#(plus_x(z0),Nil) | → | c2 | (11) |
main#(z0,z1) | → | c4(map#2#(plus_x(z1),z0)) | (15) |
[c] | = | 0 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4(x1)] | = | 1 · x1 + 0 |
[plus_x#1#(x1, x2)] | = | 1 + 1 · x2 |
[map#2#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[main#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 0 |
[S(x1)] | = | 0 |
[plus_x(x1)] | = | 1 · x1 + 0 |
[Nil] | = | 1 |
[Cons(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
plus_x#1#(0,z0) | → | c | (7) |
plus_x#1#(S(z0),z1) | → | c1(plus_x#1#(z0,z1)) | (9) |
map#2#(plus_x(z0),Nil) | → | c2 | (11) |
map#2#(plus_x(z0),Cons(z1,z2)) | → | c3(plus_x#1#(z0,z1),map#2#(plus_x(z0),z2)) | (13) |
main#(z0,z1) | → | c4(map#2#(plus_x(z1),z0)) | (15) |
map#2#(plus_x(z0),Cons(z1,z2)) | → | c3(plus_x#1#(z0,z1),map#2#(plus_x(z0),z2)) | (13) |
[c] | = | 0 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4(x1)] | = | 1 · x1 + 0 |
[plus_x#1#(x1, x2)] | = | 1 · x2 + 0 |
[map#2#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[main#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 0 |
[S(x1)] | = | 0 |
[plus_x(x1)] | = | 1 + 1 · x1 |
[Nil] | = | 0 |
[Cons(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
plus_x#1#(0,z0) | → | c | (7) |
plus_x#1#(S(z0),z1) | → | c1(plus_x#1#(z0,z1)) | (9) |
map#2#(plus_x(z0),Nil) | → | c2 | (11) |
map#2#(plus_x(z0),Cons(z1,z2)) | → | c3(plus_x#1#(z0,z1),map#2#(plus_x(z0),z2)) | (13) |
main#(z0,z1) | → | c4(map#2#(plus_x(z1),z0)) | (15) |
plus_x#1#(S(z0),z1) | → | c1(plus_x#1#(z0,z1)) | (9) |
[c] | = | 0 |
[c1(x1)] | = | 1 · x1 + 0 |
[c2] | = | 0 |
[c3(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c4(x1)] | = | 1 · x1 + 0 |
[plus_x#1#(x1, x2)] | = | 1 + 2 · x1 + 2 · x2 + 2 · x1 · x2 |
[map#2#(x1, x2)] | = | 2 · x2 + 0 + 1 · x2 · x2 + 2 · x1 · x2 |
[main#(x1, x2)] | = | 2 + 2 · x1 + 2 · x2 + 2 · x2 · x2 + 2 · x1 · x2 + 1 · x1 · x1 |
[0] | = | 0 |
[S(x1)] | = | 1 + 1 · x1 |
[plus_x(x1)] | = | 1 · x1 + 0 |
[Nil] | = | 0 |
[Cons(x1, x2)] | = | 2 + 1 · x1 + 1 · x2 |
plus_x#1#(0,z0) | → | c | (7) |
plus_x#1#(S(z0),z1) | → | c1(plus_x#1#(z0,z1)) | (9) |
map#2#(plus_x(z0),Nil) | → | c2 | (11) |
map#2#(plus_x(z0),Cons(z1,z2)) | → | c3(plus_x#1#(z0,z1),map#2#(plus_x(z0),z2)) | (13) |
main#(z0,z1) | → | c4(map#2#(plus_x(z1),z0)) | (15) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).