(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
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) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)
The following defined symbols can occur below the 0th argument of t: s, a, p, q, d, t, f
The following defined symbols can occur below the 0th argument of a: s, a, p, q, d, t, f
The following defined symbols can occur below the 0th argument of q: s, a, p, q, d, t, f
The following defined symbols can occur below the 0th argument of s: s, a, p, q, d, t, f
The following defined symbols can occur below the 0th argument of f: s, a, p, q, d, t, f
The following defined symbols can occur below the 1th argument of f: s, a, p, q, d, t, f
The following defined symbols can occur below the 0th argument of p: s, a, p, q, d, t, f
The following defined symbols can occur below the 1th argument of p: d
Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
d(s(X)) → s(s(d(X)))
p(s(X), s(Y)) → s(s(p(X, Y)))
(2) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
t(N) → cs(r(q(N)), nt(ns(N)))
t(X) → nt(X)
a(ns(X)) → s(a(X))
q(s(X)) → s(p(q(X), d(X)))
a(X) → X
a(nf(X1, X2)) → f(a(X1), a(X2))
d(0) → 0
f(0, X) → nil
f(X1, X2) → nf(X1, X2)
q(0) → 0
p(0, X) → X
p(X, 0) → X
f(s(X), cs(Y, Z)) → cs(Y, nf(X, a(Z)))
s(X) → ns(X)
a(nt(X)) → t(a(X))
Rewrite Strategy: INNERMOST
(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted Cpx (relative) TRS to CDT
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
a(ns(z0)) → s(a(z0))
a(z0) → z0
a(nf(z0, z1)) → f(a(z0), a(z1))
a(nt(z0)) → t(a(z0))
q(s(z0)) → s(p(q(z0), d(z0)))
q(0) → 0
d(0) → 0
f(0, z0) → nil
f(z0, z1) → nf(z0, z1)
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
p(0, z0) → z0
p(z0, 0) → z0
s(z0) → ns(z0)
Tuples:
T(z0) → c(Q(z0))
T(z0) → c1
A(ns(z0)) → c2(S(a(z0)), A(z0))
A(z0) → c3
A(nf(z0, z1)) → c4(F(a(z0), a(z1)), A(z0), A(z1))
A(nt(z0)) → c5(T(a(z0)), A(z0))
Q(s(z0)) → c6(S(p(q(z0), d(z0))), P(q(z0), d(z0)), Q(z0), D(z0))
Q(0) → c7
D(0) → c8
F(0, z0) → c9
F(z0, z1) → c10
F(s(z0), cs(z1, z2)) → c11(A(z2))
P(0, z0) → c12
P(z0, 0) → c13
S(z0) → c14
S tuples:
T(z0) → c(Q(z0))
T(z0) → c1
A(ns(z0)) → c2(S(a(z0)), A(z0))
A(z0) → c3
A(nf(z0, z1)) → c4(F(a(z0), a(z1)), A(z0), A(z1))
A(nt(z0)) → c5(T(a(z0)), A(z0))
Q(s(z0)) → c6(S(p(q(z0), d(z0))), P(q(z0), d(z0)), Q(z0), D(z0))
Q(0) → c7
D(0) → c8
F(0, z0) → c9
F(z0, z1) → c10
F(s(z0), cs(z1, z2)) → c11(A(z2))
P(0, z0) → c12
P(z0, 0) → c13
S(z0) → c14
K tuples:none
Defined Rule Symbols:
t, a, q, d, f, p, s
Defined Pair Symbols:
T, A, Q, D, F, P, S
Compound Symbols:
c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
(5) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)
Removed 1 leading nodes:
F(s(z0), cs(z1, z2)) → c11(A(z2))
Removed 11 trailing nodes:
A(z0) → c3
D(0) → c8
Q(s(z0)) → c6(S(p(q(z0), d(z0))), P(q(z0), d(z0)), Q(z0), D(z0))
T(z0) → c(Q(z0))
P(z0, 0) → c13
F(0, z0) → c9
F(z0, z1) → c10
S(z0) → c14
P(0, z0) → c12
T(z0) → c1
Q(0) → c7
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
a(ns(z0)) → s(a(z0))
a(z0) → z0
a(nf(z0, z1)) → f(a(z0), a(z1))
a(nt(z0)) → t(a(z0))
q(s(z0)) → s(p(q(z0), d(z0)))
q(0) → 0
d(0) → 0
f(0, z0) → nil
f(z0, z1) → nf(z0, z1)
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
p(0, z0) → z0
p(z0, 0) → z0
s(z0) → ns(z0)
Tuples:
A(ns(z0)) → c2(S(a(z0)), A(z0))
A(nf(z0, z1)) → c4(F(a(z0), a(z1)), A(z0), A(z1))
A(nt(z0)) → c5(T(a(z0)), A(z0))
S tuples:
A(ns(z0)) → c2(S(a(z0)), A(z0))
A(nf(z0, z1)) → c4(F(a(z0), a(z1)), A(z0), A(z1))
A(nt(z0)) → c5(T(a(z0)), A(z0))
K tuples:none
Defined Rule Symbols:
t, a, q, d, f, p, s
Defined Pair Symbols:
A
Compound Symbols:
c2, c4, c5
(7) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)
Removed 3 trailing tuple parts
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
t(z0) → cs(r(q(z0)), nt(ns(z0)))
t(z0) → nt(z0)
a(ns(z0)) → s(a(z0))
a(z0) → z0
a(nf(z0, z1)) → f(a(z0), a(z1))
a(nt(z0)) → t(a(z0))
q(s(z0)) → s(p(q(z0), d(z0)))
q(0) → 0
d(0) → 0
f(0, z0) → nil
f(z0, z1) → nf(z0, z1)
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
p(0, z0) → z0
p(z0, 0) → z0
s(z0) → ns(z0)
Tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
S tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
K tuples:none
Defined Rule Symbols:
t, a, q, d, f, p, s
Defined Pair Symbols:
A
Compound Symbols:
c2, c4, c5
(9) 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)
a(ns(z0)) → s(a(z0))
a(z0) → z0
a(nf(z0, z1)) → f(a(z0), a(z1))
a(nt(z0)) → t(a(z0))
q(s(z0)) → s(p(q(z0), d(z0)))
q(0) → 0
d(0) → 0
f(0, z0) → nil
f(z0, z1) → nf(z0, z1)
f(s(z0), cs(z1, z2)) → cs(z1, nf(z0, a(z2)))
p(0, z0) → z0
p(z0, 0) → z0
s(z0) → ns(z0)
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
S tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
K tuples:none
Defined Rule Symbols:none
Defined Pair Symbols:
A
Compound Symbols:
c2, c4, c5
(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.
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
We considered the (Usable) Rules:none
And the Tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(A(x1)) = x1
POL(c2(x1)) = x1
POL(c4(x1, x2)) = x1 + x2
POL(c5(x1)) = x1
POL(nf(x1, x2)) = [1] + x1 + x2
POL(ns(x1)) = [1] + x1
POL(nt(x1)) = [1] + x1
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:none
Tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
S tuples:none
K tuples:
A(ns(z0)) → c2(A(z0))
A(nf(z0, z1)) → c4(A(z0), A(z1))
A(nt(z0)) → c5(A(z0))
Defined Rule Symbols:none
Defined Pair Symbols:
A
Compound Symbols:
c2, c4, c5
(13) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)
The set S is empty
(14) BOUNDS(1, 1)