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