1128.13/291.57 WORST_CASE(Omega(n^1), O(n^2)) 1128.16/291.58 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 1128.16/291.58 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 1128.16/291.58 1128.16/291.58 1128.16/291.58 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1128.16/291.58 1128.16/291.58 (0) CpxTRS 1128.16/291.58 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 1128.16/291.58 (2) CpxWeightedTrs 1128.16/291.58 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1128.16/291.58 (4) CpxTypedWeightedTrs 1128.16/291.58 (5) CompletionProof [UPPER BOUND(ID), 1 ms] 1128.16/291.58 (6) CpxTypedWeightedCompleteTrs 1128.16/291.58 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 1128.16/291.58 (8) CpxRNTS 1128.16/291.58 (9) CompleteCoflocoProof [FINISHED, 603 ms] 1128.16/291.58 (10) BOUNDS(1, n^2) 1128.16/291.58 (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 1128.16/291.58 (12) CpxTRS 1128.16/291.58 (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 1128.16/291.58 (14) typed CpxTrs 1128.16/291.58 (15) OrderProof [LOWER BOUND(ID), 0 ms] 1128.16/291.58 (16) typed CpxTrs 1128.16/291.58 (17) RewriteLemmaProof [LOWER BOUND(ID), 238 ms] 1128.16/291.58 (18) BEST 1128.16/291.58 (19) proven lower bound 1128.16/291.58 (20) LowerBoundPropagationProof [FINISHED, 0 ms] 1128.16/291.58 (21) BOUNDS(n^1, INF) 1128.16/291.58 (22) typed CpxTrs 1128.16/291.58 (23) RewriteLemmaProof [LOWER BOUND(ID), 74 ms] 1128.16/291.58 (24) typed CpxTrs 1128.16/291.58 1128.16/291.58 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (0) 1128.16/291.58 Obligation: 1128.16/291.58 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 1128.16/291.58 1128.16/291.58 1128.16/291.58 The TRS R consists of the following rules: 1128.16/291.58 1128.16/291.58 length(nil) -> 0 1128.16/291.58 length(cons(x, l)) -> s(length(l)) 1128.16/291.58 lt(x, 0) -> false 1128.16/291.58 lt(0, s(y)) -> true 1128.16/291.58 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.58 head(cons(x, l)) -> x 1128.16/291.58 head(nil) -> undefined 1128.16/291.58 tail(nil) -> nil 1128.16/291.58 tail(cons(x, l)) -> l 1128.16/291.58 reverse(l) -> rev(0, l, nil, l) 1128.16/291.58 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.58 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.58 if(false, x, l, accu, orig) -> accu 1128.16/291.58 1128.16/291.58 S is empty. 1128.16/291.58 Rewrite Strategy: INNERMOST 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 1128.16/291.58 Transformed relative TRS to weighted TRS 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (2) 1128.16/291.58 Obligation: 1128.16/291.58 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 1128.16/291.58 1128.16/291.58 1128.16/291.58 The TRS R consists of the following rules: 1128.16/291.58 1128.16/291.58 length(nil) -> 0 [1] 1128.16/291.58 length(cons(x, l)) -> s(length(l)) [1] 1128.16/291.58 lt(x, 0) -> false [1] 1128.16/291.58 lt(0, s(y)) -> true [1] 1128.16/291.58 lt(s(x), s(y)) -> lt(x, y) [1] 1128.16/291.58 head(cons(x, l)) -> x [1] 1128.16/291.58 head(nil) -> undefined [1] 1128.16/291.58 tail(nil) -> nil [1] 1128.16/291.58 tail(cons(x, l)) -> l [1] 1128.16/291.58 reverse(l) -> rev(0, l, nil, l) [1] 1128.16/291.58 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) [1] 1128.16/291.58 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) [1] 1128.16/291.58 if(false, x, l, accu, orig) -> accu [1] 1128.16/291.58 1128.16/291.58 Rewrite Strategy: INNERMOST 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1128.16/291.58 Infered types. 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (4) 1128.16/291.58 Obligation: 1128.16/291.58 Runtime Complexity Weighted TRS with Types. 1128.16/291.58 The TRS R consists of the following rules: 1128.16/291.58 1128.16/291.58 length(nil) -> 0 [1] 1128.16/291.58 length(cons(x, l)) -> s(length(l)) [1] 1128.16/291.58 lt(x, 0) -> false [1] 1128.16/291.58 lt(0, s(y)) -> true [1] 1128.16/291.58 lt(s(x), s(y)) -> lt(x, y) [1] 1128.16/291.58 head(cons(x, l)) -> x [1] 1128.16/291.58 head(nil) -> undefined [1] 1128.16/291.58 tail(nil) -> nil [1] 1128.16/291.58 tail(cons(x, l)) -> l [1] 1128.16/291.58 reverse(l) -> rev(0, l, nil, l) [1] 1128.16/291.58 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) [1] 1128.16/291.58 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) [1] 1128.16/291.58 if(false, x, l, accu, orig) -> accu [1] 1128.16/291.58 1128.16/291.58 The TRS has the following type information: 1128.16/291.58 length :: nil:cons -> 0:s 1128.16/291.58 nil :: nil:cons 1128.16/291.58 0 :: 0:s 1128.16/291.58 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.58 s :: 0:s -> 0:s 1128.16/291.58 lt :: 0:s -> 0:s -> false:true 1128.16/291.58 false :: false:true 1128.16/291.58 true :: false:true 1128.16/291.58 head :: nil:cons -> undefined 1128.16/291.58 undefined :: undefined 1128.16/291.58 tail :: nil:cons -> nil:cons 1128.16/291.58 reverse :: nil:cons -> nil:cons 1128.16/291.58 rev :: 0:s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.58 if :: false:true -> 0:s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.58 1128.16/291.58 Rewrite Strategy: INNERMOST 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (5) CompletionProof (UPPER BOUND(ID)) 1128.16/291.58 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 1128.16/291.58 none 1128.16/291.58 1128.16/291.58 And the following fresh constants: none 1128.16/291.58 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (6) 1128.16/291.58 Obligation: 1128.16/291.58 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 1128.16/291.58 1128.16/291.58 Runtime Complexity Weighted TRS with Types. 1128.16/291.58 The TRS R consists of the following rules: 1128.16/291.58 1128.16/291.58 length(nil) -> 0 [1] 1128.16/291.58 length(cons(x, l)) -> s(length(l)) [1] 1128.16/291.58 lt(x, 0) -> false [1] 1128.16/291.58 lt(0, s(y)) -> true [1] 1128.16/291.58 lt(s(x), s(y)) -> lt(x, y) [1] 1128.16/291.58 head(cons(x, l)) -> x [1] 1128.16/291.58 head(nil) -> undefined [1] 1128.16/291.58 tail(nil) -> nil [1] 1128.16/291.58 tail(cons(x, l)) -> l [1] 1128.16/291.58 reverse(l) -> rev(0, l, nil, l) [1] 1128.16/291.58 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) [1] 1128.16/291.58 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) [1] 1128.16/291.58 if(false, x, l, accu, orig) -> accu [1] 1128.16/291.58 1128.16/291.58 The TRS has the following type information: 1128.16/291.58 length :: nil:cons -> 0:s 1128.16/291.58 nil :: nil:cons 1128.16/291.58 0 :: 0:s 1128.16/291.58 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.58 s :: 0:s -> 0:s 1128.16/291.58 lt :: 0:s -> 0:s -> false:true 1128.16/291.58 false :: false:true 1128.16/291.58 true :: false:true 1128.16/291.58 head :: nil:cons -> undefined 1128.16/291.58 undefined :: undefined 1128.16/291.58 tail :: nil:cons -> nil:cons 1128.16/291.58 reverse :: nil:cons -> nil:cons 1128.16/291.58 rev :: 0:s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.58 if :: false:true -> 0:s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.58 1128.16/291.58 Rewrite Strategy: INNERMOST 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 1128.16/291.58 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 1128.16/291.58 The constant constructors are abstracted as follows: 1128.16/291.58 1128.16/291.58 nil => 0 1128.16/291.58 0 => 0 1128.16/291.58 false => 0 1128.16/291.58 true => 1 1128.16/291.58 undefined => 0 1128.16/291.58 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (8) 1128.16/291.58 Obligation: 1128.16/291.58 Complexity RNTS consisting of the following rules: 1128.16/291.58 1128.16/291.58 head(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l 1128.16/291.58 head(z) -{ 1 }-> 0 :|: z = 0 1128.16/291.58 if(z, z', z'', z1, z2) -{ 1 }-> accu :|: z2 = orig, z' = x, z1 = accu, orig >= 0, x >= 0, l >= 0, z = 0, accu >= 0, z'' = l 1128.16/291.58 if(z, z', z'', z1, z2) -{ 1 }-> rev(1 + x, tail(l), 1 + head(l) + accu, orig) :|: z2 = orig, z' = x, z1 = accu, z = 1, orig >= 0, x >= 0, l >= 0, accu >= 0, z'' = l 1128.16/291.58 length(z) -{ 1 }-> 0 :|: z = 0 1128.16/291.58 length(z) -{ 1 }-> 1 + length(l) :|: x >= 0, l >= 0, z = 1 + x + l 1128.16/291.58 lt(z, z') -{ 1 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 1128.16/291.58 lt(z, z') -{ 1 }-> 1 :|: z' = 1 + y, y >= 0, z = 0 1128.16/291.58 lt(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 1128.16/291.58 rev(z, z', z'', z1) -{ 1 }-> if(lt(x, length(orig)), x, l, accu, orig) :|: z' = l, orig >= 0, x >= 0, l >= 0, z'' = accu, z = x, accu >= 0, z1 = orig 1128.16/291.58 reverse(z) -{ 1 }-> rev(0, l, 0, l) :|: z = l, l >= 0 1128.16/291.58 tail(z) -{ 1 }-> l :|: x >= 0, l >= 0, z = 1 + x + l 1128.16/291.58 tail(z) -{ 1 }-> 0 :|: z = 0 1128.16/291.58 1128.16/291.58 Only complete derivations are relevant for the runtime complexity. 1128.16/291.58 1128.16/291.58 ---------------------------------------- 1128.16/291.58 1128.16/291.58 (9) CompleteCoflocoProof (FINISHED) 1128.16/291.58 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 1128.16/291.58 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[length(V, Out)],[V >= 0]). 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[lt(V, V3, Out)],[V >= 0,V3 >= 0]). 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[head(V, Out)],[V >= 0]). 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[tail(V, Out)],[V >= 0]). 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[reverse(V, Out)],[V >= 0]). 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[rev(V, V3, V14, V18, Out)],[V >= 0,V3 >= 0,V14 >= 0,V18 >= 0]). 1128.16/291.58 eq(start(V, V3, V14, V18, V23),0,[if(V, V3, V14, V18, V23, Out)],[V >= 0,V3 >= 0,V14 >= 0,V18 >= 0,V23 >= 0]). 1128.16/291.58 eq(length(V, Out),1,[],[Out = 0,V = 0]). 1128.16/291.58 eq(length(V, Out),1,[length(V1, Ret1)],[Out = 1 + Ret1,V2 >= 0,V1 >= 0,V = 1 + V1 + V2]). 1128.16/291.58 eq(lt(V, V3, Out),1,[],[Out = 0,V4 >= 0,V = V4,V3 = 0]). 1128.16/291.58 eq(lt(V, V3, Out),1,[],[Out = 1,V3 = 1 + V5,V5 >= 0,V = 0]). 1128.16/291.58 eq(lt(V, V3, Out),1,[lt(V6, V7, Ret)],[Out = Ret,V3 = 1 + V7,V6 >= 0,V7 >= 0,V = 1 + V6]). 1128.16/291.58 eq(head(V, Out),1,[],[Out = V8,V8 >= 0,V9 >= 0,V = 1 + V8 + V9]). 1128.16/291.58 eq(head(V, Out),1,[],[Out = 0,V = 0]). 1128.16/291.58 eq(tail(V, Out),1,[],[Out = 0,V = 0]). 1128.16/291.58 eq(tail(V, Out),1,[],[Out = V11,V10 >= 0,V11 >= 0,V = 1 + V10 + V11]). 1128.16/291.58 eq(reverse(V, Out),1,[rev(0, V12, 0, V12, Ret2)],[Out = Ret2,V = V12,V12 >= 0]). 1128.16/291.58 eq(rev(V, V3, V14, V18, Out),1,[length(V13, Ret01),lt(V16, Ret01, Ret0),if(Ret0, V16, V17, V15, V13, Ret3)],[Out = Ret3,V3 = V17,V13 >= 0,V16 >= 0,V17 >= 0,V14 = V15,V = V16,V15 >= 0,V18 = V13]). 1128.16/291.58 eq(if(V, V3, V14, V18, V23, Out),1,[tail(V19, Ret11),head(V19, Ret201),rev(1 + V22, Ret11, 1 + Ret201 + V20, V21, Ret4)],[Out = Ret4,V23 = V21,V3 = V22,V18 = V20,V = 1,V21 >= 0,V22 >= 0,V19 >= 0,V20 >= 0,V14 = V19]). 1128.16/291.58 eq(if(V, V3, V14, V18, V23, Out),1,[],[Out = V24,V23 = V27,V3 = V26,V18 = V24,V27 >= 0,V26 >= 0,V25 >= 0,V = 0,V24 >= 0,V14 = V25]). 1128.16/291.58 input_output_vars(length(V,Out),[V],[Out]). 1128.16/291.58 input_output_vars(lt(V,V3,Out),[V,V3],[Out]). 1128.16/291.58 input_output_vars(head(V,Out),[V],[Out]). 1128.16/291.58 input_output_vars(tail(V,Out),[V],[Out]). 1128.16/291.58 input_output_vars(reverse(V,Out),[V],[Out]). 1128.16/291.58 input_output_vars(rev(V,V3,V14,V18,Out),[V,V3,V14,V18],[Out]). 1128.16/291.58 input_output_vars(if(V,V3,V14,V18,V23,Out),[V,V3,V14,V18,V23],[Out]). 1128.16/291.58 1128.16/291.58 1128.16/291.58 CoFloCo proof output: 1128.16/291.58 Preprocessing Cost Relations 1128.16/291.58 ===================================== 1128.16/291.58 1128.16/291.58 #### Computed strongly connected components 1128.16/291.58 0. non_recursive : [head/2] 1128.16/291.58 1. recursive : [length/2] 1128.16/291.58 2. recursive : [lt/3] 1128.16/291.58 3. non_recursive : [tail/2] 1128.16/291.58 4. recursive : [if/6,rev/5] 1128.16/291.58 5. non_recursive : [reverse/2] 1128.16/291.58 6. non_recursive : [start/5] 1128.16/291.58 1128.16/291.58 #### Obtained direct recursion through partial evaluation 1128.16/291.58 0. SCC is partially evaluated into head/2 1128.16/291.58 1. SCC is partially evaluated into length/2 1128.16/291.58 2. SCC is partially evaluated into lt/3 1128.16/291.58 3. SCC is partially evaluated into tail/2 1128.16/291.58 4. SCC is partially evaluated into rev/5 1128.16/291.58 5. SCC is completely evaluated into other SCCs 1128.16/291.58 6. SCC is partially evaluated into start/5 1128.16/291.58 1128.16/291.58 Control-Flow Refinement of Cost Relations 1128.16/291.58 ===================================== 1128.16/291.58 1128.16/291.58 ### Specialization of cost equations head/2 1128.16/291.58 * CE 11 is refined into CE [20] 1128.16/291.58 * CE 12 is refined into CE [21] 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Cost equations --> "Loop" of head/2 1128.16/291.58 * CEs [20] --> Loop 14 1128.16/291.58 * CEs [21] --> Loop 15 1128.16/291.58 1128.16/291.58 ### Ranking functions of CR head(V,Out) 1128.16/291.58 1128.16/291.58 #### Partial ranking functions of CR head(V,Out) 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Specialization of cost equations length/2 1128.16/291.58 * CE 16 is refined into CE [22] 1128.16/291.58 * CE 15 is refined into CE [23] 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Cost equations --> "Loop" of length/2 1128.16/291.58 * CEs [23] --> Loop 16 1128.16/291.58 * CEs [22] --> Loop 17 1128.16/291.58 1128.16/291.58 ### Ranking functions of CR length(V,Out) 1128.16/291.58 * RF of phase [17]: [V] 1128.16/291.58 1128.16/291.58 #### Partial ranking functions of CR length(V,Out) 1128.16/291.58 * Partial RF of phase [17]: 1128.16/291.58 - RF of loop [17:1]: 1128.16/291.58 V 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Specialization of cost equations lt/3 1128.16/291.58 * CE 19 is refined into CE [24] 1128.16/291.58 * CE 17 is refined into CE [25] 1128.16/291.58 * CE 18 is refined into CE [26] 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Cost equations --> "Loop" of lt/3 1128.16/291.58 * CEs [25] --> Loop 18 1128.16/291.58 * CEs [26] --> Loop 19 1128.16/291.58 * CEs [24] --> Loop 20 1128.16/291.58 1128.16/291.58 ### Ranking functions of CR lt(V,V3,Out) 1128.16/291.58 * RF of phase [20]: [V,V3] 1128.16/291.58 1128.16/291.58 #### Partial ranking functions of CR lt(V,V3,Out) 1128.16/291.58 * Partial RF of phase [20]: 1128.16/291.58 - RF of loop [20:1]: 1128.16/291.58 V 1128.16/291.58 V3 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Specialization of cost equations tail/2 1128.16/291.58 * CE 10 is refined into CE [27] 1128.16/291.58 * CE 9 is refined into CE [28] 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Cost equations --> "Loop" of tail/2 1128.16/291.58 * CEs [27] --> Loop 21 1128.16/291.58 * CEs [28] --> Loop 22 1128.16/291.58 1128.16/291.58 ### Ranking functions of CR tail(V,Out) 1128.16/291.58 1128.16/291.58 #### Partial ranking functions of CR tail(V,Out) 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Specialization of cost equations rev/5 1128.16/291.58 * CE 14 is refined into CE [29,30,31,32] 1128.16/291.58 * CE 13 is refined into CE [33,34] 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Cost equations --> "Loop" of rev/5 1128.16/291.58 * CEs [34] --> Loop 23 1128.16/291.58 * CEs [33] --> Loop 24 1128.16/291.58 * CEs [32] --> Loop 25 1128.16/291.58 * CEs [31] --> Loop 26 1128.16/291.58 * CEs [30] --> Loop 27 1128.16/291.58 * CEs [29] --> Loop 28 1128.16/291.58 1128.16/291.58 ### Ranking functions of CR rev(V,V3,V14,V18,Out) 1128.16/291.58 * RF of phase [25]: [-V+V18,V3] 1128.16/291.58 * RF of phase [26]: [-V+V18] 1128.16/291.58 1128.16/291.58 #### Partial ranking functions of CR rev(V,V3,V14,V18,Out) 1128.16/291.58 * Partial RF of phase [25]: 1128.16/291.58 - RF of loop [25:1]: 1128.16/291.58 -V+V18 1128.16/291.58 V3 1128.16/291.58 * Partial RF of phase [26]: 1128.16/291.58 - RF of loop [26:1]: 1128.16/291.58 -V+V18 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Specialization of cost equations start/5 1128.16/291.58 * CE 2 is refined into CE [35,36,37,38,39,40,41] 1128.16/291.58 * CE 1 is refined into CE [42] 1128.16/291.58 * CE 3 is refined into CE [43,44] 1128.16/291.58 * CE 4 is refined into CE [45,46,47,48] 1128.16/291.58 * CE 5 is refined into CE [49,50] 1128.16/291.58 * CE 6 is refined into CE [51,52] 1128.16/291.58 * CE 7 is refined into CE [53,54,55,56] 1128.16/291.58 * CE 8 is refined into CE [57,58,59,60,61,62,63,64,65] 1128.16/291.58 1128.16/291.58 1128.16/291.58 ### Cost equations --> "Loop" of start/5 1128.16/291.58 * CEs [63] --> Loop 29 1128.16/291.58 * CEs [46,62] --> Loop 30 1128.16/291.58 * CEs [38,40,41] --> Loop 31 1128.16/291.58 * CEs [39] --> Loop 32 1128.16/291.58 * CEs [35,37] --> Loop 33 1128.16/291.58 * CEs [36,44,47,48,50,52,53,54,55,64,65] --> Loop 34 1128.16/291.58 * CEs [42,43,45,49,51,56,57,58,59,60,61] --> Loop 35 1128.16/291.58 1128.16/291.58 ### Ranking functions of CR start(V,V3,V14,V18,V23) 1128.16/291.58 1128.16/291.58 #### Partial ranking functions of CR start(V,V3,V14,V18,V23) 1128.16/291.58 1128.16/291.58 1128.16/291.58 Computing Bounds 1128.16/291.58 ===================================== 1128.16/291.58 1128.16/291.58 #### Cost of chains of head(V,Out): 1128.16/291.58 * Chain [15]: 1 1128.16/291.58 with precondition: [V=0,Out=0] 1128.16/291.58 1128.16/291.58 * Chain [14]: 1 1128.16/291.58 with precondition: [Out>=0,V>=Out+1] 1128.16/291.58 1128.16/291.58 1128.16/291.58 #### Cost of chains of length(V,Out): 1128.16/291.58 * Chain [[17],16]: 1*it(17)+1 1128.16/291.58 Such that:it(17) =< V 1128.16/291.58 1128.16/291.58 with precondition: [Out>=1,V>=Out] 1128.16/291.58 1128.16/291.58 * Chain [16]: 1 1128.16/291.58 with precondition: [V=0,Out=0] 1128.16/291.58 1128.16/291.58 1128.16/291.58 #### Cost of chains of lt(V,V3,Out): 1128.16/291.58 * Chain [[20],19]: 1*it(20)+1 1128.16/291.58 Such that:it(20) =< V 1128.16/291.58 1128.16/291.58 with precondition: [Out=1,V>=1,V3>=V+1] 1128.16/291.58 1128.16/291.58 * Chain [[20],18]: 1*it(20)+1 1128.16/291.58 Such that:it(20) =< V3 1128.16/291.58 1128.16/291.58 with precondition: [Out=0,V3>=1,V>=V3] 1128.16/291.58 1128.16/291.58 * Chain [19]: 1 1128.16/291.58 with precondition: [V=0,Out=1,V3>=1] 1128.16/291.58 1128.16/291.58 * Chain [18]: 1 1128.16/291.58 with precondition: [V3=0,Out=0,V>=0] 1128.16/291.58 1128.16/291.58 1128.16/291.58 #### Cost of chains of tail(V,Out): 1128.16/291.58 * Chain [22]: 1 1128.16/291.58 with precondition: [V=0,Out=0] 1128.16/291.58 1128.16/291.58 * Chain [21]: 1 1128.16/291.58 with precondition: [Out>=0,V>=Out+1] 1128.16/291.58 1128.16/291.58 1128.16/291.58 #### Cost of chains of rev(V,V3,V14,V18,Out): 1128.16/291.58 * Chain [[26],23]: 6*it(26)+2*s(1)+2*s(7)+4 1128.16/291.58 Such that:it(26) =< -V14+Out 1128.16/291.58 aux(5) =< V18 1128.16/291.58 s(1) =< aux(5) 1128.16/291.58 s(7) =< it(26)*aux(5) 1128.16/291.58 1128.16/291.58 with precondition: [V3=0,V>=1,V14>=0,Out>=V14+1,V14+V18>=Out+V] 1128.16/291.58 1128.16/291.58 * Chain [[25],[26],23]: 12*it(25)+2*s(1)+4*s(7)+4 1128.16/291.58 Such that:aux(9) =< -V+V18 1128.16/291.58 aux(10) =< V18 1128.16/291.58 it(25) =< aux(9) 1128.16/291.58 s(1) =< aux(10) 1128.16/291.58 s(7) =< it(25)*aux(10) 1128.16/291.58 1128.16/291.58 with precondition: [V>=1,V3>=1,V14>=0,V18>=V+2,Out>=V14+2] 1128.16/291.58 1128.16/291.58 * Chain [[25],23]: 6*it(25)+2*s(1)+2*s(13)+4 1128.16/291.58 Such that:it(25) =< -V+V18 1128.16/291.58 aux(11) =< V18 1128.16/291.58 s(1) =< aux(11) 1128.16/291.58 s(13) =< it(25)*aux(11) 1128.16/291.58 1128.16/291.58 with precondition: [V>=1,V3>=1,V14>=0,V18>=V+1,Out>=V14+1] 1128.16/291.58 1128.16/291.58 * Chain [28,[26],23]: 6*it(26)+3*s(1)+2*s(7)+10 1128.16/291.58 Such that:it(26) =< -V14+Out 1128.16/291.58 aux(12) =< V18 1128.16/291.58 s(1) =< aux(12) 1128.16/291.58 s(7) =< it(26)*aux(12) 1128.16/291.58 1128.16/291.58 with precondition: [V=0,V3=0,V14>=0,Out>=V14+2,V14+V18>=Out] 1128.16/291.58 1128.16/291.58 * Chain [28,23]: 3*s(1)+10 1128.16/291.58 Such that:aux(13) =< V18 1128.16/291.58 s(1) =< aux(13) 1128.16/291.58 1128.16/291.58 with precondition: [V=0,V3=0,Out=V14+1,V18>=1,Out>=1] 1128.16/291.58 1128.16/291.58 * Chain [27,[26],23]: 9*it(26)+2*s(7)+10 1128.16/291.58 Such that:aux(14) =< V18 1128.16/291.58 it(26) =< aux(14) 1128.16/291.58 s(7) =< it(26)*aux(14) 1128.16/291.58 1128.16/291.58 with precondition: [V=0,V3>=1,V14>=0,V18>=2,Out>=V14+2,V3+V14+V18>=Out+1] 1128.16/291.58 1128.16/291.58 * Chain [27,[25],[26],23]: 15*it(25)+4*s(7)+10 1128.16/291.58 Such that:aux(15) =< V18 1128.16/291.58 it(25) =< aux(15) 1128.16/291.58 s(7) =< it(25)*aux(15) 1128.16/291.58 1128.16/291.58 with precondition: [V=0,V3>=2,V14>=0,V18>=3,Out>=V14+3] 1128.16/291.58 1128.16/291.58 * Chain [27,[25],23]: 9*it(25)+2*s(13)+10 1128.16/291.58 Such that:aux(16) =< V18 1128.16/291.58 it(25) =< aux(16) 1128.16/291.58 s(13) =< it(25)*aux(16) 1128.16/291.58 1128.16/291.58 with precondition: [V=0,V3>=2,V14>=0,V18>=2,Out>=V14+2] 1128.16/291.58 1128.16/291.58 * Chain [27,23]: 3*s(1)+10 1128.16/291.58 Such that:aux(17) =< V18 1128.16/291.58 s(1) =< aux(17) 1128.16/291.58 1128.16/291.58 with precondition: [V=0,V14>=0,V18>=1,Out>=V14+1,V3+V14>=Out] 1128.16/291.58 1128.16/291.58 * Chain [24]: 4 1128.16/291.58 with precondition: [V18=0,V14=Out,V>=0,V3>=0,V14>=0] 1128.16/291.58 1128.16/291.58 * Chain [23]: 2*s(1)+4 1128.16/291.59 Such that:aux(1) =< V18 1128.16/291.59 s(1) =< aux(1) 1128.16/291.59 1128.16/291.59 with precondition: [V14=Out,V>=1,V3>=0,V14>=0,V18>=1] 1128.16/291.59 1128.16/291.59 1128.16/291.59 #### Cost of chains of start(V,V3,V14,V18,V23): 1128.16/291.59 * Chain [35]: 48*s(33)+10*s(37)+10 1128.16/291.59 Such that:aux(22) =< V18 1128.16/291.59 s(33) =< aux(22) 1128.16/291.59 s(37) =< s(33)*aux(22) 1128.16/291.59 1128.16/291.59 with precondition: [V=0] 1128.16/291.59 1128.16/291.59 * Chain [34]: 38*s(46)+1*s(47)+8*s(51)+6*s(58)+18*s(61)+6*s(63)+11 1128.16/291.59 Such that:s(59) =< -V+V18 1128.16/291.59 s(47) =< V3 1128.16/291.59 aux(23) =< V 1128.16/291.59 aux(24) =< V18 1128.16/291.59 s(46) =< aux(23) 1128.16/291.59 s(61) =< s(59) 1128.16/291.59 s(58) =< aux(24) 1128.16/291.59 s(63) =< s(61)*aux(24) 1128.16/291.59 s(51) =< s(46)*aux(23) 1128.16/291.59 1128.16/291.59 with precondition: [V>=1] 1128.16/291.59 1128.16/291.59 * Chain [33]: 6*s(64)+4*s(66)+2*s(67)+7 1128.16/291.59 Such that:s(64) =< -V3+V23 1128.16/291.59 aux(25) =< V23 1128.16/291.59 s(66) =< aux(25) 1128.16/291.59 s(67) =< s(64)*aux(25) 1128.16/291.59 1128.16/291.59 with precondition: [V=1,V14=0,V3>=0,V18>=0,V23>=1] 1128.16/291.59 1128.16/291.59 * Chain [32]: 7 1128.16/291.59 with precondition: [V=1,V23=0,V3>=0,V14>=1,V18>=0] 1128.16/291.59 1128.16/291.59 * Chain [31]: 24*s(70)+8*s(72)+8*s(73)+7 1128.16/291.59 Such that:aux(26) =< -V3+V23 1128.16/291.59 aux(27) =< V23 1128.16/291.59 s(70) =< aux(26) 1128.16/291.59 s(72) =< aux(27) 1128.16/291.59 s(73) =< s(70)*aux(27) 1128.16/291.59 1128.16/291.59 with precondition: [V=1,V3>=0,V14>=1,V18>=0,V23>=1] 1128.16/291.59 1128.16/291.59 * Chain [30]: 6*s(81)+2*s(83)+2*s(84)+4 1128.16/291.59 Such that:s(81) =< -V+V18 1128.16/291.59 s(82) =< V18 1128.16/291.59 s(83) =< s(82) 1128.16/291.59 s(84) =< s(81)*s(82) 1128.16/291.59 1128.16/291.59 with precondition: [V3=0,V>=0] 1128.16/291.59 1128.16/291.59 * Chain [29]: 4 1128.16/291.59 with precondition: [V18=0,V>=0,V3>=0,V14>=0] 1128.16/291.59 1128.16/291.59 1128.16/291.59 Closed-form bounds of start(V,V3,V14,V18,V23): 1128.16/291.59 ------------------------------------- 1128.16/291.59 * Chain [35] with precondition: [V=0] 1128.16/291.59 - Upper bound: nat(V18)*48+10+nat(V18)*10*nat(V18) 1128.16/291.59 - Complexity: n^2 1128.16/291.59 * Chain [34] with precondition: [V>=1] 1128.16/291.59 - Upper bound: 38*V+11+8*V*V+nat(V3)+nat(V18)*6+nat(V18)*6*nat(-V+V18)+nat(-V+V18)*18 1128.16/291.59 - Complexity: n^2 1128.16/291.59 * Chain [33] with precondition: [V=1,V14=0,V3>=0,V18>=0,V23>=1] 1128.16/291.59 - Upper bound: 4*V23+7+2*V23*nat(-V3+V23)+nat(-V3+V23)*6 1128.16/291.59 - Complexity: n^2 1128.16/291.59 * Chain [32] with precondition: [V=1,V23=0,V3>=0,V14>=1,V18>=0] 1128.16/291.59 - Upper bound: 7 1128.16/291.59 - Complexity: constant 1128.16/291.59 * Chain [31] with precondition: [V=1,V3>=0,V14>=1,V18>=0,V23>=1] 1128.16/291.59 - Upper bound: 8*V23+7+8*V23*nat(-V3+V23)+nat(-V3+V23)*24 1128.16/291.59 - Complexity: n^2 1128.16/291.59 * Chain [30] with precondition: [V3=0,V>=0] 1128.16/291.59 - Upper bound: nat(V18)*2+4+nat(V18)*2*nat(-V+V18)+nat(-V+V18)*6 1128.16/291.59 - Complexity: n^2 1128.16/291.59 * Chain [29] with precondition: [V18=0,V>=0,V3>=0,V14>=0] 1128.16/291.59 - Upper bound: 4 1128.16/291.59 - Complexity: constant 1128.16/291.59 1128.16/291.59 ### Maximum cost of start(V,V3,V14,V18,V23): max([nat(V18)*2+max([nat(V18)*2*nat(-V+V18)+nat(-V+V18)*6,nat(V18)*4+6+max([nat(V18)*10*nat(V18)+nat(V18)*42,38*V+1+8*V*V+nat(V3)+nat(V18)*6*nat(-V+V18)+nat(-V+V18)*18])]),nat(V23)*6*nat(-V3+V23)+nat(V23)*4+nat(-V3+V23)*18+(nat(V23)*2*nat(-V3+V23)+nat(V23)*4+nat(-V3+V23)*6)+3])+4 1128.16/291.59 Asymptotic class: n^2 1128.16/291.59 * Total analysis performed in 509 ms. 1128.16/291.59 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (10) 1128.16/291.59 BOUNDS(1, n^2) 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (11) RenamingProof (BOTH BOUNDS(ID, ID)) 1128.16/291.59 Renamed function symbols to avoid clashes with predefined symbol. 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (12) 1128.16/291.59 Obligation: 1128.16/291.59 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 1128.16/291.59 1128.16/291.59 1128.16/291.59 The TRS R consists of the following rules: 1128.16/291.59 1128.16/291.59 length(nil) -> 0' 1128.16/291.59 length(cons(x, l)) -> s(length(l)) 1128.16/291.59 lt(x, 0') -> false 1128.16/291.59 lt(0', s(y)) -> true 1128.16/291.59 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.59 head(cons(x, l)) -> x 1128.16/291.59 head(nil) -> undefined 1128.16/291.59 tail(nil) -> nil 1128.16/291.59 tail(cons(x, l)) -> l 1128.16/291.59 reverse(l) -> rev(0', l, nil, l) 1128.16/291.59 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.59 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.59 if(false, x, l, accu, orig) -> accu 1128.16/291.59 1128.16/291.59 S is empty. 1128.16/291.59 Rewrite Strategy: INNERMOST 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 1128.16/291.59 Infered types. 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (14) 1128.16/291.59 Obligation: 1128.16/291.59 Innermost TRS: 1128.16/291.59 Rules: 1128.16/291.59 length(nil) -> 0' 1128.16/291.59 length(cons(x, l)) -> s(length(l)) 1128.16/291.59 lt(x, 0') -> false 1128.16/291.59 lt(0', s(y)) -> true 1128.16/291.59 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.59 head(cons(x, l)) -> x 1128.16/291.59 head(nil) -> undefined 1128.16/291.59 tail(nil) -> nil 1128.16/291.59 tail(cons(x, l)) -> l 1128.16/291.59 reverse(l) -> rev(0', l, nil, l) 1128.16/291.59 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.59 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.59 if(false, x, l, accu, orig) -> accu 1128.16/291.59 1128.16/291.59 Types: 1128.16/291.59 length :: nil:cons -> 0':s 1128.16/291.59 nil :: nil:cons 1128.16/291.59 0' :: 0':s 1128.16/291.59 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.59 s :: 0':s -> 0':s 1128.16/291.59 lt :: 0':s -> 0':s -> false:true 1128.16/291.59 false :: false:true 1128.16/291.59 true :: false:true 1128.16/291.59 head :: nil:cons -> undefined 1128.16/291.59 undefined :: undefined 1128.16/291.59 tail :: nil:cons -> nil:cons 1128.16/291.59 reverse :: nil:cons -> nil:cons 1128.16/291.59 rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 hole_0':s1_0 :: 0':s 1128.16/291.59 hole_nil:cons2_0 :: nil:cons 1128.16/291.59 hole_undefined3_0 :: undefined 1128.16/291.59 hole_false:true4_0 :: false:true 1128.16/291.59 gen_0':s5_0 :: Nat -> 0':s 1128.16/291.59 gen_nil:cons6_0 :: Nat -> nil:cons 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (15) OrderProof (LOWER BOUND(ID)) 1128.16/291.59 Heuristically decided to analyse the following defined symbols: 1128.16/291.59 length, lt, rev 1128.16/291.59 1128.16/291.59 They will be analysed ascendingly in the following order: 1128.16/291.59 length < rev 1128.16/291.59 lt < rev 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (16) 1128.16/291.59 Obligation: 1128.16/291.59 Innermost TRS: 1128.16/291.59 Rules: 1128.16/291.59 length(nil) -> 0' 1128.16/291.59 length(cons(x, l)) -> s(length(l)) 1128.16/291.59 lt(x, 0') -> false 1128.16/291.59 lt(0', s(y)) -> true 1128.16/291.59 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.59 head(cons(x, l)) -> x 1128.16/291.59 head(nil) -> undefined 1128.16/291.59 tail(nil) -> nil 1128.16/291.59 tail(cons(x, l)) -> l 1128.16/291.59 reverse(l) -> rev(0', l, nil, l) 1128.16/291.59 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.59 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.59 if(false, x, l, accu, orig) -> accu 1128.16/291.59 1128.16/291.59 Types: 1128.16/291.59 length :: nil:cons -> 0':s 1128.16/291.59 nil :: nil:cons 1128.16/291.59 0' :: 0':s 1128.16/291.59 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.59 s :: 0':s -> 0':s 1128.16/291.59 lt :: 0':s -> 0':s -> false:true 1128.16/291.59 false :: false:true 1128.16/291.59 true :: false:true 1128.16/291.59 head :: nil:cons -> undefined 1128.16/291.59 undefined :: undefined 1128.16/291.59 tail :: nil:cons -> nil:cons 1128.16/291.59 reverse :: nil:cons -> nil:cons 1128.16/291.59 rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 hole_0':s1_0 :: 0':s 1128.16/291.59 hole_nil:cons2_0 :: nil:cons 1128.16/291.59 hole_undefined3_0 :: undefined 1128.16/291.59 hole_false:true4_0 :: false:true 1128.16/291.59 gen_0':s5_0 :: Nat -> 0':s 1128.16/291.59 gen_nil:cons6_0 :: Nat -> nil:cons 1128.16/291.59 1128.16/291.59 1128.16/291.59 Generator Equations: 1128.16/291.59 gen_0':s5_0(0) <=> 0' 1128.16/291.59 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1128.16/291.59 gen_nil:cons6_0(0) <=> nil 1128.16/291.59 gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) 1128.16/291.59 1128.16/291.59 1128.16/291.59 The following defined symbols remain to be analysed: 1128.16/291.59 length, lt, rev 1128.16/291.59 1128.16/291.59 They will be analysed ascendingly in the following order: 1128.16/291.59 length < rev 1128.16/291.59 lt < rev 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (17) RewriteLemmaProof (LOWER BOUND(ID)) 1128.16/291.59 Proved the following rewrite lemma: 1128.16/291.59 length(gen_nil:cons6_0(n8_0)) -> gen_0':s5_0(n8_0), rt in Omega(1 + n8_0) 1128.16/291.59 1128.16/291.59 Induction Base: 1128.16/291.59 length(gen_nil:cons6_0(0)) ->_R^Omega(1) 1128.16/291.59 0' 1128.16/291.59 1128.16/291.59 Induction Step: 1128.16/291.59 length(gen_nil:cons6_0(+(n8_0, 1))) ->_R^Omega(1) 1128.16/291.59 s(length(gen_nil:cons6_0(n8_0))) ->_IH 1128.16/291.59 s(gen_0':s5_0(c9_0)) 1128.16/291.59 1128.16/291.59 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (18) 1128.16/291.59 Complex Obligation (BEST) 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (19) 1128.16/291.59 Obligation: 1128.16/291.59 Proved the lower bound n^1 for the following obligation: 1128.16/291.59 1128.16/291.59 Innermost TRS: 1128.16/291.59 Rules: 1128.16/291.59 length(nil) -> 0' 1128.16/291.59 length(cons(x, l)) -> s(length(l)) 1128.16/291.59 lt(x, 0') -> false 1128.16/291.59 lt(0', s(y)) -> true 1128.16/291.59 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.59 head(cons(x, l)) -> x 1128.16/291.59 head(nil) -> undefined 1128.16/291.59 tail(nil) -> nil 1128.16/291.59 tail(cons(x, l)) -> l 1128.16/291.59 reverse(l) -> rev(0', l, nil, l) 1128.16/291.59 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.59 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.59 if(false, x, l, accu, orig) -> accu 1128.16/291.59 1128.16/291.59 Types: 1128.16/291.59 length :: nil:cons -> 0':s 1128.16/291.59 nil :: nil:cons 1128.16/291.59 0' :: 0':s 1128.16/291.59 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.59 s :: 0':s -> 0':s 1128.16/291.59 lt :: 0':s -> 0':s -> false:true 1128.16/291.59 false :: false:true 1128.16/291.59 true :: false:true 1128.16/291.59 head :: nil:cons -> undefined 1128.16/291.59 undefined :: undefined 1128.16/291.59 tail :: nil:cons -> nil:cons 1128.16/291.59 reverse :: nil:cons -> nil:cons 1128.16/291.59 rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 hole_0':s1_0 :: 0':s 1128.16/291.59 hole_nil:cons2_0 :: nil:cons 1128.16/291.59 hole_undefined3_0 :: undefined 1128.16/291.59 hole_false:true4_0 :: false:true 1128.16/291.59 gen_0':s5_0 :: Nat -> 0':s 1128.16/291.59 gen_nil:cons6_0 :: Nat -> nil:cons 1128.16/291.59 1128.16/291.59 1128.16/291.59 Generator Equations: 1128.16/291.59 gen_0':s5_0(0) <=> 0' 1128.16/291.59 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1128.16/291.59 gen_nil:cons6_0(0) <=> nil 1128.16/291.59 gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) 1128.16/291.59 1128.16/291.59 1128.16/291.59 The following defined symbols remain to be analysed: 1128.16/291.59 length, lt, rev 1128.16/291.59 1128.16/291.59 They will be analysed ascendingly in the following order: 1128.16/291.59 length < rev 1128.16/291.59 lt < rev 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (20) LowerBoundPropagationProof (FINISHED) 1128.16/291.59 Propagated lower bound. 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (21) 1128.16/291.59 BOUNDS(n^1, INF) 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (22) 1128.16/291.59 Obligation: 1128.16/291.59 Innermost TRS: 1128.16/291.59 Rules: 1128.16/291.59 length(nil) -> 0' 1128.16/291.59 length(cons(x, l)) -> s(length(l)) 1128.16/291.59 lt(x, 0') -> false 1128.16/291.59 lt(0', s(y)) -> true 1128.16/291.59 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.59 head(cons(x, l)) -> x 1128.16/291.59 head(nil) -> undefined 1128.16/291.59 tail(nil) -> nil 1128.16/291.59 tail(cons(x, l)) -> l 1128.16/291.59 reverse(l) -> rev(0', l, nil, l) 1128.16/291.59 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.59 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.59 if(false, x, l, accu, orig) -> accu 1128.16/291.59 1128.16/291.59 Types: 1128.16/291.59 length :: nil:cons -> 0':s 1128.16/291.59 nil :: nil:cons 1128.16/291.59 0' :: 0':s 1128.16/291.59 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.59 s :: 0':s -> 0':s 1128.16/291.59 lt :: 0':s -> 0':s -> false:true 1128.16/291.59 false :: false:true 1128.16/291.59 true :: false:true 1128.16/291.59 head :: nil:cons -> undefined 1128.16/291.59 undefined :: undefined 1128.16/291.59 tail :: nil:cons -> nil:cons 1128.16/291.59 reverse :: nil:cons -> nil:cons 1128.16/291.59 rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 hole_0':s1_0 :: 0':s 1128.16/291.59 hole_nil:cons2_0 :: nil:cons 1128.16/291.59 hole_undefined3_0 :: undefined 1128.16/291.59 hole_false:true4_0 :: false:true 1128.16/291.59 gen_0':s5_0 :: Nat -> 0':s 1128.16/291.59 gen_nil:cons6_0 :: Nat -> nil:cons 1128.16/291.59 1128.16/291.59 1128.16/291.59 Lemmas: 1128.16/291.59 length(gen_nil:cons6_0(n8_0)) -> gen_0':s5_0(n8_0), rt in Omega(1 + n8_0) 1128.16/291.59 1128.16/291.59 1128.16/291.59 Generator Equations: 1128.16/291.59 gen_0':s5_0(0) <=> 0' 1128.16/291.59 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1128.16/291.59 gen_nil:cons6_0(0) <=> nil 1128.16/291.59 gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) 1128.16/291.59 1128.16/291.59 1128.16/291.59 The following defined symbols remain to be analysed: 1128.16/291.59 lt, rev 1128.16/291.59 1128.16/291.59 They will be analysed ascendingly in the following order: 1128.16/291.59 lt < rev 1128.16/291.59 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (23) RewriteLemmaProof (LOWER BOUND(ID)) 1128.16/291.59 Proved the following rewrite lemma: 1128.16/291.59 lt(gen_0':s5_0(n252_0), gen_0':s5_0(n252_0)) -> false, rt in Omega(1 + n252_0) 1128.16/291.59 1128.16/291.59 Induction Base: 1128.16/291.59 lt(gen_0':s5_0(0), gen_0':s5_0(0)) ->_R^Omega(1) 1128.16/291.59 false 1128.16/291.59 1128.16/291.59 Induction Step: 1128.16/291.59 lt(gen_0':s5_0(+(n252_0, 1)), gen_0':s5_0(+(n252_0, 1))) ->_R^Omega(1) 1128.16/291.59 lt(gen_0':s5_0(n252_0), gen_0':s5_0(n252_0)) ->_IH 1128.16/291.59 false 1128.16/291.59 1128.16/291.59 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 1128.16/291.59 ---------------------------------------- 1128.16/291.59 1128.16/291.59 (24) 1128.16/291.59 Obligation: 1128.16/291.59 Innermost TRS: 1128.16/291.59 Rules: 1128.16/291.59 length(nil) -> 0' 1128.16/291.59 length(cons(x, l)) -> s(length(l)) 1128.16/291.59 lt(x, 0') -> false 1128.16/291.59 lt(0', s(y)) -> true 1128.16/291.59 lt(s(x), s(y)) -> lt(x, y) 1128.16/291.59 head(cons(x, l)) -> x 1128.16/291.59 head(nil) -> undefined 1128.16/291.59 tail(nil) -> nil 1128.16/291.59 tail(cons(x, l)) -> l 1128.16/291.59 reverse(l) -> rev(0', l, nil, l) 1128.16/291.59 rev(x, l, accu, orig) -> if(lt(x, length(orig)), x, l, accu, orig) 1128.16/291.59 if(true, x, l, accu, orig) -> rev(s(x), tail(l), cons(head(l), accu), orig) 1128.16/291.59 if(false, x, l, accu, orig) -> accu 1128.16/291.59 1128.16/291.59 Types: 1128.16/291.59 length :: nil:cons -> 0':s 1128.16/291.59 nil :: nil:cons 1128.16/291.59 0' :: 0':s 1128.16/291.59 cons :: undefined -> nil:cons -> nil:cons 1128.16/291.59 s :: 0':s -> 0':s 1128.16/291.59 lt :: 0':s -> 0':s -> false:true 1128.16/291.59 false :: false:true 1128.16/291.59 true :: false:true 1128.16/291.59 head :: nil:cons -> undefined 1128.16/291.59 undefined :: undefined 1128.16/291.59 tail :: nil:cons -> nil:cons 1128.16/291.59 reverse :: nil:cons -> nil:cons 1128.16/291.59 rev :: 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 if :: false:true -> 0':s -> nil:cons -> nil:cons -> nil:cons -> nil:cons 1128.16/291.59 hole_0':s1_0 :: 0':s 1128.16/291.59 hole_nil:cons2_0 :: nil:cons 1128.16/291.59 hole_undefined3_0 :: undefined 1128.16/291.59 hole_false:true4_0 :: false:true 1128.16/291.59 gen_0':s5_0 :: Nat -> 0':s 1128.16/291.59 gen_nil:cons6_0 :: Nat -> nil:cons 1128.16/291.59 1128.16/291.59 1128.16/291.59 Lemmas: 1128.16/291.59 length(gen_nil:cons6_0(n8_0)) -> gen_0':s5_0(n8_0), rt in Omega(1 + n8_0) 1128.16/291.59 lt(gen_0':s5_0(n252_0), gen_0':s5_0(n252_0)) -> false, rt in Omega(1 + n252_0) 1128.16/291.59 1128.16/291.59 1128.16/291.59 Generator Equations: 1128.16/291.59 gen_0':s5_0(0) <=> 0' 1128.16/291.59 gen_0':s5_0(+(x, 1)) <=> s(gen_0':s5_0(x)) 1128.16/291.59 gen_nil:cons6_0(0) <=> nil 1128.16/291.59 gen_nil:cons6_0(+(x, 1)) <=> cons(undefined, gen_nil:cons6_0(x)) 1128.16/291.59 1128.16/291.59 1128.16/291.59 The following defined symbols remain to be analysed: 1128.16/291.59 rev 1128.32/291.67 EOF