(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

minus(n__0, Y) → 0
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(X, n__0) → true
geq(n__0, n__s(Y)) → false
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
0n__0
s(X) → n__s(X)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MINUS(n__0, Y) → 01
MINUS(n__s(X), n__s(Y)) → MINUS(activate(X), activate(Y))
MINUS(n__s(X), n__s(Y)) → ACTIVATE(X)
MINUS(n__s(X), n__s(Y)) → ACTIVATE(Y)
GEQ(n__s(X), n__s(Y)) → GEQ(activate(X), activate(Y))
GEQ(n__s(X), n__s(Y)) → ACTIVATE(X)
GEQ(n__s(X), n__s(Y)) → ACTIVATE(Y)
DIV(s(X), n__s(Y)) → IF(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
DIV(s(X), n__s(Y)) → GEQ(X, activate(Y))
DIV(s(X), n__s(Y)) → ACTIVATE(Y)
DIV(s(X), n__s(Y)) → DIV(minus(X, activate(Y)), n__s(activate(Y)))
DIV(s(X), n__s(Y)) → MINUS(X, activate(Y))
IF(true, X, Y) → ACTIVATE(X)
IF(false, X, Y) → ACTIVATE(Y)
ACTIVATE(n__0) → 01
ACTIVATE(n__s(X)) → S(X)

The TRS R consists of the following rules:

minus(n__0, Y) → 0
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(X, n__0) → true
geq(n__0, n__s(Y)) → false
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
0n__0
s(X) → n__s(X)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 3 SCCs with 13 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GEQ(n__s(X), n__s(Y)) → GEQ(activate(X), activate(Y))

The TRS R consists of the following rules:

minus(n__0, Y) → 0
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(X, n__0) → true
geq(n__0, n__s(Y)) → false
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
0n__0
s(X) → n__s(X)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Combined order from the following AFS and order.
activate(x1)  =  x1
n__0  =  n__0
0  =  0
n__s(x1)  =  n__s(x1)
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:

[n0, 0]
[ns1, s1]

Status:
n0: []
0: []
ns1: [1]
s1: [1]

AFS:
activate(x1)  =  x1
n__0  =  n__0
0  =  0
n__s(x1)  =  n__s(x1)
s(x1)  =  s(x1)

From the DPs we obtained the following set of size-change graphs:

  • GEQ(n__s(X), n__s(Y)) → GEQ(activate(X), activate(Y)) (allowed arguments on rhs = {2})
    The graph contains the following edges 2 > 2

We oriented the following set of usable rules [AAECC05,FROCOS05].


activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X
0n__0
s(X) → n__s(X)

(7) TRUE

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MINUS(n__s(X), n__s(Y)) → MINUS(activate(X), activate(Y))

The TRS R consists of the following rules:

minus(n__0, Y) → 0
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(X, n__0) → true
geq(n__0, n__s(Y)) → false
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
0n__0
s(X) → n__s(X)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(9) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Combined order from the following AFS and order.
activate(x1)  =  x1
n__0  =  n__0
0  =  0
n__s(x1)  =  n__s(x1)
s(x1)  =  s(x1)

Lexicographic path order with status [LPO].
Quasi-Precedence:

[n0, 0]
[ns1, s1]

Status:
n0: []
0: []
ns1: [1]
s1: [1]

AFS:
activate(x1)  =  x1
n__0  =  n__0
0  =  0
n__s(x1)  =  n__s(x1)
s(x1)  =  s(x1)

From the DPs we obtained the following set of size-change graphs:

  • MINUS(n__s(X), n__s(Y)) → MINUS(activate(X), activate(Y)) (allowed arguments on rhs = {2})
    The graph contains the following edges 2 > 2

We oriented the following set of usable rules [AAECC05,FROCOS05].


activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X
0n__0
s(X) → n__s(X)

(10) TRUE

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

DIV(s(X), n__s(Y)) → DIV(minus(X, activate(Y)), n__s(activate(Y)))

The TRS R consists of the following rules:

minus(n__0, Y) → 0
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
geq(X, n__0) → true
geq(n__0, n__s(Y)) → false
geq(n__s(X), n__s(Y)) → geq(activate(X), activate(Y))
div(0, n__s(Y)) → 0
div(s(X), n__s(Y)) → if(geq(X, activate(Y)), n__s(div(minus(X, activate(Y)), n__s(activate(Y)))), n__0)
if(true, X, Y) → activate(X)
if(false, X, Y) → activate(Y)
0n__0
s(X) → n__s(X)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Combined order from the following AFS and order.
s(x1)  =  s(x1)
n__s(x1)  =  n__s(x1)
minus(x1, x2)  =  x1
activate(x1)  =  x1
n__0  =  n__0
0  =  0

Lexicographic path order with status [LPO].
Quasi-Precedence:

[s1, ns1]
[n0, 0]

Status:
s1: [1]
ns1: [1]
n0: []
0: []

AFS:
s(x1)  =  s(x1)
n__s(x1)  =  n__s(x1)
minus(x1, x2)  =  x1
activate(x1)  =  x1
n__0  =  n__0
0  =  0

From the DPs we obtained the following set of size-change graphs:

  • DIV(s(X), n__s(Y)) → DIV(minus(X, activate(Y)), n__s(activate(Y))) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

We oriented the following set of usable rules [AAECC05,FROCOS05].


s(X) → n__s(X)
minus(n__s(X), n__s(Y)) → minus(activate(X), activate(Y))
minus(n__0, Y) → 0
activate(X) → X
activate(n__s(X)) → s(X)
activate(n__0) → 0
0n__0

(13) TRUE