Term Rewriting System R:
[x, y]
ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

GE(s(x), s(y)) -> GE(x, y)
MINUS(s(x), s(y)) -> MINUS(x, y)
DIV(x, y) -> IFY(ge(y, s(0)), x, y)
DIV(x, y) -> GE(y, s(0))
IFY(true, x, y) -> IF(ge(x, y), x, y)
IFY(true, x, y) -> GE(x, y)
IF(true, x, y) -> DIV(minus(x, y), y)
IF(true, x, y) -> MINUS(x, y)

Furthermore, R contains three SCCs.


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


Dependency Pair:

GE(s(x), s(y)) -> GE(x, y)


Rules:


ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))





The following dependency pair can be strictly oriented:

GE(s(x), s(y)) -> GE(x, y)


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(GE(x1, x2))=  x1  
  POL(s(x1))=  1 + 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:


ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(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
Remaining


Dependency Pair:

MINUS(s(x), s(y)) -> MINUS(x, y)


Rules:


ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))





The following dependency pair can be strictly oriented:

MINUS(s(x), s(y)) -> MINUS(x, y)


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(MINUS(x1, x2))=  x1  
  POL(s(x1))=  1 + 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:


ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(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
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

IF(true, x, y) -> DIV(minus(x, y), y)
IFY(true, x, y) -> IF(ge(x, y), x, y)
DIV(x, y) -> IFY(ge(y, s(0)), x, y)


Rules:


ge(x, 0) -> true
ge(0, s(x)) -> false
ge(s(x), s(y)) -> ge(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
div(x, y) -> ify(ge(y, s(0)), x, y)
ify(false, x, y) -> divByZeroError
ify(true, x, y) -> if(ge(x, y), x, y)
if(false, x, y) -> 0
if(true, x, y) -> s(div(minus(x, y), y))




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