(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeros → cons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0 → n__0
s(X) → n__s(X)
length(X) → n__length(X)
zeros → n__zeros
cons(X1, X2) → n__cons(X1, X2)
nil → n__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → 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:
ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATILIST(IL) → ACTIVATE(IL)
ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
ISNAT(n__length(L)) → ISNATLIST(activate(L))
ISNAT(n__length(L)) → ACTIVATE(L)
ISNATILIST(n__cons(N, IL)) → AND(isNat(activate(N)), isNatIList(activate(IL)))
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
ISNATLIST(n__cons(N, L)) → AND(isNat(activate(N)), isNatList(activate(L)))
ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → AND(isNat(activate(N)), isNatIList(activate(IL)))
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
ZEROS → CONS(0, n__zeros)
ZEROS → 01
TAKE(0, IL) → UTAKE1(isNatIList(IL))
TAKE(0, IL) → ISNATILIST(IL)
UTAKE1(tt) → NIL
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
TAKE(s(M), cons(N, IL)) → AND(isNat(M), and(isNat(N), isNatIList(activate(IL))))
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → AND(isNat(N), isNatIList(activate(IL)))
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
UTAKE2(tt, M, N, IL) → CONS(activate(N), n__take(activate(M), activate(IL)))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))
LENGTH(cons(N, L)) → AND(isNat(N), isNatList(activate(L)))
LENGTH(cons(N, L)) → ISNAT(N)
LENGTH(cons(N, L)) → ISNATLIST(activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
ULENGTH(tt, L) → S(length(activate(L)))
ULENGTH(tt, L) → LENGTH(activate(L))
ULENGTH(tt, L) → ACTIVATE(L)
ACTIVATE(n__0) → 01
ACTIVATE(n__s(X)) → S(X)
ACTIVATE(n__length(X)) → LENGTH(X)
ACTIVATE(n__zeros) → ZEROS
ACTIVATE(n__cons(X1, X2)) → CONS(X1, X2)
ACTIVATE(n__nil) → NIL
ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
The TRS R consists of the following rules:
and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeros → cons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0 → n__0
s(X) → n__s(X)
length(X) → n__length(X)
zeros → n__zeros
cons(X1, X2) → n__cons(X1, X2)
nil → n__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → 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 17 less nodes.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
ACTIVATE(n__length(X)) → LENGTH(X)
LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))
ULENGTH(tt, L) → LENGTH(activate(L))
LENGTH(cons(N, L)) → ISNAT(N)
ISNAT(n__length(L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
TAKE(0, IL) → ISNATILIST(IL)
ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNAT(n__length(L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(IL) → ACTIVATE(IL)
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
LENGTH(cons(N, L)) → ISNATLIST(activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
ULENGTH(tt, L) → ACTIVATE(L)
The TRS R consists of the following rules:
and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeros → cons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0 → n__0
s(X) → n__s(X)
length(X) → n__length(X)
zeros → n__zeros
cons(X1, X2) → n__cons(X1, X2)
nil → n__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.