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