Termination w.r.t. Q of the following Term Rewriting System could be proven:

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

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

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

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(add(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
A__FROM(X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → MARK(X)
MARK(len(X)) → A__LEN(mark(X))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

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

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

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

MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(add(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
A__FROM(X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → MARK(X)
MARK(len(X)) → A__LEN(mark(X))
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ QDPOrderProof

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

MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
A__FST(s(X), cons(Y, Z)) → MARK(Y)
A__FROM(X) → MARK(X)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → MARK(X)
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
A__ADD(0, X) → MARK(X)
MARK(add(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
A__FST(s(X), cons(Y, Z)) → MARK(Y)
MARK(add(X1, X2)) → MARK(X1)
MARK(len(X)) → MARK(X)
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
The remaining pairs can at least be oriented weakly.

MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
A__FROM(X) → MARK(X)
Used ordering: Polynomial interpretation [25]:

POL(0) = 1   
POL(A__ADD(x1, x2)) = x1 + x2   
POL(A__FROM(x1)) = x1   
POL(A__FST(x1, x2)) = 1 + x2   
POL(MARK(x1)) = x1   
POL(a__add(x1, x2)) = 1 + x1 + x2   
POL(a__from(x1)) = 1 + x1   
POL(a__fst(x1, x2)) = 1 + x1 + x2   
POL(a__len(x1)) = 1 + x1   
POL(add(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = 1 + x1   
POL(from(x1)) = 1 + x1   
POL(fst(x1, x2)) = 1 + x1 + x2   
POL(len(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__from(X) → cons(mark(X), from(s(X)))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
a__add(0, X) → mark(X)
mark(from(X)) → a__from(mark(X))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
a__len(cons(X, Z)) → s(len(Z))
mark(nil) → nil
mark(s(X)) → s(X)
mark(0) → 0
mark(len(X)) → a__len(mark(X))
a__add(X1, X2) → add(X1, X2)
a__from(X) → from(X)
a__fst(X1, X2) → fst(X1, X2)
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__len(X) → len(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
QDP
              ↳ DependencyGraphProof

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

MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
A__FROM(X) → MARK(X)

The TRS R consists of the following rules:

a__fst(0, Z) → nil
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
a__add(0, X) → mark(X)
a__add(s(X), Y) → s(add(X, Y))
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
mark(fst(X1, X2)) → a__fst(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(add(X1, X2)) → a__add(mark(X1), mark(X2))
mark(len(X)) → a__len(mark(X))
mark(0) → 0
mark(s(X)) → s(X)
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__fst(X1, X2) → fst(X1, X2)
a__from(X) → from(X)
a__add(X1, X2) → add(X1, X2)
a__len(X) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.