### (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 Cpx (relative) TRS 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:

-'(z0, 0) → c
-'(0, s(z0)) → c1
-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(z0, 0) → c3
LT(0, s(z0)) → c4
LT(s(z0), s(z1)) → c5(LT(z0, z1))
IF(true, z0, z1) → c6
IF(false, z0, z1) → c7
DIV(z0, 0) → c8
DIV(0, z0) → c9
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:

-'(z0, 0) → c
-'(0, s(z0)) → c1
-'(s(z0), s(z1)) → c2(-'(z0, z1))
LT(z0, 0) → c3
LT(0, s(z0)) → c4
LT(s(z0), s(z1)) → c5(LT(z0, z1))
IF(true, z0, z1) → c6
IF(false, z0, z1) → c7
DIV(z0, 0) → c8
DIV(0, z0) → c9
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, IF, DIV

Compound Symbols:

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

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

Removed 8 trailing nodes:

-'(z0, 0) → c
-'(0, s(z0)) → c1
LT(z0, 0) → c3
LT(0, s(z0)) → c4
DIV(0, z0) → c9
IF(true, z0, z1) → c6
IF(false, z0, z1) → c7
DIV(z0, 0) → c8

### (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(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

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

Removed 1 trailing tuple parts

### (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))
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

### (7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

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))))

### (8) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, 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:

-

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

### (9) CdtRuleRemovalProof (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:

-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
-(z0, 0) → z0
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

### (10) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, 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:

-

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

### (11) CdtRuleRemovalProof (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:

-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, z1)
-(z0, 0) → z0
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

### (12) Obligation:

Complexity Dependency Tuples Problem
Rules:

-(z0, 0) → z0
-(0, s(z0)) → 0
-(s(z0), s(z1)) → -(z0, 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:

-

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

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

The set S is empty