(0) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


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: FULL

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

Converted rc-obligation to irc-obligation.

The duplicating contexts are:
div(s([]), s(y))
div(s(x), s([]))

The defined contexts are:
if([], 0, s(x1))
if(x0, 0, s([]))
div([], s(x1))
lt([], x1)
-([], x1)

[] just represents basic- or constructor-terms in the following defined contexts:
if([], 0, s(x1))
div([], s(x1))

As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc.

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


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

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

Converted Cpx (relative) TRS to CDT

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

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

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

Removed 8 trailing nodes:

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

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

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

Removed 1 trailing tuple parts

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

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

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

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

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

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)) = 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)) = [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:

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

(13) CdtRuleRemovalProof (UPPER BOUND(ADD(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))
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)) = x1·x2   
POL(LT(x1, x2)) = 0   
POL(c10(x1, x2, x3)) = x1 + x2 + x3   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(s(x1)) = [1] + x1   

(14) 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:

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))
-'(s(z0), s(z1)) → c2(-'(z0, z1))
Defined Rule Symbols:

-

Defined Pair Symbols:

-', LT, DIV

Compound Symbols:

c2, c5, c10

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

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

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)) = 0   
POL(0) = [1]   
POL(DIV(x1, x2)) = [2]x1 + [2]x1·x2   
POL(LT(x1, x2)) = x2   
POL(c10(x1, x2, x3)) = x1 + x2 + x3   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(s(x1)) = [1] + x1   

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

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

The set S is empty

(18) BOUNDS(1, 1)