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