Term Rewriting System R:
[X, Y, Z]
and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ADD(s(X), Y) -> ADD(X, Y)
FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
FROM(X) -> FROM(s(X))

Furthermore, R contains three SCCs.


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


Dependency Pair:

ADD(s(X), Y) -> ADD(X, Y)


Rules:


and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))





The following dependency pair can be strictly oriented:

ADD(s(X), Y) -> ADD(X, Y)


Additionally, the following rules can be oriented:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  0  
  POL(and(x1, x2))=  x2  
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(first(x1, x2))=  0  
  POL(false)=  0  
  POL(cons(x1, x2))=  0  
  POL(true)=  0  
  POL(nil)=  0  
  POL(s(x1))=  1 + x1  
  POL(ADD(x1, x2))=  x1  
  POL(add(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 4
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Remaining


Dependency Pair:


Rules:


and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)


Rules:


and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))





The following dependency pair can be strictly oriented:

FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)


Additionally, the following rules can be oriented:

and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  0  
  POL(and(x1, x2))=  x2  
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(first(x1, x2))=  0  
  POL(false)=  0  
  POL(cons(x1, x2))=  0  
  POL(FIRST(x1, x2))=  x1  
  POL(true)=  0  
  POL(nil)=  0  
  POL(s(x1))=  1 + x1  
  POL(add(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 5
Dependency Graph
       →DP Problem 3
Remaining


Dependency Pair:


Rules:


and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Remaining Obligation(s)




The following remains to be proven:
Dependency Pair:

FROM(X) -> FROM(s(X))


Rules:


and(true, X) -> X
and(false, Y) -> false
if(true, X, Y) -> X
if(false, X, Y) -> Y
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))




Termination of R could not be shown.
Duration:
0:00 minutes