WORST_CASE(Omega(n^1),O(n^1)) proof of input_yQldeqosoz.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 283 ms] (10) BOUNDS(1, n^1) (11) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRelTRS (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 11 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 253 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 190 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: half(x) -> if(ge(x, s(s(0))), x) if(false, x) -> 0 if(true, x) -> s(half(p(p(x)))) p(0) -> 0 p(s(x)) -> x ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) log(0) -> 0 log(s(x)) -> s(log(half(s(x)))) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: half(x) -> if(ge(x, s(s(0))), x) [1] if(false, x) -> 0 [1] if(true, x) -> s(half(p(p(x)))) [1] p(0) -> 0 [1] p(s(x)) -> x [1] ge(x, 0) -> true [1] ge(0, s(x)) -> false [1] ge(s(x), s(y)) -> ge(x, y) [1] log(0) -> 0 [1] log(s(x)) -> s(log(half(s(x)))) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(x) -> if(ge(x, s(s(0))), x) [1] if(false, x) -> 0 [1] if(true, x) -> s(half(p(p(x)))) [1] p(0) -> 0 [1] p(s(x)) -> x [1] ge(x, 0) -> true [1] ge(0, s(x)) -> false [1] ge(s(x), s(y)) -> ge(x, y) [1] log(0) -> 0 [1] log(s(x)) -> s(log(half(s(x)))) [1] The TRS has the following type information: half :: 0:s -> 0:s if :: false:true -> 0:s -> 0:s ge :: 0:s -> 0:s -> false:true s :: 0:s -> 0:s 0 :: 0:s false :: false:true true :: false:true p :: 0:s -> 0:s log :: 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: none And the following fresh constants: none ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(x) -> if(ge(x, s(s(0))), x) [1] if(false, x) -> 0 [1] if(true, x) -> s(half(p(p(x)))) [1] p(0) -> 0 [1] p(s(x)) -> x [1] ge(x, 0) -> true [1] ge(0, s(x)) -> false [1] ge(s(x), s(y)) -> ge(x, y) [1] log(0) -> 0 [1] log(s(x)) -> s(log(half(s(x)))) [1] The TRS has the following type information: half :: 0:s -> 0:s if :: false:true -> 0:s -> 0:s ge :: 0:s -> 0:s -> false:true s :: 0:s -> 0:s 0 :: 0:s false :: false:true true :: false:true p :: 0:s -> 0:s log :: 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 false => 0 true => 1 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: ge(z, z') -{ 1 }-> ge(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x ge(z, z') -{ 1 }-> 1 :|: x >= 0, z = x, z' = 0 ge(z, z') -{ 1 }-> 0 :|: z' = 1 + x, x >= 0, z = 0 half(z) -{ 1 }-> if(ge(x, 1 + (1 + 0)), x) :|: x >= 0, z = x if(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 if(z, z') -{ 1 }-> 1 + half(p(p(x))) :|: z' = x, z = 1, x >= 0 log(z) -{ 1 }-> 0 :|: z = 0 log(z) -{ 1 }-> 1 + log(half(1 + x)) :|: x >= 0, z = 1 + x p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V, V2),0,[half(V, Out)],[V >= 0]). eq(start(V, V2),0,[if(V, V2, Out)],[V >= 0,V2 >= 0]). eq(start(V, V2),0,[p(V, Out)],[V >= 0]). eq(start(V, V2),0,[ge(V, V2, Out)],[V >= 0,V2 >= 0]). eq(start(V, V2),0,[log(V, Out)],[V >= 0]). eq(half(V, Out),1,[ge(V1, 1 + (1 + 0), Ret0),if(Ret0, V1, Ret)],[Out = Ret,V1 >= 0,V = V1]). eq(if(V, V2, Out),1,[],[Out = 0,V2 = V3,V3 >= 0,V = 0]). eq(if(V, V2, Out),1,[p(V4, Ret100),p(Ret100, Ret10),half(Ret10, Ret1)],[Out = 1 + Ret1,V2 = V4,V = 1,V4 >= 0]). eq(p(V, Out),1,[],[Out = 0,V = 0]). eq(p(V, Out),1,[],[Out = V5,V5 >= 0,V = 1 + V5]). eq(ge(V, V2, Out),1,[],[Out = 1,V6 >= 0,V = V6,V2 = 0]). eq(ge(V, V2, Out),1,[],[Out = 0,V2 = 1 + V7,V7 >= 0,V = 0]). eq(ge(V, V2, Out),1,[ge(V8, V9, Ret2)],[Out = Ret2,V2 = 1 + V9,V8 >= 0,V9 >= 0,V = 1 + V8]). eq(log(V, Out),1,[],[Out = 0,V = 0]). eq(log(V, Out),1,[half(1 + V10, Ret101),log(Ret101, Ret11)],[Out = 1 + Ret11,V10 >= 0,V = 1 + V10]). input_output_vars(half(V,Out),[V],[Out]). input_output_vars(if(V,V2,Out),[V,V2],[Out]). input_output_vars(p(V,Out),[V],[Out]). input_output_vars(ge(V,V2,Out),[V,V2],[Out]). input_output_vars(log(V,Out),[V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [ge/3] 1. non_recursive : [p/2] 2. recursive : [half/2,if/3] 3. recursive : [log/2] 4. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into ge/3 1. SCC is partially evaluated into p/2 2. SCC is partially evaluated into half/2 3. SCC is partially evaluated into log/2 4. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations ge/3 * CE 13 is refined into CE [16] * CE 11 is refined into CE [17] * CE 12 is refined into CE [18] ### Cost equations --> "Loop" of ge/3 * CEs [17] --> Loop 12 * CEs [18] --> Loop 13 * CEs [16] --> Loop 14 ### Ranking functions of CR ge(V,V2,Out) * RF of phase [14]: [V,V2] #### Partial ranking functions of CR ge(V,V2,Out) * Partial RF of phase [14]: - RF of loop [14:1]: V V2 ### Specialization of cost equations p/2 * CE 8 is refined into CE [19] * CE 7 is refined into CE [20] ### Cost equations --> "Loop" of p/2 * CEs [19] --> Loop 15 * CEs [20] --> Loop 16 ### Ranking functions of CR p(V,Out) #### Partial ranking functions of CR p(V,Out) ### Specialization of cost equations half/2 * CE 10 is refined into CE [21,22] * CE 9 is refined into CE [23] ### Cost equations --> "Loop" of half/2 * CEs [23] --> Loop 17 * CEs [22] --> Loop 18 * CEs [21] --> Loop 19 ### Ranking functions of CR half(V,Out) * RF of phase [17]: [V-1] #### Partial ranking functions of CR half(V,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V-1 ### Specialization of cost equations log/2 * CE 15 is refined into CE [24,25,26] * CE 14 is refined into CE [27] ### Cost equations --> "Loop" of log/2 * CEs [27] --> Loop 20 * CEs [26] --> Loop 21 * CEs [25] --> Loop 22 * CEs [24] --> Loop 23 ### Ranking functions of CR log(V,Out) * RF of phase [21,22]: [V-1] #### Partial ranking functions of CR log(V,Out) * Partial RF of phase [21,22]: - RF of loop [21:1]: V/2-1 - RF of loop [22:1]: V-1 ### Specialization of cost equations start/2 * CE 1 is refined into CE [28,29,30,31,32,33] * CE 2 is refined into CE [34] * CE 3 is refined into CE [35,36,37,38] * CE 4 is refined into CE [39,40] * CE 5 is refined into CE [41,42,43,44] * CE 6 is refined into CE [45,46,47] ### Cost equations --> "Loop" of start/2 * CEs [42] --> Loop 24 * CEs [28,29,30,31,32,33,36,37,38,40,43,44,46,47] --> Loop 25 * CEs [34,35,39,41,45] --> Loop 26 ### Ranking functions of CR start(V,V2) #### Partial ranking functions of CR start(V,V2) Computing Bounds ===================================== #### Cost of chains of ge(V,V2,Out): * Chain [[14],13]: 1*it(14)+1 Such that:it(14) =< V with precondition: [Out=0,V>=1,V2>=V+1] * Chain [[14],12]: 1*it(14)+1 Such that:it(14) =< V2 with precondition: [Out=1,V2>=1,V>=V2] * Chain [13]: 1 with precondition: [V=0,Out=0,V2>=1] * Chain [12]: 1 with precondition: [V2=0,Out=1,V>=0] #### Cost of chains of p(V,Out): * Chain [16]: 1 with precondition: [V=0,Out=0] * Chain [15]: 1 with precondition: [V=Out+1,V>=1] #### Cost of chains of half(V,Out): * Chain [[17],19]: 5*it(17)+1*s(3)+3 Such that:aux(4) =< 2*Out it(17) =< aux(4) s(3) =< aux(4)*2 with precondition: [V=2*Out,V>=2] * Chain [[17],18]: 5*it(17)+1*s(3)+1*s(4)+3 Such that:s(4) =< 1 aux(5) =< V it(17) =< aux(5) s(3) =< aux(5)*2 with precondition: [V=2*Out+1,V>=3] * Chain [19]: 3 with precondition: [V=0,Out=0] * Chain [18]: 1*s(4)+3 Such that:s(4) =< 1 with precondition: [V=1,Out=0] #### Cost of chains of log(V,Out): * Chain [[21,22],23,20]: 4*it(21)+4*it(22)+1*s(5)+1*s(20)+10*s(21)+2*s(22)+5 Such that:s(5) =< 1 aux(13) =< V aux(14) =< 2*V aux(15) =< V/2 aux(6) =< aux(13) it(21) =< aux(13) it(22) =< aux(13) it(22) =< aux(14) aux(6) =< aux(15) it(21) =< aux(15) s(20) =< aux(6) s(21) =< aux(14) s(22) =< aux(14)*2 with precondition: [Out>=2,V+2>=2*Out] * Chain [23,20]: 1*s(5)+5 Such that:s(5) =< 1 with precondition: [V=1,Out=1] * Chain [20]: 1 with precondition: [V=0,Out=0] #### Cost of chains of start(V,V2): * Chain [26]: 3 with precondition: [V=0] * 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 Such that:s(48) =< 2*V s(49) =< V/2 aux(16) =< 1 aux(17) =< V aux(18) =< V2 s(27) =< aux(16) s(37) =< aux(17) s(29) =< aux(18) s(30) =< aux(18)*2 s(38) =< aux(17)*2 s(50) =< aux(17) s(51) =< aux(17) s(52) =< aux(17) s(52) =< s(48) s(50) =< s(49) s(51) =< s(49) s(53) =< s(50) s(54) =< s(48) s(55) =< s(48)*2 with precondition: [V>=1] * Chain [24]: 1 with precondition: [V2=0,V>=0] Closed-form bounds of start(V,V2): ------------------------------------- * Chain [26] with precondition: [V=0] - Upper bound: 3 - Complexity: constant * Chain [25] with precondition: [V>=1] - Upper bound: 24*V+12+nat(V2)*15+28*V - Complexity: n * Chain [24] with precondition: [V2=0,V>=0] - Upper bound: 1 - Complexity: constant ### Maximum cost of start(V,V2): max([2,24*V+11+nat(V2)*15+28*V])+1 Asymptotic class: n * Total analysis performed in 215 ms. ---------------------------------------- (10) BOUNDS(1, n^1) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: half(z0) -> if(ge(z0, s(s(0))), z0) if(false, z0) -> 0 if(true, z0) -> s(half(p(p(z0)))) p(0) -> 0 p(s(z0)) -> z0 ge(z0, 0) -> true ge(0, s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0) -> 0 log(s(z0)) -> s(log(half(s(z0)))) Tuples: HALF(z0) -> c(IF(ge(z0, s(s(0))), z0), GE(z0, s(s(0)))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0) -> c3 P(s(z0)) -> c4 GE(z0, 0) -> c5 GE(0, s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0) -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) S tuples: HALF(z0) -> c(IF(ge(z0, s(s(0))), z0), GE(z0, s(s(0)))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0) -> c3 P(s(z0)) -> c4 GE(z0, 0) -> c5 GE(0, s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0) -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) K tuples:none Defined Rule Symbols: half_1, if_2, p_1, ge_2, log_1 Defined Pair Symbols: HALF_1, IF_2, P_1, GE_2, LOG_1 Compound Symbols: c_2, c1, c2_3, c3, c4, c5, c6, c7_1, c8, c9_2 ---------------------------------------- (13) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (14) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: HALF(z0) -> c(IF(ge(z0, s(s(0))), z0), GE(z0, s(s(0)))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0) -> c3 P(s(z0)) -> c4 GE(z0, 0) -> c5 GE(0, s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0) -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) The (relative) TRS S consists of the following rules: half(z0) -> if(ge(z0, s(s(0))), z0) if(false, z0) -> 0 if(true, z0) -> s(half(p(p(z0)))) p(0) -> 0 p(s(z0)) -> z0 ge(z0, 0) -> true ge(0, s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0) -> 0 log(s(z0)) -> s(log(half(s(z0)))) Rewrite Strategy: INNERMOST ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: HALF(z0) -> c(IF(ge(z0, s(s(0'))), z0), GE(z0, s(s(0')))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0') -> c3 P(s(z0)) -> c4 GE(z0, 0') -> c5 GE(0', s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0') -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) The (relative) TRS S consists of the following rules: half(z0) -> if(ge(z0, s(s(0'))), z0) if(false, z0) -> 0' if(true, z0) -> s(half(p(p(z0)))) p(0') -> 0' p(s(z0)) -> z0 ge(z0, 0') -> true ge(0', s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0') -> 0' log(s(z0)) -> s(log(half(s(z0)))) Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: HALF(z0) -> c(IF(ge(z0, s(s(0'))), z0), GE(z0, s(s(0')))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0') -> c3 P(s(z0)) -> c4 GE(z0, 0') -> c5 GE(0', s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0') -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) half(z0) -> if(ge(z0, s(s(0'))), z0) if(false, z0) -> 0' if(true, z0) -> s(half(p(p(z0)))) p(0') -> 0' p(s(z0)) -> z0 ge(z0, 0') -> true ge(0', s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0') -> 0' log(s(z0)) -> s(log(half(s(z0)))) Types: HALF :: 0':s -> c c :: c1:c2 -> c5:c6:c7 -> c IF :: false:true -> 0':s -> c1:c2 ge :: 0':s -> 0':s -> false:true s :: 0':s -> 0':s 0' :: 0':s GE :: 0':s -> 0':s -> c5:c6:c7 false :: false:true c1 :: c1:c2 true :: false:true c2 :: c -> c3:c4 -> c3:c4 -> c1:c2 p :: 0':s -> 0':s P :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 LOG :: 0':s -> c8:c9 c8 :: c8:c9 c9 :: c8:c9 -> c -> c8:c9 half :: 0':s -> 0':s if :: false:true -> 0':s -> 0':s log :: 0':s -> 0':s hole_c1_10 :: c hole_0':s2_10 :: 0':s hole_c1:c23_10 :: c1:c2 hole_c5:c6:c74_10 :: c5:c6:c7 hole_false:true5_10 :: false:true hole_c3:c46_10 :: c3:c4 hole_c8:c97_10 :: c8:c9 gen_0':s8_10 :: Nat -> 0':s gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 gen_c8:c910_10 :: Nat -> c8:c9 ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: HALF, ge, GE, LOG, half, log They will be analysed ascendingly in the following order: ge < HALF GE < HALF HALF < LOG ge < half half < LOG half < log ---------------------------------------- (20) Obligation: Innermost TRS: Rules: HALF(z0) -> c(IF(ge(z0, s(s(0'))), z0), GE(z0, s(s(0')))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0') -> c3 P(s(z0)) -> c4 GE(z0, 0') -> c5 GE(0', s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0') -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) half(z0) -> if(ge(z0, s(s(0'))), z0) if(false, z0) -> 0' if(true, z0) -> s(half(p(p(z0)))) p(0') -> 0' p(s(z0)) -> z0 ge(z0, 0') -> true ge(0', s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0') -> 0' log(s(z0)) -> s(log(half(s(z0)))) Types: HALF :: 0':s -> c c :: c1:c2 -> c5:c6:c7 -> c IF :: false:true -> 0':s -> c1:c2 ge :: 0':s -> 0':s -> false:true s :: 0':s -> 0':s 0' :: 0':s GE :: 0':s -> 0':s -> c5:c6:c7 false :: false:true c1 :: c1:c2 true :: false:true c2 :: c -> c3:c4 -> c3:c4 -> c1:c2 p :: 0':s -> 0':s P :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 LOG :: 0':s -> c8:c9 c8 :: c8:c9 c9 :: c8:c9 -> c -> c8:c9 half :: 0':s -> 0':s if :: false:true -> 0':s -> 0':s log :: 0':s -> 0':s hole_c1_10 :: c hole_0':s2_10 :: 0':s hole_c1:c23_10 :: c1:c2 hole_c5:c6:c74_10 :: c5:c6:c7 hole_false:true5_10 :: false:true hole_c3:c46_10 :: c3:c4 hole_c8:c97_10 :: c8:c9 gen_0':s8_10 :: Nat -> 0':s gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 gen_c8:c910_10 :: Nat -> c8:c9 Generator Equations: gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(gen_c5:c6:c79_10(x)) gen_c8:c910_10(0) <=> c8 gen_c8:c910_10(+(x, 1)) <=> c9(gen_c8:c910_10(x), c(c1, c5)) The following defined symbols remain to be analysed: ge, HALF, GE, LOG, half, log They will be analysed ascendingly in the following order: ge < HALF GE < HALF HALF < LOG ge < half half < LOG half < log ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ge(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> true, rt in Omega(0) Induction Base: ge(gen_0':s8_10(0), gen_0':s8_10(0)) ->_R^Omega(0) true Induction Step: ge(gen_0':s8_10(+(n12_10, 1)), gen_0':s8_10(+(n12_10, 1))) ->_R^Omega(0) ge(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) ->_IH true We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) Obligation: Innermost TRS: Rules: HALF(z0) -> c(IF(ge(z0, s(s(0'))), z0), GE(z0, s(s(0')))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0') -> c3 P(s(z0)) -> c4 GE(z0, 0') -> c5 GE(0', s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0') -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) half(z0) -> if(ge(z0, s(s(0'))), z0) if(false, z0) -> 0' if(true, z0) -> s(half(p(p(z0)))) p(0') -> 0' p(s(z0)) -> z0 ge(z0, 0') -> true ge(0', s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0') -> 0' log(s(z0)) -> s(log(half(s(z0)))) Types: HALF :: 0':s -> c c :: c1:c2 -> c5:c6:c7 -> c IF :: false:true -> 0':s -> c1:c2 ge :: 0':s -> 0':s -> false:true s :: 0':s -> 0':s 0' :: 0':s GE :: 0':s -> 0':s -> c5:c6:c7 false :: false:true c1 :: c1:c2 true :: false:true c2 :: c -> c3:c4 -> c3:c4 -> c1:c2 p :: 0':s -> 0':s P :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 LOG :: 0':s -> c8:c9 c8 :: c8:c9 c9 :: c8:c9 -> c -> c8:c9 half :: 0':s -> 0':s if :: false:true -> 0':s -> 0':s log :: 0':s -> 0':s hole_c1_10 :: c hole_0':s2_10 :: 0':s hole_c1:c23_10 :: c1:c2 hole_c5:c6:c74_10 :: c5:c6:c7 hole_false:true5_10 :: false:true hole_c3:c46_10 :: c3:c4 hole_c8:c97_10 :: c8:c9 gen_0':s8_10 :: Nat -> 0':s gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 gen_c8:c910_10 :: Nat -> c8:c9 Lemmas: ge(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> true, rt in Omega(0) Generator Equations: gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(gen_c5:c6:c79_10(x)) gen_c8:c910_10(0) <=> c8 gen_c8:c910_10(+(x, 1)) <=> c9(gen_c8:c910_10(x), c(c1, c5)) The following defined symbols remain to be analysed: GE, HALF, LOG, half, log They will be analysed ascendingly in the following order: GE < HALF HALF < LOG half < LOG half < log ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: GE(gen_0':s8_10(n368_10), gen_0':s8_10(n368_10)) -> gen_c5:c6:c79_10(n368_10), rt in Omega(1 + n368_10) Induction Base: GE(gen_0':s8_10(0), gen_0':s8_10(0)) ->_R^Omega(1) c5 Induction Step: GE(gen_0':s8_10(+(n368_10, 1)), gen_0':s8_10(+(n368_10, 1))) ->_R^Omega(1) c7(GE(gen_0':s8_10(n368_10), gen_0':s8_10(n368_10))) ->_IH c7(gen_c5:c6:c79_10(c369_10)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Complex Obligation (BEST) ---------------------------------------- (25) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: HALF(z0) -> c(IF(ge(z0, s(s(0'))), z0), GE(z0, s(s(0')))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0') -> c3 P(s(z0)) -> c4 GE(z0, 0') -> c5 GE(0', s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0') -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) half(z0) -> if(ge(z0, s(s(0'))), z0) if(false, z0) -> 0' if(true, z0) -> s(half(p(p(z0)))) p(0') -> 0' p(s(z0)) -> z0 ge(z0, 0') -> true ge(0', s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0') -> 0' log(s(z0)) -> s(log(half(s(z0)))) Types: HALF :: 0':s -> c c :: c1:c2 -> c5:c6:c7 -> c IF :: false:true -> 0':s -> c1:c2 ge :: 0':s -> 0':s -> false:true s :: 0':s -> 0':s 0' :: 0':s GE :: 0':s -> 0':s -> c5:c6:c7 false :: false:true c1 :: c1:c2 true :: false:true c2 :: c -> c3:c4 -> c3:c4 -> c1:c2 p :: 0':s -> 0':s P :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 LOG :: 0':s -> c8:c9 c8 :: c8:c9 c9 :: c8:c9 -> c -> c8:c9 half :: 0':s -> 0':s if :: false:true -> 0':s -> 0':s log :: 0':s -> 0':s hole_c1_10 :: c hole_0':s2_10 :: 0':s hole_c1:c23_10 :: c1:c2 hole_c5:c6:c74_10 :: c5:c6:c7 hole_false:true5_10 :: false:true hole_c3:c46_10 :: c3:c4 hole_c8:c97_10 :: c8:c9 gen_0':s8_10 :: Nat -> 0':s gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 gen_c8:c910_10 :: Nat -> c8:c9 Lemmas: ge(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> true, rt in Omega(0) Generator Equations: gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(gen_c5:c6:c79_10(x)) gen_c8:c910_10(0) <=> c8 gen_c8:c910_10(+(x, 1)) <=> c9(gen_c8:c910_10(x), c(c1, c5)) The following defined symbols remain to be analysed: GE, HALF, LOG, half, log They will be analysed ascendingly in the following order: GE < HALF HALF < LOG half < LOG half < log ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: HALF(z0) -> c(IF(ge(z0, s(s(0'))), z0), GE(z0, s(s(0')))) IF(false, z0) -> c1 IF(true, z0) -> c2(HALF(p(p(z0))), P(p(z0)), P(z0)) P(0') -> c3 P(s(z0)) -> c4 GE(z0, 0') -> c5 GE(0', s(z0)) -> c6 GE(s(z0), s(z1)) -> c7(GE(z0, z1)) LOG(0') -> c8 LOG(s(z0)) -> c9(LOG(half(s(z0))), HALF(s(z0))) half(z0) -> if(ge(z0, s(s(0'))), z0) if(false, z0) -> 0' if(true, z0) -> s(half(p(p(z0)))) p(0') -> 0' p(s(z0)) -> z0 ge(z0, 0') -> true ge(0', s(z0)) -> false ge(s(z0), s(z1)) -> ge(z0, z1) log(0') -> 0' log(s(z0)) -> s(log(half(s(z0)))) Types: HALF :: 0':s -> c c :: c1:c2 -> c5:c6:c7 -> c IF :: false:true -> 0':s -> c1:c2 ge :: 0':s -> 0':s -> false:true s :: 0':s -> 0':s 0' :: 0':s GE :: 0':s -> 0':s -> c5:c6:c7 false :: false:true c1 :: c1:c2 true :: false:true c2 :: c -> c3:c4 -> c3:c4 -> c1:c2 p :: 0':s -> 0':s P :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 LOG :: 0':s -> c8:c9 c8 :: c8:c9 c9 :: c8:c9 -> c -> c8:c9 half :: 0':s -> 0':s if :: false:true -> 0':s -> 0':s log :: 0':s -> 0':s hole_c1_10 :: c hole_0':s2_10 :: 0':s hole_c1:c23_10 :: c1:c2 hole_c5:c6:c74_10 :: c5:c6:c7 hole_false:true5_10 :: false:true hole_c3:c46_10 :: c3:c4 hole_c8:c97_10 :: c8:c9 gen_0':s8_10 :: Nat -> 0':s gen_c5:c6:c79_10 :: Nat -> c5:c6:c7 gen_c8:c910_10 :: Nat -> c8:c9 Lemmas: ge(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> true, rt in Omega(0) GE(gen_0':s8_10(n368_10), gen_0':s8_10(n368_10)) -> gen_c5:c6:c79_10(n368_10), rt in Omega(1 + n368_10) Generator Equations: gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c5:c6:c79_10(0) <=> c5 gen_c5:c6:c79_10(+(x, 1)) <=> c7(gen_c5:c6:c79_10(x)) gen_c8:c910_10(0) <=> c8 gen_c8:c910_10(+(x, 1)) <=> c9(gen_c8:c910_10(x), c(c1, c5)) The following defined symbols remain to be analysed: HALF, LOG, half, log They will be analysed ascendingly in the following order: HALF < LOG half < LOG half < log