(0) Obligation:

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.

(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__FST(s(X), cons(Y, Z)) → MARK(Y)
A__FROM(X) → MARK(X)
A__ADD(0, X) → MARK(X)
MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2))
MARK(fst(X1, X2)) → MARK(X1)
MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → A__FROM(mark(X))
MARK(from(X)) → MARK(X)
MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2))
MARK(add(X1, X2)) → MARK(X1)
MARK(add(X1, X2)) → MARK(X2)
MARK(len(X)) → A__LEN(mark(X))
MARK(len(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

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.

(3) DependencyGraphProof (EQUIVALENT transformation)

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

(4) Obligation:

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

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

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.

(5) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Combined order from the following AFS and order.
mark(x1)  =  x1
fst(x1, x2)  =  fst(x1, x2)
a__fst(x1, x2)  =  a__fst(x1, x2)
from(x1)  =  from(x1)
a__from(x1)  =  a__from(x1)
add(x1, x2)  =  add(x1, x2)
a__add(x1, x2)  =  a__add(x1, x2)
0  =  0
len(x1)  =  len(x1)
a__len(x1)  =  a__len(x1)
s(x1)  =  s
nil  =  nil
cons(x1, x2)  =  cons(x1)

Recursive path order with status [RPO].
Quasi-Precedence:

[from1, afrom1] > [len1, alen1, s] > [fst2, afst2] > nil > cons1
[from1, afrom1] > [len1, alen1, s] > 0 > nil > cons1
[add2, aadd2] > [len1, alen1, s] > [fst2, afst2] > nil > cons1
[add2, aadd2] > [len1, alen1, s] > 0 > nil > cons1

Status:
fst2: multiset
afst2: multiset
from1: multiset
afrom1: multiset
add2: multiset
aadd2: multiset
0: multiset
len1: [1]
alen1: [1]
s: []
nil: multiset
cons1: multiset

AFS:
mark(x1)  =  x1
fst(x1, x2)  =  fst(x1, x2)
a__fst(x1, x2)  =  a__fst(x1, x2)
from(x1)  =  from(x1)
a__from(x1)  =  a__from(x1)
add(x1, x2)  =  add(x1, x2)
a__add(x1, x2)  =  a__add(x1, x2)
0  =  0
len(x1)  =  len(x1)
a__len(x1)  =  a__len(x1)
s(x1)  =  s
nil  =  nil
cons(x1, x2)  =  cons(x1)

From the DPs we obtained the following set of size-change graphs:

  • A__FST(s(X), cons(Y, Z)) → MARK(Y) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

  • MARK(fst(X1, X2)) → A__FST(mark(X1), mark(X2)) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 > 2

  • A__FROM(X) → MARK(X) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 >= 1

  • A__ADD(0, X) → MARK(X) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 >= 1

  • MARK(from(X)) → A__FROM(mark(X)) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(add(X1, X2)) → A__ADD(mark(X1), mark(X2)) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 > 2

  • MARK(fst(X1, X2)) → MARK(X1) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(fst(X1, X2)) → MARK(X2) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(from(X)) → MARK(X) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(add(X1, X2)) → MARK(X1) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(add(X1, X2)) → MARK(X2) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(len(X)) → MARK(X) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(cons(X1, X2)) → MARK(X1) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

We oriented the following set of usable rules [AAECC05,FROCOS05].


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))
a__add(0, X) → mark(X)
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__from(X) → cons(mark(X), from(s(X)))
a__fst(s(X), cons(Y, Z)) → cons(mark(Y), fst(X, Z))
a__from(X) → from(X)
a__fst(0, Z) → nil
a__fst(X1, X2) → fst(X1, X2)
a__add(s(X), Y) → s(add(X, Y))
a__add(X1, X2) → add(X1, X2)
a__len(nil) → 0
a__len(cons(X, Z)) → s(len(Z))
a__len(X) → len(X)

(6) TRUE