49.01/14.36 WORST_CASE(Omega(n^1), O(n^1)) 49.01/14.37 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 49.01/14.37 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 49.01/14.37 49.01/14.37 49.01/14.37 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 49.01/14.37 49.01/14.37 (0) CpxTRS 49.01/14.37 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 49.01/14.37 (2) CpxWeightedTrs 49.01/14.37 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 49.01/14.37 (4) CpxTypedWeightedTrs 49.01/14.37 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 49.01/14.37 (6) CpxTypedWeightedCompleteTrs 49.01/14.37 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 4 ms] 49.01/14.37 (8) CpxRNTS 49.01/14.37 (9) CompleteCoflocoProof [FINISHED, 307 ms] 49.01/14.37 (10) BOUNDS(1, n^1) 49.01/14.37 (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 49.01/14.37 (12) CpxTRS 49.01/14.37 (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 49.01/14.37 (14) typed CpxTrs 49.01/14.37 (15) OrderProof [LOWER BOUND(ID), 0 ms] 49.01/14.37 (16) typed CpxTrs 49.01/14.37 (17) RewriteLemmaProof [LOWER BOUND(ID), 287 ms] 49.01/14.37 (18) BEST 49.01/14.37 (19) proven lower bound 49.01/14.37 (20) LowerBoundPropagationProof [FINISHED, 0 ms] 49.01/14.37 (21) BOUNDS(n^1, INF) 49.01/14.37 (22) typed CpxTrs 49.01/14.37 49.01/14.37 49.01/14.37 ---------------------------------------- 49.01/14.37 49.01/14.37 (0) 49.01/14.37 Obligation: 49.01/14.37 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 49.01/14.37 49.01/14.37 49.01/14.37 The TRS R consists of the following rules: 49.01/14.37 49.01/14.37 half(x) -> if(ge(x, s(s(0))), x) 49.01/14.37 if(false, x) -> 0 49.01/14.37 if(true, x) -> s(half(p(p(x)))) 49.01/14.37 p(0) -> 0 49.01/14.37 p(s(x)) -> x 49.01/14.37 ge(x, 0) -> true 49.01/14.37 ge(0, s(x)) -> false 49.01/14.37 ge(s(x), s(y)) -> ge(x, y) 49.01/14.37 log(0) -> 0 49.01/14.37 log(s(x)) -> s(log(half(s(x)))) 49.01/14.37 49.01/14.37 S is empty. 49.01/14.37 Rewrite Strategy: INNERMOST 49.01/14.37 ---------------------------------------- 49.01/14.37 49.01/14.37 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 49.01/14.37 Transformed relative TRS to weighted TRS 49.01/14.37 ---------------------------------------- 49.01/14.37 49.01/14.37 (2) 49.01/14.37 Obligation: 49.01/14.37 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 49.01/14.37 49.01/14.37 49.01/14.37 The TRS R consists of the following rules: 49.01/14.37 49.01/14.37 half(x) -> if(ge(x, s(s(0))), x) [1] 49.01/14.37 if(false, x) -> 0 [1] 49.01/14.37 if(true, x) -> s(half(p(p(x)))) [1] 49.01/14.37 p(0) -> 0 [1] 49.01/14.37 p(s(x)) -> x [1] 49.01/14.37 ge(x, 0) -> true [1] 49.01/14.37 ge(0, s(x)) -> false [1] 49.01/14.37 ge(s(x), s(y)) -> ge(x, y) [1] 49.01/14.37 log(0) -> 0 [1] 49.01/14.37 log(s(x)) -> s(log(half(s(x)))) [1] 49.01/14.37 49.01/14.37 Rewrite Strategy: INNERMOST 49.01/14.37 ---------------------------------------- 49.01/14.37 49.01/14.37 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 49.01/14.37 Infered types. 49.01/14.37 ---------------------------------------- 49.01/14.37 49.01/14.37 (4) 49.01/14.37 Obligation: 49.01/14.37 Runtime Complexity Weighted TRS with Types. 49.01/14.37 The TRS R consists of the following rules: 49.01/14.37 49.01/14.37 half(x) -> if(ge(x, s(s(0))), x) [1] 49.01/14.37 if(false, x) -> 0 [1] 49.01/14.37 if(true, x) -> s(half(p(p(x)))) [1] 49.01/14.37 p(0) -> 0 [1] 49.01/14.37 p(s(x)) -> x [1] 49.01/14.37 ge(x, 0) -> true [1] 49.01/14.37 ge(0, s(x)) -> false [1] 49.01/14.37 ge(s(x), s(y)) -> ge(x, y) [1] 49.01/14.37 log(0) -> 0 [1] 49.01/14.37 log(s(x)) -> s(log(half(s(x)))) [1] 49.01/14.37 49.01/14.37 The TRS has the following type information: 49.01/14.37 half :: 0:s -> 0:s 49.01/14.37 if :: false:true -> 0:s -> 0:s 49.01/14.37 ge :: 0:s -> 0:s -> false:true 49.01/14.37 s :: 0:s -> 0:s 49.01/14.37 0 :: 0:s 49.01/14.37 false :: false:true 49.01/14.37 true :: false:true 49.01/14.37 p :: 0:s -> 0:s 49.01/14.37 log :: 0:s -> 0:s 49.01/14.37 49.01/14.37 Rewrite Strategy: INNERMOST 49.01/14.37 ---------------------------------------- 49.01/14.37 49.01/14.37 (5) CompletionProof (UPPER BOUND(ID)) 49.01/14.38 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 49.01/14.38 none 49.01/14.38 49.01/14.38 And the following fresh constants: none 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (6) 49.01/14.38 Obligation: 49.01/14.38 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 49.01/14.38 49.01/14.38 Runtime Complexity Weighted TRS with Types. 49.01/14.38 The TRS R consists of the following rules: 49.01/14.38 49.01/14.38 half(x) -> if(ge(x, s(s(0))), x) [1] 49.01/14.38 if(false, x) -> 0 [1] 49.01/14.38 if(true, x) -> s(half(p(p(x)))) [1] 49.01/14.38 p(0) -> 0 [1] 49.01/14.38 p(s(x)) -> x [1] 49.01/14.38 ge(x, 0) -> true [1] 49.01/14.38 ge(0, s(x)) -> false [1] 49.01/14.38 ge(s(x), s(y)) -> ge(x, y) [1] 49.01/14.38 log(0) -> 0 [1] 49.01/14.38 log(s(x)) -> s(log(half(s(x)))) [1] 49.01/14.38 49.01/14.38 The TRS has the following type information: 49.01/14.38 half :: 0:s -> 0:s 49.01/14.38 if :: false:true -> 0:s -> 0:s 49.01/14.38 ge :: 0:s -> 0:s -> false:true 49.01/14.38 s :: 0:s -> 0:s 49.01/14.38 0 :: 0:s 49.01/14.38 false :: false:true 49.01/14.38 true :: false:true 49.01/14.38 p :: 0:s -> 0:s 49.01/14.38 log :: 0:s -> 0:s 49.01/14.38 49.01/14.38 Rewrite Strategy: INNERMOST 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 49.01/14.38 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 49.01/14.38 The constant constructors are abstracted as follows: 49.01/14.38 49.01/14.38 0 => 0 49.01/14.38 false => 0 49.01/14.38 true => 1 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (8) 49.01/14.38 Obligation: 49.01/14.38 Complexity RNTS consisting of the following rules: 49.01/14.38 49.01/14.38 ge(z, z') -{ 1 }-> ge(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 49.01/14.38 ge(z, z') -{ 1 }-> 1 :|: x >= 0, z = x, z' = 0 49.01/14.38 ge(z, z') -{ 1 }-> 0 :|: z' = 1 + x, x >= 0, z = 0 49.01/14.38 half(z) -{ 1 }-> if(ge(x, 1 + (1 + 0)), x) :|: x >= 0, z = x 49.01/14.38 if(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 49.01/14.38 if(z, z') -{ 1 }-> 1 + half(p(p(x))) :|: z' = x, z = 1, x >= 0 49.01/14.38 log(z) -{ 1 }-> 0 :|: z = 0 49.01/14.38 log(z) -{ 1 }-> 1 + log(half(1 + x)) :|: x >= 0, z = 1 + x 49.01/14.38 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x 49.01/14.38 p(z) -{ 1 }-> 0 :|: z = 0 49.01/14.38 49.01/14.38 Only complete derivations are relevant for the runtime complexity. 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (9) CompleteCoflocoProof (FINISHED) 49.01/14.38 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 49.01/14.38 49.01/14.38 eq(start(V, V2),0,[half(V, Out)],[V >= 0]). 49.01/14.38 eq(start(V, V2),0,[if(V, V2, Out)],[V >= 0,V2 >= 0]). 49.01/14.38 eq(start(V, V2),0,[p(V, Out)],[V >= 0]). 49.01/14.38 eq(start(V, V2),0,[ge(V, V2, Out)],[V >= 0,V2 >= 0]). 49.01/14.38 eq(start(V, V2),0,[log(V, Out)],[V >= 0]). 49.01/14.38 eq(half(V, Out),1,[ge(V1, 1 + (1 + 0), Ret0),if(Ret0, V1, Ret)],[Out = Ret,V1 >= 0,V = V1]). 49.01/14.38 eq(if(V, V2, Out),1,[],[Out = 0,V2 = V3,V3 >= 0,V = 0]). 49.01/14.38 eq(if(V, V2, Out),1,[p(V4, Ret100),p(Ret100, Ret10),half(Ret10, Ret1)],[Out = 1 + Ret1,V2 = V4,V = 1,V4 >= 0]). 49.01/14.38 eq(p(V, Out),1,[],[Out = 0,V = 0]). 49.01/14.38 eq(p(V, Out),1,[],[Out = V5,V5 >= 0,V = 1 + V5]). 49.01/14.38 eq(ge(V, V2, Out),1,[],[Out = 1,V6 >= 0,V = V6,V2 = 0]). 49.01/14.38 eq(ge(V, V2, Out),1,[],[Out = 0,V2 = 1 + V7,V7 >= 0,V = 0]). 49.01/14.38 eq(ge(V, V2, Out),1,[ge(V8, V9, Ret2)],[Out = Ret2,V2 = 1 + V9,V8 >= 0,V9 >= 0,V = 1 + V8]). 49.01/14.38 eq(log(V, Out),1,[],[Out = 0,V = 0]). 49.01/14.38 eq(log(V, Out),1,[half(1 + V10, Ret101),log(Ret101, Ret11)],[Out = 1 + Ret11,V10 >= 0,V = 1 + V10]). 49.01/14.38 input_output_vars(half(V,Out),[V],[Out]). 49.01/14.38 input_output_vars(if(V,V2,Out),[V,V2],[Out]). 49.01/14.38 input_output_vars(p(V,Out),[V],[Out]). 49.01/14.38 input_output_vars(ge(V,V2,Out),[V,V2],[Out]). 49.01/14.38 input_output_vars(log(V,Out),[V],[Out]). 49.01/14.38 49.01/14.38 49.01/14.38 CoFloCo proof output: 49.01/14.38 Preprocessing Cost Relations 49.01/14.38 ===================================== 49.01/14.38 49.01/14.38 #### Computed strongly connected components 49.01/14.38 0. recursive : [ge/3] 49.01/14.38 1. non_recursive : [p/2] 49.01/14.38 2. recursive : [half/2,if/3] 49.01/14.38 3. recursive : [log/2] 49.01/14.38 4. non_recursive : [start/2] 49.01/14.38 49.01/14.38 #### Obtained direct recursion through partial evaluation 49.01/14.38 0. SCC is partially evaluated into ge/3 49.01/14.38 1. SCC is partially evaluated into p/2 49.01/14.38 2. SCC is partially evaluated into half/2 49.01/14.38 3. SCC is partially evaluated into log/2 49.01/14.38 4. SCC is partially evaluated into start/2 49.01/14.38 49.01/14.38 Control-Flow Refinement of Cost Relations 49.01/14.38 ===================================== 49.01/14.38 49.01/14.38 ### Specialization of cost equations ge/3 49.01/14.38 * CE 13 is refined into CE [16] 49.01/14.38 * CE 11 is refined into CE [17] 49.01/14.38 * CE 12 is refined into CE [18] 49.01/14.38 49.01/14.38 49.01/14.38 ### Cost equations --> "Loop" of ge/3 49.01/14.38 * CEs [17] --> Loop 12 49.01/14.38 * CEs [18] --> Loop 13 49.01/14.38 * CEs [16] --> Loop 14 49.01/14.38 49.01/14.38 ### Ranking functions of CR ge(V,V2,Out) 49.01/14.38 * RF of phase [14]: [V,V2] 49.01/14.38 49.01/14.38 #### Partial ranking functions of CR ge(V,V2,Out) 49.01/14.38 * Partial RF of phase [14]: 49.01/14.38 - RF of loop [14:1]: 49.01/14.38 V 49.01/14.38 V2 49.01/14.38 49.01/14.38 49.01/14.38 ### Specialization of cost equations p/2 49.01/14.38 * CE 8 is refined into CE [19] 49.01/14.38 * CE 7 is refined into CE [20] 49.01/14.38 49.01/14.38 49.01/14.38 ### Cost equations --> "Loop" of p/2 49.01/14.38 * CEs [19] --> Loop 15 49.01/14.38 * CEs [20] --> Loop 16 49.01/14.38 49.01/14.38 ### Ranking functions of CR p(V,Out) 49.01/14.38 49.01/14.38 #### Partial ranking functions of CR p(V,Out) 49.01/14.38 49.01/14.38 49.01/14.38 ### Specialization of cost equations half/2 49.01/14.38 * CE 10 is refined into CE [21,22] 49.01/14.38 * CE 9 is refined into CE [23] 49.01/14.38 49.01/14.38 49.01/14.38 ### Cost equations --> "Loop" of half/2 49.01/14.38 * CEs [23] --> Loop 17 49.01/14.38 * CEs [22] --> Loop 18 49.01/14.38 * CEs [21] --> Loop 19 49.01/14.38 49.01/14.38 ### Ranking functions of CR half(V,Out) 49.01/14.38 * RF of phase [17]: [V-1] 49.01/14.38 49.01/14.38 #### Partial ranking functions of CR half(V,Out) 49.01/14.38 * Partial RF of phase [17]: 49.01/14.38 - RF of loop [17:1]: 49.01/14.38 V-1 49.01/14.38 49.01/14.38 49.01/14.38 ### Specialization of cost equations log/2 49.01/14.38 * CE 15 is refined into CE [24,25,26] 49.01/14.38 * CE 14 is refined into CE [27] 49.01/14.38 49.01/14.38 49.01/14.38 ### Cost equations --> "Loop" of log/2 49.01/14.38 * CEs [27] --> Loop 20 49.01/14.38 * CEs [26] --> Loop 21 49.01/14.38 * CEs [25] --> Loop 22 49.01/14.38 * CEs [24] --> Loop 23 49.01/14.38 49.01/14.38 ### Ranking functions of CR log(V,Out) 49.01/14.38 * RF of phase [21,22]: [V-1] 49.01/14.38 49.01/14.38 #### Partial ranking functions of CR log(V,Out) 49.01/14.38 * Partial RF of phase [21,22]: 49.01/14.38 - RF of loop [21:1]: 49.01/14.38 V/2-1 49.01/14.38 - RF of loop [22:1]: 49.01/14.38 V-1 49.01/14.38 49.01/14.38 49.01/14.38 ### Specialization of cost equations start/2 49.01/14.38 * CE 1 is refined into CE [28,29,30,31,32,33] 49.01/14.38 * CE 2 is refined into CE [34] 49.01/14.38 * CE 3 is refined into CE [35,36,37,38] 49.01/14.38 * CE 4 is refined into CE [39,40] 49.01/14.38 * CE 5 is refined into CE [41,42,43,44] 49.01/14.38 * CE 6 is refined into CE [45,46,47] 49.01/14.38 49.01/14.38 49.01/14.38 ### Cost equations --> "Loop" of start/2 49.01/14.38 * CEs [42] --> Loop 24 49.01/14.38 * CEs [28,29,30,31,32,33,36,37,38,40,43,44,46,47] --> Loop 25 49.01/14.38 * CEs [34,35,39,41,45] --> Loop 26 49.01/14.38 49.01/14.38 ### Ranking functions of CR start(V,V2) 49.01/14.38 49.01/14.38 #### Partial ranking functions of CR start(V,V2) 49.01/14.38 49.01/14.38 49.01/14.38 Computing Bounds 49.01/14.38 ===================================== 49.01/14.38 49.01/14.38 #### Cost of chains of ge(V,V2,Out): 49.01/14.38 * Chain [[14],13]: 1*it(14)+1 49.01/14.38 Such that:it(14) =< V 49.01/14.38 49.01/14.38 with precondition: [Out=0,V>=1,V2>=V+1] 49.01/14.38 49.01/14.38 * Chain [[14],12]: 1*it(14)+1 49.01/14.38 Such that:it(14) =< V2 49.01/14.38 49.01/14.38 with precondition: [Out=1,V2>=1,V>=V2] 49.01/14.38 49.01/14.38 * Chain [13]: 1 49.01/14.38 with precondition: [V=0,Out=0,V2>=1] 49.01/14.38 49.01/14.38 * Chain [12]: 1 49.01/14.38 with precondition: [V2=0,Out=1,V>=0] 49.01/14.38 49.01/14.38 49.01/14.38 #### Cost of chains of p(V,Out): 49.01/14.38 * Chain [16]: 1 49.01/14.38 with precondition: [V=0,Out=0] 49.01/14.38 49.01/14.38 * Chain [15]: 1 49.01/14.38 with precondition: [V=Out+1,V>=1] 49.01/14.38 49.01/14.38 49.01/14.38 #### Cost of chains of half(V,Out): 49.01/14.38 * Chain [[17],19]: 5*it(17)+1*s(3)+3 49.01/14.38 Such that:aux(4) =< 2*Out 49.01/14.38 it(17) =< aux(4) 49.01/14.38 s(3) =< aux(4)*2 49.01/14.38 49.01/14.38 with precondition: [V=2*Out,V>=2] 49.01/14.38 49.01/14.38 * Chain [[17],18]: 5*it(17)+1*s(3)+1*s(4)+3 49.01/14.38 Such that:s(4) =< 1 49.01/14.38 aux(5) =< V 49.01/14.38 it(17) =< aux(5) 49.01/14.38 s(3) =< aux(5)*2 49.01/14.38 49.01/14.38 with precondition: [V=2*Out+1,V>=3] 49.01/14.38 49.01/14.38 * Chain [19]: 3 49.01/14.38 with precondition: [V=0,Out=0] 49.01/14.38 49.01/14.38 * Chain [18]: 1*s(4)+3 49.01/14.38 Such that:s(4) =< 1 49.01/14.38 49.01/14.38 with precondition: [V=1,Out=0] 49.01/14.38 49.01/14.38 49.01/14.38 #### Cost of chains of log(V,Out): 49.01/14.38 * Chain [[21,22],23,20]: 4*it(21)+4*it(22)+1*s(5)+1*s(20)+10*s(21)+2*s(22)+5 49.01/14.38 Such that:s(5) =< 1 49.01/14.38 aux(13) =< V 49.01/14.38 aux(14) =< 2*V 49.01/14.38 aux(15) =< V/2 49.01/14.38 aux(6) =< aux(13) 49.01/14.38 it(21) =< aux(13) 49.01/14.38 it(22) =< aux(13) 49.01/14.38 it(22) =< aux(14) 49.01/14.38 aux(6) =< aux(15) 49.01/14.38 it(21) =< aux(15) 49.01/14.38 s(20) =< aux(6) 49.01/14.38 s(21) =< aux(14) 49.01/14.38 s(22) =< aux(14)*2 49.01/14.38 49.01/14.38 with precondition: [Out>=2,V+2>=2*Out] 49.01/14.38 49.01/14.38 * Chain [23,20]: 1*s(5)+5 49.01/14.38 Such that:s(5) =< 1 49.01/14.38 49.01/14.38 with precondition: [V=1,Out=1] 49.01/14.38 49.01/14.38 * Chain [20]: 1 49.01/14.38 with precondition: [V=0,Out=0] 49.01/14.38 49.01/14.38 49.01/14.38 #### Cost of chains of start(V,V2): 49.01/14.38 * Chain [26]: 3 49.01/14.38 with precondition: [V=0] 49.01/14.38 49.01/14.38 * Chain [25]: 6*s(27)+11*s(29)+2*s(30)+11*s(37)+2*s(38)+4*s(51)+4*s(52)+1*s(53)+10*s(54)+2*s(55)+6 49.01/14.38 Such that:s(48) =< 2*V 49.01/14.38 s(49) =< V/2 49.01/14.38 aux(16) =< 1 49.01/14.38 aux(17) =< V 49.01/14.38 aux(18) =< V2 49.01/14.38 s(27) =< aux(16) 49.01/14.38 s(37) =< aux(17) 49.01/14.38 s(29) =< aux(18) 49.01/14.38 s(30) =< aux(18)*2 49.01/14.38 s(38) =< aux(17)*2 49.01/14.38 s(50) =< aux(17) 49.01/14.38 s(51) =< aux(17) 49.01/14.38 s(52) =< aux(17) 49.01/14.38 s(52) =< s(48) 49.01/14.38 s(50) =< s(49) 49.01/14.38 s(51) =< s(49) 49.01/14.38 s(53) =< s(50) 49.01/14.38 s(54) =< s(48) 49.01/14.38 s(55) =< s(48)*2 49.01/14.38 49.01/14.38 with precondition: [V>=1] 49.01/14.38 49.01/14.38 * Chain [24]: 1 49.01/14.38 with precondition: [V2=0,V>=0] 49.01/14.38 49.01/14.38 49.01/14.38 Closed-form bounds of start(V,V2): 49.01/14.38 ------------------------------------- 49.01/14.38 * Chain [26] with precondition: [V=0] 49.01/14.38 - Upper bound: 3 49.01/14.38 - Complexity: constant 49.01/14.38 * Chain [25] with precondition: [V>=1] 49.01/14.38 - Upper bound: 24*V+12+nat(V2)*15+28*V 49.01/14.38 - Complexity: n 49.01/14.38 * Chain [24] with precondition: [V2=0,V>=0] 49.01/14.38 - Upper bound: 1 49.01/14.38 - Complexity: constant 49.01/14.38 49.01/14.38 ### Maximum cost of start(V,V2): max([2,24*V+11+nat(V2)*15+28*V])+1 49.01/14.38 Asymptotic class: n 49.01/14.38 * Total analysis performed in 219 ms. 49.01/14.38 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (10) 49.01/14.38 BOUNDS(1, n^1) 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (11) RenamingProof (BOTH BOUNDS(ID, ID)) 49.01/14.38 Renamed function symbols to avoid clashes with predefined symbol. 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (12) 49.01/14.38 Obligation: 49.01/14.38 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 49.01/14.38 49.01/14.38 49.01/14.38 The TRS R consists of the following rules: 49.01/14.38 49.01/14.38 half(x) -> if(ge(x, s(s(0'))), x) 49.01/14.38 if(false, x) -> 0' 49.01/14.38 if(true, x) -> s(half(p(p(x)))) 49.01/14.38 p(0') -> 0' 49.01/14.38 p(s(x)) -> x 49.01/14.38 ge(x, 0') -> true 49.01/14.38 ge(0', s(x)) -> false 49.01/14.38 ge(s(x), s(y)) -> ge(x, y) 49.01/14.38 log(0') -> 0' 49.01/14.38 log(s(x)) -> s(log(half(s(x)))) 49.01/14.38 49.01/14.38 S is empty. 49.01/14.38 Rewrite Strategy: INNERMOST 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 49.01/14.38 Infered types. 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (14) 49.01/14.38 Obligation: 49.01/14.38 Innermost TRS: 49.01/14.38 Rules: 49.01/14.38 half(x) -> if(ge(x, s(s(0'))), x) 49.01/14.38 if(false, x) -> 0' 49.01/14.38 if(true, x) -> s(half(p(p(x)))) 49.01/14.38 p(0') -> 0' 49.01/14.38 p(s(x)) -> x 49.01/14.38 ge(x, 0') -> true 49.01/14.38 ge(0', s(x)) -> false 49.01/14.38 ge(s(x), s(y)) -> ge(x, y) 49.01/14.38 log(0') -> 0' 49.01/14.38 log(s(x)) -> s(log(half(s(x)))) 49.01/14.38 49.01/14.38 Types: 49.01/14.38 half :: 0':s -> 0':s 49.01/14.38 if :: false:true -> 0':s -> 0':s 49.01/14.38 ge :: 0':s -> 0':s -> false:true 49.01/14.38 s :: 0':s -> 0':s 49.01/14.38 0' :: 0':s 49.01/14.38 false :: false:true 49.01/14.38 true :: false:true 49.01/14.38 p :: 0':s -> 0':s 49.01/14.38 log :: 0':s -> 0':s 49.01/14.38 hole_0':s1_0 :: 0':s 49.01/14.38 hole_false:true2_0 :: false:true 49.01/14.38 gen_0':s3_0 :: Nat -> 0':s 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (15) OrderProof (LOWER BOUND(ID)) 49.01/14.38 Heuristically decided to analyse the following defined symbols: 49.01/14.38 half, ge, log 49.01/14.38 49.01/14.38 They will be analysed ascendingly in the following order: 49.01/14.38 ge < half 49.01/14.38 half < log 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (16) 49.01/14.38 Obligation: 49.01/14.38 Innermost TRS: 49.01/14.38 Rules: 49.01/14.38 half(x) -> if(ge(x, s(s(0'))), x) 49.01/14.38 if(false, x) -> 0' 49.01/14.38 if(true, x) -> s(half(p(p(x)))) 49.01/14.38 p(0') -> 0' 49.01/14.38 p(s(x)) -> x 49.01/14.38 ge(x, 0') -> true 49.01/14.38 ge(0', s(x)) -> false 49.01/14.38 ge(s(x), s(y)) -> ge(x, y) 49.01/14.38 log(0') -> 0' 49.01/14.38 log(s(x)) -> s(log(half(s(x)))) 49.01/14.38 49.01/14.38 Types: 49.01/14.38 half :: 0':s -> 0':s 49.01/14.38 if :: false:true -> 0':s -> 0':s 49.01/14.38 ge :: 0':s -> 0':s -> false:true 49.01/14.38 s :: 0':s -> 0':s 49.01/14.38 0' :: 0':s 49.01/14.38 false :: false:true 49.01/14.38 true :: false:true 49.01/14.38 p :: 0':s -> 0':s 49.01/14.38 log :: 0':s -> 0':s 49.01/14.38 hole_0':s1_0 :: 0':s 49.01/14.38 hole_false:true2_0 :: false:true 49.01/14.38 gen_0':s3_0 :: Nat -> 0':s 49.01/14.38 49.01/14.38 49.01/14.38 Generator Equations: 49.01/14.38 gen_0':s3_0(0) <=> 0' 49.01/14.38 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 49.01/14.38 49.01/14.38 49.01/14.38 The following defined symbols remain to be analysed: 49.01/14.38 ge, half, log 49.01/14.38 49.01/14.38 They will be analysed ascendingly in the following order: 49.01/14.38 ge < half 49.01/14.38 half < log 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (17) RewriteLemmaProof (LOWER BOUND(ID)) 49.01/14.38 Proved the following rewrite lemma: 49.01/14.38 ge(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) 49.01/14.38 49.01/14.38 Induction Base: 49.01/14.38 ge(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) 49.01/14.38 true 49.01/14.38 49.01/14.38 Induction Step: 49.01/14.38 ge(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) 49.01/14.38 ge(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH 49.01/14.38 true 49.01/14.38 49.01/14.38 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (18) 49.01/14.38 Complex Obligation (BEST) 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (19) 49.01/14.38 Obligation: 49.01/14.38 Proved the lower bound n^1 for the following obligation: 49.01/14.38 49.01/14.38 Innermost TRS: 49.01/14.38 Rules: 49.01/14.38 half(x) -> if(ge(x, s(s(0'))), x) 49.01/14.38 if(false, x) -> 0' 49.01/14.38 if(true, x) -> s(half(p(p(x)))) 49.01/14.38 p(0') -> 0' 49.01/14.38 p(s(x)) -> x 49.01/14.38 ge(x, 0') -> true 49.01/14.38 ge(0', s(x)) -> false 49.01/14.38 ge(s(x), s(y)) -> ge(x, y) 49.01/14.38 log(0') -> 0' 49.01/14.38 log(s(x)) -> s(log(half(s(x)))) 49.01/14.38 49.01/14.38 Types: 49.01/14.38 half :: 0':s -> 0':s 49.01/14.38 if :: false:true -> 0':s -> 0':s 49.01/14.38 ge :: 0':s -> 0':s -> false:true 49.01/14.38 s :: 0':s -> 0':s 49.01/14.38 0' :: 0':s 49.01/14.38 false :: false:true 49.01/14.38 true :: false:true 49.01/14.38 p :: 0':s -> 0':s 49.01/14.38 log :: 0':s -> 0':s 49.01/14.38 hole_0':s1_0 :: 0':s 49.01/14.38 hole_false:true2_0 :: false:true 49.01/14.38 gen_0':s3_0 :: Nat -> 0':s 49.01/14.38 49.01/14.38 49.01/14.38 Generator Equations: 49.01/14.38 gen_0':s3_0(0) <=> 0' 49.01/14.38 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 49.01/14.38 49.01/14.38 49.01/14.38 The following defined symbols remain to be analysed: 49.01/14.38 ge, half, log 49.01/14.38 49.01/14.38 They will be analysed ascendingly in the following order: 49.01/14.38 ge < half 49.01/14.38 half < log 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (20) LowerBoundPropagationProof (FINISHED) 49.01/14.38 Propagated lower bound. 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (21) 49.01/14.38 BOUNDS(n^1, INF) 49.01/14.38 49.01/14.38 ---------------------------------------- 49.01/14.38 49.01/14.38 (22) 49.01/14.38 Obligation: 49.01/14.38 Innermost TRS: 49.01/14.38 Rules: 49.01/14.38 half(x) -> if(ge(x, s(s(0'))), x) 49.01/14.38 if(false, x) -> 0' 49.01/14.38 if(true, x) -> s(half(p(p(x)))) 49.01/14.38 p(0') -> 0' 49.01/14.38 p(s(x)) -> x 49.01/14.38 ge(x, 0') -> true 49.01/14.38 ge(0', s(x)) -> false 49.01/14.38 ge(s(x), s(y)) -> ge(x, y) 49.01/14.38 log(0') -> 0' 49.01/14.38 log(s(x)) -> s(log(half(s(x)))) 49.01/14.38 49.01/14.38 Types: 49.01/14.38 half :: 0':s -> 0':s 49.01/14.38 if :: false:true -> 0':s -> 0':s 49.01/14.38 ge :: 0':s -> 0':s -> false:true 49.01/14.38 s :: 0':s -> 0':s 49.01/14.38 0' :: 0':s 49.01/14.38 false :: false:true 49.01/14.38 true :: false:true 49.01/14.38 p :: 0':s -> 0':s 49.01/14.38 log :: 0':s -> 0':s 49.01/14.38 hole_0':s1_0 :: 0':s 49.01/14.38 hole_false:true2_0 :: false:true 49.01/14.38 gen_0':s3_0 :: Nat -> 0':s 49.01/14.38 49.01/14.38 49.01/14.38 Lemmas: 49.01/14.38 ge(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) 49.01/14.38 49.01/14.38 49.01/14.38 Generator Equations: 49.01/14.38 gen_0':s3_0(0) <=> 0' 49.01/14.38 gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) 49.01/14.38 49.01/14.38 49.01/14.38 The following defined symbols remain to be analysed: 49.01/14.38 half, log 49.01/14.38 49.01/14.38 They will be analysed ascendingly in the following order: 49.01/14.38 half < log 49.28/14.47 EOF