The rewrite relation of the following TRS is considered.
active(U11(tt,N)) | → | mark(N) | (1) |
active(U21(tt,M,N)) | → | mark(s(plus(N,M))) | (2) |
active(and(tt,X)) | → | mark(X) | (3) |
active(isNat(0)) | → | mark(tt) | (4) |
active(isNat(plus(V1,V2))) | → | mark(and(isNat(V1),isNat(V2))) | (5) |
active(isNat(s(V1))) | → | mark(isNat(V1)) | (6) |
active(plus(N,0)) | → | mark(U11(isNat(N),N)) | (7) |
active(plus(N,s(M))) | → | mark(U21(and(isNat(M),isNat(N)),M,N)) | (8) |
active(U11(X1,X2)) | → | U11(active(X1),X2) | (9) |
active(U21(X1,X2,X3)) | → | U21(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(and(X1,X2)) | → | and(active(X1),X2) | (14) |
U11(mark(X1),X2) | → | mark(U11(X1,X2)) | (15) |
U21(mark(X1),X2,X3) | → | mark(U21(X1,X2,X3)) | (16) |
s(mark(X)) | → | mark(s(X)) | (17) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (18) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (19) |
and(mark(X1),X2) | → | mark(and(X1,X2)) | (20) |
proper(U11(X1,X2)) | → | U11(proper(X1),proper(X2)) | (21) |
proper(tt) | → | ok(tt) | (22) |
proper(U21(X1,X2,X3)) | → | U21(proper(X1),proper(X2),proper(X3)) | (23) |
proper(s(X)) | → | s(proper(X)) | (24) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (25) |
proper(and(X1,X2)) | → | and(proper(X1),proper(X2)) | (26) |
proper(isNat(X)) | → | isNat(proper(X)) | (27) |
proper(0) | → | ok(0) | (28) |
U11(ok(X1),ok(X2)) | → | ok(U11(X1,X2)) | (29) |
U21(ok(X1),ok(X2),ok(X3)) | → | ok(U21(X1,X2,X3)) | (30) |
s(ok(X)) | → | ok(s(X)) | (31) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (32) |
and(ok(X1),ok(X2)) | → | ok(and(X1,X2)) | (33) |
isNat(ok(X)) | → | ok(isNat(X)) | (34) |
top(mark(X)) | → | top(proper(X)) | (35) |
top(ok(X)) | → | top(active(X)) | (36) |
prec(U11) | = | 0 | stat(U11) | = | mul | |
prec(tt) | = | 3 | stat(tt) | = | mul | |
prec(U21) | = | 3 | stat(U21) | = | lex | |
prec(s) | = | 2 | stat(s) | = | mul | |
prec(plus) | = | 3 | stat(plus) | = | lex | |
prec(and) | = | 1 | stat(and) | = | mul | |
prec(0) | = | 3 | stat(0) | = | mul |
π(active) | = | 1 |
π(U11) | = | [1,2] |
π(tt) | = | [] |
π(mark) | = | 1 |
π(U21) | = | [3,2,1] |
π(s) | = | [1] |
π(plus) | = | [1,2] |
π(and) | = | [1,2] |
π(isNat) | = | 1 |
π(0) | = | [] |
π(proper) | = | 1 |
π(ok) | = | 1 |
π(top) | = | 1 |
active(U11(tt,N)) | → | mark(N) | (1) |
active(U21(tt,M,N)) | → | mark(s(plus(N,M))) | (2) |
active(and(tt,X)) | → | mark(X) | (3) |
active(isNat(plus(V1,V2))) | → | mark(and(isNat(V1),isNat(V2))) | (5) |
active(isNat(s(V1))) | → | mark(isNat(V1)) | (6) |
active(plus(N,0)) | → | mark(U11(isNat(N),N)) | (7) |
active(plus(N,s(M))) | → | mark(U21(and(isNat(M),isNat(N)),M,N)) | (8) |
[active(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 2 + 1 · x1 |
[0] | = | 2 |
[mark(x1)] | = | 1 + 1 · x1 |
[tt] | = | 2 |
[U11(x1, x2)] | = | 2 + 2 · x1 + 2 · x2 |
[U21(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 2 + 2 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[top(x1)] | = | 2 · x1 |
active(isNat(0)) | → | mark(tt) | (4) |
U11(mark(X1),X2) | → | mark(U11(X1,X2)) | (15) |
U21(mark(X1),X2,X3) | → | mark(U21(X1,X2,X3)) | (16) |
s(mark(X)) | → | mark(s(X)) | (17) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (18) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (19) |
and(mark(X1),X2) | → | mark(and(X1,X2)) | (20) |
top(mark(X)) | → | top(proper(X)) | (35) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 1 + 2 · x1 + 1 · x2 |
[U21(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 1 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 1 · x1 + 1 · x2 |
[and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 2 · x1 |
[tt] | = | 2 |
[ok(x1)] | = | 1 + 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[0] | = | 2 |
[top(x1)] | = | 1 · x1 |
proper(U11(X1,X2)) | → | U11(proper(X1),proper(X2)) | (21) |
proper(tt) | → | ok(tt) | (22) |
proper(0) | → | ok(0) | (28) |
U11(ok(X1),ok(X2)) | → | ok(U11(X1,X2)) | (29) |
U21(ok(X1),ok(X2),ok(X3)) | → | ok(U21(X1,X2,X3)) | (30) |
s(ok(X)) | → | ok(s(X)) | (31) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (32) |
and(ok(X1),ok(X2)) | → | ok(and(X1,X2)) | (33) |
top(ok(X)) | → | top(active(X)) | (36) |
prec(active) | = | 5 | weight(active) | = | 3 | ||||
prec(s) | = | 2 | weight(s) | = | 1 | ||||
prec(proper) | = | 8 | weight(proper) | = | 0 | ||||
prec(isNat) | = | 7 | weight(isNat) | = | 2 | ||||
prec(ok) | = | 6 | weight(ok) | = | 1 | ||||
prec(U11) | = | 0 | weight(U11) | = | 0 | ||||
prec(U21) | = | 1 | weight(U21) | = | 0 | ||||
prec(plus) | = | 3 | weight(plus) | = | 0 | ||||
prec(and) | = | 4 | weight(and) | = | 0 |
active(U11(X1,X2)) | → | U11(active(X1),X2) | (9) |
active(U21(X1,X2,X3)) | → | U21(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(and(X1,X2)) | → | and(active(X1),X2) | (14) |
proper(U21(X1,X2,X3)) | → | U21(proper(X1),proper(X2),proper(X3)) | (23) |
proper(s(X)) | → | s(proper(X)) | (24) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (25) |
proper(and(X1,X2)) | → | and(proper(X1),proper(X2)) | (26) |
proper(isNat(X)) | → | isNat(proper(X)) | (27) |
isNat(ok(X)) | → | ok(isNat(X)) | (34) |
There are no rules in the TRS. Hence, it is terminating.