Term Rewriting System R:
[y, x, z]
minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

MINUSACTIVE(s(x), s(y)) -> MINUSACTIVE(x, y)
MARK(s(x)) -> MARK(x)
MARK(minus(x, y)) -> MINUSACTIVE(x, y)
MARK(ge(x, y)) -> GEACTIVE(x, y)
MARK(div(x, y)) -> DIVACTIVE(mark(x), y)
MARK(div(x, y)) -> MARK(x)
MARK(if(x, y, z)) -> IFACTIVE(mark(x), y, z)
MARK(if(x, y, z)) -> MARK(x)
GEACTIVE(s(x), s(y)) -> GEACTIVE(x, y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
DIVACTIVE(s(x), s(y)) -> GEACTIVE(x, y)
IFACTIVE(true, x, y) -> MARK(x)
IFACTIVE(false, x, y) -> MARK(y)

Furthermore, R contains three SCCs.


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


Dependency Pair:

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


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pair can be strictly oriented:

MINUSACTIVE(s(x), s(y)) -> MINUSACTIVE(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(s(x1))=  1 + x1  
  POL(MINUS_ACTIVE(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
Nar


Dependency Pair:


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

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


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pair can be strictly oriented:

GEACTIVE(s(x), s(y)) -> GEACTIVE(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_ACTIVE(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
Nar


Dependency Pair:


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Narrowing Transformation


Dependency Pairs:

MARK(if(x, y, z)) -> MARK(x)
IFACTIVE(false, x, y) -> MARK(y)
MARK(if(x, y, z)) -> IFACTIVE(mark(x), y, z)
MARK(div(x, y)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(x, y)) -> DIVACTIVE(mark(x), y)
MARK(s(x)) -> MARK(x)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(div(x, y)) -> DIVACTIVE(mark(x), y)
six new Dependency Pairs are created:

MARK(div(0, y)) -> DIVACTIVE(0, y)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(div(minus(x'', y''), y)) -> DIVACTIVE(minusactive(x'', y''), y)
MARK(div(ge(x'', y''), y)) -> DIVACTIVE(geactive(x'', y''), y)
MARK(div(div(x'', y''), y)) -> DIVACTIVE(divactive(mark(x''), y''), y)
MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Narrowing Transformation


Dependency Pairs:

MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)
MARK(div(div(x'', y''), y)) -> DIVACTIVE(divactive(mark(x''), y''), y)
MARK(div(ge(x'', y''), y)) -> DIVACTIVE(geactive(x'', y''), y)
MARK(div(minus(x'', y''), y)) -> DIVACTIVE(minusactive(x'', y''), y)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
IFACTIVE(true, x, y) -> MARK(x)
MARK(if(x, y, z)) -> IFACTIVE(mark(x), y, z)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
MARK(if(x, y, z)) -> MARK(x)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(if(x, y, z)) -> IFACTIVE(mark(x), y, z)
six new Dependency Pairs are created:

MARK(if(0, y, z)) -> IFACTIVE(0, y, z)
MARK(if(s(x''), y, z)) -> IFACTIVE(s(mark(x'')), y, z)
MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 7
Narrowing Transformation


Dependency Pairs:

MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
MARK(div(div(x'', y''), y)) -> DIVACTIVE(divactive(mark(x''), y''), y)
MARK(div(ge(x'', y''), y)) -> DIVACTIVE(geactive(x'', y''), y)
MARK(div(minus(x'', y''), y)) -> DIVACTIVE(minusactive(x'', y''), y)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(div(minus(x'', y''), y)) -> DIVACTIVE(minusactive(x'', y''), y)
three new Dependency Pairs are created:

MARK(div(minus(0, y'''), y)) -> DIVACTIVE(0, y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(div(minus(x''', y'''), y)) -> DIVACTIVE(minus(x''', y'''), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 8
Narrowing Transformation


Dependency Pairs:

MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)
MARK(div(div(x'', y''), y)) -> DIVACTIVE(divactive(mark(x''), y''), y)
MARK(div(ge(x'', y''), y)) -> DIVACTIVE(geactive(x'', y''), y)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(div(ge(x'', y''), y)) -> DIVACTIVE(geactive(x'', y''), y)
four new Dependency Pairs are created:

MARK(div(ge(x''', 0), y)) -> DIVACTIVE(true, y)
MARK(div(ge(0, s(y''')), y)) -> DIVACTIVE(false, y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(div(ge(x''', y'''), y)) -> DIVACTIVE(ge(x''', y'''), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 9
Narrowing Transformation


Dependency Pairs:

MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)
MARK(div(div(x'', y''), y)) -> DIVACTIVE(divactive(mark(x''), y''), y)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(div(div(x'', y''), y)) -> DIVACTIVE(divactive(mark(x''), y''), y)
seven new Dependency Pairs are created:

MARK(div(div(x''', y'''), y)) -> DIVACTIVE(div(mark(x'''), y'''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 10
Narrowing Transformation


Dependency Pairs:

MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(div(if(x'', y'', z'), y)) -> DIVACTIVE(ifactive(mark(x''), y'', z'), y)
seven new Dependency Pairs are created:

MARK(div(if(x''', y''', z''), y)) -> DIVACTIVE(if(mark(x'''), y''', z''), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 11
Narrowing Transformation


Dependency Pairs:

MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(if(minus(x'', y''), y, z)) -> IFACTIVE(minusactive(x'', y''), y, z)
three new Dependency Pairs are created:

MARK(if(minus(0, y'''), y, z)) -> IFACTIVE(0, y, z)
MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)
MARK(if(minus(x''', y'''), y, z)) -> IFACTIVE(minus(x''', y'''), y, z)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 12
Narrowing Transformation


Dependency Pairs:

MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(if(ge(x'', y''), y, z)) -> IFACTIVE(geactive(x'', y''), y, z)
four new Dependency Pairs are created:

MARK(if(ge(x''', 0), y, z)) -> IFACTIVE(true, y, z)
MARK(if(ge(0, s(y''')), y, z)) -> IFACTIVE(false, y, z)
MARK(if(ge(s(x'), s(y''')), y, z)) -> IFACTIVE(geactive(x', y'''), y, z)
MARK(if(ge(x''', y'''), y, z)) -> IFACTIVE(ge(x''', y'''), y, z)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 13
Narrowing Transformation


Dependency Pairs:

MARK(if(ge(s(x'), s(y''')), y, z)) -> IFACTIVE(geactive(x', y'''), y, z)
MARK(if(ge(0, s(y''')), y, z)) -> IFACTIVE(false, y, z)
MARK(if(ge(x''', 0), y, z)) -> IFACTIVE(true, y, z)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(if(div(x'', y''), y, z)) -> IFACTIVE(divactive(mark(x''), y''), y, z)
seven new Dependency Pairs are created:

MARK(if(div(x''', y'''), y, z)) -> IFACTIVE(div(mark(x'''), y'''), y, z)
MARK(if(div(0, y''), y, z)) -> IFACTIVE(divactive(0, y''), y, z)
MARK(if(div(s(x'), y''), y, z)) -> IFACTIVE(divactive(s(mark(x')), y''), y, z)
MARK(if(div(minus(x', y'''), y''), y, z)) -> IFACTIVE(divactive(minusactive(x', y'''), y''), y, z)
MARK(if(div(ge(x', y'''), y''), y, z)) -> IFACTIVE(divactive(geactive(x', y'''), y''), y, z)
MARK(if(div(div(x', y'''), y''), y, z)) -> IFACTIVE(divactive(divactive(mark(x'), y'''), y''), y, z)
MARK(if(div(if(x', y''', z''), y''), y, z)) -> IFACTIVE(divactive(ifactive(mark(x'), y''', z''), y''), y, z)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 14
Narrowing Transformation


Dependency Pairs:

MARK(if(div(if(x', y''', z''), y''), y, z)) -> IFACTIVE(divactive(ifactive(mark(x'), y''', z''), y''), y, z)
MARK(if(div(div(x', y'''), y''), y, z)) -> IFACTIVE(divactive(divactive(mark(x'), y'''), y''), y, z)
MARK(if(div(ge(x', y'''), y''), y, z)) -> IFACTIVE(divactive(geactive(x', y'''), y''), y, z)
MARK(if(div(minus(x', y'''), y''), y, z)) -> IFACTIVE(divactive(minusactive(x', y'''), y''), y, z)
MARK(if(div(s(x'), y''), y, z)) -> IFACTIVE(divactive(s(mark(x')), y''), y, z)
MARK(if(div(0, y''), y, z)) -> IFACTIVE(divactive(0, y''), y, z)
MARK(if(ge(0, s(y''')), y, z)) -> IFACTIVE(false, y, z)
MARK(if(ge(x''', 0), y, z)) -> IFACTIVE(true, y, z)
MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
MARK(if(ge(s(x'), s(y''')), y, z)) -> IFACTIVE(geactive(x', y'''), y, z)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(if(if(x'', y'', z''), y, z)) -> IFACTIVE(ifactive(mark(x''), y'', z''), y, z)
seven new Dependency Pairs are created:

MARK(if(if(x''', y''', z'''), y, z)) -> IFACTIVE(if(mark(x'''), y''', z'''), y, z)
MARK(if(if(0, y'', z''), y, z)) -> IFACTIVE(ifactive(0, y'', z''), y, z)
MARK(if(if(s(x'), y'', z''), y, z)) -> IFACTIVE(ifactive(s(mark(x')), y'', z''), y, z)
MARK(if(if(minus(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(minusactive(x', y'''), y'', z''), y, z)
MARK(if(if(ge(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(geactive(x', y'''), y'', z''), y, z)
MARK(if(if(div(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(divactive(mark(x'), y'''), y'', z''), y, z)
MARK(if(if(if(x', y''', z'''), y'', z''), y, z)) -> IFACTIVE(ifactive(ifactive(mark(x'), y''', z'''), y'', z''), y, z)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 15
Polynomial Ordering


Dependency Pairs:

MARK(if(if(if(x', y''', z'''), y'', z''), y, z)) -> IFACTIVE(ifactive(ifactive(mark(x'), y''', z'''), y'', z''), y, z)
MARK(if(if(div(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(divactive(mark(x'), y'''), y'', z''), y, z)
MARK(if(if(ge(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(geactive(x', y'''), y'', z''), y, z)
MARK(if(if(minus(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(minusactive(x', y'''), y'', z''), y, z)
MARK(if(if(s(x'), y'', z''), y, z)) -> IFACTIVE(ifactive(s(mark(x')), y'', z''), y, z)
MARK(if(if(0, y'', z''), y, z)) -> IFACTIVE(ifactive(0, y'', z''), y, z)
MARK(if(div(div(x', y'''), y''), y, z)) -> IFACTIVE(divactive(divactive(mark(x'), y'''), y''), y, z)
MARK(if(div(ge(x', y'''), y''), y, z)) -> IFACTIVE(divactive(geactive(x', y'''), y''), y, z)
MARK(if(div(minus(x', y'''), y''), y, z)) -> IFACTIVE(divactive(minusactive(x', y'''), y''), y, z)
MARK(if(div(s(x'), y''), y, z)) -> IFACTIVE(divactive(s(mark(x')), y''), y, z)
MARK(if(div(0, y''), y, z)) -> IFACTIVE(divactive(0, y''), y, z)
MARK(if(ge(s(x'), s(y''')), y, z)) -> IFACTIVE(geactive(x', y'''), y, z)
MARK(if(ge(0, s(y''')), y, z)) -> IFACTIVE(false, y, z)
MARK(if(ge(x''', 0), y, z)) -> IFACTIVE(true, y, z)
MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
MARK(if(div(if(x', y''', z''), y''), y, z)) -> IFACTIVE(divactive(ifactive(mark(x'), y''', z''), y''), y, z)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pairs can be strictly oriented:

MARK(if(if(ge(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(geactive(x', y'''), y'', z''), y, z)
MARK(if(div(ge(x', y'''), y''), y, z)) -> IFACTIVE(divactive(geactive(x', y'''), y''), y, z)
MARK(if(ge(s(x'), s(y''')), y, z)) -> IFACTIVE(geactive(x', y'''), y, z)
MARK(if(ge(0, s(y''')), y, z)) -> IFACTIVE(false, y, z)
MARK(if(ge(x''', 0), y, z)) -> IFACTIVE(true, y, z)
MARK(div(if(ge(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(geactive(x', y'''), y'', z'), y)
MARK(div(div(ge(x', y'''), y''), y)) -> DIVACTIVE(divactive(geactive(x', y'''), y''), y)
MARK(div(ge(s(x'), s(y''')), y)) -> DIVACTIVE(geactive(x', y'''), 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_active(x1, x2))=  0  
  POL(MARK(x1))=  x1  
  POL(div_active(x1, x2))=  0  
  POL(false)=  0  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(mark(x1))=  0  
  POL(minus_active(x1, x2))=  0  
  POL(if(x1, x2, x3))=  x1 + x2 + x3  
  POL(0)=  0  
  POL(s(x1))=  x1  
  POL(ge(x1, x2))=  1  
  POL(DIV_ACTIVE(x1, x2))=  0  
  POL(div(x1, x2))=  x1  
  POL(if_active(x1, x2, x3))=  0  
  POL(IF_ACTIVE(x1, x2, x3))=  x2 + x3  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 16
Polynomial Ordering


Dependency Pairs:

MARK(if(if(if(x', y''', z'''), y'', z''), y, z)) -> IFACTIVE(ifactive(ifactive(mark(x'), y''', z'''), y'', z''), y, z)
MARK(if(if(div(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(divactive(mark(x'), y'''), y'', z''), y, z)
MARK(if(if(minus(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(minusactive(x', y'''), y'', z''), y, z)
MARK(if(if(s(x'), y'', z''), y, z)) -> IFACTIVE(ifactive(s(mark(x')), y'', z''), y, z)
MARK(if(if(0, y'', z''), y, z)) -> IFACTIVE(ifactive(0, y'', z''), y, z)
MARK(if(div(div(x', y'''), y''), y, z)) -> IFACTIVE(divactive(divactive(mark(x'), y'''), y''), y, z)
MARK(if(div(minus(x', y'''), y''), y, z)) -> IFACTIVE(divactive(minusactive(x', y'''), y''), y, z)
MARK(if(div(s(x'), y''), y, z)) -> IFACTIVE(divactive(s(mark(x')), y''), y, z)
MARK(if(div(0, y''), y, z)) -> IFACTIVE(divactive(0, y''), y, z)
MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)
MARK(if(div(if(x', y''', z''), y''), y, z)) -> IFACTIVE(divactive(ifactive(mark(x'), y''', z''), y''), y, z)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pairs can be strictly oriented:

MARK(if(if(if(x', y''', z'''), y'', z''), y, z)) -> IFACTIVE(ifactive(ifactive(mark(x'), y''', z'''), y'', z''), y, z)
MARK(if(if(div(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(divactive(mark(x'), y'''), y'', z''), y, z)
MARK(if(if(minus(x', y'''), y'', z''), y, z)) -> IFACTIVE(ifactive(minusactive(x', y'''), y'', z''), y, z)
MARK(if(if(s(x'), y'', z''), y, z)) -> IFACTIVE(ifactive(s(mark(x')), y'', z''), y, z)
MARK(if(if(0, y'', z''), y, z)) -> IFACTIVE(ifactive(0, y'', z''), y, z)
MARK(if(div(div(x', y'''), y''), y, z)) -> IFACTIVE(divactive(divactive(mark(x'), y'''), y''), y, z)
MARK(if(div(minus(x', y'''), y''), y, z)) -> IFACTIVE(divactive(minusactive(x', y'''), y''), y, z)
MARK(if(div(s(x'), y''), y, z)) -> IFACTIVE(divactive(s(mark(x')), y''), y, z)
MARK(if(div(0, y''), y, z)) -> IFACTIVE(divactive(0, y''), y, z)
MARK(if(minus(s(x'), s(y''')), y, z)) -> IFACTIVE(minusactive(x', y'''), y, z)
MARK(div(if(if(x', y''', z''), y'', z'), y)) -> DIVACTIVE(ifactive(ifactive(mark(x'), y''', z''), y'', z'), y)
MARK(div(if(div(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(divactive(mark(x'), y'''), y'', z'), y)
MARK(div(if(minus(x', y'''), y'', z'), y)) -> DIVACTIVE(ifactive(minusactive(x', y'''), y'', z'), y)
MARK(div(if(s(x'), y'', z'), y)) -> DIVACTIVE(ifactive(s(mark(x')), y'', z'), y)
MARK(div(if(0, y'', z'), y)) -> DIVACTIVE(ifactive(0, y'', z'), y)
MARK(div(div(if(x', y''', z'), y''), y)) -> DIVACTIVE(divactive(ifactive(mark(x'), y''', z'), y''), y)
MARK(if(x, y, z)) -> MARK(x)
MARK(if(div(if(x', y''', z''), y''), y, z)) -> IFACTIVE(divactive(ifactive(mark(x'), y''', z''), y''), y, z)


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_active(x1, x2))=  0  
  POL(MARK(x1))=  x1  
  POL(div_active(x1, x2))=  0  
  POL(false)=  0  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(mark(x1))=  0  
  POL(minus_active(x1, x2))=  0  
  POL(if(x1, x2, x3))=  1 + x1 + x2 + x3  
  POL(0)=  0  
  POL(s(x1))=  x1  
  POL(ge(x1, x2))=  0  
  POL(DIV_ACTIVE(x1, x2))=  0  
  POL(div(x1, x2))=  x1  
  POL(if_active(x1, x2, x3))=  0  
  POL(IF_ACTIVE(x1, x2, x3))=  x2 + x3  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 17
Instantiation Transformation


Dependency Pairs:

MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, x, y) -> MARK(x)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFACTIVE(true, x, y) -> MARK(x)
one new Dependency Pair is created:

IFACTIVE(true, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(s(div(minus(x0', y'''), s(y''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 18
Instantiation Transformation


Dependency Pairs:

IFACTIVE(true, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(s(div(minus(x0', y'''), s(y''''))))
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(false, x, y) -> MARK(y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

IFACTIVE(false, x, y) -> MARK(y)
one new Dependency Pair is created:

IFACTIVE(false, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(0)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 19
Polynomial Ordering


Dependency Pairs:

MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(s(div(minus(x0', y'''), s(y''''))))


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pair can be strictly oriented:

MARK(div(div(0, y''), y)) -> DIVACTIVE(divactive(0, y''), 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_active(x1, x2))=  0  
  POL(MARK(x1))=  x1  
  POL(div_active(x1, x2))=  0  
  POL(false)=  0  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(mark(x1))=  0  
  POL(minus_active(x1, x2))=  0  
  POL(if(x1, x2, x3))=  0  
  POL(0)=  1  
  POL(s(x1))=  x1  
  POL(ge(x1, x2))=  0  
  POL(DIV_ACTIVE(x1, x2))=  0  
  POL(div(x1, x2))=  x1  
  POL(if_active(x1, x2, x3))=  0  
  POL(IF_ACTIVE(x1, x2, x3))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 20
Polynomial Ordering


Dependency Pairs:

MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(div(x, y)) -> MARK(x)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(s(div(minus(x0', y'''), s(y''''))))


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pairs can be strictly oriented:

MARK(div(div(div(x', y'''), y''), y)) -> DIVACTIVE(divactive(divactive(mark(x'), y'''), y''), y)
MARK(div(div(minus(x', y'''), y''), y)) -> DIVACTIVE(divactive(minusactive(x', y'''), y''), y)
MARK(div(div(s(x'), y''), y)) -> DIVACTIVE(divactive(s(mark(x')), y''), y)
MARK(div(x, y)) -> MARK(x)


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_active(x1, x2))=  0  
  POL(MARK(x1))=  x1  
  POL(div_active(x1, x2))=  0  
  POL(false)=  0  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(mark(x1))=  0  
  POL(minus_active(x1, x2))=  0  
  POL(if(x1, x2, x3))=  0  
  POL(0)=  1  
  POL(s(x1))=  x1  
  POL(ge(x1, x2))=  0  
  POL(DIV_ACTIVE(x1, x2))=  1  
  POL(div(x1, x2))=  1 + x1  
  POL(if_active(x1, x2, x3))=  0  
  POL(IF_ACTIVE(x1, x2, x3))=  x3  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 21
Polynomial Ordering


Dependency Pairs:

MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
MARK(s(x)) -> MARK(x)
IFACTIVE(true, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(s(div(minus(x0', y'''), s(y''''))))


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





The following dependency pair can be strictly oriented:

MARK(s(x)) -> MARK(x)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(ge_active(x1, x2))=  0  
  POL(MARK(x1))=  x1  
  POL(false)=  0  
  POL(div_active(x1, x2))=  x1  
  POL(minus(x1, x2))=  0  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(minus_active(x1, x2))=  0  
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(s(x1))=  1 + x1  
  POL(ge(x1, x2))=  0  
  POL(DIV_ACTIVE(x1, x2))=  x1  
  POL(div(x1, x2))=  x1  
  POL(if_active(x1, x2, x3))=  x2 + x3  
  POL(IF_ACTIVE(x1, x2, x3))=  x2  

resulting in one new DP problem.



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


Dependency Pairs:

MARK(div(minus(s(x'), s(y''')), y)) -> DIVACTIVE(minusactive(x', y'''), y)
DIVACTIVE(s(x), s(y)) -> IFACTIVE(geactive(x, y), s(div(minus(x, y), s(y))), 0)
MARK(div(s(x''), y)) -> DIVACTIVE(s(mark(x'')), y)
IFACTIVE(true, s(div(minus(x0', y'''), s(y''''))), 0) -> MARK(s(div(minus(x0', y'''), s(y''''))))


Rules:


minusactive(0, y) -> 0
minusactive(s(x), s(y)) -> minusactive(x, y)
minusactive(x, y) -> minus(x, y)
mark(0) -> 0
mark(s(x)) -> s(mark(x))
mark(minus(x, y)) -> minusactive(x, y)
mark(ge(x, y)) -> geactive(x, y)
mark(div(x, y)) -> divactive(mark(x), y)
mark(if(x, y, z)) -> ifactive(mark(x), y, z)
geactive(x, 0) -> true
geactive(0, s(y)) -> false
geactive(s(x), s(y)) -> geactive(x, y)
geactive(x, y) -> ge(x, y)
divactive(0, s(y)) -> 0
divactive(s(x), s(y)) -> ifactive(geactive(x, y), s(div(minus(x, y), s(y))), 0)
divactive(x, y) -> div(x, y)
ifactive(true, x, y) -> mark(x)
ifactive(false, x, y) -> mark(y)
ifactive(x, y, z) -> if(x, y, z)





Using the Dependency Graph resulted in no new DP problems.

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