We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) , sel(s(X), cons(Y, Z)) -> sel(X, activate(Z)) , sel(0(), cons(X, Z)) -> X } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We add the following weak dependency pairs: Strict DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , first^#(0(), Z) -> c_5() , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , first^#(0(), Z) -> c_5() , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Strict Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) , sel(s(X), cons(Y, Z)) -> sel(X, activate(Z)) , sel(0(), cons(X, Z)) -> X } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We replace rewrite rules by usable rules: Strict Usable Rules: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , first^#(0(), Z) -> c_5() , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Strict Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) The weightgap principle applies (using the following constant growth matrix-interpretation) The following argument positions are usable: Uargs(cons) = {2}, Uargs(first) = {2}, Uargs(n__first) = {2}, Uargs(activate) = {1}, Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(sel^#) = {2}, Uargs(c_9) = {1} TcT has computed the following constructor-restricted matrix interpretation. [from](x1) = [1] [1] [cons](x1, x2) = [1 2] x2 + [0] [0 1] [1] [n__from](x1) = [0] [0] [s](x1) = [1 1] x1 + [2] [0 1] [2] [first](x1, x2) = [1 2] x1 + [1 0] x2 + [1] [0 1] [0 0] [2] [0] = [0] [0] [nil] = [0] [0] [n__first](x1, x2) = [1 1] x1 + [1 0] x2 + [0] [0 1] [0 0] [2] [activate](x1) = [1 1] x1 + [2] [0 2] [1] [from^#](x1) = [0] [1] [c_1](x1, x2) = [0 0] x1 + [0 0] x2 + [0] [1 1] [1 1] [0] [c_2](x1) = [0] [0] [first^#](x1, x2) = [0] [0] [c_3](x1, x2) = [0] [0] [c_4](x1, x2, x3) = [1 0] x3 + [0] [0 1] [0] [activate^#](x1) = [0] [0] [c_5] = [0] [0] [c_6](x1) = [0] [0] [c_7](x1) = [1 0] x1 + [0] [0 1] [1] [c_8](x1) = [1 0] x1 + [0] [0 1] [0] [sel^#](x1, x2) = [2 1] x2 + [0] [0 0] [0] [c_9](x1) = [1 0] x1 + [0] [0 1] [0] [c_10](x1) = [0] [0] The order satisfies the following ordering constraints: [from(X)] = [1] [1] > [0] [1] = [cons(X, n__from(s(X)))] [from(X)] = [1] [1] > [0] [0] = [n__from(X)] [first(X1, X2)] = [1 2] X1 + [1 0] X2 + [1] [0 1] [0 0] [2] > [1 1] X1 + [1 0] X2 + [0] [0 1] [0 0] [2] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [1 3] X + [1 2] Z + [7] [0 1] [0 0] [4] > [1 3] X + [1 1] Z + [6] [0 1] [0 0] [3] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [1 0] Z + [1] [0 0] [2] > [0] [0] = [nil()] [activate(X)] = [1 1] X + [2] [0 2] [1] > [1 0] X + [0] [0 1] [0] = [X] [activate(n__from(X))] = [2] [1] > [1] [1] = [from(X)] [activate(n__first(X1, X2))] = [1 2] X1 + [1 0] X2 + [4] [0 2] [0 0] [5] > [1 2] X1 + [1 0] X2 + [1] [0 1] [0 0] [2] = [first(X1, X2)] [from^#(X)] = [0] [1] ? [0 0] X + [0] [2 2] [0] = [c_1(X, X)] [from^#(X)] = [0] [1] >= [0] [0] = [c_2(X)] [first^#(X1, X2)] = [0] [0] >= [0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [0] [0] >= [0] [0] = [c_4(Y, X, activate^#(Z))] [first^#(0(), Z)] = [0] [0] >= [0] [0] = [c_5()] [activate^#(X)] = [0] [0] >= [0] [0] = [c_6(X)] [activate^#(n__from(X))] = [0] [0] ? [0] [2] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [0] [0] >= [0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [2 5] Z + [1] [0 0] [0] ? [2 4] Z + [5] [0 0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [2 5] Z + [1] [0 0] [0] > [0] [0] = [c_10(X)] 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(n^4)). Strict DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , first^#(0(), Z) -> c_5() , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) } Weak DPs: { sel^#(0(), cons(X, Z)) -> c_10(X) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We decompose the input problem according to the dependency graph into the upper component { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } and lower component { first^#(0(), Z) -> c_5() } Further, following extension rules are added to the lower component. { from^#(X) -> X , first^#(X1, X2) -> X1 , first^#(X1, X2) -> X2 , first^#(s(X), cons(Y, Z)) -> X , first^#(s(X), cons(Y, Z)) -> Y , first^#(s(X), cons(Y, Z)) -> activate^#(Z) , activate^#(X) -> X , activate^#(n__from(X)) -> from^#(X) , activate^#(n__first(X1, X2)) -> first^#(X1, X2) , sel^#(s(X), cons(Y, Z)) -> sel^#(X, activate(Z)) , sel^#(0(), cons(X, Z)) -> X } TcT solves the upper component with certificate YES(O(1),O(n^4)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [1 0 1 1] [0] [from](x1) = [0 1 0 0] x1 + [1] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 1] [0] [cons](x1, x2) = [0 1 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 1] [0] [n__from](x1) = [0 1 0 0] x1 + [1] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 1] [0] [s](x1) = [0 1 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 1] [1 1 1 1] [0] [first](x1, x2) = [0 1 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [0] = [0] [0] [0] [0] [nil] = [0] [0] [0] [1 0 1 1] [1 1 1 1] [0] [n__first](x1, x2) = [0 1 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0] [activate](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [1] [from^#](x1) = [0] [0] [0] [0] [c_1](x1, x2) = [0] [0] [0] [0] [c_2](x1) = [0] [0] [0] [1 1 0 0] [0] [first^#](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_3](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_4](x1, x2, x3) = [0 0 0 0] x3 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 0 0] [0] [activate^#](x1) = [1 0 0 0] x1 + [0] [1 0 0 0] [0] [1 0 0 0] [0] [1 0 0 0] [0] [c_6](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_7](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_8](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0 0 0 0] [0] [sel^#](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 1 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0] [c_9](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_10](x1) = [0] [0] [0] The order satisfies the following ordering constraints: [from(X)] = [1 0 1 1] [0] [0 1 0 0] X + [1] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 0 1 1] [0] [0 1 0 0] X + [1] [0 0 0 0] [0] [0 0 0 0] [0] = [cons(X, n__from(s(X)))] [from(X)] = [1 0 1 1] [0] [0 1 0 0] X + [1] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 0 1 1] [0] [0 1 0 0] X + [1] [0 0 0 0] [0] [0 0 0 0] [0] = [n__from(X)] [first(X1, X2)] = [1 0 1 1] [1 1 1 1] [0] [0 1 0 0] X1 + [0 0 0 0] X2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 0 1 1] [1 1 1 1] [0] [0 1 0 0] X1 + [0 0 0 0] X2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [1 0 1 1] [1 1 1 1] [0] [0 1 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 0 1 1] [1 1 1 1] [0] [0 1 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [1 1 1 1] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [nil()] [activate(X)] = [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [X] [activate(n__from(X))] = [1 0 1 1] [0] [0 1 0 0] X + [1] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 0 1 1] [0] [0 1 0 0] X + [1] [0 0 0 0] [0] [0 0 0 0] [0] = [from(X)] [activate(n__first(X1, X2))] = [1 0 1 1] [1 1 1 1] [0] [0 1 0 0] X1 + [0 0 0 0] X2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 0 1 1] [1 1 1 1] [0] [0 1 0 0] X1 + [0 0 0 0] X2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [first(X1, X2)] [from^#(X)] = [1] [0] [0] [0] > [0] [0] [0] [0] = [c_1(X, X)] [from^#(X)] = [1] [0] [0] [0] > [0] [0] [0] [0] = [c_2(X)] [first^#(X1, X2)] = [1 1 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 0 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [1 1 1 1] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 1 0 0] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_4(Y, X, activate^#(Z))] [activate^#(X)] = [1 1 0 0] [0] [1 0 0 0] X + [0] [1 0 0 0] [0] [1 0 0 0] [0] >= [1 0 0 0] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_6(X)] [activate^#(n__from(X))] = [1 1 1 1] [1] [1 0 1 1] X + [0] [1 0 1 1] [0] [1 0 1 1] [0] >= [1] [0] [0] [0] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [1 1 1 1] [1 1 1 1] [0] [1 0 1 1] X1 + [1 1 1 1] X2 + [0] [1 0 1 1] [1 1 1 1] [0] [1 0 1 1] [1 1 1 1] [0] >= [1 1 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [1 0 1 1] [0 0 0 0] [0] [0 0 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 1 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 0 0 0] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [0 0 0 0] [0] [0 0 0 0] Z + [0] [0 1 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_10(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. DPs: { first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [1 0 0 0] [1] [from](x1) = [1 1 1 1] x1 + [1] [0 0 0 0] [1] [0 0 0 0] [1] [1 1 0 0] [0] [cons](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 1 1] [0] [n__from](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 1 1] [0] [s](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0 0 0 0] [0] [first](x1, x2) = [1 0 0 0] x2 + [0] [1 0 0 0] [0] [0 0 0 0] [0] [0] [0] = [0] [0] [0] [0] [nil] = [0] [0] [0] [1 0 1 1] [1 1 1 0] [0] [n__first](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [activate](x1) = [0] [0] [0] [0] [from^#](x1) = [0] [0] [0] [0] [c_1](x1, x2) = [0] [0] [0] [0] [c_2](x1) = [0] [0] [0] [1 0 0 0] [1] [first^#](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_3](x1, x2) = [0] [0] [0] [1 0 0 0] [0] [c_4](x1, x2, x3) = [0 0 0 0] x3 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 0 0] [0] [activate^#](x1) = [1 0 0 0] x1 + [0] [1 0 0 0] [0] [1 0 0 0] [0] [0] [c_6](x1) = [0] [0] [0] [1 0 0 0] [0] [c_7](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_8](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [sel^#](x1, x2) = [0] [0] [0] [1 0 0 0] [0] [c_9](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_10](x1) = [0] [0] [0] The order satisfies the following ordering constraints: [from(X)] = [1 0 0 0] [1] [1 1 1 1] X + [1] [0 0 0 0] [1] [0 0 0 0] [1] ? [1 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [cons(X, n__from(s(X)))] [from(X)] = [1 0 0 0] [1] [1 1 1 1] X + [1] [0 0 0 0] [1] [0 0 0 0] [1] ? [1 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [n__from(X)] [first(X1, X2)] = [0 0 0 0] [0] [1 0 0 0] X2 + [0] [1 0 0 0] [0] [0 0 0 0] [0] ? [1 0 1 1] [1 1 1 0] [0] [0 0 0 0] X1 + [0 0 0 0] X2 + [1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [0 0 0 0] [0] [1 1 0 0] Z + [0] [1 1 0 0] [0] [0 0 0 0] [0] ? [1 0 1 1] [1] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [0 0 0 0] [0] [1 0 0 0] Z + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [nil()] [activate(X)] = [0] [0] [0] [0] ? [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [X] [activate(n__from(X))] = [0] [0] [0] [0] ? [1 0 0 0] [1] [1 1 1 1] X + [1] [0 0 0 0] [1] [0 0 0 0] [1] = [from(X)] [activate(n__first(X1, X2))] = [0] [0] [0] [0] ? [0 0 0 0] [0] [1 0 0 0] X2 + [0] [1 0 0 0] [0] [0 0 0 0] [0] = [first(X1, X2)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_1(X, X)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_2(X)] [first^#(X1, X2)] = [1 0 0 0] [1] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] > [0] [0] [0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [1 1 0 0] [1] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] > [1 1 0 0] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_4(Y, X, activate^#(Z))] [activate^#(X)] = [1 1 0 0] [0] [1 0 0 0] X + [0] [1 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [c_6(X)] [activate^#(n__from(X))] = [1 1 1 1] [0] [1 1 1 1] X + [0] [1 1 1 1] [0] [1 1 1 1] [0] >= [0] [0] [0] [0] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [1 0 1 1] [1 1 1 0] [1] [1 0 1 1] X1 + [1 1 1 0] X2 + [0] [1 0 1 1] [1 1 1 0] [0] [1 0 1 1] [1 1 1 0] [0] >= [1 0 0 0] [1] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_10(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. DPs: { activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [0 1 1 1] [0] [from](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 0 1] [0] [cons](x1, x2) = [0 1 0 1] x2 + [0] [0 0 1 0] [0] [0 0 0 0] [0] [0 1 1 1] [0] [n__from](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 0 1] [0] [s](x1) = [0 1 0 1] x1 + [0] [0 0 1 0] [0] [0 0 0 0] [0] [1 1 1 1] [0 1 1 1] [0] [first](x1, x2) = [0 0 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [0] = [0] [0] [0] [0] [nil] = [0] [0] [0] [1 1 1 1] [0 0 1 1] [0] [n__first](x1, x2) = [0 0 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [1 1 0 0] [0] [activate](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [from^#](x1) = [0] [0] [0] [0] [c_1](x1, x2) = [0] [0] [0] [0] [c_2](x1) = [0] [0] [0] [1 0 1 0] [1] [first^#](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_3](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_4](x1, x2, x3) = [0 0 0 0] x3 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 0] [1] [activate^#](x1) = [1 0 0 0] x1 + [0] [1 0 0 0] [0] [1 0 0 0] [0] [0] [c_6](x1) = [0] [0] [0] [1 0 0 0] [0] [c_7](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_8](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 0] [0 1 0 0] [0] [sel^#](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0] [c_9](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_10](x1) = [0] [0] [0] The order satisfies the following ordering constraints: [from(X)] = [0 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [cons(X, n__from(s(X)))] [from(X)] = [0 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [n__from(X)] [first(X1, X2)] = [1 1 1 1] [0 1 1 1] [0] [0 0 0 0] X1 + [0 1 0 0] X2 + [0] [0 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 1 1 1] [0 0 1 1] [0] [0 0 0 0] X1 + [0 1 0 0] X2 + [0] [0 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [1 2 1 2] [0 1 1 1] [0] [0 0 0 0] X + [0 1 0 1] Z + [0] [0 0 0 0] [1 1 0 1] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 1 1 1] [0 1 1 1] [0] [0 0 0 0] X + [0 1 0 0] Z + [0] [0 0 0 0] [1 1 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [0 1 1 1] [0] [0 1 0 0] Z + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [nil()] [activate(X)] = [1 1 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [X] [activate(n__from(X))] = [0 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0 1 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [from(X)] [activate(n__first(X1, X2))] = [1 1 1 1] [0 1 1 1] [0] [0 0 0 0] X1 + [0 1 0 0] X2 + [0] [0 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 1 1 1] [0 1 1 1] [0] [0 0 0 0] X1 + [0 1 0 0] X2 + [0] [0 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [first(X1, X2)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_1(X, X)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_2(X)] [first^#(X1, X2)] = [1 0 1 0] [1] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] > [1 0 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [1 1 1 1] [1] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 0 1 0] [1] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_4(Y, X, activate^#(Z))] [activate^#(X)] = [1 0 1 0] [1] [1 0 0 0] X + [0] [1 0 0 0] [0] [1 0 0 0] [0] > [0] [0] [0] [0] = [c_6(X)] [activate^#(n__from(X))] = [0 1 1 1] [1] [0 1 1 1] X + [0] [0 1 1 1] [0] [0 1 1 1] [0] > [0] [0] [0] [0] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [1 1 1 1] [1 0 1 1] [1] [1 1 1 1] X1 + [0 0 1 1] X2 + [0] [1 1 1 1] [0 0 1 1] [0] [1 1 1 1] [0 0 1 1] [0] >= [1 0 1 0] [1] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [1 1 1 1] [0 1 0 1] [0] [0 0 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 0 1 0] [0 1 0 0] [0] [0 0 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [0 1 0 1] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_10(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. DPs: { activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [1] [from](x1) = [1 1 1 1] x1 + [1] [0 0 0 0] [1] [1 0 0 0] [1] [1 1 0 0] [1 1 0 0] [0] [cons](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [1 0 1 1] [0] [n__from](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 1 0] [0] [s](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] [first](x1, x2) = [1 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [0] = [0] [0] [0] [0] [nil] = [0] [0] [0] [1 1 1 1] [1 0 1 1] [0] [n__first](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [activate](x1) = [0] [0] [0] [0] [from^#](x1) = [0] [0] [0] [0] [c_1](x1, x2) = [0] [0] [0] [0] [c_2](x1) = [0] [0] [0] [1 0 0 0] [0] [first^#](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_3](x1, x2) = [0] [0] [0] [1 0 0 0] [0] [c_4](x1, x2, x3) = [0 0 0 0] x3 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 0 0] [0] [activate^#](x1) = [1 0 0 0] x1 + [0] [1 0 0 0] [0] [0 0 0 0] [0] [0] [c_6](x1) = [0] [0] [0] [1 0 0 0] [0] [c_7](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_8](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [sel^#](x1, x2) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_9](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_10](x1) = [0] [0] [0] The order satisfies the following ordering constraints: [from(X)] = [0 0 0 0] [1] [1 1 1 1] X + [1] [0 0 0 0] [1] [1 0 0 0] [1] ? [2 2 1 0] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [cons(X, n__from(s(X)))] [from(X)] = [0 0 0 0] [1] [1 1 1 1] X + [1] [0 0 0 0] [1] [1 0 0 0] [1] ? [1 0 1 1] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [n__from(X)] [first(X1, X2)] = [0 0 0 0] [1 0 0 0] [0] [1 0 0 0] X1 + [0 0 0 0] X2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] ? [1 1 1 1] [1 0 1 1] [0] [0 0 0 0] X1 + [0 0 0 0] X2 + [1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [0 0 0 0] [1 1 0 0] [1 1 0 0] [0] [1 1 1 0] X + [0 0 0 0] Z + [0 0 0 0] Y + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] ? [1 1 1 1] [1 1 0 0] [1] [0 0 0 0] X + [0 0 0 0] Y + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [1 0 0 0] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [nil()] [activate(X)] = [0] [0] [0] [0] ? [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [X] [activate(n__from(X))] = [0] [0] [0] [0] ? [0 0 0 0] [1] [1 1 1 1] X + [1] [0 0 0 0] [1] [1 0 0 0] [1] = [from(X)] [activate(n__first(X1, X2))] = [0] [0] [0] [0] ? [0 0 0 0] [1 0 0 0] [0] [1 0 0 0] X1 + [0 0 0 0] X2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [first(X1, X2)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_1(X, X)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_2(X)] [first^#(X1, X2)] = [1 0 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [1 1 0 0] [1 1 0 0] [0] [0 0 0 0] Z + [0 0 0 0] Y + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [1 1 0 0] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_4(Y, X, activate^#(Z))] [activate^#(X)] = [1 1 0 0] [0] [1 0 0 0] X + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_6(X)] [activate^#(n__from(X))] = [1 0 1 1] [0] [1 0 1 1] X + [0] [1 0 1 1] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [1 1 1 1] [1 0 1 1] [1] [1 1 1 1] X1 + [1 0 1 1] X2 + [0] [1 1 1 1] [1 0 1 1] [0] [0 0 0 0] [0 0 0 0] [0] > [1 0 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [1 1 1 0] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [1 0 0 0] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_10(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. DPs: { sel^#(0(), cons(X, Z)) -> c_10(X) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [0 1 1 1] [1] [from](x1) = [1 0 0 1] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0 1 1 1] [0] [cons](x1, x2) = [1 0 0 0] x2 + [0] [0 0 0 0] [0] [0 0 0 1] [0] [0 1 1 1] [0] [n__from](x1) = [1 0 0 1] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0 1 1 0] [0] [s](x1) = [0 0 0 0] x1 + [0] [1 0 0 0] [0] [0 0 0 1] [0] [1 0 0 1] [1 1 1 1] [1] [first](x1, x2) = [0 0 1 0] x1 + [1 0 1 0] x2 + [0] [0 1 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] [0] [0] = [1] [0] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [0 1 0 1] [0] [n__first](x1, x2) = [0 0 1 0] x1 + [1 0 1 0] x2 + [0] [0 1 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 1 0 1] [1] [activate](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [from^#](x1) = [0] [0] [0] [0] [c_1](x1, x2) = [0] [0] [0] [0] [c_2](x1) = [0] [0] [0] [0 1 0 0] [0] [first^#](x1, x2) = [0 0 0 0] x2 + [0] [1 0 0 0] [0] [0 0 0 0] [0] [0] [c_3](x1, x2) = [0] [0] [0] [1 0 0 0] [0] [c_4](x1, x2, x3) = [0 0 0 0] x3 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [activate^#](x1) = [1 0 0 0] x1 + [0] [1 0 0 0] [0] [1 0 0 0] [0] [0] [c_6](x1) = [0] [0] [0] [1 0 0 0] [0] [c_7](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_8](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 1 1 0] [0 0 0 0] [0] [sel^#](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 1 0 0] [1] [1 0 0 0] [0] [c_9](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_10](x1) = [0] [0] [0] The order satisfies the following ordering constraints: [from(X)] = [0 1 1 1] [1] [1 0 0 1] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] > [0 1 1 1] [0] [1 0 0 1] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [cons(X, n__from(s(X)))] [from(X)] = [0 1 1 1] [1] [1 0 0 1] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] > [0 1 1 1] [0] [1 0 0 1] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [n__from(X)] [first(X1, X2)] = [1 0 0 1] [1 1 1 1] [1] [0 0 1 0] X1 + [1 0 1 0] X2 + [0] [0 1 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] > [1 0 0 0] [0 1 0 1] [0] [0 0 1 0] X1 + [1 0 1 0] X2 + [0] [0 1 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [0 1 1 1] [1 1 1 2] [1] [1 0 0 0] X + [0 1 1 1] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [0 1 1 1] [1 1 1 2] [1] [1 0 0 0] X + [0 1 0 1] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [1 1 1 1] [1] [1 0 1 0] Z + [0] [0 0 0 0] [1] [0 0 0 1] [0] > [0] [0] [0] [0] = [nil()] [activate(X)] = [1 1 0 1] [1] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] > [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [X] [activate(n__from(X))] = [1 1 1 2] [1] [1 0 0 1] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] >= [0 1 1 1] [1] [1 0 0 1] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [from(X)] [activate(n__first(X1, X2))] = [1 0 1 1] [1 1 1 2] [1] [0 0 1 0] X1 + [1 0 1 0] X2 + [0] [0 1 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 1] [1 1 1 1] [1] [0 0 1 0] X1 + [1 0 1 0] X2 + [0] [0 1 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0] = [first(X1, X2)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_1(X, X)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_2(X)] [first^#(X1, X2)] = [0 1 0 0] [0] [0 0 0 0] X2 + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [1 0 0 0] [0] [0 0 0 0] Z + [0] [0 1 1 1] [0] [0 0 0 0] [0] >= [1 0 0 0] [0] [0 0 0 0] Z + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_4(Y, X, activate^#(Z))] [activate^#(X)] = [1 0 0 0] [0] [1 0 0 0] X + [0] [1 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [c_6(X)] [activate^#(n__from(X))] = [0 1 1 1] [0] [0 1 1 1] X + [0] [0 1 1 1] [0] [0 1 1 1] [0] >= [0] [0] [0] [0] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [1 0 0 0] [0 1 0 1] [0] [1 0 0 0] X1 + [0 1 0 1] X2 + [0] [1 0 0 0] [0 1 0 1] [0] [1 0 0 0] [0 1 0 1] [0] >= [0 1 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [1 1 1 0] [0 0 0 0] [0] [0 0 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [1] >= [1 1 1 0] [0] [0 0 0 0] X + [0] [0 0 0 0] [0] [0 0 0 0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [0 0 0 0] [1] [0 0 0 0] Z + [0] [0 0 0 0] [0] [1 0 0 0] [1] > [0] [0] [0] [0] = [c_10(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^4)). Strict DPs: { sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) } Weak DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(n^4)) We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. DPs: { sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(c_4) = {3}, Uargs(c_7) = {1}, Uargs(c_8) = {1}, Uargs(c_9) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [1] [from](x1) = [1] [1] [1] [1 0 0 1] [1] [cons](x1, x2) = [0 1 0 0] x2 + [0] [1 1 1 0] [0] [0 1 0 1] [0] [0] [n__from](x1) = [1] [0] [0] [1 0 0 1] [1] [s](x1) = [0 1 0 0] x1 + [0] [1 1 1 1] [1] [0 1 0 0] [0] [0 1 0 0] [1] [first](x1, x2) = [1 0 0 0] x1 + [1] [1 0 0 1] [1] [0 0 0 0] [1] [0] [0] = [0] [1] [0] [0] [nil] = [0] [0] [0] [0 1 0 0] [0] [n__first](x1, x2) = [0 0 0 0] x1 + [1] [1 0 0 1] [0] [0 0 0 0] [0] [1 1 0 0] [0] [activate](x1) = [1 1 1 0] x1 + [1] [0 0 1 1] [1] [0 0 0 1] [1] [0] [from^#](x1) = [0] [0] [0] [0] [c_1](x1, x2) = [0] [0] [0] [0] [c_2](x1) = [0] [0] [0] [0 0 0 0] [0] [first^#](x1, x2) = [0 0 0 0] x2 + [0] [0 0 0 1] [0] [0 0 0 0] [0] [0] [c_3](x1, x2) = [0] [0] [0] [1 0 0 0] [0] [c_4](x1, x2, x3) = [0 0 0 0] x3 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0 0 0 0] [0] [activate^#](x1) = [1 0 0 1] x1 + [0] [1 1 1 0] [0] [1 0 1 0] [0] [0] [c_6](x1) = [0] [0] [0] [1 0 0 0] [0] [c_7](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [0] [c_8](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [1 0 1 0] [1 0 1 1] [0] [sel^#](x1, x2) = [0 0 0 0] x1 + [1 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [1 1 0 1] [0] [c_9](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [0 0 0 0] [0] [0] [c_10](x1) = [0] [0] [0] The order satisfies the following ordering constraints: [from(X)] = [1] [1] [1] [1] >= [1] [1] [1] [1] = [cons(X, n__from(s(X)))] [from(X)] = [1] [1] [1] [1] > [0] [1] [0] [0] = [n__from(X)] [first(X1, X2)] = [0 1 0 0] [1] [1 0 0 0] X1 + [1] [1 0 0 1] [1] [0 0 0 0] [1] > [0 1 0 0] [0] [0 0 0 0] X1 + [1] [1 0 0 1] [0] [0 0 0 0] [0] = [n__first(X1, X2)] [first(s(X), cons(Y, Z))] = [0 1 0 0] [1] [1 0 0 1] X + [2] [1 1 0 1] [2] [0 0 0 0] [1] >= [0 1 0 0] [1] [0 0 0 0] X + [1] [1 1 0 1] [1] [0 0 0 0] [1] = [cons(Y, n__first(X, activate(Z)))] [first(0(), Z)] = [1] [1] [1] [1] > [0] [0] [0] [0] = [nil()] [activate(X)] = [1 1 0 0] [0] [1 1 1 0] X + [1] [0 0 1 1] [1] [0 0 0 1] [1] >= [1 0 0 0] [0] [0 1 0 0] X + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [X] [activate(n__from(X))] = [1] [2] [1] [1] >= [1] [1] [1] [1] = [from(X)] [activate(n__first(X1, X2))] = [0 1 0 0] [1] [1 1 0 1] X1 + [2] [1 0 0 1] [1] [0 0 0 0] [1] >= [0 1 0 0] [1] [1 0 0 0] X1 + [1] [1 0 0 1] [1] [0 0 0 0] [1] = [first(X1, X2)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_1(X, X)] [from^#(X)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [c_2(X)] [first^#(X1, X2)] = [0 0 0 0] [0] [0 0 0 0] X2 + [0] [0 0 0 1] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_3(X1, X2)] [first^#(s(X), cons(Y, Z))] = [0 0 0 0] [0] [0 0 0 0] Z + [0] [0 1 0 1] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [c_4(Y, X, activate^#(Z))] [activate^#(X)] = [0 0 0 0] [0] [1 0 0 1] X + [0] [1 1 1 0] [0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [c_6(X)] [activate^#(n__from(X))] = [0] [0] [1] [0] >= [0] [0] [0] [0] = [c_7(from^#(X))] [activate^#(n__first(X1, X2))] = [0 0 0 0] [0] [0 1 0 0] X1 + [0] [1 1 0 1] [1] [1 1 0 1] [0] >= [0] [0] [0] [0] = [c_8(first^#(X1, X2))] [sel^#(s(X), cons(Y, Z))] = [2 1 1 2] [2 2 1 2] [3] [0 0 0 0] X + [1 0 0 1] Z + [1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] > [1 0 1 0] [2 2 1 2] [2] [0 0 0 0] X + [0 0 0 0] Z + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] = [c_9(sel^#(X, activate(Z)))] [sel^#(0(), cons(X, Z))] = [2 2 1 2] [2] [1 0 0 1] Z + [1] [0 0 0 0] [0] [0 0 0 0] [0] > [0] [0] [0] [0] = [c_10(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { from^#(X) -> c_1(X, X) , from^#(X) -> c_2(X) , first^#(X1, X2) -> c_3(X1, X2) , first^#(s(X), cons(Y, Z)) -> c_4(Y, X, activate^#(Z)) , activate^#(X) -> c_6(X) , activate^#(n__from(X)) -> c_7(from^#(X)) , activate^#(n__first(X1, X2)) -> c_8(first^#(X1, X2)) , sel^#(s(X), cons(Y, Z)) -> c_9(sel^#(X, activate(Z))) , sel^#(0(), cons(X, Z)) -> c_10(X) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Strict DPs: { first^#(0(), Z) -> c_5() } Weak DPs: { from^#(X) -> X , first^#(X1, X2) -> X1 , first^#(X1, X2) -> X2 , first^#(s(X), cons(Y, Z)) -> X , first^#(s(X), cons(Y, Z)) -> Y , first^#(s(X), cons(Y, Z)) -> activate^#(Z) , activate^#(X) -> X , activate^#(n__from(X)) -> from^#(X) , activate^#(n__first(X1, X2)) -> first^#(X1, X2) , sel^#(s(X), cons(Y, Z)) -> sel^#(X, activate(Z)) , sel^#(0(), cons(X, Z)) -> X } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: 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) -> X , first^#(X1, X2) -> X1 , first^#(X1, X2) -> X2 , first^#(s(X), cons(Y, Z)) -> X , first^#(s(X), cons(Y, Z)) -> Y , activate^#(X) -> X , activate^#(n__from(X)) -> from^#(X) , sel^#(s(X), cons(Y, Z)) -> sel^#(X, activate(Z)) , sel^#(0(), cons(X, Z)) -> X } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Strict DPs: { first^#(0(), Z) -> c_5() } Weak DPs: { first^#(s(X), cons(Y, Z)) -> activate^#(Z) , activate^#(n__first(X1, X2)) -> first^#(X1, X2) } Weak Trs: { from(X) -> cons(X, n__from(s(X))) , from(X) -> n__from(X) , first(X1, X2) -> n__first(X1, X2) , first(s(X), cons(Y, Z)) -> cons(Y, n__first(X, activate(Z))) , first(0(), Z) -> nil() , activate(X) -> X , activate(n__from(X)) -> from(X) , activate(n__first(X1, X2)) -> first(X1, X2) } Obligation: 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)). Strict DPs: { first^#(0(), Z) -> c_5() } Weak DPs: { first^#(s(X), cons(Y, Z)) -> activate^#(Z) , activate^#(n__first(X1, X2)) -> first^#(X1, X2) } Obligation: runtime complexity Answer: YES(O(1),O(1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: first^#(0(), Z) -> c_5() } Sub-proof: ---------- The following argument positions are usable: none TcT has computed the following constructor-restricted matrix interpretation. Note that the diagonal of the component-wise maxima of interpretation-entries (of constructors) contains no more than 0 non-zero entries. [from](x1) = [0] [cons](x1, x2) = [0] [n__from](x1) = [0] [s](x1) = [0] [first](x1, x2) = [0] [0] = [0] [nil] = [0] [n__first](x1, x2) = [0] [activate](x1) = [0] [from^#](x1) = [0] [first^#](x1, x2) = [1] [activate^#](x1) = [1] [c_5] = [0] [sel^#](x1, x2) = [0] The order satisfies the following ordering constraints: [first^#(s(X), cons(Y, Z))] = [1] >= [1] = [activate^#(Z)] [first^#(0(), Z)] = [1] > [0] = [c_5()] [activate^#(n__first(X1, X2))] = [1] >= [1] = [first^#(X1, X2)] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { first^#(s(X), cons(Y, Z)) -> activate^#(Z) , first^#(0(), Z) -> c_5() , activate^#(n__first(X1, X2)) -> first^#(X1, X2) } Obligation: 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. { first^#(s(X), cons(Y, Z)) -> activate^#(Z) , first^#(0(), Z) -> c_5() , activate^#(n__first(X1, X2)) -> first^#(X1, X2) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^4))