(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

-(x, 0) → x
-(0, s(y)) → 0
-(s(x), s(y)) → -(x, y)
lt(x, 0) → false
lt(0, s(y)) → true
lt(s(x), s(y)) → lt(x, y)
if(true, x, y) → x
if(false, x, y) → y
div(x, 0) → 0
div(0, y) → 0
div(s(x), s(y)) → if(lt(x, y), 0, s(div(-(x, y), s(y))))

Rewrite Strategy: INNERMOST

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

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
lt(z0, 0) → false
lt(0, s(z0)) → true
lt(s(z0), s(z1)) → lt(z0, z1)
if(true, z0, z1) → z0
if(false, z0, z1) → z1
div(z0, 0) → 0
div(0, z0) → 0
div(s(z0), s(z1)) → if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1))))
Tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
S tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(IF(lt(z0, z1), 0, s(div(-(z0, z1), s(z1)))), LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
K tuples:none
Defined Rule Symbols:

-, lt, if, div

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

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

Removed 1 trailing tuple parts

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
lt(z0, 0) → false
lt(0, s(z0)) → true
lt(s(z0), s(z1)) → lt(z0, z1)
if(true, z0, z1) → z0
if(false, z0, z1) → z1
div(z0, 0) → 0
div(0, z0) → 0
div(s(z0), s(z1)) → if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1))))
Tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
S tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
K tuples:none
Defined Rule Symbols:

-, lt, if, div

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

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

DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
We considered the (Usable) Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
And the Tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(-(x1, x2)) = x1   
POL(-'(x1, x2)) = 0   
POL(0) = 0   
POL(DIV(x1, x2)) = [2]x1   
POL(LT(x1, x2)) = 0   
POL(c10(x1, x2, x3)) = x1 + x2 + x3   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(s(x1)) = [4] + x1   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
lt(z0, 0) → false
lt(0, s(z0)) → true
lt(s(z0), s(z1)) → lt(z0, z1)
if(true, z0, z1) → z0
if(false, z0, z1) → z1
div(z0, 0) → 0
div(0, z0) → 0
div(s(z0), s(z1)) → if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1))))
Tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
S tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
K tuples:

DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
Defined Rule Symbols:

-, lt, if, div

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

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

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
We considered the (Usable) Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
And the Tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(-(x1, x2)) = x1   
POL(-'(x1, x2)) = x2   
POL(0) = 0   
POL(DIV(x1, x2)) = [2]x1·x2 + [2]x12   
POL(LT(x1, x2)) = [3] + x2   
POL(c10(x1, x2, x3)) = x1 + x2 + x3   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(s(x1)) = [1] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
lt(z0, 0) → false
lt(0, s(z0)) → true
lt(s(z0), s(z1)) → lt(z0, z1)
if(true, z0, z1) → z0
if(false, z0, z1) → z1
div(z0, 0) → 0
div(0, z0) → 0
div(s(z0), s(z1)) → if(lt(z0, z1), 0, s(div(-(z0, z1), s(z1))))
Tuples:

-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
S tuples:none
K tuples:

DIV(s(z0), s(z1)) → c10(LT(z0, z1), DIV(-(z0, z1), s(z1)), -'(z0, z1))
-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(s(z0), s(z1)) → c5(LT(z0, z1))
Defined Rule Symbols:

-, lt, if, div

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(10) BOUNDS(O(1), O(1))