(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
t(N) → cs(r(q(N)), nt(ns(N)))
q(0) → 0
q(s(X)) → s(p(q(X), d(X)))
d(0) → 0
d(s(X)) → s(s(d(X)))
p(0, X) → X
p(X, 0) → X
p(s(X), s(Y)) → s(s(p(X, Y)))
f(0, X) → nil
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
t(X) → nt(X)
s(X) → ns(X)
f(X1, X2) → nf(X1, X2)
a(nt(X)) → t(a(X))
a(ns(X)) → s(a(X))
a(nf(X1, X2)) → f(a(X1), a(X2))
a(X) → X
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
q(0) → 0
q(s(z0)) → s(p(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
p(0, z0) → z0
p(z0, 0) → z0
p(s(z0), s(z1)) → s(s(p(z0, z1)))
f(0, z0) → nil
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
f(z0, z1) → nf(z0, z1)
s(z0) → ns(z0)
a(nt(z0)) → t(a(z0))
a(ns(z0)) → s(a(z0))
a(nf(z0, z1)) → f(a(z0), a(z1))
a(z0) → z0
Tuples:
T(z0) → c(Q(z0))
T(z0) → c1
Q(0) → c2
Q(s(z0)) → c3(S(p(q(z0), d(z0))), P(q(z0), d(z0)), Q(z0), D(z0))
D(0) → c4
D(s(z0)) → c5(S(s(d(z0))), S(d(z0)), D(z0))
P(0, z0) → c6
P(z0, 0) → c7
P(s(z0), s(z1)) → c8(S(s(p(z0, z1))), S(p(z0, z1)), P(z0, z1))
F(0, z0) → c9
F(s(z0), cs(z1, z2)) → c10(A(z2))
F(z0, z1) → c11
S(z0) → c12
A(nt(z0)) → c13(T(a(z0)), A(z0))
A(ns(z0)) → c14(S(a(z0)), A(z0))
A(nf(z0, z1)) → c15(F(a(z0), a(z1)), A(z0), A(z1))
A(z0) → c16
S tuples:
T(z0) → c(Q(z0))
T(z0) → c1
Q(0) → c2
Q(s(z0)) → c3(S(p(q(z0), d(z0))), P(q(z0), d(z0)), Q(z0), D(z0))
D(0) → c4
D(s(z0)) → c5(S(s(d(z0))), S(d(z0)), D(z0))
P(0, z0) → c6
P(z0, 0) → c7
P(s(z0), s(z1)) → c8(S(s(p(z0, z1))), S(p(z0, z1)), P(z0, z1))
F(0, z0) → c9
F(s(z0), cs(z1, z2)) → c10(A(z2))
F(z0, z1) → c11
S(z0) → c12
A(nt(z0)) → c13(T(a(z0)), A(z0))
A(ns(z0)) → c14(S(a(z0)), A(z0))
A(nf(z0, z1)) → c15(F(a(z0), a(z1)), A(z0), A(z1))
A(z0) → c16
K tuples:none
Defined Rule Symbols:
t, q, d, p, f, s, a
Defined Pair Symbols:
T, Q, D, P, F, S, A
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16
(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
F(s(z0), cs(z1, z2)) → c10(A(z2))
Removed 13 trailing nodes:
P(s(z0), s(z1)) → c8(S(s(p(z0, z1))), S(p(z0, z1)), P(z0, z1))
F(0, z0) → c9
F(z0, z1) → c11
P(z0, 0) → c7
D(0) → c4
D(s(z0)) → c5(S(s(d(z0))), S(d(z0)), D(z0))
A(z0) → c16
T(z0) → c(Q(z0))
P(0, z0) → c6
T(z0) → c1
Q(0) → c2
S(z0) → c12
Q(s(z0)) → c3(S(p(q(z0), d(z0))), P(q(z0), d(z0)), Q(z0), D(z0))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
q(0) → 0
q(s(z0)) → s(p(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
p(0, z0) → z0
p(z0, 0) → z0
p(s(z0), s(z1)) → s(s(p(z0, z1)))
f(0, z0) → nil
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
f(z0, z1) → nf(z0, z1)
s(z0) → ns(z0)
a(nt(z0)) → t(a(z0))
a(ns(z0)) → s(a(z0))
a(nf(z0, z1)) → f(a(z0), a(z1))
a(z0) → z0
Tuples:
A(nt(z0)) → c13(T(a(z0)), A(z0))
A(ns(z0)) → c14(S(a(z0)), A(z0))
A(nf(z0, z1)) → c15(F(a(z0), a(z1)), A(z0), A(z1))
S tuples:
A(nt(z0)) → c13(T(a(z0)), A(z0))
A(ns(z0)) → c14(S(a(z0)), A(z0))
A(nf(z0, z1)) → c15(F(a(z0), a(z1)), A(z0), A(z1))
K tuples:none
Defined Rule Symbols:
t, q, d, p, f, s, a
Defined Pair Symbols:
A
Compound Symbols:
c13, c14, c15
(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
q(0) → 0
q(s(z0)) → s(p(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
p(0, z0) → z0
p(z0, 0) → z0
p(s(z0), s(z1)) → s(s(p(z0, z1)))
f(0, z0) → nil
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
f(z0, z1) → nf(z0, z1)
s(z0) → ns(z0)
a(nt(z0)) → t(a(z0))
a(ns(z0)) → s(a(z0))
a(nf(z0, z1)) → f(a(z0), a(z1))
a(z0) → z0
Tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
S tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
K tuples:none
Defined Rule Symbols:
t, q, d, p, f, s, a
Defined Pair Symbols:
A
Compound Symbols:
c13, c14, c15
(7) CdtUsableRulesProof (EQUIVALENT transformation)
The following rules are not usable and were removed:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
q(0) → 0
q(s(z0)) → s(p(q(z0), d(z0)))
d(0) → 0
d(s(z0)) → s(s(d(z0)))
p(0, z0) → z0
p(z0, 0) → z0
p(s(z0), s(z1)) → s(s(p(z0, z1)))
f(0, z0) → nil
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
f(z0, z1) → nf(z0, z1)
s(z0) → ns(z0)
a(nt(z0)) → t(a(z0))
a(ns(z0)) → s(a(z0))
a(nf(z0, z1)) → f(a(z0), a(z1))
a(z0) → z0
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
S tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
A
Compound Symbols:
c13, c14, c15
(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
We considered the (Usable) Rules:none
And the Tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(A(x1)) = [1] + x1 + x12
POL(c13(x1)) = x1
POL(c14(x1)) = x1
POL(c15(x1, x2)) = x1 + x2
POL(nf(x1, x2)) = [1] + x1 + x2
POL(ns(x1)) = [1] + x1
POL(nt(x1)) = [1] + x1
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
S tuples:none
K tuples:
A(nt(z0)) → c13(A(z0))
A(ns(z0)) → c14(A(z0))
A(nf(z0, z1)) → c15(A(z0), A(z1))
Defined Rule Symbols:none
Defined Pair Symbols:
A
Compound Symbols:
c13, c14, c15
(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(12) BOUNDS(1, 1)