We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict Trs: { ordered(Cons(x', Cons(x, xs))) -> ordered[Ite](<(x', x), Cons(x', Cons(x, xs))) , ordered(Cons(x, Nil())) -> True() , ordered(Nil()) -> True() , notEmpty(Cons(x, xs)) -> True() , notEmpty(Nil()) -> False() , goal(xs) -> ordered(xs) } Weak Trs: { ordered[Ite](True(), Cons(x', Cons(x, xs))) -> ordered(xs) , ordered[Ite](False(), xs) -> False() , <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We add the following weak dependency pairs: Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() , notEmpty^#(Cons(x, xs)) -> c_4() , notEmpty^#(Nil()) -> c_5() , goal^#(xs) -> c_6(ordered^#(xs)) } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , ordered[Ite]^#(False(), xs) -> c_8() , <^#(x, 0()) -> c_9() , <^#(S(x), S(y)) -> c_10(<^#(x, y)) , <^#(0(), S(y)) -> c_11() } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() , notEmpty^#(Cons(x, xs)) -> c_4() , notEmpty^#(Nil()) -> c_5() , goal^#(xs) -> c_6(ordered^#(xs)) } Strict Trs: { ordered(Cons(x', Cons(x, xs))) -> ordered[Ite](<(x', x), Cons(x', Cons(x, xs))) , ordered(Cons(x, Nil())) -> True() , ordered(Nil()) -> True() , notEmpty(Cons(x, xs)) -> True() , notEmpty(Nil()) -> False() , goal(xs) -> ordered(xs) } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , ordered[Ite]^#(False(), xs) -> c_8() , <^#(x, 0()) -> c_9() , <^#(S(x), S(y)) -> c_10(<^#(x, y)) , <^#(0(), S(y)) -> c_11() } Weak Trs: { ordered[Ite](True(), Cons(x', Cons(x, xs))) -> ordered(xs) , ordered[Ite](False(), xs) -> False() , <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We replace rewrite rules by usable rules: Weak Usable Rules: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() , notEmpty^#(Cons(x, xs)) -> c_4() , notEmpty^#(Nil()) -> c_5() , goal^#(xs) -> c_6(ordered^#(xs)) } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , ordered[Ite]^#(False(), xs) -> c_8() , <^#(x, 0()) -> c_9() , <^#(S(x), S(y)) -> c_10(<^#(x, y)) , <^#(0(), S(y)) -> c_11() } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) The weightgap principle applies (using the following constant growth matrix-interpretation) The following argument positions are usable: Uargs(c_1) = {1}, Uargs(ordered[Ite]^#) = {1}, Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(c_10) = {1} TcT has computed the following constructor-restricted matrix interpretation. [True] = [0] [0] [<](x1, x2) = [0] [0] [S](x1) = [1 0] x1 + [0] [0 0] [0] [Cons](x1, x2) = [0] [0] [Nil] = [0] [0] [0] = [0] [0] [False] = [0] [0] [ordered^#](x1) = [0] [0] [c_1](x1) = [1 0] x1 + [2] [0 1] [1] [ordered[Ite]^#](x1, x2) = [2 0] x1 + [0] [0 0] [0] [c_2] = [0] [0] [c_3] = [0] [0] [notEmpty^#](x1) = [0] [0] [c_4] = [0] [0] [c_5] = [0] [0] [goal^#](x1) = [1 1] x1 + [2] [1 2] [2] [c_6](x1) = [1 0] x1 + [0] [0 1] [0] [c_7](x1) = [1 0] x1 + [0] [0 1] [0] [c_8] = [0] [0] [<^#](x1, x2) = [0] [0] [c_9] = [0] [0] [c_10](x1) = [1 0] x1 + [0] [0 1] [0] [c_11] = [0] [0] The order satisfies the following ordering constraints: [<(x, 0())] = [0] [0] >= [0] [0] = [False()] [<(S(x), S(y))] = [0] [0] >= [0] [0] = [<(x, y)] [<(0(), S(y))] = [0] [0] >= [0] [0] = [True()] [ordered^#(Cons(x', Cons(x, xs)))] = [0] [0] ? [2] [1] = [c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs))))] [ordered^#(Cons(x, Nil()))] = [0] [0] >= [0] [0] = [c_2()] [ordered^#(Nil())] = [0] [0] >= [0] [0] = [c_3()] [ordered[Ite]^#(True(), Cons(x', Cons(x, xs)))] = [0] [0] >= [0] [0] = [c_7(ordered^#(xs))] [ordered[Ite]^#(False(), xs)] = [0] [0] >= [0] [0] = [c_8()] [notEmpty^#(Cons(x, xs))] = [0] [0] >= [0] [0] = [c_4()] [notEmpty^#(Nil())] = [0] [0] >= [0] [0] = [c_5()] [goal^#(xs)] = [1 1] xs + [2] [1 2] [2] > [0] [0] = [c_6(ordered^#(xs))] [<^#(x, 0())] = [0] [0] >= [0] [0] = [c_9()] [<^#(S(x), S(y))] = [0] [0] >= [0] [0] = [c_10(<^#(x, y))] [<^#(0(), S(y))] = [0] [0] >= [0] [0] = [c_11()] 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^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() , notEmpty^#(Cons(x, xs)) -> c_4() , notEmpty^#(Nil()) -> c_5() } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , ordered[Ite]^#(False(), xs) -> c_8() , goal^#(xs) -> c_6(ordered^#(xs)) , <^#(x, 0()) -> c_9() , <^#(S(x), S(y)) -> c_10(<^#(x, y)) , <^#(0(), S(y)) -> c_11() } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We estimate the number of application of {4,5} by applications of Pre({4,5}) = {}. Here rules are labeled as follows: DPs: { 1: ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , 2: ordered^#(Cons(x, Nil())) -> c_2() , 3: ordered^#(Nil()) -> c_3() , 4: notEmpty^#(Cons(x, xs)) -> c_4() , 5: notEmpty^#(Nil()) -> c_5() , 6: ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , 7: ordered[Ite]^#(False(), xs) -> c_8() , 8: goal^#(xs) -> c_6(ordered^#(xs)) , 9: <^#(x, 0()) -> c_9() , 10: <^#(S(x), S(y)) -> c_10(<^#(x, y)) , 11: <^#(0(), S(y)) -> c_11() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , ordered[Ite]^#(False(), xs) -> c_8() , notEmpty^#(Cons(x, xs)) -> c_4() , notEmpty^#(Nil()) -> c_5() , goal^#(xs) -> c_6(ordered^#(xs)) , <^#(x, 0()) -> c_9() , <^#(S(x), S(y)) -> c_10(<^#(x, y)) , <^#(0(), S(y)) -> c_11() } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } 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. { ordered[Ite]^#(False(), xs) -> c_8() , notEmpty^#(Cons(x, xs)) -> c_4() , notEmpty^#(Nil()) -> c_5() , <^#(x, 0()) -> c_9() , <^#(S(x), S(y)) -> c_10(<^#(x, y)) , <^#(0(), S(y)) -> c_11() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) , goal^#(xs) -> c_6(ordered^#(xs)) } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Consider the dependency graph 1: ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) -->_1 ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) :4 2: ordered^#(Cons(x, Nil())) -> c_2() 3: ordered^#(Nil()) -> c_3() 4: ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) -->_1 ordered^#(Nil()) -> c_3() :3 -->_1 ordered^#(Cons(x, Nil())) -> c_2() :2 -->_1 ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) :1 5: goal^#(xs) -> c_6(ordered^#(xs)) -->_1 ordered^#(Nil()) -> c_3() :3 -->_1 ordered^#(Cons(x, Nil())) -> c_2() :2 -->_1 ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) :1 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). { goal^#(xs) -> c_6(ordered^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } 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: { 2: ordered^#(Cons(x, Nil())) -> c_2() , 3: ordered^#(Nil()) -> c_3() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_7) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [True] = [0] [<](x1, x2) = [0] [S](x1) = [1] x1 + [0] [Cons](x1, x2) = [0] [Nil] = [0] [0] = [0] [False] = [0] [ordered^#](x1) = [1] [c_1](x1) = [1] x1 + [0] [ordered[Ite]^#](x1, x2) = [1] [c_2] = [0] [c_3] = [0] [c_7](x1) = [1] x1 + [0] The order satisfies the following ordering constraints: [<(x, 0())] = [0] >= [0] = [False()] [<(S(x), S(y))] = [0] >= [0] = [<(x, y)] [<(0(), S(y))] = [0] >= [0] = [True()] [ordered^#(Cons(x', Cons(x, xs)))] = [1] >= [1] = [c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs))))] [ordered^#(Cons(x, Nil()))] = [1] > [0] = [c_2()] [ordered^#(Nil())] = [1] > [0] = [c_3()] [ordered[Ite]^#(True(), Cons(x', Cons(x, xs)))] = [1] >= [1] = [c_7(ordered^#(xs))] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) } Weak DPs: { ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() , ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } 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. { ordered^#(Cons(x, Nil())) -> c_2() , ordered^#(Nil()) -> c_3() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) } Weak DPs: { ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } 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: ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , 2: ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_7) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [True] = [0] [<](x1, x2) = [0] [S](x1) = [1] x1 + [0] [Cons](x1, x2) = [1] x2 + [4] [Nil] = [0] [0] = [0] [False] = [0] [ordered^#](x1) = [1] x1 + [4] [c_1](x1) = [1] x1 + [1] [ordered[Ite]^#](x1, x2) = [1] x2 + [1] [c_2] = [0] [c_3] = [0] [c_7](x1) = [1] x1 + [4] The order satisfies the following ordering constraints: [<(x, 0())] = [0] >= [0] = [False()] [<(S(x), S(y))] = [0] >= [0] = [<(x, y)] [<(0(), S(y))] = [0] >= [0] = [True()] [ordered^#(Cons(x', Cons(x, xs)))] = [1] xs + [12] > [1] xs + [10] = [c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs))))] [ordered[Ite]^#(True(), Cons(x', Cons(x, xs)))] = [1] xs + [9] > [1] xs + [8] = [c_7(ordered^#(xs))] The strictly oriented rules are moved into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) } Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } 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. { ordered^#(Cons(x', Cons(x, xs))) -> c_1(ordered[Ite]^#(<(x', x), Cons(x', Cons(x, xs)))) , ordered[Ite]^#(True(), Cons(x', Cons(x, xs))) -> c_7(ordered^#(xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { <(x, 0()) -> False() , <(S(x), S(y)) -> <(x, y) , <(0(), S(y)) -> True() } 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^1))