(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt)) → mark(tt)
active(U21(tt)) → mark(tt)
active(U31(tt)) → mark(tt)
active(U41(tt, V2)) → mark(U42(isNatIList(V2)))
active(U42(tt)) → mark(tt)
active(U51(tt, V2)) → mark(U52(isNatList(V2)))
active(U52(tt)) → mark(tt)
active(U61(tt, V2)) → mark(U62(isNatIList(V2)))
active(U62(tt)) → mark(tt)
active(U71(tt, L, N)) → mark(U72(isNat(N), L))
active(U72(tt, L)) → mark(s(length(L)))
active(U81(tt)) → mark(nil)
active(U91(tt, IL, M, N)) → mark(U92(isNat(M), IL, M, N))
active(U92(tt, IL, M, N)) → mark(U93(isNat(N), IL, M, N))
active(U93(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(isNat(0)) → mark(tt)
active(isNat(length(V1))) → mark(U11(isNatList(V1)))
active(isNat(s(V1))) → mark(U21(isNat(V1)))
active(isNatIList(V)) → mark(U31(isNatList(V)))
active(isNatIList(zeros)) → mark(tt)
active(isNatIList(cons(V1, V2))) → mark(U41(isNat(V1), V2))
active(isNatList(nil)) → mark(tt)
active(isNatList(cons(V1, V2))) → mark(U51(isNat(V1), V2))
active(isNatList(take(V1, V2))) → mark(U61(isNat(V1), V2))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U71(isNatList(L), L, N))
active(take(0, IL)) → mark(U81(isNatIList(IL)))
active(take(s(M), cons(N, IL))) → mark(U91(isNatIList(IL), IL, M, N))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X)) → U11(active(X))
active(U21(X)) → U21(active(X))
active(U31(X)) → U31(active(X))
active(U41(X1, X2)) → U41(active(X1), X2)
active(U42(X)) → U42(active(X))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X)) → U52(active(X))
active(U61(X1, X2)) → U61(active(X1), X2)
active(U62(X)) → U62(active(X))
active(U71(X1, X2, X3)) → U71(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U81(X)) → U81(active(X))
active(U91(X1, X2, X3, X4)) → U91(active(X1), X2, X3, X4)
active(U92(X1, X2, X3, X4)) → U92(active(X1), X2, X3, X4)
active(U93(X1, X2, X3, X4)) → U93(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X)) → mark(U11(X))
U21(mark(X)) → mark(U21(X))
U31(mark(X)) → mark(U31(X))
U41(mark(X1), X2) → mark(U41(X1, X2))
U42(mark(X)) → mark(U42(X))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X)) → mark(U52(X))
U61(mark(X1), X2) → mark(U61(X1, X2))
U62(mark(X)) → mark(U62(X))
U71(mark(X1), X2, X3) → mark(U71(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U81(mark(X)) → mark(U81(X))
U91(mark(X1), X2, X3, X4) → mark(U91(X1, X2, X3, X4))
U92(mark(X1), X2, X3, X4) → mark(U92(X1, X2, X3, X4))
U93(mark(X1), X2, X3, X4) → mark(U93(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X)) → U11(proper(X))
proper(tt) → ok(tt)
proper(U21(X)) → U21(proper(X))
proper(U31(X)) → U31(proper(X))
proper(U41(X1, X2)) → U41(proper(X1), proper(X2))
proper(U42(X)) → U42(proper(X))
proper(isNatIList(X)) → isNatIList(proper(X))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X)) → U52(proper(X))
proper(isNatList(X)) → isNatList(proper(X))
proper(U61(X1, X2)) → U61(proper(X1), proper(X2))
proper(U62(X)) → U62(proper(X))
proper(U71(X1, X2, X3)) → U71(proper(X1), proper(X2), proper(X3))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(isNat(X)) → isNat(proper(X))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U81(X)) → U81(proper(X))
proper(nil) → ok(nil)
proper(U91(X1, X2, X3, X4)) → U91(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U92(X1, X2, X3, X4)) → U92(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U93(X1, X2, X3, X4)) → U93(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X)) → ok(U11(X))
U21(ok(X)) → ok(U21(X))
U31(ok(X)) → ok(U31(X))
U41(ok(X1), ok(X2)) → ok(U41(X1, X2))
U42(ok(X)) → ok(U42(X))
isNatIList(ok(X)) → ok(isNatIList(X))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X)) → ok(U52(X))
isNatList(ok(X)) → ok(isNatList(X))
U61(ok(X1), ok(X2)) → ok(U61(X1, X2))
U62(ok(X)) → ok(U62(X))
U71(ok(X1), ok(X2), ok(X3)) → ok(U71(X1, X2, X3))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
isNat(ok(X)) → ok(isNat(X))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U81(ok(X)) → ok(U81(X))
U91(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U91(X1, X2, X3, X4))
U92(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U92(X1, X2, X3, X4))
U93(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U93(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

(1) QTRSToCSRProof (EQUIVALENT transformation)

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt)) → mark(tt)
active(U21(tt)) → mark(tt)
active(U31(tt)) → mark(tt)
active(U41(tt, V2)) → mark(U42(isNatIList(V2)))
active(U42(tt)) → mark(tt)
active(U51(tt, V2)) → mark(U52(isNatList(V2)))
active(U52(tt)) → mark(tt)
active(U61(tt, V2)) → mark(U62(isNatIList(V2)))
active(U62(tt)) → mark(tt)
active(U71(tt, L, N)) → mark(U72(isNat(N), L))
active(U72(tt, L)) → mark(s(length(L)))
active(U81(tt)) → mark(nil)
active(U91(tt, IL, M, N)) → mark(U92(isNat(M), IL, M, N))
active(U92(tt, IL, M, N)) → mark(U93(isNat(N), IL, M, N))
active(U93(tt, IL, M, N)) → mark(cons(N, take(M, IL)))
active(isNat(0)) → mark(tt)
active(isNat(length(V1))) → mark(U11(isNatList(V1)))
active(isNat(s(V1))) → mark(U21(isNat(V1)))
active(isNatIList(V)) → mark(U31(isNatList(V)))
active(isNatIList(zeros)) → mark(tt)
active(isNatIList(cons(V1, V2))) → mark(U41(isNat(V1), V2))
active(isNatList(nil)) → mark(tt)
active(isNatList(cons(V1, V2))) → mark(U51(isNat(V1), V2))
active(isNatList(take(V1, V2))) → mark(U61(isNat(V1), V2))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U71(isNatList(L), L, N))
active(take(0, IL)) → mark(U81(isNatIList(IL)))
active(take(s(M), cons(N, IL))) → mark(U91(isNatIList(IL), IL, M, N))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X)) → U11(active(X))
active(U21(X)) → U21(active(X))
active(U31(X)) → U31(active(X))
active(U41(X1, X2)) → U41(active(X1), X2)
active(U42(X)) → U42(active(X))
active(U51(X1, X2)) → U51(active(X1), X2)
active(U52(X)) → U52(active(X))
active(U61(X1, X2)) → U61(active(X1), X2)
active(U62(X)) → U62(active(X))
active(U71(X1, X2, X3)) → U71(active(X1), X2, X3)
active(U72(X1, X2)) → U72(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
active(U81(X)) → U81(active(X))
active(U91(X1, X2, X3, X4)) → U91(active(X1), X2, X3, X4)
active(U92(X1, X2, X3, X4)) → U92(active(X1), X2, X3, X4)
active(U93(X1, X2, X3, X4)) → U93(active(X1), X2, X3, X4)
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X)) → mark(U11(X))
U21(mark(X)) → mark(U21(X))
U31(mark(X)) → mark(U31(X))
U41(mark(X1), X2) → mark(U41(X1, X2))
U42(mark(X)) → mark(U42(X))
U51(mark(X1), X2) → mark(U51(X1, X2))
U52(mark(X)) → mark(U52(X))
U61(mark(X1), X2) → mark(U61(X1, X2))
U62(mark(X)) → mark(U62(X))
U71(mark(X1), X2, X3) → mark(U71(X1, X2, X3))
U72(mark(X1), X2) → mark(U72(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
U81(mark(X)) → mark(U81(X))
U91(mark(X1), X2, X3, X4) → mark(U91(X1, X2, X3, X4))
U92(mark(X1), X2, X3, X4) → mark(U92(X1, X2, X3, X4))
U93(mark(X1), X2, X3, X4) → mark(U93(X1, X2, X3, X4))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X)) → U11(proper(X))
proper(tt) → ok(tt)
proper(U21(X)) → U21(proper(X))
proper(U31(X)) → U31(proper(X))
proper(U41(X1, X2)) → U41(proper(X1), proper(X2))
proper(U42(X)) → U42(proper(X))
proper(isNatIList(X)) → isNatIList(proper(X))
proper(U51(X1, X2)) → U51(proper(X1), proper(X2))
proper(U52(X)) → U52(proper(X))
proper(isNatList(X)) → isNatList(proper(X))
proper(U61(X1, X2)) → U61(proper(X1), proper(X2))
proper(U62(X)) → U62(proper(X))
proper(U71(X1, X2, X3)) → U71(proper(X1), proper(X2), proper(X3))
proper(U72(X1, X2)) → U72(proper(X1), proper(X2))
proper(isNat(X)) → isNat(proper(X))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(U81(X)) → U81(proper(X))
proper(nil) → ok(nil)
proper(U91(X1, X2, X3, X4)) → U91(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U92(X1, X2, X3, X4)) → U92(proper(X1), proper(X2), proper(X3), proper(X4))
proper(U93(X1, X2, X3, X4)) → U93(proper(X1), proper(X2), proper(X3), proper(X4))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X)) → ok(U11(X))
U21(ok(X)) → ok(U21(X))
U31(ok(X)) → ok(U31(X))
U41(ok(X1), ok(X2)) → ok(U41(X1, X2))
U42(ok(X)) → ok(U42(X))
isNatIList(ok(X)) → ok(isNatIList(X))
U51(ok(X1), ok(X2)) → ok(U51(X1, X2))
U52(ok(X)) → ok(U52(X))
isNatList(ok(X)) → ok(isNatList(X))
U61(ok(X1), ok(X2)) → ok(U61(X1, X2))
U62(ok(X)) → ok(U62(X))
U71(ok(X1), ok(X2), ok(X3)) → ok(U71(X1, X2, X3))
U72(ok(X1), ok(X2)) → ok(U72(X1, X2))
isNat(ok(X)) → ok(isNat(X))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
U81(ok(X)) → ok(U81(X))
U91(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U91(X1, X2, X3, X4))
U92(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U92(X1, X2, X3, X4))
U93(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U93(X1, X2, X3, X4))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
Special symbols used for the transformation (see [GM04]):
top: top, active: active, mark: mark, ok: ok, proper: proper
The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
isNatIList: empty set
U51: {1}
U52: {1}
isNatList: empty set
U61: {1}
U62: {1}
U71: {1}
U72: {1}
isNat: empty set
s: {1}
length: {1}
U81: {1}
nil: empty set
U91: {1}
U92: {1}
U93: {1}
take: {1, 2}
The QTRS contained all rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is complete (and sound).

