The relative rewrite relation R/S is considered where R is the following TRS
| add0(S(x),x2) | → | +(S(0),add0(x2,x)) | (1) |
| add0(0,x2) | → | x2 | (2) |
and S is the following TRS.
| +(x,S(0)) | → | S(x) | (3) |
| +(S(0),y) | → | S(y) | (4) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
| +#(z0,S(0)) |
| +#(S(0),z0) |
| add0#(S(z0),z1) |
| add0#(0,z0) |
| add0#(0,z0) | → | c3 | (8) |
| [c] | = | 0 |
| [c1] | = | 0 |
| [c2(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
| [c3] | = | 0 |
| [add0(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
| [+(x1, x2)] | = | 1 + 1 · x1 |
| [+#(x1, x2)] | = | 0 |
| [add0#(x1, x2)] | = | 1 |
| [S(x1)] | = | 1 |
| [0] | = | 1 |
| +#(z0,S(0)) | → | c | (10) |
| +#(S(0),z0) | → | c1 | (12) |
| add0#(S(z0),z1) | → | c2(+#(S(0),add0(z1,z0)),add0#(z1,z0)) | (6) |
| add0#(0,z0) | → | c3 | (8) |
| add0#(S(z0),z1) | → | c2(+#(S(0),add0(z1,z0)),add0#(z1,z0)) | (6) |
| [c] | = | 0 |
| [c1] | = | 0 |
| [c2(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
| [c3] | = | 0 |
| [add0(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
| [+(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
| [+#(x1, x2)] | = | 0 |
| [add0#(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
| [S(x1)] | = | 1 + 1 · x1 |
| [0] | = | 0 |
| +#(z0,S(0)) | → | c | (10) |
| +#(S(0),z0) | → | c1 | (12) |
| add0#(S(z0),z1) | → | c2(+#(S(0),add0(z1,z0)),add0#(z1,z0)) | (6) |
| add0#(0,z0) | → | c3 | (8) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).