(0) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


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)))
active(terms(X)) → terms(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(recip(X)) → recip(active(X))
active(sqr(X)) → sqr(active(X))
active(s(X)) → s(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(dbl(X)) → dbl(active(X))
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
terms(mark(X)) → mark(terms(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
recip(mark(X)) → mark(recip(X))
sqr(mark(X)) → mark(sqr(X))
s(mark(X)) → mark(s(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
dbl(mark(X)) → mark(dbl(X))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
proper(terms(X)) → terms(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(recip(X)) → recip(proper(X))
proper(sqr(X)) → sqr(proper(X))
proper(s(X)) → s(proper(X))
proper(0) → ok(0)
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(dbl(X)) → dbl(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(nil) → ok(nil)
terms(ok(X)) → ok(terms(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
recip(ok(X)) → ok(recip(X))
sqr(ok(X)) → ok(sqr(X))
s(ok(X)) → ok(s(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
dbl(ok(X)) → ok(dbl(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: FULL

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of top: proper, active
The following defined symbols can occur below the 0th argument of proper: proper, active
The following defined symbols can occur below the 0th argument of active: proper, active

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
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)))
active(terms(X)) → terms(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(recip(X)) → recip(active(X))
active(sqr(X)) → sqr(active(X))
active(s(X)) → s(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(dbl(X)) → dbl(active(X))
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
proper(terms(X)) → terms(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(recip(X)) → recip(proper(X))
proper(sqr(X)) → sqr(proper(X))
proper(s(X)) → s(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(dbl(X)) → dbl(proper(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))

(2) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

sqr(ok(X)) → ok(sqr(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(ok(X)) → top(active(X))
proper(nil) → ok(nil)
terms(ok(X)) → ok(terms(X))
dbl(mark(X)) → mark(dbl(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
terms(mark(X)) → mark(terms(X))
first(mark(X1), X2) → mark(first(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))
recip(ok(X)) → ok(recip(X))
recip(mark(X)) → mark(recip(X))
proper(0) → ok(0)
dbl(ok(X)) → ok(dbl(X))
first(X1, mark(X2)) → mark(first(X1, X2))
add(mark(X1), X2) → mark(add(X1, X2))
sqr(mark(X)) → mark(sqr(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
top(mark(X)) → top(proper(X))

Rewrite Strategy: FULL

(3) RcToIrcProof (BOTH BOUNDS(ID, ID) transformation)

Converted rc-obligation to irc-obligation.

As the TRS is a non-duplicating overlay system, we have rc = irc.

(4) 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:

sqr(ok(X)) → ok(sqr(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
top(ok(X)) → top(active(X))
proper(nil) → ok(nil)
terms(ok(X)) → ok(terms(X))
dbl(mark(X)) → mark(dbl(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
terms(mark(X)) → mark(terms(X))
first(mark(X1), X2) → mark(first(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))
recip(ok(X)) → ok(recip(X))
recip(mark(X)) → mark(recip(X))
proper(0) → ok(0)
dbl(ok(X)) → ok(dbl(X))
first(X1, mark(X2)) → mark(first(X1, X2))
add(mark(X1), X2) → mark(add(X1, X2))
sqr(mark(X)) → mark(sqr(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
top(mark(X)) → top(proper(X))

Rewrite Strategy: INNERMOST

(5) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
transitions:
ok0(0) → 0
active0(0) → 0
nil0() → 0
mark0(0) → 0
00() → 0
sqr0(0) → 1
add0(0, 0) → 2
top0(0) → 3
proper0(0) → 4
terms0(0) → 5
dbl0(0) → 6
cons0(0, 0) → 7
first0(0, 0) → 8
s0(0) → 9
recip0(0) → 10
sqr1(0) → 11
ok1(11) → 1
add1(0, 0) → 12
ok1(12) → 2
active1(0) → 13
top1(13) → 3
nil1() → 14
ok1(14) → 4
terms1(0) → 15
ok1(15) → 5
dbl1(0) → 16
mark1(16) → 6
cons1(0, 0) → 17
ok1(17) → 7
first1(0, 0) → 18
ok1(18) → 8
terms1(0) → 19
mark1(19) → 5
first1(0, 0) → 20
mark1(20) → 8
add1(0, 0) → 21
mark1(21) → 2
s1(0) → 22
ok1(22) → 9
s1(0) → 23
mark1(23) → 9
recip1(0) → 24
ok1(24) → 10
recip1(0) → 25
mark1(25) → 10
01() → 26
ok1(26) → 4
dbl1(0) → 27
ok1(27) → 6
sqr1(0) → 28
mark1(28) → 1
cons1(0, 0) → 29
mark1(29) → 7
proper1(0) → 30
top1(30) → 3
ok1(11) → 11
ok1(11) → 28
ok1(12) → 12
ok1(12) → 21
ok1(14) → 30
ok1(15) → 15
ok1(15) → 19
mark1(16) → 16
mark1(16) → 27
ok1(17) → 17
ok1(17) → 29
ok1(18) → 18
ok1(18) → 20
mark1(19) → 15
mark1(19) → 19
mark1(20) → 18
mark1(20) → 20
mark1(21) → 12
mark1(21) → 21
ok1(22) → 22
ok1(22) → 23
mark1(23) → 22
mark1(23) → 23
ok1(24) → 24
ok1(24) → 25
mark1(25) → 24
mark1(25) → 25
ok1(26) → 30
ok1(27) → 16
ok1(27) → 27
mark1(28) → 11
mark1(28) → 28
mark1(29) → 17
mark1(29) → 29
active2(14) → 31
top2(31) → 3
active2(26) → 31

(6) BOUNDS(1, n^1)