The rewrite relation of the following TRS is considered.
minus(X,0) | → | X | (1) |
minus(s(X),s(Y)) | → | p(minus(X,Y)) | (2) |
p(s(X)) | → | X | (3) |
div(0,s(Y)) | → | 0 | (4) |
div(s(X),s(Y)) | → | s(div(minus(X,Y),s(Y))) | (5) |
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
||||||||
|
originates from |
|
minus#(z0,0) |
minus#(s(z0),s(z1)) |
p#(s(z0)) |
div#(0,s(z0)) |
div#(s(z0),s(z1)) |
div(0,s(z0)) | → | 0 | (12) |
div(s(z0),s(z1)) | → | s(div(minus(z0,z1),s(z1))) | (14) |
div#(0,s(z0)) | → | c3 | (13) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[p(x1)] | = | 1 + 1 · x1 |
[minus#(x1, x2)] | = | 0 |
[p#(x1)] | = | 0 |
[div#(x1, x2)] | = | 1 · x2 + 0 |
[0] | = | 1 |
[s(x1)] | = | 1 + 1 · x1 |
minus#(z0,0) | → | c | (7) |
minus#(s(z0),s(z1)) | → | c1(p#(minus(z0,z1)),minus#(z0,z1)) | (9) |
p#(s(z0)) | → | c2 | (11) |
div#(0,s(z0)) | → | c3 | (13) |
div#(s(z0),s(z1)) | → | c4(div#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (15) |
minus#(z0,0) | → | c | (7) |
div#(s(z0),s(z1)) | → | c4(div#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (15) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[p(x1)] | = | 1 · x1 + 0 |
[minus#(x1, x2)] | = | 1 |
[p#(x1)] | = | 0 |
[div#(x1, x2)] | = | 1 · x1 + 0 |
[0] | = | 0 |
[s(x1)] | = | 2 + 1 · x1 |
minus#(z0,0) | → | c | (7) |
minus#(s(z0),s(z1)) | → | c1(p#(minus(z0,z1)),minus#(z0,z1)) | (9) |
p#(s(z0)) | → | c2 | (11) |
div#(0,s(z0)) | → | c3 | (13) |
div#(s(z0),s(z1)) | → | c4(div#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (15) |
p(s(z0)) | → | z0 | (10) |
minus(z0,0) | → | z0 | (6) |
minus(s(z0),s(z1)) | → | p(minus(z0,z1)) | (8) |
minus#(s(z0),s(z1)) | → | c1(p#(minus(z0,z1)),minus#(z0,z1)) | (9) |
p#(s(z0)) | → | c2 | (11) |
[c] | = | 0 |
[c1(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[c2] | = | 0 |
[c3] | = | 0 |
[c4(x1, x2)] | = | 1 · x1 + 0 + 1 · x2 |
[minus(x1, x2)] | = | 1 · x1 + 0 |
[p(x1)] | = | 1 · x1 + 0 |
[minus#(x1, x2)] | = | 1 + 2 · x1 |
[p#(x1)] | = | 1 |
[div#(x1, x2)] | = | 1 · x1 · x1 + 0 |
[0] | = | 2 |
[s(x1)] | = | 1 + 1 · x1 |
minus#(z0,0) | → | c | (7) |
minus#(s(z0),s(z1)) | → | c1(p#(minus(z0,z1)),minus#(z0,z1)) | (9) |
p#(s(z0)) | → | c2 | (11) |
div#(0,s(z0)) | → | c3 | (13) |
div#(s(z0),s(z1)) | → | c4(div#(minus(z0,z1),s(z1)),minus#(z0,z1)) | (15) |
p(s(z0)) | → | z0 | (10) |
minus(z0,0) | → | z0 | (6) |
minus(s(z0),s(z1)) | → | p(minus(z0,z1)) | (8) |
There are no rules in the TRS R. Hence, R/S has complexity O(1).