(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
zeros → cons(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))
zeros → n__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 + 2·x2
POL(U12(x1, x2)) = 2·x1 + 2·x2
POL(activate(x1)) = x1
POL(cons(x1, x2)) = 2·x1 + 2·x2
POL(length(x1)) = 2·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:
zeros → cons(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))
zeros → n__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:
zeros → cons(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))
zeros → n__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:
zeros → cons(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))
zeros → n__zeros
activate(n__zeros) → zeros
activate(X) → X
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(7) NonLoopProof (EQUIVALENT transformation)
By Theorem 8 [NONLOOP] we deduce infiniteness of the QDP.
We apply the theorem with m = 1, b = 0,
σ' = [ ], and μ' = [x0 / 0] on the rule
LENGTH(cons(0, n__zeros))[ ]n[ ] → LENGTH(cons(0, n__zeros))[ ]n[x0 / 0]
This rule is correct for the QDP as the following derivation shows:
intermediate steps: Equivalent (Simplify mu) - Instantiate mu
LENGTH(cons(x0, n__zeros))[ ]n[ ] → LENGTH(cons(0, n__zeros))[ ]n[ ]
by Rewrite t
LENGTH(cons(x0, n__zeros))[ ]n[ ] → LENGTH(activate(activate(zeros)))[ ]n[ ]
by Narrowing at position: [0,0,0]
intermediate steps: Instantiation
LENGTH(cons(x0, x1))[ ]n[ ] → LENGTH(activate(activate(activate(x1))))[ ]n[ ]
by Narrowing at position: []
intermediate steps: Instantiation
LENGTH(cons(N, L))[ ]n[ ] → U111(tt, activate(L))[ ]n[ ]
by OriginalRule from TRS P
intermediate steps: Instantiation - Instantiation
U111(tt, x0)[ ]n[ ] → LENGTH(activate(activate(x0)))[ ]n[ ]
by Narrowing at position: []
intermediate steps: Instantiation
U111(tt, L)[ ]n[ ] → U121(tt, activate(L))[ ]n[ ]
by OriginalRule from TRS P
intermediate steps: Instantiation - Instantiation
U121(tt, L)[ ]n[ ] → LENGTH(activate(L))[ ]n[ ]
by OriginalRule from TRS P
activate(n__zeros)[ ]n[ ] → zeros[ ]n[ ]
by OriginalRule from TRS R
(8) NO