The rewrite relation of the following TRS is considered.
mul0(C(x,y),y') | → | add0(mul0(y,y'),y') | (1) |
mul0(Z,y) | → | Z | (2) |
add0(C(x,y),y') | → | add0(y,C(S,y')) | (3) |
add0(Z,y) | → | y | (4) |
second(C(x,y)) | → | y | (5) |
isZero(C(x,y)) | → | False | (6) |
isZero(Z) | → | True | (7) |
goal(xs,ys) | → | mul0(xs,ys) | (8) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
mul0#(C(z0,z1),z2) |
mul0#(Z,z0) |
add0#(C(z0,z1),z2) |
add0#(Z,z0) |
second#(C(z0,z1)) |
isZero#(C(z0,z1)) |
isZero#(Z) |
goal#(z0,z1) |
second(C(z0,z1)) | → | z1 | (17) |
isZero(C(z0,z1)) | → | False | (19) |
isZero(Z) | → | True | (7) |
goal(z0,z1) | → | mul0(z0,z1) | (22) |
mul0#(Z,z0) | → | c1 | (12) |
add0#(Z,z0) | → | c3 | (16) |
second#(C(z0,z1)) | → | c4 | (18) |
isZero#(C(z0,z1)) | → | c5 | (20) |
isZero#(Z) | → | c6 | (21) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7(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 |
[second#(x1)] | = | 1 · x1 + 0 |
[isZero#(x1)] | = | 1 · x1 + 0 |
[goal#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[C(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[Z] | = | 1 |
[S] | = | 1 |
mul0#(C(z0,z1),z2) | → | c(add0#(mul0(z1,z2),z2),mul0#(z1,z2)) | (10) |
mul0#(Z,z0) | → | c1 | (12) |
add0#(C(z0,z1),z2) | → | c2(add0#(z1,C(S,z2))) | (14) |
add0#(Z,z0) | → | c3 | (16) |
second#(C(z0,z1)) | → | c4 | (18) |
isZero#(C(z0,z1)) | → | c5 | (20) |
isZero#(Z) | → | c6 | (21) |
goal#(z0,z1) | → | c7(mul0#(z0,z1)) | (23) |
goal#(z0,z1) | → | c7(mul0#(z0,z1)) | (23) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7(x1)] | = | 1 · x1 + 0 |
[mul0(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[add0(x1, x2)] | = | 1 · x2 + 0 |
[mul0#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[add0#(x1, x2)] | = | 0 |
[second#(x1)] | = | 0 |
[isZero#(x1)] | = | 0 |
[goal#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[C(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[Z] | = | 1 |
[S] | = | 0 |
mul0#(C(z0,z1),z2) | → | c(add0#(mul0(z1,z2),z2),mul0#(z1,z2)) | (10) |
mul0#(Z,z0) | → | c1 | (12) |
add0#(C(z0,z1),z2) | → | c2(add0#(z1,C(S,z2))) | (14) |
add0#(Z,z0) | → | c3 | (16) |
second#(C(z0,z1)) | → | c4 | (18) |
isZero#(C(z0,z1)) | → | c5 | (20) |
isZero#(Z) | → | c6 | (21) |
goal#(z0,z1) | → | c7(mul0#(z0,z1)) | (23) |
mul0#(C(z0,z1),z2) | → | c(add0#(mul0(z1,z2),z2),mul0#(z1,z2)) | (10) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7(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)] | = | 0 |
[second#(x1)] | = | 0 |
[isZero#(x1)] | = | 0 |
[goal#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[C(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[Z] | = | 1 |
[S] | = | 1 |
mul0#(C(z0,z1),z2) | → | c(add0#(mul0(z1,z2),z2),mul0#(z1,z2)) | (10) |
mul0#(Z,z0) | → | c1 | (12) |
add0#(C(z0,z1),z2) | → | c2(add0#(z1,C(S,z2))) | (14) |
add0#(Z,z0) | → | c3 | (16) |
second#(C(z0,z1)) | → | c4 | (18) |
isZero#(C(z0,z1)) | → | c5 | (20) |
isZero#(Z) | → | c6 | (21) |
goal#(z0,z1) | → | c7(mul0#(z0,z1)) | (23) |
add0#(C(z0,z1),z2) | → | c2(add0#(z1,C(S,z2))) | (14) |
[c(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c1] | = | 0 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6] | = | 0 |
[c7(x1)] | = | 1 · x1 + 0 |
[mul0(x1, x2)] | = | 1 · x1 · x2 + 0 |
[add0(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[mul0#(x1, x2)] | = | 1 + 1 · x2 + 1 · x2 · x2 + 1 · x1 · x2 + 1 · x2 · x1 · x1 + 1 · x2 · x2 · x1 + 1 · x2 · x2 · x2 |
[add0#(x1, x2)] | = | 1 · x1 + 0 |
[second#(x1)] | = | 0 |
[isZero#(x1)] | = | 0 |
[goal#(x1, x2)] | = | 1 + 1 · x2 + 1 · x2 · x2 + 1 · x1 · x2 + 1 · x2 · x1 · x1 + 1 · x2 · x2 · x1 + 1 · x2 · x2 · x2 |
[C(x1, x2)] | = | 1 + 1 · x2 |
[Z] | = | 0 |
[S] | = | 0 |
mul0#(C(z0,z1),z2) | → | c(add0#(mul0(z1,z2),z2),mul0#(z1,z2)) | (10) |
mul0#(Z,z0) | → | c1 | (12) |
add0#(C(z0,z1),z2) | → | c2(add0#(z1,C(S,z2))) | (14) |
add0#(Z,z0) | → | c3 | (16) |
second#(C(z0,z1)) | → | c4 | (18) |
isZero#(C(z0,z1)) | → | c5 | (20) |
isZero#(Z) | → | c6 | (21) |
goal#(z0,z1) | → | c7(mul0#(z0,z1)) | (23) |
mul0(Z,z0) | → | Z | (11) |
add0(Z,z0) | → | z0 | (15) |
add0(C(z0,z1),z2) | → | add0(z1,C(S,z2)) | (13) |
mul0(C(z0,z1),z2) | → | add0(mul0(z1,z2),z2) | (9) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).