Term Rewriting System R:
[Y, X]
minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

MINUS(s(X), s(Y)) -> MINUS(X, Y)
GEQ(s(X), s(Y)) -> GEQ(X, Y)
DIV(s(X), s(Y)) -> IF(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
DIV(s(X), s(Y)) -> GEQ(X, Y)
DIV(s(X), s(Y)) -> DIV(minus(X, Y), s(Y))
DIV(s(X), s(Y)) -> MINUS(X, Y)

Furthermore, R contains three SCCs.


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


Dependency Pair:

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


Rules:


minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y





The following dependency pair can be strictly oriented:

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


Additionally, the following rules can be oriented:

minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(geq(x1, x2))=  0  
  POL(false)=  0  
  POL(minus(x1, x2))=  0  
  POL(MINUS(x1, x2))=  1 + x1  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(div(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
Polo


Dependency Pair:


Rules:


minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

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


Rules:


minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y





The following dependency pair can be strictly oriented:

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


Additionally, the following rules can be oriented:

minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(GEQ(x1, x2))=  1 + x1  
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(geq(x1, x2))=  0  
  POL(false)=  0  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(div(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
Polo


Dependency Pair:


Rules:


minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

DIV(s(X), s(Y)) -> DIV(minus(X, Y), s(Y))


Rules:


minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y





The following dependency pair can be strictly oriented:

DIV(s(X), s(Y)) -> DIV(minus(X, Y), s(Y))


Additionally, the following rules can be oriented:

minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(geq(x1, x2))=  0  
  POL(false)=  0  
  POL(DIV(x1, x2))=  x1  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(s(x1))=  1  
  POL(div(x1, x2))=  x1  

resulting in one new DP problem.



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


Dependency Pair:


Rules:


minus(0, Y) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
geq(X, 0) -> true
geq(0, s(Y)) -> false
geq(s(X), s(Y)) -> geq(X, Y)
div(0, s(Y)) -> 0
div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) -> X
if(false, X, Y) -> Y





Using the Dependency Graph resulted in no new DP problems.

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