(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
active(and(true, X)) → mark(X)
active(and(false, Y)) → mark(false)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
mark(and(X1, X2)) → active(and(mark(X1), X2))
mark(true) → active(true)
mark(false) → active(false)
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(add(X1, X2)) → active(add(mark(X1), X2))
mark(0) → active(0)
mark(s(X)) → active(s(X))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(nil) → active(nil)
mark(cons(X1, X2)) → active(cons(X1, X2))
mark(from(X)) → active(from(X))
and(mark(X1), X2) → and(X1, X2)
and(X1, mark(X2)) → and(X1, X2)
and(active(X1), X2) → and(X1, X2)
and(X1, active(X2)) → and(X1, X2)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
mark(and(z0, z1)) → active(and(mark(z0), z1))
mark(true) → active(true)
mark(false) → active(false)
mark(if(z0, z1, z2)) → active(if(mark(z0), z1, z2))
mark(add(z0, z1)) → active(add(mark(z0), z1))
mark(0) → active(0)
mark(s(z0)) → active(s(z0))
mark(first(z0, z1)) → active(first(mark(z0), mark(z1)))
mark(nil) → active(nil)
mark(cons(z0, z1)) → active(cons(z0, z1))
mark(from(z0)) → active(from(z0))
and(mark(z0), z1) → and(z0, z1)
and(z0, mark(z1)) → and(z0, z1)
and(active(z0), z1) → and(z0, z1)
and(z0, active(z1)) → and(z0, z1)
if(mark(z0), z1, z2) → if(z0, z1, z2)
if(z0, mark(z1), z2) → if(z0, z1, z2)
if(z0, z1, mark(z2)) → if(z0, z1, z2)
if(active(z0), z1, z2) → if(z0, z1, z2)
if(z0, active(z1), z2) → if(z0, z1, z2)
if(z0, z1, active(z2)) → if(z0, z1, z2)
add(mark(z0), z1) → add(z0, z1)
add(z0, mark(z1)) → add(z0, z1)
add(active(z0), z1) → add(z0, z1)
add(z0, active(z1)) → add(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
first(mark(z0), z1) → first(z0, z1)
first(z0, mark(z1)) → first(z0, z1)
first(active(z0), z1) → first(z0, z1)
first(z0, active(z1)) → first(z0, z1)
cons(mark(z0), z1) → cons(z0, z1)
cons(z0, mark(z1)) → cons(z0, z1)
cons(active(z0), z1) → cons(z0, z1)
cons(z0, active(z1)) → cons(z0, z1)
from(mark(z0)) → from(z0)
from(active(z0)) → from(z0)
Tuples:
ACTIVE(and(true, z0)) → c(MARK(z0))
ACTIVE(and(false, z0)) → c1(MARK(false))
ACTIVE(if(true, z0, z1)) → c2(MARK(z0))
ACTIVE(if(false, z0, z1)) → c3(MARK(z1))
ACTIVE(add(0, z0)) → c4(MARK(z0))
ACTIVE(add(s(z0), z1)) → c5(MARK(s(add(z0, z1))), S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(0, z0)) → c6(MARK(nil))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(MARK(cons(z1, first(z0, z2))), CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(MARK(cons(z0, from(s(z0)))), CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
MARK(and(z0, z1)) → c9(ACTIVE(and(mark(z0), z1)), AND(mark(z0), z1), MARK(z0))
MARK(true) → c10(ACTIVE(true))
MARK(false) → c11(ACTIVE(false))
MARK(if(z0, z1, z2)) → c12(ACTIVE(if(mark(z0), z1, z2)), IF(mark(z0), z1, z2), MARK(z0))
MARK(add(z0, z1)) → c13(ACTIVE(add(mark(z0), z1)), ADD(mark(z0), z1), MARK(z0))
MARK(0) → c14(ACTIVE(0))
MARK(s(z0)) → c15(ACTIVE(s(z0)), S(z0))
MARK(first(z0, z1)) → c16(ACTIVE(first(mark(z0), mark(z1))), FIRST(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(nil) → c17(ACTIVE(nil))
MARK(cons(z0, z1)) → c18(ACTIVE(cons(z0, z1)), CONS(z0, z1))
MARK(from(z0)) → c19(ACTIVE(from(z0)), FROM(z0))
AND(mark(z0), z1) → c20(AND(z0, z1))
AND(z0, mark(z1)) → c21(AND(z0, z1))
AND(active(z0), z1) → c22(AND(z0, z1))
AND(z0, active(z1)) → c23(AND(z0, z1))
IF(mark(z0), z1, z2) → c24(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c25(IF(z0, z1, z2))
IF(z0, z1, mark(z2)) → c26(IF(z0, z1, z2))
IF(active(z0), z1, z2) → c27(IF(z0, z1, z2))
IF(z0, active(z1), z2) → c28(IF(z0, z1, z2))
IF(z0, z1, active(z2)) → c29(IF(z0, z1, z2))
ADD(mark(z0), z1) → c30(ADD(z0, z1))
ADD(z0, mark(z1)) → c31(ADD(z0, z1))
ADD(active(z0), z1) → c32(ADD(z0, z1))
ADD(z0, active(z1)) → c33(ADD(z0, z1))
S(mark(z0)) → c34(S(z0))
S(active(z0)) → c35(S(z0))
FIRST(mark(z0), z1) → c36(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c37(FIRST(z0, z1))
FIRST(active(z0), z1) → c38(FIRST(z0, z1))
FIRST(z0, active(z1)) → c39(FIRST(z0, z1))
CONS(mark(z0), z1) → c40(CONS(z0, z1))
CONS(z0, mark(z1)) → c41(CONS(z0, z1))
CONS(active(z0), z1) → c42(CONS(z0, z1))
CONS(z0, active(z1)) → c43(CONS(z0, z1))
FROM(mark(z0)) → c44(FROM(z0))
FROM(active(z0)) → c45(FROM(z0))
S tuples:
ACTIVE(and(true, z0)) → c(MARK(z0))
ACTIVE(and(false, z0)) → c1(MARK(false))
ACTIVE(if(true, z0, z1)) → c2(MARK(z0))
ACTIVE(if(false, z0, z1)) → c3(MARK(z1))
ACTIVE(add(0, z0)) → c4(MARK(z0))
ACTIVE(add(s(z0), z1)) → c5(MARK(s(add(z0, z1))), S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(0, z0)) → c6(MARK(nil))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(MARK(cons(z1, first(z0, z2))), CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(MARK(cons(z0, from(s(z0)))), CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
MARK(and(z0, z1)) → c9(ACTIVE(and(mark(z0), z1)), AND(mark(z0), z1), MARK(z0))
MARK(true) → c10(ACTIVE(true))
MARK(false) → c11(ACTIVE(false))
MARK(if(z0, z1, z2)) → c12(ACTIVE(if(mark(z0), z1, z2)), IF(mark(z0), z1, z2), MARK(z0))
MARK(add(z0, z1)) → c13(ACTIVE(add(mark(z0), z1)), ADD(mark(z0), z1), MARK(z0))
MARK(0) → c14(ACTIVE(0))
MARK(s(z0)) → c15(ACTIVE(s(z0)), S(z0))
MARK(first(z0, z1)) → c16(ACTIVE(first(mark(z0), mark(z1))), FIRST(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(nil) → c17(ACTIVE(nil))
MARK(cons(z0, z1)) → c18(ACTIVE(cons(z0, z1)), CONS(z0, z1))
MARK(from(z0)) → c19(ACTIVE(from(z0)), FROM(z0))
AND(mark(z0), z1) → c20(AND(z0, z1))
AND(z0, mark(z1)) → c21(AND(z0, z1))
AND(active(z0), z1) → c22(AND(z0, z1))
AND(z0, active(z1)) → c23(AND(z0, z1))
IF(mark(z0), z1, z2) → c24(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c25(IF(z0, z1, z2))
IF(z0, z1, mark(z2)) → c26(IF(z0, z1, z2))
IF(active(z0), z1, z2) → c27(IF(z0, z1, z2))
IF(z0, active(z1), z2) → c28(IF(z0, z1, z2))
IF(z0, z1, active(z2)) → c29(IF(z0, z1, z2))
ADD(mark(z0), z1) → c30(ADD(z0, z1))
ADD(z0, mark(z1)) → c31(ADD(z0, z1))
ADD(active(z0), z1) → c32(ADD(z0, z1))
ADD(z0, active(z1)) → c33(ADD(z0, z1))
S(mark(z0)) → c34(S(z0))
S(active(z0)) → c35(S(z0))
FIRST(mark(z0), z1) → c36(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c37(FIRST(z0, z1))
FIRST(active(z0), z1) → c38(FIRST(z0, z1))
FIRST(z0, active(z1)) → c39(FIRST(z0, z1))
CONS(mark(z0), z1) → c40(CONS(z0, z1))
CONS(z0, mark(z1)) → c41(CONS(z0, z1))
CONS(active(z0), z1) → c42(CONS(z0, z1))
CONS(z0, active(z1)) → c43(CONS(z0, z1))
FROM(mark(z0)) → c44(FROM(z0))
FROM(active(z0)) → c45(FROM(z0))
K tuples:none
Defined Rule Symbols:
active, mark, and, if, add, s, first, cons, from
Defined Pair Symbols:
ACTIVE, MARK, AND, IF, ADD, S, FIRST, CONS, FROM
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44, c45
(3) CdtUnreachableProof (EQUIVALENT transformation)
The following tuples could be removed as they are not reachable from basic start terms:
ACTIVE(and(true, z0)) → c(MARK(z0))
ACTIVE(and(false, z0)) → c1(MARK(false))
ACTIVE(if(true, z0, z1)) → c2(MARK(z0))
ACTIVE(if(false, z0, z1)) → c3(MARK(z1))
ACTIVE(add(0, z0)) → c4(MARK(z0))
ACTIVE(add(s(z0), z1)) → c5(MARK(s(add(z0, z1))), S(add(z0, z1)), ADD(z0, z1))
ACTIVE(first(0, z0)) → c6(MARK(nil))
ACTIVE(first(s(z0), cons(z1, z2))) → c7(MARK(cons(z1, first(z0, z2))), CONS(z1, first(z0, z2)), FIRST(z0, z2))
ACTIVE(from(z0)) → c8(MARK(cons(z0, from(s(z0)))), CONS(z0, from(s(z0))), FROM(s(z0)), S(z0))
MARK(and(z0, z1)) → c9(ACTIVE(and(mark(z0), z1)), AND(mark(z0), z1), MARK(z0))
MARK(if(z0, z1, z2)) → c12(ACTIVE(if(mark(z0), z1, z2)), IF(mark(z0), z1, z2), MARK(z0))
MARK(add(z0, z1)) → c13(ACTIVE(add(mark(z0), z1)), ADD(mark(z0), z1), MARK(z0))
MARK(s(z0)) → c15(ACTIVE(s(z0)), S(z0))
MARK(first(z0, z1)) → c16(ACTIVE(first(mark(z0), mark(z1))), FIRST(mark(z0), mark(z1)), MARK(z0), MARK(z1))
MARK(cons(z0, z1)) → c18(ACTIVE(cons(z0, z1)), CONS(z0, z1))
MARK(from(z0)) → c19(ACTIVE(from(z0)), FROM(z0))
AND(mark(z0), z1) → c20(AND(z0, z1))
AND(z0, mark(z1)) → c21(AND(z0, z1))
AND(active(z0), z1) → c22(AND(z0, z1))
AND(z0, active(z1)) → c23(AND(z0, z1))
IF(mark(z0), z1, z2) → c24(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c25(IF(z0, z1, z2))
IF(z0, z1, mark(z2)) → c26(IF(z0, z1, z2))
IF(active(z0), z1, z2) → c27(IF(z0, z1, z2))
IF(z0, active(z1), z2) → c28(IF(z0, z1, z2))
IF(z0, z1, active(z2)) → c29(IF(z0, z1, z2))
ADD(mark(z0), z1) → c30(ADD(z0, z1))
ADD(z0, mark(z1)) → c31(ADD(z0, z1))
ADD(active(z0), z1) → c32(ADD(z0, z1))
ADD(z0, active(z1)) → c33(ADD(z0, z1))
S(mark(z0)) → c34(S(z0))
S(active(z0)) → c35(S(z0))
FIRST(mark(z0), z1) → c36(FIRST(z0, z1))
FIRST(z0, mark(z1)) → c37(FIRST(z0, z1))
FIRST(active(z0), z1) → c38(FIRST(z0, z1))
FIRST(z0, active(z1)) → c39(FIRST(z0, z1))
CONS(mark(z0), z1) → c40(CONS(z0, z1))
CONS(z0, mark(z1)) → c41(CONS(z0, z1))
CONS(active(z0), z1) → c42(CONS(z0, z1))
CONS(z0, active(z1)) → c43(CONS(z0, z1))
FROM(mark(z0)) → c44(FROM(z0))
FROM(active(z0)) → c45(FROM(z0))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
mark(and(z0, z1)) → active(and(mark(z0), z1))
mark(true) → active(true)
mark(false) → active(false)
mark(if(z0, z1, z2)) → active(if(mark(z0), z1, z2))
mark(add(z0, z1)) → active(add(mark(z0), z1))
mark(0) → active(0)
mark(s(z0)) → active(s(z0))
mark(first(z0, z1)) → active(first(mark(z0), mark(z1)))
mark(nil) → active(nil)
mark(cons(z0, z1)) → active(cons(z0, z1))
mark(from(z0)) → active(from(z0))
and(mark(z0), z1) → and(z0, z1)
and(z0, mark(z1)) → and(z0, z1)
and(active(z0), z1) → and(z0, z1)
and(z0, active(z1)) → and(z0, z1)
if(mark(z0), z1, z2) → if(z0, z1, z2)
if(z0, mark(z1), z2) → if(z0, z1, z2)
if(z0, z1, mark(z2)) → if(z0, z1, z2)
if(active(z0), z1, z2) → if(z0, z1, z2)
if(z0, active(z1), z2) → if(z0, z1, z2)
if(z0, z1, active(z2)) → if(z0, z1, z2)
add(mark(z0), z1) → add(z0, z1)
add(z0, mark(z1)) → add(z0, z1)
add(active(z0), z1) → add(z0, z1)
add(z0, active(z1)) → add(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
first(mark(z0), z1) → first(z0, z1)
first(z0, mark(z1)) → first(z0, z1)
first(active(z0), z1) → first(z0, z1)
first(z0, active(z1)) → first(z0, z1)
cons(mark(z0), z1) → cons(z0, z1)
cons(z0, mark(z1)) → cons(z0, z1)
cons(active(z0), z1) → cons(z0, z1)
cons(z0, active(z1)) → cons(z0, z1)
from(mark(z0)) → from(z0)
from(active(z0)) → from(z0)
Tuples:
MARK(true) → c10(ACTIVE(true))
MARK(false) → c11(ACTIVE(false))
MARK(0) → c14(ACTIVE(0))
MARK(nil) → c17(ACTIVE(nil))
S tuples:
MARK(true) → c10(ACTIVE(true))
MARK(false) → c11(ACTIVE(false))
MARK(0) → c14(ACTIVE(0))
MARK(nil) → c17(ACTIVE(nil))
K tuples:none
Defined Rule Symbols:
active, mark, and, if, add, s, first, cons, from
Defined Pair Symbols:
MARK
Compound Symbols:
c10, c11, c14, c17
(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)
Removed 4 trailing nodes:
MARK(nil) → c17(ACTIVE(nil))
MARK(0) → c14(ACTIVE(0))
MARK(false) → c11(ACTIVE(false))
MARK(true) → c10(ACTIVE(true))
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
active(and(true, z0)) → mark(z0)
active(and(false, z0)) → mark(false)
active(if(true, z0, z1)) → mark(z0)
active(if(false, z0, z1)) → mark(z1)
active(add(0, z0)) → mark(z0)
active(add(s(z0), z1)) → mark(s(add(z0, z1)))
active(first(0, z0)) → mark(nil)
active(first(s(z0), cons(z1, z2))) → mark(cons(z1, first(z0, z2)))
active(from(z0)) → mark(cons(z0, from(s(z0))))
mark(and(z0, z1)) → active(and(mark(z0), z1))
mark(true) → active(true)
mark(false) → active(false)
mark(if(z0, z1, z2)) → active(if(mark(z0), z1, z2))
mark(add(z0, z1)) → active(add(mark(z0), z1))
mark(0) → active(0)
mark(s(z0)) → active(s(z0))
mark(first(z0, z1)) → active(first(mark(z0), mark(z1)))
mark(nil) → active(nil)
mark(cons(z0, z1)) → active(cons(z0, z1))
mark(from(z0)) → active(from(z0))
and(mark(z0), z1) → and(z0, z1)
and(z0, mark(z1)) → and(z0, z1)
and(active(z0), z1) → and(z0, z1)
and(z0, active(z1)) → and(z0, z1)
if(mark(z0), z1, z2) → if(z0, z1, z2)
if(z0, mark(z1), z2) → if(z0, z1, z2)
if(z0, z1, mark(z2)) → if(z0, z1, z2)
if(active(z0), z1, z2) → if(z0, z1, z2)
if(z0, active(z1), z2) → if(z0, z1, z2)
if(z0, z1, active(z2)) → if(z0, z1, z2)
add(mark(z0), z1) → add(z0, z1)
add(z0, mark(z1)) → add(z0, z1)
add(active(z0), z1) → add(z0, z1)
add(z0, active(z1)) → add(z0, z1)
s(mark(z0)) → s(z0)
s(active(z0)) → s(z0)
first(mark(z0), z1) → first(z0, z1)
first(z0, mark(z1)) → first(z0, z1)
first(active(z0), z1) → first(z0, z1)
first(z0, active(z1)) → first(z0, z1)
cons(mark(z0), z1) → cons(z0, z1)
cons(z0, mark(z1)) → cons(z0, z1)
cons(active(z0), z1) → cons(z0, z1)
cons(z0, active(z1)) → cons(z0, z1)
from(mark(z0)) → from(z0)
from(active(z0)) → from(z0)
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:
active, mark, and, if, add, s, first, cons, from
Defined Pair Symbols:none
Compound Symbols:none
(7) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(8) BOUNDS(O(1), O(1))