YES(O(1),O(n^1)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) , sel(0(), cons(X, Z)) -> X , sel(s(X), cons(Y, Z)) -> sel(X, activate(Z)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Arguments of following rules are not normal-forms: { first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , sel(s(X), cons(Y, Z)) -> sel(X, activate(Z)) } All above mentioned rules can be savely removed. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) , sel(0(), cons(X, Z)) -> X } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add the following innermost weak dependency pairs: Strict DPs: { from^#(X) -> c_1() , from^#(X) -> c_2() , first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , sel^#(0(), cons(X, Z)) -> c_10() } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { from^#(X) -> c_1() , from^#(X) -> c_2() , first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , sel^#(0(), cons(X, Z)) -> c_10() } Strict Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) , sel(0(), cons(X, Z)) -> X } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We replace rewrite rules by usable rules: Strict Usable Rules: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { from^#(X) -> c_1() , from^#(X) -> c_2() , first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , sel^#(0(), cons(X, Z)) -> c_10() } Strict Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The weightgap principle applies (using the following constant growth matrix-interpretation) The following argument positions are usable: Uargs(from) = {1}, Uargs(first) = {1, 2}, Uargs(s) = {1}, Uargs(from^#) = {1}, Uargs(first^#) = {1, 2}, Uargs(s^#) = {1}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-restricted matrix interpretation. [from](x1) = [1 0] x1 + [2] [0 1] [2] [cons](x1, x2) = [1 0] x1 + [1] [0 1] [1] [n__from](x1) = [1 0] x1 + [0] [0 1] [2] [n__s](x1) = [1 0] x1 + [0] [0 1] [2] [first](x1, x2) = [1 0] x1 + [1 0] x2 + [2] [0 1] [0 1] [2] [0] = [0] [0] [nil] = [1] [1] [s](x1) = [1 0] x1 + [1] [0 1] [2] [n__first](x1, x2) = [1 0] x1 + [1 0] x2 + [0] [0 1] [0 1] [2] [activate](x1) = [1 2] x1 + [1] [0 2] [0] [from^#](x1) = [1 0] x1 + [1] [0 0] [2] [c_1] = [1] [1] [c_2] = [1] [1] [first^#](x1, x2) = [1 0] x1 + [1 0] x2 + [2] [0 0] [0 0] [2] [c_3] = [1] [1] [c_4] = [1] [1] [s^#](x1) = [1 0] x1 + [1] [0 0] [2] [c_5] = [1] [1] [activate^#](x1) = [1 2] x1 + [0] [0 0] [0] [c_6] = [1] [1] [c_7](x1) = [1 0] x1 + [2] [0 1] [2] [c_8](x1) = [1 0] x1 + [2] [0 1] [2] [c_9](x1) = [1 0] x1 + [2] [0 1] [2] [sel^#](x1, x2) = [2 2] x1 + [2 2] x2 + [2] [2 2] [2 2] [2] [c_10] = [1] [1] The following symbols are considered usable {from, first, s, activate, from^#, first^#, s^#, activate^#, sel^#} The order satisfies the following ordering constraints: [from(X)] = [1 0] X + [2] [0 1] [2] > [1 0] X + [1] [0 1] [1] = [cons(X, n__from(n__s(X)))] [from(X)] = [1 0] X + [2] [0 1] [2] > [1 0] X + [0] [0 1] [2] = [n__from(X)] [first(X1, X2)] = [1 0] X1 + [1 0] X2 + [2] [0 1] [0 1] [2] > [1 0] X1 + [1 0] X2 + [0] [0 1] [0 1] [2] = [n__first(X1, X2)] [first(0(), Z)] = [1 0] Z + [2] [0 1] [2] > [1] [1] = [nil()] [s(X)] = [1 0] X + [1] [0 1] [2] > [1 0] X + [0] [0 1] [2] = [n__s(X)] [activate(X)] = [1 2] X + [1] [0 2] [0] > [1 0] X + [0] [0 1] [0] = [X] [activate(n__from(X))] = [1 2] X + [5] [0 2] [4] > [1 2] X + [3] [0 2] [2] = [from(activate(X))] [activate(n__s(X))] = [1 2] X + [5] [0 2] [4] > [1 2] X + [2] [0 2] [2] = [s(activate(X))] [activate(n__first(X1, X2))] = [1 2] X1 + [1 2] X2 + [5] [0 2] [0 2] [4] > [1 2] X1 + [1 2] X2 + [4] [0 2] [0 2] [2] = [first(activate(X1), activate(X2))] [from^#(X)] = [1 0] X + [1] [0 0] [2] >= [1] [1] = [c_1()] [from^#(X)] = [1 0] X + [1] [0 0] [2] >= [1] [1] = [c_2()] [first^#(X1, X2)] = [1 0] X1 + [1 0] X2 + [2] [0 0] [0 0] [2] > [1] [1] = [c_3()] [first^#(0(), Z)] = [1 0] Z + [2] [0 0] [2] > [1] [1] = [c_4()] [s^#(X)] = [1 0] X + [1] [0 0] [2] >= [1] [1] = [c_5()] [activate^#(X)] = [1 2] X + [0] [0 0] [0] ? [1] [1] = [c_6()] [activate^#(n__from(X))] = [1 2] X + [4] [0 0] [0] ? [1 2] X + [4] [0 0] [4] = [c_7(from^#(activate(X)))] [activate^#(n__s(X))] = [1 2] X + [4] [0 0] [0] ? [1 2] X + [4] [0 0] [4] = [c_8(s^#(activate(X)))] [activate^#(n__first(X1, X2))] = [1 2] X1 + [1 2] X2 + [4] [0 0] [0 0] [0] ? [1 2] X1 + [1 2] X2 + [6] [0 0] [0 0] [4] = [c_9(first^#(activate(X1), activate(X2)))] [sel^#(0(), cons(X, Z))] = [2 2] X + [6] [2 2] [6] > [1] [1] = [c_10()] Further, it can be verified that all rules not oriented are covered by the weightgap condition. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Strict DPs: { from^#(X) -> c_1() , from^#(X) -> c_2() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) } Weak DPs: { first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , sel^#(0(), cons(X, Z)) -> c_10() } Weak Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) We estimate the number of application of {1,2,3,4,7} by applications of Pre({1,2,3,4,7}) = {5,6}. Here rules are labeled as follows: DPs: { 1: from^#(X) -> c_1() , 2: from^#(X) -> c_2() , 3: s^#(X) -> c_5() , 4: activate^#(X) -> c_6() , 5: activate^#(n__from(X)) -> c_7(from^#(activate(X))) , 6: activate^#(n__s(X)) -> c_8(s^#(activate(X))) , 7: activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , 8: first^#(X1, X2) -> c_3() , 9: first^#(0(), Z) -> c_4() , 10: sel^#(0(), cons(X, Z)) -> c_10() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Strict DPs: { activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) } Weak DPs: { from^#(X) -> c_1() , from^#(X) -> c_2() , first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , sel^#(0(), cons(X, Z)) -> c_10() } Weak Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) We estimate the number of application of {1,2} by applications of Pre({1,2}) = {}. Here rules are labeled as follows: DPs: { 1: activate^#(n__from(X)) -> c_7(from^#(activate(X))) , 2: activate^#(n__s(X)) -> c_8(s^#(activate(X))) , 3: from^#(X) -> c_1() , 4: from^#(X) -> c_2() , 5: first^#(X1, X2) -> c_3() , 6: first^#(0(), Z) -> c_4() , 7: s^#(X) -> c_5() , 8: activate^#(X) -> c_6() , 9: activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , 10: sel^#(0(), cons(X, Z)) -> c_10() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { from^#(X) -> c_1() , from^#(X) -> c_2() , first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , sel^#(0(), cons(X, Z)) -> c_10() } Weak Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { from^#(X) -> c_1() , from^#(X) -> c_2() , first^#(X1, X2) -> c_3() , first^#(0(), Z) -> c_4() , s^#(X) -> c_5() , activate^#(X) -> c_6() , activate^#(n__from(X)) -> c_7(from^#(activate(X))) , activate^#(n__s(X)) -> c_8(s^#(activate(X))) , activate^#(n__first(X1, X2)) -> c_9(first^#(activate(X1), activate(X2))) , sel^#(0(), cons(X, Z)) -> c_10() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { from(X) -> cons(X, n__from(n__s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(0(), Z) -> nil() , s(X) -> n__s(X) , activate(X) -> X , activate(n__from(X)) -> from(activate(X)) , activate(n__s(X)) -> s(activate(X)) , activate(n__first(X1, X2)) -> first(activate(X1), activate(X2)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^1))