Term Rewriting System R:
[Y, X, X1, X2, X3]
aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)
ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
adiv(0, s(Y)) -> 0
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
adiv(X1, X2) -> div(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(minus(X1, X2)) -> aminus(X1, X2)
mark(geq(X1, X2)) -> ageq(X1, X2)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AMINUS(s(X), s(Y)) -> AMINUS(X, Y)
AGEQ(s(X), s(Y)) -> AGEQ(X, Y)
ADIV(s(X), s(Y)) -> AIF(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
ADIV(s(X), s(Y)) -> AGEQ(X, Y)
AIF(true, X, Y) -> MARK(X)
AIF(false, X, Y) -> MARK(Y)
MARK(minus(X1, X2)) -> AMINUS(X1, X2)
MARK(geq(X1, X2)) -> AGEQ(X1, X2)
MARK(div(X1, X2)) -> ADIV(mark(X1), X2)
MARK(div(X1, X2)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(if(X1, X2, X3)) -> MARK(X1)
MARK(s(X)) -> MARK(X)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)
       →DP Problem 2
UsableRules
       →DP Problem 3
Neg POLO


Dependency Pair:

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


Rules:


aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)
ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
adiv(0, s(Y)) -> 0
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
adiv(X1, X2) -> div(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(minus(X1, X2)) -> aminus(X1, X2)
mark(geq(X1, X2)) -> ageq(X1, X2)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 4
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
Neg POLO


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. AMINUS(s(X), s(Y)) -> AMINUS(X, Y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
Neg POLO


Dependency Pair:

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


Rules:


aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)
ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
adiv(0, s(Y)) -> 0
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
adiv(X1, X2) -> div(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(minus(X1, X2)) -> aminus(X1, X2)
mark(geq(X1, X2)) -> ageq(X1, X2)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false


Strategy:

innermost




As we are in the innermost case, we can delete all 21 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 5
Size-Change Principle
       →DP Problem 3
Neg POLO


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. AGEQ(s(X), s(Y)) -> AGEQ(X, Y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Negative Polynomial Order


Dependency Pairs:

MARK(s(X)) -> MARK(X)
MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(false, X, Y) -> MARK(Y)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(div(X1, X2)) -> MARK(X1)
MARK(div(X1, X2)) -> ADIV(mark(X1), X2)
AIF(true, X, Y) -> MARK(X)
ADIV(s(X), s(Y)) -> AIF(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)


Rules:


aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)
ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
adiv(0, s(Y)) -> 0
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
adiv(X1, X2) -> div(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(minus(X1, X2)) -> aminus(X1, X2)
mark(geq(X1, X2)) -> ageq(X1, X2)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false


Strategy:

innermost




The following Dependency Pair can be strictly oriented using the given order.

MARK(s(X)) -> MARK(X)


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

aif(false, X, Y) -> mark(Y)
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(s(X)) -> s(mark(X))
mark(minus(X1, X2)) -> aminus(X1, X2)
adiv(0, s(Y)) -> 0
mark(geq(X1, X2)) -> ageq(X1, X2)
ageq(X, 0) -> true
mark(false) -> false
aminus(X1, X2) -> minus(X1, X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
aminus(0, Y) -> 0
adiv(X1, X2) -> div(X1, X2)
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
mark(true) -> true
aif(true, X, Y) -> mark(X)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(0) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
ageq(0, s(Y)) -> false


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

POL( s(x1) ) = x1 + 1

POL( ADIV(x1, x2) ) = x1

POL( AIF(x1, ..., x3) ) = x2 + x3

POL( div(x1, x2) ) = x1

POL( minus(x1, x2) ) = 0

POL( 0 ) = 0

POL( if(x1, ..., x3) ) = x1 + x2 + x3

POL( mark(x1) ) = x1

POL( aif(x1, ..., x3) ) = x1 + x2 + x3

POL( adiv(x1, x2) ) = x1

POL( ageq(x1, x2) ) = 0

POL( aminus(x1, x2) ) = 0

POL( true ) = 0

POL( false ) = 0

POL( geq(x1, x2) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Neg POLO
           →DP Problem 6
Negative Polynomial Order


Dependency Pairs:

MARK(if(X1, X2, X3)) -> MARK(X1)
AIF(false, X, Y) -> MARK(Y)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(div(X1, X2)) -> MARK(X1)
MARK(div(X1, X2)) -> ADIV(mark(X1), X2)
AIF(true, X, Y) -> MARK(X)
ADIV(s(X), s(Y)) -> AIF(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)


Rules:


aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)
ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
adiv(0, s(Y)) -> 0
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
adiv(X1, X2) -> div(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(minus(X1, X2)) -> aminus(X1, X2)
mark(geq(X1, X2)) -> ageq(X1, X2)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false


Strategy:

innermost




The following Dependency Pairs can be strictly oriented using the given order.

MARK(if(X1, X2, X3)) -> MARK(X1)
MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
MARK(div(X1, X2)) -> MARK(X1)
MARK(div(X1, X2)) -> ADIV(mark(X1), X2)


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

aif(false, X, Y) -> mark(Y)
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(s(X)) -> s(mark(X))
mark(minus(X1, X2)) -> aminus(X1, X2)
adiv(0, s(Y)) -> 0
mark(geq(X1, X2)) -> ageq(X1, X2)
ageq(X, 0) -> true
mark(false) -> false
aminus(X1, X2) -> minus(X1, X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
aminus(0, Y) -> 0
adiv(X1, X2) -> div(X1, X2)
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
mark(true) -> true
aif(true, X, Y) -> mark(X)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(0) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
ageq(0, s(Y)) -> false


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

POL( if(x1, ..., x3) ) = x1 + x2 + x3 + 1

POL( ADIV(x1, x2) ) = 0

POL( AIF(x1, ..., x3) ) = x2 + x3

POL( s(x1) ) = 0

POL( 0 ) = 0

POL( div(x1, x2) ) = x1 + 1

POL( aif(x1, ..., x3) ) = x1 + x2 + x3 + 1

POL( false ) = 0

POL( mark(x1) ) = x1

POL( adiv(x1, x2) ) = x1 + 1

POL( ageq(x1, x2) ) = 0

POL( minus(x1, x2) ) = 0

POL( aminus(x1, x2) ) = 0

POL( true ) = 0

POL( geq(x1, x2) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Neg POLO
           →DP Problem 6
Neg POLO
             ...
               →DP Problem 7
Dependency Graph


Dependency Pairs:

AIF(false, X, Y) -> MARK(Y)
AIF(true, X, Y) -> MARK(X)
ADIV(s(X), s(Y)) -> AIF(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)


Rules:


aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)
ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(X1, X2)
adiv(0, s(Y)) -> 0
adiv(s(X), s(Y)) -> aif(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
adiv(X1, X2) -> div(X1, X2)
aif(true, X, Y) -> mark(X)
aif(false, X, Y) -> mark(Y)
aif(X1, X2, X3) -> if(X1, X2, X3)
mark(minus(X1, X2)) -> aminus(X1, X2)
mark(geq(X1, X2)) -> ageq(X1, X2)
mark(div(X1, X2)) -> adiv(mark(X1), X2)
mark(if(X1, X2, X3)) -> aif(mark(X1), X2, X3)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
mark(true) -> true
mark(false) -> false


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:03 minutes