The rewrite relation of the following TRS is considered.
exp(x,0) | → | s(0) | (1) |
exp(x,s(y)) | → | *(x,exp(x,y)) | (2) |
*(0,y) | → | 0 | (3) |
*(s(x),y) | → | +(y,*(x,y)) | (4) |
-(0,y) | → | 0 | (5) |
-(x,0) | → | x | (6) |
-(s(x),s(y)) | → | -(x,y) | (7) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
exp#(z0,0) |
exp#(z0,s(z1)) |
*#(0,z0) |
*#(s(z0),z1) |
-#(0,z0) |
-#(z0,0) |
-#(s(z0),s(z1)) |
-(0,z0) | → | 0 | (16) |
-(z0,0) | → | z0 | (18) |
-(s(z0),s(z1)) | → | -(z0,z1) | (20) |
exp#(z0,0) | → | c | (9) |
exp#(z0,s(z1)) | → | c1(*#(z0,exp(z0,z1)),exp#(z0,z1)) | (11) |
-#(0,z0) | → | c4 | (17) |
-#(z0,0) | → | c5 | (19) |
-#(s(z0),s(z1)) | → | c6(-#(z0,z1)) | (21) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[exp(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[*(x1, x2)] | = | 1 + 1 · x1 |
[exp#(x1, x2)] | = | 1 + 1 · x2 |
[*#(x1, x2)] | = | 0 |
[-#(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
[+(x1, x2)] | = | 1 + 1 · x2 |
exp#(z0,0) | → | c | (9) |
exp#(z0,s(z1)) | → | c1(*#(z0,exp(z0,z1)),exp#(z0,z1)) | (11) |
*#(0,z0) | → | c2 | (13) |
*#(s(z0),z1) | → | c3(*#(z0,z1)) | (15) |
-#(0,z0) | → | c4 | (17) |
-#(z0,0) | → | c5 | (19) |
-#(s(z0),s(z1)) | → | c6(-#(z0,z1)) | (21) |
*#(0,z0) | → | c2 | (13) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[exp(x1, x2)] | = | 3 · x1 + 0 + 2 · x2 |
[*(x1, x2)] | = | 2 · x1 + 0 |
[exp#(x1, x2)] | = | 1 · x2 + 0 |
[*#(x1, x2)] | = | 1 |
[-#(x1, x2)] | = | 3 · x1 + 0 + 3 · x2 |
[0] | = | 2 |
[s(x1)] | = | 2 + 1 · x1 |
[+(x1, x2)] | = | 2 |
exp#(z0,0) | → | c | (9) |
exp#(z0,s(z1)) | → | c1(*#(z0,exp(z0,z1)),exp#(z0,z1)) | (11) |
*#(0,z0) | → | c2 | (13) |
*#(s(z0),z1) | → | c3(*#(z0,z1)) | (15) |
-#(0,z0) | → | c4 | (17) |
-#(z0,0) | → | c5 | (19) |
-#(s(z0),s(z1)) | → | c6(-#(z0,z1)) | (21) |
*#(s(z0),z1) | → | c3(*#(z0,z1)) | (15) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2] | = | 0 |
[c3(x1)] | = | 1 · x1 + 0 |
[c4] | = | 0 |
[c5] | = | 0 |
[c6(x1)] | = | 1 · x1 + 0 |
[exp(x1, x2)] | = | 2 · x1 · x1 + 0 |
[*(x1, x2)] | = | 1 + 1 · x1 · x1 |
[exp#(x1, x2)] | = | 1 · x2 + 0 + 2 · x1 · x2 |
[*#(x1, x2)] | = | 2 · x1 + 0 |
[-#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[0] | = | 0 |
[s(x1)] | = | 2 + 1 · x1 |
[+(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
exp#(z0,0) | → | c | (9) |
exp#(z0,s(z1)) | → | c1(*#(z0,exp(z0,z1)),exp#(z0,z1)) | (11) |
*#(0,z0) | → | c2 | (13) |
*#(s(z0),z1) | → | c3(*#(z0,z1)) | (15) |
-#(0,z0) | → | c4 | (17) |
-#(z0,0) | → | c5 | (19) |
-#(s(z0),s(z1)) | → | c6(-#(z0,z1)) | (21) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).