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(U21(tt,M,N)) | → | mark(U22(tt,M,N)) | (3) |
active(U22(tt,M,N)) | → | mark(plus(x(N,M),N)) | (4) |
active(plus(N,0)) | → | mark(N) | (5) |
active(plus(N,s(M))) | → | mark(U11(tt,M,N)) | (6) |
active(x(N,0)) | → | mark(0) | (7) |
active(x(N,s(M))) | → | mark(U21(tt,M,N)) | (8) |
active(U11(X1,X2,X3)) | → | U11(active(X1),X2,X3) | (9) |
active(U12(X1,X2,X3)) | → | U12(active(X1),X2,X3) | (10) |
active(s(X)) | → | s(active(X)) | (11) |
active(plus(X1,X2)) | → | plus(active(X1),X2) | (12) |
active(plus(X1,X2)) | → | plus(X1,active(X2)) | (13) |
active(U21(X1,X2,X3)) | → | U21(active(X1),X2,X3) | (14) |
active(U22(X1,X2,X3)) | → | U22(active(X1),X2,X3) | (15) |
active(x(X1,X2)) | → | x(active(X1),X2) | (16) |
active(x(X1,X2)) | → | x(X1,active(X2)) | (17) |
U11(mark(X1),X2,X3) | → | mark(U11(X1,X2,X3)) | (18) |
U12(mark(X1),X2,X3) | → | mark(U12(X1,X2,X3)) | (19) |
s(mark(X)) | → | mark(s(X)) | (20) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (21) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (22) |
U21(mark(X1),X2,X3) | → | mark(U21(X1,X2,X3)) | (23) |
U22(mark(X1),X2,X3) | → | mark(U22(X1,X2,X3)) | (24) |
x(mark(X1),X2) | → | mark(x(X1,X2)) | (25) |
x(X1,mark(X2)) | → | mark(x(X1,X2)) | (26) |
proper(U11(X1,X2,X3)) | → | U11(proper(X1),proper(X2),proper(X3)) | (27) |
proper(tt) | → | ok(tt) | (28) |
proper(U12(X1,X2,X3)) | → | U12(proper(X1),proper(X2),proper(X3)) | (29) |
proper(s(X)) | → | s(proper(X)) | (30) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (31) |
proper(U21(X1,X2,X3)) | → | U21(proper(X1),proper(X2),proper(X3)) | (32) |
proper(U22(X1,X2,X3)) | → | U22(proper(X1),proper(X2),proper(X3)) | (33) |
proper(x(X1,X2)) | → | x(proper(X1),proper(X2)) | (34) |
proper(0) | → | ok(0) | (35) |
U11(ok(X1),ok(X2),ok(X3)) | → | ok(U11(X1,X2,X3)) | (36) |
U12(ok(X1),ok(X2),ok(X3)) | → | ok(U12(X1,X2,X3)) | (37) |
s(ok(X)) | → | ok(s(X)) | (38) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (39) |
U21(ok(X1),ok(X2),ok(X3)) | → | ok(U21(X1,X2,X3)) | (40) |
U22(ok(X1),ok(X2),ok(X3)) | → | ok(U22(X1,X2,X3)) | (41) |
x(ok(X1),ok(X2)) | → | ok(x(X1,X2)) | (42) |
top(mark(X)) | → | top(proper(X)) | (43) |
top(ok(X)) | → | top(active(X)) | (44) |
prec(U11) | = | 2 | stat(U11) | = | lex | |
prec(tt) | = | 1 | stat(tt) | = | lex | |
prec(U12) | = | 2 | stat(U12) | = | lex | |
prec(s) | = | 0 | stat(s) | = | lex | |
prec(plus) | = | 2 | stat(plus) | = | lex | |
prec(U21) | = | 3 | stat(U21) | = | lex | |
prec(U22) | = | 3 | stat(U22) | = | lex | |
prec(x) | = | 3 | stat(x) | = | lex | |
prec(0) | = | 4 | stat(0) | = | lex | |
prec(top) | = | 5 | stat(top) | = | lex |
π(active) | = | 1 |
π(U11) | = | [3,2,1] |
π(tt) | = | [] |
π(mark) | = | 1 |
π(U12) | = | [3,2,1] |
π(s) | = | [1] |
π(plus) | = | [1,2] |
π(U21) | = | [2,3,1] |
π(U22) | = | [2,3,1] |
π(x) | = | [2,1] |
π(0) | = | [] |
π(proper) | = | 1 |
π(ok) | = | 1 |
π(top) | = | [1] |
active(U12(tt,M,N)) | → | mark(s(plus(N,M))) | (2) |
active(U22(tt,M,N)) | → | mark(plus(x(N,M),N)) | (4) |
active(plus(N,0)) | → | mark(N) | (5) |
active(plus(N,s(M))) | → | mark(U11(tt,M,N)) | (6) |
active(x(N,0)) | → | mark(0) | (7) |
active(x(N,s(M))) | → | mark(U21(tt,M,N)) | (8) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 1 · x3 |
[tt] | = | 2 |
[mark(x1)] | = | 1 · x1 |
[U12(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 1 · x3 |
[U21(x1, x2, x3)] | = | 1 + 2 · x1 + 1 · x2 + 1 · x3 |
[U22(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 1 · x1 + 1 · x2 |
[x(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[0] | = | 0 |
[top(x1)] | = | 2 · x1 |
active(U11(tt,M,N)) | → | mark(U12(tt,M,N)) | (1) |
active(U21(tt,M,N)) | → | mark(U22(tt,M,N)) | (3) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 1 · x3 |
[U12(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 1 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[U21(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 2 · x3 |
[U22(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 1 · x3 |
[x(x1, x2)] | = | 2 · x1 + 2 · x2 |
[mark(x1)] | = | 1 + 1 · x1 |
[proper(x1)] | = | 1 · x1 |
[tt] | = | 0 |
[ok(x1)] | = | 1 · x1 |
[0] | = | 0 |
[top(x1)] | = | 2 · x1 |
U11(mark(X1),X2,X3) | → | mark(U11(X1,X2,X3)) | (18) |
U12(mark(X1),X2,X3) | → | mark(U12(X1,X2,X3)) | (19) |
s(mark(X)) | → | mark(s(X)) | (20) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (21) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (22) |
U22(mark(X1),X2,X3) | → | mark(U22(X1,X2,X3)) | (24) |
x(mark(X1),X2) | → | mark(x(X1,X2)) | (25) |
x(X1,mark(X2)) | → | mark(x(X1,X2)) | (26) |
top(mark(X)) | → | top(proper(X)) | (43) |
[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 |
[U21(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[U22(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[x(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[mark(x1)] | = | 2 + 1 · x1 |
[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) | (9) |
active(U12(X1,X2,X3)) | → | U12(active(X1),X2,X3) | (10) |
active(plus(X1,X2)) | → | plus(active(X1),X2) | (12) |
active(plus(X1,X2)) | → | plus(X1,active(X2)) | (13) |
active(U21(X1,X2,X3)) | → | U21(active(X1),X2,X3) | (14) |
active(U22(X1,X2,X3)) | → | U22(active(X1),X2,X3) | (15) |
active(x(X1,X2)) | → | x(active(X1),X2) | (16) |
active(x(X1,X2)) | → | x(X1,active(X2)) | (17) |
top(ok(X)) | → | top(active(X)) | (44) |
[active(x1)] | = | 1 · x1 |
[s(x1)] | = | 2 · x1 |
[U21(x1, x2, x3)] | = | 2 + 2 · x1 + 2 · x2 + 2 · x3 |
[mark(x1)] | = | 2 + 1 · x1 |
[proper(x1)] | = | 2 · x1 |
[U11(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 1 · x3 |
[tt] | = | 1 |
[ok(x1)] | = | 1 + 1 · x1 |
[U12(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[plus(x1, x2)] | = | 1 + 2 · x1 + 2 · x2 |
[U22(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[x(x1, x2)] | = | 1 + 2 · x1 + 2 · x2 |
[0] | = | 1 |
U21(mark(X1),X2,X3) | → | mark(U21(X1,X2,X3)) | (23) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (31) |
proper(U21(X1,X2,X3)) | → | U21(proper(X1),proper(X2),proper(X3)) | (32) |
proper(x(X1,X2)) | → | x(proper(X1),proper(X2)) | (34) |
U11(ok(X1),ok(X2),ok(X3)) | → | ok(U11(X1,X2,X3)) | (36) |
U12(ok(X1),ok(X2),ok(X3)) | → | ok(U12(X1,X2,X3)) | (37) |
s(ok(X)) | → | ok(s(X)) | (38) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (39) |
U21(ok(X1),ok(X2),ok(X3)) | → | ok(U21(X1,X2,X3)) | (40) |
U22(ok(X1),ok(X2),ok(X3)) | → | ok(U22(X1,X2,X3)) | (41) |
x(ok(X1),ok(X2)) | → | ok(x(X1,X2)) | (42) |
[active(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 + 1 · x1 |
[proper(x1)] | = | 1 + 2 · x1 |
[U11(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[tt] | = | 2 |
[ok(x1)] | = | 1 · x1 |
[U12(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[U22(x1, x2, x3)] | = | 2 + 1 · x1 + 1 · x2 + 1 · x3 |
[0] | = | 2 |
active(s(X)) | → | s(active(X)) | (11) |
proper(tt) | → | ok(tt) | (28) |
proper(s(X)) | → | s(proper(X)) | (30) |
proper(0) | → | ok(0) | (35) |
[proper(x1)] | = | 2 · x1 |
[U11(x1, x2, x3)] | = | 1 + 1 · x1 + 1 · x2 + 2 · x3 |
[U12(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 2 · x3 |
[U22(x1, x2, x3)] | = | 1 + 2 · x1 + 2 · x2 + 2 · x3 |
proper(U11(X1,X2,X3)) | → | U11(proper(X1),proper(X2),proper(X3)) | (27) |
proper(U22(X1,X2,X3)) | → | U22(proper(X1),proper(X2),proper(X3)) | (33) |
prec(proper) | = | 1 | weight(proper) | = | 0 | ||||
prec(U12) | = | 0 | weight(U12) | = | 0 |
proper(U12(X1,X2,X3)) | → | U12(proper(X1),proper(X2),proper(X3)) | (29) |
There are no rules in the TRS. Hence, it is terminating.