We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We add the following dependency tuples: Strict DPs: { lt^#(0(), s(X)) -> c_1() , lt^#(s(X), 0()) -> c_2() , lt^#(s(X), s(Y)) -> c_3(lt^#(X, Y)) , append^#(nil(), Y) -> c_4() , append^#(add(N, X), Y) -> c_5(append^#(X, Y)) , split^#(N, nil()) -> c_6() , split^#(N, add(M, Y)) -> c_7(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_8(f_2^#(lt(N, M), N, M, Y, X, Z), lt^#(N, M)) , f_2^#(true(), N, M, Y, X, Z) -> c_9() , f_2^#(false(), N, M, Y, X, Z) -> c_10() , qsort^#(nil()) -> c_11() , qsort^#(add(N, X)) -> c_12(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_13(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { lt^#(0(), s(X)) -> c_1() , lt^#(s(X), 0()) -> c_2() , lt^#(s(X), s(Y)) -> c_3(lt^#(X, Y)) , append^#(nil(), Y) -> c_4() , append^#(add(N, X), Y) -> c_5(append^#(X, Y)) , split^#(N, nil()) -> c_6() , split^#(N, add(M, Y)) -> c_7(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_8(f_2^#(lt(N, M), N, M, Y, X, Z), lt^#(N, M)) , f_2^#(true(), N, M, Y, X, Z) -> c_9() , f_2^#(false(), N, M, Y, X, Z) -> c_10() , qsort^#(nil()) -> c_11() , qsort^#(add(N, X)) -> c_12(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_13(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We estimate the number of application of {1,2,4,6,9,10,11} by applications of Pre({1,2,4,6,9,10,11}) = {3,5,7,8,12,13}. Here rules are labeled as follows: DPs: { 1: lt^#(0(), s(X)) -> c_1() , 2: lt^#(s(X), 0()) -> c_2() , 3: lt^#(s(X), s(Y)) -> c_3(lt^#(X, Y)) , 4: append^#(nil(), Y) -> c_4() , 5: append^#(add(N, X), Y) -> c_5(append^#(X, Y)) , 6: split^#(N, nil()) -> c_6() , 7: split^#(N, add(M, Y)) -> c_7(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , 8: f_1^#(pair(X, Z), N, M, Y) -> c_8(f_2^#(lt(N, M), N, M, Y, X, Z), lt^#(N, M)) , 9: f_2^#(true(), N, M, Y, X, Z) -> c_9() , 10: f_2^#(false(), N, M, Y, X, Z) -> c_10() , 11: qsort^#(nil()) -> c_11() , 12: qsort^#(add(N, X)) -> c_12(f_3^#(split(N, X), N, X), split^#(N, X)) , 13: f_3^#(pair(Y, Z), N, X) -> c_13(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { lt^#(s(X), s(Y)) -> c_3(lt^#(X, Y)) , append^#(add(N, X), Y) -> c_5(append^#(X, Y)) , split^#(N, add(M, Y)) -> c_7(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_8(f_2^#(lt(N, M), N, M, Y, X, Z), lt^#(N, M)) , qsort^#(add(N, X)) -> c_12(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_13(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Weak DPs: { lt^#(0(), s(X)) -> c_1() , lt^#(s(X), 0()) -> c_2() , append^#(nil(), Y) -> c_4() , split^#(N, nil()) -> c_6() , f_2^#(true(), N, M, Y, X, Z) -> c_9() , f_2^#(false(), N, M, Y, X, Z) -> c_10() , qsort^#(nil()) -> c_11() } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { lt^#(0(), s(X)) -> c_1() , lt^#(s(X), 0()) -> c_2() , append^#(nil(), Y) -> c_4() , split^#(N, nil()) -> c_6() , f_2^#(true(), N, M, Y, X, Z) -> c_9() , f_2^#(false(), N, M, Y, X, Z) -> c_10() , qsort^#(nil()) -> c_11() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { lt^#(s(X), s(Y)) -> c_3(lt^#(X, Y)) , append^#(add(N, X), Y) -> c_5(append^#(X, Y)) , split^#(N, add(M, Y)) -> c_7(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_8(f_2^#(lt(N, M), N, M, Y, X, Z), lt^#(N, M)) , qsort^#(add(N, X)) -> c_12(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_13(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { f_1^#(pair(X, Z), N, M, Y) -> c_8(f_2^#(lt(N, M), N, M, Y, X, Z), lt^#(N, M)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_4(lt^#(N, M)) , qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } and lower component { lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_4(lt^#(N, M)) } Further, following extension rules are added to the lower component. { qsort^#(add(N, X)) -> split^#(N, X) , qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) } Trs: { qsort(nil()) -> nil() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_5) = {1}, Uargs(c_6) = {1, 2, 3} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [lt](x1, x2) = [2] [0] = [5] [s](x1) = [1] x1 + [7] [true] = [2] [false] = [2] [append](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [0] [add](x1, x2) = [1] x2 + [3] [split](x1, x2) = [1] x2 + [5] [pair](x1, x2) = [1] x1 + [1] x2 + [5] [f_1](x1, x2, x3, x4) = [1] x1 + [3] [f_2](x1, x2, x3, x4, x5, x6) = [4] x1 + [1] x5 + [1] x6 + [0] [qsort](x1) = [3] x1 + [6] [f_3](x1, x2, x3) = [3] x1 + [0] [append^#](x1, x2) = [0] [split^#](x1, x2) = [0] [qsort^#](x1) = [2] x1 + [5] [f_3^#](x1, x2, x3) = [2] x1 + [0] [c_5](x1, x2) = [1] x1 + [1] x2 + [0] [c_6](x1, x2, x3) = [4] x1 + [1] x2 + [1] x3 + [0] The order satisfies the following ordering constraints: [lt(0(), s(X))] = [2] >= [2] = [true()] [lt(s(X), 0())] = [2] >= [2] = [false()] [lt(s(X), s(Y))] = [2] >= [2] = [lt(X, Y)] [append(nil(), Y)] = [1] Y + [0] >= [1] Y + [0] = [Y] [append(add(N, X), Y)] = [1] X + [1] Y + [3] >= [1] X + [1] Y + [3] = [add(N, append(X, Y))] [split(N, nil())] = [5] >= [5] = [pair(nil(), nil())] [split(N, add(M, Y))] = [1] Y + [8] >= [1] Y + [8] = [f_1(split(N, Y), N, M, Y)] [f_1(pair(X, Z), N, M, Y)] = [1] X + [1] Z + [8] >= [1] X + [1] Z + [8] = [f_2(lt(N, M), N, M, Y, X, Z)] [f_2(true(), N, M, Y, X, Z)] = [1] X + [1] Z + [8] >= [1] X + [1] Z + [8] = [pair(X, add(M, Z))] [f_2(false(), N, M, Y, X, Z)] = [1] X + [1] Z + [8] >= [1] X + [1] Z + [8] = [pair(add(M, X), Z)] [qsort(nil())] = [6] > [0] = [nil()] [qsort(add(N, X))] = [3] X + [15] >= [3] X + [15] = [f_3(split(N, X), N, X)] [f_3(pair(Y, Z), N, X)] = [3] Y + [3] Z + [15] >= [3] Y + [3] Z + [15] = [append(qsort(Y), add(X, qsort(Z)))] [qsort^#(add(N, X))] = [2] X + [11] > [2] X + [10] = [c_5(f_3^#(split(N, X), N, X), split^#(N, X))] [f_3^#(pair(Y, Z), N, X)] = [2] Y + [2] Z + [10] >= [2] Y + [2] Z + [10] = [c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z))] We return to the main proof. Consider the set of all dependency pairs : { 1: qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) , 2: f_3^#(pair(Y, Z), N, X) -> c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { qsort^#(add(N, X)) -> c_5(f_3^#(split(N, X), N, X), split^#(N, X)) , f_3^#(pair(Y, Z), N, X) -> c_6(append^#(qsort(Y), add(X, qsort(Z))), qsort^#(Y), qsort^#(Z)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_4(lt^#(N, M)) } Weak DPs: { qsort^#(add(N, X)) -> split^#(N, X) , qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , 3: split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , 5: qsort^#(add(N, X)) -> split^#(N, X) , 6: qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , 7: f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , 8: f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , 9: f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Trs: { split(N, nil()) -> pair(nil(), nil()) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1, 2}, Uargs(c_4) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [lt](x1, x2) = [4] [0] = [1] [s](x1) = [1] x1 + [2] [true] = [4] [false] = [4] [append](x1, x2) = [0] [nil] = [0] [add](x1, x2) = [1] x1 + [1] x2 + [7] [split](x1, x2) = [1] x1 + [1] x2 + [2] [pair](x1, x2) = [1] x1 + [1] x2 + [1] [f_1](x1, x2, x3, x4) = [1] x1 + [1] x3 + [7] [f_2](x1, x2, x3, x4, x5, x6) = [1] x1 + [1] x3 + [1] x5 + [1] x6 + [4] [qsort](x1) = [0] [f_3](x1, x2, x3) = [1] x1 + [3] x2 + [7] x3 + [0] [lt^#](x1, x2) = [1] x2 + [4] [append^#](x1, x2) = [2] [split^#](x1, x2) = [2] x2 + [0] [f_1^#](x1, x2, x3, x4) = [1] x3 + [4] [qsort^#](x1) = [2] x1 + [1] [f_3^#](x1, x2, x3) = [2] x1 + [5] [c_1](x1) = [1] x1 + [1] [c_2](x1) = [1] x1 + [0] [c_3](x1, x2) = [2] x1 + [1] x2 + [0] [c_4](x1) = [1] x1 + [0] The order satisfies the following ordering constraints: [lt(0(), s(X))] = [4] >= [4] = [true()] [lt(s(X), 0())] = [4] >= [4] = [false()] [lt(s(X), s(Y))] = [4] >= [4] = [lt(X, Y)] [append(nil(), Y)] = [0] ? [1] Y + [0] = [Y] [append(add(N, X), Y)] = [0] ? [1] N + [7] = [add(N, append(X, Y))] [split(N, nil())] = [1] N + [2] > [1] = [pair(nil(), nil())] [split(N, add(M, Y))] = [1] Y + [1] N + [1] M + [9] >= [1] Y + [1] N + [1] M + [9] = [f_1(split(N, Y), N, M, Y)] [f_1(pair(X, Z), N, M, Y)] = [1] X + [1] M + [1] Z + [8] >= [1] X + [1] M + [1] Z + [8] = [f_2(lt(N, M), N, M, Y, X, Z)] [f_2(true(), N, M, Y, X, Z)] = [1] X + [1] M + [1] Z + [8] >= [1] X + [1] M + [1] Z + [8] = [pair(X, add(M, Z))] [f_2(false(), N, M, Y, X, Z)] = [1] X + [1] M + [1] Z + [8] >= [1] X + [1] M + [1] Z + [8] = [pair(add(M, X), Z)] [qsort(nil())] = [0] >= [0] = [nil()] [qsort(add(N, X))] = [0] ? [8] X + [4] N + [2] = [f_3(split(N, X), N, X)] [f_3(pair(Y, Z), N, X)] = [7] X + [1] Y + [3] N + [1] Z + [1] > [0] = [append(qsort(Y), add(X, qsort(Z)))] [lt^#(s(X), s(Y))] = [1] Y + [6] > [1] Y + [5] = [c_1(lt^#(X, Y))] [append^#(add(N, X), Y)] = [2] >= [2] = [c_2(append^#(X, Y))] [split^#(N, add(M, Y))] = [2] Y + [2] M + [14] > [2] Y + [2] M + [8] = [c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y))] [f_1^#(pair(X, Z), N, M, Y)] = [1] M + [4] >= [1] M + [4] = [c_4(lt^#(N, M))] [qsort^#(add(N, X))] = [2] X + [2] N + [15] > [2] X + [0] = [split^#(N, X)] [qsort^#(add(N, X))] = [2] X + [2] N + [15] > [2] X + [2] N + [9] = [f_3^#(split(N, X), N, X)] [f_3^#(pair(Y, Z), N, X)] = [2] Y + [2] Z + [7] > [2] = [append^#(qsort(Y), add(X, qsort(Z)))] [f_3^#(pair(Y, Z), N, X)] = [2] Y + [2] Z + [7] > [2] Y + [1] = [qsort^#(Y)] [f_3^#(pair(Y, Z), N, X)] = [2] Y + [2] Z + [7] > [2] Z + [1] = [qsort^#(Z)] We return to the main proof. Consider the set of all dependency pairs : { 1: lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , 2: append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , 3: split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , 4: f_1^#(pair(X, Z), N, M, Y) -> c_4(lt^#(N, M)) , 5: qsort^#(add(N, X)) -> split^#(N, X) , 6: qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , 7: f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , 8: f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , 9: f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1,3,5,6,7,8,9}. These cover all (indirect) predecessors of dependency pairs {1,3,4,5,6,7,8,9}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { append^#(add(N, X), Y) -> c_2(append^#(X, Y)) } Weak DPs: { lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_4(lt^#(N, M)) , qsort^#(add(N, X)) -> split^#(N, X) , qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { lt^#(s(X), s(Y)) -> c_1(lt^#(X, Y)) , split^#(N, add(M, Y)) -> c_3(f_1^#(split(N, Y), N, M, Y), split^#(N, Y)) , f_1^#(pair(X, Z), N, M, Y) -> c_4(lt^#(N, M)) , qsort^#(add(N, X)) -> split^#(N, X) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { append^#(add(N, X), Y) -> c_2(append^#(X, Y)) } Weak DPs: { qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , 4: f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , 5: f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Trs: { lt(0(), s(X)) -> true() , lt(s(X), s(Y)) -> lt(X, Y) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [lt](x1, x2) = [2] x2 + [0] [0] = [0] [s](x1) = [1] x1 + [2] [true] = [1] [false] = [0] [append](x1, x2) = [1] x1 + [1] x2 + [0] [nil] = [0] [add](x1, x2) = [1] x2 + [1] [split](x1, x2) = [1] x2 + [1] [pair](x1, x2) = [1] x1 + [1] x2 + [1] [f_1](x1, x2, x3, x4) = [1] x1 + [1] [f_2](x1, x2, x3, x4, x5, x6) = [1] x5 + [1] x6 + [2] [qsort](x1) = [1] x1 + [0] [f_3](x1, x2, x3) = [1] x1 + [0] [lt^#](x1, x2) = [0] [append^#](x1, x2) = [1] x1 + [1] x2 + [6] [split^#](x1, x2) = [0] [f_1^#](x1, x2, x3, x4) = [0] [qsort^#](x1) = [1] x1 + [6] [f_3^#](x1, x2, x3) = [1] x1 + [6] [c_1](x1) = [0] [c_2](x1) = [1] x1 + [0] [c_3](x1, x2) = [0] [c_4](x1) = [0] The order satisfies the following ordering constraints: [lt(0(), s(X))] = [2] X + [4] > [1] = [true()] [lt(s(X), 0())] = [0] >= [0] = [false()] [lt(s(X), s(Y))] = [2] Y + [4] > [2] Y + [0] = [lt(X, Y)] [append(nil(), Y)] = [1] Y + [0] >= [1] Y + [0] = [Y] [append(add(N, X), Y)] = [1] X + [1] Y + [1] >= [1] X + [1] Y + [1] = [add(N, append(X, Y))] [split(N, nil())] = [1] >= [1] = [pair(nil(), nil())] [split(N, add(M, Y))] = [1] Y + [2] >= [1] Y + [2] = [f_1(split(N, Y), N, M, Y)] [f_1(pair(X, Z), N, M, Y)] = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = [f_2(lt(N, M), N, M, Y, X, Z)] [f_2(true(), N, M, Y, X, Z)] = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = [pair(X, add(M, Z))] [f_2(false(), N, M, Y, X, Z)] = [1] X + [1] Z + [2] >= [1] X + [1] Z + [2] = [pair(add(M, X), Z)] [qsort(nil())] = [0] >= [0] = [nil()] [qsort(add(N, X))] = [1] X + [1] >= [1] X + [1] = [f_3(split(N, X), N, X)] [f_3(pair(Y, Z), N, X)] = [1] Y + [1] Z + [1] >= [1] Y + [1] Z + [1] = [append(qsort(Y), add(X, qsort(Z)))] [append^#(add(N, X), Y)] = [1] X + [1] Y + [7] > [1] X + [1] Y + [6] = [c_2(append^#(X, Y))] [qsort^#(add(N, X))] = [1] X + [7] >= [1] X + [7] = [f_3^#(split(N, X), N, X)] [f_3^#(pair(Y, Z), N, X)] = [1] Y + [1] Z + [7] >= [1] Y + [1] Z + [7] = [append^#(qsort(Y), add(X, qsort(Z)))] [f_3^#(pair(Y, Z), N, X)] = [1] Y + [1] Z + [7] > [1] Y + [6] = [qsort^#(Y)] [f_3^#(pair(Y, Z), N, X)] = [1] Y + [1] Z + [7] > [1] Z + [6] = [qsort^#(Z)] We return to the main proof. Consider the set of all dependency pairs : { 1: append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , 2: qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , 3: f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , 4: f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , 5: f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1,4,5}. These cover all (indirect) predecessors of dependency pairs {1,2,3,4,5}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { append^#(add(N, X), Y) -> c_2(append^#(X, Y)) , qsort^#(add(N, X)) -> f_3^#(split(N, X), N, X) , f_3^#(pair(Y, Z), N, X) -> append^#(qsort(Y), add(X, qsort(Z))) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Y) , f_3^#(pair(Y, Z), N, X) -> qsort^#(Z) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { lt(0(), s(X)) -> true() , lt(s(X), 0()) -> false() , lt(s(X), s(Y)) -> lt(X, Y) , append(nil(), Y) -> Y , append(add(N, X), Y) -> add(N, append(X, Y)) , split(N, nil()) -> pair(nil(), nil()) , split(N, add(M, Y)) -> f_1(split(N, Y), N, M, Y) , f_1(pair(X, Z), N, M, Y) -> f_2(lt(N, M), N, M, Y, X, Z) , f_2(true(), N, M, Y, X, Z) -> pair(X, add(M, Z)) , f_2(false(), N, M, Y, X, Z) -> pair(add(M, X), Z) , qsort(nil()) -> nil() , qsort(add(N, X)) -> f_3(split(N, X), N, X) , f_3(pair(Y, Z), N, X) -> append(qsort(Y), add(X, qsort(Z))) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^2))