(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)
zero(0) → true
zero(s(x)) → false
conv(x) → conviter(x, cons(0, nil))
conviter(x, l) → if(zero(x), x, l)
if(true, x, l) → l
if(false, x, l) → conviter(half(x), cons(lastbit(x), l))
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)
zero(0) → true
zero(s(z0)) → false
conv(z0) → conviter(z0, cons(0, nil))
conviter(z0, z1) → if(zero(z0), z0, z1)
if(true, z0, z1) → z1
if(false, z0, z1) → conviter(half(z0), cons(lastbit(z0), z1))
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))
ZERO(0) → c6
ZERO(s(z0)) → c7
CONV(z0) → c8(CONVITER(z0, cons(0, nil)))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1), ZERO(z0))
IF(true, z0, z1) → c10
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(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))
ZERO(0) → c6
ZERO(s(z0)) → c7
CONV(z0) → c8(CONVITER(z0, cons(0, nil)))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1), ZERO(z0))
IF(true, z0, z1) → c10
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
K tuples:none
Defined Rule Symbols:
half, lastbit, zero, conv, conviter, if
Defined Pair Symbols:
HALF, LASTBIT, ZERO, CONV, CONVITER, IF
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11
(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
CONV(z0) → c8(CONVITER(z0, cons(0, nil)))
Removed 7 trailing nodes:
ZERO(0) → c6
IF(true, z0, z1) → c10
HALF(0) → c
ZERO(s(z0)) → c7
HALF(s(0)) → c1
LASTBIT(0) → c3
LASTBIT(s(0)) → c4
(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)
zero(0) → true
zero(s(z0)) → false
conv(z0) → conviter(z0, cons(0, nil))
conviter(z0, z1) → if(zero(z0), z0, z1)
if(true, z0, z1) → z1
if(false, z0, z1) → conviter(half(z0), cons(lastbit(z0), z1))
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1), ZERO(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1), ZERO(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
K tuples:none
Defined Rule Symbols:
half, lastbit, zero, conv, conviter, if
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing tuple parts
(6) 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)
zero(0) → true
zero(s(z0)) → false
conv(z0) → conviter(z0, cons(0, nil))
conviter(z0, z1) → if(zero(z0), z0, z1)
if(true, z0, z1) → z1
if(false, z0, z1) → conviter(half(z0), cons(lastbit(z0), z1))
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1))
K tuples:none
Defined Rule Symbols:
half, lastbit, zero, conv, conviter, if
Defined Pair Symbols:
HALF, LASTBIT, IF, CONVITER
Compound Symbols:
c2, c5, c11, c9
(7) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
conv(z0) → conviter(z0, cons(0, nil))
conviter(z0, z1) → if(zero(z0), z0, z1)
if(true, z0, z1) → z1
if(false, z0, z1) → conviter(half(z0), cons(lastbit(z0), z1))
(8) 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)
zero(0) → true
zero(s(z0)) → false
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(z0, z1) → c9(IF(zero(z0), z0, z1))
K tuples:none
Defined Rule Symbols:
half, lastbit, zero
Defined Pair Symbols:
HALF, LASTBIT, IF, CONVITER
Compound Symbols:
c2, c5, c11, c9
(9) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
CONVITER(
z0,
z1) →
c9(
IF(
zero(
z0),
z0,
z1)) by
CONVITER(0, x1) → c9(IF(true, 0, x1))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
(10) 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)
zero(0) → true
zero(s(z0)) → false
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(0, x1) → c9(IF(true, 0, x1))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(0, x1) → c9(IF(true, 0, x1))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
K tuples:none
Defined Rule Symbols:
half, lastbit, zero
Defined Pair Symbols:
HALF, LASTBIT, IF, CONVITER
Compound Symbols:
c2, c5, c11, c9
(11) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing nodes:
CONVITER(0, x1) → c9(IF(true, 0, x1))
(12) 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)
zero(0) → true
zero(s(z0)) → false
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
K tuples:none
Defined Rule Symbols:
half, lastbit, zero
Defined Pair Symbols:
HALF, LASTBIT, IF, CONVITER
Compound Symbols:
c2, c5, c11, c9
(13) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
zero(0) → true
zero(s(z0)) → false
(14) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
IF(false, z0, z1) → c11(CONVITER(half(z0), cons(lastbit(z0), z1)), HALF(z0), LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
K tuples:none
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, IF, CONVITER
Compound Symbols:
c2, c5, c11, c9
(15) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
IF(
false,
z0,
z1) →
c11(
CONVITER(
half(
z0),
cons(
lastbit(
z0),
z1)),
HALF(
z0),
LASTBIT(
z0)) by
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(0, cons(lastbit(0), x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(0, cons(lastbit(s(0)), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
(16) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(0, cons(lastbit(0), x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(0, cons(lastbit(s(0)), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(0, cons(lastbit(0), x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(0, cons(lastbit(s(0)), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
K tuples:none
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(17) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 2 trailing nodes:
IF(false, 0, x1) → c11(CONVITER(0, cons(lastbit(0), x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(0, cons(lastbit(s(0)), x1)), HALF(s(0)), LASTBIT(s(0)))
(18) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)), HALF(0), LASTBIT(0))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)), HALF(s(0)), LASTBIT(s(0)))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
K tuples:none
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(19) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 4 trailing tuple parts
(20) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
K tuples:none
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(21) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)
The following tuples could be moved from S to K by knowledge propagation:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
(22) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
K tuples:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(23) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), 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))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONVITER(x1, x2)) = [4]x1
POL(HALF(x1)) = 0
POL(IF(x1, x2, x3)) = [2]x1 + [4]x2
POL(LASTBIT(x1)) = 0
POL(c11(x1)) = x1
POL(c11(x1, x2, x3)) = x1 + x2 + x3
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c9(x1)) = x1
POL(cons(x1, x2)) = 0
POL(false) = 0
POL(half(x1)) = x1
POL(lastbit(x1)) = 0
POL(s(x1)) = [2] + x1
(24) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(half(s(s(z0))), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
K tuples:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(25) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
IF(
false,
s(
s(
z0)),
x1) →
c11(
CONVITER(
half(
s(
s(
z0))),
cons(
lastbit(
z0),
x1)),
HALF(
s(
s(
z0))),
LASTBIT(
s(
s(
z0)))) by
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
(26) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
K tuples:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(27) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), 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))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = [4]
POL(CONVITER(x1, x2)) = [4]x1
POL(HALF(x1)) = 0
POL(IF(x1, x2, x3)) = [3]x1 + [4]x2
POL(LASTBIT(x1)) = 0
POL(c11(x1)) = x1
POL(c11(x1, x2, x3)) = x1 + x2 + x3
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c9(x1)) = x1
POL(cons(x1, x2)) = 0
POL(false) = 0
POL(half(x1)) = x1
POL(lastbit(x1)) = 0
POL(s(x1)) = [4] + x1
(28) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(29) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
IF(
false,
s(
s(
z0)),
x1) →
c11(
CONVITER(
s(
half(
z0)),
cons(
lastbit(
s(
s(
z0))),
x1)),
HALF(
s(
s(
z0))),
LASTBIT(
s(
s(
z0)))) by
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
(30) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(31) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
IF(
false,
0,
x1) →
c11(
CONVITER(
half(
0),
cons(
0,
x1))) by
IF(false, 0, x0) → c11(CONVITER(0, cons(0, x0)))
(32) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, 0, x0) → c11(CONVITER(0, cons(0, x0)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, 0, x1) → c11(CONVITER(half(0), cons(0, x1)))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(s(s(z0))), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(33) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing nodes:
IF(false, 0, x0) → c11(CONVITER(0, cons(0, x0)))
(34) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(0), x1) → c11(CONVITER(half(s(0)), cons(s(0), x1)))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(35) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)
Use narrowing to replace
IF(
false,
s(
0),
x1) →
c11(
CONVITER(
half(
s(
0)),
cons(
s(
0),
x1))) by
IF(false, s(0), x0) → c11(CONVITER(0, cons(s(0), x0)))
(36) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(0), x0) → c11(CONVITER(0, cons(s(0), x0)))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(0), x0) → c11(CONVITER(0, cons(s(0), x0)))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11, c11
(37) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 1 trailing nodes:
IF(false, s(0), x0) → c11(CONVITER(0, cons(s(0), x0)))
(38) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(39) CdtRewritingProof (BOTH BOUNDS(ID, ID) transformation)
Used rewriting to replace IF(false, s(s(0)), x1) → c11(CONVITER(half(s(s(0))), cons(0, x1)), HALF(s(s(0))), LASTBIT(s(s(0)))) by IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
(40) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(41) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
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))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONVITER(x1, x2)) = [4]x1
POL(HALF(x1)) = 0
POL(IF(x1, x2, x3)) = [4]x2
POL(LASTBIT(x1)) = 0
POL(c11(x1, x2, x3)) = x1 + x2 + x3
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c9(x1)) = x1
POL(cons(x1, x2)) = [5]
POL(false) = 0
POL(half(x1)) = x1
POL(lastbit(x1)) = 0
POL(s(x1)) = [4] + x1
(42) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(43) CdtRewritingProof (BOTH BOUNDS(ID, ID) transformation)
Used rewriting to replace IF(false, s(s(s(0))), x1) → c11(CONVITER(half(s(s(s(0)))), cons(s(0), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0))))) by IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
(44) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(45) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
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))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONVITER(x1, x2)) = [2]x1
POL(HALF(x1)) = 0
POL(IF(x1, x2, x3)) = [2]x2
POL(LASTBIT(x1)) = 0
POL(c11(x1, x2, x3)) = x1 + x2 + x3
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c9(x1)) = x1
POL(cons(x1, x2)) = [2]
POL(false) = [1]
POL(half(x1)) = x1
POL(lastbit(x1)) = 0
POL(s(x1)) = [2] + x1
(46) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(47) CdtRewritingProof (BOTH BOUNDS(ID, ID) transformation)
Used rewriting to replace IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(half(s(s(s(s(z0))))), cons(lastbit(z0), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0)))))) by IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
(48) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(49) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(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))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONVITER(x1, x2)) = [4] + [4]x1 + [4]x2
POL(HALF(x1)) = 0
POL(IF(x1, x2, x3)) = x1 + [4]x2 + [2]x3
POL(LASTBIT(x1)) = 0
POL(c11(x1, x2, x3)) = x1 + x2 + x3
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c9(x1)) = x1
POL(cons(x1, x2)) = [3]
POL(false) = [1]
POL(half(x1)) = x1
POL(lastbit(x1)) = [4]
POL(s(x1)) = [4] + x1
(50) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
S tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(51) 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))
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))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(CONVITER(x1, x2)) = [2] + x1 + x12
POL(HALF(x1)) = x1
POL(IF(x1, x2, x3)) = [2] + x2 + x22
POL(LASTBIT(x1)) = [2] + [2]x1
POL(c11(x1, x2, x3)) = x1 + x2 + x3
POL(c2(x1)) = x1
POL(c5(x1)) = x1
POL(c9(x1)) = x1
POL(cons(x1, x2)) = 0
POL(false) = 0
POL(half(x1)) = x1
POL(lastbit(x1)) = 0
POL(s(x1)) = [2] + x1
(52) 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)
Tuples:
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(0))), x1)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), x1) → c11(CONVITER(s(0), cons(lastbit(s(s(s(0)))), x1)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), x1) → c11(CONVITER(s(s(half(z0))), cons(lastbit(s(s(s(s(z0))))), x1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
S tuples:none
K tuples:
IF(false, s(s(z0)), x1) → c11(CONVITER(s(half(z0)), cons(lastbit(z0), x1)), HALF(s(s(z0))), LASTBIT(s(s(z0))))
IF(false, s(s(0)), z0) → c11(CONVITER(s(half(0)), cons(0, z0)), HALF(s(s(0))), LASTBIT(s(s(0))))
IF(false, s(s(s(0))), z0) → c11(CONVITER(s(half(s(0))), cons(s(0), z0)), HALF(s(s(s(0)))), LASTBIT(s(s(s(0)))))
CONVITER(s(z0), x1) → c9(IF(false, s(z0), x1))
IF(false, s(s(s(s(z0)))), z1) → c11(CONVITER(s(half(s(s(z0)))), cons(lastbit(z0), z1)), HALF(s(s(s(s(z0))))), LASTBIT(s(s(s(s(z0))))))
HALF(s(s(z0))) → c2(HALF(z0))
LASTBIT(s(s(z0))) → c5(LASTBIT(z0))
Defined Rule Symbols:
half, lastbit
Defined Pair Symbols:
HALF, LASTBIT, CONVITER, IF
Compound Symbols:
c2, c5, c9, c11
(53) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(54) BOUNDS(1, 1)