YES(O(1),O(n^2)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__first](x1, x2) = [1] x1 + [1] x2 + [1] [0] = [0] [nil] = [6] [s](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [first](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [7] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1] X1 + [1] X2 + [1] > [1] X1 + [1] X2 + [0] = [first(X1, X2)] [a__first(0(), X)] = [1] X + [1] ? [6] = [nil()] [a__first(s(X), cons(Y, Z))] = [1] X + [1] Y + [1] > [0] = [cons(mark(Y), first(X, Z))] [mark(0())] = [0] >= [0] = [0()] [mark(nil())] = [0] ? [6] = [nil()] [mark(s(X))] = [0] >= [0] = [s(mark(X))] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [0] ? [1] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [a__from(X)] = [1] X + [0] >= [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [0] ? [1] X + [7] = [from(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^2)). Strict Trs: { a__first(0(), X) -> nil() , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) } Weak Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__first](x1, x2) = [1] x1 + [1] x2 + [0] [0] = [4] [nil] = [3] [s](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [first](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [7] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [first(X1, X2)] [a__first(0(), X)] = [1] X + [4] > [3] = [nil()] [a__first(s(X), cons(Y, Z))] = [1] X + [1] Y + [0] >= [0] = [cons(mark(Y), first(X, Z))] [mark(0())] = [0] ? [4] = [0()] [mark(nil())] = [0] ? [3] = [nil()] [mark(s(X))] = [0] >= [0] = [s(mark(X))] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [0] >= [0] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [a__from(X)] = [1] X + [0] >= [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [0] ? [1] X + [7] = [from(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^2)). Strict Trs: { mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) } Weak Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__first](x1, x2) = [1] x1 + [1] x2 + [0] [0] = [4] [nil] = [3] [s](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] x1 + [0] [first](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [4] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [first(X1, X2)] [a__first(0(), X)] = [1] X + [4] > [3] = [nil()] [a__first(s(X), cons(Y, Z))] = [1] X + [1] Y + [0] >= [1] Y + [0] = [cons(mark(Y), first(X, Z))] [mark(0())] = [4] >= [4] = [0()] [mark(nil())] = [3] >= [3] = [nil()] [mark(s(X))] = [1] X + [0] >= [1] X + [0] = [s(mark(X))] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [4] > [1] X + [0] = [a__from(mark(X))] [a__from(X)] = [1] X + [0] >= [1] X + [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [0] ? [1] X + [4] = [from(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^2)). Strict Trs: { mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) } Weak Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) , mark(from(X)) -> a__from(mark(X)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__first](x1, x2) = [1] x1 + [1] x2 + [0] [0] = [4] [nil] = [3] [s](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] x1 + [0] [first](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [1] [from](x1) = [1] x1 + [4] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [first(X1, X2)] [a__first(0(), X)] = [1] X + [4] > [3] = [nil()] [a__first(s(X), cons(Y, Z))] = [1] X + [1] Y + [0] >= [1] Y + [0] = [cons(mark(Y), first(X, Z))] [mark(0())] = [4] >= [4] = [0()] [mark(nil())] = [3] >= [3] = [nil()] [mark(s(X))] = [1] X + [0] >= [1] X + [0] = [s(mark(X))] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [4] > [1] X + [1] = [a__from(mark(X))] [a__from(X)] = [1] X + [1] > [1] X + [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [1] ? [1] X + [4] = [from(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^2)). Strict Trs: { mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , a__from(X) -> from(X) } Weak Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The weightgap principle applies (using the following nonconstant growth matrix-interpretation) The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__first](x1, x2) = [1] x1 + [1] x2 + [4] [0] = [0] [nil] = [2] [s](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] x1 + [1] [first](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [2] [from](x1) = [1] x1 + [7] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1] X1 + [1] X2 + [4] > [1] X1 + [1] X2 + [0] = [first(X1, X2)] [a__first(0(), X)] = [1] X + [4] > [2] = [nil()] [a__first(s(X), cons(Y, Z))] = [1] X + [1] Y + [4] > [1] Y + [1] = [cons(mark(Y), first(X, Z))] [mark(0())] = [1] > [0] = [0()] [mark(nil())] = [3] > [2] = [nil()] [mark(s(X))] = [1] X + [1] >= [1] X + [1] = [s(mark(X))] [mark(cons(X1, X2))] = [1] X1 + [1] >= [1] X1 + [1] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [1] X1 + [1] X2 + [1] ? [1] X1 + [1] X2 + [6] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [8] > [1] X + [3] = [a__from(mark(X))] [a__from(X)] = [1] X + [2] > [1] X + [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [2] ? [1] X + [7] = [from(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^2)). Strict Trs: { mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , a__from(X) -> from(X) } Weak Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 2' to orient following rules strictly. Trs: { mark(s(X)) -> s(mark(X)) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__first](x1, x2) = [1 0] x1 + [1 4] x2 + [4] [0 1] [0 1] [4] [0] = [0] [0] [nil] = [0] [0] [s](x1) = [1 0] x1 + [0] [0 1] [4] [cons](x1, x2) = [1 5] x1 + [0] [0 1] [0] [mark](x1) = [1 1] x1 + [0] [0 1] [0] [first](x1, x2) = [1 0] x1 + [1 4] x2 + [4] [0 1] [0 1] [4] [a__from](x1) = [1 6] x1 + [0] [0 1] [0] [from](x1) = [1 6] x1 + [0] [0 1] [0] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1 0] X1 + [1 4] X2 + [4] [0 1] [0 1] [4] >= [1 0] X1 + [1 4] X2 + [4] [0 1] [0 1] [4] = [first(X1, X2)] [a__first(0(), X)] = [1 4] X + [4] [0 1] [4] > [0] [0] = [nil()] [a__first(s(X), cons(Y, Z))] = [1 0] X + [1 9] Y + [4] [0 1] [0 1] [8] > [1 6] Y + [0] [0 1] [0] = [cons(mark(Y), first(X, Z))] [mark(0())] = [0] [0] >= [0] [0] = [0()] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(s(X))] = [1 1] X + [4] [0 1] [4] > [1 1] X + [0] [0 1] [4] = [s(mark(X))] [mark(cons(X1, X2))] = [1 6] X1 + [0] [0 1] [0] >= [1 6] X1 + [0] [0 1] [0] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [1 1] X1 + [1 5] X2 + [8] [0 1] [0 1] [4] > [1 1] X1 + [1 5] X2 + [4] [0 1] [0 1] [4] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [1 7] X + [0] [0 1] [0] >= [1 7] X + [0] [0 1] [0] = [a__from(mark(X))] [a__from(X)] = [1 6] X + [0] [0 1] [0] >= [1 6] X + [0] [0 1] [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 6] X + [0] [0 1] [0] >= [1 6] X + [0] [0 1] [0] = [from(X)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { mark(cons(X1, X2)) -> cons(mark(X1), X2) , a__from(X) -> from(X) } Weak Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 2' to orient following rules strictly. Trs: { mark(cons(X1, X2)) -> cons(mark(X1), X2) , a__from(X) -> from(X) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(a__first) = {1, 2}, Uargs(s) = {1}, Uargs(cons) = {1}, Uargs(a__from) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__first](x1, x2) = [1 0] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [0] = [0] [0] [nil] = [0] [0] [s](x1) = [1 0] x1 + [0] [0 1] [2] [cons](x1, x2) = [1 0] x1 + [4] [0 1] [2] [mark](x1) = [1 2] x1 + [0] [0 1] [0] [first](x1, x2) = [1 0] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [a__from](x1) = [1 2] x1 + [7] [0 1] [4] [from](x1) = [1 2] x1 + [0] [0 1] [4] The following symbols are considered usable {a__first, mark, a__from} The order satisfies the following ordering constraints: [a__first(X1, X2)] = [1 0] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] >= [1 0] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] = [first(X1, X2)] [a__first(0(), X)] = [1 4] X + [0] [0 1] [0] >= [0] [0] = [nil()] [a__first(s(X), cons(Y, Z))] = [1 0] X + [1 4] Y + [12] [0 1] [0 1] [4] > [1 2] Y + [4] [0 1] [2] = [cons(mark(Y), first(X, Z))] [mark(0())] = [0] [0] >= [0] [0] = [0()] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(s(X))] = [1 2] X + [4] [0 1] [2] > [1 2] X + [0] [0 1] [2] = [s(mark(X))] [mark(cons(X1, X2))] = [1 2] X1 + [8] [0 1] [2] > [1 2] X1 + [4] [0 1] [2] = [cons(mark(X1), X2)] [mark(first(X1, X2))] = [1 2] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] >= [1 2] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] = [a__first(mark(X1), mark(X2))] [mark(from(X))] = [1 4] X + [8] [0 1] [4] > [1 4] X + [7] [0 1] [4] = [a__from(mark(X))] [a__from(X)] = [1 2] X + [7] [0 1] [4] > [1 2] X + [4] [0 1] [2] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 2] X + [7] [0 1] [4] > [1 2] X + [0] [0 1] [4] = [from(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 Trs: { a__first(X1, X2) -> first(X1, X2) , a__first(0(), X) -> nil() , a__first(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(mark(X)) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(first(X1, X2)) -> a__first(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^2))