The rewrite relation of the following TRS is considered.
active(U11(tt,V1,V2)) | → | mark(U12(isNat(V1),V2)) | (1) |
active(U12(tt,V2)) | → | mark(U13(isNat(V2))) | (2) |
active(U13(tt)) | → | mark(tt) | (3) |
active(U21(tt,V1)) | → | mark(U22(isNat(V1))) | (4) |
active(U22(tt)) | → | mark(tt) | (5) |
active(U31(tt,N)) | → | mark(N) | (6) |
active(U41(tt,M,N)) | → | mark(s(plus(N,M))) | (7) |
active(and(tt,X)) | → | mark(X) | (8) |
active(isNat(0)) | → | mark(tt) | (9) |
active(isNat(plus(V1,V2))) | → | mark(U11(and(isNatKind(V1),isNatKind(V2)),V1,V2)) | (10) |
active(isNat(s(V1))) | → | mark(U21(isNatKind(V1),V1)) | (11) |
active(isNatKind(0)) | → | mark(tt) | (12) |
active(isNatKind(plus(V1,V2))) | → | mark(and(isNatKind(V1),isNatKind(V2))) | (13) |
active(isNatKind(s(V1))) | → | mark(isNatKind(V1)) | (14) |
active(plus(N,0)) | → | mark(U31(and(isNat(N),isNatKind(N)),N)) | (15) |
active(plus(N,s(M))) | → | mark(U41(and(and(isNat(M),isNatKind(M)),and(isNat(N),isNatKind(N))),M,N)) | (16) |
active(U11(X1,X2,X3)) | → | U11(active(X1),X2,X3) | (17) |
active(U12(X1,X2)) | → | U12(active(X1),X2) | (18) |
active(U13(X)) | → | U13(active(X)) | (19) |
active(U21(X1,X2)) | → | U21(active(X1),X2) | (20) |
active(U22(X)) | → | U22(active(X)) | (21) |
active(U31(X1,X2)) | → | U31(active(X1),X2) | (22) |
active(U41(X1,X2,X3)) | → | U41(active(X1),X2,X3) | (23) |
active(s(X)) | → | s(active(X)) | (24) |
active(plus(X1,X2)) | → | plus(active(X1),X2) | (25) |
active(plus(X1,X2)) | → | plus(X1,active(X2)) | (26) |
active(and(X1,X2)) | → | and(active(X1),X2) | (27) |
U11(mark(X1),X2,X3) | → | mark(U11(X1,X2,X3)) | (28) |
U12(mark(X1),X2) | → | mark(U12(X1,X2)) | (29) |
U13(mark(X)) | → | mark(U13(X)) | (30) |
U21(mark(X1),X2) | → | mark(U21(X1,X2)) | (31) |
U22(mark(X)) | → | mark(U22(X)) | (32) |
U31(mark(X1),X2) | → | mark(U31(X1,X2)) | (33) |
U41(mark(X1),X2,X3) | → | mark(U41(X1,X2,X3)) | (34) |
s(mark(X)) | → | mark(s(X)) | (35) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (36) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (37) |
and(mark(X1),X2) | → | mark(and(X1,X2)) | (38) |
proper(U11(X1,X2,X3)) | → | U11(proper(X1),proper(X2),proper(X3)) | (39) |
proper(tt) | → | ok(tt) | (40) |
proper(U12(X1,X2)) | → | U12(proper(X1),proper(X2)) | (41) |
proper(isNat(X)) | → | isNat(proper(X)) | (42) |
proper(U13(X)) | → | U13(proper(X)) | (43) |
proper(U21(X1,X2)) | → | U21(proper(X1),proper(X2)) | (44) |
proper(U22(X)) | → | U22(proper(X)) | (45) |
proper(U31(X1,X2)) | → | U31(proper(X1),proper(X2)) | (46) |
proper(U41(X1,X2,X3)) | → | U41(proper(X1),proper(X2),proper(X3)) | (47) |
proper(s(X)) | → | s(proper(X)) | (48) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (49) |
proper(and(X1,X2)) | → | and(proper(X1),proper(X2)) | (50) |
proper(0) | → | ok(0) | (51) |
proper(isNatKind(X)) | → | isNatKind(proper(X)) | (52) |
U11(ok(X1),ok(X2),ok(X3)) | → | ok(U11(X1,X2,X3)) | (53) |
U12(ok(X1),ok(X2)) | → | ok(U12(X1,X2)) | (54) |
isNat(ok(X)) | → | ok(isNat(X)) | (55) |
U13(ok(X)) | → | ok(U13(X)) | (56) |
U21(ok(X1),ok(X2)) | → | ok(U21(X1,X2)) | (57) |
U22(ok(X)) | → | ok(U22(X)) | (58) |
U31(ok(X1),ok(X2)) | → | ok(U31(X1,X2)) | (59) |
U41(ok(X1),ok(X2),ok(X3)) | → | ok(U41(X1,X2,X3)) | (60) |
s(ok(X)) | → | ok(s(X)) | (61) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (62) |
and(ok(X1),ok(X2)) | → | ok(and(X1,X2)) | (63) |
isNatKind(ok(X)) | → | ok(isNatKind(X)) | (64) |
top(mark(X)) | → | top(proper(X)) | (65) |
top(ok(X)) | → | top(active(X)) | (66) |
prec(U11) | = | 2 | stat(U11) | = | mul | |
prec(tt) | = | 6 | stat(tt) | = | mul | |
prec(U12) | = | 1 | stat(U12) | = | mul | |
prec(U13) | = | 1 | stat(U13) | = | mul | |
prec(U21) | = | 0 | stat(U21) | = | lex | |
prec(U31) | = | 3 | stat(U31) | = | mul | |
prec(U41) | = | 6 | stat(U41) | = | lex | |
prec(s) | = | 4 | stat(s) | = | mul | |
prec(plus) | = | 6 | stat(plus) | = | lex | |
prec(and) | = | 5 | stat(and) | = | lex | |
prec(0) | = | 6 | stat(0) | = | mul | |
prec(top) | = | 7 | stat(top) | = | mul |
π(active) | = | 1 |
π(U11) | = | [1,2,3] |
π(tt) | = | [] |
π(mark) | = | 1 |
π(U12) | = | [1,2] |
π(isNat) | = | 1 |
π(U13) | = | [1] |
π(U21) | = | [1,2] |
π(U22) | = | 1 |
π(U31) | = | [1,2] |
π(U41) | = | [2,3,1] |
π(s) | = | [1] |
π(plus) | = | [2,1] |
π(and) | = | [1,2] |
π(0) | = | [] |
π(isNatKind) | = | 1 |
π(proper) | = | 1 |
π(ok) | = | 1 |
π(top) | = | [1] |
active(U11(tt,V1,V2)) | → | mark(U12(isNat(V1),V2)) | (1) |
active(U12(tt,V2)) | → | mark(U13(isNat(V2))) | (2) |
active(U13(tt)) | → | mark(tt) | (3) |
active(U21(tt,V1)) | → | mark(U22(isNat(V1))) | (4) |
active(U31(tt,N)) | → | mark(N) | (6) |
active(U41(tt,M,N)) | → | mark(s(plus(N,M))) | (7) |
active(and(tt,X)) | → | mark(X) | (8) |
active(isNat(plus(V1,V2))) | → | mark(U11(and(isNatKind(V1),isNatKind(V2)),V1,V2)) | (10) |
active(isNat(s(V1))) | → | mark(U21(isNatKind(V1),V1)) | (11) |
active(isNatKind(plus(V1,V2))) | → | mark(and(isNatKind(V1),isNatKind(V2))) | (13) |
active(isNatKind(s(V1))) | → | mark(isNatKind(V1)) | (14) |
active(plus(N,0)) | → | mark(U31(and(isNat(N),isNatKind(N)),N)) | (15) |
active(plus(N,s(M))) | → | mark(U41(and(and(isNat(M),isNatKind(M)),and(isNat(N),isNatKind(N))),M,N)) | (16) |
[active(x1)] | = | 1 · x1 |
[U22(x1)] | = | 1 · x1 |
[tt] | = | 0 |
[mark(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 + 2 · x1 |
[0] | = | 0 |
[isNatKind(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[U12(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U13(x1)] | = | 1 · x1 |
[U21(x1, x2)] | = | 1 · x1 + 1 · x2 |
[U31(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U41(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[and(x1, x2)] | = | 2 · x1 + 1 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[top(x1)] | = | 1 · x1 |
active(isNat(0)) | → | mark(tt) | (9) |
[active(x1)] | = | 1 · x1 |
[U22(x1)] | = | 2 · x1 |
[tt] | = | 0 |
[mark(x1)] | = | 1 · x1 |
[isNatKind(x1)] | = | 1 · x1 |
[0] | = | 2 |
[U11(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[U12(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U13(x1)] | = | 2 · x1 |
[U21(x1, x2)] | = | 1 · x1 + 1 · x2 |
[U31(x1, x2)] | = | 1 · x1 + 2 · x2 |
[U41(x1, x2, x3)] | = | 1 · x1 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 1 · x1 + 1 · x2 |
[and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 2 · x1 |
[top(x1)] | = | 1 · x1 |
active(isNatKind(0)) | → | mark(tt) | (12) |
[active(x1)] | = | 1 · x1 |
[U22(x1)] | = | 2 + 1 · x1 |
[tt] | = | 0 |
[mark(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 2 · x1 + 1 · x2 + 1 · x3 |
[U12(x1, x2)] | = | 1 · x1 + 2 · x2 |
[U13(x1)] | = | 2 · x1 |
[U21(x1, x2)] | = | 1 · x1 + 2 · x2 |
[U31(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U41(x1, x2, x3)] | = | 1 · x1 + 2 · x2 + 2 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[proper(x1)] | = | 1 · x1 |
[ok(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 2 · x1 |
[0] | = | 0 |
[isNatKind(x1)] | = | 2 · x1 |
[top(x1)] | = | 2 · x1 |
active(U22(tt)) | → | mark(tt) | (5) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 2 · x1 + 1 · x2 + 1 · x3 |
[U12(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U13(x1)] | = | 2 · x1 |
[U21(x1, x2)] | = | 2 · x1 + 2 · x2 |
[U22(x1)] | = | 2 · x1 |
[U31(x1, x2)] | = | 2 · x1 + 1 · x2 |
[U41(x1, x2, x3)] | = | 2 · x1 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 2 · x1 |
[plus(x1, x2)] | = | 2 · x1 + 2 · x2 |
[and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[mark(x1)] | = | 1 + 1 · x1 |
[proper(x1)] | = | 1 · x1 |
[tt] | = | 0 |
[ok(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[0] | = | 0 |
[isNatKind(x1)] | = | 2 · x1 |
[top(x1)] | = | 2 · x1 |
U11(mark(X1),X2,X3) | → | mark(U11(X1,X2,X3)) | (28) |
U12(mark(X1),X2) | → | mark(U12(X1,X2)) | (29) |
U13(mark(X)) | → | mark(U13(X)) | (30) |
U21(mark(X1),X2) | → | mark(U21(X1,X2)) | (31) |
U22(mark(X)) | → | mark(U22(X)) | (32) |
U31(mark(X1),X2) | → | mark(U31(X1,X2)) | (33) |
U41(mark(X1),X2,X3) | → | mark(U41(X1,X2,X3)) | (34) |
s(mark(X)) | → | mark(s(X)) | (35) |
plus(mark(X1),X2) | → | mark(plus(X1,X2)) | (36) |
plus(X1,mark(X2)) | → | mark(plus(X1,X2)) | (37) |
and(mark(X1),X2) | → | mark(and(X1,X2)) | (38) |
top(mark(X)) | → | top(proper(X)) | (65) |
[active(x1)] | = | 1 · x1 |
[U11(x1, x2, x3)] | = | 2 · x1 + 2 · x2 + 2 · x3 |
[U12(x1, x2)] | = | 2 · x1 + 2 · x2 |
[U13(x1)] | = | 2 + 1 · x1 |
[U21(x1, x2)] | = | 1 · x1 + 2 · x2 |
[U22(x1)] | = | 1 + 1 · x1 |
[U31(x1, x2)] | = | 1 + 2 · x1 + 2 · x2 |
[U41(x1, x2, x3)] | = | 2 · x1 + 1 · x2 + 1 · x3 |
[s(x1)] | = | 1 + 2 · x1 |
[plus(x1, x2)] | = | 1 + 2 · x1 + 2 · x2 |
[and(x1, x2)] | = | 2 · x1 + 1 · x2 |
[proper(x1)] | = | 2 · x1 |
[tt] | = | 1 |
[ok(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 + 1 · x1 |
[0] | = | 1 |
[isNatKind(x1)] | = | 2 · x1 |
[top(x1)] | = | 1 · x1 |
proper(tt) | → | ok(tt) | (40) |
proper(isNat(X)) | → | isNat(proper(X)) | (42) |
proper(U13(X)) | → | U13(proper(X)) | (43) |
proper(U22(X)) | → | U22(proper(X)) | (45) |
proper(U31(X1,X2)) | → | U31(proper(X1),proper(X2)) | (46) |
proper(s(X)) | → | s(proper(X)) | (48) |
proper(plus(X1,X2)) | → | plus(proper(X1),proper(X2)) | (49) |
proper(0) | → | ok(0) | (51) |
prec(active) | = | 13 | weight(active) | = | 3 | ||||
prec(U13) | = | 9 | weight(U13) | = | 5 | ||||
prec(U22) | = | 7 | weight(U22) | = | 5 | ||||
prec(s) | = | 10 | weight(s) | = | 5 | ||||
prec(proper) | = | 15 | weight(proper) | = | 0 | ||||
prec(isNatKind) | = | 11 | weight(isNatKind) | = | 5 | ||||
prec(ok) | = | 6 | weight(ok) | = | 4 | ||||
prec(isNat) | = | 12 | weight(isNat) | = | 5 | ||||
prec(top) | = | 14 | weight(top) | = | 1 | ||||
prec(U11) | = | 8 | weight(U11) | = | 0 | ||||
prec(U12) | = | 0 | weight(U12) | = | 0 | ||||
prec(U21) | = | 1 | weight(U21) | = | 0 | ||||
prec(U31) | = | 2 | weight(U31) | = | 0 | ||||
prec(U41) | = | 3 | weight(U41) | = | 0 | ||||
prec(plus) | = | 4 | weight(plus) | = | 0 | ||||
prec(and) | = | 5 | weight(and) | = | 0 |
active(U11(X1,X2,X3)) | → | U11(active(X1),X2,X3) | (17) |
active(U12(X1,X2)) | → | U12(active(X1),X2) | (18) |
active(U13(X)) | → | U13(active(X)) | (19) |
active(U21(X1,X2)) | → | U21(active(X1),X2) | (20) |
active(U22(X)) | → | U22(active(X)) | (21) |
active(U31(X1,X2)) | → | U31(active(X1),X2) | (22) |
active(U41(X1,X2,X3)) | → | U41(active(X1),X2,X3) | (23) |
active(s(X)) | → | s(active(X)) | (24) |
active(plus(X1,X2)) | → | plus(active(X1),X2) | (25) |
active(plus(X1,X2)) | → | plus(X1,active(X2)) | (26) |
active(and(X1,X2)) | → | and(active(X1),X2) | (27) |
proper(U11(X1,X2,X3)) | → | U11(proper(X1),proper(X2),proper(X3)) | (39) |
proper(U12(X1,X2)) | → | U12(proper(X1),proper(X2)) | (41) |
proper(U21(X1,X2)) | → | U21(proper(X1),proper(X2)) | (44) |
proper(U41(X1,X2,X3)) | → | U41(proper(X1),proper(X2),proper(X3)) | (47) |
proper(and(X1,X2)) | → | and(proper(X1),proper(X2)) | (50) |
proper(isNatKind(X)) | → | isNatKind(proper(X)) | (52) |
U11(ok(X1),ok(X2),ok(X3)) | → | ok(U11(X1,X2,X3)) | (53) |
U12(ok(X1),ok(X2)) | → | ok(U12(X1,X2)) | (54) |
isNat(ok(X)) | → | ok(isNat(X)) | (55) |
U13(ok(X)) | → | ok(U13(X)) | (56) |
U21(ok(X1),ok(X2)) | → | ok(U21(X1,X2)) | (57) |
U22(ok(X)) | → | ok(U22(X)) | (58) |
U31(ok(X1),ok(X2)) | → | ok(U31(X1,X2)) | (59) |
U41(ok(X1),ok(X2),ok(X3)) | → | ok(U41(X1,X2,X3)) | (60) |
s(ok(X)) | → | ok(s(X)) | (61) |
plus(ok(X1),ok(X2)) | → | ok(plus(X1,X2)) | (62) |
and(ok(X1),ok(X2)) | → | ok(and(X1,X2)) | (63) |
isNatKind(ok(X)) | → | ok(isNatKind(X)) | (64) |
top(ok(X)) | → | top(active(X)) | (66) |
There are no rules in the TRS. Hence, it is terminating.