The rewrite relation of the following TRS is considered.
sum(0) | → | 0 | (1) |
sum(s(x)) | → | +(sqr(s(x)),sum(x)) | (2) |
sqr(x) | → | *(x,x) | (3) |
sum(s(x)) | → | +(*(s(x),s(x)),sum(x)) | (4) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
sum#(0) |
sum#(s(z0)) |
sum#(s(z0)) |
sqr#(z0) |
sum(0) | → | 0 | (1) |
sum(s(z0)) | → | +(sqr(s(z0)),sum(z0)) | (6) |
sum(s(z0)) | → | +(*(s(z0),s(z0)),sum(z0)) | (8) |
sqr(z0) | → | *(z0,z0) | (10) |
sum#(0) | → | c | (5) |
sum#(s(z0)) | → | c2(sum#(z0)) | (9) |
sqr#(z0) | → | c3 | (11) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[sum#(x1)] | = | 1 · x1 + 0 |
[sqr#(x1)] | = | 1 |
[0] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
sum#(0) | → | c | (5) |
sum#(s(z0)) | → | c1(sqr#(s(z0)),sum#(z0)) | (7) |
sum#(s(z0)) | → | c2(sum#(z0)) | (9) |
sqr#(z0) | → | c3 | (11) |
sum#(s(z0)) | → | c1(sqr#(s(z0)),sum#(z0)) | (7) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2(x1)] | = | 1 · x1 + 0 |
[c3] | = | 0 |
[sum#(x1)] | = | 1 · x1 + 0 |
[sqr#(x1)] | = | 0 |
[0] | = | 0 |
[s(x1)] | = | 1 + 1 · x1 |
sum#(0) | → | c | (5) |
sum#(s(z0)) | → | c1(sqr#(s(z0)),sum#(z0)) | (7) |
sum#(s(z0)) | → | c2(sum#(z0)) | (9) |
sqr#(z0) | → | c3 | (11) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).