WORST_CASE(?,O(n^4)) * Step 1: Desugar WORST_CASE(?,O(n^4)) + Considered Problem: let rec leqNat y x = match y with | 0 -> True | S(y') -> (match x with | S(x') -> leqNat x' y' | 0 -> False) ;; let rec eqNat x y = match y with | 0 -> (match x with | 0 -> True | S(x') -> False) | S(y') -> (match x with | S(x') -> eqNat x' y' | 0 -> False) ;; let rec geqNat x y = match y with | 0 -> True | S(y') -> (match x with | 0 -> False | S(x') -> geqNat x' y') ;; let rec ltNat x y = match y with | 0 -> False | S(y') -> (match x with | 0 -> True | S(x') -> ltNat x' y') ;; let rec gtNat x y = match x with | 0 -> False | S(x') -> (match y with | 0 -> True | S(y') -> gtNat x' y') ;; let ifz n th el = match n with | 0 -> th 0 | S(x) -> el x ;; let ite b th el = match b with | True()-> th | False()-> el ;; let minus n m = let rec minus' m n = match m with | 0 -> 0 | S(x) -> (match n with | 0 -> m | S(y) -> minus' x y) in Pair(minus' n m,m) ;; let rec plus n m = match m with | 0 -> n | S(x) -> S(plus n x) ;; type ('a,'b,'c) triple = Triple of 'a * 'b * 'c ;; let rec div_mod n m = match (minus n m) with | Pair(res,m) -> (match res with | 0 -> Triple (0,n,m) | S(x) -> (match (div_mod res m) with | Triple(a,rest,unusedM) -> Triple(plus S(0) a,rest,m))) ;; let rec mult n m = match n with | 0 -> 0 | S(x) -> S(plus (mult x m) m) ;; type bool = True | False ;; type 'a list = Nil | Cons of 'a * 'a list ;; type nat = 0 | S of nat ;; type Unit = Unit ;; type ('a,'b) pair = Pair of 'a * 'b (* * * * * * * * * * * * Resource Aware ML * * * * * * * * * * * * * * * * Use Cases * * * * File: * example/list_map.raml * * Author: * Jan Hoffmann, Shu-Chun Weng (S(S(0))014) * * Description: * Some variations of list map. * *) ;; (* The usual list map function. *) let rec map f l = match l with | Nil()-> Nil | Cons(x,xs) -> let ys = map f xs in Cons(f x,ys) ;; (* The usual list rev_map function. *) let map_rev f l = let rec rmap l acc = match l with | Nil()-> acc | Cons(x,xs) -> let acc' = Cons(f x,acc) in rmap xs acc' in rmap l Nil ;; (* Iteratively apply two functional arguments. *) let map_rev2 f1 f2 l = let rec rmap1 l acc = match l with | Nil()-> acc | Cons(x,xs) -> rmap2 xs (Cons(f1 x,acc)) and rmap2 l acc = match l with | Nil()-> acc | Cons(x,xs) -> rmap1 xs (Cons(f2 x,acc)) in rmap1 l Nil ;; let main xs = let f x = mult x (mult x x) in let g x = plus x S(S(0)) in let h x = x in let map_f_g = map_rev2 f g in map h (map_rev h (map_f_g xs)) ;; + Applied Processor: Desugar {analysedFunction = Nothing} + Details: none * Step 2: Defunctionalization WORST_CASE(?,O(n^4)) + Considered Problem: λxs : nat list. (λplus : nat -> nat -> nat. (λmult : nat -> nat -> nat. (λmap : (nat -> nat) -> nat list -> nat list. (λmap_rev : (nat -> nat) -> nat list -> nat list. (λmap_rev2 : (nat -> nat) -> (nat -> nat) -> nat list -> nat list. (λmain : nat list -> nat list. main xs) (λxs : nat list. (λf : nat -> nat. (λg : nat -> nat. (λh : nat -> nat. (λmap_f_g : nat list -> nat list. map h (map_rev h (map_f_g xs))) (map_rev2 f g)) (λx : nat. x)) (λx : nat. plus x S(S(0)))) (λx : nat. mult x (mult x x)))) (λf1 : nat -> nat. λf2 : nat -> nat. λl : nat list. (λrmap1 : nat list -> nat list -> nat list. λrmap2 : nat list -> nat list -> nat list. rmap1 l Nil) (μ0 [λrmap1 : nat list -> nat list -> nat list. λrmap2 : nat list -> nat list -> nat list. λl : nat list. λacc : nat list. case l of | Nil -> acc | Cons -> λx : nat. λxs : nat list. rmap2 xs Cons(f1 x,acc) ,λrmap1 : nat list -> nat list -> nat list. λrmap2 : nat list -> nat list -> nat list. λl : nat list. λacc : nat list. case l of | Nil -> acc | Cons -> λx : nat. λxs : nat list. rmap1 xs Cons(f2 x,acc)]) (μ1 [λrmap1 : nat list -> nat list -> nat list. λrmap2 : nat list -> nat list -> nat list. λl : nat list. λacc : nat list. case l of | Nil -> acc | Cons -> λx : nat. λxs : nat list. rmap2 xs Cons(f1 x,acc) ,λrmap1 : nat list -> nat list -> nat list. λrmap2 : nat list -> nat list -> nat list. λl : nat list. λacc : nat list. case l of | Nil -> acc | Cons -> λx : nat. λxs : nat list. rmap1 xs Cons(f2 x,acc)]))) (λf : nat -> nat. λl : nat list. (λrmap : nat list -> nat list -> nat list. rmap l Nil) (μrmap : nat list -> nat list -> nat list. λl : nat list. λacc : nat list. case l of | Nil -> acc | Cons -> λx : nat. λxs : nat list. (λacc' : nat list. rmap xs acc') Cons(f x,acc)))) (μmap : (nat -> nat) -> nat list -> nat list. λf : nat -> nat. λl : nat list. case l of | Nil -> Nil | Cons -> λx : nat. λxs : nat list. (λys : nat list. Cons(f x,ys)) (map f xs))) (μmult : nat -> nat -> nat. λn : nat. λm : nat. case n of | 0 -> 0 | S -> λx : nat. S(plus (mult x m) m))) (μplus : nat -> nat -> nat. λn : nat. λm : nat. case m of | 0 -> n | S -> λx : nat. S(plus n x)) : nat list -> nat list where 0 :: nat Cons :: 'a -> 'a list -> 'a list False :: bool Nil :: 'a list Pair :: 'a -> 'b -> ('a,'b) pair S :: nat -> nat Triple :: 'a -> 'b -> 'c -> ('a,'b,'c) triple True :: bool Unit :: Unit + Applied Processor: Defunctionalization + Details: none * Step 3: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x3, x4, x5, x6, x7, x8) x9 -> main_xs_3(x3, x4, x6, x9) (x5 x7 x8) 4: h() x9 -> x9 5: main_xs_1(x3, x4, x5, x6, x7) x8 -> main_xs_2(x3, x4, x5, x6, x7, x8) h() 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x1, x3, x4, x5, x6) x7 -> main_xs_1(x3, x4, x5, x6, x7) g(x1) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x1, x2, x3, x4, x5) x6 -> main_xs(x1, x3, x4, x5, x6) f(x2) 10: main_5(x0, x1, x2, x3, x4) x5 -> main_6(x0) main_7(x1, x2, x3, x4, x5) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x5, x6) x7 -> rmap2_2(x5, x6) x7 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x5, x6) x7 -> rmap1_2(x5, x6) x7 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x5, x6) x7 -> rmap1_5(x5, x6) x7 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x5, x6) x7 -> rmap2_5(x5, x6) x7 33: map_rev2_f1_f2(x5, x6) x7 -> map_rev2_f1_f2_l(x7) rmap1(x5, x6) rmap2_3(x5, x6) 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x0, x1, x2, x3) x4 -> main_5(x0, x1, x2, x3, x4) map_rev2() 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x8, x9), x4, x7) -> rmap_l_acc_2(x4, x9) Cons(x4 x8, x7) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x4) x5 -> rmap_1(x4) x5 44: map_rev_f(x4) x5 -> map_rev_f_l(x5) rmap(x4) 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x0, x1, x2) x3 -> main_4(x0, x1, x2, x3) map_rev() 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x5, x6), x3) -> map_f_l_2(x3, x5) (map() x3 x6) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x0 -> map_1() x0 53: main_2(x0, x1) x2 -> main_3(x0, x1, x2) map() 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x1) x2 -> mult_1(x1) x2 59: main_1(x0) x1 -> main_2(x0, x1) mult(x1) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x0 -> plus_1() x0 65: main(x0) -> main_1(x0) plus() where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 4: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x10, x12, x14) x16 -> main_xs_3(x6, x8, x12, h()) (x10 x14 x16) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x3, x6, x8, x10, x12) x14 -> main_xs_2(x6, x8, x10, x12, x14, g(x3)) h() 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x2, x5, x6, x8, x10) x12 -> main_xs_1(x6, x8, x10, x12, f(x5)) g(x2) 10: main_5(x0, x3, x5, x7, x9) x11 -> main_7(x3, x5, x7, x9, x11) x0 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x11, x13) x14 -> map_rev2_f1_f2_l_1(x14, rmap1(x11, x13)) rmap2_3(x11, x13) 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x0, x2, x4, x6) x8 -> main_6(x0) main_7(x2, x4, x6, x8, map_rev2()) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x0, x2, x4) x6 -> main_5(x0, x2, x4, x6, map_rev()) map_rev2() 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x0, x2) x4 -> main_4(x0, x2, x4, map()) map_rev() 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x0) x2 -> main_3(x0, x2, mult(x2)) map() 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x0) -> main_2(x0, plus()) mult(plus()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 5: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x5, x11, x12, x16, x20) x24 -> main_xs_3(x12, x16, x24, h()) (x20 f(x11) g(x5)) 10: main_5(x24, x4, x10, x12, x16) x20 -> main_xs_1(x12, x16, x20, x24, f(x10)) g(x4) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x0, x5, x9, x13) x17 -> main_7(x5, x9, x13, x17, map_rev2()) x0 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x0, x6, x10) x14 -> main_7(x6, x10, x14, map_rev(), map_rev2()) x0 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x0, x4) x8 -> main_6(x0) main_7(x4, x8, map(), map_rev(), map_rev2()) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x0) x4 -> main_5(x0, x4, mult(x4), map(), map_rev()) map_rev2() 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x0) -> main_4(x0, plus(), mult(plus()), map()) map_rev() where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 6: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x48, x10, x22, x24) x32 -> main_xs_3(x24, x32, x48, h()) (map_rev2() f(x22) g(x10)) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x48, x10, x22) x24 -> main_xs_3(x24, map_rev(), x48, h()) (map_rev2() f(x22) g(x10)) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x0, x9) x17 -> main_7(x9, x17, map(), map_rev(), map_rev2()) x0 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x48) x8 -> main_xs_1(map(), map_rev(), map_rev2(), x48, f(mult(x8))) g(x8) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x0) -> main_7(plus(), mult(plus()), map(), map_rev(), map_rev2()) x0 where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 7: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x12, x21, x45, x6) x8 -> x6 h() (x8 h() (map_rev2() f(x45) g(x21) x12)) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x12, x21, x45) x6 -> x6 h() (map_rev() h() (map_rev2() f(x45) g(x21) x12)) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x24, x22) x46 -> map() h() (map_rev() h() (map_rev2() f(x46) g(x22) x24)) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x24) x17 -> map() h() (map_rev() h() (map_rev2() f(mult(x17)) g(x17) x24)) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x24) -> map() h() (map_rev() h() (map_rev2() f(mult(plus())) g(plus()) x24)) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 8: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x25, x43, x91, x13) x17 -> x13 h() (x17 h() (map_rev2_f1(f(x91)) g(x43) x25)) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x25, x43, x91) x13 -> x13 h() (map_rev_f(h()) (map_rev2() f(x91) g(x43) x25)) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x49, x45) x93 -> map() h() (map_rev_f(h()) (map_rev2() f(x93) g(x45) x49)) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x49) x35 -> map() h() (map_rev_f(h()) (map_rev2() f(mult(x35)) g(x35) x49)) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x49) -> map() h() (map_rev_f(h()) (map_rev2() f(mult(plus())) g(plus()) x49)) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 9: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x51, x87, x183, x27) x35 -> x27 h() (x35 h() (map_rev2_f1_f2(f(x183), g(x87)) x51)) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x51, x87, x183) x27 -> x27 h() (rmap(h()) (map_rev2() f(x183) g(x87) x51) Nil()) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x99, x91) x187 -> map() h() (rmap(h()) (map_rev2() f(x187) g(x91) x99) Nil()) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x99) x71 -> map() h() (rmap(h()) (map_rev2() f(mult(x71)) g(x71) x99) Nil()) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x99) -> map() h() (rmap(h()) (map_rev2() f(mult(plus())) g(plus()) x99) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 10: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x28, x175, x367, x55) x71 -> x55 h() (x71 h() (rmap1(f(x367), g(x175)) x28 Nil())) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x103, x175, x367) x55 -> x55 h() (rmap(h()) (map_rev2_f1(f(x367)) g(x175) x103) Nil()) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x199, x183) x375 -> map() h() (rmap(h()) (map_rev2_f1(f(x375)) g(x183) x199) Nil()) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x199) x143 -> map() h() (rmap(h()) (map_rev2_f1(f(mult(x143))) g(x143) x199) Nil()) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x199) -> map() h() (rmap(h()) (map_rev2_f1(f(mult(plus()))) g(plus()) x199) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 11: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x28, x175, x367, x55) x71 -> x55 h() (x71 h() (rmap1(f(x367), g(x175)) x28 Nil())) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x207, x351, x735) x111 -> x111 h() (rmap(h()) (map_rev2_f1_f2(f(x735), g(x351)) x207) Nil()) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x399, x367) x751 -> map() h() (rmap(h()) (map_rev2_f1_f2(f(x751), g(x367)) x399) Nil()) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x399) x287 -> map() h() (rmap(h()) (map_rev2_f1_f2(f(mult(x287)), g(x287)) x399) Nil()) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x399) -> map() h() (rmap(h()) (map_rev2_f1_f2(f(mult(plus())), g(plus())) x399) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 12: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x5, x6, x12) x13 -> cond_rmap2_l_acc(x12, x5, x6, x13) 16: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 17: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 18: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 19: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 20: rmap1_l(x5, x6, x8) x9 -> cond_rmap1_l_acc(x8, x5, x6, x9) 21: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 22: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 23: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 24: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 25: rmap1_l_1(x5, x6, x12) x13 -> cond_rmap1_l_acc_1(x12, x5, x6, x13) 26: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 27: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 28: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 29: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 30: rmap2_l_1(x5, x6, x8) x9 -> cond_rmap2_l_acc_1(x8, x5, x6, x9) 31: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 32: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 33: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 34: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 35: map_rev2() x5 -> map_rev2_f1(x5) 36: main_4(x28, x175, x367, x55) x71 -> x55 h() (x71 h() (rmap1(f(x367), g(x175)) x28 Nil())) 37: map_rev_f_l(x5) x6 -> x6 x5 Nil() 38: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 39: cond_rmap_l_acc(Nil(), x4, x7) -> x7 40: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 41: rmap_l(x4, x6) x7 -> cond_rmap_l_acc(x6, x4, x7) 42: rmap_1(x4) x6 -> rmap_l(x4, x6) 43: rmap(x8) x12 -> rmap_l(x8, x12) 44: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 45: map_rev() x4 -> map_rev_f(x4) 46: main_3(x28, x703, x1471) x223 -> x223 h() (rmap(h()) (rmap1(f(x1471), g(x703)) x28 Nil()) Nil()) 47: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 48: cond_map_f_l(Nil(), x3) -> Nil() 49: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 50: map_f(x3) x4 -> cond_map_f_l(x4, x3) 51: map_1() x3 -> map_f(x3) 52: map() x6 -> map_f(x6) 53: main_2(x28, x735) x1503 -> map() h() (rmap(h()) (rmap1(f(x1503), g(x735)) x28 Nil()) Nil()) 54: cond_mult_n_m(0(), x1, x3) -> 0() 55: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 56: mult_n(x1, x2) x3 -> cond_mult_n_m(x2, x1, x3) 57: mult_1(x1) x2 -> mult_n(x1, x2) 58: mult(x2) x4 -> mult_n(x2, x4) 59: main_1(x28) x575 -> map() h() (rmap(h()) (rmap1(f(mult(x575)), g(x575)) x28 Nil()) Nil()) 60: cond_plus_n_m(0(), x1) -> x1 61: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 62: plus_n(x1) x2 -> cond_plus_n_m(x2, x1) 63: plus_1() x1 -> plus_n(x1) 64: plus() x2 -> plus_n(x2) 65: main(x28) -> map() h() (rmap(h()) (rmap1(f(mult(plus())), g(plus())) x28 Nil()) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 13: UsableRules WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: cond_rmap2_l_acc(Nil(), x5, x6, x13) -> x13 14: cond_rmap2_l_acc(Cons(x14, x15), x5, x6, x13) -> rmap1(x5, x6) x15 Cons(x6 x14, x13) 15: rmap2_l(x10, x12, Nil()) x26 -> x26 16: rmap2_l(x10, x12, Cons(x28, x30)) x26 -> rmap1(x10, x12) x30 Cons(x12 x28, x26) 17: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 18: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 19: cond_rmap1_l_acc(Nil(), x5, x6, x9) -> x9 20: cond_rmap1_l_acc(Cons(x10, x11), x5, x6, x9) -> rmap2(x5, x6) x11 Cons(x5 x10, x9) 21: rmap1_l(x10, x12, Nil()) x18 -> x18 22: rmap1_l(x10, x12, Cons(x20, x22)) x18 -> rmap2(x10, x12) x22 Cons(x10 x20, x18) 23: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 24: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 25: cond_rmap1_l_acc_1(Nil(), x5, x6, x13) -> x13 26: cond_rmap1_l_acc_1(Cons(x14, x15), x5, x6, x13) -> rmap2_3(x5, x6) x15 Cons(x5 x14, x13) 27: rmap1_l_1(x10, x12, Nil()) x26 -> x26 28: rmap1_l_1(x10, x12, Cons(x28, x30)) x26 -> rmap2_3(x10, x12) x30 Cons(x10 x28, x26) 29: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 30: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 31: cond_rmap2_l_acc_1(Nil(), x5, x6, x9) -> x9 32: cond_rmap2_l_acc_1(Cons(x10, x11), x5, x6, x9) -> rmap1_3(x5, x6) x11 Cons(x6 x10, x9) 33: rmap2_l_1(x10, x12, Nil()) x18 -> x18 34: rmap2_l_1(x10, x12, Cons(x20, x22)) x18 -> rmap1_3(x10, x12) x22 Cons(x12 x20, x18) 35: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 36: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 37: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 38: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 39: map_rev2() x5 -> map_rev2_f1(x5) 40: main_4(x28, x175, x367, x55) x71 -> x55 h() (x71 h() (rmap1(f(x367), g(x175)) x28 Nil())) 41: map_rev_f_l(x5) x6 -> x6 x5 Nil() 42: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 43: cond_rmap_l_acc(Nil(), x4, x7) -> x7 44: cond_rmap_l_acc(Cons(x17, x18), x8, x15) -> rmap(x8) x18 Cons(x8 x17, x15) 45: rmap_l(x8, Nil()) x14 -> x14 46: rmap_l(x16, Cons(x34, x36)) x30 -> rmap(x16) x36 Cons(x16 x34, x30) 47: rmap_1(x4) x6 -> rmap_l(x4, x6) 48: rmap(x8) x12 -> rmap_l(x8, x12) 49: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 50: map_rev() x4 -> map_rev_f(x4) 51: main_3(x28, x703, x1471) x223 -> x223 h() (rmap(h()) (rmap1(f(x1471), g(x703)) x28 Nil()) Nil()) 52: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 53: cond_map_f_l(Nil(), x3) -> Nil() 54: cond_map_f_l(Cons(x10, x13), x6) -> Cons(x6 x10, map() x6 x13) 55: map_f(x6) Nil() -> Nil() 56: map_f(x12) Cons(x20, x26) -> Cons(x12 x20, map() x12 x26) 57: map_1() x3 -> map_f(x3) 58: map() x6 -> map_f(x6) 59: main_2(x28, x735) x1503 -> map() h() (rmap(h()) (rmap1(f(x1503), g(x735)) x28 Nil()) Nil()) 60: cond_mult_n_m(0(), x1, x3) -> 0() 61: cond_mult_n_m(S(x4), x1, x3) -> S(x1 (mult(x1) x4 x3) x3) 62: mult_n(x2, 0()) x6 -> 0() 63: mult_n(x2, S(x8)) x6 -> S(x2 (mult(x2) x8 x6) x6) 64: mult_1(x1) x2 -> mult_n(x1, x2) 65: mult(x2) x4 -> mult_n(x2, x4) 66: main_1(x28) x575 -> map() h() (rmap(h()) (rmap1(f(mult(x575)), g(x575)) x28 Nil()) Nil()) 67: cond_plus_n_m(0(), x1) -> x1 68: cond_plus_n_m(S(x3), x1) -> S(plus() x1 x3) 69: plus_n(x2) 0() -> x2 70: plus_n(x2) S(x6) -> S(plus() x2 x6) 71: plus_1() x1 -> plus_n(x1) 72: plus() x2 -> plus_n(x2) 73: main(x28) -> map() h() (rmap(h()) (rmap1(f(mult(plus())), g(plus())) x28 Nil()) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list cond_rmap_l_acc :: nat list -> (nat -> nat) -> nat list -> nat list cond_rmap1_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_map_f_l :: nat list -> (nat -> nat) -> nat list cond_mult_n_m :: nat -> (nat -> nat -> nat) -> nat -> nat cond_plus_n_m :: nat -> nat -> nat cond_rmap1_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list cond_rmap2_l_acc_1 :: nat list -> (nat -> nat) -> (nat -> nat) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 14: NeededRules WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 15: rmap2_l(x10, x12, Nil()) x26 -> x26 16: rmap2_l(x10, x12, Cons(x28, x30)) x26 -> rmap1(x10, x12) x30 Cons(x12 x28, x26) 17: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 18: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 21: rmap1_l(x10, x12, Nil()) x18 -> x18 22: rmap1_l(x10, x12, Cons(x20, x22)) x18 -> rmap2(x10, x12) x22 Cons(x10 x20, x18) 23: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 24: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 27: rmap1_l_1(x10, x12, Nil()) x26 -> x26 28: rmap1_l_1(x10, x12, Cons(x28, x30)) x26 -> rmap2_3(x10, x12) x30 Cons(x10 x28, x26) 29: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 30: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 33: rmap2_l_1(x10, x12, Nil()) x18 -> x18 34: rmap2_l_1(x10, x12, Cons(x20, x22)) x18 -> rmap1_3(x10, x12) x22 Cons(x12 x20, x18) 35: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 36: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 37: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 38: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 39: map_rev2() x5 -> map_rev2_f1(x5) 40: main_4(x28, x175, x367, x55) x71 -> x55 h() (x71 h() (rmap1(f(x367), g(x175)) x28 Nil())) 41: map_rev_f_l(x5) x6 -> x6 x5 Nil() 42: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 45: rmap_l(x8, Nil()) x14 -> x14 46: rmap_l(x16, Cons(x34, x36)) x30 -> rmap(x16) x36 Cons(x16 x34, x30) 47: rmap_1(x4) x6 -> rmap_l(x4, x6) 48: rmap(x8) x12 -> rmap_l(x8, x12) 49: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 50: map_rev() x4 -> map_rev_f(x4) 51: main_3(x28, x703, x1471) x223 -> x223 h() (rmap(h()) (rmap1(f(x1471), g(x703)) x28 Nil()) Nil()) 52: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 55: map_f(x6) Nil() -> Nil() 56: map_f(x12) Cons(x20, x26) -> Cons(x12 x20, map() x12 x26) 57: map_1() x3 -> map_f(x3) 58: map() x6 -> map_f(x6) 59: main_2(x28, x735) x1503 -> map() h() (rmap(h()) (rmap1(f(x1503), g(x735)) x28 Nil()) Nil()) 62: mult_n(x2, 0()) x6 -> 0() 63: mult_n(x2, S(x8)) x6 -> S(x2 (mult(x2) x8 x6) x6) 64: mult_1(x1) x2 -> mult_n(x1, x2) 65: mult(x2) x4 -> mult_n(x2, x4) 66: main_1(x28) x575 -> map() h() (rmap(h()) (rmap1(f(mult(x575)), g(x575)) x28 Nil()) Nil()) 69: plus_n(x2) 0() -> x2 70: plus_n(x2) S(x6) -> S(plus() x2 x6) 71: plus_1() x1 -> plus_n(x1) 72: plus() x2 -> plus_n(x2) 73: main(x28) -> map() h() (rmap(h()) (rmap1(f(mult(plus())), g(plus())) x28 Nil()) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: NeededRules + Details: none * Step 15: CFA WORST_CASE(?,O(n^4)) + Considered Problem: 1: main_6(x0) x6 -> x6 x0 2: main_xs_3(x3, x4, x6, x9) x10 -> x3 x9 (x4 x9 (x10 x6)) 3: main_xs_2(x6, x8, x11, x12, x15, x17) x18 -> x6 x18 (x8 x18 (x11 x15 x17 x12)) 4: h() x9 -> x9 5: main_xs_1(x6, x8, x21, x12, x29) x33 -> x6 h() (x8 h() (x21 x29 x33 x12)) 6: g(x1) x8 -> x1 x8 S(S(0())) 7: main_xs(x7, x12, x16, x22, x24) x30 -> x12 h() (x16 h() (x22 x30 g(x7) x24)) 8: f(x2) x7 -> x2 x7 (x2 x7 x7) 9: main_7(x11, x23, x6, x8, x41) x12 -> x6 h() (x8 h() (x41 f(x23) g(x11) x12)) 10: main_5(x24, x9, x21, x12, x16) x42 -> x12 h() (x16 h() (x42 f(x21) g(x9) x24)) 11: map_rev2_f1_f2_l_1(x7, x8) x9 -> x8 x7 Nil() 12: map_rev2_f1_f2_l(x7) x8 -> map_rev2_f1_f2_l_1(x7, x8) 13: rmap2_l(x10, x12, Nil()) x26 -> x26 14: rmap2_l(x10, x12, Cons(x28, x30)) x26 -> rmap1(x10, x12) x30 Cons(x12 x28, x26) 15: rmap2_2(x5, x6) x12 -> rmap2_l(x5, x6, x12) 16: rmap2(x10, x12) x24 -> rmap2_l(x10, x12, x24) 17: rmap1_l(x10, x12, Nil()) x18 -> x18 18: rmap1_l(x10, x12, Cons(x20, x22)) x18 -> rmap2(x10, x12) x22 Cons(x10 x20, x18) 19: rmap1_2(x5, x6) x8 -> rmap1_l(x5, x6, x8) 20: rmap1(x10, x12) x16 -> rmap1_l(x10, x12, x16) 21: rmap1_l_1(x10, x12, Nil()) x26 -> x26 22: rmap1_l_1(x10, x12, Cons(x28, x30)) x26 -> rmap2_3(x10, x12) x30 Cons(x10 x28, x26) 23: rmap1_5(x5, x6) x12 -> rmap1_l_1(x5, x6, x12) 24: rmap1_3(x10, x12) x24 -> rmap1_l_1(x10, x12, x24) 25: rmap2_l_1(x10, x12, Nil()) x18 -> x18 26: rmap2_l_1(x10, x12, Cons(x20, x22)) x18 -> rmap1_3(x10, x12) x22 Cons(x12 x20, x18) 27: rmap2_5(x5, x6) x8 -> rmap2_l_1(x5, x6, x8) 28: rmap2_3(x10, x12) x16 -> rmap2_l_1(x10, x12, x16) 29: map_rev2_f1_f2(x23, x27) x14 -> rmap1(x23, x27) x14 Nil() 30: map_rev2_f1(x5) x6 -> map_rev2_f1_f2(x5, x6) 31: map_rev2() x5 -> map_rev2_f1(x5) 32: main_4(x28, x175, x367, x55) x71 -> x55 h() (x71 h() (rmap1(f(x367), g(x175)) x28 Nil())) 33: map_rev_f_l(x5) x6 -> x6 x5 Nil() 34: rmap_l_acc_2(x4, x9) x10 -> rmap(x4) x9 x10 35: rmap_l(x8, Nil()) x14 -> x14 36: rmap_l(x16, Cons(x34, x36)) x30 -> rmap(x16) x36 Cons(x16 x34, x30) 37: rmap_1(x4) x6 -> rmap_l(x4, x6) 38: rmap(x8) x12 -> rmap_l(x8, x12) 39: map_rev_f(x9) x10 -> rmap(x9) x10 Nil() 40: map_rev() x4 -> map_rev_f(x4) 41: main_3(x28, x703, x1471) x223 -> x223 h() (rmap(h()) (rmap1(f(x1471), g(x703)) x28 Nil()) Nil()) 42: map_f_l_2(x3, x5) x7 -> Cons(x3 x5, x7) 43: map_f(x6) Nil() -> Nil() 44: map_f(x12) Cons(x20, x26) -> Cons(x12 x20, map() x12 x26) 45: map_1() x3 -> map_f(x3) 46: map() x6 -> map_f(x6) 47: main_2(x28, x735) x1503 -> map() h() (rmap(h()) (rmap1(f(x1503), g(x735)) x28 Nil()) Nil()) 48: mult_n(x2, 0()) x6 -> 0() 49: mult_n(x2, S(x8)) x6 -> S(x2 (mult(x2) x8 x6) x6) 50: mult_1(x1) x2 -> mult_n(x1, x2) 51: mult(x2) x4 -> mult_n(x2, x4) 52: main_1(x28) x575 -> map() h() (rmap(h()) (rmap1(f(mult(x575)), g(x575)) x28 Nil()) Nil()) 53: plus_n(x2) 0() -> x2 54: plus_n(x2) S(x6) -> S(plus() x2 x6) 55: plus_1() x1 -> plus_n(x1) 56: plus() x2 -> plus_n(x2) 57: main(x28) -> map() h() (rmap(h()) (rmap1(f(mult(plus())), g(plus())) x28 Nil()) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list map_rev_f :: (nat -> nat) -> nat list -> nat list map_rev2_f1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list map_rev2_f1_f2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat map_rev_f_l :: nat list -> (nat list -> nat list -> nat list) -> nat list map_rev2_f1_f2_l :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list map_rev :: (nat -> nat) -> nat list -> nat list map_rev2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat main_xs :: (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> nat list map_rev2_f1_f2_l_1 :: nat list -> (nat list -> nat list -> nat list) -> (nat list -> nat list -> nat list) -> nat list rmap1_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l_1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_1 :: nat list -> (nat -> nat -> nat) -> nat list map_1 :: (nat -> nat) -> nat list -> nat list mult_1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus_1 :: nat -> nat -> nat rmap_1 :: (nat -> nat) -> nat list -> nat list -> nat list main_xs_1 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> nat list rmap_l_acc_2 :: (nat -> nat) -> nat list -> nat list -> nat list map_f_l_2 :: (nat -> nat) -> nat -> nat list -> nat list main_2 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> nat list rmap1_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_xs_2 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat -> nat) -> (nat -> nat) -> nat list main_3 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_xs_3 :: ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list -> (nat -> nat) -> (nat list -> nat list) -> nat list main_4 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> nat list main_5 :: nat list -> (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list rmap1_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_5 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main_6 :: nat list -> (nat list -> nat list) -> nat list main_7 :: (nat -> nat -> nat) -> (nat -> nat -> nat) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> nat list -> nat list) -> ((nat -> nat) -> (nat -> nat) -> nat list -> nat list) -> nat list -> nat list map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_3 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: CFA {cfaRefinement = } + Details: {X{*} -> Nil() | Nil() | S(X{*}) | S(X{*}) | 0() | Nil() | Nil() | S(X{*}) | S(X{*}) | 0() | 0() | Nil() | Nil() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | Nil() | Nil() | Cons(X{*},X{*}) | Nil() | Nil() | Nil() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | Nil() | Nil() | Nil() | Nil() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | Nil() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | Nil() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | Nil() | Cons(X{*},X{*}) | Cons(X{*},X{*}) | Nil() | Nil() | 0() | S(X{*}) | S(X{*}) ,V{x1_6} -> plus() ,V{x2_8} -> mult(plus()) ,V{x2_48} -> V{x2_51} ,V{x2_49} -> V{x2_51} ,V{x2_51} -> V{x2_49} | plus() ,V{x2_53} -> V{x2_56} ,V{x2_54} -> V{x2_56} ,V{x2_56} -> V{x2_54} | R{49} | R{48} | V{x8_6} ,V{x4_51} -> V{x8_49} | V{x7_8} ,V{x6_43} -> V{x6_46} ,V{x6_46} -> V{x12_44} | h() ,V{x6_48} -> R{49} | V{x6_49} | R{48} | V{x7_8} ,V{x6_49} -> R{49} | V{x6_49} | R{48} | V{x7_8} ,V{x6_54} -> @(@(plus(),V{x2_54}),V{x6_54}) | @(R{56},V{x6_54}) | 0() | @(@(V{x2_49},@(@(mult(V{x2_49}),V{x8_49}),V{x6_49})),V{x6_49}) | @(@(V{x2_49},@(R{51},V{x6_49})),V{x6_49}) | @(@(V{x2_49},R{48}),V{x6_49}) | @(@(V{x2_49},R{49}),V{x6_49}) | @(R{56},V{x6_49}) | R{53} | R{54} | X{*} | S(0()) ,V{x7_8} -> V{x20_18} ,V{x8_6} -> V{x28_14} ,V{x8_35} -> V{x8_38} ,V{x8_38} -> V{x16_36} | h() ,V{x8_49} -> X{*} ,V{x9_4} -> V{x20_44} | V{x34_36} ,V{x10_13} -> V{x10_16} ,V{x10_14} -> V{x10_16} ,V{x10_16} -> V{x10_18} ,V{x10_17} -> V{x10_20} ,V{x10_18} -> V{x10_20} ,V{x10_20} -> V{x10_14} | f(mult(plus())) ,V{x12_13} -> V{x12_16} ,V{x12_14} -> V{x12_16} ,V{x12_16} -> V{x12_18} ,V{x12_17} -> V{x12_20} ,V{x12_18} -> V{x12_20} ,V{x12_20} -> V{x12_14} | g(plus()) ,V{x12_38} -> V{x36_36} | R{18} | R{17} ,V{x12_44} -> V{x6_46} ,V{x14_35} -> Cons(R{4},V{x30_36}) | Nil() ,V{x16_20} -> V{x30_14} | V{x28_57} ,V{x16_36} -> V{x8_38} ,V{x18_17} -> Cons(R{6},V{x26_14}) | Nil() ,V{x18_18} -> Cons(R{6},V{x26_14}) | Nil() ,V{x20_18} -> X{*} ,V{x20_44} -> R{4} ,V{x22_18} -> X{*} ,V{x24_16} -> V{x22_18} ,V{x26_13} -> Cons(R{8},V{x18_18}) ,V{x26_14} -> Cons(R{8},V{x18_18}) ,V{x26_44} -> V{x30_36} ,V{x28_14} -> X{*} ,V{x28_57} -> X{*} ,V{x30_14} -> X{*} ,V{x30_36} -> Cons(R{4},V{x30_36}) | Nil() ,V{x34_36} -> R{6} | R{8} ,V{x36_36} -> V{x26_14} | V{x18_18} ,R{0} -> R{57} | main(X{*}) ,R{4} -> V{x9_4} ,R{6} -> R{54} | @(R{56},S(S(0()))) | @(@(V{x1_6},V{x8_6}),S(S(0()))) ,R{8} -> R{49} | R{48} | @(R{51},R{48}) | @(R{51},R{49}) | @(@(V{x2_8},V{x7_8}),R{49}) | @(@(V{x2_8},V{x7_8}),R{48}) | @(R{51},@(R{51},V{x7_8})) | @(@(V{x2_8},V{x7_8}),@(R{51},V{x7_8})) | @(R{51},@(@(V{x2_8},V{x7_8}),V{x7_8})) | @(@(V{x2_8},V{x7_8}),@(@(V{x2_8},V{x7_8}),V{x7_8})) ,R{13} -> V{x26_13} ,R{14} -> R{18} | R{17} | @(R{20},Cons(R{6},V{x26_14})) | @(@(rmap1(V{x10_14},V{x12_14}),V{x30_14}),Cons(R{6},V{x26_14})) | @(R{20},Cons(@(V{x12_14},V{x28_14}),V{x26_14})) | @(@(rmap1(V{x10_14},V{x12_14}),V{x30_14}),Cons(@(V{x12_14},V{x28_14}),V{x26_14})) ,R{16} -> rmap2_l(V{x10_16},V{x12_16},V{x24_16}) ,R{17} -> V{x18_17} ,R{18} -> R{14} | R{13} | @(R{16},Cons(R{8},V{x18_18})) | @(@(rmap2(V{x10_18},V{x12_18}),V{x22_18}),Cons(R{8},V{x18_18})) | @(R{16},Cons(@(V{x10_18},V{x20_18}),V{x18_18})) | @(@(rmap2(V{x10_18},V{x12_18}),V{x22_18}),Cons(@(V{x10_18},V{x20_18}),V{x18_18})) ,R{20} -> rmap1_l(V{x10_20},V{x12_20},V{x16_20}) ,R{35} -> V{x14_35} ,R{36} -> R{36} | R{35} | @(R{38},Cons(R{4},V{x30_36})) | @(@(rmap(V{x16_36}),V{x36_36}),Cons(R{4},V{x30_36})) | @(R{38},Cons(@(V{x16_36},V{x34_36}),V{x30_36})) | @(@(rmap(V{x16_36}),V{x36_36}),Cons(@(V{x16_36},V{x34_36}),V{x30_36})) ,R{38} -> rmap_l(V{x8_38},V{x12_38}) ,R{43} -> Nil() ,R{44} -> Cons(R{4},R{43}) | Cons(R{4},R{44}) | Cons(@(V{x12_44},V{x20_44}),R{44}) | Cons(@(V{x12_44},V{x20_44}),R{43}) | Cons(R{4},@(R{46},V{x26_44})) | Cons(@(V{x12_44},V{x20_44}),@(R{46},V{x26_44})) | Cons(R{4},@(@(map(),V{x12_44}),V{x26_44})) | Cons(@(V{x12_44},V{x20_44}),@(@(map(),V{x12_44}),V{x26_44})) ,R{46} -> map_f(V{x6_46}) ,R{48} -> 0() ,R{49} -> S(R{54}) | S(R{53}) | S(@(R{56},V{x6_49})) | S(@(@(V{x2_49},R{49}),V{x6_49})) | S(@(@(V{x2_49},R{48}),V{x6_49})) | S(@(@(V{x2_49},@(R{51},V{x6_49})),V{x6_49})) | S(@(@(V{x2_49},@(@(mult(V{x2_49}),V{x8_49}),V{x6_49})),V{x6_49})) ,R{51} -> mult_n(V{x2_51},V{x4_51}) ,R{53} -> V{x2_53} ,R{54} -> S(R{54}) | S(R{53}) | S(@(R{56},V{x6_54})) | S(@(@(plus(),V{x2_54}),V{x6_54})) ,R{56} -> plus_n(V{x2_56}) ,R{57} -> R{44} | @(@(map(),h()),R{36}) | @(R{46},R{36}) | R{43} | @(R{46},R{35}) | @(@(map(),h()),R{35}) | @(R{46},@(R{38},Nil())) | @(@(map(),h()),@(R{38},Nil())) | @(R{46},@(@(rmap(h()),R{17}),Nil())) | @(R{46},@(@(rmap(h()),R{18}),Nil())) | @(@(map(),h()),@(@(rmap(h()),R{18}),Nil())) | @(@(map(),h()),@(@(rmap(h()),R{17}),Nil())) | @(R{46},@(@(rmap(h()),@(R{20},Nil())),Nil())) | @(@(map(),h()),@(@(rmap(h()),@(R{20},Nil())),Nil())) | @(R{46},@(@(rmap(h()),@(@(rmap1(f(mult(plus())),g(plus())),V{x28_57}),Nil())),Nil())) | @(@(map(),h()),@(@(rmap(h()),@(@(rmap1(f(mult(plus())),g(plus())),V{x28_57}),Nil())),Nil()))} * Step 16: UncurryATRS WORST_CASE(?,O(n^4)) + Considered Problem: 4: h() x9 -> x9 6: g(plus()) x1 -> plus() x1 S(S(0())) 8: f(mult(plus())) x1 -> mult(plus()) x1 (mult(plus()) x1 x1) 13: rmap2_l(f(mult(plus())), g(plus()), Nil()) Cons(x1, x2) -> Cons(x1, x2) 14: rmap2_l(f(mult(plus())), g(plus()), Cons(x4, x3)) Cons(x1, x2) -> rmap1(f(mult(plus())), g(plus())) x3 Cons(g(plus()) x4, Cons(x1, x2)) 16: rmap2(f(mult(plus())), g(plus())) x1 -> rmap2_l(f(mult(plus())), g(plus()), x1) 17: rmap1_l(f(mult(plus())), g(plus()), Nil()) x1 -> x1 18: rmap1_l(f(mult(plus())), g(plus()), Cons(x3, x2)) x1 -> rmap2(f(mult(plus())), g(plus())) x2 Cons(f(mult(plus())) x3, x1) 20: rmap1(f(mult(plus())), g(plus())) x1 -> rmap1_l(f(mult(plus())), g(plus()), x1) 35: rmap_l(h(), Nil()) x1 -> x1 36: rmap_l(h(), Cons(x3, x2)) x1 -> rmap(h()) x2 Cons(h() x3, x1) 38: rmap(h()) x1 -> rmap_l(h(), x1) 43: map_f(h()) Nil() -> Nil() 44: map_f(h()) Cons(x2, x1) -> Cons(h() x2, map() h() x1) 46: map() h() -> map_f(h()) 48: mult_n(plus(), 0()) x1 -> 0() 49: mult_n(plus(), S(x2)) x1 -> S(plus() (mult(plus()) x2 x1) x1) 51: mult(plus()) x1 -> mult_n(plus(), x1) 53: plus_n(x2) 0() -> x2 54: plus_n(x2) S(x1) -> S(plus() x2 x1) 56: plus() x2 -> plus_n(x2) 57: main(x1) -> map() h() (rmap(h()) (rmap1(f(mult(plus())), g(plus())) x1 Nil()) Nil()) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat map_f :: (nat -> nat) -> nat list -> nat list g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat plus_n :: nat -> nat -> nat map :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat rmap :: (nat -> nat) -> nat list -> nat list -> nat list rmap1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list main :: nat list -> nat list + Applied Processor: UncurryATRS + Details: none * Step 17: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: h#1(x9) -> x9 2: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 3: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 4: rmap2_l#1(f(mult(plus())), g(plus()), Nil(), Cons(x1, x2)) -> Cons(x1, x2) 5: rmap2_l#1(f(mult(plus())), g(plus()), Cons(x4, x3), Cons(x1, x2)) -> rmap1#2(f(mult(plus())), g(plus()) , x3 , Cons(g#1(plus(), x4), Cons(x1 , x2))) 6: rmap2#1(f(mult(plus())), g(plus()), x1) -> rmap2_l(f(mult(plus())), g(plus()), x1) 7: rmap2#2(f(mult(plus())), g(plus()), x1, x2) -> rmap2_l#1(f(mult(plus())), g(plus()), x1, x2) 8: rmap1_l#1(f(mult(plus())), g(plus()), Nil(), x1) -> x1 9: rmap1_l#1(f(mult(plus())), g(plus()), Cons(x3, x2), x1) -> rmap2#2(f(mult(plus())), g(plus()) , x2 , Cons(f#1(mult(plus()), x3), x1)) 10: rmap1#1(f(mult(plus())), g(plus()), x1) -> rmap1_l(f(mult(plus())), g(plus()), x1) 11: rmap1#2(f(mult(plus())), g(plus()), x1, x2) -> rmap1_l#1(f(mult(plus())), g(plus()), x1, x2) 12: rmap_l#1(h(), Nil(), x1) -> x1 13: rmap_l#1(h(), Cons(x3, x2), x1) -> rmap#2(h(), x2, Cons(h#1(x3), x1)) 14: rmap#1(h(), x1) -> rmap_l(h(), x1) 15: rmap#2(h(), x1, x2) -> rmap_l#1(h(), x1, x2) 16: map_f#1(h(), Nil()) -> Nil() 17: map_f#1(h(), Cons(x2, x1)) -> Cons(h#1(x2), map#2(h(), x1)) 18: map#1(h()) -> map_f(h()) 19: map#2(h(), x0) -> map_f#1(h(), x0) 20: mult_n#1(plus(), 0(), x1) -> 0() 21: mult_n#1(plus(), S(x2), x1) -> S(plus#2(mult#2(plus(), x2, x1), x1)) 22: mult#1(plus(), x1) -> mult_n(plus(), x1) 23: mult#2(plus(), x1, x2) -> mult_n#1(plus(), x1, x2) 24: plus_n#1(x2, 0()) -> x2 25: plus_n#1(x2, S(x1)) -> S(plus#2(x2, x1)) 26: plus#1(x2) -> plus_n(x2) 27: plus#2(x2, x3) -> plus_n#1(x2, x3) 28: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat h#1 :: nat -> nat main :: nat list -> nat list map#1 :: (nat -> nat) -> nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list map_f :: (nat -> nat) -> nat list -> nat list map_f#1 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#1 :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat mult_n#1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#1 :: nat -> nat -> nat plus#2 :: nat -> nat -> nat plus_n :: nat -> nat -> nat plus_n#1 :: nat -> nat -> nat rmap#1 :: (nat -> nat) -> nat list -> nat list -> nat list rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap_l#1 :: (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 18: UsableRules WORST_CASE(?,O(n^4)) + Considered Problem: 1: h#1(x9) -> x9 2: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 3: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 4: rmap2_l#1(f(mult(plus())), g(plus()), Nil(), Cons(x1, x2)) -> Cons(x1, x2) 5: rmap2_l#1(f(mult(plus())), g(plus()), Cons(x4, x3), Cons(x1, x2)) -> rmap1#2(f(mult(plus())), g(plus()) , x3 , Cons(g#1(plus(), x4), Cons(x1 , x2))) 6: rmap2#1(f(mult(plus())), g(plus()), x1) -> rmap2_l(f(mult(plus())), g(plus()), x1) 7: rmap2#2(f(mult(plus())), g(plus()), x1, x2) -> rmap2_l#1(f(mult(plus())), g(plus()), x1, x2) 8: rmap1_l#1(f(mult(plus())), g(plus()), Nil(), x1) -> x1 9: rmap1_l#1(f(mult(plus())), g(plus()), Cons(x3, x2), x1) -> rmap2#2(f(mult(plus())), g(plus()) , x2 , Cons(f#1(mult(plus()), x3), x1)) 10: rmap1#1(f(mult(plus())), g(plus()), x1) -> rmap1_l(f(mult(plus())), g(plus()), x1) 11: rmap1#2(f(mult(plus())), g(plus()), x1, x2) -> rmap1_l#1(f(mult(plus())), g(plus()), x1, x2) 12: rmap_l#1(h(), Nil(), x1) -> x1 13: rmap_l#1(h(), Cons(x18, x5), x3) -> rmap#2(h(), x5, Cons(x18, x3)) 14: rmap#1(h(), x1) -> rmap_l(h(), x1) 15: rmap#2(h(), x1, x2) -> rmap_l#1(h(), x1, x2) 16: map_f#1(h(), Nil()) -> Nil() 17: map_f#1(h(), Cons(x18, x3)) -> Cons(x18, map#2(h(), x3)) 18: map#1(h()) -> map_f(h()) 19: map#2(h(), x0) -> map_f#1(h(), x0) 20: mult_n#1(plus(), 0(), x1) -> 0() 21: mult_n#1(plus(), S(x2), x1) -> S(plus#2(mult#2(plus(), x2, x1), x1)) 22: mult#1(plus(), x1) -> mult_n(plus(), x1) 23: mult#2(plus(), x1, x2) -> mult_n#1(plus(), x1, x2) 24: plus_n#1(x2, 0()) -> x2 25: plus_n#1(x2, S(x1)) -> S(plus#2(x2, x1)) 26: plus#1(x2) -> plus_n(x2) 27: plus#2(x2, x3) -> plus_n#1(x2, x3) 28: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat h#1 :: nat -> nat main :: nat list -> nat list map#1 :: (nat -> nat) -> nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list map_f :: (nat -> nat) -> nat list -> nat list map_f#1 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#1 :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat mult_n :: (nat -> nat -> nat) -> nat -> nat -> nat mult_n#1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#1 :: nat -> nat -> nat plus#2 :: nat -> nat -> nat plus_n :: nat -> nat -> nat plus_n#1 :: nat -> nat -> nat rmap#1 :: (nat -> nat) -> nat list -> nat list -> nat list rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap_l :: (nat -> nat) -> nat list -> nat list -> nat list rmap_l#1 :: (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 19: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 2: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 3: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 4: rmap2_l#1(f(mult(plus())), g(plus()), Nil(), Cons(x1, x2)) -> Cons(x1, x2) 5: rmap2_l#1(f(mult(plus())), g(plus()), Cons(x4, x3), Cons(x1, x2)) -> rmap1#2(f(mult(plus())), g(plus()) , x3 , Cons(g#1(plus(), x4), Cons(x1 , x2))) 7: rmap2#2(f(mult(plus())), g(plus()), x1, x2) -> rmap2_l#1(f(mult(plus())), g(plus()), x1, x2) 8: rmap1_l#1(f(mult(plus())), g(plus()), Nil(), x1) -> x1 9: rmap1_l#1(f(mult(plus())), g(plus()), Cons(x3, x2), x1) -> rmap2#2(f(mult(plus())), g(plus()) , x2 , Cons(f#1(mult(plus()), x3), x1)) 11: rmap1#2(f(mult(plus())), g(plus()), x1, x2) -> rmap1_l#1(f(mult(plus())), g(plus()), x1, x2) 12: rmap_l#1(h(), Nil(), x1) -> x1 13: rmap_l#1(h(), Cons(x18, x5), x3) -> rmap#2(h(), x5, Cons(x18, x3)) 15: rmap#2(h(), x1, x2) -> rmap_l#1(h(), x1, x2) 16: map_f#1(h(), Nil()) -> Nil() 17: map_f#1(h(), Cons(x18, x3)) -> Cons(x18, map#2(h(), x3)) 19: map#2(h(), x0) -> map_f#1(h(), x0) 20: mult_n#1(plus(), 0(), x1) -> 0() 21: mult_n#1(plus(), S(x2), x1) -> S(plus#2(mult#2(plus(), x2, x1), x1)) 23: mult#2(plus(), x1, x2) -> mult_n#1(plus(), x1, x2) 24: plus_n#1(x2, 0()) -> x2 25: plus_n#1(x2, S(x1)) -> S(plus#2(x2, x1)) 27: plus#2(x2, x3) -> plus_n#1(x2, x3) 28: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list map_f#1 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat mult_n#1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat plus_n#1 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap_l#1 :: (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 20: UsableRules WORST_CASE(?,O(n^4)) + Considered Problem: 1: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 2: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 3: rmap2_l#1(f(mult(plus())), g(plus()), Nil(), Cons(x1, x2)) -> Cons(x1, x2) 4: rmap2_l#1(f(mult(plus())), g(plus()), Cons(x2, x7), Cons(x3, x5)) -> rmap1#2(f(mult(plus())), g(plus()) , x7 , Cons(plus#2(x2, S(S(0()))) , Cons(x3, x5))) 5: rmap2#2(f(mult(plus())), g(plus()), Nil(), Cons(x2, x4)) -> Cons(x2, x4) 6: rmap2#2(f(mult(plus())), g(plus()), Cons(x8, x6), Cons(x2, x4)) -> rmap1#2(f(mult(plus())), g(plus()) , x6 , Cons(g#1(plus(), x8), Cons(x2 , x4))) 7: rmap1_l#1(f(mult(plus())), g(plus()), Nil(), x1) -> x1 8: rmap1_l#1(f(mult(plus())), g(plus()), Cons(x7, x2), x3) -> rmap2_l#1(f(mult(plus())), g(plus()) , x2 , Cons(f#1(mult(plus()), x7), x3)) 9: rmap1#2(f(mult(plus())), g(plus()), Nil(), x2) -> x2 10: rmap1#2(f(mult(plus())), g(plus()), Cons(x6, x4), x2) -> rmap2#2(f(mult(plus())), g(plus()) , x4 , Cons(f#1(mult(plus()), x6), x2)) 11: rmap_l#1(h(), Nil(), x1) -> x1 12: rmap_l#1(h(), Cons(x18, x5), x3) -> rmap#2(h(), x5, Cons(x18, x3)) 13: rmap#2(h(), Nil(), x2) -> x2 14: rmap#2(h(), Cons(x36, x10), x6) -> rmap#2(h(), x10, Cons(x36, x6)) 15: map_f#1(h(), Nil()) -> Nil() 16: map_f#1(h(), Cons(x18, x3)) -> Cons(x18, map#2(h(), x3)) 17: map#2(h(), Nil()) -> Nil() 18: map#2(h(), Cons(x36, x6)) -> Cons(x36, map#2(h(), x6)) 19: mult_n#1(plus(), 0(), x1) -> 0() 20: mult_n#1(plus(), S(x2), x1) -> S(plus#2(mult#2(plus(), x2, x1), x1)) 21: mult#2(plus(), 0(), x2) -> 0() 22: mult#2(plus(), S(x4), x2) -> S(plus#2(mult#2(plus(), x4, x2), x2)) 23: plus_n#1(x2, 0()) -> x2 24: plus_n#1(x2, S(x1)) -> S(plus#2(x2, x1)) 25: plus#2(x4, 0()) -> x4 26: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 27: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list map_f#1 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat mult_n#1 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat plus_n#1 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap1_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2_l#1 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap_l#1 :: (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 21: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 2: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 5: rmap2#2(f(mult(plus())), g(plus()), Nil(), Cons(x2, x4)) -> Cons(x2, x4) 6: rmap2#2(f(mult(plus())), g(plus()), Cons(x8, x6), Cons(x2, x4)) -> rmap1#2(f(mult(plus())), g(plus()) , x6 , Cons(g#1(plus(), x8), Cons(x2 , x4))) 9: rmap1#2(f(mult(plus())), g(plus()), Nil(), x2) -> x2 10: rmap1#2(f(mult(plus())), g(plus()), Cons(x6, x4), x2) -> rmap2#2(f(mult(plus())), g(plus()) , x4 , Cons(f#1(mult(plus()), x6), x2)) 13: rmap#2(h(), Nil(), x2) -> x2 14: rmap#2(h(), Cons(x36, x10), x6) -> rmap#2(h(), x10, Cons(x36, x6)) 17: map#2(h(), Nil()) -> Nil() 18: map#2(h(), Cons(x36, x6)) -> Cons(x36, map#2(h(), x6)) 21: mult#2(plus(), 0(), x2) -> 0() 22: mult#2(plus(), S(x4), x2) -> S(plus#2(mult#2(plus(), x4, x2), x2)) 25: plus#2(x4, 0()) -> x4 26: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 27: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 22: UsableRules WORST_CASE(?,O(n^4)) + Considered Problem: 1: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 2: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 3: rmap2#2(f(mult(plus())), g(plus()), Nil(), Cons(x2, x4)) -> Cons(x2, x4) 4: rmap2#2(f(mult(plus())), g(plus()), Cons(x2, x13), Cons(x5, x9)) -> rmap1#2(f(mult(plus())), g(plus()) , x13 , Cons(plus#2(x2, S(S(0()))) , Cons(x5, x9))) 5: rmap1#2(f(mult(plus())), g(plus()), Nil(), x2) -> x2 6: rmap1#2(f(mult(plus())), g(plus()), Cons(x13, Nil()), x8) -> Cons(f#1(mult(plus()), x13), x8) 7: rmap1#2(f(mult(plus())), g(plus()), Cons(x13, Cons(x16, x12)), x8) -> rmap1#2(f(mult(plus())), g(plus()) , x12 , Cons(g#1(plus(), x16) , Cons(f#1(mult(plus()) , x13), x8))) 8: rmap#2(h(), Nil(), x2) -> x2 9: rmap#2(h(), Cons(x36, x10), x6) -> rmap#2(h(), x10, Cons(x36, x6)) 10: map#2(h(), Nil()) -> Nil() 11: map#2(h(), Cons(x36, x6)) -> Cons(x36, map#2(h(), x6)) 12: mult#2(plus(), 0(), x2) -> 0() 13: mult#2(plus(), S(x4), x2) -> S(plus#2(mult#2(plus(), x4, x2), x2)) 14: plus#2(x4, 0()) -> x4 15: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 16: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list rmap2#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 23: Inline WORST_CASE(?,O(n^4)) + Considered Problem: 1: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 2: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 5: rmap1#2(f(mult(plus())), g(plus()), Nil(), x2) -> x2 6: rmap1#2(f(mult(plus())), g(plus()), Cons(x13, Nil()), x8) -> Cons(f#1(mult(plus()), x13), x8) 7: rmap1#2(f(mult(plus())), g(plus()), Cons(x13, Cons(x16, x12)), x8) -> rmap1#2(f(mult(plus())), g(plus()) , x12 , Cons(g#1(plus(), x16) , Cons(f#1(mult(plus()) , x13), x8))) 8: rmap#2(h(), Nil(), x2) -> x2 9: rmap#2(h(), Cons(x36, x10), x6) -> rmap#2(h(), x10, Cons(x36, x6)) 10: map#2(h(), Nil()) -> Nil() 11: map#2(h(), Cons(x36, x6)) -> Cons(x36, map#2(h(), x6)) 12: mult#2(plus(), 0(), x2) -> 0() 13: mult#2(plus(), S(x4), x2) -> S(plus#2(mult#2(plus(), x4, x2), x2)) 14: plus#2(x4, 0()) -> x4 15: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 16: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 24: UsableRules WORST_CASE(?,O(n^4)) + Considered Problem: 1: g#1(plus(), x1) -> plus#2(x1, S(S(0()))) 2: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 3: rmap1#2(f(mult(plus())), g(plus()), Nil(), x2) -> x2 4: rmap1#2(f(mult(plus())), g(plus()), Cons(x13, Nil()), x8) -> Cons(f#1(mult(plus()), x13), x8) 5: rmap1#2(f(mult(plus())), g(plus()), Cons(x27, Cons(x2, x25)), x17) -> rmap1#2(f(mult(plus())), g(plus()) , x25 , Cons(plus#2(x2, S(S(0()))) , Cons(f#1(mult(plus()) , x27) , x17))) 6: rmap#2(h(), Nil(), x2) -> x2 7: rmap#2(h(), Cons(x36, x10), x6) -> rmap#2(h(), x10, Cons(x36, x6)) 8: map#2(h(), Nil()) -> Nil() 9: map#2(h(), Cons(x36, x6)) -> Cons(x36, map#2(h(), x6)) 10: mult#2(plus(), 0(), x2) -> 0() 11: mult#2(plus(), S(x4), x2) -> S(plus#2(mult#2(plus(), x4, x2), x2)) 12: plus#2(x4, 0()) -> x4 13: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 14: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat g#1 :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 25: Compression WORST_CASE(?,O(n^4)) + Considered Problem: 2: f#1(mult(plus()), x1) -> mult#2(plus(), x1, mult#2(plus(), x1, x1)) 3: rmap1#2(f(mult(plus())), g(plus()), Nil(), x2) -> x2 4: rmap1#2(f(mult(plus())), g(plus()), Cons(x13, Nil()), x8) -> Cons(f#1(mult(plus()), x13), x8) 5: rmap1#2(f(mult(plus())), g(plus()), Cons(x27, Cons(x2, x25)), x17) -> rmap1#2(f(mult(plus())), g(plus()) , x25 , Cons(plus#2(x2, S(S(0()))) , Cons(f#1(mult(plus()) , x27) , x17))) 6: rmap#2(h(), Nil(), x2) -> x2 7: rmap#2(h(), Cons(x36, x10), x6) -> rmap#2(h(), x10, Cons(x36, x6)) 8: map#2(h(), Nil()) -> Nil() 9: map#2(h(), Cons(x36, x6)) -> Cons(x36, map#2(h(), x6)) 10: mult#2(plus(), 0(), x2) -> 0() 11: mult#2(plus(), S(x4), x2) -> S(plus#2(mult#2(plus(), x4, x2), x2)) 12: plus#2(x4, 0()) -> x4 13: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 14: main(x1) -> map#2(h(), rmap#2(h(), rmap1#2(f(mult(plus())), g(plus()), x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f :: (nat -> nat -> nat) -> nat -> nat f#1 :: (nat -> nat -> nat) -> nat -> nat g :: (nat -> nat -> nat) -> nat -> nat h :: nat -> nat main :: nat list -> nat list map#2 :: (nat -> nat) -> nat list -> nat list mult :: (nat -> nat -> nat) -> nat -> nat -> nat mult#2 :: (nat -> nat -> nat) -> nat -> nat -> nat plus :: nat -> nat -> nat plus#2 :: nat -> nat -> nat rmap#2 :: (nat -> nat) -> nat list -> nat list -> nat list rmap1#2 :: (nat -> nat) -> (nat -> nat) -> nat list -> nat list -> nat list + Applied Processor: Compression + Details: none * Step 26: ToTctProblem WORST_CASE(?,O(n^4)) + Considered Problem: 1: f#1(x1) -> mult#2(x1, mult#2(x1, x1)) 2: rmap1#2(Nil(), x2) -> x2 3: rmap1#2(Cons(x13, Nil()), x8) -> Cons(f#1(x13), x8) 4: rmap1#2(Cons(x27, Cons(x2, x25)), x17) -> rmap1#2(x25, Cons(plus#2(x2, S(S(0()))), Cons(f#1(x27), x17))) 5: rmap#2(Nil(), x2) -> x2 6: rmap#2(Cons(x36, x10), x6) -> rmap#2(x10, Cons(x36, x6)) 7: map#2(Nil()) -> Nil() 8: map#2(Cons(x36, x6)) -> Cons(x36, map#2(x6)) 9: mult#2(0(), x2) -> 0() 10: mult#2(S(x4), x2) -> S(plus#2(mult#2(x4, x2), x2)) 11: plus#2(x4, 0()) -> x4 12: plus#2(x4, S(x2)) -> S(plus#2(x4, x2)) 13: main(x1) -> map#2(rmap#2(rmap1#2(x1, Nil()), Nil())) where 0 :: nat Cons :: 'a -> 'a list -> 'a list Nil :: 'a list S :: nat -> nat f#1 :: nat -> nat main :: nat list -> nat list map#2 :: nat list -> nat list mult#2 :: nat -> nat -> nat plus#2 :: nat -> nat -> nat rmap#2 :: nat list -> nat list -> nat list rmap1#2 :: nat list -> nat list -> nat list + Applied Processor: ToTctProblem + Details: none * Step 27: DependencyPairs WORST_CASE(?,O(n^4)) + Considered Problem: - Strict TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) main(x1) -> map#2(rmap#2(rmap1#2(x1,Nil()),Nil())) map#2(Cons(x36,x6)) -> Cons(x36,map#2(x6)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2} / {0/0,Cons/2,Nil/0,S/1} - Obligation: innermost runtime complexity wrt. defined symbols {main} and constructors {0,Cons,Nil,S} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,0()) -> c_7() plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap#2#(Nil(),x2) -> c_10() rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) rmap1#2#(Nil(),x2) -> c_13() Weak DPs and mark the set of starting terms. * Step 28: PredecessorEstimation WORST_CASE(?,O(n^4)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,0()) -> c_7() plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap#2#(Nil(),x2) -> c_10() rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) rmap1#2#(Nil(),x2) -> c_13() - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) main(x1) -> map#2(rmap#2(rmap1#2(x1,Nil()),Nil())) map#2(Cons(x36,x6)) -> Cons(x36,map#2(x6)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {4,5,7,10,13} by application of Pre({4,5,7,10,13}) = {1,2,3,6,8,9,12}. Here rules are labelled as follows: 1: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) 2: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) 3: map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) 4: map#2#(Nil()) -> c_4() 5: mult#2#(0(),x2) -> c_5() 6: mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) 7: plus#2#(x4,0()) -> c_7() 8: plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) 9: rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) 10: rmap#2#(Nil(),x2) -> c_10() 11: rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) 12: rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) 13: rmap1#2#(Nil(),x2) -> c_13() * Step 29: RemoveWeakSuffixes WORST_CASE(?,O(n^4)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) - Weak DPs: map#2#(Nil()) -> c_4() mult#2#(0(),x2) -> c_5() plus#2#(x4,0()) -> c_7() rmap#2#(Nil(),x2) -> c_10() rmap1#2#(Nil(),x2) -> c_13() - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) main(x1) -> map#2(rmap#2(rmap1#2(x1,Nil()),Nil())) map#2(Cons(x36,x6)) -> Cons(x36,map#2(x6)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):4 -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):4 -->_2 mult#2#(0(),x2) -> c_5():10 -->_1 mult#2#(0(),x2) -> c_5():10 2:S:main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) -->_3 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)):8 -->_3 rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)):7 -->_2 rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))):6 -->_1 map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)):3 -->_3 rmap1#2#(Nil(),x2) -> c_13():13 -->_2 rmap#2#(Nil(),x2) -> c_10():12 -->_1 map#2#(Nil()) -> c_4():9 3:S:map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) -->_1 map#2#(Nil()) -> c_4():9 -->_1 map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)):3 4:S:mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) -->_1 plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)):5 -->_1 plus#2#(x4,0()) -> c_7():11 -->_2 mult#2#(0(),x2) -> c_5():10 -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):4 5:S:plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(x4,0()) -> c_7():11 -->_1 plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)):5 6:S:rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) -->_1 rmap#2#(Nil(),x2) -> c_10():12 -->_1 rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))):6 7:S:rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) -->_1 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)):1 8:S:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) -->_1 rmap1#2#(Nil(),x2) -> c_13():13 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)):8 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)):7 -->_2 plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)):5 -->_3 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)):1 9:W:map#2#(Nil()) -> c_4() 10:W:mult#2#(0(),x2) -> c_5() 11:W:plus#2#(x4,0()) -> c_7() 12:W:rmap#2#(Nil(),x2) -> c_10() 13:W:rmap1#2#(Nil(),x2) -> c_13() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 9: map#2#(Nil()) -> c_4() 12: rmap#2#(Nil(),x2) -> c_10() 13: rmap1#2#(Nil(),x2) -> c_13() 10: mult#2#(0(),x2) -> c_5() 11: plus#2#(x4,0()) -> c_7() * Step 30: UsableRules WORST_CASE(?,O(n^4)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) main(x1) -> map#2(rmap#2(rmap1#2(x1,Nil()),Nil())) map#2(Cons(x36,x6)) -> Cons(x36,map#2(x6)) map#2(Nil()) -> Nil() mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) * Step 31: DecomposeDG WORST_CASE(?,O(n^4)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) and a lower component f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) Further, following extension rules are added to the lower component. main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) main#(x1) -> rmap1#2#(x1,Nil()) map#2#(Cons(x36,x6)) -> map#2#(x6) rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ** Step 31.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) -->_3 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)):4 -->_2 rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))):3 -->_1 map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)):2 2:S:map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) -->_1 map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)):2 3:S:rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) -->_1 rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))):3 4:S:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) ,plus#2#(x2,S(S(0()))) ,f#1#(x27)):4 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) ** Step 31.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {1,2}, uargs(S) = {1}, uargs(mult#2) = {2}, uargs(plus#2) = {1}, uargs(rmap#2) = {1}, uargs(rmap1#2) = {2}, uargs(map#2#) = {1}, uargs(rmap#2#) = {1}, uargs(rmap1#2#) = {2}, uargs(c_2) = {1,2,3}, uargs(c_3) = {1}, uargs(c_9) = {1}, uargs(c_12) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [2] p(Nil) = [2] p(S) = [1] x1 + [0] p(f#1) = [1] x1 + [0] p(main) = [0] p(map#2) = [0] p(mult#2) = [1] x2 + [0] p(plus#2) = [1] x1 + [0] p(rmap#2) = [1] x1 + [1] x2 + [0] p(rmap1#2) = [1] x1 + [1] x2 + [1] p(f#1#) = [0] p(main#) = [3] x1 + [0] p(map#2#) = [1] x1 + [0] p(mult#2#) = [0] p(plus#2#) = [0] p(rmap#2#) = [1] x1 + [1] x2 + [2] p(rmap1#2#) = [1] x1 + [1] x2 + [0] p(c_1) = [0] p(c_2) = [1] x1 + [1] x2 + [1] x3 + [0] p(c_3) = [1] x1 + [1] p(c_4) = [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [0] p(c_8) = [2] x1 + [0] p(c_9) = [1] x1 + [0] p(c_10) = [1] p(c_11) = [1] x1 + [0] p(c_12) = [1] x1 + [2] p(c_13) = [0] Following rules are strictly oriented: map#2#(Cons(x36,x6)) = [1] x36 + [1] x6 + [2] > [1] x6 + [1] = c_3(map#2#(x6)) Following rules are (at-least) weakly oriented: main#(x1) = [3] x1 + [0] >= [3] x1 + [14] = c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())),rmap#2#(rmap1#2(x1,Nil()),Nil()),rmap1#2#(x1,Nil())) rmap#2#(Cons(x36,x10),x6) = [1] x10 + [1] x36 + [1] x6 + [4] >= [1] x10 + [1] x36 + [1] x6 + [4] = c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [1] x2 + [1] x25 + [1] x27 + [4] >= [1] x17 + [1] x2 + [1] x25 + [1] x27 + [6] = c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) f#1(x1) = [1] x1 + [0] >= [1] x1 + [0] = mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) = [1] x2 + [0] >= [0] = 0() mult#2(S(x4),x2) = [1] x2 + [0] >= [1] x2 + [0] = S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) = [1] x4 + [0] >= [1] x4 + [0] = x4 plus#2(x4,S(x2)) = [1] x4 + [0] >= [1] x4 + [0] = S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) = [1] x10 + [1] x36 + [1] x6 + [2] >= [1] x10 + [1] x36 + [1] x6 + [2] = rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) = [1] x2 + [2] >= [1] x2 + [0] = x2 rmap1#2(Cons(x13,Nil()),x8) = [1] x13 + [1] x8 + [5] >= [1] x13 + [1] x8 + [2] = Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [1] x2 + [1] x25 + [1] x27 + [5] >= [1] x17 + [1] x2 + [1] x25 + [1] x27 + [5] = rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) = [1] x2 + [3] >= [1] x2 + [0] = x2 Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 31.a:3: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) - Weak DPs: map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_2) = {1,2,3}, uargs(c_3) = {1}, uargs(c_9) = {1}, uargs(c_12) = {1} Following symbols are considered usable: {main#,map#2#,rmap#2#,rmap1#2#} TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [2] p(Nil) = [4] p(S) = [0] p(f#1) = [2] p(main) = [0] p(map#2) = [0] p(mult#2) = [1] x2 + [3] p(plus#2) = [1] x1 + [5] p(rmap#2) = [2] x2 + [0] p(rmap1#2) = [0] p(f#1#) = [0] p(main#) = [4] p(map#2#) = [2] p(mult#2#) = [0] p(plus#2#) = [0] p(rmap#2#) = [0] p(rmap1#2#) = [0] p(c_1) = [2] p(c_2) = [1] x1 + [1] x2 + [4] x3 + [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [1] x2 + [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [1] x1 + [0] p(c_10) = [0] p(c_11) = [0] p(c_12) = [4] x1 + [0] p(c_13) = [0] Following rules are strictly oriented: main#(x1) = [4] > [2] = c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())),rmap#2#(rmap1#2(x1,Nil()),Nil()),rmap1#2#(x1,Nil())) Following rules are (at-least) weakly oriented: map#2#(Cons(x36,x6)) = [2] >= [2] = c_3(map#2#(x6)) rmap#2#(Cons(x36,x10),x6) = [0] >= [0] = c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [0] >= [0] = c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) ** Step 31.a:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) - Weak DPs: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {1,2}, uargs(S) = {1}, uargs(mult#2) = {2}, uargs(plus#2) = {1}, uargs(rmap#2) = {1}, uargs(rmap1#2) = {2}, uargs(map#2#) = {1}, uargs(rmap#2#) = {1}, uargs(rmap1#2#) = {2}, uargs(c_2) = {1,2,3}, uargs(c_3) = {1}, uargs(c_9) = {1}, uargs(c_12) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [1] p(Nil) = [0] p(S) = [1] x1 + [0] p(f#1) = [1] x1 + [0] p(main) = [1] x1 + [0] p(map#2) = [4] p(mult#2) = [1] x2 + [0] p(plus#2) = [1] x1 + [0] p(rmap#2) = [1] x1 + [1] x2 + [1] p(rmap1#2) = [2] x1 + [1] x2 + [0] p(f#1#) = [4] x1 + [1] p(main#) = [6] x1 + [6] p(map#2#) = [1] x1 + [1] p(mult#2#) = [1] x2 + [0] p(plus#2#) = [2] p(rmap#2#) = [1] x1 + [4] p(rmap1#2#) = [2] x1 + [1] x2 + [0] p(c_1) = [1] x2 + [0] p(c_2) = [1] x1 + [1] x2 + [1] x3 + [0] p(c_3) = [1] x1 + [1] p(c_4) = [2] p(c_5) = [0] p(c_6) = [1] x1 + [1] p(c_7) = [2] p(c_8) = [1] x1 + [2] p(c_9) = [1] x1 + [2] p(c_10) = [0] p(c_11) = [0] p(c_12) = [1] x1 + [0] p(c_13) = [4] Following rules are strictly oriented: rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [2] x2 + [2] x25 + [2] x27 + [4] > [1] x17 + [1] x2 + [2] x25 + [1] x27 + [2] = c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) Following rules are (at-least) weakly oriented: main#(x1) = [6] x1 + [6] >= [6] x1 + [6] = c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())),rmap#2#(rmap1#2(x1,Nil()),Nil()),rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) = [1] x36 + [1] x6 + [2] >= [1] x6 + [2] = c_3(map#2#(x6)) rmap#2#(Cons(x36,x10),x6) = [1] x10 + [1] x36 + [5] >= [1] x10 + [6] = c_9(rmap#2#(x10,Cons(x36,x6))) f#1(x1) = [1] x1 + [0] >= [1] x1 + [0] = mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) = [1] x2 + [0] >= [0] = 0() mult#2(S(x4),x2) = [1] x2 + [0] >= [1] x2 + [0] = S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) = [1] x4 + [0] >= [1] x4 + [0] = x4 plus#2(x4,S(x2)) = [1] x4 + [0] >= [1] x4 + [0] = S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) = [1] x10 + [1] x36 + [1] x6 + [2] >= [1] x10 + [1] x36 + [1] x6 + [2] = rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) = [1] x2 + [1] >= [1] x2 + [0] = x2 rmap1#2(Cons(x13,Nil()),x8) = [2] x13 + [1] x8 + [2] >= [1] x13 + [1] x8 + [1] = Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [2] x2 + [2] x25 + [2] x27 + [4] >= [1] x17 + [1] x2 + [2] x25 + [1] x27 + [2] = rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) = [1] x2 + [0] >= [1] x2 + [0] = x2 Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 31.a:5: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) - Weak DPs: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {1,2}, uargs(S) = {1}, uargs(mult#2) = {2}, uargs(plus#2) = {1}, uargs(rmap#2) = {1}, uargs(rmap1#2) = {2}, uargs(map#2#) = {1}, uargs(rmap#2#) = {1}, uargs(rmap1#2#) = {2}, uargs(c_2) = {1,2,3}, uargs(c_3) = {1}, uargs(c_9) = {1}, uargs(c_12) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [1] p(Nil) = [0] p(S) = [1] x1 + [0] p(f#1) = [1] x1 + [0] p(main) = [0] p(map#2) = [0] p(mult#2) = [1] x2 + [0] p(plus#2) = [1] x1 + [0] p(rmap#2) = [1] x1 + [1] x2 + [0] p(rmap1#2) = [1] x1 + [1] x2 + [0] p(f#1#) = [1] x1 + [0] p(main#) = [3] x1 + [7] p(map#2#) = [1] x1 + [1] p(mult#2#) = [1] x2 + [2] p(plus#2#) = [2] x1 + [0] p(rmap#2#) = [1] x1 + [4] p(rmap1#2#) = [1] x1 + [1] x2 + [1] p(c_1) = [1] x1 + [1] p(c_2) = [1] x1 + [1] x2 + [1] x3 + [1] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [1] x1 + [1] x2 + [0] p(c_7) = [0] p(c_8) = [1] x1 + [0] p(c_9) = [1] x1 + [0] p(c_10) = [1] p(c_11) = [1] x1 + [2] p(c_12) = [1] x1 + [0] p(c_13) = [0] Following rules are strictly oriented: rmap#2#(Cons(x36,x10),x6) = [1] x10 + [1] x36 + [5] > [1] x10 + [4] = c_9(rmap#2#(x10,Cons(x36,x6))) Following rules are (at-least) weakly oriented: main#(x1) = [3] x1 + [7] >= [3] x1 + [7] = c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())),rmap#2#(rmap1#2(x1,Nil()),Nil()),rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) = [1] x36 + [1] x6 + [2] >= [1] x6 + [1] = c_3(map#2#(x6)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [1] x2 + [1] x25 + [1] x27 + [3] >= [1] x17 + [1] x2 + [1] x25 + [1] x27 + [3] = c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) f#1(x1) = [1] x1 + [0] >= [1] x1 + [0] = mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) = [1] x2 + [0] >= [0] = 0() mult#2(S(x4),x2) = [1] x2 + [0] >= [1] x2 + [0] = S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) = [1] x4 + [0] >= [1] x4 + [0] = x4 plus#2(x4,S(x2)) = [1] x4 + [0] >= [1] x4 + [0] = S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) = [1] x10 + [1] x36 + [1] x6 + [1] >= [1] x10 + [1] x36 + [1] x6 + [1] = rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) = [1] x2 + [0] >= [1] x2 + [0] = x2 rmap1#2(Cons(x13,Nil()),x8) = [1] x13 + [1] x8 + [1] >= [1] x13 + [1] x8 + [1] = Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [1] x2 + [1] x25 + [1] x27 + [2] >= [1] x17 + [1] x2 + [1] x25 + [1] x27 + [2] = rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) = [1] x2 + [0] >= [1] x2 + [0] = x2 Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 31.a:6: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(x1) -> c_2(map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) ,rmap#2#(rmap1#2(x1,Nil()),Nil()) ,rmap1#2#(x1,Nil())) map#2#(Cons(x36,x6)) -> c_3(map#2#(x6)) rmap#2#(Cons(x36,x10),x6) -> c_9(rmap#2#(x10,Cons(x36,x6))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> c_12(rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17)))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/1,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 31.b:1: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) - Weak DPs: main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) main#(x1) -> rmap1#2#(x1,Nil()) map#2#(Cons(x36,x6)) -> map#2#(x6) rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) main#(x1) -> rmap1#2#(x1,Nil()) map#2#(Cons(x36,x6)) -> map#2#(x6) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) and a lower component plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) Further, following extension rules are added to the lower component. f#1#(x1) -> mult#2#(x1,x1) f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) main#(x1) -> rmap1#2#(x1,Nil()) map#2#(Cons(x36,x6)) -> map#2#(x6) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) *** Step 31.b:1.a:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) - Weak DPs: main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) main#(x1) -> rmap1#2#(x1,Nil()) map#2#(Cons(x36,x6)) -> map#2#(x6) rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):2 -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):2 2:S:mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):2 3:S:rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) -->_1 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)):1 4:S:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) 5:W:main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) -->_1 map#2#(Cons(x36,x6)) -> map#2#(x6):8 6:W:main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) -->_1 rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)):9 7:W:main#(x1) -> rmap1#2#(x1,Nil()) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))):11 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27):10 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))):4 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)):3 8:W:map#2#(Cons(x36,x6)) -> map#2#(x6) -->_1 map#2#(Cons(x36,x6)) -> map#2#(x6):8 9:W:rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) -->_1 rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)):9 10:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) -->_1 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)):1 11:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))):11 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27):10 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))):4 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) 9: rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) 5: main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) 8: map#2#(Cons(x36,x6)) -> map#2#(x6) *** Step 31.b:1.a:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) - Weak DPs: main#(x1) -> rmap1#2#(x1,Nil()) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):2 -->_1 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):2 2:S:mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)) -->_2 mult#2#(S(x4),x2) -> c_6(plus#2#(mult#2(x4,x2),x2),mult#2#(x4,x2)):2 3:S:rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) -->_1 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)):1 4:S:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) 7:W:main#(x1) -> rmap1#2#(x1,Nil()) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))):11 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27):10 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))):4 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)):3 10:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) -->_1 f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)):1 11:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))):11 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27):10 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))):4 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)):3 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) *** Step 31.b:1.a:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) - Weak DPs: main#(x1) -> rmap1#2#(x1,Nil()) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) *** Step 31.b:1.a:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) - Weak DPs: main#(x1) -> rmap1#2#(x1,Nil()) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(Cons) = {1,2}, uargs(S) = {1}, uargs(mult#2) = {2}, uargs(plus#2) = {1}, uargs(mult#2#) = {2}, uargs(rmap1#2#) = {2}, uargs(c_1) = {1,2}, uargs(c_6) = {1}, uargs(c_11) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [0] p(Nil) = [1] p(S) = [1] x1 + [0] p(f#1) = [3] x1 + [0] p(main) = [0] p(map#2) = [0] p(mult#2) = [1] x2 + [0] p(plus#2) = [1] x1 + [0] p(rmap#2) = [0] p(rmap1#2) = [0] p(f#1#) = [3] x1 + [5] p(main#) = [3] x1 + [6] p(map#2#) = [0] p(mult#2#) = [1] x2 + [0] p(plus#2#) = [3] x1 + [0] p(rmap#2#) = [0] p(rmap1#2#) = [3] x1 + [1] x2 + [5] p(c_1) = [1] x1 + [1] x2 + [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [1] x1 + [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [0] p(c_11) = [1] x1 + [0] p(c_12) = [0] p(c_13) = [0] Following rules are strictly oriented: f#1#(x1) = [3] x1 + [5] > [2] x1 + [0] = c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) rmap1#2#(Cons(x13,Nil()),x8) = [3] x13 + [1] x8 + [8] > [3] x13 + [5] = c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [3] x2 + [3] x25 + [3] x27 + [5] > [3] x2 + [0] = plus#2#(x2,S(S(0()))) Following rules are (at-least) weakly oriented: main#(x1) = [3] x1 + [6] >= [3] x1 + [6] = rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) = [1] x2 + [0] >= [1] x2 + [0] = c_6(mult#2#(x4,x2)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [3] x2 + [3] x25 + [3] x27 + [5] >= [3] x27 + [5] = f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [1] x17 + [3] x2 + [3] x25 + [3] x27 + [5] >= [1] x17 + [1] x2 + [3] x25 + [3] x27 + [5] = rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) f#1(x1) = [3] x1 + [0] >= [1] x1 + [0] = mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) = [1] x2 + [0] >= [0] = 0() mult#2(S(x4),x2) = [1] x2 + [0] >= [1] x2 + [0] = S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) = [1] x4 + [0] >= [1] x4 + [0] = x4 plus#2(x4,S(x2)) = [1] x4 + [0] >= [1] x4 + [0] = S(plus#2(x4,x2)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 31.b:1.a:5: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) - Weak DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_1) = {1,2}, uargs(c_6) = {1}, uargs(c_11) = {1} Following symbols are considered usable: {f#1#,main#,mult#2#,rmap1#2#} TcT has computed the following interpretation: p(0) = [8] p(Cons) = [1] x1 + [1] x2 + [0] p(Nil) = [0] p(S) = [1] x1 + [1] p(f#1) = [2] x1 + [0] p(main) = [0] p(map#2) = [0] p(mult#2) = [0] p(plus#2) = [0] p(rmap#2) = [0] p(rmap1#2) = [0] p(f#1#) = [8] x1 + [3] p(main#) = [12] x1 + [13] p(map#2#) = [4] x1 + [1] p(mult#2#) = [4] x1 + [0] p(plus#2#) = [13] p(rmap#2#) = [2] x1 + [1] p(rmap1#2#) = [12] x1 + [13] p(c_1) = [1] x1 + [1] x2 + [1] p(c_2) = [1] x1 + [1] x3 + [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [0] p(c_6) = [1] x1 + [0] p(c_7) = [8] p(c_8) = [4] x1 + [8] p(c_9) = [4] x1 + [1] p(c_10) = [0] p(c_11) = [1] x1 + [10] p(c_12) = [1] x1 + [2] x2 + [1] x3 + [1] p(c_13) = [1] Following rules are strictly oriented: mult#2#(S(x4),x2) = [4] x4 + [4] > [4] x4 + [0] = c_6(mult#2#(x4,x2)) Following rules are (at-least) weakly oriented: f#1#(x1) = [8] x1 + [3] >= [8] x1 + [1] = c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) = [12] x1 + [13] >= [12] x1 + [13] = rmap1#2#(x1,Nil()) rmap1#2#(Cons(x13,Nil()),x8) = [12] x13 + [13] >= [8] x13 + [13] = c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [12] x2 + [12] x25 + [12] x27 + [13] >= [8] x27 + [3] = f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [12] x2 + [12] x25 + [12] x27 + [13] >= [13] = plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = [12] x2 + [12] x25 + [12] x27 + [13] >= [12] x25 + [13] = rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) *** Step 31.b:1.a:6: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: f#1#(x1) -> c_1(mult#2#(x1,mult#2(x1,x1)),mult#2#(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) -> c_6(mult#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> c_11(f#1#(x13)) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/1,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 31.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) - Weak DPs: f#1#(x1) -> mult#2#(x1,x1) f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) main#(x1) -> rmap1#2#(x1,Nil()) map#2#(Cons(x36,x6)) -> map#2#(x6) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) -->_1 plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)):1 2:W:f#1#(x1) -> mult#2#(x1,x1) -->_1 mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2):9 -->_1 mult#2#(S(x4),x2) -> mult#2#(x4,x2):8 3:W:f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) -->_1 mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2):9 -->_1 mult#2#(S(x4),x2) -> mult#2#(x4,x2):8 4:W:main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) -->_1 map#2#(Cons(x36,x6)) -> map#2#(x6):7 5:W:main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) -->_1 rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)):10 6:W:main#(x1) -> rmap1#2#(x1,Nil()) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))):14 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))):13 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27):12 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13):11 7:W:map#2#(Cons(x36,x6)) -> map#2#(x6) -->_1 map#2#(Cons(x36,x6)) -> map#2#(x6):7 8:W:mult#2#(S(x4),x2) -> mult#2#(x4,x2) -->_1 mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2):9 -->_1 mult#2#(S(x4),x2) -> mult#2#(x4,x2):8 9:W:mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) -->_1 plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)):1 10:W:rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) -->_1 rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)):10 11:W:rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) -->_1 f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)):3 -->_1 f#1#(x1) -> mult#2#(x1,x1):2 12:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) -->_1 f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)):3 -->_1 f#1#(x1) -> mult#2#(x1,x1):2 13:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) -->_1 plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)):1 14:W:rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25 ,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))):14 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))):13 -->_1 rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27):12 -->_1 rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13):11 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 5: main#(x1) -> rmap#2#(rmap1#2(x1,Nil()),Nil()) 10: rmap#2#(Cons(x36,x10),x6) -> rmap#2#(x10,Cons(x36,x6)) 4: main#(x1) -> map#2#(rmap#2(rmap1#2(x1,Nil()),Nil())) 7: map#2#(Cons(x36,x6)) -> map#2#(x6) *** Step 31.b:1.b:2: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) - Weak DPs: f#1#(x1) -> mult#2#(x1,x1) f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) rmap#2(Cons(x36,x10),x6) -> rmap#2(x10,Cons(x36,x6)) rmap#2(Nil(),x2) -> x2 rmap1#2(Cons(x13,Nil()),x8) -> Cons(f#1(x13),x8) rmap1#2(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) rmap1#2(Nil(),x2) -> x2 - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) f#1#(x1) -> mult#2#(x1,x1) f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) *** Step 31.b:1.b:3: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) - Weak DPs: f#1#(x1) -> mult#2#(x1,x1) f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_8) = {1} Following symbols are considered usable: {mult#2,plus#2,f#1#,main#,mult#2#,plus#2#,rmap1#2#} TcT has computed the following interpretation: p(0) = 0 p(Cons) = x1 + x2 p(Nil) = 0 p(S) = 1 + x1 p(f#1) = 0 p(main) = x1 + x1^2 p(map#2) = 0 p(mult#2) = 1 + x1 + 2*x1*x2 p(plus#2) = x1 + x2 p(rmap#2) = 2*x1 + x1*x2 + x1^2 + 2*x2 p(rmap1#2) = 2 + x2 + 2*x2^2 p(f#1#) = 1 + 2*x1 + 2*x1^2 p(main#) = 2 + 2*x1 + 2*x1^2 p(map#2#) = 2 p(mult#2#) = x1 + x2 p(plus#2#) = x2 p(rmap#2#) = 2 + x1^2 p(rmap1#2#) = 2 + 2*x1 + 2*x1^2 p(c_1) = 2 + x1 + x2 p(c_2) = x2 p(c_3) = 1 p(c_4) = 0 p(c_5) = 0 p(c_6) = 2 p(c_7) = 0 p(c_8) = x1 p(c_9) = 0 p(c_10) = 2 p(c_11) = 2 p(c_12) = 2 p(c_13) = 0 Following rules are strictly oriented: plus#2#(x4,S(x2)) = 1 + x2 > x2 = c_8(plus#2#(x4,x2)) Following rules are (at-least) weakly oriented: f#1#(x1) = 1 + 2*x1 + 2*x1^2 >= 2*x1 = mult#2#(x1,x1) f#1#(x1) = 1 + 2*x1 + 2*x1^2 >= 1 + 2*x1 + 2*x1^2 = mult#2#(x1,mult#2(x1,x1)) main#(x1) = 2 + 2*x1 + 2*x1^2 >= 2 + 2*x1 + 2*x1^2 = rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) = 1 + x2 + x4 >= x2 + x4 = mult#2#(x4,x2) mult#2#(S(x4),x2) = 1 + x2 + x4 >= x2 = plus#2#(mult#2(x4,x2),x2) rmap1#2#(Cons(x13,Nil()),x8) = 2 + 2*x13 + 2*x13^2 >= 1 + 2*x13 + 2*x13^2 = f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = 2 + 2*x2 + 4*x2*x25 + 4*x2*x27 + 2*x2^2 + 2*x25 + 4*x25*x27 + 2*x25^2 + 2*x27 + 2*x27^2 >= 1 + 2*x27 + 2*x27^2 = f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = 2 + 2*x2 + 4*x2*x25 + 4*x2*x27 + 2*x2^2 + 2*x25 + 4*x25*x27 + 2*x25^2 + 2*x27 + 2*x27^2 >= 2 = plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) = 2 + 2*x2 + 4*x2*x25 + 4*x2*x27 + 2*x2^2 + 2*x25 + 4*x25*x27 + 2*x25^2 + 2*x27 + 2*x27^2 >= 2 + 2*x25 + 2*x25^2 = rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) mult#2(0(),x2) = 1 >= 0 = 0() mult#2(S(x4),x2) = 2 + 2*x2 + 2*x2*x4 + x4 >= 2 + x2 + 2*x2*x4 + x4 = S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) = x4 >= x4 = x4 plus#2(x4,S(x2)) = 1 + x2 + x4 >= 1 + x2 + x4 = S(plus#2(x4,x2)) *** Step 31.b:1.b:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: f#1#(x1) -> mult#2#(x1,x1) f#1#(x1) -> mult#2#(x1,mult#2(x1,x1)) main#(x1) -> rmap1#2#(x1,Nil()) mult#2#(S(x4),x2) -> mult#2#(x4,x2) mult#2#(S(x4),x2) -> plus#2#(mult#2(x4,x2),x2) plus#2#(x4,S(x2)) -> c_8(plus#2#(x4,x2)) rmap1#2#(Cons(x13,Nil()),x8) -> f#1#(x13) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> f#1#(x27) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> plus#2#(x2,S(S(0()))) rmap1#2#(Cons(x27,Cons(x2,x25)),x17) -> rmap1#2#(x25,Cons(plus#2(x2,S(S(0()))),Cons(f#1(x27),x17))) - Weak TRS: f#1(x1) -> mult#2(x1,mult#2(x1,x1)) mult#2(0(),x2) -> 0() mult#2(S(x4),x2) -> S(plus#2(mult#2(x4,x2),x2)) plus#2(x4,0()) -> x4 plus#2(x4,S(x2)) -> S(plus#2(x4,x2)) - Signature: {f#1/1,main/1,map#2/1,mult#2/2,plus#2/2,rmap#2/2,rmap1#2/2,f#1#/1,main#/1,map#2#/1,mult#2#/2,plus#2#/2 ,rmap#2#/2,rmap1#2#/2} / {0/0,Cons/2,Nil/0,S/1,c_1/2,c_2/3,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/1,c_9/1,c_10/0 ,c_11/1,c_12/3,c_13/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,Cons,Nil,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^4))