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


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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
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
Nar


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


Strategy:

innermost




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
Nar


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




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
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
Nar


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


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




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

ADIV(s(X), s(Y)) -> AIF(ageq(X, Y), s(div(minus(X, Y), s(Y))), 0)
four new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

ADIV(s(s(X'')), s(s(Y''))) -> AIF(ageq(X'', Y''), s(div(minus(s(X''), s(Y'')), s(s(Y'')))), 0)
ADIV(s(0), s(s(Y''))) -> AIF(false, s(div(minus(0, s(Y'')), s(s(Y'')))), 0)
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)
AIF(true, X, Y) -> MARK(X)
ADIV(s(X''), s(0)) -> AIF(true, s(div(minus(X'', 0), s(0))), 0)
MARK(div(X1, X2)) -> ADIV(mark(X1), X2)
MARK(s(X)) -> MARK(X)


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




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

MARK(div(X1, X2)) -> ADIV(mark(X1), X2)
eight new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

MARK(div(s(X'), X2)) -> ADIV(s(mark(X')), X2)
MARK(div(if(X1'', X2'', X3'), X2)) -> ADIV(aif(mark(X1''), X2'', X3'), X2)
MARK(div(div(X1'', X2''), X2)) -> ADIV(adiv(mark(X1''), X2''), X2)
MARK(div(geq(X1'', X2''), X2)) -> ADIV(ageq(X1'', X2''), X2)
ADIV(s(0), s(s(Y''))) -> AIF(false, s(div(minus(0, s(Y'')), s(s(Y'')))), 0)
ADIV(s(X''), s(0)) -> AIF(true, s(div(minus(X'', 0), s(0))), 0)
MARK(div(minus(X1'', X2''), X2)) -> ADIV(aminus(X1'', X2''), X2)
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)
AIF(true, X, Y) -> MARK(X)
ADIV(s(s(X'')), s(s(Y''))) -> AIF(ageq(X'', Y''), s(div(minus(s(X''), s(Y'')), s(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




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

MARK(if(X1, X2, X3)) -> AIF(mark(X1), X2, X3)
eight new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Nar
           →DP Problem 6
Nar
             ...
               →DP Problem 8
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

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


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



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