Term Rewriting System R:
[y, x]
le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

LE(s(x), s(y)) -> LE(x, y)
MINUS(s(x), s(y)) -> MINUS(x, y)
MOD(s(x), s(y)) -> IFMOD(le(y, x), s(x), s(y))
MOD(s(x), s(y)) -> LE(y, x)
IFMOD(true, s(x), s(y)) -> MOD(minus(x, y), s(y))
IFMOD(true, 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:

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


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)





The following dependency pair can be strictly oriented:

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


Additionally, the following rules can be oriented:

le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(LE(x1, x2))=  1 + x1  
  POL(0)=  0  
  POL(false)=  0  
  POL(mod(x1, x2))=  x1  
  POL(minus(x1, x2))=  x1  
  POL(if_mod(x1, x2, x3))=  x2  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(le(x1, x2))=  0  

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:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), 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
Polo


Dependency Pair:

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


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)





The following dependency pair can be strictly oriented:

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


Additionally, the following rules can be oriented:

le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(false)=  0  
  POL(mod(x1, x2))=  x1  
  POL(minus(x1, x2))=  x1  
  POL(if_mod(x1, x2, x3))=  x2  
  POL(MINUS(x1, x2))=  1 + x1  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(le(x1, x2))=  0  

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:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), 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
Polynomial Ordering


Dependency Pairs:

IFMOD(true, s(x), s(y)) -> MOD(minus(x, y), s(y))
MOD(s(x), s(y)) -> IFMOD(le(y, x), s(x), s(y))


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)





The following dependency pair can be strictly oriented:

IFMOD(true, s(x), s(y)) -> MOD(minus(x, y), s(y))


Additionally, the following rules can be oriented:

le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(false)=  0  
  POL(mod(x1, x2))=  x1  
  POL(MOD(x1, x2))=  x1  
  POL(minus(x1, x2))=  x1  
  POL(if_mod(x1, x2, x3))=  x2  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  
  POL(IF_MOD(x1, x2, x3))=  x2  
  POL(le(x1, x2))=  0  

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:

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


Rules:


le(0, y) -> true
le(s(x), 0) -> false
le(s(x), s(y)) -> le(x, y)
minus(x, 0) -> x
minus(s(x), s(y)) -> minus(x, y)
mod(0, y) -> 0
mod(s(x), 0) -> 0
mod(s(x), s(y)) -> ifmod(le(y, x), s(x), s(y))
ifmod(true, s(x), s(y)) -> mod(minus(x, y), s(y))
ifmod(false, s(x), s(y)) -> s(x)





Using the Dependency Graph resulted in no new DP problems.

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