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