Term Rewriting System R:
[Z, X, Y, X1, X2]
afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AFST(s(X), cons(Y, Z)) -> MARK(Y)
AFROM(X) -> MARK(X)
AADD(0, X) -> MARK(X)
MARK(fst(X1, X2)) -> AFST(mark(X1), mark(X2))
MARK(fst(X1, X2)) -> MARK(X1)
MARK(fst(X1, X2)) -> MARK(X2)
MARK(from(X)) -> AFROM(mark(X))
MARK(from(X)) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(add(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> MARK(X2)
MARK(len(X)) -> ALEN(mark(X))
MARK(len(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Polynomial Ordering


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(len(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(from(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)
MARK(fst(X1, X2)) -> AFST(mark(X1), mark(X2))
AFST(s(X), cons(Y, Z)) -> MARK(Y)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





The following dependency pair can be strictly oriented:

MARK(len(X)) -> MARK(X)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)


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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polynomial Ordering


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(from(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)
MARK(fst(X1, X2)) -> AFST(mark(X1), mark(X2))
AFST(s(X), cons(Y, Z)) -> MARK(Y)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





The following dependency pairs can be strictly oriented:

MARK(from(X)) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)


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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 3
Dependency Graph


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
AFROM(X) -> MARK(X)
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)
MARK(fst(X1, X2)) -> AFST(mark(X1), mark(X2))
AFST(s(X), cons(Y, Z)) -> MARK(Y)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 4
Polynomial Ordering


Dependency Pairs:

MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)
AFST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(fst(X1, X2)) -> AFST(mark(X1), mark(X2))
MARK(cons(X1, X2)) -> MARK(X1)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





The following dependency pairs can be strictly oriented:

AFST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(cons(X1, X2)) -> MARK(X1)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  1 + x1  
  POL(MARK(x1))=  x1  
  POL(len(x1))=  0  
  POL(a__len(x1))=  0  
  POL(A__FST(x1, x2))=  x2  
  POL(mark(x1))=  x1  
  POL(a__from(x1))=  1 + x1  
  POL(a__add(x1, x2))=  x1 + x2  
  POL(add(x1, x2))=  x1 + x2  
  POL(A__ADD(x1, x2))=  x2  
  POL(0)=  0  
  POL(a__fst(x1, x2))=  x1 + x2  
  POL(cons(x1, x2))=  1 + x1  
  POL(nil)=  0  
  POL(fst(x1, x2))=  x1 + x2  
  POL(s(x1))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 5
Dependency Graph


Dependency Pairs:

MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)
MARK(fst(X1, X2)) -> AFST(mark(X1), mark(X2))


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 6
Polynomial Ordering


Dependency Pairs:

MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> MARK(X2)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





The following dependency pairs can be strictly oriented:

MARK(add(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(add(X1, X2)) -> MARK(X2)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  0  
  POL(MARK(x1))=  x1  
  POL(len(x1))=  0  
  POL(a__len(x1))=  0  
  POL(mark(x1))=  x1  
  POL(a__from(x1))=  0  
  POL(a__add(x1, x2))=  1 + x1 + x2  
  POL(add(x1, x2))=  1 + x1 + x2  
  POL(A__ADD(x1, x2))=  x2  
  POL(0)=  0  
  POL(a__fst(x1, x2))=  x1 + x2  
  POL(cons(x1, x2))=  0  
  POL(nil)=  0  
  POL(fst(x1, x2))=  x1 + x2  
  POL(s(x1))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 7
Dependency Graph


Dependency Pairs:

AADD(0, X) -> MARK(X)
MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 8
Polynomial Ordering


Dependency Pairs:

MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





The following dependency pairs can be strictly oriented:

MARK(fst(X1, X2)) -> MARK(X2)
MARK(fst(X1, X2)) -> MARK(X1)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(MARK(x1))=  x1  
  POL(fst(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Polo
             ...
               →DP Problem 9
Dependency Graph


Dependency Pair:


Rules:


afst(0, Z) -> nil
afst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z))
afst(X1, X2) -> fst(X1, X2)
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
alen(nil) -> 0
alen(cons(X, Z)) -> s(len(Z))
alen(X) -> len(X)
mark(fst(X1, X2)) -> afst(mark(X1), mark(X2))
mark(from(X)) -> afrom(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(len(X)) -> alen(mark(X))
mark(0) -> 0
mark(s(X)) -> s(X)
mark(nil) -> nil
mark(cons(X1, X2)) -> cons(mark(X1), X2)





Using the Dependency Graph resulted in no new DP problems.

Termination of R successfully shown.
Duration:
0:04 minutes