(0) Obligation:

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

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

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:

EQ(s(X), s(Y)) → EQ(X, Y)
INF(X) → INF(s(X))
TAKE(s(X), cons(Y, L)) → TAKE(X, L)
LENGTH(cons(X, L)) → LENGTH(L)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

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 4 SCCs.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LENGTH(cons(X, L)) → LENGTH(L)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LENGTH(cons(X, L)) → LENGTH(L)
    The graph contains the following edges 1 > 1

(7) YES

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TAKE(s(X), cons(Y, L)) → TAKE(X, L)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(9) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • TAKE(s(X), cons(Y, L)) → TAKE(X, L)
    The graph contains the following edges 1 > 1, 2 > 2

(10) YES

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

INF(X) → INF(s(X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) NonLoopProof (EQUIVALENT transformation)

By Theorem 8 [NONLOOP] we deduce infiniteness of the QDP.
We apply the theorem with m = 1, b = 0,
σ' = [ ], and μ' = [x0 / s(x0)] on the rule
INF(s(x0))[ ]n[ ] → INF(s(x0))[ ]n[x0 / s(x0)]
This rule is correct for the QDP as the following derivation shows:

intermediate steps: Equivalent (Simplify mu) - Instantiate mu - Instantiation
INF(X)[ ]n[ ] → INF(s(X))[ ]n[ ]
    by OriginalRule from TRS P

(13) NO

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

EQ(s(X), s(Y)) → EQ(X, Y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(15) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • EQ(s(X), s(Y)) → EQ(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(16) YES