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__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [1] [0] = [0] [nil] = [0] [s](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [fst](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [7] [a__add](x1, x2) = [1] x1 + [1] x2 + [0] [add](x1, x2) = [1] x1 + [1] x2 + [7] [a__len](x1) = [1] x1 + [0] [len](x1) = [1] x1 + [7] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [1] > [1] X1 + [1] X2 + [0] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [1] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [1] > [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] >= [0] = [0()] [mark(nil())] = [0] >= [0] = [nil()] [mark(s(X))] = [0] >= [0] = [s(X)] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [0] ? [1] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [mark(add(X1, X2))] = [0] >= [0] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [0] >= [0] = [a__len(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)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [0] ? [1] X1 + [1] X2 + [7] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [0] >= [0] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [0] >= [0] = [s(add(X, Y))] [a__len(X)] = [1] X + [0] ? [1] X + [7] = [len(X)] [a__len(nil())] = [0] >= [0] = [0()] [a__len(cons(X, Z))] = [1] X + [0] >= [0] = [s(len(Z))] 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(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [4] [0] = [0] [nil] = [0] [s](x1) = [4] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [fst](x1, x2) = [1] x1 + [1] x2 + [3] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [7] [a__add](x1, x2) = [1] x1 + [1] x2 + [1] [add](x1, x2) = [1] x1 + [1] x2 + [6] [a__len](x1) = [1] x1 + [0] [len](x1) = [1] x1 + [7] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [4] > [1] X1 + [1] X2 + [3] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [4] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [8] > [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] >= [0] = [0()] [mark(nil())] = [0] >= [0] = [nil()] [mark(s(X))] = [0] ? [4] = [s(X)] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [0] ? [4] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [mark(add(X1, X2))] = [0] ? [1] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [0] >= [0] = [a__len(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)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [1] ? [1] X1 + [1] X2 + [6] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [1] > [0] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [5] > [4] = [s(add(X, Y))] [a__len(X)] = [1] X + [0] ? [1] X + [7] = [len(X)] [a__len(nil())] = [0] >= [0] = [0()] [a__len(cons(X, Z))] = [1] X + [0] ? [4] = [s(len(Z))] 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(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) } 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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [4] [0] = [0] [nil] = [0] [s](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [fst](x1, x2) = [1] x1 + [1] x2 + [1] [a__from](x1) = [1] x1 + [1] [from](x1) = [5] [a__add](x1, x2) = [1] x1 + [1] x2 + [0] [add](x1, x2) = [1] x1 + [1] x2 + [5] [a__len](x1) = [1] x1 + [0] [len](x1) = [1] x1 + [5] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [4] > [1] X1 + [1] X2 + [1] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [4] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [4] > [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] >= [0] = [0()] [mark(nil())] = [0] >= [0] = [nil()] [mark(s(X))] = [0] >= [0] = [s(X)] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [0] ? [4] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [0] ? [1] = [a__from(mark(X))] [mark(add(X1, X2))] = [0] >= [0] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [0] >= [0] = [a__len(mark(X))] [a__from(X)] = [1] X + [1] > [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [1] ? [5] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [0] ? [1] X1 + [1] X2 + [5] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [0] >= [0] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [0] >= [0] = [s(add(X, Y))] [a__len(X)] = [1] X + [0] ? [1] X + [5] = [len(X)] [a__len(nil())] = [0] >= [0] = [0()] [a__len(cons(X, Z))] = [1] X + [0] >= [0] = [s(len(Z))] 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(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , a__from(X) -> cons(mark(X), from(s(X))) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) } 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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [7] [0] = [2] [nil] = [0] [s](x1) = [1] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] [fst](x1, x2) = [1] x1 + [1] x2 + [1] [a__from](x1) = [1] x1 + [7] [from](x1) = [5] [a__add](x1, x2) = [1] x1 + [1] x2 + [3] [add](x1, x2) = [1] x1 + [1] x2 + [1] [a__len](x1) = [1] x1 + [0] [len](x1) = [1] x1 + [5] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [7] > [1] X1 + [1] X2 + [1] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [9] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [8] > [1] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [1] ? [2] = [0()] [mark(nil())] = [1] > [0] = [nil()] [mark(s(X))] = [1] >= [1] = [s(X)] [mark(cons(X1, X2))] = [1] >= [1] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [1] ? [9] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [1] ? [8] = [a__from(mark(X))] [mark(add(X1, X2))] = [1] ? [5] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [1] >= [1] = [a__len(mark(X))] [a__from(X)] = [1] X + [7] > [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [7] > [5] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [3] > [1] X1 + [1] X2 + [1] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [5] > [1] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [4] > [1] = [s(add(X, Y))] [a__len(X)] = [1] X + [0] ? [1] X + [5] = [len(X)] [a__len(nil())] = [0] ? [2] = [0()] [a__len(cons(X, Z))] = [1] X + [0] ? [1] = [s(len(Z))] 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(s(X)) -> s(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(nil()) -> nil() , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) } 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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [1] [0] = [4] [nil] = [0] [s](x1) = [7] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [fst](x1, x2) = [1] x1 + [1] x2 + [1] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [0] [a__add](x1, x2) = [1] x1 + [1] x2 + [4] [add](x1, x2) = [1] x1 + [1] x2 + [3] [a__len](x1) = [1] x1 + [1] [len](x1) = [1] x1 + [0] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [1] >= [1] X1 + [1] X2 + [1] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [5] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [8] > [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] ? [4] = [0()] [mark(nil())] = [0] >= [0] = [nil()] [mark(s(X))] = [0] ? [7] = [s(X)] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [0] ? [1] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [mark(add(X1, X2))] = [0] ? [4] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [0] ? [1] = [a__len(mark(X))] [a__from(X)] = [1] X + [0] >= [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [0] >= [1] X + [0] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [4] > [1] X1 + [1] X2 + [3] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [8] > [0] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [11] > [7] = [s(add(X, Y))] [a__len(X)] = [1] X + [1] > [1] X + [0] = [len(X)] [a__len(nil())] = [1] ? [4] = [0()] [a__len(cons(X, Z))] = [1] X + [1] ? [7] = [s(len(Z))] 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(s(X)) -> s(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(nil()) -> nil() , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [1] [0] = [0] [nil] = [1] [s](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] x1 + [0] [fst](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [0] [a__add](x1, x2) = [1] x1 + [1] x2 + [0] [add](x1, x2) = [1] x1 + [1] x2 + [0] [a__len](x1) = [1] x1 + [0] [len](x1) = [1] x1 + [0] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [1] > [1] X1 + [1] X2 + [0] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [1] >= [1] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [1] > [1] Y + [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] >= [0] = [0()] [mark(nil())] = [1] >= [1] = [nil()] [mark(s(X))] = [0] >= [0] = [s(X)] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [1] X1 + [1] X2 + [0] ? [1] X1 + [1] X2 + [1] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [0] >= [1] X + [0] = [a__from(mark(X))] [mark(add(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [1] X + [0] >= [1] X + [0] = [a__len(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 + [0] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [0] >= [1] X + [0] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [0] >= [0] = [s(add(X, Y))] [a__len(X)] = [1] X + [0] >= [1] X + [0] = [len(X)] [a__len(nil())] = [1] > [0] = [0()] [a__len(cons(X, Z))] = [1] X + [0] >= [0] = [s(len(Z))] 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(s(X)) -> s(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__len(cons(X, Z)) -> s(len(Z)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(nil()) -> nil() , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() } 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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [1] [0] = [3] [nil] = [0] [s](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [0] [fst](x1, x2) = [1] x1 + [1] x2 + [1] [a__from](x1) = [1] x1 + [4] [from](x1) = [1] [a__add](x1, x2) = [1] x1 + [1] x2 + [5] [add](x1, x2) = [1] x1 + [1] x2 + [2] [a__len](x1) = [1] x1 + [4] [len](x1) = [1] x1 + [2] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [1] >= [1] X1 + [1] X2 + [1] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [4] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [1] > [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] ? [3] = [0()] [mark(nil())] = [0] >= [0] = [nil()] [mark(s(X))] = [0] >= [0] = [s(X)] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [0] ? [1] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [0] ? [4] = [a__from(mark(X))] [mark(add(X1, X2))] = [0] ? [5] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [0] ? [4] = [a__len(mark(X))] [a__from(X)] = [1] X + [4] > [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [4] > [1] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [5] > [1] X1 + [1] X2 + [2] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [8] > [0] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [5] > [0] = [s(add(X, Y))] [a__len(X)] = [1] X + [4] > [1] X + [2] = [len(X)] [a__len(nil())] = [4] > [3] = [0()] [a__len(cons(X, Z))] = [1] X + [4] > [0] = [s(len(Z))] 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(s(X)) -> s(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(nil()) -> nil() , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [2] [0] = [2] [nil] = [1] [s](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] [fst](x1, x2) = [1] x1 + [1] x2 + [2] [a__from](x1) = [1] x1 + [7] [from](x1) = [1] [a__add](x1, x2) = [1] x1 + [1] x2 + [2] [add](x1, x2) = [1] x1 + [1] x2 + [2] [a__len](x1) = [1] x1 + [7] [len](x1) = [1] x1 + [1] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [2] >= [1] X1 + [1] X2 + [2] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [4] > [1] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [2] > [1] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [1] ? [2] = [0()] [mark(nil())] = [1] >= [1] = [nil()] [mark(s(X))] = [1] > [0] = [s(X)] [mark(cons(X1, X2))] = [1] >= [1] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [1] ? [4] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [1] ? [8] = [a__from(mark(X))] [mark(add(X1, X2))] = [1] ? [4] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [1] ? [8] = [a__len(mark(X))] [a__from(X)] = [1] X + [7] > [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [7] > [1] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [2] >= [1] X1 + [1] X2 + [2] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [4] > [1] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [2] > [0] = [s(add(X, Y))] [a__len(X)] = [1] X + [7] > [1] X + [1] = [len(X)] [a__len(nil())] = [8] > [2] = [0()] [a__len(cons(X, Z))] = [1] X + [7] > [0] = [s(len(Z))] 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(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(nil()) -> nil() , mark(s(X)) -> s(X) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__fst](x1, x2) = [1] x1 + [1] x2 + [2] [0] = [0] [nil] = [0] [s](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [mark](x1) = [1] [fst](x1, x2) = [1] x1 + [1] x2 + [1] [a__from](x1) = [1] x1 + [7] [from](x1) = [1] x1 + [3] [a__add](x1, x2) = [1] x1 + [1] x2 + [6] [add](x1, x2) = [1] x1 + [1] x2 + [3] [a__len](x1) = [1] x1 + [0] [len](x1) = [1] x1 + [0] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1] X1 + [1] X2 + [2] > [1] X1 + [1] X2 + [1] = [fst(X1, X2)] [a__fst(0(), Z)] = [1] Z + [2] > [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1] Y + [2] > [1] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [1] > [0] = [0()] [mark(nil())] = [1] > [0] = [nil()] [mark(s(X))] = [1] > [0] = [s(X)] [mark(cons(X1, X2))] = [1] >= [1] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [1] ? [4] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [1] ? [8] = [a__from(mark(X))] [mark(add(X1, X2))] = [1] ? [8] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [1] >= [1] = [a__len(mark(X))] [a__from(X)] = [1] X + [7] > [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [7] > [1] X + [3] = [from(X)] [a__add(X1, X2)] = [1] X1 + [1] X2 + [6] > [1] X1 + [1] X2 + [3] = [add(X1, X2)] [a__add(0(), X)] = [1] X + [6] > [1] = [mark(X)] [a__add(s(X), Y)] = [1] Y + [6] > [0] = [s(add(X, Y))] [a__len(X)] = [1] X + [0] >= [1] X + [0] = [len(X)] [a__len(nil())] = [0] >= [0] = [0()] [a__len(cons(X, Z))] = [1] X + [0] >= [0] = [s(len(Z))] 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(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(X) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } 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(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__fst](x1, x2) = [1 5] x1 + [1 6] x2 + [0] [0 1] [0 1] [0] [0] = [0] [0] [nil] = [0] [0] [s](x1) = [0] [0] [cons](x1, x2) = [1 2] x1 + [0] [0 1] [0] [mark](x1) = [1 3] x1 + [0] [0 1] [0] [fst](x1, x2) = [1 5] x1 + [1 6] x2 + [0] [0 1] [0 1] [0] [a__from](x1) = [1 6] x1 + [7] [0 1] [1] [from](x1) = [1 6] x1 + [6] [0 1] [1] [a__add](x1, x2) = [1 5] x1 + [1 5] x2 + [1] [0 1] [0 1] [1] [add](x1, x2) = [1 5] x1 + [1 5] x2 + [1] [0 1] [0 1] [1] [a__len](x1) = [1 6] x1 + [1] [0 1] [1] [len](x1) = [1 6] x1 + [1] [0 1] [1] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1 5] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] >= [1 5] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] = [fst(X1, X2)] [a__fst(0(), Z)] = [1 6] Z + [0] [0 1] [0] >= [0] [0] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1 8] Y + [0] [0 1] [0] >= [1 5] Y + [0] [0 1] [0] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [0] [0] >= [0] [0] = [0()] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(s(X))] = [0] [0] >= [0] [0] = [s(X)] [mark(cons(X1, X2))] = [1 5] X1 + [0] [0 1] [0] >= [1 5] X1 + [0] [0 1] [0] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [1 8] X1 + [1 9] X2 + [0] [0 1] [0 1] [0] >= [1 8] X1 + [1 9] X2 + [0] [0 1] [0 1] [0] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [1 9] X + [9] [0 1] [1] > [1 9] X + [7] [0 1] [1] = [a__from(mark(X))] [mark(add(X1, X2))] = [1 8] X1 + [1 8] X2 + [4] [0 1] [0 1] [1] > [1 8] X1 + [1 8] X2 + [1] [0 1] [0 1] [1] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [1 9] X + [4] [0 1] [1] > [1 9] X + [1] [0 1] [1] = [a__len(mark(X))] [a__from(X)] = [1 6] X + [7] [0 1] [1] > [1 5] X + [0] [0 1] [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 6] X + [7] [0 1] [1] > [1 6] X + [6] [0 1] [1] = [from(X)] [a__add(X1, X2)] = [1 5] X1 + [1 5] X2 + [1] [0 1] [0 1] [1] >= [1 5] X1 + [1 5] X2 + [1] [0 1] [0 1] [1] = [add(X1, X2)] [a__add(0(), X)] = [1 5] X + [1] [0 1] [1] > [1 3] X + [0] [0 1] [0] = [mark(X)] [a__add(s(X), Y)] = [1 5] Y + [1] [0 1] [1] > [0] [0] = [s(add(X, Y))] [a__len(X)] = [1 6] X + [1] [0 1] [1] >= [1 6] X + [1] [0 1] [1] = [len(X)] [a__len(nil())] = [1] [1] > [0] [0] = [0()] [a__len(cons(X, Z))] = [1 8] X + [1] [0 1] [1] > [0] [0] = [s(len(Z))] 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) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) } Weak Trs: { a__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(X) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } 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) , mark(fst(X1, X2)) -> a__fst(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__fst) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(a__add) = {1, 2}, Uargs(a__len) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__fst](x1, x2) = [1 0] x1 + [1 2] x2 + [0] [0 1] [0 1] [6] [0] = [4] [0] [nil] = [2] [1] [s](x1) = [2] [1] [cons](x1, x2) = [1 6] x1 + [0] [0 1] [1] [mark](x1) = [1 1] x1 + [3] [0 1] [0] [fst](x1, x2) = [1 0] x1 + [1 2] x2 + [0] [0 1] [0 1] [6] [a__from](x1) = [1 7] x1 + [3] [0 1] [4] [from](x1) = [1 7] x1 + [0] [0 1] [4] [a__add](x1, x2) = [1 5] x1 + [1 2] x2 + [1] [0 1] [0 1] [4] [add](x1, x2) = [1 5] x1 + [1 2] x2 + [1] [0 1] [0 1] [4] [a__len](x1) = [1 3] x1 + [0] [0 1] [0] [len](x1) = [1 3] x1 + [0] [0 1] [0] The following symbols are considered usable {a__fst, mark, a__from, a__add, a__len} The order satisfies the following ordering constraints: [a__fst(X1, X2)] = [1 0] X1 + [1 2] X2 + [0] [0 1] [0 1] [6] >= [1 0] X1 + [1 2] X2 + [0] [0 1] [0 1] [6] = [fst(X1, X2)] [a__fst(0(), Z)] = [1 2] Z + [4] [0 1] [6] > [2] [1] = [nil()] [a__fst(s(X), cons(Y, Z))] = [1 8] Y + [4] [0 1] [8] > [1 7] Y + [3] [0 1] [1] = [cons(mark(Y), fst(X, Z))] [mark(0())] = [7] [0] > [4] [0] = [0()] [mark(nil())] = [6] [1] > [2] [1] = [nil()] [mark(s(X))] = [6] [1] > [2] [1] = [s(X)] [mark(cons(X1, X2))] = [1 7] X1 + [4] [0 1] [1] > [1 7] X1 + [3] [0 1] [1] = [cons(mark(X1), X2)] [mark(fst(X1, X2))] = [1 1] X1 + [1 3] X2 + [9] [0 1] [0 1] [6] > [1 1] X1 + [1 3] X2 + [6] [0 1] [0 1] [6] = [a__fst(mark(X1), mark(X2))] [mark(from(X))] = [1 8] X + [7] [0 1] [4] > [1 8] X + [6] [0 1] [4] = [a__from(mark(X))] [mark(add(X1, X2))] = [1 6] X1 + [1 3] X2 + [8] [0 1] [0 1] [4] > [1 6] X1 + [1 3] X2 + [7] [0 1] [0 1] [4] = [a__add(mark(X1), mark(X2))] [mark(len(X))] = [1 4] X + [3] [0 1] [0] >= [1 4] X + [3] [0 1] [0] = [a__len(mark(X))] [a__from(X)] = [1 7] X + [3] [0 1] [4] >= [1 7] X + [3] [0 1] [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 7] X + [3] [0 1] [4] > [1 7] X + [0] [0 1] [4] = [from(X)] [a__add(X1, X2)] = [1 5] X1 + [1 2] X2 + [1] [0 1] [0 1] [4] >= [1 5] X1 + [1 2] X2 + [1] [0 1] [0 1] [4] = [add(X1, X2)] [a__add(0(), X)] = [1 2] X + [5] [0 1] [4] > [1 1] X + [3] [0 1] [0] = [mark(X)] [a__add(s(X), Y)] = [1 2] Y + [8] [0 1] [5] > [2] [1] = [s(add(X, Y))] [a__len(X)] = [1 3] X + [0] [0 1] [0] >= [1 3] X + [0] [0 1] [0] = [len(X)] [a__len(nil())] = [5] [1] > [4] [0] = [0()] [a__len(cons(X, Z))] = [1 9] X + [3] [0 1] [1] > [2] [1] = [s(len(Z))] 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__fst(X1, X2) -> fst(X1, X2) , a__fst(0(), Z) -> nil() , a__fst(s(X), cons(Y, Z)) -> cons(mark(Y), fst(X, Z)) , mark(0()) -> 0() , mark(nil()) -> nil() , mark(s(X)) -> s(X) , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(fst(X1, X2)) -> a__fst(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(add(X1, X2)) -> a__add(mark(X1), mark(X2)) , mark(len(X)) -> a__len(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__add(X1, X2) -> add(X1, X2) , a__add(0(), X) -> mark(X) , a__add(s(X), Y) -> s(add(X, Y)) , a__len(X) -> len(X) , a__len(nil()) -> 0() , a__len(cons(X, Z)) -> s(len(Z)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^2))