(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
lastbit(0) → 0
lastbit(s(0)) → s(0)
lastbit(s(s(x))) → lastbit(x)
conv(0) → cons(nil, 0)
conv(s(x)) → cons(conv(half(s(x))), lastbit(s(x)))
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
lastbit(0) → 0
lastbit(s(0)) → s(0)
lastbit(s(s(z0))) → lastbit(z0)
conv(0) → cons(nil, 0)
conv(s(z0)) → cons(conv(half(s(z0))), lastbit(s(z0)))
Tuples:
HALF(0) → c
HALF(s(0)) → c1
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(0) → c3
LASTBIT(s(0)) → c4
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(0) → c6
CONV(s(z0)) → c7(CONV(half(s(z0))), HALF(s(z0)), LASTBIT(s(z0)))
S tuples:
HALF(0) → c
HALF(s(0)) → c1
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(0) → c3
LASTBIT(s(0)) → c4
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(0) → c6
CONV(s(z0)) → c7(CONV(half(s(z0))), HALF(s(z0)), LASTBIT(s(z0)))
K tuples:none
Defined Rule Symbols:
half, lastbit, conv
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7
(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 5 trailing nodes:
CONV(0) → c6
LASTBIT(s(0)) → c4
LASTBIT(0) → c3
HALF(0) → c
HALF(s(0)) → c1
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(0) → 0
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
lastbit(0) → 0
lastbit(s(0)) → s(0)
lastbit(s(s(z0))) → lastbit(z0)
conv(0) → cons(nil, 0)
conv(s(z0)) → cons(conv(half(s(z0))), lastbit(s(z0)))
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(z0)) → c7(CONV(half(s(z0))), HALF(s(z0)), LASTBIT(s(z0)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(z0)) → c7(CONV(half(s(z0))), HALF(s(z0)), LASTBIT(s(z0)))
K tuples:none
Defined Rule Symbols:
half, lastbit, conv
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(5) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
lastbit(0) → 0
lastbit(s(0)) → s(0)
lastbit(s(s(z0))) → lastbit(z0)
conv(0) → cons(nil, 0)
conv(s(z0)) → cons(conv(half(s(z0))), lastbit(s(z0)))
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(z0)) → c7(CONV(half(s(z0))), HALF(s(z0)), LASTBIT(s(z0)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(z0)) → c7(CONV(half(s(z0))), HALF(s(z0)), LASTBIT(s(z0)))
K tuples:none
Defined Rule Symbols:
half
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(7) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
CONV(
s(
z0)) →
c7(
CONV(
half(
s(
z0))),
HALF(
s(
z0)),
LASTBIT(
s(
z0))) by
CONV(s(0)) → c7(CONV(0), HALF(s(0)), LASTBIT(s(0)))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(0)) → c7(CONV(0), HALF(s(0)), LASTBIT(s(0)))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(0)) → c7(CONV(0), HALF(s(0)), LASTBIT(s(0)))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
K tuples:none
Defined Rule Symbols:
half
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(9) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing nodes:
CONV(s(0)) → c7(CONV(0), HALF(s(0)), LASTBIT(s(0)))
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
K tuples:none
Defined Rule Symbols:
half
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(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.
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
We considered the (Usable) Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
And the Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [3]
POL(CONV(x1)) = x1
POL(HALF(x1)) = [1]
POL(LASTBIT(x1)) = 0
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c7(x1, x2, x3)) = x1 + x2 + x3
POL(half(x1)) = x1
POL(s(x1)) = [4] + x1
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
K tuples:
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(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.
HALF(s(s(z0))) → c2(HALF(z0))
We considered the (Usable) Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
And the Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONV(x1)) = x1 + x12
POL(HALF(x1)) = x1
POL(LASTBIT(x1)) = [1]
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c7(x1, x2, x3)) = x1 + x2 + x3
POL(half(x1)) = x1
POL(s(x1)) = [1] + x1
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
K tuples:
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
HALF(s(s(z0))) → c2(HALF(z0))
Defined Rule Symbols:
half
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^3)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
We considered the (Usable) Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
And the Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONV(x1)) = x13
POL(HALF(x1)) = 0
POL(LASTBIT(x1)) = x12
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c7(x1, x2, x3)) = x1 + x2 + x3
POL(half(x1)) = x1
POL(s(x1)) = [1] + x1
(16) Obligation:
Complexity Dependency Tuples Problem
Rules:
half(s(0)) → 0
half(s(s(z0))) → s(half(z0))
half(0) → 0
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:none
K tuples:
CONV(s(s(z0))) → c7(CONV(s(half(z0))), HALF(s(s(z0))), LASTBIT(s(s(z0))))
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
Defined Rule Symbols:
half
Defined Pair Symbols:
HALF, LASTBIT, CONV
Compound Symbols:
c2, c5, c7
(17) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(18) BOUNDS(1, 1)