(VAR L X V1 V V2 N X1 X2) (RULES active(zeros) -> mark(cons(0,zeros)) active(U11(tt,L)) -> mark(s(length(L))) active(and(tt,X)) -> mark(X) active(isNat(0)) -> mark(tt) active(isNat(length(V1))) -> mark(isNatList(V1)) active(isNat(s(V1))) -> mark(isNat(V1)) active(isNatIList(V)) -> mark(isNatList(V)) active(isNatIList(zeros)) -> mark(tt) active(isNatIList(cons(V1,V2))) -> mark(and(isNat(V1),isNatIList(V2))) active(isNatList(nil)) -> mark(tt) active(isNatList(cons(V1,V2))) -> mark(and(isNat(V1),isNatList(V2))) active(length(nil)) -> mark(0) active(length(cons(N,L))) -> mark(U11(and(isNatList(L),isNat(N)),L)) active(cons(X1,X2)) -> cons(active(X1),X2) active(U11(X1,X2)) -> U11(active(X1),X2) active(s(X)) -> s(active(X)) active(length(X)) -> length(active(X)) active(and(X1,X2)) -> and(active(X1),X2) cons(mark(X1),X2) -> mark(cons(X1,X2)) U11(mark(X1),X2) -> mark(U11(X1,X2)) s(mark(X)) -> mark(s(X)) length(mark(X)) -> mark(length(X)) and(mark(X1),X2) -> mark(and(X1,X2)) proper(zeros) -> ok(zeros) proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) proper(0) -> ok(0) proper(U11(X1,X2)) -> U11(proper(X1),proper(X2)) proper(tt) -> ok(tt) proper(s(X)) -> s(proper(X)) proper(length(X)) -> length(proper(X)) proper(and(X1,X2)) -> and(proper(X1),proper(X2)) proper(isNat(X)) -> isNat(proper(X)) proper(isNatList(X)) -> isNatList(proper(X)) proper(isNatIList(X)) -> isNatIList(proper(X)) proper(nil) -> ok(nil) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) U11(ok(X1),ok(X2)) -> ok(U11(X1,X2)) s(ok(X)) -> ok(s(X)) length(ok(X)) -> ok(length(X)) and(ok(X1),ok(X2)) -> ok(and(X1,X2)) isNat(ok(X)) -> ok(isNat(X)) isNatList(ok(X)) -> ok(isNatList(X)) isNatIList(ok(X)) -> ok(isNatIList(X)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) )