(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(n__div(n__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)
div(X1, X2) → n__div(X1, X2)
minus(X1, X2) → n__minus(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(activate(X))
activate(n__div(X1, X2)) → div(activate(X1), X2)
activate(n__minus(X1, X2)) → minus(X1, X2)
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(n__div(n__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)
IF(true, X, Y) → ACTIVATE(X)
IF(false, X, Y) → ACTIVATE(Y)
ACTIVATE(n__0) → 01
ACTIVATE(n__s(X)) → S(activate(X))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__div(X1, X2)) → DIV(activate(X1), X2)
ACTIVATE(n__div(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__minus(X1, X2)) → MINUS(X1, X2)

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(n__div(n__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)
div(X1, X2) → n__div(X1, X2)
minus(X1, X2) → n__minus(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(activate(X))
activate(n__div(X1, X2)) → div(activate(X1), X2)
activate(n__minus(X1, X2)) → minus(X1, X2)
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 1 SCC with 3 less nodes.

(4) Obligation:

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

MINUS(n__s(X), n__s(Y)) → ACTIVATE(X)
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__div(X1, X2)) → DIV(activate(X1), X2)
DIV(s(X), n__s(Y)) → IF(geq(X, activate(Y)), n__s(n__div(n__minus(X, activate(Y)), n__s(activate(Y)))), n__0)
IF(true, X, Y) → ACTIVATE(X)
ACTIVATE(n__div(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__minus(X1, X2)) → MINUS(X1, X2)
MINUS(n__s(X), n__s(Y)) → MINUS(activate(X), activate(Y))
MINUS(n__s(X), n__s(Y)) → ACTIVATE(Y)
IF(false, X, Y) → ACTIVATE(Y)
DIV(s(X), n__s(Y)) → GEQ(X, 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)) → 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(n__div(n__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)
div(X1, X2) → n__div(X1, X2)
minus(X1, X2) → n__minus(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(activate(X))
activate(n__div(X1, X2)) → div(activate(X1), X2)
activate(n__minus(X1, X2)) → minus(X1, X2)
activate(X) → X

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