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__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [1] [nil] = [0] [mark](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [7] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [zWadr](x1, x2) = [1] x1 + [1] x2 + [7] [a__prefix](x1) = [1] x1 + [0] [prefix](x1) = [1] x1 + [7] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [1] > [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [1] > [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [1] > [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] >= [0] = [nil()] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [0] ? [1] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [mark(s(X))] = [0] >= [0] = [s(mark(X))] [mark(zWadr(X1, X2))] = [0] >= [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [0] >= [0] = [a__prefix(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__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0] ? [1] X1 + [1] X2 + [7] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [0] >= [0] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [0] >= [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0] ? [1] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [0] >= [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [0] ? [1] X + [7] = [prefix(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(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(X) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) } 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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [4] [mark](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [4] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [a__prefix](x1) = [1] x1 + [0] [prefix](x1) = [1] x1 + [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [4] > [1] YS + [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0] >= [1] X + [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [4] >= [4] = [nil()] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [4] > [1] X + [0] = [a__from(mark(X))] [mark(s(X))] = [1] X + [0] >= [1] X + [0] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1] X + [0] >= [1] X + [0] = [a__prefix(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)] [a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [4] >= [4] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [4] >= [4] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0] >= [1] X + [1] Y + [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [0] ? [4] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [0] >= [1] X + [0] = [prefix(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(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(X) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , 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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [4] [mark](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [0] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [zWadr](x1, x2) = [1] x1 + [1] x2 + [1] [a__prefix](x1) = [1] x1 + [0] [prefix](x1) = [1] x1 + [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [4] > [1] YS + [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0] >= [1] X + [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [4] >= [4] = [nil()] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [0] >= [1] X + [0] = [a__from(mark(X))] [mark(s(X))] = [1] X + [0] >= [1] X + [0] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [1] > [1] X1 + [1] X2 + [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1] X + [0] >= [1] X + [0] = [a__prefix(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__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0] ? [1] X1 + [1] X2 + [1] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [4] >= [4] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [4] >= [4] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0] >= [1] X + [1] Y + [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [0] ? [4] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [0] >= [1] X + [0] = [prefix(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(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(X) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(from(X)) -> a__from(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) } 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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [0] [mark](x1) = [0] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [7] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [zWadr](x1, x2) = [1] x1 + [1] x2 + [7] [a__prefix](x1) = [1] x1 + [4] [prefix](x1) = [1] x1 + [3] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [0] >= [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0] >= [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] >= [0] = [nil()] [mark(cons(X1, X2))] = [0] >= [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [0] >= [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [0] >= [0] = [a__from(mark(X))] [mark(s(X))] = [0] >= [0] = [s(mark(X))] [mark(zWadr(X1, X2))] = [0] >= [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [0] ? [4] = [a__prefix(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__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0] ? [1] X1 + [1] X2 + [7] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [0] >= [0] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [0] >= [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0] >= [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [4] > [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [4] > [1] X + [3] = [prefix(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(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(from(X)) -> a__from(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [4] [mark](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [1] [from](x1) = [1] x1 + [4] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [zWadr](x1, x2) = [1] x1 + [1] x2 + [0] [a__prefix](x1) = [1] x1 + [4] [prefix](x1) = [1] x1 + [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [4] > [1] YS + [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0] >= [1] X + [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [4] >= [4] = [nil()] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [4] > [1] X + [1] = [a__from(mark(X))] [mark(s(X))] = [1] X + [0] >= [1] X + [0] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1] X + [0] ? [1] X + [4] = [a__prefix(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)] [a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [4] >= [4] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [4] >= [4] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [0] >= [1] X + [1] Y + [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [4] >= [4] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [4] > [1] X + [0] = [prefix(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(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(from(X)) -> a__from(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , a__from(X) -> cons(mark(X), from(s(X))) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [0] [mark](x1) = [1] x1 + [0] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [0] [from](x1) = [1] x1 + [0] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [1] [zWadr](x1, x2) = [1] x1 + [1] x2 + [1] [a__prefix](x1) = [1] x1 + [0] [prefix](x1) = [1] x1 + [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [0] >= [1] YS + [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [0] >= [1] X + [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] >= [0] = [nil()] [mark(cons(X1, X2))] = [1] X1 + [0] >= [1] X1 + [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1] X1 + [1] X2 + [0] >= [1] X1 + [1] X2 + [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [0] >= [1] X + [0] = [a__from(mark(X))] [mark(s(X))] = [1] X + [0] >= [1] X + [0] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [1] >= [1] X1 + [1] X2 + [1] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1] X + [0] >= [1] X + [0] = [a__prefix(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__zWadr(X1, X2)] = [1] X1 + [1] X2 + [1] >= [1] X1 + [1] X2 + [1] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [1] > [0] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [1] > [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [1] > [1] X + [1] Y + [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [0] >= [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [0] >= [1] X + [0] = [prefix(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(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(from(X)) -> a__from(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , a__from(X) -> cons(mark(X), from(s(X))) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following matrix interpretation satisfying not(EDA) and not(IDA(1)). [a__app](x1, x2) = [1] x1 + [1] x2 + [2] [nil] = [0] [mark](x1) = [1] x1 + [1] [cons](x1, x2) = [1] x1 + [0] [app](x1, x2) = [1] x1 + [1] x2 + [0] [a__from](x1) = [1] x1 + [1] [from](x1) = [1] x1 + [1] [s](x1) = [1] x1 + [0] [a__zWadr](x1, x2) = [1] x1 + [1] x2 + [4] [zWadr](x1, x2) = [1] x1 + [1] x2 + [6] [a__prefix](x1) = [1] x1 + [4] [prefix](x1) = [1] x1 + [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1] X1 + [1] X2 + [2] > [1] X1 + [1] X2 + [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1] YS + [2] > [1] YS + [1] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1] YS + [1] X + [2] > [1] X + [1] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [1] > [0] = [nil()] [mark(cons(X1, X2))] = [1] X1 + [1] >= [1] X1 + [1] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1] X1 + [1] X2 + [1] ? [1] X1 + [1] X2 + [4] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1] X + [2] >= [1] X + [2] = [a__from(mark(X))] [mark(s(X))] = [1] X + [1] >= [1] X + [1] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1] X1 + [1] X2 + [7] > [1] X1 + [1] X2 + [6] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1] X + [1] ? [1] X + [5] = [a__prefix(mark(X))] [a__from(X)] = [1] X + [1] >= [1] X + [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1] X + [1] >= [1] X + [1] = [from(X)] [a__zWadr(X1, X2)] = [1] X1 + [1] X2 + [4] ? [1] X1 + [1] X2 + [6] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1] XS + [4] > [0] = [nil()] [a__zWadr(nil(), YS)] = [1] YS + [4] > [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1] X + [1] Y + [4] >= [1] X + [1] Y + [4] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1] L + [4] > [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1] X + [4] > [1] X + [0] = [prefix(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(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(nil()) -> nil() , mark(from(X)) -> a__from(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , a__from(X) -> cons(mark(X), from(s(X))) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(s(X)) -> s(mark(X)) , mark(prefix(X)) -> a__prefix(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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__app](x1, x2) = [1 1] x1 + [1 4] x2 + [0] [0 1] [0 1] [4] [nil] = [0] [0] [mark](x1) = [1 1] x1 + [0] [0 1] [0] [cons](x1, x2) = [1 0] x1 + [0] [0 1] [0] [app](x1, x2) = [1 1] x1 + [1 4] x2 + [0] [0 1] [0 1] [4] [a__from](x1) = [1 2] x1 + [0] [0 1] [0] [from](x1) = [1 2] x1 + [0] [0 1] [0] [s](x1) = [1 0] x1 + [0] [0 1] [4] [a__zWadr](x1, x2) = [1 5] x1 + [1 4] x2 + [4] [0 1] [0 1] [4] [zWadr](x1, x2) = [1 5] x1 + [1 4] x2 + [4] [0 1] [0 1] [4] [a__prefix](x1) = [1 0] x1 + [0] [0 1] [4] [prefix](x1) = [1 0] x1 + [0] [0 1] [4] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1 1] X1 + [1 4] X2 + [0] [0 1] [0 1] [4] >= [1 1] X1 + [1 4] X2 + [0] [0 1] [0 1] [4] = [app(X1, X2)] [a__app(nil(), YS)] = [1 4] YS + [0] [0 1] [4] >= [1 1] YS + [0] [0 1] [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1 4] YS + [1 1] X + [0] [0 1] [0 1] [4] >= [1 1] X + [0] [0 1] [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(cons(X1, X2))] = [1 1] X1 + [0] [0 1] [0] >= [1 1] X1 + [0] [0 1] [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1 2] X1 + [1 5] X2 + [4] [0 1] [0 1] [4] > [1 2] X1 + [1 5] X2 + [0] [0 1] [0 1] [4] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1 3] X + [0] [0 1] [0] >= [1 3] X + [0] [0 1] [0] = [a__from(mark(X))] [mark(s(X))] = [1 1] X + [4] [0 1] [4] > [1 1] X + [0] [0 1] [4] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1 6] X1 + [1 5] X2 + [8] [0 1] [0 1] [4] > [1 6] X1 + [1 5] X2 + [4] [0 1] [0 1] [4] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1 1] X + [4] [0 1] [4] > [1 1] X + [0] [0 1] [4] = [a__prefix(mark(X))] [a__from(X)] = [1 2] X + [0] [0 1] [0] >= [1 1] X + [0] [0 1] [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 2] X + [0] [0 1] [0] >= [1 2] X + [0] [0 1] [0] = [from(X)] [a__zWadr(X1, X2)] = [1 5] X1 + [1 4] X2 + [4] [0 1] [0 1] [4] >= [1 5] X1 + [1 4] X2 + [4] [0 1] [0 1] [4] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1 5] XS + [4] [0 1] [4] > [0] [0] = [nil()] [a__zWadr(nil(), YS)] = [1 4] YS + [4] [0 1] [4] > [0] [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1 5] X + [1 4] Y + [4] [0 1] [0 1] [4] > [1 5] X + [1 2] Y + [0] [0 1] [0 1] [4] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1 0] L + [0] [0 1] [4] >= [0] [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1 0] X + [0] [0 1] [4] >= [1 0] X + [0] [0 1] [4] = [prefix(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) , a__zWadr(X1, X2) -> zWadr(X1, X2) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(nil()) -> nil() , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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: { a__zWadr(X1, X2) -> zWadr(X1, 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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__app](x1, x2) = [1 2] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [nil] = [0] [0] [mark](x1) = [1 2] x1 + [0] [0 1] [0] [cons](x1, x2) = [1 0] x1 + [0] [0 1] [0] [app](x1, x2) = [1 2] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [a__from](x1) = [1 2] x1 + [0] [0 1] [0] [from](x1) = [1 2] x1 + [0] [0 1] [0] [s](x1) = [1 0] x1 + [0] [0 1] [4] [a__zWadr](x1, x2) = [1 6] x1 + [1 4] x2 + [1] [0 1] [0 1] [4] [zWadr](x1, x2) = [1 6] x1 + [1 4] x2 + [0] [0 1] [0 1] [4] [a__prefix](x1) = [1 1] x1 + [0] [0 1] [0] [prefix](x1) = [1 1] x1 + [0] [0 1] [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1 2] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] >= [1 2] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1 4] YS + [0] [0 1] [0] >= [1 2] YS + [0] [0 1] [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1 4] YS + [1 2] X + [0] [0 1] [0 1] [0] >= [1 2] X + [0] [0 1] [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(cons(X1, X2))] = [1 2] X1 + [0] [0 1] [0] >= [1 2] X1 + [0] [0 1] [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1 4] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] >= [1 4] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1 4] X + [0] [0 1] [0] >= [1 4] X + [0] [0 1] [0] = [a__from(mark(X))] [mark(s(X))] = [1 2] X + [8] [0 1] [4] > [1 2] X + [0] [0 1] [4] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1 8] X1 + [1 6] X2 + [8] [0 1] [0 1] [4] > [1 8] X1 + [1 6] X2 + [1] [0 1] [0 1] [4] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1 3] X + [0] [0 1] [0] >= [1 3] X + [0] [0 1] [0] = [a__prefix(mark(X))] [a__from(X)] = [1 2] X + [0] [0 1] [0] >= [1 2] X + [0] [0 1] [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 2] X + [0] [0 1] [0] >= [1 2] X + [0] [0 1] [0] = [from(X)] [a__zWadr(X1, X2)] = [1 6] X1 + [1 4] X2 + [1] [0 1] [0 1] [4] > [1 6] X1 + [1 4] X2 + [0] [0 1] [0 1] [4] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1 6] XS + [1] [0 1] [4] > [0] [0] = [nil()] [a__zWadr(nil(), YS)] = [1 4] YS + [1] [0 1] [4] > [0] [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1 6] X + [1 4] Y + [1] [0 1] [0 1] [4] > [1 6] X + [1 4] Y + [0] [0 1] [0 1] [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1 1] L + [0] [0 1] [0] >= [0] [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1 1] X + [0] [0 1] [0] >= [1 1] X + [0] [0 1] [0] = [prefix(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__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(nil()) -> nil() , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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: { 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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__app](x1, x2) = [1 4] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [nil] = [0] [0] [mark](x1) = [1 1] x1 + [0] [0 1] [0] [cons](x1, x2) = [1 2] x1 + [0] [0 1] [0] [app](x1, x2) = [1 4] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [a__from](x1) = [1 4] x1 + [4] [0 1] [2] [from](x1) = [1 4] x1 + [2] [0 1] [2] [s](x1) = [1 0] x1 + [2] [0 1] [6] [a__zWadr](x1, x2) = [1 7] x1 + [1 7] x2 + [0] [0 1] [0 1] [0] [zWadr](x1, x2) = [1 7] x1 + [1 7] x2 + [0] [0 1] [0 1] [0] [a__prefix](x1) = [1 0] x1 + [0] [0 1] [0] [prefix](x1) = [1 0] x1 + [0] [0 1] [0] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1 4] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] >= [1 4] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1 4] YS + [0] [0 1] [0] >= [1 1] YS + [0] [0 1] [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1 4] YS + [1 6] X + [0] [0 1] [0 1] [0] >= [1 3] X + [0] [0 1] [0] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(cons(X1, X2))] = [1 3] X1 + [0] [0 1] [0] >= [1 3] X1 + [0] [0 1] [0] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1 5] X1 + [1 5] X2 + [0] [0 1] [0 1] [0] >= [1 5] X1 + [1 5] X2 + [0] [0 1] [0 1] [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1 5] X + [4] [0 1] [2] >= [1 5] X + [4] [0 1] [2] = [a__from(mark(X))] [mark(s(X))] = [1 1] X + [8] [0 1] [6] > [1 1] X + [2] [0 1] [6] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1 8] X1 + [1 8] X2 + [0] [0 1] [0 1] [0] >= [1 8] X1 + [1 8] X2 + [0] [0 1] [0 1] [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1 1] X + [0] [0 1] [0] >= [1 1] X + [0] [0 1] [0] = [a__prefix(mark(X))] [a__from(X)] = [1 4] X + [4] [0 1] [2] > [1 3] X + [0] [0 1] [0] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 4] X + [4] [0 1] [2] > [1 4] X + [2] [0 1] [2] = [from(X)] [a__zWadr(X1, X2)] = [1 7] X1 + [1 7] X2 + [0] [0 1] [0 1] [0] >= [1 7] X1 + [1 7] X2 + [0] [0 1] [0 1] [0] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1 7] XS + [0] [0 1] [0] >= [0] [0] = [nil()] [a__zWadr(nil(), YS)] = [1 7] YS + [0] [0 1] [0] >= [0] [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1 9] X + [1 9] Y + [0] [0 1] [0 1] [0] >= [1 9] X + [1 7] Y + [0] [0 1] [0 1] [0] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1 0] L + [0] [0 1] [0] >= [0] [0] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1 0] X + [0] [0 1] [0] >= [1 0] X + [0] [0 1] [0] = [prefix(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) } Weak Trs: { a__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(nil()) -> nil() , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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) } 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__app) = {1, 2}, Uargs(cons) = {1}, Uargs(a__from) = {1}, Uargs(s) = {1}, Uargs(a__zWadr) = {1, 2}, Uargs(a__prefix) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [a__app](x1, x2) = [1 2] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [nil] = [0] [0] [mark](x1) = [1 2] x1 + [0] [0 1] [0] [cons](x1, x2) = [1 0] x1 + [0] [0 1] [1] [app](x1, x2) = [1 2] x1 + [1 4] x2 + [0] [0 1] [0 1] [0] [a__from](x1) = [1 2] x1 + [0] [0 1] [2] [from](x1) = [1 2] x1 + [0] [0 1] [2] [s](x1) = [1 0] x1 + [2] [0 1] [1] [a__zWadr](x1, x2) = [1 6] x1 + [1 6] x2 + [0] [0 1] [0 1] [0] [zWadr](x1, x2) = [1 6] x1 + [1 6] x2 + [0] [0 1] [0 1] [0] [a__prefix](x1) = [1 0] x1 + [0] [0 1] [4] [prefix](x1) = [1 0] x1 + [0] [0 1] [4] The following symbols are considered usable {a__app, mark, a__from, a__zWadr, a__prefix} The order satisfies the following ordering constraints: [a__app(X1, X2)] = [1 2] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] >= [1 2] X1 + [1 4] X2 + [0] [0 1] [0 1] [0] = [app(X1, X2)] [a__app(nil(), YS)] = [1 4] YS + [0] [0 1] [0] >= [1 2] YS + [0] [0 1] [0] = [mark(YS)] [a__app(cons(X, XS), YS)] = [1 4] YS + [1 2] X + [2] [0 1] [0 1] [1] > [1 2] X + [0] [0 1] [1] = [cons(mark(X), app(XS, YS))] [mark(nil())] = [0] [0] >= [0] [0] = [nil()] [mark(cons(X1, X2))] = [1 2] X1 + [2] [0 1] [1] > [1 2] X1 + [0] [0 1] [1] = [cons(mark(X1), X2)] [mark(app(X1, X2))] = [1 4] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] >= [1 4] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] = [a__app(mark(X1), mark(X2))] [mark(from(X))] = [1 4] X + [4] [0 1] [2] > [1 4] X + [0] [0 1] [2] = [a__from(mark(X))] [mark(s(X))] = [1 2] X + [4] [0 1] [1] > [1 2] X + [2] [0 1] [1] = [s(mark(X))] [mark(zWadr(X1, X2))] = [1 8] X1 + [1 8] X2 + [0] [0 1] [0 1] [0] >= [1 8] X1 + [1 8] X2 + [0] [0 1] [0 1] [0] = [a__zWadr(mark(X1), mark(X2))] [mark(prefix(X))] = [1 2] X + [8] [0 1] [4] > [1 2] X + [0] [0 1] [4] = [a__prefix(mark(X))] [a__from(X)] = [1 2] X + [0] [0 1] [2] >= [1 2] X + [0] [0 1] [1] = [cons(mark(X), from(s(X)))] [a__from(X)] = [1 2] X + [0] [0 1] [2] >= [1 2] X + [0] [0 1] [2] = [from(X)] [a__zWadr(X1, X2)] = [1 6] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] >= [1 6] X1 + [1 6] X2 + [0] [0 1] [0 1] [0] = [zWadr(X1, X2)] [a__zWadr(XS, nil())] = [1 6] XS + [0] [0 1] [0] >= [0] [0] = [nil()] [a__zWadr(nil(), YS)] = [1 6] YS + [0] [0 1] [0] >= [0] [0] = [nil()] [a__zWadr(cons(X, XS), cons(Y, YS))] = [1 6] X + [1 6] Y + [12] [0 1] [0 1] [2] > [1 6] X + [1 4] Y + [4] [0 1] [0 1] [2] = [cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS))] [a__prefix(L)] = [1 0] L + [0] [0 1] [4] >= [0] [1] = [cons(nil(), zWadr(L, prefix(L)))] [a__prefix(X)] = [1 0] X + [0] [0 1] [4] >= [1 0] X + [0] [0 1] [4] = [prefix(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__app(X1, X2) -> app(X1, X2) , a__app(nil(), YS) -> mark(YS) , a__app(cons(X, XS), YS) -> cons(mark(X), app(XS, YS)) , mark(nil()) -> nil() , mark(cons(X1, X2)) -> cons(mark(X1), X2) , mark(app(X1, X2)) -> a__app(mark(X1), mark(X2)) , mark(from(X)) -> a__from(mark(X)) , mark(s(X)) -> s(mark(X)) , mark(zWadr(X1, X2)) -> a__zWadr(mark(X1), mark(X2)) , mark(prefix(X)) -> a__prefix(mark(X)) , a__from(X) -> cons(mark(X), from(s(X))) , a__from(X) -> from(X) , a__zWadr(X1, X2) -> zWadr(X1, X2) , a__zWadr(XS, nil()) -> nil() , a__zWadr(nil(), YS) -> nil() , a__zWadr(cons(X, XS), cons(Y, YS)) -> cons(a__app(mark(Y), cons(mark(X), nil())), zWadr(XS, YS)) , a__prefix(L) -> cons(nil(), zWadr(L, prefix(L))) , a__prefix(X) -> prefix(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))