WORST_CASE(?,O(n^2)) * Step 1: Desugar WORST_CASE(?,O(n^2)) + Considered Problem: type nat = 0 | S of nat ;; type 'a list = Nil | Cons of 'a * 'a list ;; type bool = False | True ;; let rec leq x y = match x with | 0 -> True | S(x') -> match y with | 0 -> False | S(y') -> leq x' y' ;; let rec insert ord x ys = match ys with | Nil -> Cons(x,Nil) | Cons(y,ys') -> match ord x y with | True -> Cons(x,Cons(y,ys')) | False -> Cons(y,insert ord x ys') ;; let rec fold f z xs = match xs with | Nil -> z | Cons(x,xs') -> f x (fold f z xs') ;; let isort ys = fold (insert leq) Nil ys ;; + Applied Processor: Desugar {analysedFunction = Nothing} + Details: none * Step 2: Defunctionalization WORST_CASE(?,O(n^2)) + Considered Problem: λys : nat list. (λleq : nat -> nat -> bool. (λinsert : (nat -> nat -> bool) -> nat -> nat list -> nat list. (λfold : (nat -> nat list -> nat list) -> nat list -> nat list -> nat list. (λisort : nat list -> nat list. isort ys) (λys : nat list. fold (insert leq) Nil ys)) (μfold : (nat -> nat list -> nat list) -> nat list -> nat list -> nat list. λf : nat -> nat list -> nat list. λz : nat list. λxs : nat list. case xs of | Nil -> z | Cons -> λx : nat. λxs' : nat list. f x (fold f z xs'))) (μinsert : (nat -> nat -> bool) -> nat -> nat list -> nat list. λord : nat -> nat -> bool. λx : nat. λys : nat list. case ys of | Nil -> Cons(x,Nil) | Cons -> λy : nat. λys' : nat list. case ord x y of | True -> Cons(x,Cons(y,ys')) | False -> Cons(y,insert ord x ys'))) (μleq : nat -> nat -> bool. λx : nat. λy : nat. case x of | 0 -> True | S -> λx' : nat. case y of | 0 -> False | S -> λy' : nat. leq x' y') : nat list -> nat list where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool + Applied Processor: Defunctionalization + Details: none * Step 3: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x0, x1, x2) x3 -> main_4(x0) isort(x1, x2, x3) 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x3, x4) x5 -> cond_fold_f_z_xs(x5, x3, x4) 7: fold_f(x3) x4 -> fold_f_z(x3, x4) 8: fold_1() x3 -> fold_f(x3) 9: fold() x0 -> fold_1() x0 10: main_2(x0, x1) x2 -> main_3(x0, x1, x2) fold() 11: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 12: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 13: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 14: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 15: insert_ord_x(x2, x3) x4 -> cond_insert_ord_x_ys(x4, x2, x3) 16: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 17: insert_1() x2 -> insert_ord(x2) 18: insert() x0 -> insert_1() x0 19: main_1(x0) x1 -> main_2(x0, x1) insert() 20: cond_leq_x_y_1(0(), x3) -> False() 21: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 22: cond_leq_x_y(0(), x2) -> True() 23: cond_leq_x_y(S(x3), x2) -> cond_leq_x_y_1(x2, x3) 24: leq_x(x1) x2 -> cond_leq_x_y(x1, x2) 25: leq_1() x1 -> leq_x(x1) 26: leq() x0 -> leq_1() x0 27: main(x0) -> main_1(x0) leq() where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 4: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x0, x3, x5) x7 -> isort(x3, x5, x7) x0 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x3, x4) x5 -> cond_fold_f_z_xs(x5, x3, x4) 7: fold_f(x3) x4 -> fold_f_z(x3, x4) 8: fold_1() x3 -> fold_f(x3) 9: fold() x6 -> fold_f(x6) 10: main_2(x0, x2) x4 -> main_4(x0) isort(x2, x4, fold()) 11: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 12: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 13: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 14: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 15: insert_ord_x(x2, x3) x4 -> cond_insert_ord_x_ys(x4, x2, x3) 16: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 17: insert_1() x2 -> insert_ord(x2) 18: insert() x4 -> insert_ord(x4) 19: main_1(x0) x2 -> main_3(x0, x2, insert()) fold() 20: cond_leq_x_y_1(0(), x3) -> False() 21: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 22: cond_leq_x_y(0(), x2) -> True() 23: cond_leq_x_y(S(x3), x2) -> cond_leq_x_y_1(x2, x3) 24: leq_x(x1) x2 -> cond_leq_x_y(x1, x2) 25: leq_1() x1 -> leq_x(x1) 26: leq() x2 -> leq_x(x2) 27: main(x0) -> main_2(x0, leq()) insert() where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 5: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x3, x4) x5 -> cond_fold_f_z_xs(x5, x3, x4) 7: fold_f(x3) x4 -> fold_f_z(x3, x4) 8: fold_1() x3 -> fold_f(x3) 9: fold() x6 -> fold_f(x6) 10: main_2(x0, x5) x9 -> isort(x5, x9, fold()) x0 11: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 12: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 13: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 14: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 15: insert_ord_x(x2, x3) x4 -> cond_insert_ord_x_ys(x4, x2, x3) 16: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 17: insert_1() x2 -> insert_ord(x2) 18: insert() x4 -> insert_ord(x4) 19: main_1(x0) x6 -> isort(x6, insert(), fold()) x0 20: cond_leq_x_y_1(0(), x3) -> False() 21: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 22: cond_leq_x_y(0(), x2) -> True() 23: cond_leq_x_y(S(x3), x2) -> cond_leq_x_y_1(x2, x3) 24: leq_x(x1) x2 -> cond_leq_x_y(x1, x2) 25: leq_1() x1 -> leq_x(x1) 26: leq() x2 -> leq_x(x2) 27: main(x0) -> main_4(x0) isort(leq(), insert(), fold()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 6: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x3, x4) x5 -> cond_fold_f_z_xs(x5, x3, x4) 7: fold_f(x3) x4 -> fold_f_z(x3, x4) 8: fold_1() x3 -> fold_f(x3) 9: fold() x6 -> fold_f(x6) 10: main_2(x8, x2) x4 -> fold() (x4 x2) Nil() x8 11: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 12: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 13: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 14: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 15: insert_ord_x(x2, x3) x4 -> cond_insert_ord_x_ys(x4, x2, x3) 16: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 17: insert_1() x2 -> insert_ord(x2) 18: insert() x4 -> insert_ord(x4) 19: main_1(x8) x2 -> fold() (insert() x2) Nil() x8 20: cond_leq_x_y_1(0(), x3) -> False() 21: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 22: cond_leq_x_y(0(), x2) -> True() 23: cond_leq_x_y(S(x3), x2) -> cond_leq_x_y_1(x2, x3) 24: leq_x(x1) x2 -> cond_leq_x_y(x1, x2) 25: leq_1() x1 -> leq_x(x1) 26: leq() x2 -> leq_x(x2) 27: main(x0) -> isort(leq(), insert(), fold()) x0 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 7: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x3, x4) x5 -> cond_fold_f_z_xs(x5, x3, x4) 7: fold_f(x3) x4 -> fold_f_z(x3, x4) 8: fold_1() x3 -> fold_f(x3) 9: fold() x6 -> fold_f(x6) 10: main_2(x8, x2) x4 -> fold() (x4 x2) Nil() x8 11: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 12: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 13: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 14: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 15: insert_ord_x(x2, x3) x4 -> cond_insert_ord_x_ys(x4, x2, x3) 16: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 17: insert_1() x2 -> insert_ord(x2) 18: insert() x4 -> insert_ord(x4) 19: main_1(x8) x2 -> fold() (insert() x2) Nil() x8 20: cond_leq_x_y_1(0(), x3) -> False() 21: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 22: cond_leq_x_y(0(), x2) -> True() 23: cond_leq_x_y(S(x3), x2) -> cond_leq_x_y_1(x2, x3) 24: leq_x(x1) x2 -> cond_leq_x_y(x1, x2) 25: leq_1() x1 -> leq_x(x1) 26: leq() x2 -> leq_x(x2) 27: main(x8) -> fold() (insert() leq()) Nil() x8 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 8: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x6, x8) Nil() -> x8 7: fold_f_z(x6, x8) Cons(x12, x14) -> x6 x12 (fold() x6 x8 x14) 8: fold_f(x3) x4 -> fold_f_z(x3, x4) 9: fold_1() x3 -> fold_f(x3) 10: fold() x6 -> fold_f(x6) 11: main_2(x8, x2) x4 -> fold() (x4 x2) Nil() x8 12: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 13: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 14: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 15: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 16: insert_ord_x(x4, x6) Nil() -> Cons(x6, Nil()) 17: insert_ord_x(x4, x6) Cons(x10, x12) -> cond_insert_ord_x_ys_1(x4 x6 x10, x4, x6, x10, x12) 18: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 19: insert_1() x2 -> insert_ord(x2) 20: insert() x4 -> insert_ord(x4) 21: main_1(x8) x2 -> fold() (insert() x2) Nil() x8 22: cond_leq_x_y_1(0(), x3) -> False() 23: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 24: cond_leq_x_y(0(), x2) -> True() 25: cond_leq_x_y(S(x6), 0()) -> False() 26: cond_leq_x_y(S(x6), S(x8)) -> leq() x6 x8 27: leq_x(0()) x4 -> True() 28: leq_x(S(x6)) x4 -> cond_leq_x_y_1(x4, x6) 29: leq_1() x1 -> leq_x(x1) 30: leq() x2 -> leq_x(x2) 31: main(x8) -> fold() (insert() leq()) Nil() x8 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 9: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 4: cond_fold_f_z_xs(Nil(), x3, x4) -> x4 5: cond_fold_f_z_xs(Cons(x6, x7), x3, x4) -> x3 x6 (fold() x3 x4 x7) 6: fold_f_z(x6, x8) Nil() -> x8 7: fold_f_z(x6, x8) Cons(x12, x14) -> x6 x12 (fold() x6 x8 x14) 8: fold_f(x3) x4 -> fold_f_z(x3, x4) 9: fold_1() x3 -> fold_f(x3) 10: fold() x6 -> fold_f(x6) 11: main_2(x8, x2) x4 -> fold() (x4 x2) Nil() x8 12: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 13: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 14: cond_insert_ord_x_ys(Nil(), x2, x3) -> Cons(x3, Nil()) 15: cond_insert_ord_x_ys(Cons(x5, x6), x2, x3) -> cond_insert_ord_x_ys_1(x2 x3 x5, x2, x3, x5, x6) 16: insert_ord_x(x4, x6) Nil() -> Cons(x6, Nil()) 17: insert_ord_x(x4, x6) Cons(x10, x12) -> cond_insert_ord_x_ys_1(x4 x6 x10, x4, x6, x10, x12) 18: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 19: insert_1() x2 -> insert_ord(x2) 20: insert() x4 -> insert_ord(x4) 21: main_1(x8) x2 -> fold() (insert() x2) Nil() x8 22: cond_leq_x_y_1(0(), x3) -> False() 23: cond_leq_x_y_1(S(x4), x3) -> leq() x3 x4 24: cond_leq_x_y(0(), x2) -> True() 25: cond_leq_x_y(S(x6), 0()) -> False() 26: cond_leq_x_y(S(x6), S(x8)) -> leq() x6 x8 27: leq_x(0()) x4 -> True() 28: leq_x(S(x6)) 0() -> False() 29: leq_x(S(x6)) S(x8) -> leq() x6 x8 30: leq_1() x1 -> leq_x(x1) 31: leq() x2 -> leq_x(x2) 32: main(x8) -> fold() (insert() leq()) Nil() x8 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_fold_f_z_xs :: nat list -> (nat -> nat list -> nat list) -> nat list -> nat list cond_leq_x_y :: nat -> nat -> bool cond_insert_ord_x_ys :: nat list -> (nat -> nat -> bool) -> nat -> nat list cond_leq_x_y_1 :: nat -> nat -> bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 10: NeededRules WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 6: fold_f_z(x6, x8) Nil() -> x8 7: fold_f_z(x6, x8) Cons(x12, x14) -> x6 x12 (fold() x6 x8 x14) 8: fold_f(x3) x4 -> fold_f_z(x3, x4) 9: fold_1() x3 -> fold_f(x3) 10: fold() x6 -> fold_f(x6) 11: main_2(x8, x2) x4 -> fold() (x4 x2) Nil() x8 12: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 13: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 16: insert_ord_x(x4, x6) Nil() -> Cons(x6, Nil()) 17: insert_ord_x(x4, x6) Cons(x10, x12) -> cond_insert_ord_x_ys_1(x4 x6 x10, x4, x6, x10, x12) 18: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 19: insert_1() x2 -> insert_ord(x2) 20: insert() x4 -> insert_ord(x4) 21: main_1(x8) x2 -> fold() (insert() x2) Nil() x8 27: leq_x(0()) x4 -> True() 28: leq_x(S(x6)) 0() -> False() 29: leq_x(S(x6)) S(x8) -> leq() x6 x8 30: leq_1() x1 -> leq_x(x1) 31: leq() x2 -> leq_x(x2) 32: main(x8) -> fold() (insert() leq()) Nil() x8 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: NeededRules + Details: none * Step 11: CFA WORST_CASE(?,O(n^2)) + Considered Problem: 1: main_4(x0) x4 -> x4 x0 2: isort(x1, x2, x3) x4 -> x3 (x2 x1) Nil() x4 3: main_3(x8, x2, x4) x6 -> x6 (x4 x2) Nil() x8 4: fold_f_z(x6, x8) Nil() -> x8 5: fold_f_z(x6, x8) Cons(x12, x14) -> x6 x12 (fold() x6 x8 x14) 6: fold_f(x3) x4 -> fold_f_z(x3, x4) 7: fold_1() x3 -> fold_f(x3) 8: fold() x6 -> fold_f(x6) 9: main_2(x8, x2) x4 -> fold() (x4 x2) Nil() x8 10: cond_insert_ord_x_ys_1(True(), x2, x3, x5, x6) -> Cons(x3, Cons(x5, x6)) 11: cond_insert_ord_x_ys_1(False(), x2, x3, x5, x6) -> Cons(x5, insert() x2 x3 x6) 12: insert_ord_x(x4, x6) Nil() -> Cons(x6, Nil()) 13: insert_ord_x(x4, x6) Cons(x10, x12) -> cond_insert_ord_x_ys_1(x4 x6 x10, x4, x6, x10, x12) 14: insert_ord(x2) x3 -> insert_ord_x(x2, x3) 15: insert_1() x2 -> insert_ord(x2) 16: insert() x4 -> insert_ord(x4) 17: main_1(x8) x2 -> fold() (insert() x2) Nil() x8 18: leq_x(0()) x4 -> True() 19: leq_x(S(x6)) 0() -> False() 20: leq_x(S(x6)) S(x8) -> leq() x6 x8 21: leq_1() x1 -> leq_x(x1) 22: leq() x2 -> leq_x(x2) 23: main(x8) -> fold() (insert() leq()) Nil() x8 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list isort :: (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_1 :: nat -> nat -> bool main_1 :: nat list -> (nat -> nat -> bool) -> nat list main_2 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> nat list main_3 :: nat list -> (nat -> nat -> bool) -> ((nat -> nat -> bool) -> nat -> nat list -> nat list) -> ((nat -> nat list -> nat list) -> nat list -> nat list -> nat list) -> nat list main_4 :: nat list -> (nat list -> nat list) -> nat list cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: CFA {cfaRefinement = } + Details: {X{*} -> Nil() | S(X{*}) | S(X{*}) | False() | 0() | S(X{*}) | True() | 0() | Nil() | Cons(X{*},X{*}) | Nil() | Cons(X{*},X{*}) | Nil() | Cons(X{*},X{*}) | False() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | True() | Nil() | Cons(X{*},X{*}) | Nil() | Nil() | Nil() ,V{x2_10} -> V{x4_13} ,V{x2_11} -> V{x4_13} ,V{x2_14} -> V{x4_16} ,V{x2_22} -> V{x6_20} | V{x6_13} ,V{x3_6} -> V{x6_8} ,V{x3_10} -> V{x6_13} ,V{x3_11} -> V{x6_13} ,V{x3_14} -> V{x3_11} | V{x12_5} ,V{x4_6} -> V{x8_5} | Nil() ,V{x4_12} -> V{x2_14} ,V{x4_13} -> V{x2_14} ,V{x4_16} -> V{x2_11} | leq() ,V{x4_18} -> V{x8_20} | V{x10_13} ,V{x5_10} -> V{x10_13} ,V{x5_11} -> V{x10_13} ,V{x6_4} -> V{x3_6} ,V{x6_5} -> V{x3_6} ,V{x6_8} -> V{x6_5} | R{16} ,V{x6_10} -> V{x12_13} ,V{x6_11} -> V{x12_13} ,V{x6_12} -> V{x3_14} ,V{x6_13} -> V{x3_14} ,V{x6_19} -> X{*} ,V{x6_20} -> X{*} ,V{x8_4} -> V{x4_6} ,V{x8_5} -> V{x4_6} ,V{x8_20} -> X{*} ,V{x8_23} -> X{*} ,V{x10_13} -> V{x5_10} | V{x5_11} | V{x3_10} | V{x6_12} ,V{x12_5} -> X{*} ,V{x12_13} -> R{13} | R{12} | V{x6_10} | @(R{14},V{x6_11}) | @(@(R{16},V{x3_11}),V{x6_11}) | @(@(@(insert(),V{x2_11}),V{x3_11}),V{x6_11}) | Cons(V{x5_10},V{x6_10}) | Nil() ,V{x14_5} -> X{*} ,R{0} -> R{23} | main(X{*}) ,R{4} -> V{x8_4} ,R{5} -> R{13} | R{12} | @(R{14},R{4}) | @(R{14},R{5}) | @(@(V{x6_5},V{x12_5}),R{5}) | @(@(V{x6_5},V{x12_5}),R{4}) | @(R{14},@(R{6},V{x14_5})) | @(@(V{x6_5},V{x12_5}),@(R{6},V{x14_5})) | @(R{14},@(@(R{8},V{x8_5}),V{x14_5})) | @(@(V{x6_5},V{x12_5}),@(@(R{8},V{x8_5}),V{x14_5})) | @(R{14},@(@(@(fold(),V{x6_5}),V{x8_5}),V{x14_5})) | @(@(V{x6_5},V{x12_5}),@(@(@(fold(),V{x6_5}),V{x8_5}),V{x14_5})) ,R{6} -> fold_f_z(V{x3_6},V{x4_6}) ,R{8} -> fold_f(V{x6_8}) ,R{10} -> Cons(V{x3_10},Cons(V{x5_10},V{x6_10})) ,R{11} -> Cons(V{x5_11},R{13}) | Cons(V{x5_11},R{12}) | Cons(V{x5_11},@(R{14},V{x6_11})) | Cons(V{x5_11},@(@(R{16},V{x3_11}),V{x6_11})) | Cons(V{x5_11},@(@(@(insert(),V{x2_11}),V{x3_11}),V{x6_11})) ,R{12} -> Cons(V{x6_12},Nil()) ,R{13} -> R{10} | R{11} | cond_insert_ord_x_ys_1(R{20},V{x4_13},V{x6_13},V{x10_13},V{x12_13}) | cond_insert_ord_x_ys_1(R{19},V{x4_13},V{x6_13},V{x10_13},V{x12_13}) | cond_insert_ord_x_ys_1(R{18},V{x4_13},V{x6_13},V{x10_13},V{x12_13}) | cond_insert_ord_x_ys_1(@(R{22},V{x10_13}),V{x4_13},V{x6_13},V{x10_13},V{x12_13}) | cond_insert_ord_x_ys_1(@(@(V{x4_13},V{x6_13}),V{x10_13}),V{x4_13},V{x6_13},V{x10_13},V{x12_13}) ,R{14} -> insert_ord_x(V{x2_14},V{x3_14}) ,R{16} -> insert_ord(V{x4_16}) ,R{18} -> True() ,R{19} -> False() ,R{20} -> R{20} | R{19} | R{18} | @(R{22},V{x8_20}) | @(@(leq(),V{x6_20}),V{x8_20}) ,R{22} -> leq_x(V{x2_22}) ,R{23} -> R{5} | R{4} | @(R{6},V{x8_23}) | @(@(R{8},Nil()),V{x8_23}) | @(@(@(fold(),R{16}),Nil()),V{x8_23}) | @(@(@(fold(),@(insert(),leq())),Nil()),V{x8_23})} * Step 12: UncurryATRS WORST_CASE(?,O(n^2)) + Considered Problem: 4: fold_f_z(insert_ord(x1), Nil()) Nil() -> Nil() 5: fold_f_z(insert_ord(x3), Nil()) Cons(x2, x1) -> insert_ord(x3) x2 (fold() insert_ord(x3) Nil() x1) 6: fold_f(insert_ord(x1)) Nil() -> fold_f_z(insert_ord(x1), Nil()) 8: fold() insert_ord(x1) -> fold_f(insert_ord(x1)) 10: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 11: cond_insert_ord_x_ys_1(False(), leq(), x3, x2, x1) -> Cons(x2, insert() leq() x3 x1) 12: insert_ord_x(leq(), x1) Nil() -> Cons(x1, Nil()) 13: insert_ord_x(leq(), x3) Cons(x2, x1) -> cond_insert_ord_x_ys_1(leq() x3 x2, leq(), x3, x2, x1) 14: insert_ord(leq()) x1 -> insert_ord_x(leq(), x1) 16: insert() leq() -> insert_ord(leq()) 18: leq_x(0()) x4 -> True() 19: leq_x(S(x6)) 0() -> False() 20: leq_x(S(x2)) S(x1) -> leq() x2 x1 22: leq() x2 -> leq_x(x2) 23: main(x1) -> fold() (insert() leq()) Nil() x1 where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq_x :: nat -> nat -> bool insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: UncurryATRS + Details: none * Step 13: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: 1: fold_f_z#1(insert_ord(x1), Nil(), Nil()) -> Nil() 2: fold_f_z#1(insert_ord(x3), Nil(), Cons(x2, x1)) -> insert_ord#2(x3, x2 , fold#3(insert_ord(x3), Nil(), x1)) 3: fold_f#1(insert_ord(x1), Nil()) -> fold_f_z(insert_ord(x1), Nil()) 4: fold_f#2(insert_ord(x1), Nil(), x2) -> fold_f_z#1(insert_ord(x1), Nil(), x2) 5: fold#1(insert_ord(x1)) -> fold_f(insert_ord(x1)) 6: fold#2(insert_ord(x1), x2) -> fold_f#1(insert_ord(x1), x2) 7: fold#3(insert_ord(x1), x2, x3) -> fold_f#2(insert_ord(x1), x2, x3) 8: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 9: cond_insert_ord_x_ys_1(False(), leq(), x3, x2, x1) -> Cons(x2, insert#3(leq(), x3, x1)) 10: insert_ord_x#1(leq(), x1, Nil()) -> Cons(x1, Nil()) 11: insert_ord_x#1(leq(), x3, Cons(x2, x1)) -> cond_insert_ord_x_ys_1(leq#2(x3, x2), leq(), x3, x2, x1) 12: insert_ord#1(leq(), x1) -> insert_ord_x(leq(), x1) 13: insert_ord#2(leq(), x1, x2) -> insert_ord_x#1(leq(), x1, x2) 14: insert#1(leq()) -> insert_ord(leq()) 15: insert#2(leq(), x0) -> insert_ord#1(leq(), x0) 16: insert#3(leq(), x0, x1) -> insert_ord#2(leq(), x0, x1) 17: leq_x#1(0(), x4) -> True() 18: leq_x#1(S(x6), 0()) -> False() 19: leq_x#1(S(x2), S(x1)) -> leq#2(x2, x1) 20: leq#1(x2) -> leq_x(x2) 21: leq#2(x2, x3) -> leq_x#1(x2, x3) 22: main(x1) -> fold#3(insert#1(leq()), Nil(), x1) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold#2 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f#2 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f_z :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f_z#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert#3 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord_x :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord_x#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#1 :: nat -> nat -> bool leq#2 :: nat -> nat -> bool leq_x :: nat -> nat -> bool leq_x#1 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: UsableRules {urType = DFA} + Details: none * Step 14: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: fold_f_z#1(insert_ord(x1), Nil(), Nil()) -> Nil() 2: fold_f_z#1(insert_ord(x3), Nil(), Cons(x2, x1)) -> insert_ord#2(x3, x2 , fold#3(insert_ord(x3), Nil(), x1)) 4: fold_f#2(insert_ord(x1), Nil(), x2) -> fold_f_z#1(insert_ord(x1), Nil(), x2) 7: fold#3(insert_ord(x1), x2, x3) -> fold_f#2(insert_ord(x1), x2, x3) 8: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 9: cond_insert_ord_x_ys_1(False(), leq(), x3, x2, x1) -> Cons(x2, insert#3(leq(), x3, x1)) 10: insert_ord_x#1(leq(), x1, Nil()) -> Cons(x1, Nil()) 11: insert_ord_x#1(leq(), x3, Cons(x2, x1)) -> cond_insert_ord_x_ys_1(leq#2(x3, x2), leq(), x3, x2, x1) 13: insert_ord#2(leq(), x1, x2) -> insert_ord_x#1(leq(), x1, x2) 14: insert#1(leq()) -> insert_ord(leq()) 16: insert#3(leq(), x0, x1) -> insert_ord#2(leq(), x0, x1) 17: leq_x#1(0(), x4) -> True() 18: leq_x#1(S(x6), 0()) -> False() 19: leq_x#1(S(x2), S(x1)) -> leq#2(x2, x1) 21: leq#2(x2, x3) -> leq_x#1(x2, x3) 22: main(x1) -> fold#3(insert#1(leq()), Nil(), x1) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f#2 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f_z#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert#3 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord_x#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#2 :: nat -> nat -> bool leq_x#1 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 15: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: 1: fold_f_z#1(insert_ord(x1), Nil(), Nil()) -> Nil() 2: fold_f_z#1(insert_ord(x3), Nil(), Cons(x2, x1)) -> insert_ord#2(x3, x2 , fold#3(insert_ord(x3), Nil(), x1)) 3: fold_f#2(insert_ord(x2), Nil(), Nil()) -> Nil() 4: fold_f#2(insert_ord(x6), Nil(), Cons(x4, x2)) -> insert_ord#2(x6, x4, fold#3(insert_ord(x6), Nil(), x2)) 5: fold#3(insert_ord(x2), Nil(), x4) -> fold_f_z#1(insert_ord(x2), Nil(), x4) 6: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 7: cond_insert_ord_x_ys_1(False(), leq(), x0, x5, x2) -> Cons(x5, insert_ord#2(leq(), x0, x2)) 8: insert_ord_x#1(leq(), x1, Nil()) -> Cons(x1, Nil()) 9: insert_ord_x#1(leq(), x3, Cons(x2, x1)) -> cond_insert_ord_x_ys_1(leq#2(x3, x2), leq(), x3, x2, x1) 10: insert_ord#2(leq(), x2, Nil()) -> Cons(x2, Nil()) 11: insert_ord#2(leq(), x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), leq(), x6, x4, x2) 12: insert#1(leq()) -> insert_ord(leq()) 13: insert#3(leq(), x0, x1) -> insert_ord#2(leq(), x0, x1) 14: leq_x#1(0(), x4) -> True() 15: leq_x#1(S(x6), 0()) -> False() 16: leq_x#1(S(x2), S(x1)) -> leq#2(x2, x1) 17: leq#2(0(), x8) -> True() 18: leq#2(S(x12), 0()) -> False() 19: leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 20: main(x3) -> fold#3(insert_ord(leq()), Nil(), x3) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f#2 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f_z#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert#3 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord_x#1 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#2 :: nat -> nat -> bool leq_x#1 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 16: Inline WORST_CASE(?,O(n^2)) + Considered Problem: 1: fold_f_z#1(insert_ord(x1), Nil(), Nil()) -> Nil() 2: fold_f_z#1(insert_ord(x3), Nil(), Cons(x2, x1)) -> insert_ord#2(x3, x2 , fold#3(insert_ord(x3), Nil(), x1)) 5: fold#3(insert_ord(x2), Nil(), x4) -> fold_f_z#1(insert_ord(x2), Nil(), x4) 6: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 7: cond_insert_ord_x_ys_1(False(), leq(), x0, x5, x2) -> Cons(x5, insert_ord#2(leq(), x0, x2)) 10: insert_ord#2(leq(), x2, Nil()) -> Cons(x2, Nil()) 11: insert_ord#2(leq(), x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), leq(), x6, x4, x2) 17: leq#2(0(), x8) -> True() 18: leq#2(S(x12), 0()) -> False() 19: leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 20: main(x3) -> fold#3(insert_ord(leq()), Nil(), x3) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f_z#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#2 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 17: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: 1: fold_f_z#1(insert_ord(x1), Nil(), Nil()) -> Nil() 2: fold_f_z#1(insert_ord(x3), Nil(), Cons(x2, x1)) -> insert_ord#2(x3, x2 , fold#3(insert_ord(x3), Nil(), x1)) 3: fold#3(insert_ord(x2), Nil(), Nil()) -> Nil() 4: fold#3(insert_ord(x6), Nil(), Cons(x4, x2)) -> insert_ord#2(x6, x4, fold#3(insert_ord(x6), Nil(), x2)) 5: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 6: cond_insert_ord_x_ys_1(False(), leq(), x0, x5, x2) -> Cons(x5, insert_ord#2(leq(), x0, x2)) 7: insert_ord#2(leq(), x2, Nil()) -> Cons(x2, Nil()) 8: insert_ord#2(leq(), x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), leq(), x6, x4, x2) 9: leq#2(0(), x8) -> True() 10: leq#2(S(x12), 0()) -> False() 11: leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 12: main(x3) -> fold#3(insert_ord(leq()), Nil(), x3) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list fold_f_z#1 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#2 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 18: Compression WORST_CASE(?,O(n^2)) + Considered Problem: 3: fold#3(insert_ord(x2), Nil(), Nil()) -> Nil() 4: fold#3(insert_ord(x6), Nil(), Cons(x4, x2)) -> insert_ord#2(x6, x4, fold#3(insert_ord(x6), Nil(), x2)) 5: cond_insert_ord_x_ys_1(True(), leq(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 6: cond_insert_ord_x_ys_1(False(), leq(), x0, x5, x2) -> Cons(x5, insert_ord#2(leq(), x0, x2)) 7: insert_ord#2(leq(), x2, Nil()) -> Cons(x2, Nil()) 8: insert_ord#2(leq(), x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), leq(), x6, x4, x2) 9: leq#2(0(), x8) -> True() 10: leq#2(S(x12), 0()) -> False() 11: leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 12: main(x3) -> fold#3(insert_ord(leq()), Nil(), x3) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> (nat -> nat -> bool) -> nat -> nat -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#2 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: Compression + Details: none * Step 19: ToTctProblem WORST_CASE(?,O(n^2)) + Considered Problem: 1: fold#3(insert_ord(x2), Nil()) -> Nil() 2: fold#3(insert_ord(x6), Cons(x4, x2)) -> insert_ord#2(x6, x4, fold#3(insert_ord(x6), x2)) 3: cond_insert_ord_x_ys_1(True(), x3, x2, x1) -> Cons(x3, Cons(x2, x1)) 4: cond_insert_ord_x_ys_1(False(), x0, x5, x2) -> Cons(x5, insert_ord#2(leq(), x0, x2)) 5: insert_ord#2(leq(), x2, Nil()) -> Cons(x2, Nil()) 6: insert_ord#2(leq(), x6, Cons(x4, x2)) -> cond_insert_ord_x_ys_1(leq#2(x6, x4), x6, x4, x2) 7: leq#2(0(), x8) -> True() 8: leq#2(S(x12), 0()) -> False() 9: leq#2(S(x4), S(x2)) -> leq#2(x4, x2) 10: main(x3) -> fold#3(insert_ord(leq()), x3) where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list S :: nat -> nat True :: bool cond_insert_ord_x_ys_1 :: bool -> nat -> nat -> nat list -> nat list fold#3 :: (nat -> nat list -> nat list) -> nat list -> nat list insert_ord :: (nat -> nat -> bool) -> nat -> nat list -> nat list insert_ord#2 :: (nat -> nat -> bool) -> nat -> nat list -> nat list leq :: nat -> nat -> bool leq#2 :: nat -> nat -> bool main :: nat list -> nat list + Applied Processor: ToTctProblem + Details: none * Step 20: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) main(x3) -> fold#3(insert_ord(leq()),x3) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0 ,insert_ord/1,leq/0} - Obligation: innermost runtime complexity wrt. defined symbols {main} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() fold#3#(insert_ord(x2),Nil()) -> c_3() fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x2,Nil()) -> c_5() insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(0(),x8) -> c_7() leq#2#(S(x12),0()) -> c_8() leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) Weak DPs and mark the set of starting terms. * Step 21: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() fold#3#(insert_ord(x2),Nil()) -> c_3() fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x2,Nil()) -> c_5() insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(0(),x8) -> c_7() leq#2#(S(x12),0()) -> c_8() leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) main(x3) -> fold#3(insert_ord(leq()),x3) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() fold#3#(insert_ord(x2),Nil()) -> c_3() fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x2,Nil()) -> c_5() insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(0(),x8) -> c_7() leq#2#(S(x12),0()) -> c_8() leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) * Step 22: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() fold#3#(insert_ord(x2),Nil()) -> c_3() fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x2,Nil()) -> c_5() insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(0(),x8) -> c_7() leq#2#(S(x12),0()) -> c_8() leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,3,5,7,8} by application of Pre({2,3,5,7,8}) = {1,4,6,9,10}. Here rules are labelled as follows: 1: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) 2: cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() 3: fold#3#(insert_ord(x2),Nil()) -> c_3() 4: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) 5: insert_ord#2#(leq(),x2,Nil()) -> c_5() 6: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) 7: leq#2#(0(),x8) -> c_7() 8: leq#2#(S(x12),0()) -> c_8() 9: leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) 10: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) * Step 23: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak DPs: cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() fold#3#(insert_ord(x2),Nil()) -> c_3() insert_ord#2#(leq(),x2,Nil()) -> c_5() leq#2#(0(),x8) -> c_7() leq#2#(S(x12),0()) -> c_8() - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):3 -->_1 insert_ord#2#(leq(),x2,Nil()) -> c_5():8 2:S:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):3 -->_1 insert_ord#2#(leq(),x2,Nil()) -> c_5():8 -->_2 fold#3#(insert_ord(x2),Nil()) -> c_3():7 -->_2 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):2 3:S:insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) -->_2 leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)):4 -->_2 leq#2#(S(x12),0()) -> c_8():10 -->_2 leq#2#(0(),x8) -> c_7():9 -->_1 cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2():6 -->_1 cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)):1 4:S:leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) -->_1 leq#2#(S(x12),0()) -> c_8():10 -->_1 leq#2#(0(),x8) -> c_7():9 -->_1 leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)):4 5:S:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x2),Nil()) -> c_3():7 -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):2 6:W:cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() 7:W:fold#3#(insert_ord(x2),Nil()) -> c_3() 8:W:insert_ord#2#(leq(),x2,Nil()) -> c_5() 9:W:leq#2#(0(),x8) -> c_7() 10:W:leq#2#(S(x12),0()) -> c_8() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 7: fold#3#(insert_ord(x2),Nil()) -> c_3() 8: insert_ord#2#(leq(),x2,Nil()) -> c_5() 6: cond_insert_ord_x_ys_1#(True(),x3,x2,x1) -> c_2() 9: leq#2#(0(),x8) -> c_7() 10: leq#2#(S(x12),0()) -> c_8() * Step 24: Decompose WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} Problem (S) - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} ** Step 24.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 4: leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) Consider the set of all dependency pairs 1: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) 2: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) 3: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) 4: leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) 5: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) Processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {4} These cover all (indirect) predecessors of dependency pairs {4,5} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. *** Step 24.a:1.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_1) = {1}, uargs(c_4) = {1,2}, uargs(c_6) = {1,2}, uargs(c_9) = {1}, uargs(c_10) = {1} Following symbols are considered usable: {cond_insert_ord_x_ys_1,fold#3,insert_ord#2,cond_insert_ord_x_ys_1#,fold#3#,insert_ord#2#,leq#2#,main#} TcT has computed the following interpretation: p(0) = 0 p(Cons) = x1 + x2 p(False) = 1 p(Nil) = 0 p(S) = 1 + x1 p(True) = 2 p(cond_insert_ord_x_ys_1) = x2 + x3 + x4 p(fold#3) = 2*x1 + x2 p(insert_ord) = x1 p(insert_ord#2) = x2 + x3 p(leq) = 0 p(leq#2) = 0 p(main) = 1 + x1^2 p(cond_insert_ord_x_ys_1#) = 2*x2 + x2*x4 p(fold#3#) = 1 + 2*x1*x2 + 2*x2 + 2*x2^2 p(insert_ord#2#) = 2*x2 + x2*x3 p(leq#2#) = x1*x2 p(main#) = 2 + 2*x1 + 3*x1^2 p(c_1) = x1 p(c_2) = 0 p(c_3) = 2 p(c_4) = x1 + x2 p(c_5) = 0 p(c_6) = x1 + x2 p(c_7) = 0 p(c_8) = 2 p(c_9) = x1 p(c_10) = 1 + x1 Following rules are strictly oriented: leq#2#(S(x4),S(x2)) = 1 + x2 + x2*x4 + x4 > x2*x4 = c_9(leq#2#(x4,x2)) Following rules are (at-least) weakly oriented: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) = 2*x0 + x0*x2 >= 2*x0 + x0*x2 = c_1(insert_ord#2#(leq(),x0,x2)) fold#3#(insert_ord(x6),Cons(x4,x2)) = 1 + 2*x2 + 4*x2*x4 + 2*x2*x6 + 2*x2^2 + 2*x4 + 2*x4*x6 + 2*x4^2 >= 1 + 2*x2 + x2*x4 + 2*x2*x6 + 2*x2^2 + 2*x4 + 2*x4*x6 = c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)),fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) = x2*x6 + x4*x6 + 2*x6 >= x2*x6 + x4*x6 + 2*x6 = c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) main#(x3) = 2 + 2*x3 + 3*x3^2 >= 2 + 2*x3 + 2*x3^2 = c_10(fold#3#(insert_ord(leq()),x3)) cond_insert_ord_x_ys_1(False(),x0,x5,x2) = x0 + x2 + x5 >= x0 + x2 + x5 = Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) = x1 + x2 + x3 >= x1 + x2 + x3 = Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) = 2*x2 >= 0 = Nil() fold#3(insert_ord(x6),Cons(x4,x2)) = x2 + x4 + 2*x6 >= x2 + x4 + 2*x6 = insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) = x2 >= x2 = Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) = x2 + x4 + x6 >= x2 + x4 + x6 = cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) *** Step 24.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 24.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):2 2:S:insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) -->_2 leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)):4 -->_1 cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)):1 3:W:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) -->_2 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):3 -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):2 4:W:leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) -->_1 leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)):4 5:W:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) *** Step 24.a:1.b:2: SimplifyRHS WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):2 2:S:insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) -->_1 cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)):1 3:W:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) -->_2 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):3 -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):2 5:W:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):3 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) *** Step 24.a:1.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/1,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 2: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) Consider the set of all dependency pairs 1: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) 2: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) 3: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) 4: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) Processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {2} These cover all (indirect) predecessors of dependency pairs {1,2,4} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. **** Step 24.a:1.b:3.a:1: NaturalMI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/1,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 2 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_1) = {1}, uargs(c_4) = {1,2}, uargs(c_6) = {1}, uargs(c_10) = {1} Following symbols are considered usable: {cond_insert_ord_x_ys_1,fold#3,insert_ord#2,leq#2,cond_insert_ord_x_ys_1#,fold#3#,insert_ord#2#,main#} TcT has computed the following interpretation: p(0) = [0] [0] [0] p(Cons) = [1 1 0] [0] [0 0 1] x2 + [0] [0 0 1] [1] p(False) = [1] [0] [1] p(Nil) = [0] [0] [1] p(S) = [0] [0] [0] p(True) = [1] [0] [1] p(cond_insert_ord_x_ys_1) = [0 0 0] [1 1 1] [0] [0 0 0] x1 + [0 0 1] x4 + [1] [1 0 1] [0 0 1] [0] p(fold#3) = [0 0 1] [1 0 0] [0] [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [0 0 1] [0] p(insert_ord) = [0 0 0] [1] [1 0 0] x1 + [0] [0 0 1] [0] p(insert_ord#2) = [1 1 0] [0] [0 0 1] x3 + [0] [0 0 1] [1] p(leq) = [0] [0] [0] p(leq#2) = [1] [0] [1] p(main) = [0] [0] [0] p(cond_insert_ord_x_ys_1#) = [0 0 0] [0 0 0] [0 0 1] [0] [0 1 0] x2 + [0 0 0] x3 + [0 1 0] x4 + [0] [0 1 0] [1 0 0] [0 1 0] [1] p(fold#3#) = [0 1 0] [1 1 0] [0] [0 0 0] x1 + [1 0 0] x2 + [1] [0 1 0] [1 1 0] [0] p(insert_ord#2#) = [0 0 0] [0 0 1] [0] [0 1 0] x1 + [0 0 0] x3 + [1] [1 0 0] [0 0 0] [0] p(leq#2#) = [0] [0] [0] p(main#) = [1 1 1] [0] [1 1 0] x1 + [1] [1 1 0] [1] p(c_1) = [1 0 0] [0] [0 0 0] x1 + [0] [0 0 0] [0] p(c_2) = [0] [0] [0] p(c_3) = [0] [0] [0] p(c_4) = [1 0 0] [1 0 0] [0] [0 0 0] x1 + [0 0 0] x2 + [0] [1 0 1] [0 0 0] [0] p(c_5) = [0] [0] [0] p(c_6) = [1 0 0] [0] [0 0 0] x1 + [0] [0 0 0] [0] p(c_7) = [0] [0] [0] p(c_8) = [0] [0] [0] p(c_9) = [0] [0] [0] p(c_10) = [1 0 0] [0] [0 0 1] x1 + [0] [0 0 0] [1] Following rules are strictly oriented: insert_ord#2#(leq(),x6,Cons(x4,x2)) = [0 0 1] [1] [0 0 0] x2 + [1] [0 0 0] [0] > [0 0 1] [0] [0 0 0] x2 + [0] [0 0 0] [0] = c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) Following rules are (at-least) weakly oriented: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) = [0 0 0] [0 0 1] [0 0 0] [0] [0 1 0] x0 + [0 1 0] x2 + [0 0 0] x5 + [0] [0 1 0] [0 1 0] [1 0 0] [1] >= [0 0 1] [0] [0 0 0] x2 + [0] [0 0 0] [0] = c_1(insert_ord#2#(leq(),x0,x2)) fold#3#(insert_ord(x6),Cons(x4,x2)) = [1 1 1] [1 0 0] [0] [1 1 0] x2 + [0 0 0] x6 + [1] [1 1 1] [1 0 0] [0] >= [1 1 1] [1 0 0] [0] [0 0 0] x2 + [0 0 0] x6 + [0] [0 0 1] [1 0 0] [0] = c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)),fold#3#(insert_ord(x6),x2)) main#(x3) = [1 1 1] [0] [1 1 0] x3 + [1] [1 1 0] [1] >= [1 1 0] [0] [1 1 0] x3 + [0] [0 0 0] [1] = c_10(fold#3#(insert_ord(leq()),x3)) cond_insert_ord_x_ys_1(False(),x0,x5,x2) = [1 1 1] [0] [0 0 1] x2 + [1] [0 0 1] [2] >= [1 1 1] [0] [0 0 1] x2 + [1] [0 0 1] [2] = Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) = [1 1 1] [0] [0 0 1] x1 + [1] [0 0 1] [2] >= [1 1 1] [0] [0 0 1] x1 + [1] [0 0 1] [2] = Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) = [0 0 1] [0] [0 0 0] x2 + [0] [0 0 0] [1] >= [0] [0] [1] = Nil() fold#3(insert_ord(x6),Cons(x4,x2)) = [1 1 0] [0 0 1] [0] [0 0 1] x2 + [0 0 0] x6 + [0] [0 0 1] [0 0 0] [1] >= [1 1 0] [0 0 1] [0] [0 0 1] x2 + [0 0 0] x6 + [0] [0 0 1] [0 0 0] [1] = insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) = [0] [1] [2] >= [0] [1] [2] = Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) = [1 1 1] [0] [0 0 1] x2 + [1] [0 0 1] [2] >= [1 1 1] [0] [0 0 1] x2 + [1] [0 0 1] [2] = cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) = [1] [0] [1] >= [1] [0] [1] = True() leq#2(S(x12),0()) = [1] [0] [1] >= [1] [0] [1] = False() leq#2(S(x4),S(x2)) = [1] [0] [1] >= [1] [0] [1] = leq#2(x4,x2) **** Step 24.a:1.b:3.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/1,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 24.a:1.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/1,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)):3 2:W:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)):3 -->_2 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):2 3:W:insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) -->_1 cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)):1 4:W:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) 2: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) 1: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) 3: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2)) **** Step 24.a:1.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/1,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 24.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak DPs: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):4 -->_2 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):1 2:S:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):1 3:W:cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) -->_1 insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)):4 4:W:insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2),leq#2#(x6,x4)) -->_2 leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)):5 -->_1 cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)):3 5:W:leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) -->_1 leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)):5 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: insert_ord#2#(leq(),x6,Cons(x4,x2)) -> c_6(cond_insert_ord_x_ys_1#(leq#2(x6,x4),x6,x4,x2) ,leq#2#(x6,x4)) 3: cond_insert_ord_x_ys_1#(False(),x0,x5,x2) -> c_1(insert_ord#2#(leq(),x0,x2)) 5: leq#2#(S(x4),S(x2)) -> c_9(leq#2#(x4,x2)) ** Step 24.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/2,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)) -->_2 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):1 2:S:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(insert_ord#2#(x6,x4,fold#3(insert_ord(x6),x2)) ,fold#3#(insert_ord(x6),x2)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) ** Step 24.b:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak TRS: cond_insert_ord_x_ys_1(False(),x0,x5,x2) -> Cons(x5,insert_ord#2(leq(),x0,x2)) cond_insert_ord_x_ys_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) fold#3(insert_ord(x2),Nil()) -> Nil() fold#3(insert_ord(x6),Cons(x4,x2)) -> insert_ord#2(x6,x4,fold#3(insert_ord(x6),x2)) insert_ord#2(leq(),x2,Nil()) -> Cons(x2,Nil()) insert_ord#2(leq(),x6,Cons(x4,x2)) -> cond_insert_ord_x_ys_1(leq#2(x6,x4),x6,x4,x2) leq#2(0(),x8) -> True() leq#2(S(x12),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) ** Step 24.b:4: Decompose WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) - Weak DPs: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} Problem (S) - Strict DPs: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} *** Step 24.b:4.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) - Weak DPs: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) Consider the set of all dependency pairs 1: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) 2: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,2} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. **** Step 24.b:4.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) - Weak DPs: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_4) = {1}, uargs(c_10) = {1} Following symbols are considered usable: {fold#3#,main#} TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [1] p(False) = [0] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [0] p(cond_insert_ord_x_ys_1) = [0] p(fold#3) = [0] p(insert_ord) = [0] p(insert_ord#2) = [0] p(leq) = [0] p(leq#2) = [0] p(main) = [0] p(cond_insert_ord_x_ys_1#) = [0] p(fold#3#) = [1] x2 + [2] p(insert_ord#2#) = [0] p(leq#2#) = [1] x1 + [4] x2 + [0] p(main#) = [8] x1 + [3] p(c_1) = [1] p(c_2) = [0] p(c_3) = [0] p(c_4) = [1] x1 + [0] p(c_5) = [1] p(c_6) = [2] p(c_7) = [1] p(c_8) = [1] p(c_9) = [1] p(c_10) = [1] x1 + [0] Following rules are strictly oriented: fold#3#(insert_ord(x6),Cons(x4,x2)) = [1] x2 + [1] x4 + [3] > [1] x2 + [2] = c_4(fold#3#(insert_ord(x6),x2)) Following rules are (at-least) weakly oriented: main#(x3) = [8] x3 + [3] >= [1] x3 + [2] = c_10(fold#3#(insert_ord(leq()),x3)) **** Step 24.b:4.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 24.b:4.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)):1 2:W:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) 1: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) **** Step 24.b:4.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 24.b:4.b:1: PredecessorEstimation WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1} by application of Pre({1}) = {}. Here rules are labelled as follows: 1: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) 2: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) *** Step 24.b:4.b:2: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)):1 2:W:main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) -->_1 fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: main#(x3) -> c_10(fold#3#(insert_ord(leq()),x3)) 1: fold#3#(insert_ord(x6),Cons(x4,x2)) -> c_4(fold#3#(insert_ord(x6),x2)) *** Step 24.b:4.b:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {cond_insert_ord_x_ys_1/4,fold#3/2,insert_ord#2/3,leq#2/2,main/1,cond_insert_ord_x_ys_1#/4,fold#3#/2 ,insert_ord#2#/3,leq#2#/2,main#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,insert_ord/1,leq/0,c_1/1,c_2/0 ,c_3/0,c_4/1,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))