The rewrite relation of the following TRS is considered.
active(U11(tt,M,N)) | → | mark(U12(tt,M,N)) | (1) |
active(U12(tt,M,N)) | → | mark(s(plus(N,M))) | (2) |
active(plus(N,0)) | → | mark(N) | (3) |
active(plus(N,s(M))) | → | mark(U11(tt,M,N)) | (4) |
active(U11(X1,X2,X3)) | → | U11(active(X1),X2,X3) | (5) |
active(U12(X1,X2,X3)) | → | U12(active(X1),X2,X3) | (6) |
active(s(X)) | → | s(active(X)) | (7) |
active(plus(X1,X2)) | → | plus(active(X1),X2) | (8) |
active(plus(X1,X2)) | → | plus(X1,active(X2)) | (9) |
U11(mark(X1),X2,X3) | → | mark(U11(X1,X2,X3)) | (10) |
U12(mark(X1),X2,X3) | → | mark(U12(X1,X2,X3)) | (11) |
s(mark(X)) | → | mark(s(X)) | (12) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (13) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (14) |
proper(U11(X1,X2,X3)) | → | U11(proper(X1),proper(X2),proper(X3)) | (15) |
proper(tt) | → | ok(tt) | (16) |
proper(U12(X1,X2,X3)) | → | U12(proper(X1),proper(X2),proper(X3)) | (17) |
proper(s(X)) | → | s(proper(X)) | (18) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (19) |
proper(0) | → | ok(0) | (20) |
U11(ok(X1),ok(X2),ok(X3)) | → | ok(U11(X1,X2,X3)) | (21) |
U12(ok(X1),ok(X2),ok(X3)) | → | ok(U12(X1,X2,X3)) | (22) |
s(ok(X)) | → | ok(s(X)) | (23) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (24) |
top(mark(X)) | → | top(proper(X)) | (25) |
top(ok(X)) | → | top(active(X)) | (26) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[tt] | = | 0 |
[mark(x1)] | = | 1 · x1 |
[U12(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 1 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 1 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[top(x1)] | = | 1 · x1 |
active(plus(N,0)) | → | mark(N) | (3) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 1 + 1 · x1 + 2 · x2 + 2 · x3 |
[tt] | = | 0 |
[mark(x1)] | = | 1 · x1 |
[U12(x1, x2, x3)] | = | 1 + 2 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 1 + 1 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[0] | = | 0 |
[top(x1)] | = | 1 · x1 |
active(plus(N,s(M))) | → | mark(U11(tt,M,N)) | (4) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 1 + 2 · x1 + 2 · x2 + 2 · x3 |
[tt] | = | 0 |
[mark(x1)] | = | 1 · x1 |
[U12(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 1 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[0] | = | 0 |
[top(x1)] | = | 1 · x1 |
active(U11(tt,M,N)) | → | mark(U12(tt,M,N)) | (1) |
[active(x1)] | = | 1 · x1 |
[U12(x1, x2, x3)] | = | 2 · x1 + 1 · x2 + 2 · x3 |
[tt] | = | 2 |
[mark(x1)] | = | 1 · x1 |
[s(x1)] | = | 1 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U11(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[0] | = | 0 |
[top(x1)] | = | 1 · x1 |
active(U12(tt,M,N)) | → | mark(s(plus(N,M))) | (2) |
[active(x1)] | = | 2 · x1 |
[U11(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[U12(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[mark(x1)] | = | 2 + 1 · x1 |
[proper(x1)] | = | 1 · x1 |
[tt] | = | 0 |
[ok(x1)] | = | 2 · x1 |
[0] | = | 0 |
[top(x1)] | = | 1 · x1 |
U11(mark(X1),X2,X3) | → | mark(U11(X1,X2,X3)) | (10) |
U12(mark(X1),X2,X3) | → | mark(U12(X1,X2,X3)) | (11) |
s(mark(X)) | → | mark(s(X)) | (12) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (13) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (14) |
top(mark(X)) | → | top(proper(X)) | (25) |
[active(x1)] | = | 2 · x1 |
[U11(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[U12(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 1 · x1 |
[plus(x1, x2)] | = | 2 + 2 · x1 + 1 · x2 |
[proper(x1)] | = | 1 + 2 · x1 |
[tt] | = | 0 |
[ok(x1)] | = | 1 + 2 · x1 |
[0] | = | 0 |
[top(x1)] | = | 1 · x1 |
active(U11(X1,X2,X3)) | → | U11(active(X1),X2,X3) | (5) |
active(U12(X1,X2,X3)) | → | U12(active(X1),X2,X3) | (6) |
active(plus(X1,X2)) | → | plus(active(X1),X2) | (8) |
active(plus(X1,X2)) | → | plus(X1,active(X2)) | (9) |
top(ok(X)) | → | top(active(X)) | (26) |
[active(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 + 2 · x1 |
[proper(x1)] | = | 2 · x1 |
[U11(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 1 · x3 |
[tt] | = | 2 |
[ok(x1)] | = | 1 + 1 · x1 |
[U12(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[plus(x1, x2)] | = | 1 + 2 · x1 + 2 · x2 |
[0] | = | 2 |
active(s(X)) | → | s(active(X)) | (7) |
proper(tt) | → | ok(tt) | (16) |
proper(s(X)) | → | s(proper(X)) | (18) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (19) |
proper(0) | → | ok(0) | (20) |
U11(ok(X1),ok(X2),ok(X3)) | → | ok(U11(X1,X2,X3)) | (21) |
U12(ok(X1),ok(X2),ok(X3)) | → | ok(U12(X1,X2,X3)) | (22) |
s(ok(X)) | → | ok(s(X)) | (23) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (24) |
prec(proper) | = | 2 | weight(proper) | = | 0 | ||||
prec(U11) | = | 0 | weight(U11) | = | 0 | ||||
prec(U12) | = | 1 | weight(U12) | = | 0 |
proper(U11(X1,X2,X3)) | → | U11(proper(X1),proper(X2),proper(X3)) | (15) |
proper(U12(X1,X2,X3)) | → | U12(proper(X1),proper(X2),proper(X3)) | (17) |
There are no rules in the TRS. Hence, it is terminating.