(2) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U81(tt) → nil
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(nil) → 0
length(cons(N, L)) → U71(isNatList(L), L, N)
take(0, IL) → U81(isNatIList(IL))
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
isNatIList: empty set
U51: {1}
U52: {1}
isNatList: empty set
U61: {1}
U62: {1}
U71: {1}
U72: {1}
isNat: empty set
s: {1}
length: {1}
U81: {1}
nil: empty set
U91: {1}
U92: {1}
U93: {1}
take: {1, 2}

(3) PoloCSRProof (EQUIVALENT transformation)

The following rules can be removed because they are oriented strictly by a µ-monotonic polynomial ordering:

take(0, IL) → U81(isNatIList(IL))
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(U11(x1)) = 2·x1   
POL(U21(x1)) = x1   
POL(U31(x1)) = x1   
POL(U41(x1, x2)) = 2·x1   
POL(U42(x1)) = x1   
POL(U51(x1, x2)) = 2·x1   
POL(U52(x1)) = x1   
POL(U61(x1, x2)) = 2·x1   
POL(U62(x1)) = 2·x1   
POL(U71(x1, x2, x3)) = 2·x1 + x2 + x3   
POL(U72(x1, x2)) = x1 + x2   
POL(U81(x1)) = x1   
POL(U91(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(U92(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + 2·x3 + 2·x4   
POL(U93(x1, x2, x3, x4)) = 1 + 2·x1 + 2·x2 + 2·x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(isNat(x1)) = 0   
POL(isNatIList(x1)) = 0   
POL(isNatList(x1)) = 0   
POL(length(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 0   


(4) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U81(tt) → nil
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(nil) → 0
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
isNatIList: empty set
U51: {1}
U52: {1}
isNatList: empty set
U61: {1}
U62: {1}
U71: {1}
U72: {1}
isNat: empty set
s: {1}
length: {1}
U81: {1}
nil: empty set
U91: {1}
U92: {1}
U93: {1}
take: {1, 2}

(5) PoloCSRProof (EQUIVALENT transformation)

The following rules can be removed because they are oriented strictly by a µ-monotonic polynomial ordering:

length(nil) → 0
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(U11(x1)) = 2·x1   
POL(U21(x1)) = 2·x1   
POL(U31(x1)) = 2·x1   
POL(U41(x1, x2)) = 2·x1   
POL(U42(x1)) = 2·x1   
POL(U51(x1, x2)) = x1   
POL(U52(x1)) = x1   
POL(U61(x1, x2)) = x1   
POL(U62(x1)) = 2·x1   
POL(U71(x1, x2, x3)) = 2·x1 + 2·x2   
POL(U72(x1, x2)) = x1 + 2·x2   
POL(U81(x1)) = 1 + 2·x1   
POL(U91(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(U92(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(U93(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(isNat(x1)) = 0   
POL(isNatIList(x1)) = 0   
POL(isNatList(x1)) = 0   
POL(length(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 2·x1   
POL(take(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   


(6) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U81(tt) → nil
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
isNatIList: empty set
U51: {1}
U52: {1}
isNatList: empty set
U61: {1}
U62: {1}
U71: {1}
U72: {1}
isNat: empty set
s: {1}
length: {1}
U81: {1}
nil: empty set
U91: {1}
U92: {1}
U93: {1}
take: {1, 2}

(7) PoloCSRProof (EQUIVALENT transformation)

The following rules can be removed because they are oriented strictly by a µ-monotonic polynomial ordering:

U81(tt) → nil
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(U11(x1)) = x1   
POL(U21(x1)) = 2·x1   
POL(U31(x1)) = 2·x1   
POL(U41(x1, x2)) = 2·x1   
POL(U42(x1)) = x1   
POL(U51(x1, x2)) = 2·x1   
POL(U52(x1)) = 2·x1   
POL(U61(x1, x2)) = x1   
POL(U62(x1)) = 2·x1   
POL(U71(x1, x2, x3)) = 2·x1 + 2·x2   
POL(U72(x1, x2)) = 2·x1 + 2·x2   
POL(U81(x1)) = 1 + 2·x1   
POL(U91(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U92(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(U93(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + 2·x4   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(isNat(x1)) = 0   
POL(isNatIList(x1)) = 0   
POL(isNatList(x1)) = 0   
POL(length(x1)) = 2·x1   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(tt) = 0   
POL(zeros) = 0   


(8) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
U11: {1}
tt: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
isNatIList: empty set
U51: {1}
U52: {1}
isNatList: empty set
U61: {1}
U62: {1}
U71: {1}
U72: {1}
isNat: empty set
s: {1}
length: {1}
nil: empty set
U91: {1}
U92: {1}
U93: {1}
take: {1, 2}

(9) CSDependencyPairsProof (EQUIVALENT transformation)

Using Improved CS-DPs [LPAR08] we result in the following initial Q-CSDP problem.

(10) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U11, U21, U31, U42, U52, U62, s, length, take, U42', U52', U62', LENGTH, U11', U21', U31', TAKE} are replacing on all positions.
For all symbols f in {cons, U41, U51, U61, U71, U72, U91, U92, U93, U41', U51', U61', U72', U71', U92', U91', U93'} we have µ(f) = {1}.
The symbols in {isNatIList, isNatList, isNat, ISNATILIST, ISNATLIST, ISNAT, U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

U41'(tt, V2) → U42'(isNatIList(V2))
U41'(tt, V2) → ISNATILIST(V2)
U51'(tt, V2) → U52'(isNatList(V2))
U51'(tt, V2) → ISNATLIST(V2)
U61'(tt, V2) → U62'(isNatIList(V2))
U61'(tt, V2) → ISNATILIST(V2)
U71'(tt, L, N) → U72'(isNat(N), L)
U71'(tt, L, N) → ISNAT(N)
U72'(tt, L) → LENGTH(L)
U91'(tt, IL, M, N) → U92'(isNat(M), IL, M, N)
U91'(tt, IL, M, N) → ISNAT(M)
U92'(tt, IL, M, N) → U93'(isNat(N), IL, M, N)
U92'(tt, IL, M, N) → ISNAT(N)
ISNAT(length(V1)) → U11'(isNatList(V1))
ISNAT(length(V1)) → ISNATLIST(V1)
ISNAT(s(V1)) → U21'(isNat(V1))
ISNAT(s(V1)) → ISNAT(V1)
ISNATILIST(V) → U31'(isNatList(V))
ISNATILIST(V) → ISNATLIST(V)
ISNATILIST(cons(V1, V2)) → U41'(isNat(V1), V2)
ISNATILIST(cons(V1, V2)) → ISNAT(V1)
ISNATLIST(cons(V1, V2)) → U51'(isNat(V1), V2)
ISNATLIST(cons(V1, V2)) → ISNAT(V1)
ISNATLIST(take(V1, V2)) → U61'(isNat(V1), V2)
ISNATLIST(take(V1, V2)) → ISNAT(V1)
LENGTH(cons(N, L)) → U71'(isNatList(L), L, N)
LENGTH(cons(N, L)) → ISNATLIST(L)
TAKE(s(M), cons(N, IL)) → U91'(isNatIList(IL), IL, M, N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(IL)

The collapsing dependency pairs are DPc:

U72'(tt, L) → L
U93'(tt, IL, M, N) → N


The hidden terms of R are:

zeros
take(x0, x1)

Every hiding context is built from:

take on positions {1, 2}

Hence, the new unhiding pairs DPu are :

U72'(tt, L) → U(L)
U93'(tt, IL, M, N) → U(N)
U(take(x_0, x_1)) → U(x_0)
U(take(x_0, x_1)) → U(x_1)
U(zeros) → ZEROS
U(take(x0, x1)) → TAKE(x0, x1)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

Q is empty.

(11) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 3 SCCs with 13 less nodes.

(12) Complex Obligation (AND)

(13) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U11, U21, U31, U42, U52, U62, s, length, take} are replacing on all positions.
For all symbols f in {cons, U41, U51, U61, U71, U72, U91, U92, U93, U51', U61', U41'} we have µ(f) = {1}.
The symbols in {isNatIList, isNatList, isNat, ISNATLIST, ISNATILIST, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

ISNATILIST(V) → ISNATLIST(V)
ISNATLIST(cons(V1, V2)) → U51'(isNat(V1), V2)
U51'(tt, V2) → ISNATLIST(V2)
ISNATLIST(cons(V1, V2)) → ISNAT(V1)
ISNAT(length(V1)) → ISNATLIST(V1)
ISNATLIST(take(V1, V2)) → U61'(isNat(V1), V2)
U61'(tt, V2) → ISNATILIST(V2)
ISNATILIST(cons(V1, V2)) → U41'(isNat(V1), V2)
U41'(tt, V2) → ISNATILIST(V2)
ISNATILIST(cons(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
ISNATLIST(take(V1, V2)) → ISNAT(V1)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

Q is empty.

(14) QCSUsableRulesProof (EQUIVALENT transformation)

The following rules are not useable [DA_EMMES] and can be deleted:

zeroscons(0, zeros)
U71(tt, x0, x1) → U72(isNat(x1), x0)
U72(tt, x0) → s(length(x0))
U91(tt, x0, x1, x2) → U92(isNat(x1), x0, x1, x2)
U92(tt, x0, x1, x2) → U93(isNat(x2), x0, x1, x2)
U93(tt, x0, x1, x2) → cons(x2, take(x1, x0))
length(cons(x0, x1)) → U71(isNatList(x1), x1, x0)
take(s(x0), cons(x1, x2)) → U91(isNatIList(x2), x2, x0, x1)

(15) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {length, U11, s, U21, U52, take, U62, U31, U42} are replacing on all positions.
For all symbols f in {cons, U51, U61, U41, U51', U61', U41'} we have µ(f) = {1}.
The symbols in {isNat, isNatList, isNatIList, ISNATLIST, ISNATILIST, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

ISNATILIST(V) → ISNATLIST(V)
ISNATLIST(cons(V1, V2)) → U51'(isNat(V1), V2)
U51'(tt, V2) → ISNATLIST(V2)
ISNATLIST(cons(V1, V2)) → ISNAT(V1)
ISNAT(length(V1)) → ISNATLIST(V1)
ISNATLIST(take(V1, V2)) → U61'(isNat(V1), V2)
U61'(tt, V2) → ISNATILIST(V2)
ISNATILIST(cons(V1, V2)) → U41'(isNat(V1), V2)
U41'(tt, V2) → ISNATILIST(V2)
ISNATILIST(cons(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
ISNATLIST(take(V1, V2)) → ISNAT(V1)

The TRS R consists of the following rules:

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
U21(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
U61(tt, V2) → U62(isNatIList(V2))
isNatIList(V) → U31(isNatList(V))
U31(tt) → tt
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U62(tt) → tt
U52(tt) → tt
U11(tt) → tt

Q is empty.

(16) QCSDPMuMonotonicPoloProof (EQUIVALENT transformation)

By using the following µ-monotonic polynomial ordering [POLO], at least one Dependency Pair or term rewrite system rule of this Q-CSDP problem can be strictly oriented and thus deleted.
Strictly oriented dependency pairs:

ISNATLIST(take(V1, V2)) → U61'(isNat(V1), V2)
U61'(tt, V2) → ISNATILIST(V2)
ISNAT(s(V1)) → ISNAT(V1)
ISNATLIST(take(V1, V2)) → ISNAT(V1)


Used ordering: POLO with Polynomial interpretation [POLO]:

POL(0) = 1   
POL(ISNAT(x1)) = 2·x1   
POL(ISNATILIST(x1)) = 2·x1   
POL(ISNATLIST(x1)) = 2·x1   
POL(U11(x1)) = 2·x1   
POL(U21(x1)) = 2·x1   
POL(U31(x1)) = x1   
POL(U41(x1, x2)) = 2·x1   
POL(U41'(x1, x2)) = 2·x1 + 2·x2   
POL(U42(x1)) = 2·x1   
POL(U51(x1, x2)) = 2·x1   
POL(U51'(x1, x2)) = x1 + 2·x2   
POL(U52(x1)) = 2·x1   
POL(U61(x1, x2)) = 2·x1   
POL(U61'(x1, x2)) = 1 + x1 + 2·x2   
POL(U62(x1)) = x1   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(isNat(x1)) = 0   
POL(isNatIList(x1)) = 0   
POL(isNatList(x1)) = 0   
POL(length(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 2 + 2·x1   
POL(take(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 2   

(17) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {length, U11, s, U21, U52, take, U62, U31, U42} are replacing on all positions.
For all symbols f in {cons, U51, U61, U41, U51', U41'} we have µ(f) = {1}.
The symbols in {isNat, isNatList, isNatIList, ISNATLIST, ISNATILIST, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

ISNATILIST(V) → ISNATLIST(V)
ISNATLIST(cons(V1, V2)) → U51'(isNat(V1), V2)
U51'(tt, V2) → ISNATLIST(V2)
ISNATLIST(cons(V1, V2)) → ISNAT(V1)
ISNAT(length(V1)) → ISNATLIST(V1)
ISNATILIST(cons(V1, V2)) → U41'(isNat(V1), V2)
U41'(tt, V2) → ISNATILIST(V2)
ISNATILIST(cons(V1, V2)) → ISNAT(V1)

The TRS R consists of the following rules:

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
U21(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
U61(tt, V2) → U62(isNatIList(V2))
isNatIList(V) → U31(isNatList(V))
U31(tt) → tt
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U62(tt) → tt
U52(tt) → tt
U11(tt) → tt

Q is empty.

(18) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 2 SCCs with 2 less nodes.

(19) Complex Obligation (AND)

(20) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {length, U11, s, U21, U52, take, U62, U31, U42} are replacing on all positions.
For all symbols f in {cons, U51, U61, U41, U51'} we have µ(f) = {1}.
The symbols in {isNat, isNatList, isNatIList, ISNATLIST, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

U51'(tt, V2) → ISNATLIST(V2)
ISNATLIST(cons(V1, V2)) → U51'(isNat(V1), V2)
ISNATLIST(cons(V1, V2)) → ISNAT(V1)
ISNAT(length(V1)) → ISNATLIST(V1)

The TRS R consists of the following rules:

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
U21(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
U61(tt, V2) → U62(isNatIList(V2))
isNatIList(V) → U31(isNatList(V))
U31(tt) → tt
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U62(tt) → tt
U52(tt) → tt
U11(tt) → tt

Q is empty.

(21) QCSDPMuMonotonicPoloProof (EQUIVALENT transformation)

By using the following µ-monotonic polynomial ordering [POLO], at least one Dependency Pair or term rewrite system rule of this Q-CSDP problem can be strictly oriented and thus deleted.
Strictly oriented dependency pairs:

ISNATLIST(cons(V1, V2)) → U51'(isNat(V1), V2)
ISNATLIST(cons(V1, V2)) → ISNAT(V1)

Strictly oriented rules of the TRS R:

isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
U21(tt) → tt
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(ISNAT(x1)) = 1 + x1   
POL(ISNATLIST(x1)) = 1 + x1   
POL(U11(x1)) = x1   
POL(U21(x1)) = 1 + x1   
POL(U31(x1)) = x1   
POL(U41(x1, x2)) = 2·x1 + 2·x2   
POL(U42(x1)) = 2·x1   
POL(U51(x1, x2)) = 2·x1 + 2·x2   
POL(U51'(x1, x2)) = 1 + x1 + x2   
POL(U52(x1)) = x1   
POL(U61(x1, x2)) = 2·x1 + 2·x2   
POL(U62(x1)) = x1   
POL(cons(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(isNat(x1)) = x1   
POL(isNatIList(x1)) = x1   
POL(isNatList(x1)) = x1   
POL(length(x1)) = 2·x1   
POL(nil) = 1   
POL(s(x1)) = 2 + x1   
POL(take(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 2   

(22) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {length, U11, U52, U62, U31, U42} are replacing on all positions.
For all symbols f in {U51, U61, U41, U51'} we have µ(f) = {1}.
The symbols in {isNat, isNatList, isNatIList, ISNATLIST, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

U51'(tt, V2) → ISNATLIST(V2)
ISNAT(length(V1)) → ISNATLIST(V1)

The TRS R consists of the following rules:

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
U51(tt, V2) → U52(isNatList(V2))
U61(tt, V2) → U62(isNatIList(V2))
isNatIList(V) → U31(isNatList(V))
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U62(tt) → tt
U52(tt) → tt
U11(tt) → tt

Q is empty.

(23) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 0 SCCs.

(24) TRUE

(25) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {length, U11, s, U21, U52, take, U62, U31, U42} are replacing on all positions.
For all symbols f in {cons, U51, U61, U41, U41'} we have µ(f) = {1}.
The symbols in {isNat, isNatList, isNatIList, ISNATILIST} are not replacing on any position.

The TRS P consists of the following rules:

ISNATILIST(cons(V1, V2)) → U41'(isNat(V1), V2)
U41'(tt, V2) → ISNATILIST(V2)

The TRS R consists of the following rules:

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
U21(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
U61(tt, V2) → U62(isNatIList(V2))
isNatIList(V) → U31(isNatList(V))
U31(tt) → tt
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U62(tt) → tt
U52(tt) → tt
U11(tt) → tt

Q is empty.

(26) QCSDPMuMonotonicPoloProof (EQUIVALENT transformation)

By using the following µ-monotonic polynomial ordering [POLO], at least one Dependency Pair or term rewrite system rule of this Q-CSDP problem can be strictly oriented and thus deleted.
Strictly oriented dependency pairs:

ISNATILIST(cons(V1, V2)) → U41'(isNat(V1), V2)

Strictly oriented rules of the TRS R:

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNatList(nil) → tt
isNat(s(V1)) → U21(isNat(V1))
U21(tt) → tt
isNatIList(zeros) → tt
U42(tt) → tt
U62(tt) → tt
U52(tt) → tt
U11(tt) → tt

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(0) = 2   
POL(ISNATILIST(x1)) = x1   
POL(U11(x1)) = 1 + x1   
POL(U21(x1)) = 1 + x1   
POL(U31(x1)) = x1   
POL(U41(x1, x2)) = 1 + x1 + 2·x2   
POL(U41'(x1, x2)) = x1 + 2·x2   
POL(U42(x1)) = 1 + 2·x1   
POL(U51(x1, x2)) = 1 + x1 + x2   
POL(U52(x1)) = 1 + x1   
POL(U61(x1, x2)) = 1 + x1 + 2·x2   
POL(U62(x1)) = 1 + x1   
POL(cons(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(isNat(x1)) = 2·x1   
POL(isNatIList(x1)) = x1   
POL(isNatList(x1)) = x1   
POL(length(x1)) = 2 + 2·x1   
POL(nil) = 1   
POL(s(x1)) = 2 + 2·x1   
POL(take(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(tt) = 0   
POL(zeros) = 1   

(27) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U52, take, U62, U31, U42} are replacing on all positions.
For all symbols f in {cons, U51, U61, U41, U41'} we have µ(f) = {1}.
The symbols in {isNatList, isNat, isNatIList, ISNATILIST} are not replacing on any position.

The TRS P consists of the following rules:

U41'(tt, V2) → ISNATILIST(V2)

The TRS R consists of the following rules:

isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
U51(tt, V2) → U52(isNatList(V2))
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
U61(tt, V2) → U62(isNatIList(V2))
isNatIList(V) → U31(isNatList(V))
U31(tt) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
U41(tt, V2) → U42(isNatIList(V2))

Q is empty.

(28) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 0 SCCs.

(29) TRUE

(30) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U11, U21, U31, U42, U52, U62, s, length, take, TAKE} are replacing on all positions.
For all symbols f in {cons, U41, U51, U61, U71, U72, U91, U92, U93, U92', U91', U93'} we have µ(f) = {1}.
The symbols in {isNatIList, isNatList, isNat, U} are not replacing on any position.

The TRS P consists of the following rules:

U91'(tt, IL, M, N) → U92'(isNat(M), IL, M, N)
U92'(tt, IL, M, N) → U93'(isNat(N), IL, M, N)
U93'(tt, IL, M, N) → U(N)
U(take(x_0, x_1)) → U(x_0)
U(take(x_0, x_1)) → U(x_1)
U(take(x0, x1)) → TAKE(x0, x1)
TAKE(s(M), cons(N, IL)) → U91'(isNatIList(IL), IL, M, N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

Q is empty.

(31) QCSDPSubtermProof (EQUIVALENT transformation)

We use the subterm processor [DA_EMMES].


The following pairs can be oriented strictly and are deleted.


U(take(x_0, x_1)) → U(x_0)
U(take(x_0, x_1)) → U(x_1)
U(take(x0, x1)) → TAKE(x0, x1)
TAKE(s(M), cons(N, IL)) → U91'(isNatIList(IL), IL, M, N)
The remaining pairs can at least be oriented weakly.

U91'(tt, IL, M, N) → U92'(isNat(M), IL, M, N)
U92'(tt, IL, M, N) → U93'(isNat(N), IL, M, N)
U93'(tt, IL, M, N) → U(N)
Used ordering: Combined order from the following AFS and order.
U92'(x1, x2, x3, x4)  =  x4
U91'(x1, x2, x3, x4)  =  x4
U93'(x1, x2, x3, x4)  =  x4
U(x1)  =  x1
TAKE(x1, x2)  =  x2

Subterm Order

(32) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U11, U21, U31, U42, U52, U62, s, length, take} are replacing on all positions.
For all symbols f in {cons, U41, U51, U61, U71, U72, U91, U92, U93, U92', U91', U93'} we have µ(f) = {1}.
The symbols in {isNatIList, isNatList, isNat, U} are not replacing on any position.

The TRS P consists of the following rules:

U91'(tt, IL, M, N) → U92'(isNat(M), IL, M, N)
U92'(tt, IL, M, N) → U93'(isNat(N), IL, M, N)
U93'(tt, IL, M, N) → U(N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

Q is empty.

(33) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 0 SCCs with 3 less nodes.

(34) TRUE

(35) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U11, U21, U31, U42, U52, U62, s, length, take, LENGTH} are replacing on all positions.
For all symbols f in {cons, U41, U51, U61, U71, U72, U91, U92, U93, U72', U71'} we have µ(f) = {1}.
The symbols in {isNatIList, isNatList, isNat} are not replacing on any position.

The TRS P consists of the following rules:

U71'(tt, L, N) → U72'(isNat(N), L)
U72'(tt, L) → LENGTH(L)
LENGTH(cons(N, L)) → U71'(isNatList(L), L, N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

Q is empty.

(36) QCSDPReductionPairProof (EQUIVALENT transformation)

Using the order
Polynomial interpretation [POLO]:

POL(0) = 1   
POL(LENGTH(x1)) = 2·x1   
POL(U11(x1)) = x1   
POL(U21(x1)) = 2·x1   
POL(U31(x1)) = 1   
POL(U41(x1, x2)) = 1   
POL(U42(x1)) = 1   
POL(U51(x1, x2)) = 2·x2   
POL(U52(x1)) = 2·x1   
POL(U61(x1, x2)) = x1   
POL(U62(x1)) = x1   
POL(U71(x1, x2, x3)) = 2·x2   
POL(U71'(x1, x2, x3)) = 2·x1 + 2·x2   
POL(U72(x1, x2)) = 2·x2   
POL(U72'(x1, x2)) = 2·x2   
POL(U91(x1, x2, x3, x4)) = 2·x3   
POL(U92(x1, x2, x3, x4)) = 2·x3   
POL(U93(x1, x2, x3, x4)) = 2·x3   
POL(cons(x1, x2)) = 2·x2   
POL(isNat(x1)) = x1   
POL(isNatIList(x1)) = 1   
POL(isNatList(x1)) = x1   
POL(length(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 2·x1   
POL(take(x1, x2)) = x1   
POL(tt) = 1   
POL(zeros) = 0   

the following usable rules

isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
length(cons(N, L)) → U71(isNatList(L), L, N)
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
U31(tt) → tt
zeroscons(0, zeros)
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U11(tt) → tt
U21(tt) → tt

could all be oriented weakly.
Furthermore, the pairs

U71'(tt, L, N) → U72'(isNat(N), L)

could be oriented strictly and thus removed by the CS-Reduction Pair Processor [LPAR08,DA_EMMES].

(37) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {U11, U21, U31, U42, U52, U62, s, length, take, LENGTH} are replacing on all positions.
For all symbols f in {cons, U41, U51, U61, U71, U72, U91, U92, U93, U72', U71'} we have µ(f) = {1}.
The symbols in {isNatIList, isNatList, isNat} are not replacing on any position.

The TRS P consists of the following rules:

U72'(tt, L) → LENGTH(L)
LENGTH(cons(N, L)) → U71'(isNatList(L), L, N)

The TRS R consists of the following rules:

zeroscons(0, zeros)
U11(tt) → tt
U21(tt) → tt
U31(tt) → tt
U41(tt, V2) → U42(isNatIList(V2))
U42(tt) → tt
U51(tt, V2) → U52(isNatList(V2))
U52(tt) → tt
U61(tt, V2) → U62(isNatIList(V2))
U62(tt) → tt
U71(tt, L, N) → U72(isNat(N), L)
U72(tt, L) → s(length(L))
U91(tt, IL, M, N) → U92(isNat(M), IL, M, N)
U92(tt, IL, M, N) → U93(isNat(N), IL, M, N)
U93(tt, IL, M, N) → cons(N, take(M, IL))
isNat(0) → tt
isNat(length(V1)) → U11(isNatList(V1))
isNat(s(V1)) → U21(isNat(V1))
isNatIList(V) → U31(isNatList(V))
isNatIList(zeros) → tt
isNatIList(cons(V1, V2)) → U41(isNat(V1), V2)
isNatList(nil) → tt
isNatList(cons(V1, V2)) → U51(isNat(V1), V2)
isNatList(take(V1, V2)) → U61(isNat(V1), V2)
length(cons(N, L)) → U71(isNatList(L), L, N)
take(s(M), cons(N, IL)) → U91(isNatIList(IL), IL, M, N)

Q is empty.

(38) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 0 SCCs with 2 less nodes.

(39) TRUE