(0) Obligation:

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

zeroscons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(nil) → 0
length(cons(N, L)) → U11(tt, activate(L))
zerosn__zeros
activate(n__zeros) → zeros
activate(X) → X

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(U11(x1, x2)) = x1 + x2   
POL(U12(x1, x2)) = x1 + x2   
POL(activate(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = x1   
POL(n__zeros) = 0   
POL(nil) = 1   
POL(s(x1)) = x1   
POL(tt) = 0   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

length(nil) → 0


(2) Obligation:

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

zeroscons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zerosn__zeros
activate(n__zeros) → zeros
activate(X) → X

Q is empty.

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(4) Obligation:

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

U111(tt, L) → U121(tt, activate(L))
U111(tt, L) → ACTIVATE(L)
U121(tt, L) → LENGTH(activate(L))
U121(tt, L) → ACTIVATE(L)
LENGTH(cons(N, L)) → U111(tt, activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
ACTIVATE(n__zeros) → ZEROS

The TRS R consists of the following rules:

zeroscons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zerosn__zeros
activate(n__zeros) → zeros
activate(X) → X

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 4 less nodes.

(6) Obligation:

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

U121(tt, L) → LENGTH(activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
U111(tt, L) → U121(tt, activate(L))

The TRS R consists of the following rules:

zeroscons(0, n__zeros)
U11(tt, L) → U12(tt, activate(L))
U12(tt, L) → s(length(activate(L)))
length(cons(N, L)) → U11(tt, activate(L))
zerosn__zeros
activate(n__zeros) → zeros
activate(X) → X

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

(7) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(8) Obligation:

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

U121(tt, L) → LENGTH(activate(L))
LENGTH(cons(N, L)) → U111(tt, activate(L))
U111(tt, L) → U121(tt, activate(L))

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(X) → X
zeroscons(0, n__zeros)
zerosn__zeros

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

(9) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule U121(tt, L) → LENGTH(activate(L)) at position [0] we obtained the following new rules [LPAR04]:

U121(tt, n__zeros) → LENGTH(zeros)
U121(tt, x0) → LENGTH(x0)

(10) Obligation:

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

LENGTH(cons(N, L)) → U111(tt, activate(L))
U111(tt, L) → U121(tt, activate(L))
U121(tt, n__zeros) → LENGTH(zeros)
U121(tt, x0) → LENGTH(x0)

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(X) → X
zeroscons(0, n__zeros)
zerosn__zeros

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

(11) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule U121(tt, n__zeros) → LENGTH(zeros) at position [0] we obtained the following new rules [LPAR04]:

U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
U121(tt, n__zeros) → LENGTH(n__zeros)

(12) Obligation:

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

LENGTH(cons(N, L)) → U111(tt, activate(L))
U111(tt, L) → U121(tt, activate(L))
U121(tt, x0) → LENGTH(x0)
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))
U121(tt, n__zeros) → LENGTH(n__zeros)

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(X) → X
zeroscons(0, n__zeros)
zerosn__zeros

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

(13) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(14) Obligation:

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

U111(tt, L) → U121(tt, activate(L))
U121(tt, x0) → LENGTH(x0)
LENGTH(cons(N, L)) → U111(tt, activate(L))
U121(tt, n__zeros) → LENGTH(cons(0, n__zeros))

The TRS R consists of the following rules:

activate(n__zeros) → zeros
activate(X) → X
zeroscons(0, n__zeros)
zerosn__zeros

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

(15) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U121(tt, activate(activate(n__zeros))) evaluates to t =U121(tt, activate(activate(n__zeros)))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Matcher: [ ]
  • Semiunifier: [ ]




Rewriting sequence

U121(tt, activate(activate(n__zeros)))U121(tt, activate(n__zeros))
with rule activate(X) → X at position [1] and matcher [X / activate(n__zeros)]

U121(tt, activate(n__zeros))U121(tt, n__zeros)
with rule activate(X) → X at position [1] and matcher [X / n__zeros]

U121(tt, n__zeros)LENGTH(cons(0, n__zeros))
with rule U121(tt, n__zeros) → LENGTH(cons(0, n__zeros)) at position [] and matcher [ ]

LENGTH(cons(0, n__zeros))U111(tt, activate(n__zeros))
with rule LENGTH(cons(N, L')) → U111(tt, activate(L')) at position [] and matcher [N / 0, L' / n__zeros]

U111(tt, activate(n__zeros))U121(tt, activate(activate(n__zeros)))
with rule U111(tt, L) → U121(tt, activate(L))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.



(16) FALSE