/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, 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), 4 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 449 ms] (10) BOUNDS(1, n^2) (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTRS (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) typed CpxTrs (15) OrderProof [LOWER BOUND(ID), 0 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 303 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 71 ms] (24) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x))) -> s(half(x)) inc(0) -> 0 inc(s(x)) -> s(inc(x)) zero(0) -> true zero(s(x)) -> false p(0) -> 0 p(s(x)) -> x bits(x) -> bitIter(x, 0) bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, 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^2). The TRS R consists of the following rules: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(x, y) -> if(zero(x), x, inc(y)) [1] if(true, x, y) -> p(y) [1] if(false, x, y) -> bitIter(half(x), y) [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(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(x, y) -> if(zero(x), x, inc(y)) [1] if(true, x, y) -> p(y) [1] if(false, x, y) -> bitIter(half(x), y) [1] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s inc :: 0:s -> 0:s zero :: 0:s -> true:false true :: true:false false :: true:false p :: 0:s -> 0:s bits :: 0:s -> 0:s bitIter :: 0:s -> 0:s -> 0:s if :: true:false -> 0:s -> 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(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(x, y) -> if(zero(x), x, inc(y)) [1] if(true, x, y) -> p(y) [1] if(false, x, y) -> bitIter(half(x), y) [1] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s inc :: 0:s -> 0:s zero :: 0:s -> true:false true :: true:false false :: true:false p :: 0:s -> 0:s bits :: 0:s -> 0:s bitIter :: 0:s -> 0:s -> 0:s if :: true:false -> 0:s -> 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 true => 1 false => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 1 }-> if(zero(x), x, inc(y)) :|: x >= 0, y >= 0, z = x, z' = y bits(z) -{ 1 }-> bitIter(x, 0) :|: x >= 0, z = x half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(x) :|: x >= 0, z = 1 + (1 + x) if(z, z', z'') -{ 1 }-> p(y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if(z, z', z'') -{ 1 }-> bitIter(half(x), y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x 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, V6, V9),0,[half(V, Out)],[V >= 0]). eq(start(V, V6, V9),0,[inc(V, Out)],[V >= 0]). eq(start(V, V6, V9),0,[zero(V, Out)],[V >= 0]). eq(start(V, V6, V9),0,[p(V, Out)],[V >= 0]). eq(start(V, V6, V9),0,[bits(V, Out)],[V >= 0]). eq(start(V, V6, V9),0,[bitIter(V, V6, Out)],[V >= 0,V6 >= 0]). eq(start(V, V6, V9),0,[if(V, V6, V9, Out)],[V >= 0,V6 >= 0,V9 >= 0]). eq(half(V, Out),1,[],[Out = 0,V = 0]). eq(half(V, Out),1,[],[Out = 0,V = 1]). eq(half(V, Out),1,[half(V1, Ret1)],[Out = 1 + Ret1,V1 >= 0,V = 2 + V1]). eq(inc(V, Out),1,[],[Out = 0,V = 0]). eq(inc(V, Out),1,[inc(V2, Ret11)],[Out = 1 + Ret11,V2 >= 0,V = 1 + V2]). eq(zero(V, Out),1,[],[Out = 1,V = 0]). eq(zero(V, Out),1,[],[Out = 0,V3 >= 0,V = 1 + V3]). eq(p(V, Out),1,[],[Out = 0,V = 0]). eq(p(V, Out),1,[],[Out = V4,V4 >= 0,V = 1 + V4]). eq(bits(V, Out),1,[bitIter(V5, 0, Ret)],[Out = Ret,V5 >= 0,V = V5]). eq(bitIter(V, V6, Out),1,[zero(V7, Ret0),inc(V8, Ret2),if(Ret0, V7, Ret2, Ret3)],[Out = Ret3,V7 >= 0,V8 >= 0,V = V7,V6 = V8]). eq(if(V, V6, V9, Out),1,[p(V11, Ret4)],[Out = Ret4,V6 = V10,V9 = V11,V = 1,V10 >= 0,V11 >= 0]). eq(if(V, V6, V9, Out),1,[half(V13, Ret01),bitIter(Ret01, V12, Ret5)],[Out = Ret5,V6 = V13,V9 = V12,V13 >= 0,V12 >= 0,V = 0]). input_output_vars(half(V,Out),[V],[Out]). input_output_vars(inc(V,Out),[V],[Out]). input_output_vars(zero(V,Out),[V],[Out]). input_output_vars(p(V,Out),[V],[Out]). input_output_vars(bits(V,Out),[V],[Out]). input_output_vars(bitIter(V,V6,Out),[V,V6],[Out]). input_output_vars(if(V,V6,V9,Out),[V,V6,V9],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [half/2] 1. non_recursive : [p/2] 2. recursive : [inc/2] 3. non_recursive : [zero/2] 4. recursive : [bitIter/3,if/4] 5. non_recursive : [bits/2] 6. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into half/2 1. SCC is partially evaluated into p/2 2. SCC is partially evaluated into inc/2 3. SCC is partially evaluated into zero/2 4. SCC is partially evaluated into bitIter/3 5. SCC is completely evaluated into other SCCs 6. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations half/2 * CE 11 is refined into CE [20] * CE 10 is refined into CE [21] * CE 9 is refined into CE [22] ### Cost equations --> "Loop" of half/2 * CEs [21] --> Loop 14 * CEs [22] --> Loop 15 * CEs [20] --> Loop 16 ### Ranking functions of CR half(V,Out) * RF of phase [16]: [V-1] #### Partial ranking functions of CR half(V,Out) * Partial RF of phase [16]: - RF of loop [16:1]: V-1 ### Specialization of cost equations p/2 * CE 15 is refined into CE [23] * CE 14 is refined into CE [24] ### Cost equations --> "Loop" of p/2 * CEs [23] --> Loop 17 * CEs [24] --> Loop 18 ### Ranking functions of CR p(V,Out) #### Partial ranking functions of CR p(V,Out) ### Specialization of cost equations inc/2 * CE 17 is refined into CE [25] * CE 16 is refined into CE [26] ### Cost equations --> "Loop" of inc/2 * CEs [26] --> Loop 19 * CEs [25] --> Loop 20 ### Ranking functions of CR inc(V,Out) * RF of phase [20]: [V] #### Partial ranking functions of CR inc(V,Out) * Partial RF of phase [20]: - RF of loop [20:1]: V ### Specialization of cost equations zero/2 * CE 19 is refined into CE [27] * CE 18 is refined into CE [28] ### Cost equations --> "Loop" of zero/2 * CEs [27] --> Loop 21 * CEs [28] --> Loop 22 ### Ranking functions of CR zero(V,Out) #### Partial ranking functions of CR zero(V,Out) ### Specialization of cost equations bitIter/3 * CE 13 is refined into CE [29,30] * CE 12 is refined into CE [31,32,33,34,35,36] ### Cost equations --> "Loop" of bitIter/3 * CEs [36] --> Loop 23 * CEs [35] --> Loop 24 * CEs [33] --> Loop 25 * CEs [32] --> Loop 26 * CEs [34] --> Loop 27 * CEs [31] --> Loop 28 * CEs [30] --> Loop 29 * CEs [29] --> Loop 30 ### Ranking functions of CR bitIter(V,V6,Out) * RF of phase [23,24]: [V-1] * RF of phase [25,26]: [V-1] #### Partial ranking functions of CR bitIter(V,V6,Out) * Partial RF of phase [23,24]: - RF of loop [23:1]: V/2-1 - RF of loop [24:1]: V-1 * Partial RF of phase [25,26]: - RF of loop [25:1]: V/2-1 - RF of loop [26:1]: V-1 ### Specialization of cost equations start/3 * CE 2 is refined into CE [37,38] * CE 1 is refined into CE [39,40,41,42,43,44,45,46,47,48,49,50] * CE 3 is refined into CE [51,52,53,54] * CE 4 is refined into CE [55,56] * CE 5 is refined into CE [57,58] * CE 6 is refined into CE [59,60] * CE 7 is refined into CE [61,62,63] * CE 8 is refined into CE [64,65,66,67,68,69] ### Cost equations --> "Loop" of start/3 * CEs [68] --> Loop 31 * CEs [37,38,52,53,54,56,58,60,62,63,66,67,69] --> Loop 32 * CEs [39,40,41,42,43,44,45,46,47,48,49,50,51,55,57,59,61,64,65] --> Loop 33 ### Ranking functions of CR start(V,V6,V9) #### Partial ranking functions of CR start(V,V6,V9) Computing Bounds ===================================== #### Cost of chains of half(V,Out): * Chain [[16],15]: 1*it(16)+1 Such that:it(16) =< 2*Out with precondition: [V=2*Out,V>=2] * Chain [[16],14]: 1*it(16)+1 Such that:it(16) =< 2*Out with precondition: [V=2*Out+1,V>=3] * Chain [15]: 1 with precondition: [V=0,Out=0] * Chain [14]: 1 with precondition: [V=1,Out=0] #### Cost of chains of p(V,Out): * Chain [18]: 1 with precondition: [V=0,Out=0] * Chain [17]: 1 with precondition: [V=Out+1,V>=1] #### Cost of chains of inc(V,Out): * Chain [[20],19]: 1*it(20)+1 Such that:it(20) =< Out with precondition: [V=Out,V>=1] * Chain [19]: 1 with precondition: [V=0,Out=0] #### Cost of chains of zero(V,Out): * Chain [22]: 1 with precondition: [V=0,Out=1] * Chain [21]: 1 with precondition: [Out=0,V>=1] #### Cost of chains of bitIter(V,V6,Out): * Chain [[25,26],28,30]: 5*it(25)+5*it(26)+2*s(5)+10 Such that:it(25) =< V/2 aux(5) =< V aux(6) =< 2*V it(25) =< aux(5) it(26) =< aux(5) it(26) =< aux(6) s(5) =< aux(6) with precondition: [V6=0,Out=0,V>=2] * Chain [[23,24],27,29]: 5*it(23)+5*it(24)+2*s(7)+1*s(17)+2*s(18)+1*s(19)+10 Such that:it(23) =< V/2 aux(14) =< V aux(15) =< 2*V aux(16) =< Out+1 s(7) =< aux(16) it(23) =< aux(14) it(24) =< aux(14) s(18) =< aux(15) it(24) =< aux(15) aux(9) =< aux(16) s(17) =< it(23)*aux(16) s(19) =< it(24)*aux(9) with precondition: [V6=Out+1,V>=2,V6>=1] * Chain [30]: 5 with precondition: [V=0,V6=0,Out=0] * Chain [29]: 1*s(7)+5 Such that:s(7) =< V6 with precondition: [V=0,V6=Out+1,V6>=1] * Chain [28,30]: 10 with precondition: [V=1,V6=0,Out=0] * Chain [27,29]: 2*s(7)+10 Such that:aux(7) =< Out+1 s(7) =< aux(7) with precondition: [V=1,V6=Out+1,V6>=1] #### Cost of chains of start(V,V6,V9): * Chain [33]: 10*s(21)+4*s(23)+13*s(27)+20*s(28)+20*s(31)+2*s(42)+2*s(43)+12 Such that:aux(21) =< 2 aux(22) =< V6 aux(23) =< V6/2 aux(24) =< V6/4 aux(25) =< V9 s(23) =< aux(21) s(27) =< aux(22) s(28) =< aux(24) s(21) =< aux(25) s(28) =< aux(23) s(31) =< aux(23) s(31) =< aux(22) s(41) =< aux(25) s(42) =< s(28)*aux(25) s(43) =< s(31)*s(41) with precondition: [V=0] * Chain [32]: 3*s(66)+10*s(69)+10*s(72)+4*s(73)+4*s(75)+1*s(84)+1*s(85)+11 Such that:aux(26) =< V aux(27) =< 2*V aux(28) =< V/2 aux(29) =< V6 s(66) =< aux(26) s(69) =< aux(28) s(69) =< aux(26) s(72) =< aux(26) s(72) =< aux(27) s(73) =< aux(27) s(75) =< aux(29) s(83) =< aux(29) s(84) =< s(69)*aux(29) s(85) =< s(72)*s(83) with precondition: [V>=1] * Chain [31]: 5*s(86)+5*s(89)+2*s(90)+10 Such that:s(87) =< V s(88) =< 2*V s(86) =< V/2 s(86) =< s(87) s(89) =< s(87) s(89) =< s(88) s(90) =< s(88) with precondition: [V6=0,V>=2] Closed-form bounds of start(V,V6,V9): ------------------------------------- * Chain [33] with precondition: [V=0] - Upper bound: nat(V6)*13+20+nat(V9)*10+nat(V9)*2*nat(V6/2)+nat(V9)*2*nat(V6/4)+nat(V6/2)*20+nat(V6/4)*20 - Complexity: n^2 * Chain [32] with precondition: [V>=1] - Upper bound: 13*V+11+nat(V6)*V+nat(V6)*4+V/2*nat(V6)+8*V+5*V - Complexity: n^2 * Chain [31] with precondition: [V6=0,V>=2] - Upper bound: 23/2*V+10 - Complexity: n ### Maximum cost of start(V,V6,V9): max([nat(V6)*13+10+nat(V9)*10+nat(V9)*2*nat(V6/2)+nat(V9)*2*nat(V6/4)+nat(V6/2)*20+nat(V6/4)*20,8*V+1+nat(V6)*V+nat(V6)*4+V/2*nat(V6)+4*V+5/2*V+23/2*V])+10 Asymptotic class: n^2 * Total analysis performed in 353 ms. ---------------------------------------- (10) BOUNDS(1, n^2) ---------------------------------------- (11) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) inc(0') -> 0' inc(s(x)) -> s(inc(x)) zero(0') -> true zero(s(x)) -> false p(0') -> 0' p(s(x)) -> x bits(x) -> bitIter(x, 0') bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) inc(0') -> 0' inc(s(x)) -> s(inc(x)) zero(0') -> true zero(s(x)) -> false p(0') -> 0' p(s(x)) -> x bits(x) -> bitIter(x, 0') bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s inc :: 0':s -> 0':s zero :: 0':s -> true:false true :: true:false false :: true:false p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (15) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: half, inc, bitIter They will be analysed ascendingly in the following order: half < bitIter inc < bitIter ---------------------------------------- (16) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) inc(0') -> 0' inc(s(x)) -> s(inc(x)) zero(0') -> true zero(s(x)) -> false p(0') -> 0' p(s(x)) -> x bits(x) -> bitIter(x, 0') bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s inc :: 0':s -> 0':s zero :: 0':s -> true:false true :: true:false false :: true:false p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: half, inc, bitIter They will be analysed ascendingly in the following order: half < bitIter inc < bitIter ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) Induction Base: half(gen_0':s3_0(*(2, 0))) ->_R^Omega(1) 0' Induction Step: half(gen_0':s3_0(*(2, +(n5_0, 1)))) ->_R^Omega(1) s(half(gen_0':s3_0(*(2, n5_0)))) ->_IH s(gen_0':s3_0(c6_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) inc(0') -> 0' inc(s(x)) -> s(inc(x)) zero(0') -> true zero(s(x)) -> false p(0') -> 0' p(s(x)) -> x bits(x) -> bitIter(x, 0') bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s inc :: 0':s -> 0':s zero :: 0':s -> true:false true :: true:false false :: true:false p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: half, inc, bitIter They will be analysed ascendingly in the following order: half < bitIter inc < bitIter ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) inc(0') -> 0' inc(s(x)) -> s(inc(x)) zero(0') -> true zero(s(x)) -> false p(0') -> 0' p(s(x)) -> x bits(x) -> bitIter(x, 0') bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s inc :: 0':s -> 0':s zero :: 0':s -> true:false true :: true:false false :: true:false p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: inc, bitIter They will be analysed ascendingly in the following order: inc < bitIter ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: inc(gen_0':s3_0(n355_0)) -> gen_0':s3_0(n355_0), rt in Omega(1 + n355_0) Induction Base: inc(gen_0':s3_0(0)) ->_R^Omega(1) 0' Induction Step: inc(gen_0':s3_0(+(n355_0, 1))) ->_R^Omega(1) s(inc(gen_0':s3_0(n355_0))) ->_IH s(gen_0':s3_0(c356_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) inc(0') -> 0' inc(s(x)) -> s(inc(x)) zero(0') -> true zero(s(x)) -> false p(0') -> 0' p(s(x)) -> x bits(x) -> bitIter(x, 0') bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s inc :: 0':s -> 0':s zero :: 0':s -> true:false true :: true:false false :: true:false p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) inc(gen_0':s3_0(n355_0)) -> gen_0':s3_0(n355_0), rt in Omega(1 + n355_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: bitIter