(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(0, s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(y, z))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
div(0, z0) → 0
div(z0, z1) → quot(z0, z1, z1)
div(div(z0, z1), z2) → div(z0, times(z1, z2))
quot(0, s(z0), z1) → 0
quot(s(z0), s(z1), z2) → quot(z0, z1, z2)
quot(z0, 0, s(z1)) → s(div(z0, s(z1)))
Tuples:
PLUS(z0, 0) → c
PLUS(0, z0) → c1
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(0, z0) → c3
TIMES(s(0), z0) → c4
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(0, z0) → c6
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
DIV(div(z0, z1), z2) → c8(DIV(z0, times(z1, z2)), TIMES(z1, z2))
QUOT(0, s(z0), z1) → c9
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:
PLUS(z0, 0) → c
PLUS(0, z0) → c1
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(0, z0) → c3
TIMES(s(0), z0) → c4
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(0, z0) → c6
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
DIV(div(z0, z1), z2) → c8(DIV(z0, times(z1, z2)), TIMES(z1, z2))
QUOT(0, s(z0), z1) → c9
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
K tuples:none
Defined Rule Symbols:
plus, times, div, quot
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11
(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
DIV(div(z0, z1), z2) → c8(DIV(z0, times(z1, z2)), TIMES(z1, z2))
Removed 6 trailing nodes:
PLUS(z0, 0) → c
PLUS(0, z0) → c1
TIMES(0, z0) → c3
TIMES(s(0), z0) → c4
QUOT(0, s(z0), z1) → c9
DIV(0, z0) → c6
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
div(0, z0) → 0
div(z0, z1) → quot(z0, z1, z1)
div(div(z0, z1), z2) → div(z0, times(z1, z2))
quot(0, s(z0), z1) → 0
quot(s(z0), s(z1), z2) → quot(z0, z1, z2)
quot(z0, 0, s(z1)) → s(div(z0, s(z1)))
Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
K tuples:none
Defined Rule Symbols:
plus, times, div, quot
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c2, c5, c7, c10, c11
(5) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
div(0, z0) → 0
div(z0, z1) → quot(z0, z1, z1)
div(div(z0, z1), z2) → div(z0, times(z1, z2))
quot(0, s(z0), z1) → 0
quot(s(z0), s(z1), z2) → quot(z0, z1, z2)
quot(z0, 0, s(z1)) → s(div(z0, s(z1)))
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
K tuples:none
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c2, c5, c7, c10, c11
(7) 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.
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [2]
POL(DIV(x1, x2)) = 0
POL(PLUS(x1, x2)) = [1]
POL(QUOT(x1, x2, x3)) = 0
POL(TIMES(x1, x2)) = [4]x1
POL(c10(x1)) = x1
POL(c11(x1)) = x1
POL(c2(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c7(x1)) = x1
POL(plus(x1, x2)) = 0
POL(s(x1)) = [1] + x1
POL(times(x1, x2)) = [3]
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
K tuples:
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c2, c5, c7, c10, c11
(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.
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [5]
POL(DIV(x1, x2)) = x1
POL(PLUS(x1, x2)) = [4]
POL(QUOT(x1, x2, x3)) = x1
POL(TIMES(x1, x2)) = [4]x1
POL(c10(x1)) = x1
POL(c11(x1)) = x1
POL(c2(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c7(x1)) = x1
POL(plus(x1, x2)) = 0
POL(s(x1)) = [4] + x1
POL(times(x1, x2)) = [2] + [2]x1 + [2]x2
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
K tuples:
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c2, c5, c7, c10, c11
(11) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)
The following tuples could be moved from S to K by knowledge propagation:
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
K tuples:
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c2, c5, c7, c10, c11
(13) 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.
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(DIV(x1, x2)) = 0
POL(PLUS(x1, x2)) = [1] + x1
POL(QUOT(x1, x2, x3)) = 0
POL(TIMES(x1, x2)) = x1 + [2]x1·x2
POL(c10(x1)) = x1
POL(c11(x1)) = x1
POL(c2(x1)) = x1
POL(c5(x1, x2)) = x1 + x2
POL(c7(x1)) = x1
POL(plus(x1, x2)) = 0
POL(s(x1)) = [2] + x1
POL(times(x1, x2)) = 0
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(0, z0) → 0
times(s(0), z0) → z0
times(s(z0), z1) → plus(z1, times(z0, z1))
plus(z0, 0) → z0
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
Tuples:
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
S tuples:none
K tuples:
TIMES(s(z0), z1) → c5(PLUS(z1, times(z0, z1)), TIMES(z0, z1))
QUOT(s(z0), s(z1), z2) → c10(QUOT(z0, z1, z2))
QUOT(z0, 0, s(z1)) → c11(DIV(z0, s(z1)))
DIV(z0, z1) → c7(QUOT(z0, z1, z1))
PLUS(s(z0), z1) → c2(PLUS(z0, z1))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
PLUS, TIMES, DIV, QUOT
Compound Symbols:
c2, c5, c7, c10, c11
(15) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(16) BOUNDS(O(1), O(1))