The rewrite relation of the following TRS is considered.
a__zeros | → | cons(0,zeros) | (1) |
a__U11(tt,L) | → | s(a__length(mark(L))) | (2) |
a__and(tt,X) | → | mark(X) | (3) |
a__isNat(0) | → | tt | (4) |
a__isNat(length(V1)) | → | a__isNatList(V1) | (5) |
a__isNat(s(V1)) | → | a__isNat(V1) | (6) |
a__isNatIList(V) | → | a__isNatList(V) | (7) |
a__isNatIList(zeros) | → | tt | (8) |
a__isNatIList(cons(V1,V2)) | → | a__and(a__isNat(V1),isNatIList(V2)) | (9) |
a__isNatList(nil) | → | tt | (10) |
a__isNatList(cons(V1,V2)) | → | a__and(a__isNat(V1),isNatList(V2)) | (11) |
a__length(nil) | → | 0 | (12) |
a__length(cons(N,L)) | → | a__U11(a__and(a__isNatList(L),isNat(N)),L) | (13) |
mark(zeros) | → | a__zeros | (14) |
mark(U11(X1,X2)) | → | a__U11(mark(X1),X2) | (15) |
mark(length(X)) | → | a__length(mark(X)) | (16) |
mark(and(X1,X2)) | → | a__and(mark(X1),X2) | (17) |
mark(isNat(X)) | → | a__isNat(X) | (18) |
mark(isNatList(X)) | → | a__isNatList(X) | (19) |
mark(isNatIList(X)) | → | a__isNatIList(X) | (20) |
mark(cons(X1,X2)) | → | cons(mark(X1),X2) | (21) |
mark(0) | → | 0 | (22) |
mark(tt) | → | tt | (23) |
mark(s(X)) | → | s(mark(X)) | (24) |
mark(nil) | → | nil | (25) |
a__zeros | → | zeros | (26) |
a__U11(X1,X2) | → | U11(X1,X2) | (27) |
a__length(X) | → | length(X) | (28) |
a__and(X1,X2) | → | and(X1,X2) | (29) |
a__isNat(X) | → | isNat(X) | (30) |
a__isNatList(X) | → | isNatList(X) | (31) |
a__isNatIList(X) | → | isNatIList(X) | (32) |
[a__zeros] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[zeros] | = | 0 |
[a__U11(x1, x2)] | = | 2 · x1 + 2 · x2 |
[tt] | = | 0 |
[s(x1)] | = | 1 · x1 |
[a__length(x1)] | = | 2 · x1 |
[mark(x1)] | = | 1 · x1 |
[a__and(x1, x2)] | = | 1 · x1 + 2 · x2 |
[a__isNat(x1)] | = | 1 · x1 |
[length(x1)] | = | 2 · x1 |
[a__isNatList(x1)] | = | 1 · x1 |
[a__isNatIList(x1)] | = | 2 · x1 |
[isNatIList(x1)] | = | 2 · x1 |
[nil] | = | 1 |
[isNatList(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 2 · x1 + 2 · x2 |
[and(x1, x2)] | = | 1 · x1 + 2 · x2 |
a__isNatList(nil) | → | tt | (10) |
a__length(nil) | → | 0 | (12) |
[a__zeros] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[zeros] | = | 0 |
[a__U11(x1, x2)] | = | 1 + 1 · x1 + 2 · x2 |
[tt] | = | 0 |
[s(x1)] | = | 1 · x1 |
[a__length(x1)] | = | 1 + 2 · x1 |
[mark(x1)] | = | 1 · x1 |
[a__and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[a__isNat(x1)] | = | 1 · x1 |
[length(x1)] | = | 1 + 2 · x1 |
[a__isNatList(x1)] | = | 1 · x1 |
[a__isNatIList(x1)] | = | 2 · x1 |
[isNatIList(x1)] | = | 2 · x1 |
[isNatList(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 1 + 1 · x1 + 2 · x2 |
[and(x1, x2)] | = | 2 · x1 + 2 · x2 |
[nil] | = | 0 |
a__isNat(length(V1)) | → | a__isNatList(V1) | (5) |
[a__zeros] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[zeros] | = | 0 |
[a__U11(x1, x2)] | = | 1 · x1 + 2 · x2 |
[tt] | = | 0 |
[s(x1)] | = | 1 · x1 |
[a__length(x1)] | = | 2 · x1 |
[mark(x1)] | = | 1 · x1 |
[a__and(x1, x2)] | = | 2 · x1 + 1 · x2 |
[a__isNat(x1)] | = | 1 · x1 |
[a__isNatIList(x1)] | = | 1 + 1 · x1 |
[a__isNatList(x1)] | = | 1 · x1 |
[isNatIList(x1)] | = | 1 + 1 · x1 |
[isNatList(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 1 · x1 + 2 · x2 |
[length(x1)] | = | 2 · x1 |
[and(x1, x2)] | = | 2 · x1 + 1 · x2 |
[nil] | = | 0 |
a__isNatIList(V) | → | a__isNatList(V) | (7) |
a__isNatIList(zeros) | → | tt | (8) |
[a__zeros] | = | 2 |
[cons(x1, x2)] | = | 1 · x1 + 2 · x2 |
[0] | = | 2 |
[zeros] | = | 0 |
[a__U11(x1, x2)] | = | 1 · x1 + 1 · x2 |
[tt] | = | 2 |
[s(x1)] | = | 1 · x1 |
[a__length(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 + 1 · x1 |
[a__and(x1, x2)] | = | 1 · x1 + 1 · x2 |
[a__isNat(x1)] | = | 1 · x1 |
[a__isNatIList(x1)] | = | 2 + 1 · x1 |
[isNatIList(x1)] | = | 1 + 1 · x1 |
[a__isNatList(x1)] | = | 1 · x1 |
[isNatList(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 1 · x1 + 1 · x2 |
[length(x1)] | = | 1 · x1 |
[and(x1, x2)] | = | 1 · x1 + 1 · x2 |
[nil] | = | 0 |
a__isNatIList(cons(V1,V2)) | → | a__and(a__isNat(V1),isNatIList(V2)) | (9) |
mark(isNat(X)) | → | a__isNat(X) | (18) |
mark(isNatList(X)) | → | a__isNatList(X) | (19) |
mark(isNatIList(X)) | → | a__isNatIList(X) | (20) |
mark(0) | → | 0 | (22) |
mark(tt) | → | tt | (23) |
mark(nil) | → | nil | (25) |
a__zeros | → | zeros | (26) |
a__isNatIList(X) | → | isNatIList(X) | (32) |
[a__zeros] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[zeros] | = | 0 |
[a__U11(x1, x2)] | = | 2 · x1 + 2 · x2 |
[tt] | = | 1 |
[s(x1)] | = | 1 · x1 |
[a__length(x1)] | = | 2 + 2 · x1 |
[mark(x1)] | = | 1 · x1 |
[a__and(x1, x2)] | = | 1 · x1 + 2 · x2 |
[a__isNat(x1)] | = | 1 + 1 · x1 |
[a__isNatList(x1)] | = | 1 + 1 · x1 |
[isNatList(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 2 · x1 + 2 · x2 |
[length(x1)] | = | 2 + 2 · x1 |
[and(x1, x2)] | = | 1 · x1 + 2 · x2 |
a__and(tt,X) | → | mark(X) | (3) |
a__isNat(X) | → | isNat(X) | (30) |
a__isNatList(X) | → | isNatList(X) | (31) |
[a__zeros] | = | 2 |
[cons(x1, x2)] | = | 2 + 1 · x1 + 2 · x2 |
[0] | = | 0 |
[zeros] | = | 0 |
[a__U11(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[tt] | = | 1 |
[s(x1)] | = | 1 · x1 |
[a__length(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 + 1 · x1 |
[a__isNat(x1)] | = | 1 + 1 · x1 |
[a__isNatList(x1)] | = | 1 · x1 |
[a__and(x1, x2)] | = | 1 · x1 + 1 · x2 |
[isNatList(x1)] | = | 1 · x1 |
[isNat(x1)] | = | 1 · x1 |
[U11(x1, x2)] | = | 1 + 1 · x1 + 1 · x2 |
[length(x1)] | = | 1 · x1 |
[and(x1, x2)] | = | 1 · x1 + 1 · x2 |
a__isNatList(cons(V1,V2)) | → | a__and(a__isNat(V1),isNatList(V2)) | (11) |
a__length(cons(N,L)) | → | a__U11(a__and(a__isNatList(L),isNat(N)),L) | (13) |
prec(a__zeros) | = | 12 | weight(a__zeros) | = | 3 | ||||
prec(0) | = | 9 | weight(0) | = | 1 | ||||
prec(zeros) | = | 1 | weight(zeros) | = | 1 | ||||
prec(tt) | = | 2 | weight(tt) | = | 5 | ||||
prec(s) | = | 0 | weight(s) | = | 1 | ||||
prec(a__length) | = | 10 | weight(a__length) | = | 1 | ||||
prec(mark) | = | 13 | weight(mark) | = | 2 | ||||
prec(a__isNat) | = | 3 | weight(a__isNat) | = | 4 | ||||
prec(length) | = | 5 | weight(length) | = | 1 | ||||
prec(cons) | = | 11 | weight(cons) | = | 0 | ||||
prec(a__U11) | = | 6 | weight(a__U11) | = | 0 | ||||
prec(U11) | = | 4 | weight(U11) | = | 0 | ||||
prec(and) | = | 7 | weight(and) | = | 0 | ||||
prec(a__and) | = | 8 | weight(a__and) | = | 0 |
a__zeros | → | cons(0,zeros) | (1) |
a__U11(tt,L) | → | s(a__length(mark(L))) | (2) |
a__isNat(0) | → | tt | (4) |
a__isNat(s(V1)) | → | a__isNat(V1) | (6) |
mark(zeros) | → | a__zeros | (14) |
mark(U11(X1,X2)) | → | a__U11(mark(X1),X2) | (15) |
mark(length(X)) | → | a__length(mark(X)) | (16) |
mark(and(X1,X2)) | → | a__and(mark(X1),X2) | (17) |
mark(cons(X1,X2)) | → | cons(mark(X1),X2) | (21) |
mark(s(X)) | → | s(mark(X)) | (24) |
a__U11(X1,X2) | → | U11(X1,X2) | (27) |
a__length(X) | → | length(X) | (28) |
a__and(X1,X2) | → | and(X1,X2) | (29) |
There are no rules in the TRS. Hence, it is terminating.