(0) Obligation:

Runtime Complexity TRS:
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

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
geq(z0, n__0) → true
geq(n__0, n__s(z0)) → false
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
div(0, n__s(z0)) → 0
div(s(z0), n__s(z1)) → if(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
0n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(z0)
activate(z0) → z0
Tuples:

MINUS(n__0, z0) → c(0')
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(z0, n__0) → c2
GEQ(n__0, n__s(z0)) → c3
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
DIV(0, n__s(z0)) → c5(0')
DIV(s(z0), n__s(z1)) → c6(IF(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0), GEQ(z0, activate(z1)), ACTIVATE(z1), DIV(minus(z0, activate(z1)), n__s(activate(z1))), MINUS(z0, activate(z1)), ACTIVATE(z1), ACTIVATE(z1))
IF(true, z0, z1) → c7(ACTIVATE(z0))
IF(false, z0, z1) → c8(ACTIVATE(z1))
0'c9
S(z0) → c10
ACTIVATE(n__0) → c11(0')
ACTIVATE(n__s(z0)) → c12(S(z0))
ACTIVATE(z0) → c13
S tuples:

MINUS(n__0, z0) → c(0')
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(z0, n__0) → c2
GEQ(n__0, n__s(z0)) → c3
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
DIV(0, n__s(z0)) → c5(0')
DIV(s(z0), n__s(z1)) → c6(IF(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0), GEQ(z0, activate(z1)), ACTIVATE(z1), DIV(minus(z0, activate(z1)), n__s(activate(z1))), MINUS(z0, activate(z1)), ACTIVATE(z1), ACTIVATE(z1))
IF(true, z0, z1) → c7(ACTIVATE(z0))
IF(false, z0, z1) → c8(ACTIVATE(z1))
0'c9
S(z0) → c10
ACTIVATE(n__0) → c11(0')
ACTIVATE(n__s(z0)) → c12(S(z0))
ACTIVATE(z0) → c13
K tuples:none
Defined Rule Symbols:

minus, geq, div, if, 0, s, activate

Defined Pair Symbols:

MINUS, GEQ, DIV, IF, 0', S, ACTIVATE

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 12 trailing nodes:

ACTIVATE(z0) → c13
S(z0) → c10
0'c9
GEQ(z0, n__0) → c2
GEQ(n__0, n__s(z0)) → c3
ACTIVATE(n__s(z0)) → c12(S(z0))
IF(false, z0, z1) → c8(ACTIVATE(z1))
ACTIVATE(n__0) → c11(0')
IF(true, z0, z1) → c7(ACTIVATE(z0))
DIV(s(z0), n__s(z1)) → c6(IF(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0), GEQ(z0, activate(z1)), ACTIVATE(z1), DIV(minus(z0, activate(z1)), n__s(activate(z1))), MINUS(z0, activate(z1)), ACTIVATE(z1), ACTIVATE(z1))
MINUS(n__0, z0) → c(0')
DIV(0, n__s(z0)) → c5(0')

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
geq(z0, n__0) → true
geq(n__0, n__s(z0)) → false
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
div(0, n__s(z0)) → 0
div(s(z0), n__s(z1)) → if(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
0n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(z0)
activate(z0) → z0
Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
S tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)), ACTIVATE(z0), ACTIVATE(z1))
K tuples:none
Defined Rule Symbols:

minus, geq, div, if, 0, s, activate

Defined Pair Symbols:

MINUS, GEQ

Compound Symbols:

c1, c4

(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
geq(z0, n__0) → true
geq(n__0, n__s(z0)) → false
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
div(0, n__s(z0)) → 0
div(s(z0), n__s(z1)) → if(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)
0n__0
s(z0) → n__s(z0)
activate(n__0) → 0
activate(n__s(z0)) → s(z0)
activate(z0) → z0
Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
S tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
K tuples:none
Defined Rule Symbols:

minus, geq, div, if, 0, s, activate

Defined Pair Symbols:

MINUS, GEQ

Compound Symbols:

c1, c4

(7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

minus(n__0, z0) → 0
minus(n__s(z0), n__s(z1)) → minus(activate(z0), activate(z1))
geq(z0, n__0) → true
geq(n__0, n__s(z0)) → false
geq(n__s(z0), n__s(z1)) → geq(activate(z0), activate(z1))
div(0, n__s(z0)) → 0
div(s(z0), n__s(z1)) → if(geq(z0, activate(z1)), n__s(div(minus(z0, activate(z1)), n__s(activate(z1)))), n__0)
if(true, z0, z1) → activate(z0)
if(false, z0, z1) → activate(z1)

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

activate(n__0) → 0
activate(n__s(z0)) → s(z0)
activate(z0) → z0
0n__0
s(z0) → n__s(z0)
Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
S tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
K tuples:none
Defined Rule Symbols:

activate, 0, s

Defined Pair Symbols:

MINUS, GEQ

Compound Symbols:

c1, c4

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
We considered the (Usable) Rules:

activate(n__0) → 0
0n__0
activate(z0) → z0
s(z0) → n__s(z0)
activate(n__s(z0)) → s(z0)
And the Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(GEQ(x1, x2)) = [2]x12   
POL(MINUS(x1, x2)) = 0   
POL(activate(x1)) = x1   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(n__0) = 0   
POL(n__s(x1)) = [2] + x1   
POL(s(x1)) = [2] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

activate(n__0) → 0
activate(n__s(z0)) → s(z0)
activate(z0) → z0
0n__0
s(z0) → n__s(z0)
Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
S tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
K tuples:

GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
Defined Rule Symbols:

activate, 0, s

Defined Pair Symbols:

MINUS, GEQ

Compound Symbols:

c1, c4

(11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
We considered the (Usable) Rules:

activate(n__0) → 0
0n__0
activate(z0) → z0
s(z0) → n__s(z0)
activate(n__s(z0)) → s(z0)
And the Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [4]   
POL(GEQ(x1, x2)) = x2   
POL(MINUS(x1, x2)) = [4]x1 + [3]x2   
POL(activate(x1)) = [1] + x1   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(n__0) = [3]   
POL(n__s(x1)) = [5] + x1   
POL(s(x1)) = [5] + x1   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

activate(n__0) → 0
activate(n__s(z0)) → s(z0)
activate(z0) → z0
0n__0
s(z0) → n__s(z0)
Tuples:

MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
S tuples:none
K tuples:

GEQ(n__s(z0), n__s(z1)) → c4(GEQ(activate(z0), activate(z1)))
MINUS(n__s(z0), n__s(z1)) → c1(MINUS(activate(z0), activate(z1)))
Defined Rule Symbols:

activate, 0, s

Defined Pair Symbols:

MINUS, GEQ

Compound Symbols:

c1, c4

(13) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(14) BOUNDS(1, 1)