The rewrite relation of the following TRS is considered.
f(0,y) | → | 0 | (1) |
f(s(x),y) | → | f(f(x,y),y) | (2) |
|
originates from |
|
||||||||
|
originates from |
|
f#(0,z0) |
f#(s(z0),z1) |
f#(0,z0) | → | c | (4) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[f(x1, x2)] | = | 2 |
[f#(x1, x2)] | = | 2 · x1 + 0 |
[0] | = | 2 |
[s(x1)] | = | 2 + 1 · x1 |
f#(0,z0) | → | c | (4) |
f#(s(z0),z1) | → | c1(f#(f(z0,z1),z1),f#(z0,z1)) | (6) |
f(0,z0) | → | 0 | (3) |
f(s(z0),z1) | → | f(f(z0,z1),z1) | (5) |
f#(s(z0),z1) | → | c1(f#(f(z0,z1),z1),f#(z0,z1)) | (6) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[f(x1, x2)] | = | 0 |
[f#(x1, x2)] | = | 1 + 3 · x1 |
[0] | = | 0 |
[s(x1)] | = | 3 + 1 · x1 |
f#(0,z0) | → | c | (4) |
f#(s(z0),z1) | → | c1(f#(f(z0,z1),z1),f#(z0,z1)) | (6) |
f(0,z0) | → | 0 | (3) |
f(s(z0),z1) | → | f(f(z0,z1),z1) | (5) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).