Term Rewriting System R:
[y, x]
leq(0, y) -> true
leq(s(x), 0) -> false
leq(s(x), s(y)) -> leq(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> if(leq(y, x), mod(-(s(x), s(y)), s(y)), s(x))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

LEQ(s(x), s(y)) -> LEQ(x, y)
-'(s(x), s(y)) -> -'(x, y)
MOD(s(x), s(y)) -> IF(leq(y, x), mod(-(s(x), s(y)), s(y)), s(x))
MOD(s(x), s(y)) -> LEQ(y, x)
MOD(s(x), s(y)) -> MOD(-(s(x), s(y)), s(y))
MOD(s(x), s(y)) -> -'(s(x), s(y))

Furthermore, R contains three SCCs.


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


Dependency Pair:

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


Rules:


leq(0, y) -> true
leq(s(x), 0) -> false
leq(s(x), s(y)) -> leq(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> if(leq(y, x), mod(-(s(x), s(y)), s(y)), s(x))





The following dependency pair can be strictly oriented:

LEQ(s(x), s(y)) -> LEQ(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(LEQ(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:


leq(0, y) -> true
leq(s(x), 0) -> false
leq(s(x), s(y)) -> leq(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> if(leq(y, x), mod(-(s(x), s(y)), s(y)), 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:

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


Rules:


leq(0, y) -> true
leq(s(x), 0) -> false
leq(s(x), s(y)) -> leq(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> if(leq(y, x), mod(-(s(x), s(y)), s(y)), s(x))





The following dependency pair can be strictly oriented:

-'(s(x), s(y)) -> -'(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(-'(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:


leq(0, y) -> true
leq(s(x), 0) -> false
leq(s(x), s(y)) -> leq(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> if(leq(y, x), mod(-(s(x), s(y)), s(y)), 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:

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


Rules:


leq(0, y) -> true
leq(s(x), 0) -> false
leq(s(x), s(y)) -> leq(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> if(leq(y, x), mod(-(s(x), s(y)), s(y)), s(x))




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