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: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() , main(x3) -> rec[sort_0][2](x3) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We add the following dependency tuples: Strict DPs: { insert_cond_1^#(True(), x7, x5, x3) -> c_1() , insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[insert_0][3]^#(x6, Nil()) -> c_4() , rec[leq_0][2]^#(0(), x18) -> c_5() , rec[leq_0][2]^#(S(x26), 0()) -> c_6() , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) , rec[sort_0][2]^#(Nil()) -> c_9() , main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) } 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: { insert_cond_1^#(True(), x7, x5, x3) -> c_1() , insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[insert_0][3]^#(x6, Nil()) -> c_4() , rec[leq_0][2]^#(0(), x18) -> c_5() , rec[leq_0][2]^#(S(x26), 0()) -> c_6() , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) , rec[sort_0][2]^#(Nil()) -> c_9() , main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() , main(x3) -> rec[sort_0][2](x3) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We estimate the number of application of {1,4,5,6,9} by applications of Pre({1,4,5,6,9}) = {2,3,7,8,10}. Here rules are labeled as follows: DPs: { 1: insert_cond_1^#(True(), x7, x5, x3) -> c_1() , 2: insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , 3: rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , 4: rec[insert_0][3]^#(x6, Nil()) -> c_4() , 5: rec[leq_0][2]^#(0(), x18) -> c_5() , 6: rec[leq_0][2]^#(S(x26), 0()) -> c_6() , 7: rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , 8: rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) , 9: rec[sort_0][2]^#(Nil()) -> c_9() , 10: main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) , main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) } Weak DPs: { insert_cond_1^#(True(), x7, x5, x3) -> c_1() , rec[insert_0][3]^#(x6, Nil()) -> c_4() , rec[leq_0][2]^#(0(), x18) -> c_5() , rec[leq_0][2]^#(S(x26), 0()) -> c_6() , rec[sort_0][2]^#(Nil()) -> c_9() } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() , main(x3) -> rec[sort_0][2](x3) } 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. { insert_cond_1^#(True(), x7, x5, x3) -> c_1() , rec[insert_0][3]^#(x6, Nil()) -> c_4() , rec[leq_0][2]^#(0(), x18) -> c_5() , rec[leq_0][2]^#(S(x26), 0()) -> c_6() , rec[sort_0][2]^#(Nil()) -> c_9() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) , main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() , main(x3) -> rec[sort_0][2](x3) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Consider the dependency graph 1: insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) -->_1 rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) :2 2: rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) -->_2 rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) :3 -->_1 insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) :1 3: rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) -->_1 rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) :3 4: rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) -->_2 rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) :4 -->_1 rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) :2 5: main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) -->_1 rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) :4 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). { main^#(x3) -> c_10(rec[sort_0][2]^#(x3)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() , main(x3) -> rec[sort_0][2](x3) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We replace rewrite rules by usable rules: Weak Usable Rules: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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 { rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } and lower component { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) } Further, following extension rules are added to the lower component. { rec[sort_0][2]^#(Cons(x10, x6)) -> rec[insert_0][3]^#(x10, rec[sort_0][2](x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> rec[sort_0][2]^#(x6) } 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: { rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'Small Polynomial Path Order (PS,1-bounded)' to orient following rules strictly. DPs: { 1: rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } Trs: { rec[sort_0][2](Nil()) -> Nil() } Sub-proof: ---------- The input was oriented with the instance of 'Small Polynomial Path Order (PS,1-bounded)' as induced by the safe mapping safe(True) = {}, safe(insert_cond_1) = {1, 2, 3}, safe(Cons) = {1, 2}, safe(False) = {}, safe(rec[insert_0][3]) = {}, safe(Nil) = {}, safe(rec[leq_0][2]) = {}, safe(rec[sort_0][2]) = {}, safe(0) = {}, safe(S) = {1}, safe(main) = {}, safe(insert_cond_1^#) = {}, safe(c_1) = {}, safe(c_2) = {}, safe(rec[insert_0][3]^#) = {}, safe(c_3) = {}, safe(rec[leq_0][2]^#) = {}, safe(c_4) = {}, safe(c_5) = {}, safe(c_6) = {}, safe(c_7) = {}, safe(rec[sort_0][2]^#) = {}, safe(c_8) = {}, safe(c_9) = {}, safe(main^#) = {}, safe(c_10) = {} and precedence insert_cond_1 > rec[insert_0][3], insert_cond_1 > rec[leq_0][2], insert_cond_1 > rec[sort_0][2], rec[sort_0][2] > rec[insert_0][3], rec[sort_0][2] > rec[leq_0][2], rec[sort_0][2]^# > insert_cond_1, rec[sort_0][2]^# > rec[insert_0][3], rec[sort_0][2]^# > rec[leq_0][2], rec[sort_0][2]^# > rec[sort_0][2], rec[insert_0][3] ~ rec[leq_0][2] . Following symbols are considered recursive: {rec[sort_0][2]^#} The recursion depth is 1. Further, following argument filtering is employed: pi(True) = [], pi(insert_cond_1) = [1, 2, 3, 4], pi(Cons) = [2], pi(False) = [], pi(rec[insert_0][3]) = [1, 2], pi(Nil) = [], pi(rec[leq_0][2]) = 2, pi(rec[sort_0][2]) = [], pi(0) = [], pi(S) = [], pi(main) = [], pi(insert_cond_1^#) = [], pi(c_1) = [], pi(c_2) = [], pi(rec[insert_0][3]^#) = [], pi(c_3) = [], pi(rec[leq_0][2]^#) = [], pi(c_4) = [], pi(c_5) = [], pi(c_6) = [], pi(c_7) = [], pi(rec[sort_0][2]^#) = [1], pi(c_8) = [1, 2], pi(c_9) = [], pi(main^#) = [], pi(c_10) = [] Usable defined function symbols are a subset of: {insert_cond_1^#, rec[insert_0][3]^#, rec[leq_0][2]^#, rec[sort_0][2]^#, main^#} For your convenience, here are the satisfied ordering constraints: pi(rec[sort_0][2]^#(Cons(x10, x6))) = rec[sort_0][2]^#(Cons(; x6);) > c_8(rec[insert_0][3]^#(), rec[sort_0][2]^#(x6;);) = pi(c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6))) 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: { rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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. { rec[sort_0][2]^#(Cons(x10, x6)) -> c_8(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)), rec[sort_0][2]^#(x6)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) , rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) } Weak DPs: { rec[sort_0][2]^#(Cons(x10, x6)) -> rec[insert_0][3]^#(x10, rec[sort_0][2](x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> rec[sort_0][2]^#(x6) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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: { 3: rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , 4: rec[sort_0][2]^#(Cons(x10, x6)) -> rec[insert_0][3]^#(x10, rec[sort_0][2](x6)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_2) = {1}, Uargs(c_3) = {1, 2}, Uargs(c_7) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [True] = [0] [insert_cond_1](x1, x2, x3, x4) = [1] x2 + [1] x3 + [1] x4 + [0] [Cons](x1, x2) = [1] x1 + [1] x2 + [0] [False] = [0] [rec[insert_0][3]](x1, x2) = [1] x1 + [1] x2 + [0] [Nil] = [0] [rec[leq_0][2]](x1, x2) = [0] [rec[sort_0][2]](x1) = [1] x1 + [0] [0] = [0] [S](x1) = [1] x1 + [4] [main](x1) = [7] x1 + [0] [insert_cond_1^#](x1, x2, x3, x4) = [4] x4 + [0] [c_1] = [0] [c_2](x1) = [1] x1 + [0] [rec[insert_0][3]^#](x1, x2) = [4] x2 + [0] [c_3](x1, x2) = [1] x1 + [2] x2 + [0] [rec[leq_0][2]^#](x1, x2) = [2] x2 + [0] [c_4] = [0] [c_5] = [0] [c_6] = [0] [c_7](x1) = [1] x1 + [5] [rec[sort_0][2]^#](x1) = [4] x1 + [5] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9] = [0] [main^#](x1) = [7] x1 + [0] [c_10](x1) = [7] x1 + [0] The following symbols are considered usable {insert_cond_1, rec[insert_0][3], rec[leq_0][2], rec[sort_0][2], insert_cond_1^#, rec[insert_0][3]^#, rec[leq_0][2]^#, rec[sort_0][2]^#} The order satisfies the following ordering constraints: [insert_cond_1(True(), x7, x5, x3)] = [1] x7 + [1] x5 + [1] x3 + [0] >= [1] x7 + [1] x5 + [1] x3 + [0] = [Cons(x7, Cons(x5, x3))] [insert_cond_1(False(), x7, x5, x3)] = [1] x7 + [1] x5 + [1] x3 + [0] >= [1] x7 + [1] x5 + [1] x3 + [0] = [Cons(x5, rec[insert_0][3](x7, x3))] [rec[insert_0][3](x14, Cons(x10, x6))] = [1] x6 + [1] x14 + [1] x10 + [0] >= [1] x6 + [1] x14 + [1] x10 + [0] = [insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6)] [rec[insert_0][3](x6, Nil())] = [1] x6 + [0] >= [1] x6 + [0] = [Cons(x6, Nil())] [rec[leq_0][2](0(), x18)] = [0] >= [0] = [True()] [rec[leq_0][2](S(x26), 0())] = [0] >= [0] = [False()] [rec[leq_0][2](S(x10), S(x6))] = [0] >= [0] = [rec[leq_0][2](x10, x6)] [rec[sort_0][2](Cons(x10, x6))] = [1] x6 + [1] x10 + [0] >= [1] x6 + [1] x10 + [0] = [rec[insert_0][3](x10, rec[sort_0][2](x6))] [rec[sort_0][2](Nil())] = [0] >= [0] = [Nil()] [insert_cond_1^#(False(), x7, x5, x3)] = [4] x3 + [0] >= [4] x3 + [0] = [c_2(rec[insert_0][3]^#(x7, x3))] [rec[insert_0][3]^#(x14, Cons(x10, x6))] = [4] x6 + [4] x10 + [0] >= [4] x6 + [4] x10 + [0] = [c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10))] [rec[leq_0][2]^#(S(x10), S(x6))] = [2] x6 + [8] > [2] x6 + [5] = [c_7(rec[leq_0][2]^#(x10, x6))] [rec[sort_0][2]^#(Cons(x10, x6))] = [4] x6 + [4] x10 + [5] > [4] x6 + [0] = [rec[insert_0][3]^#(x10, rec[sort_0][2](x6))] [rec[sort_0][2]^#(Cons(x10, x6))] = [4] x6 + [4] x10 + [5] >= [4] x6 + [5] = [rec[sort_0][2]^#(x6)] 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: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) } Weak DPs: { rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> rec[insert_0][3]^#(x10, rec[sort_0][2](x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> rec[sort_0][2]^#(x6) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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. { rec[leq_0][2]^#(S(x10), S(x6)) -> c_7(rec[leq_0][2]^#(x10, x6)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insert_cond_1^#(False(), x7, x5, x3) -> c_2(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) } Weak DPs: { rec[sort_0][2]^#(Cons(x10, x6)) -> rec[insert_0][3]^#(x10, rec[sort_0][2](x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> rec[sort_0][2]^#(x6) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_3(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6), rec[leq_0][2]^#(x14, x10)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insert_cond_1^#(False(), x7, x5, x3) -> c_1(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_2(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6)) } Weak DPs: { rec[sort_0][2]^#(Cons(x10, x6)) -> c_3(rec[insert_0][3]^#(x10, rec[sort_0][2](x6))) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_4(rec[sort_0][2]^#(x6)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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: rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_2(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1}, Uargs(c_4) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [True] = [0] [insert_cond_1](x1, x2, x3, x4) = [1] x2 + [1] x3 + [1] x4 + [0] [Cons](x1, x2) = [1] x1 + [1] x2 + [0] [False] = [1] [rec[insert_0][3]](x1, x2) = [1] x1 + [1] x2 + [0] [Nil] = [0] [rec[leq_0][2]](x1, x2) = [1] x2 + [0] [rec[sort_0][2]](x1) = [1] x1 + [0] [0] = [1] [S](x1) = [1] x1 + [0] [main](x1) = [7] x1 + [0] [insert_cond_1^#](x1, x2, x3, x4) = [2] x1 + [2] x4 + [2] [c_1] = [0] [c_2](x1) = [7] x1 + [0] [rec[insert_0][3]^#](x1, x2) = [2] x2 + [4] [c_3](x1, x2) = [7] x1 + [7] x2 + [0] [rec[leq_0][2]^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_4] = [0] [c_5] = [0] [c_6] = [0] [c_7](x1) = [7] x1 + [0] [rec[sort_0][2]^#](x1) = [2] x1 + [4] [c_8](x1, x2) = [7] x1 + [7] x2 + [0] [c_9] = [0] [main^#](x1) = [7] x1 + [0] [c_10](x1) = [7] x1 + [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] [c_3](x1) = [1] x1 + [0] [c_4](x1) = [1] x1 + [0] The following symbols are considered usable {insert_cond_1, rec[insert_0][3], rec[leq_0][2], rec[sort_0][2], insert_cond_1^#, rec[insert_0][3]^#, rec[sort_0][2]^#} The order satisfies the following ordering constraints: [insert_cond_1(True(), x7, x5, x3)] = [1] x7 + [1] x5 + [1] x3 + [0] >= [1] x7 + [1] x5 + [1] x3 + [0] = [Cons(x7, Cons(x5, x3))] [insert_cond_1(False(), x7, x5, x3)] = [1] x7 + [1] x5 + [1] x3 + [0] >= [1] x7 + [1] x5 + [1] x3 + [0] = [Cons(x5, rec[insert_0][3](x7, x3))] [rec[insert_0][3](x14, Cons(x10, x6))] = [1] x6 + [1] x14 + [1] x10 + [0] >= [1] x6 + [1] x14 + [1] x10 + [0] = [insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6)] [rec[insert_0][3](x6, Nil())] = [1] x6 + [0] >= [1] x6 + [0] = [Cons(x6, Nil())] [rec[leq_0][2](0(), x18)] = [1] x18 + [0] >= [0] = [True()] [rec[leq_0][2](S(x26), 0())] = [1] >= [1] = [False()] [rec[leq_0][2](S(x10), S(x6))] = [1] x6 + [0] >= [1] x6 + [0] = [rec[leq_0][2](x10, x6)] [rec[sort_0][2](Cons(x10, x6))] = [1] x6 + [1] x10 + [0] >= [1] x6 + [1] x10 + [0] = [rec[insert_0][3](x10, rec[sort_0][2](x6))] [rec[sort_0][2](Nil())] = [0] >= [0] = [Nil()] [insert_cond_1^#(False(), x7, x5, x3)] = [2] x3 + [4] >= [2] x3 + [4] = [c_1(rec[insert_0][3]^#(x7, x3))] [rec[insert_0][3]^#(x14, Cons(x10, x6))] = [2] x6 + [2] x10 + [4] > [2] x6 + [2] x10 + [2] = [c_2(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6))] [rec[sort_0][2]^#(Cons(x10, x6))] = [2] x6 + [2] x10 + [4] >= [2] x6 + [4] = [c_3(rec[insert_0][3]^#(x10, rec[sort_0][2](x6)))] [rec[sort_0][2]^#(Cons(x10, x6))] = [2] x6 + [2] x10 + [4] >= [2] x6 + [4] = [c_4(rec[sort_0][2]^#(x6))] We return to the main proof. Consider the set of all dependency pairs : { 1: insert_cond_1^#(False(), x7, x5, x3) -> c_1(rec[insert_0][3]^#(x7, x3)) , 2: rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_2(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6)) , 3: rec[sort_0][2]^#(Cons(x10, x6)) -> c_3(rec[insert_0][3]^#(x10, rec[sort_0][2](x6))) , 4: rec[sort_0][2]^#(Cons(x10, x6)) -> c_4(rec[sort_0][2]^#(x6)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {2}. 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: { insert_cond_1^#(False(), x7, x5, x3) -> c_1(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_2(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_3(rec[insert_0][3]^#(x10, rec[sort_0][2](x6))) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_4(rec[sort_0][2]^#(x6)) } Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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. { insert_cond_1^#(False(), x7, x5, x3) -> c_1(rec[insert_0][3]^#(x7, x3)) , rec[insert_0][3]^#(x14, Cons(x10, x6)) -> c_2(insert_cond_1^#(rec[leq_0][2](x14, x10), x14, x10, x6)) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_3(rec[insert_0][3]^#(x10, rec[sort_0][2](x6))) , rec[sort_0][2]^#(Cons(x10, x6)) -> c_4(rec[sort_0][2]^#(x6)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { insert_cond_1(True(), x7, x5, x3) -> Cons(x7, Cons(x5, x3)) , insert_cond_1(False(), x7, x5, x3) -> Cons(x5, rec[insert_0][3](x7, x3)) , rec[insert_0][3](x14, Cons(x10, x6)) -> insert_cond_1(rec[leq_0][2](x14, x10), x14, x10, x6) , rec[insert_0][3](x6, Nil()) -> Cons(x6, Nil()) , rec[leq_0][2](0(), x18) -> True() , rec[leq_0][2](S(x26), 0()) -> False() , rec[leq_0][2](S(x10), S(x6)) -> rec[leq_0][2](x10, x6) , rec[sort_0][2](Cons(x10, x6)) -> rec[insert_0][3](x10, rec[sort_0][2](x6)) , rec[sort_0][2](Nil()) -> Nil() } 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))