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

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
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS


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





The following dependency pair can be strictly oriented:

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


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
AMINUS(x1, x2) -> AMINUS(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 4
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS


Dependency Pair:


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





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS


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





The following dependency pair can be strictly oriented:

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


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
AGEQ(x1, x2) -> AGEQ(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 5
Dependency Graph
       →DP Problem 3
AFS


Dependency Pair:


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





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering


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





The following dependency pairs can be strictly oriented:

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)


The following usable rules w.r.t. to the AFS can be oriented:

ageq(X, 0) -> true
ageq(0, s(Y)) -> false
ageq(s(X), s(Y)) -> ageq(X, Y)
ageq(X1, X2) -> geq(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
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)
aminus(0, Y) -> 0
aminus(s(X), s(Y)) -> aminus(X, Y)
aminus(X1, X2) -> minus(X1, X2)


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
mark > false
{0, adiv, div, ADIV} > {aif, if} > AIF > MARK > false
{0, adiv, div, ADIV} > {geq, true, ageq} > false
{0, adiv, div, ADIV} > s > false
minus > false
aminus > false

resulting in one new DP problem.
Used Argument Filtering System:
ADIV(x1, x2) -> ADIV(x1, x2)
AIF(x1, x2, x3) -> AIF(x1, x2, x3)
s(x1) -> s(x1)
ageq(x1, x2) -> ageq(x1, x2)
div(x1, x2) -> div(x1, x2)
minus(x1, x2) -> x1
MARK(x1) -> MARK(x1)
if(x1, x2, x3) -> if(x1, x2, x3)
mark(x1) -> x1
geq(x1, x2) -> geq(x1, x2)
aif(x1, x2, x3) -> aif(x1, x2, x3)
aminus(x1, x2) -> x1
adiv(x1, x2) -> adiv(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
Dependency Graph


Dependency Pair:


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





Using the Dependency Graph resulted in no new DP problems.

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