Term Rewriting System R:
[X, Y]
fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FACT(X) -> IF(zero(X), s(0), prod(X, fact(p(X))))
FACT(X) -> ZERO(X)
FACT(X) -> PROD(X, fact(p(X)))
FACT(X) -> FACT(p(X))
FACT(X) -> P(X)
ADD(s(X), Y) -> ADD(X, Y)
PROD(s(X), Y) -> ADD(Y, prod(X, Y))
PROD(s(X), Y) -> PROD(X, Y)

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:


fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X





The following dependency pair can be strictly oriented:

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


There are no usable rules using the Ce-refinement that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  
  POL(ADD(x1, x2))=  x1  

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:


fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> 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:

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


Rules:


fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X





The following dependency pair can be strictly oriented:

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


There are no usable rules using the Ce-refinement that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  
  POL(PROD(x1, x2))=  x1  

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:


fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> 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:

FACT(X) -> FACT(p(X))


Rules:


fact(X) -> if(zero(X), s(0), prod(X, fact(p(X))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X




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