38.52/11.34 WORST_CASE(Omega(n^3), O(n^3)) 38.52/11.36 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 38.52/11.36 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 38.52/11.36 38.52/11.36 38.52/11.36 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). 38.52/11.36 38.52/11.36 (0) CpxTRS 38.52/11.36 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 38.52/11.36 (2) CpxWeightedTrs 38.52/11.36 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 38.52/11.36 (4) CpxTypedWeightedTrs 38.52/11.36 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 38.52/11.36 (6) CpxTypedWeightedCompleteTrs 38.52/11.36 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 38.52/11.36 (8) CpxRNTS 38.52/11.36 (9) CompleteCoflocoProof [FINISHED, 516 ms] 38.52/11.36 (10) BOUNDS(1, n^3) 38.52/11.36 (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 38.52/11.36 (12) CpxTRS 38.52/11.36 (13) SlicingProof [LOWER BOUND(ID), 0 ms] 38.52/11.36 (14) CpxTRS 38.52/11.36 (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 38.52/11.36 (16) typed CpxTrs 38.52/11.36 (17) OrderProof [LOWER BOUND(ID), 0 ms] 38.52/11.36 (18) typed CpxTrs 38.52/11.36 (19) RewriteLemmaProof [LOWER BOUND(ID), 306 ms] 38.52/11.36 (20) BEST 38.52/11.36 (21) proven lower bound 38.52/11.36 (22) LowerBoundPropagationProof [FINISHED, 0 ms] 38.52/11.36 (23) BOUNDS(n^1, INF) 38.52/11.36 (24) typed CpxTrs 38.52/11.36 (25) RewriteLemmaProof [LOWER BOUND(ID), 74 ms] 38.52/11.36 (26) typed CpxTrs 38.52/11.36 (27) RewriteLemmaProof [LOWER BOUND(ID), 41 ms] 38.52/11.36 (28) BEST 38.52/11.36 (29) proven lower bound 38.52/11.36 (30) LowerBoundPropagationProof [FINISHED, 0 ms] 38.52/11.36 (31) BOUNDS(n^2, INF) 38.52/11.36 (32) typed CpxTrs 38.52/11.36 (33) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] 38.52/11.36 (34) BEST 38.52/11.36 (35) proven lower bound 38.52/11.36 (36) LowerBoundPropagationProof [FINISHED, 0 ms] 38.52/11.36 (37) BOUNDS(n^3, INF) 38.52/11.36 (38) typed CpxTrs 38.52/11.36 (39) RewriteLemmaProof [LOWER BOUND(ID), 81 ms] 38.52/11.36 (40) typed CpxTrs 38.52/11.36 (41) RewriteLemmaProof [LOWER BOUND(ID), 42 ms] 38.52/11.36 (42) BOUNDS(1, INF) 38.52/11.36 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (0) 38.52/11.36 Obligation: 38.52/11.36 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). 38.52/11.36 38.52/11.36 38.52/11.36 The TRS R consists of the following rules: 38.52/11.36 38.52/11.36 minus(x, 0) -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0, s(y)) -> 0 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(n, x), y) -> add(n, app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(n, x)) -> app(reverse(x), add(n, nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(n, x)) -> add(n, shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 S is empty. 38.52/11.36 Rewrite Strategy: INNERMOST 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 38.52/11.36 Transformed relative TRS to weighted TRS 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (2) 38.52/11.36 Obligation: 38.52/11.36 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3). 38.52/11.36 38.52/11.36 38.52/11.36 The TRS R consists of the following rules: 38.52/11.36 38.52/11.36 minus(x, 0) -> x [1] 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) [1] 38.52/11.36 quot(0, s(y)) -> 0 [1] 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) [1] 38.52/11.36 app(nil, y) -> y [1] 38.52/11.36 app(add(n, x), y) -> add(n, app(x, y)) [1] 38.52/11.36 reverse(nil) -> nil [1] 38.52/11.36 reverse(add(n, x)) -> app(reverse(x), add(n, nil)) [1] 38.52/11.36 shuffle(nil) -> nil [1] 38.52/11.36 shuffle(add(n, x)) -> add(n, shuffle(reverse(x))) [1] 38.52/11.36 concat(leaf, y) -> y [1] 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) [1] 38.52/11.36 less_leaves(x, leaf) -> false [1] 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true [1] 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) [1] 38.52/11.36 38.52/11.36 Rewrite Strategy: INNERMOST 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 38.52/11.36 Infered types. 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (4) 38.52/11.36 Obligation: 38.52/11.36 Runtime Complexity Weighted TRS with Types. 38.52/11.36 The TRS R consists of the following rules: 38.52/11.36 38.52/11.36 minus(x, 0) -> x [1] 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) [1] 38.52/11.36 quot(0, s(y)) -> 0 [1] 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) [1] 38.52/11.36 app(nil, y) -> y [1] 38.52/11.36 app(add(n, x), y) -> add(n, app(x, y)) [1] 38.52/11.36 reverse(nil) -> nil [1] 38.52/11.36 reverse(add(n, x)) -> app(reverse(x), add(n, nil)) [1] 38.52/11.36 shuffle(nil) -> nil [1] 38.52/11.36 shuffle(add(n, x)) -> add(n, shuffle(reverse(x))) [1] 38.52/11.36 concat(leaf, y) -> y [1] 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) [1] 38.52/11.36 less_leaves(x, leaf) -> false [1] 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true [1] 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) [1] 38.52/11.36 38.52/11.36 The TRS has the following type information: 38.52/11.36 minus :: 0:s -> 0:s -> 0:s 38.52/11.36 0 :: 0:s 38.52/11.36 s :: 0:s -> 0:s 38.52/11.36 quot :: 0:s -> 0:s -> 0:s 38.52/11.36 app :: nil:add -> nil:add -> nil:add 38.52/11.36 nil :: nil:add 38.52/11.36 add :: a -> nil:add -> nil:add 38.52/11.36 reverse :: nil:add -> nil:add 38.52/11.36 shuffle :: nil:add -> nil:add 38.52/11.36 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 leaf :: leaf:cons 38.52/11.36 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.36 false :: false:true 38.52/11.36 true :: false:true 38.52/11.36 38.52/11.36 Rewrite Strategy: INNERMOST 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (5) CompletionProof (UPPER BOUND(ID)) 38.52/11.36 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 38.52/11.36 38.52/11.36 minus(v0, v1) -> null_minus [0] 38.52/11.36 quot(v0, v1) -> null_quot [0] 38.52/11.36 38.52/11.36 And the following fresh constants: null_minus, null_quot, const 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (6) 38.52/11.36 Obligation: 38.52/11.36 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 38.52/11.36 38.52/11.36 Runtime Complexity Weighted TRS with Types. 38.52/11.36 The TRS R consists of the following rules: 38.52/11.36 38.52/11.36 minus(x, 0) -> x [1] 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) [1] 38.52/11.36 quot(0, s(y)) -> 0 [1] 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) [1] 38.52/11.36 app(nil, y) -> y [1] 38.52/11.36 app(add(n, x), y) -> add(n, app(x, y)) [1] 38.52/11.36 reverse(nil) -> nil [1] 38.52/11.36 reverse(add(n, x)) -> app(reverse(x), add(n, nil)) [1] 38.52/11.36 shuffle(nil) -> nil [1] 38.52/11.36 shuffle(add(n, x)) -> add(n, shuffle(reverse(x))) [1] 38.52/11.36 concat(leaf, y) -> y [1] 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) [1] 38.52/11.36 less_leaves(x, leaf) -> false [1] 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true [1] 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) [1] 38.52/11.36 minus(v0, v1) -> null_minus [0] 38.52/11.36 quot(v0, v1) -> null_quot [0] 38.52/11.36 38.52/11.36 The TRS has the following type information: 38.52/11.36 minus :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot 38.52/11.36 0 :: 0:s:null_minus:null_quot 38.52/11.36 s :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot 38.52/11.36 quot :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot 38.52/11.36 app :: nil:add -> nil:add -> nil:add 38.52/11.36 nil :: nil:add 38.52/11.36 add :: a -> nil:add -> nil:add 38.52/11.36 reverse :: nil:add -> nil:add 38.52/11.36 shuffle :: nil:add -> nil:add 38.52/11.36 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 leaf :: leaf:cons 38.52/11.36 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.36 false :: false:true 38.52/11.36 true :: false:true 38.52/11.36 null_minus :: 0:s:null_minus:null_quot 38.52/11.36 null_quot :: 0:s:null_minus:null_quot 38.52/11.36 const :: a 38.52/11.36 38.52/11.36 Rewrite Strategy: INNERMOST 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 38.52/11.36 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 38.52/11.36 The constant constructors are abstracted as follows: 38.52/11.36 38.52/11.36 0 => 0 38.52/11.36 nil => 0 38.52/11.36 leaf => 0 38.52/11.36 false => 0 38.52/11.36 true => 1 38.52/11.36 null_minus => 0 38.52/11.36 null_quot => 0 38.52/11.36 const => 0 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (8) 38.52/11.36 Obligation: 38.52/11.36 Complexity RNTS consisting of the following rules: 38.52/11.36 38.52/11.36 app(z', z'') -{ 1 }-> y :|: z'' = y, y >= 0, z' = 0 38.52/11.36 app(z', z'') -{ 1 }-> 1 + n + app(x, y) :|: n >= 0, z'' = y, z' = 1 + n + x, x >= 0, y >= 0 38.52/11.36 concat(z', z'') -{ 1 }-> y :|: z'' = y, y >= 0, z' = 0 38.52/11.36 concat(z', z'') -{ 1 }-> 1 + u + concat(v, y) :|: v >= 0, z' = 1 + u + v, z'' = y, y >= 0, u >= 0 38.52/11.36 less_leaves(z', z'') -{ 1 }-> less_leaves(concat(u, v), concat(w, z)) :|: v >= 0, z >= 0, z' = 1 + u + v, z'' = 1 + w + z, w >= 0, u >= 0 38.52/11.36 less_leaves(z', z'') -{ 1 }-> 1 :|: z >= 0, z'' = 1 + w + z, w >= 0, z' = 0 38.52/11.36 less_leaves(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' = x, x >= 0 38.52/11.36 minus(z', z'') -{ 1 }-> x :|: z'' = 0, z' = x, x >= 0 38.52/11.36 minus(z', z'') -{ 1 }-> minus(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y 38.52/11.36 minus(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 38.52/11.36 quot(z', z'') -{ 1 }-> 0 :|: y >= 0, z'' = 1 + y, z' = 0 38.52/11.36 quot(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 38.52/11.36 quot(z', z'') -{ 1 }-> 1 + quot(minus(x, y), 1 + y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y 38.52/11.36 reverse(z') -{ 1 }-> app(reverse(x), 1 + n + 0) :|: n >= 0, z' = 1 + n + x, x >= 0 38.52/11.36 reverse(z') -{ 1 }-> 0 :|: z' = 0 38.52/11.36 shuffle(z') -{ 1 }-> 0 :|: z' = 0 38.52/11.36 shuffle(z') -{ 1 }-> 1 + n + shuffle(reverse(x)) :|: n >= 0, z' = 1 + n + x, x >= 0 38.52/11.36 38.52/11.36 Only complete derivations are relevant for the runtime complexity. 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (9) CompleteCoflocoProof (FINISHED) 38.52/11.36 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 38.52/11.36 38.52/11.36 eq(start(V, V1),0,[minus(V, V1, Out)],[V >= 0,V1 >= 0]). 38.52/11.36 eq(start(V, V1),0,[quot(V, V1, Out)],[V >= 0,V1 >= 0]). 38.52/11.36 eq(start(V, V1),0,[app(V, V1, Out)],[V >= 0,V1 >= 0]). 38.52/11.36 eq(start(V, V1),0,[reverse(V, Out)],[V >= 0]). 38.52/11.36 eq(start(V, V1),0,[shuffle(V, Out)],[V >= 0]). 38.52/11.36 eq(start(V, V1),0,[concat(V, V1, Out)],[V >= 0,V1 >= 0]). 38.52/11.36 eq(start(V, V1),0,[fun(V, V1, Out)],[V >= 0,V1 >= 0]). 38.52/11.36 eq(minus(V, V1, Out),1,[],[Out = V2,V1 = 0,V = V2,V2 >= 0]). 38.52/11.36 eq(minus(V, V1, Out),1,[minus(V3, V4, Ret)],[Out = Ret,V = 1 + V3,V3 >= 0,V4 >= 0,V1 = 1 + V4]). 38.52/11.36 eq(quot(V, V1, Out),1,[],[Out = 0,V5 >= 0,V1 = 1 + V5,V = 0]). 38.52/11.36 eq(quot(V, V1, Out),1,[minus(V7, V6, Ret10),quot(Ret10, 1 + V6, Ret1)],[Out = 1 + Ret1,V = 1 + V7,V7 >= 0,V6 >= 0,V1 = 1 + V6]). 38.52/11.36 eq(app(V, V1, Out),1,[],[Out = V8,V1 = V8,V8 >= 0,V = 0]). 38.52/11.36 eq(app(V, V1, Out),1,[app(V9, V10, Ret11)],[Out = 1 + Ret11 + V11,V11 >= 0,V1 = V10,V = 1 + V11 + V9,V9 >= 0,V10 >= 0]). 38.52/11.36 eq(reverse(V, Out),1,[],[Out = 0,V = 0]). 38.52/11.36 eq(reverse(V, Out),1,[reverse(V12, Ret0),app(Ret0, 1 + V13 + 0, Ret2)],[Out = Ret2,V13 >= 0,V = 1 + V12 + V13,V12 >= 0]). 38.52/11.36 eq(shuffle(V, Out),1,[],[Out = 0,V = 0]). 38.52/11.36 eq(shuffle(V, Out),1,[reverse(V14, Ret101),shuffle(Ret101, Ret12)],[Out = 1 + Ret12 + V15,V15 >= 0,V = 1 + V14 + V15,V14 >= 0]). 38.52/11.36 eq(concat(V, V1, Out),1,[],[Out = V16,V1 = V16,V16 >= 0,V = 0]). 38.52/11.36 eq(concat(V, V1, Out),1,[concat(V18, V19, Ret13)],[Out = 1 + Ret13 + V17,V18 >= 0,V = 1 + V17 + V18,V1 = V19,V19 >= 0,V17 >= 0]). 38.52/11.36 eq(fun(V, V1, Out),1,[],[Out = 0,V1 = 0,V = V20,V20 >= 0]). 38.52/11.36 eq(fun(V, V1, Out),1,[],[Out = 1,V22 >= 0,V1 = 1 + V21 + V22,V21 >= 0,V = 0]). 38.52/11.36 eq(fun(V, V1, Out),1,[concat(V23, V24, Ret01),concat(V25, V26, Ret14),fun(Ret01, Ret14, Ret3)],[Out = Ret3,V24 >= 0,V26 >= 0,V = 1 + V23 + V24,V1 = 1 + V25 + V26,V25 >= 0,V23 >= 0]). 38.52/11.36 eq(minus(V, V1, Out),0,[],[Out = 0,V28 >= 0,V27 >= 0,V1 = V27,V = V28]). 38.52/11.36 eq(quot(V, V1, Out),0,[],[Out = 0,V30 >= 0,V29 >= 0,V1 = V29,V = V30]). 38.52/11.36 input_output_vars(minus(V,V1,Out),[V,V1],[Out]). 38.52/11.36 input_output_vars(quot(V,V1,Out),[V,V1],[Out]). 38.52/11.36 input_output_vars(app(V,V1,Out),[V,V1],[Out]). 38.52/11.36 input_output_vars(reverse(V,Out),[V],[Out]). 38.52/11.36 input_output_vars(shuffle(V,Out),[V],[Out]). 38.52/11.36 input_output_vars(concat(V,V1,Out),[V,V1],[Out]). 38.52/11.36 input_output_vars(fun(V,V1,Out),[V,V1],[Out]). 38.52/11.36 38.52/11.36 38.52/11.36 CoFloCo proof output: 38.52/11.36 Preprocessing Cost Relations 38.52/11.36 ===================================== 38.52/11.36 38.52/11.36 #### Computed strongly connected components 38.52/11.36 0. recursive : [app/3] 38.52/11.36 1. recursive : [concat/3] 38.52/11.36 2. recursive : [fun/3] 38.52/11.36 3. recursive : [minus/3] 38.52/11.36 4. recursive : [quot/3] 38.52/11.36 5. recursive [non_tail] : [reverse/2] 38.52/11.36 6. recursive : [shuffle/2] 38.52/11.36 7. non_recursive : [start/2] 38.52/11.36 38.52/11.36 #### Obtained direct recursion through partial evaluation 38.52/11.36 0. SCC is partially evaluated into app/3 38.52/11.36 1. SCC is partially evaluated into concat/3 38.52/11.36 2. SCC is partially evaluated into fun/3 38.52/11.36 3. SCC is partially evaluated into minus/3 38.52/11.36 4. SCC is partially evaluated into quot/3 38.52/11.36 5. SCC is partially evaluated into reverse/2 38.52/11.36 6. SCC is partially evaluated into shuffle/2 38.52/11.36 7. SCC is partially evaluated into start/2 38.52/11.36 38.52/11.36 Control-Flow Refinement of Cost Relations 38.52/11.36 ===================================== 38.52/11.36 38.52/11.36 ### Specialization of cost equations app/3 38.52/11.36 * CE 15 is refined into CE [25] 38.52/11.36 * CE 14 is refined into CE [26] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of app/3 38.52/11.36 * CEs [26] --> Loop 18 38.52/11.36 * CEs [25] --> Loop 19 38.52/11.36 38.52/11.36 ### Ranking functions of CR app(V,V1,Out) 38.52/11.36 * RF of phase [19]: [V] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR app(V,V1,Out) 38.52/11.36 * Partial RF of phase [19]: 38.52/11.36 - RF of loop [19:1]: 38.52/11.36 V 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations concat/3 38.52/11.36 * CE 21 is refined into CE [27] 38.52/11.36 * CE 20 is refined into CE [28] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of concat/3 38.52/11.36 * CEs [28] --> Loop 20 38.52/11.36 * CEs [27] --> Loop 21 38.52/11.36 38.52/11.36 ### Ranking functions of CR concat(V,V1,Out) 38.52/11.36 * RF of phase [21]: [V] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR concat(V,V1,Out) 38.52/11.36 * Partial RF of phase [21]: 38.52/11.36 - RF of loop [21:1]: 38.52/11.36 V 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations fun/3 38.52/11.36 * CE 24 is refined into CE [29,30,31,32] 38.52/11.36 * CE 22 is refined into CE [33] 38.52/11.36 * CE 23 is refined into CE [34] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of fun/3 38.52/11.36 * CEs [33] --> Loop 22 38.52/11.36 * CEs [34] --> Loop 23 38.52/11.36 * CEs [29,30,31,32] --> Loop 24 38.52/11.36 38.52/11.36 ### Ranking functions of CR fun(V,V1,Out) 38.52/11.36 * RF of phase [24]: [V,V1] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR fun(V,V1,Out) 38.52/11.36 * Partial RF of phase [24]: 38.52/11.36 - RF of loop [24:1]: 38.52/11.36 V 38.52/11.36 V1 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations minus/3 38.52/11.36 * CE 10 is refined into CE [35] 38.52/11.36 * CE 8 is refined into CE [36] 38.52/11.36 * CE 9 is refined into CE [37] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of minus/3 38.52/11.36 * CEs [37] --> Loop 25 38.52/11.36 * CEs [35] --> Loop 26 38.52/11.36 * CEs [36] --> Loop 27 38.52/11.36 38.52/11.36 ### Ranking functions of CR minus(V,V1,Out) 38.52/11.36 * RF of phase [25]: [V,V1] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR minus(V,V1,Out) 38.52/11.36 * Partial RF of phase [25]: 38.52/11.36 - RF of loop [25:1]: 38.52/11.36 V 38.52/11.36 V1 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations quot/3 38.52/11.36 * CE 11 is refined into CE [38] 38.52/11.36 * CE 13 is refined into CE [39] 38.52/11.36 * CE 12 is refined into CE [40,41,42] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of quot/3 38.52/11.36 * CEs [42] --> Loop 28 38.52/11.36 * CEs [41] --> Loop 29 38.52/11.36 * CEs [40] --> Loop 30 38.52/11.36 * CEs [38,39] --> Loop 31 38.52/11.36 38.52/11.36 ### Ranking functions of CR quot(V,V1,Out) 38.52/11.36 * RF of phase [28]: [V-1,V-V1+1] 38.52/11.36 * RF of phase [30]: [V] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR quot(V,V1,Out) 38.52/11.36 * Partial RF of phase [28]: 38.52/11.36 - RF of loop [28:1]: 38.52/11.36 V-1 38.52/11.36 V-V1+1 38.52/11.36 * Partial RF of phase [30]: 38.52/11.36 - RF of loop [30:1]: 38.52/11.36 V 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations reverse/2 38.52/11.36 * CE 17 is refined into CE [43,44] 38.52/11.36 * CE 16 is refined into CE [45] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of reverse/2 38.52/11.36 * CEs [45] --> Loop 32 38.52/11.36 * CEs [44] --> Loop 33 38.52/11.36 * CEs [43] --> Loop 34 38.52/11.36 38.52/11.36 ### Ranking functions of CR reverse(V,Out) 38.52/11.36 * RF of phase [33]: [V] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR reverse(V,Out) 38.52/11.36 * Partial RF of phase [33]: 38.52/11.36 - RF of loop [33:1]: 38.52/11.36 V 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations shuffle/2 38.52/11.36 * CE 19 is refined into CE [46,47] 38.52/11.36 * CE 18 is refined into CE [48] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of shuffle/2 38.52/11.36 * CEs [48] --> Loop 35 38.52/11.36 * CEs [47] --> Loop 36 38.52/11.36 * CEs [46] --> Loop 37 38.52/11.36 38.52/11.36 ### Ranking functions of CR shuffle(V,Out) 38.52/11.36 * RF of phase [36]: [V-1] 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR shuffle(V,Out) 38.52/11.36 * Partial RF of phase [36]: 38.52/11.36 - RF of loop [36:1]: 38.52/11.36 V-1 38.52/11.36 38.52/11.36 38.52/11.36 ### Specialization of cost equations start/2 38.52/11.36 * CE 1 is refined into CE [49,50,51] 38.52/11.36 * CE 2 is refined into CE [52,53,54,55,56] 38.52/11.36 * CE 3 is refined into CE [57,58] 38.52/11.36 * CE 4 is refined into CE [59,60] 38.52/11.36 * CE 5 is refined into CE [61,62] 38.52/11.36 * CE 6 is refined into CE [63,64] 38.52/11.36 * CE 7 is refined into CE [65,66,67,68] 38.52/11.36 38.52/11.36 38.52/11.36 ### Cost equations --> "Loop" of start/2 38.52/11.36 * CEs [52,60,62] --> Loop 38 38.52/11.36 * CEs [49,50,51,53,54,55,56,58,64,66,67,68] --> Loop 39 38.52/11.36 * CEs [57,59,61,63,65] --> Loop 40 38.52/11.36 38.52/11.36 ### Ranking functions of CR start(V,V1) 38.52/11.36 38.52/11.36 #### Partial ranking functions of CR start(V,V1) 38.52/11.36 38.52/11.36 38.52/11.36 Computing Bounds 38.52/11.36 ===================================== 38.52/11.36 38.52/11.36 #### Cost of chains of app(V,V1,Out): 38.52/11.36 * Chain [[19],18]: 1*it(19)+1 38.52/11.36 Such that:it(19) =< -V1+Out 38.52/11.36 38.52/11.36 with precondition: [V+V1=Out,V>=1,V1>=0] 38.52/11.36 38.52/11.36 * Chain [18]: 1 38.52/11.36 with precondition: [V=0,V1=Out,V1>=0] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of concat(V,V1,Out): 38.52/11.36 * Chain [[21],20]: 1*it(21)+1 38.52/11.36 Such that:it(21) =< -V1+Out 38.52/11.36 38.52/11.36 with precondition: [V+V1=Out,V>=1,V1>=0] 38.52/11.36 38.52/11.36 * Chain [20]: 1 38.52/11.36 with precondition: [V=0,V1=Out,V1>=0] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of fun(V,V1,Out): 38.52/11.36 * Chain [[24],23]: 3*it(24)+2*s(9)+2*s(10)+1 38.52/11.36 Such that:aux(6) =< V1 38.52/11.36 aux(7) =< V 38.52/11.36 it(24) =< aux(7) 38.52/11.36 it(24) =< aux(6) 38.52/11.36 s(11) =< it(24)*aux(6) 38.52/11.36 s(12) =< it(24)*aux(7) 38.52/11.36 s(10) =< s(12) 38.52/11.36 s(9) =< s(11) 38.52/11.36 38.52/11.36 with precondition: [Out=1,V>=1,V1>=V+1] 38.52/11.36 38.52/11.36 * Chain [[24],22]: 3*it(24)+2*s(9)+2*s(10)+1 38.52/11.36 Such that:aux(5) =< V 38.52/11.36 aux(8) =< V1 38.52/11.36 it(24) =< aux(8) 38.52/11.36 it(24) =< aux(5) 38.52/11.36 s(11) =< it(24)*aux(8) 38.52/11.36 s(12) =< it(24)*aux(5) 38.52/11.36 s(10) =< s(12) 38.52/11.36 s(9) =< s(11) 38.52/11.36 38.52/11.36 with precondition: [Out=0,V1>=1,V>=V1] 38.52/11.36 38.52/11.36 * Chain [23]: 1 38.52/11.36 with precondition: [V=0,Out=1,V1>=1] 38.52/11.36 38.52/11.36 * Chain [22]: 1 38.52/11.36 with precondition: [V1=0,Out=0,V>=0] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of minus(V,V1,Out): 38.52/11.36 * Chain [[25],27]: 1*it(25)+1 38.52/11.36 Such that:it(25) =< V1 38.52/11.36 38.52/11.36 with precondition: [V=Out+V1,V1>=1,V>=V1] 38.52/11.36 38.52/11.36 * Chain [[25],26]: 1*it(25)+0 38.52/11.36 Such that:it(25) =< V1 38.52/11.36 38.52/11.36 with precondition: [Out=0,V>=1,V1>=1] 38.52/11.36 38.52/11.36 * Chain [27]: 1 38.52/11.36 with precondition: [V1=0,V=Out,V>=0] 38.52/11.36 38.52/11.36 * Chain [26]: 0 38.52/11.36 with precondition: [Out=0,V>=0,V1>=0] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of quot(V,V1,Out): 38.52/11.36 * Chain [[30],31]: 2*it(30)+1 38.52/11.36 Such that:it(30) =< Out 38.52/11.36 38.52/11.36 with precondition: [V1=1,Out>=1,V>=Out] 38.52/11.36 38.52/11.36 * Chain [[30],29,31]: 2*it(30)+1*s(14)+2 38.52/11.36 Such that:s(14) =< 1 38.52/11.36 it(30) =< Out 38.52/11.36 38.52/11.36 with precondition: [V1=1,Out>=2,V>=Out] 38.52/11.36 38.52/11.36 * Chain [[28],31]: 2*it(28)+1*s(17)+1 38.52/11.36 Such that:it(28) =< V-V1+1 38.52/11.36 aux(11) =< V 38.52/11.36 it(28) =< aux(11) 38.52/11.36 s(17) =< aux(11) 38.52/11.36 38.52/11.36 with precondition: [V1>=2,Out>=1,V+2>=2*Out+V1] 38.52/11.36 38.52/11.36 * Chain [[28],29,31]: 2*it(28)+1*s(14)+1*s(17)+2 38.52/11.36 Such that:it(28) =< V-V1+1 38.52/11.36 s(14) =< V1 38.52/11.36 aux(12) =< V 38.52/11.36 it(28) =< aux(12) 38.52/11.36 s(17) =< aux(12) 38.52/11.36 38.52/11.36 with precondition: [V1>=2,Out>=2,V+3>=2*Out+V1] 38.52/11.36 38.52/11.36 * Chain [31]: 1 38.52/11.36 with precondition: [Out=0,V>=0,V1>=0] 38.52/11.36 38.52/11.36 * Chain [29,31]: 1*s(14)+2 38.52/11.36 Such that:s(14) =< V1 38.52/11.36 38.52/11.36 with precondition: [Out=1,V>=1,V1>=1] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of reverse(V,Out): 38.52/11.36 * Chain [[33],34,32]: 2*it(33)+1*s(23)+3 38.52/11.36 Such that:aux(16) =< Out 38.52/11.36 it(33) =< aux(16) 38.52/11.36 s(23) =< it(33)*aux(16) 38.52/11.36 38.52/11.36 with precondition: [Out=V,Out>=2] 38.52/11.36 38.52/11.36 * Chain [34,32]: 3 38.52/11.36 with precondition: [V=Out,V>=1] 38.52/11.36 38.52/11.36 * Chain [32]: 1 38.52/11.36 with precondition: [V=0,Out=0] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of shuffle(V,Out): 38.52/11.36 * Chain [[36],37,35]: 4*it(36)+2*s(33)+1*s(34)+3 38.52/11.36 Such that:aux(19) =< Out 38.52/11.36 it(36) =< aux(19) 38.52/11.36 aux(17) =< aux(19) 38.52/11.36 s(35) =< it(36)*aux(17) 38.52/11.36 s(33) =< s(35) 38.52/11.36 s(34) =< s(33)*aux(19) 38.52/11.36 38.52/11.36 with precondition: [V=Out,V>=2] 38.52/11.36 38.52/11.36 * Chain [37,35]: 3 38.52/11.36 with precondition: [V=Out,V>=1] 38.52/11.36 38.52/11.36 * Chain [35]: 1 38.52/11.36 with precondition: [V=0,Out=0] 38.52/11.36 38.52/11.36 38.52/11.36 #### Cost of chains of start(V,V1): 38.52/11.36 * Chain [40]: 1 38.52/11.36 with precondition: [V=0] 38.52/11.36 38.52/11.36 * Chain [39]: 4*s(42)+4*s(45)+4*s(47)+6*s(56)+4*s(59)+4*s(60)+2 38.52/11.36 Such that:aux(20) =< V 38.52/11.36 aux(21) =< V-V1+1 38.52/11.36 aux(22) =< V1 38.52/11.36 s(47) =< aux(20) 38.52/11.36 s(45) =< aux(21) 38.52/11.36 s(42) =< aux(22) 38.52/11.36 s(45) =< aux(20) 38.52/11.36 s(56) =< aux(22) 38.52/11.36 s(56) =< aux(20) 38.52/11.36 s(57) =< s(56)*aux(22) 38.52/11.36 s(58) =< s(56)*aux(20) 38.52/11.36 s(59) =< s(58) 38.52/11.36 s(60) =< s(57) 38.52/11.36 38.52/11.36 with precondition: [V>=0,V1>=0] 38.52/11.36 38.52/11.36 * Chain [38]: 1*s(68)+10*s(70)+1*s(73)+2*s(78)+1*s(79)+3 38.52/11.36 Such that:s(68) =< 1 38.52/11.36 aux(23) =< V 38.52/11.36 s(70) =< aux(23) 38.52/11.36 s(73) =< s(70)*aux(23) 38.52/11.36 s(76) =< aux(23) 38.52/11.36 s(77) =< s(70)*s(76) 38.52/11.36 s(78) =< s(77) 38.52/11.36 s(79) =< s(78)*aux(23) 38.52/11.36 38.52/11.36 with precondition: [V>=1] 38.52/11.36 38.52/11.36 38.52/11.36 Closed-form bounds of start(V,V1): 38.52/11.36 ------------------------------------- 38.52/11.36 * Chain [40] with precondition: [V=0] 38.52/11.36 - Upper bound: 1 38.52/11.36 - Complexity: constant 38.52/11.36 * Chain [39] with precondition: [V>=0,V1>=0] 38.52/11.36 - Upper bound: 4*V+2+4*V*V1+10*V1+4*V1*V1+nat(V-V1+1)*4 38.52/11.36 - Complexity: n^2 38.52/11.36 * Chain [38] with precondition: [V>=1] 38.52/11.36 - Upper bound: 10*V+4+3*V*V+V*V*V 38.52/11.36 - Complexity: n^3 38.52/11.36 38.52/11.36 ### Maximum cost of start(V,V1): 4*V+1+max([6*V+2+3*V*V+V*V*V,4*V*nat(V1)+nat(V1)*10+nat(V1)*4*nat(V1)+nat(V-V1+1)*4])+1 38.52/11.36 Asymptotic class: n^3 38.52/11.36 * Total analysis performed in 421 ms. 38.52/11.36 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (10) 38.52/11.36 BOUNDS(1, n^3) 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (11) RenamingProof (BOTH BOUNDS(ID, ID)) 38.52/11.36 Renamed function symbols to avoid clashes with predefined symbol. 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (12) 38.52/11.36 Obligation: 38.52/11.36 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). 38.52/11.36 38.52/11.36 38.52/11.36 The TRS R consists of the following rules: 38.52/11.36 38.52/11.36 minus(x, 0') -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0', s(y)) -> 0' 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(n, x), y) -> add(n, app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(n, x)) -> app(reverse(x), add(n, nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(n, x)) -> add(n, shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 S is empty. 38.52/11.36 Rewrite Strategy: INNERMOST 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (13) SlicingProof (LOWER BOUND(ID)) 38.52/11.36 Sliced the following arguments: 38.52/11.36 add/0 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (14) 38.52/11.36 Obligation: 38.52/11.36 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). 38.52/11.36 38.52/11.36 38.52/11.36 The TRS R consists of the following rules: 38.52/11.36 38.52/11.36 minus(x, 0') -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0', s(y)) -> 0' 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(x), y) -> add(app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 S is empty. 38.52/11.36 Rewrite Strategy: INNERMOST 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 38.52/11.36 Infered types. 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (16) 38.52/11.36 Obligation: 38.52/11.36 Innermost TRS: 38.52/11.36 Rules: 38.52/11.36 minus(x, 0') -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0', s(y)) -> 0' 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(x), y) -> add(app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 Types: 38.52/11.36 minus :: 0':s -> 0':s -> 0':s 38.52/11.36 0' :: 0':s 38.52/11.36 s :: 0':s -> 0':s 38.52/11.36 quot :: 0':s -> 0':s -> 0':s 38.52/11.36 app :: nil:add -> nil:add -> nil:add 38.52/11.36 nil :: nil:add 38.52/11.36 add :: nil:add -> nil:add 38.52/11.36 reverse :: nil:add -> nil:add 38.52/11.36 shuffle :: nil:add -> nil:add 38.52/11.36 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 leaf :: leaf:cons 38.52/11.36 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.36 false :: false:true 38.52/11.36 true :: false:true 38.52/11.36 hole_0':s1_0 :: 0':s 38.52/11.36 hole_nil:add2_0 :: nil:add 38.52/11.36 hole_leaf:cons3_0 :: leaf:cons 38.52/11.36 hole_false:true4_0 :: false:true 38.52/11.36 gen_0':s5_0 :: Nat -> 0':s 38.52/11.36 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.36 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (17) OrderProof (LOWER BOUND(ID)) 38.52/11.36 Heuristically decided to analyse the following defined symbols: 38.52/11.36 minus, quot, app, reverse, shuffle, concat, less_leaves 38.52/11.36 38.52/11.36 They will be analysed ascendingly in the following order: 38.52/11.36 minus < quot 38.52/11.36 app < reverse 38.52/11.36 reverse < shuffle 38.52/11.36 concat < less_leaves 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (18) 38.52/11.36 Obligation: 38.52/11.36 Innermost TRS: 38.52/11.36 Rules: 38.52/11.36 minus(x, 0') -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0', s(y)) -> 0' 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(x), y) -> add(app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 Types: 38.52/11.36 minus :: 0':s -> 0':s -> 0':s 38.52/11.36 0' :: 0':s 38.52/11.36 s :: 0':s -> 0':s 38.52/11.36 quot :: 0':s -> 0':s -> 0':s 38.52/11.36 app :: nil:add -> nil:add -> nil:add 38.52/11.36 nil :: nil:add 38.52/11.36 add :: nil:add -> nil:add 38.52/11.36 reverse :: nil:add -> nil:add 38.52/11.36 shuffle :: nil:add -> nil:add 38.52/11.36 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 leaf :: leaf:cons 38.52/11.36 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.36 false :: false:true 38.52/11.36 true :: false:true 38.52/11.36 hole_0':s1_0 :: 0':s 38.52/11.36 hole_nil:add2_0 :: nil:add 38.52/11.36 hole_leaf:cons3_0 :: leaf:cons 38.52/11.36 hole_false:true4_0 :: false:true 38.52/11.36 gen_0':s5_0 :: Nat -> 0':s 38.52/11.36 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.36 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.36 38.52/11.36 38.52/11.36 Generator Equations: 38.52/11.36 gen_0':s5_0(0) <=> 0' 38.52/11.36 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.36 gen_nil:add6_0(0) <=> nil 38.52/11.36 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.36 gen_leaf:cons7_0(0) <=> leaf 38.52/11.36 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.36 38.52/11.36 38.52/11.36 The following defined symbols remain to be analysed: 38.52/11.36 minus, quot, app, reverse, shuffle, concat, less_leaves 38.52/11.36 38.52/11.36 They will be analysed ascendingly in the following order: 38.52/11.36 minus < quot 38.52/11.36 app < reverse 38.52/11.36 reverse < shuffle 38.52/11.36 concat < less_leaves 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (19) RewriteLemmaProof (LOWER BOUND(ID)) 38.52/11.36 Proved the following rewrite lemma: 38.52/11.36 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.36 38.52/11.36 Induction Base: 38.52/11.36 minus(gen_0':s5_0(0), gen_0':s5_0(0)) ->_R^Omega(1) 38.52/11.36 gen_0':s5_0(0) 38.52/11.36 38.52/11.36 Induction Step: 38.52/11.36 minus(gen_0':s5_0(+(n9_0, 1)), gen_0':s5_0(+(n9_0, 1))) ->_R^Omega(1) 38.52/11.36 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) ->_IH 38.52/11.36 gen_0':s5_0(0) 38.52/11.36 38.52/11.36 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (20) 38.52/11.36 Complex Obligation (BEST) 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (21) 38.52/11.36 Obligation: 38.52/11.36 Proved the lower bound n^1 for the following obligation: 38.52/11.36 38.52/11.36 Innermost TRS: 38.52/11.36 Rules: 38.52/11.36 minus(x, 0') -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0', s(y)) -> 0' 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(x), y) -> add(app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 Types: 38.52/11.36 minus :: 0':s -> 0':s -> 0':s 38.52/11.36 0' :: 0':s 38.52/11.36 s :: 0':s -> 0':s 38.52/11.36 quot :: 0':s -> 0':s -> 0':s 38.52/11.36 app :: nil:add -> nil:add -> nil:add 38.52/11.36 nil :: nil:add 38.52/11.36 add :: nil:add -> nil:add 38.52/11.36 reverse :: nil:add -> nil:add 38.52/11.36 shuffle :: nil:add -> nil:add 38.52/11.36 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 leaf :: leaf:cons 38.52/11.36 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.36 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.36 false :: false:true 38.52/11.36 true :: false:true 38.52/11.36 hole_0':s1_0 :: 0':s 38.52/11.36 hole_nil:add2_0 :: nil:add 38.52/11.36 hole_leaf:cons3_0 :: leaf:cons 38.52/11.36 hole_false:true4_0 :: false:true 38.52/11.36 gen_0':s5_0 :: Nat -> 0':s 38.52/11.36 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.36 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.36 38.52/11.36 38.52/11.36 Generator Equations: 38.52/11.36 gen_0':s5_0(0) <=> 0' 38.52/11.36 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.36 gen_nil:add6_0(0) <=> nil 38.52/11.36 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.36 gen_leaf:cons7_0(0) <=> leaf 38.52/11.36 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.36 38.52/11.36 38.52/11.36 The following defined symbols remain to be analysed: 38.52/11.36 minus, quot, app, reverse, shuffle, concat, less_leaves 38.52/11.36 38.52/11.36 They will be analysed ascendingly in the following order: 38.52/11.36 minus < quot 38.52/11.36 app < reverse 38.52/11.36 reverse < shuffle 38.52/11.36 concat < less_leaves 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (22) LowerBoundPropagationProof (FINISHED) 38.52/11.36 Propagated lower bound. 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (23) 38.52/11.36 BOUNDS(n^1, INF) 38.52/11.36 38.52/11.36 ---------------------------------------- 38.52/11.36 38.52/11.36 (24) 38.52/11.36 Obligation: 38.52/11.36 Innermost TRS: 38.52/11.36 Rules: 38.52/11.36 minus(x, 0') -> x 38.52/11.36 minus(s(x), s(y)) -> minus(x, y) 38.52/11.36 quot(0', s(y)) -> 0' 38.52/11.36 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.36 app(nil, y) -> y 38.52/11.36 app(add(x), y) -> add(app(x, y)) 38.52/11.36 reverse(nil) -> nil 38.52/11.36 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.36 shuffle(nil) -> nil 38.52/11.36 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.36 concat(leaf, y) -> y 38.52/11.36 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.36 less_leaves(x, leaf) -> false 38.52/11.36 less_leaves(leaf, cons(w, z)) -> true 38.52/11.36 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.36 38.52/11.36 Types: 38.52/11.36 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 quot, app, reverse, shuffle, concat, less_leaves 38.52/11.37 38.52/11.37 They will be analysed ascendingly in the following order: 38.52/11.37 app < reverse 38.52/11.37 reverse < shuffle 38.52/11.37 concat < less_leaves 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (25) RewriteLemmaProof (LOWER BOUND(ID)) 38.52/11.37 Proved the following rewrite lemma: 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 38.52/11.37 Induction Base: 38.52/11.37 app(gen_nil:add6_0(0), gen_nil:add6_0(b)) ->_R^Omega(1) 38.52/11.37 gen_nil:add6_0(b) 38.52/11.37 38.52/11.37 Induction Step: 38.52/11.37 app(gen_nil:add6_0(+(n621_0, 1)), gen_nil:add6_0(b)) ->_R^Omega(1) 38.52/11.37 add(app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b))) ->_IH 38.52/11.37 add(gen_nil:add6_0(+(b, c622_0))) 38.52/11.37 38.52/11.37 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (26) 38.52/11.37 Obligation: 38.52/11.37 Innermost TRS: 38.52/11.37 Rules: 38.52/11.37 minus(x, 0') -> x 38.52/11.37 minus(s(x), s(y)) -> minus(x, y) 38.52/11.37 quot(0', s(y)) -> 0' 38.52/11.37 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.37 app(nil, y) -> y 38.52/11.37 app(add(x), y) -> add(app(x, y)) 38.52/11.37 reverse(nil) -> nil 38.52/11.37 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.37 shuffle(nil) -> nil 38.52/11.37 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.37 concat(leaf, y) -> y 38.52/11.37 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.37 less_leaves(x, leaf) -> false 38.52/11.37 less_leaves(leaf, cons(w, z)) -> true 38.52/11.37 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.37 38.52/11.37 Types: 38.52/11.37 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 reverse, shuffle, concat, less_leaves 38.52/11.37 38.52/11.37 They will be analysed ascendingly in the following order: 38.52/11.37 reverse < shuffle 38.52/11.37 concat < less_leaves 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (27) RewriteLemmaProof (LOWER BOUND(ID)) 38.52/11.37 Proved the following rewrite lemma: 38.52/11.37 reverse(gen_nil:add6_0(n1588_0)) -> gen_nil:add6_0(n1588_0), rt in Omega(1 + n1588_0 + n1588_0^2) 38.52/11.37 38.52/11.37 Induction Base: 38.52/11.37 reverse(gen_nil:add6_0(0)) ->_R^Omega(1) 38.52/11.37 nil 38.52/11.37 38.52/11.37 Induction Step: 38.52/11.37 reverse(gen_nil:add6_0(+(n1588_0, 1))) ->_R^Omega(1) 38.52/11.37 app(reverse(gen_nil:add6_0(n1588_0)), add(nil)) ->_IH 38.52/11.37 app(gen_nil:add6_0(c1589_0), add(nil)) ->_L^Omega(1 + n1588_0) 38.52/11.37 gen_nil:add6_0(+(n1588_0, +(0, 1))) 38.52/11.37 38.52/11.37 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (28) 38.52/11.37 Complex Obligation (BEST) 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (29) 38.52/11.37 Obligation: 38.52/11.37 Proved the lower bound n^2 for the following obligation: 38.52/11.37 38.52/11.37 Innermost TRS: 38.52/11.37 Rules: 38.52/11.37 minus(x, 0') -> x 38.52/11.37 minus(s(x), s(y)) -> minus(x, y) 38.52/11.37 quot(0', s(y)) -> 0' 38.52/11.37 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.37 app(nil, y) -> y 38.52/11.37 app(add(x), y) -> add(app(x, y)) 38.52/11.37 reverse(nil) -> nil 38.52/11.37 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.37 shuffle(nil) -> nil 38.52/11.37 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.37 concat(leaf, y) -> y 38.52/11.37 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.37 less_leaves(x, leaf) -> false 38.52/11.37 less_leaves(leaf, cons(w, z)) -> true 38.52/11.37 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.37 38.52/11.37 Types: 38.52/11.37 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 reverse, shuffle, concat, less_leaves 38.52/11.37 38.52/11.37 They will be analysed ascendingly in the following order: 38.52/11.37 reverse < shuffle 38.52/11.37 concat < less_leaves 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (30) LowerBoundPropagationProof (FINISHED) 38.52/11.37 Propagated lower bound. 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (31) 38.52/11.37 BOUNDS(n^2, INF) 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (32) 38.52/11.37 Obligation: 38.52/11.37 Innermost TRS: 38.52/11.37 Rules: 38.52/11.37 minus(x, 0') -> x 38.52/11.37 minus(s(x), s(y)) -> minus(x, y) 38.52/11.37 quot(0', s(y)) -> 0' 38.52/11.37 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.37 app(nil, y) -> y 38.52/11.37 app(add(x), y) -> add(app(x, y)) 38.52/11.37 reverse(nil) -> nil 38.52/11.37 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.37 shuffle(nil) -> nil 38.52/11.37 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.37 concat(leaf, y) -> y 38.52/11.37 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.37 less_leaves(x, leaf) -> false 38.52/11.37 less_leaves(leaf, cons(w, z)) -> true 38.52/11.37 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.37 38.52/11.37 Types: 38.52/11.37 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 reverse(gen_nil:add6_0(n1588_0)) -> gen_nil:add6_0(n1588_0), rt in Omega(1 + n1588_0 + n1588_0^2) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 shuffle, concat, less_leaves 38.52/11.37 38.52/11.37 They will be analysed ascendingly in the following order: 38.52/11.37 concat < less_leaves 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (33) RewriteLemmaProof (LOWER BOUND(ID)) 38.52/11.37 Proved the following rewrite lemma: 38.52/11.37 shuffle(gen_nil:add6_0(n1886_0)) -> gen_nil:add6_0(n1886_0), rt in Omega(1 + n1886_0 + n1886_0^2 + n1886_0^3) 38.52/11.37 38.52/11.37 Induction Base: 38.52/11.37 shuffle(gen_nil:add6_0(0)) ->_R^Omega(1) 38.52/11.37 nil 38.52/11.37 38.52/11.37 Induction Step: 38.52/11.37 shuffle(gen_nil:add6_0(+(n1886_0, 1))) ->_R^Omega(1) 38.52/11.37 add(shuffle(reverse(gen_nil:add6_0(n1886_0)))) ->_L^Omega(1 + n1886_0 + n1886_0^2) 38.52/11.37 add(shuffle(gen_nil:add6_0(n1886_0))) ->_IH 38.52/11.37 add(gen_nil:add6_0(c1887_0)) 38.52/11.37 38.52/11.37 We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (34) 38.52/11.37 Complex Obligation (BEST) 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (35) 38.52/11.37 Obligation: 38.52/11.37 Proved the lower bound n^3 for the following obligation: 38.52/11.37 38.52/11.37 Innermost TRS: 38.52/11.37 Rules: 38.52/11.37 minus(x, 0') -> x 38.52/11.37 minus(s(x), s(y)) -> minus(x, y) 38.52/11.37 quot(0', s(y)) -> 0' 38.52/11.37 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.37 app(nil, y) -> y 38.52/11.37 app(add(x), y) -> add(app(x, y)) 38.52/11.37 reverse(nil) -> nil 38.52/11.37 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.37 shuffle(nil) -> nil 38.52/11.37 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.37 concat(leaf, y) -> y 38.52/11.37 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.37 less_leaves(x, leaf) -> false 38.52/11.37 less_leaves(leaf, cons(w, z)) -> true 38.52/11.37 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.37 38.52/11.37 Types: 38.52/11.37 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 reverse(gen_nil:add6_0(n1588_0)) -> gen_nil:add6_0(n1588_0), rt in Omega(1 + n1588_0 + n1588_0^2) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 shuffle, concat, less_leaves 38.52/11.37 38.52/11.37 They will be analysed ascendingly in the following order: 38.52/11.37 concat < less_leaves 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (36) LowerBoundPropagationProof (FINISHED) 38.52/11.37 Propagated lower bound. 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (37) 38.52/11.37 BOUNDS(n^3, INF) 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (38) 38.52/11.37 Obligation: 38.52/11.37 Innermost TRS: 38.52/11.37 Rules: 38.52/11.37 minus(x, 0') -> x 38.52/11.37 minus(s(x), s(y)) -> minus(x, y) 38.52/11.37 quot(0', s(y)) -> 0' 38.52/11.37 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.37 app(nil, y) -> y 38.52/11.37 app(add(x), y) -> add(app(x, y)) 38.52/11.37 reverse(nil) -> nil 38.52/11.37 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.37 shuffle(nil) -> nil 38.52/11.37 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.37 concat(leaf, y) -> y 38.52/11.37 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.37 less_leaves(x, leaf) -> false 38.52/11.37 less_leaves(leaf, cons(w, z)) -> true 38.52/11.37 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.37 38.52/11.37 Types: 38.52/11.37 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 reverse(gen_nil:add6_0(n1588_0)) -> gen_nil:add6_0(n1588_0), rt in Omega(1 + n1588_0 + n1588_0^2) 38.52/11.37 shuffle(gen_nil:add6_0(n1886_0)) -> gen_nil:add6_0(n1886_0), rt in Omega(1 + n1886_0 + n1886_0^2 + n1886_0^3) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 concat, less_leaves 38.52/11.37 38.52/11.37 They will be analysed ascendingly in the following order: 38.52/11.37 concat < less_leaves 38.52/11.37 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (39) RewriteLemmaProof (LOWER BOUND(ID)) 38.52/11.37 Proved the following rewrite lemma: 38.52/11.37 concat(gen_leaf:cons7_0(n2117_0), gen_leaf:cons7_0(b)) -> gen_leaf:cons7_0(+(n2117_0, b)), rt in Omega(1 + n2117_0) 38.52/11.37 38.52/11.37 Induction Base: 38.52/11.37 concat(gen_leaf:cons7_0(0), gen_leaf:cons7_0(b)) ->_R^Omega(1) 38.52/11.37 gen_leaf:cons7_0(b) 38.52/11.37 38.52/11.37 Induction Step: 38.52/11.37 concat(gen_leaf:cons7_0(+(n2117_0, 1)), gen_leaf:cons7_0(b)) ->_R^Omega(1) 38.52/11.37 cons(leaf, concat(gen_leaf:cons7_0(n2117_0), gen_leaf:cons7_0(b))) ->_IH 38.52/11.37 cons(leaf, gen_leaf:cons7_0(+(b, c2118_0))) 38.52/11.37 38.52/11.37 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (40) 38.52/11.37 Obligation: 38.52/11.37 Innermost TRS: 38.52/11.37 Rules: 38.52/11.37 minus(x, 0') -> x 38.52/11.37 minus(s(x), s(y)) -> minus(x, y) 38.52/11.37 quot(0', s(y)) -> 0' 38.52/11.37 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) 38.52/11.37 app(nil, y) -> y 38.52/11.37 app(add(x), y) -> add(app(x, y)) 38.52/11.37 reverse(nil) -> nil 38.52/11.37 reverse(add(x)) -> app(reverse(x), add(nil)) 38.52/11.37 shuffle(nil) -> nil 38.52/11.37 shuffle(add(x)) -> add(shuffle(reverse(x))) 38.52/11.37 concat(leaf, y) -> y 38.52/11.37 concat(cons(u, v), y) -> cons(u, concat(v, y)) 38.52/11.37 less_leaves(x, leaf) -> false 38.52/11.37 less_leaves(leaf, cons(w, z)) -> true 38.52/11.37 less_leaves(cons(u, v), cons(w, z)) -> less_leaves(concat(u, v), concat(w, z)) 38.52/11.37 38.52/11.37 Types: 38.52/11.37 minus :: 0':s -> 0':s -> 0':s 38.52/11.37 0' :: 0':s 38.52/11.37 s :: 0':s -> 0':s 38.52/11.37 quot :: 0':s -> 0':s -> 0':s 38.52/11.37 app :: nil:add -> nil:add -> nil:add 38.52/11.37 nil :: nil:add 38.52/11.37 add :: nil:add -> nil:add 38.52/11.37 reverse :: nil:add -> nil:add 38.52/11.37 shuffle :: nil:add -> nil:add 38.52/11.37 concat :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 leaf :: leaf:cons 38.52/11.37 cons :: leaf:cons -> leaf:cons -> leaf:cons 38.52/11.37 less_leaves :: leaf:cons -> leaf:cons -> false:true 38.52/11.37 false :: false:true 38.52/11.37 true :: false:true 38.52/11.37 hole_0':s1_0 :: 0':s 38.52/11.37 hole_nil:add2_0 :: nil:add 38.52/11.37 hole_leaf:cons3_0 :: leaf:cons 38.52/11.37 hole_false:true4_0 :: false:true 38.52/11.37 gen_0':s5_0 :: Nat -> 0':s 38.52/11.37 gen_nil:add6_0 :: Nat -> nil:add 38.52/11.37 gen_leaf:cons7_0 :: Nat -> leaf:cons 38.52/11.37 38.52/11.37 38.52/11.37 Lemmas: 38.52/11.37 minus(gen_0':s5_0(n9_0), gen_0':s5_0(n9_0)) -> gen_0':s5_0(0), rt in Omega(1 + n9_0) 38.52/11.37 app(gen_nil:add6_0(n621_0), gen_nil:add6_0(b)) -> gen_nil:add6_0(+(n621_0, b)), rt in Omega(1 + n621_0) 38.52/11.37 reverse(gen_nil:add6_0(n1588_0)) -> gen_nil:add6_0(n1588_0), rt in Omega(1 + n1588_0 + n1588_0^2) 38.52/11.37 shuffle(gen_nil:add6_0(n1886_0)) -> gen_nil:add6_0(n1886_0), rt in Omega(1 + n1886_0 + n1886_0^2 + n1886_0^3) 38.52/11.37 concat(gen_leaf:cons7_0(n2117_0), gen_leaf:cons7_0(b)) -> gen_leaf:cons7_0(+(n2117_0, b)), rt in Omega(1 + n2117_0) 38.52/11.37 38.52/11.37 38.52/11.37 Generator Equations: 38.52/11.37 gen_0':s5_0(0) <=> 0' 38.52/11.37 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 38.52/11.37 gen_nil:add6_0(0) <=> nil 38.52/11.37 gen_nil:add6_0(+(x, 1)) <=> add(gen_nil:add6_0(x)) 38.52/11.37 gen_leaf:cons7_0(0) <=> leaf 38.52/11.37 gen_leaf:cons7_0(+(x, 1)) <=> cons(leaf, gen_leaf:cons7_0(x)) 38.52/11.37 38.52/11.37 38.52/11.37 The following defined symbols remain to be analysed: 38.52/11.37 less_leaves 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (41) RewriteLemmaProof (LOWER BOUND(ID)) 38.52/11.37 Proved the following rewrite lemma: 38.52/11.37 less_leaves(gen_leaf:cons7_0(n3224_0), gen_leaf:cons7_0(n3224_0)) -> false, rt in Omega(1 + n3224_0) 38.52/11.37 38.52/11.37 Induction Base: 38.52/11.37 less_leaves(gen_leaf:cons7_0(0), gen_leaf:cons7_0(0)) ->_R^Omega(1) 38.52/11.37 false 38.52/11.37 38.52/11.37 Induction Step: 38.52/11.37 less_leaves(gen_leaf:cons7_0(+(n3224_0, 1)), gen_leaf:cons7_0(+(n3224_0, 1))) ->_R^Omega(1) 38.52/11.37 less_leaves(concat(leaf, gen_leaf:cons7_0(n3224_0)), concat(leaf, gen_leaf:cons7_0(n3224_0))) ->_L^Omega(1) 38.52/11.37 less_leaves(gen_leaf:cons7_0(+(0, n3224_0)), concat(leaf, gen_leaf:cons7_0(n3224_0))) ->_L^Omega(1) 38.52/11.37 less_leaves(gen_leaf:cons7_0(n3224_0), gen_leaf:cons7_0(+(0, n3224_0))) ->_IH 38.52/11.37 false 38.52/11.37 38.52/11.37 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 38.52/11.37 ---------------------------------------- 38.52/11.37 38.52/11.37 (42) 38.52/11.37 BOUNDS(1, INF) 38.62/11.41 EOF