(0) Obligation:

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

a__zeroscons(0, zeros)
a__and(tt, X) → mark(X)
a__length(nil) → 0
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(tt) → tt
mark(nil) → nil
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)

Q is empty.

(1) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__and(x1, x2)) = 1 + x1 + 2·x2   
POL(a__length(x1)) = x1   
POL(a__zeros) = 0   
POL(and(x1, x2)) = 1 + x1 + 2·x2   
POL(cons(x1, x2)) = 2·x1 + 2·x2   
POL(length(x1)) = x1   
POL(mark(x1)) = 2·x1   
POL(nil) = 2   
POL(s(x1)) = x1   
POL(tt) = 2   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

a__and(tt, X) → mark(X)
a__length(nil) → 0
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(tt) → tt
mark(nil) → nil


(2) Obligation:

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

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))
a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)

Q is empty.

(3) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__and(x1, x2)) = 2 + 2·x1 + x2   
POL(a__length(x1)) = 2 + 2·x1   
POL(a__zeros) = 2   
POL(and(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(length(x1)) = 1 + 2·x1   
POL(mark(x1)) = 2·x1   
POL(s(x1)) = x1   
POL(zeros) = 1   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

a__zeroszeros
a__and(X1, X2) → and(X1, X2)
a__length(X) → length(X)


(4) Obligation:

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

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(length(X)) → a__length(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))

Q is empty.

(5) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__length(x1)) = x1   
POL(a__zeros) = 0   
POL(cons(x1, x2)) = x1 + 2·x2   
POL(length(x1)) = 1 + 2·x1   
POL(mark(x1)) = x1   
POL(s(x1)) = 2·x1   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

mark(length(X)) → a__length(mark(X))


(6) Obligation:

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

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(0) → 0
mark(s(X)) → s(mark(X))

Q is empty.

(7) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__length(x1)) = 2·x1   
POL(a__zeros) = 2   
POL(cons(x1, x2)) = 2 + x1 + x2   
POL(mark(x1)) = 2 + x1   
POL(s(x1)) = x1   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

mark(0) → 0


(8) Obligation:

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

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))

Q is empty.

(9) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(a__length(x1)) = 2·x1   
POL(a__zeros) = 2   
POL(cons(x1, x2)) = 2 + x1 + 2·x2   
POL(mark(x1)) = 2 + 2·x1   
POL(s(x1)) = x1   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

mark(cons(X1, X2)) → cons(mark(X1), X2)


(10) Obligation:

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

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))

Q is empty.

(11) DependencyPairsProof (EQUIVALENT transformation)

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

(12) Obligation:

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

A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))
A__LENGTH(cons(N, L)) → MARK(L)
MARK(zeros) → A__ZEROS
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))

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 2 SCCs with 2 less nodes.

(14) Complex Obligation (AND)

(15) Obligation:

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

MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))

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

(16) 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:

  • MARK(s(X)) → MARK(X)
    The graph contains the following edges 1 > 1

(17) YES

(18) Obligation:

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

A__LENGTH(cons(N, L)) → A__LENGTH(mark(L))

The TRS R consists of the following rules:

a__zeroscons(0, zeros)
a__length(cons(N, L)) → s(a__length(mark(L)))
mark(zeros) → a__zeros
mark(s(X)) → s(mark(X))

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

(19) 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
A__LENGTH(cons(0, zeros))[ ]n[ ] → A__LENGTH(cons(0, zeros))[ ]n[x0 / 0]
This rule is correct for the QDP as the following derivation shows:

intermediate steps: Equivalent (Simplify mu) - Instantiate mu
A__LENGTH(cons(x0, zeros))[ ]n[ ] → A__LENGTH(cons(0, zeros))[ ]n[ ]
    by Narrowing at position: [0]
        A__LENGTH(cons(x0, zeros))[ ]n[ ] → A__LENGTH(a__zeros)[ ]n[ ]
            by Narrowing at position: [0]
                intermediate steps: Instantiation - Instantiation
                A__LENGTH(cons(N, L))[ ]n[ ] → A__LENGTH(mark(L))[ ]n[ ]
                    by OriginalRule from TRS P

                mark(zeros)[ ]n[ ] → a__zeros[ ]n[ ]
                    by OriginalRule from TRS R

        a__zeros[ ]n[ ] → cons(0, zeros)[ ]n[ ]
            by OriginalRule from TRS R

(20) NO