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

active(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
active(inf(X)) → inf(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(length(X)) → length(active(X))
inf(mark(X)) → mark(inf(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
length(mark(X)) → mark(length(X))
proper(eq(X1, X2)) → eq(proper(X1), proper(X2))
proper(0) → ok(0)
proper(true) → ok(true)
proper(s(X)) → s(proper(X))
proper(false) → ok(false)
proper(inf(X)) → inf(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(length(X)) → length(proper(X))
eq(ok(X1), ok(X2)) → ok(eq(X1, X2))
s(ok(X)) → ok(s(X))
inf(ok(X)) → ok(inf(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST

(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(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
active(inf(X)) → inf(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(length(X)) → length(active(X))
proper(eq(X1, X2)) → eq(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(inf(X)) → inf(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(length(X)) → length(proper(X))

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

proper(true) → ok(true)
top(ok(X)) → top(active(X))
proper(nil) → ok(nil)
take(X1, mark(X2)) → mark(take(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
inf(mark(X)) → mark(inf(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(ok(X)) → ok(s(X))
proper(false) → ok(false)
length(mark(X)) → mark(length(X))
proper(0) → ok(0)
eq(ok(X1), ok(X2)) → ok(eq(X1, X2))
inf(ok(X)) → ok(inf(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))

Rewrite Strategy: INNERMOST

(3) 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]
transitions:
true0() → 0
ok0(0) → 0
active0(0) → 0
nil0() → 0
mark0(0) → 0
false0() → 0
00() → 0
proper0(0) → 1
top0(0) → 2
take0(0, 0) → 3
cons0(0, 0) → 4
inf0(0) → 5
s0(0) → 6
length0(0) → 7
eq0(0, 0) → 8
true1() → 9
ok1(9) → 1
active1(0) → 10
top1(10) → 2
nil1() → 11
ok1(11) → 1
take1(0, 0) → 12
mark1(12) → 3
cons1(0, 0) → 13
ok1(13) → 4
inf1(0) → 14
mark1(14) → 5
take1(0, 0) → 15
ok1(15) → 3
s1(0) → 16
ok1(16) → 6
false1() → 17
ok1(17) → 1
length1(0) → 18
mark1(18) → 7
01() → 19
ok1(19) → 1
eq1(0, 0) → 20
ok1(20) → 8
inf1(0) → 21
ok1(21) → 5
length1(0) → 22
ok1(22) → 7
proper1(0) → 23
top1(23) → 2
ok1(9) → 23
ok1(11) → 23
mark1(12) → 12
mark1(12) → 15
ok1(13) → 13
mark1(14) → 14
mark1(14) → 21
ok1(15) → 12
ok1(15) → 15
ok1(16) → 16
ok1(17) → 23
mark1(18) → 18
mark1(18) → 22
ok1(19) → 23
ok1(20) → 20
ok1(21) → 14
ok1(21) → 21
ok1(22) → 18
ok1(22) → 22
active2(9) → 24
top2(24) → 2
active2(11) → 24
active2(17) → 24
active2(19) → 24

(4) BOUNDS(1, n^1)