(0) Obligation:

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

a__from(X) → cons(mark(X), from(s(X)))
a__length(nil) → 0
a__length(cons(X, Y)) → s(a__length1(Y))
a__length1(X) → a__length(X)
mark(from(X)) → a__from(mark(X))
mark(length(X)) → a__length(X)
mark(length1(X)) → a__length1(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(0) → 0
a__from(X) → from(X)
a__length(X) → length(X)
a__length1(X) → length1(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:

A__FROM(X) → MARK(X)
A__LENGTH(cons(X, Y)) → A__LENGTH1(Y)
A__LENGTH1(X) → A__LENGTH(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(from(X)) → MARK(X)
MARK(length(X)) → A__LENGTH(X)
MARK(length1(X)) → A__LENGTH1(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__from(X) → cons(mark(X), from(s(X)))
a__length(nil) → 0
a__length(cons(X, Y)) → s(a__length1(Y))
a__length1(X) → a__length(X)
mark(from(X)) → a__from(mark(X))
mark(length(X)) → a__length(X)
mark(length1(X)) → a__length1(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(0) → 0
a__from(X) → from(X)
a__length(X) → length(X)
a__length1(X) → length1(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 2 SCCs with 2 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

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

A__LENGTH1(X) → A__LENGTH(X)
A__LENGTH(cons(X, Y)) → A__LENGTH1(Y)

The TRS R consists of the following rules:

a__from(X) → cons(mark(X), from(s(X)))
a__length(nil) → 0
a__length(cons(X, Y)) → s(a__length1(Y))
a__length1(X) → a__length(X)
mark(from(X)) → a__from(mark(X))
mark(length(X)) → a__length(X)
mark(length1(X)) → a__length1(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(0) → 0
a__from(X) → from(X)
a__length(X) → length(X)
a__length1(X) → length1(X)

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


A__LENGTH(cons(X, Y)) → A__LENGTH1(Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
A__LENGTH1(x1)  =  x1
A__LENGTH(x1)  =  x1
cons(x1, x2)  =  cons(x2)

Recursive path order with status [RPO].
Precedence:
trivial

Status:
trivial

The following usable rules [FROCOS05] were oriented: none

(7) Obligation:

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

A__LENGTH1(X) → A__LENGTH(X)

The TRS R consists of the following rules:

a__from(X) → cons(mark(X), from(s(X)))
a__length(nil) → 0
a__length(cons(X, Y)) → s(a__length1(Y))
a__length1(X) → a__length(X)
mark(from(X)) → a__from(mark(X))
mark(length(X)) → a__length(X)
mark(length1(X)) → a__length1(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(0) → 0
a__from(X) → from(X)
a__length(X) → length(X)
a__length1(X) → length1(X)

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

(8) DependencyGraphProof (EQUIVALENT transformation)

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

(9) TRUE

(10) Obligation:

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

MARK(from(X)) → A__FROM(mark(X))
A__FROM(X) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__from(X) → cons(mark(X), from(s(X)))
a__length(nil) → 0
a__length(cons(X, Y)) → s(a__length1(Y))
a__length1(X) → a__length(X)
mark(from(X)) → a__from(mark(X))
mark(length(X)) → a__length(X)
mark(length1(X)) → a__length1(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(0) → 0
a__from(X) → from(X)
a__length(X) → length(X)
a__length1(X) → length1(X)

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