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