(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__U11(tt, L) → s(a__length(mark(L)))
a__U21(tt) → nil
a__U31(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(length(V1)) → a__isNatList(V1)
a__isNat(s(V1)) → a__isNat(V1)
a__isNatIList(V) → a__isNatList(V)
a__isNatIList(zeros) → tt
a__isNatIList(cons(V1, V2)) → a__and(a__isNat(V1), isNatIList(V2))
a__isNatList(nil) → tt
a__isNatList(cons(V1, V2)) → a__and(a__isNat(V1), isNatList(V2))
a__isNatList(take(V1, V2)) → a__and(a__isNat(V1), isNatIList(V2))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(a__and(a__isNatList(L), isNat(N)), L)
a__take(0, IL) → a__U21(a__isNatIList(IL))
a__take(s(M), cons(N, IL)) → a__U31(a__and(a__isNatIList(IL), and(isNat(M), isNat(N))), IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X)) → a__U21(mark(X))
mark(U31(X1, X2, X3, X4)) → a__U31(mark(X1), X2, X3, X4)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(isNatList(X)) → a__isNatList(X)
mark(isNatIList(X)) → a__isNatIList(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(nil) → nil
a__zeros → zeros
a__U11(X1, X2) → U11(X1, X2)
a__length(X) → length(X)
a__U21(X) → U21(X)
a__U31(X1, X2, X3, X4) → U31(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)
a__isNatList(X) → isNatList(X)
a__isNatIList(X) → isNatIList(X)
Q is empty.
(1) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(2) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__U11(tt, L) → A__LENGTH(mark(L))
A__U11(tt, L) → MARK(L)
A__U31(tt, IL, M, N) → MARK(N)
A__AND(tt, X) → MARK(X)
A__ISNAT(length(V1)) → A__ISNATLIST(V1)
A__ISNAT(s(V1)) → A__ISNAT(V1)
A__ISNATILIST(V) → A__ISNATLIST(V)
A__ISNATILIST(cons(V1, V2)) → A__AND(a__isNat(V1), isNatIList(V2))
A__ISNATILIST(cons(V1, V2)) → A__ISNAT(V1)
A__ISNATLIST(cons(V1, V2)) → A__AND(a__isNat(V1), isNatList(V2))
A__ISNATLIST(cons(V1, V2)) → A__ISNAT(V1)
A__ISNATLIST(take(V1, V2)) → A__AND(a__isNat(V1), isNatIList(V2))
A__ISNATLIST(take(V1, V2)) → A__ISNAT(V1)
A__LENGTH(cons(N, L)) → A__U11(a__and(a__isNatList(L), isNat(N)), L)
A__LENGTH(cons(N, L)) → A__AND(a__isNatList(L), isNat(N))
A__LENGTH(cons(N, L)) → A__ISNATLIST(L)
A__TAKE(0, IL) → A__U21(a__isNatIList(IL))
A__TAKE(0, IL) → A__ISNATILIST(IL)
A__TAKE(s(M), cons(N, IL)) → A__U31(a__and(a__isNatIList(IL), and(isNat(M), isNat(N))), IL, M, N)
A__TAKE(s(M), cons(N, IL)) → A__AND(a__isNatIList(IL), and(isNat(M), isNat(N)))
A__TAKE(s(M), cons(N, IL)) → A__ISNATILIST(IL)
MARK(zeros) → A__ZEROS
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
MARK(length(X)) → MARK(X)
MARK(U21(X)) → A__U21(mark(X))
MARK(U21(X)) → MARK(X)
MARK(U31(X1, X2, X3, X4)) → A__U31(mark(X1), X2, X3, X4)
MARK(U31(X1, X2, X3, X4)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(isNat(X)) → A__ISNAT(X)
MARK(isNatList(X)) → A__ISNATLIST(X)
MARK(isNatIList(X)) → A__ISNATILIST(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__U11(tt, L) → s(a__length(mark(L)))
a__U21(tt) → nil
a__U31(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(length(V1)) → a__isNatList(V1)
a__isNat(s(V1)) → a__isNat(V1)
a__isNatIList(V) → a__isNatList(V)
a__isNatIList(zeros) → tt
a__isNatIList(cons(V1, V2)) → a__and(a__isNat(V1), isNatIList(V2))
a__isNatList(nil) → tt
a__isNatList(cons(V1, V2)) → a__and(a__isNat(V1), isNatList(V2))
a__isNatList(take(V1, V2)) → a__and(a__isNat(V1), isNatIList(V2))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(a__and(a__isNatList(L), isNat(N)), L)
a__take(0, IL) → a__U21(a__isNatIList(IL))
a__take(s(M), cons(N, IL)) → a__U31(a__and(a__isNatIList(IL), and(isNat(M), isNat(N))), IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X)) → a__U21(mark(X))
mark(U31(X1, X2, X3, X4)) → a__U31(mark(X1), X2, X3, X4)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(isNatList(X)) → a__isNatList(X)
mark(isNatIList(X)) → a__isNatIList(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(nil) → nil
a__zeros → zeros
a__U11(X1, X2) → U11(X1, X2)
a__length(X) → length(X)
a__U21(X) → U21(X)
a__U31(X1, X2, X3, X4) → U31(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)
a__isNatList(X) → isNatList(X)
a__isNatIList(X) → isNatIList(X)
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(3) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 3 less nodes.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__LENGTH(cons(N, L)) → A__U11(a__and(a__isNatList(L), isNat(N)), L)
A__U11(tt, L) → A__LENGTH(mark(L))
A__LENGTH(cons(N, L)) → A__AND(a__isNatList(L), isNat(N))
A__AND(tt, X) → MARK(X)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
A__U11(tt, L) → MARK(L)
MARK(U11(X1, X2)) → MARK(X1)
MARK(length(X)) → A__LENGTH(mark(X))
A__LENGTH(cons(N, L)) → A__ISNATLIST(L)
A__ISNATLIST(cons(V1, V2)) → A__AND(a__isNat(V1), isNatList(V2))
A__ISNATLIST(cons(V1, V2)) → A__ISNAT(V1)
A__ISNAT(length(V1)) → A__ISNATLIST(V1)
A__ISNATLIST(take(V1, V2)) → A__AND(a__isNat(V1), isNatIList(V2))
A__ISNATLIST(take(V1, V2)) → A__ISNAT(V1)
A__ISNAT(s(V1)) → A__ISNAT(V1)
MARK(length(X)) → MARK(X)
MARK(U21(X)) → MARK(X)
MARK(U31(X1, X2, X3, X4)) → A__U31(mark(X1), X2, X3, X4)
A__U31(tt, IL, M, N) → MARK(N)
MARK(U31(X1, X2, X3, X4)) → MARK(X1)
MARK(take(X1, X2)) → A__TAKE(mark(X1), mark(X2))
A__TAKE(0, IL) → A__ISNATILIST(IL)
A__ISNATILIST(V) → A__ISNATLIST(V)
A__ISNATILIST(cons(V1, V2)) → A__AND(a__isNat(V1), isNatIList(V2))
A__ISNATILIST(cons(V1, V2)) → A__ISNAT(V1)
A__TAKE(s(M), cons(N, IL)) → A__U31(a__and(a__isNatIList(IL), and(isNat(M), isNat(N))), IL, M, N)
A__TAKE(s(M), cons(N, IL)) → A__AND(a__isNatIList(IL), and(isNat(M), isNat(N)))
A__TAKE(s(M), cons(N, IL)) → A__ISNATILIST(IL)
MARK(take(X1, X2)) → MARK(X1)
MARK(take(X1, X2)) → MARK(X2)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(isNat(X)) → A__ISNAT(X)
MARK(isNatList(X)) → A__ISNATLIST(X)
MARK(isNatIList(X)) → A__ISNATILIST(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
The TRS R consists of the following rules:
a__zeros → cons(0, zeros)
a__U11(tt, L) → s(a__length(mark(L)))
a__U21(tt) → nil
a__U31(tt, IL, M, N) → cons(mark(N), take(M, IL))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(length(V1)) → a__isNatList(V1)
a__isNat(s(V1)) → a__isNat(V1)
a__isNatIList(V) → a__isNatList(V)
a__isNatIList(zeros) → tt
a__isNatIList(cons(V1, V2)) → a__and(a__isNat(V1), isNatIList(V2))
a__isNatList(nil) → tt
a__isNatList(cons(V1, V2)) → a__and(a__isNat(V1), isNatList(V2))
a__isNatList(take(V1, V2)) → a__and(a__isNat(V1), isNatIList(V2))
a__length(nil) → 0
a__length(cons(N, L)) → a__U11(a__and(a__isNatList(L), isNat(N)), L)
a__take(0, IL) → a__U21(a__isNatIList(IL))
a__take(s(M), cons(N, IL)) → a__U31(a__and(a__isNatIList(IL), and(isNat(M), isNat(N))), IL, M, N)
mark(zeros) → a__zeros
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(U21(X)) → a__U21(mark(X))
mark(U31(X1, X2, X3, X4)) → a__U31(mark(X1), X2, X3, X4)
mark(take(X1, X2)) → a__take(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(isNatList(X)) → a__isNatList(X)
mark(isNatIList(X)) → a__isNatIList(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(nil) → nil
a__zeros → zeros
a__U11(X1, X2) → U11(X1, X2)
a__length(X) → length(X)
a__U21(X) → U21(X)
a__U31(X1, X2, X3, X4) → U31(X1, X2, X3, X4)
a__take(X1, X2) → take(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)
a__isNatList(X) → isNatList(X)
a__isNatIList(X) → isNatIList(X)
Q is empty.
We have to consider all minimal (P,Q,R)-chains.