/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 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), 1 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 422 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), 234 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), 55 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 90 ms] (26) 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: gt(0, y) -> false gt(s(x), 0) -> true gt(s(x), s(y)) -> gt(x, y) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) double(0) -> 0 double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0) aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z 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: gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] double(0) -> 0 [1] double(s(x)) -> s(s(double(x))) [1] average(x, y) -> aver(plus(x, y), 0) [1] aver(sum, z) -> if(gt(sum, double(z)), sum, z) [1] if(true, sum, z) -> aver(sum, s(z)) [1] if(false, sum, z) -> z [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: gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] double(0) -> 0 [1] double(s(x)) -> s(s(double(x))) [1] average(x, y) -> aver(plus(x, y), 0) [1] aver(sum, z) -> if(gt(sum, double(z)), sum, z) [1] if(true, sum, z) -> aver(sum, s(z)) [1] if(false, sum, z) -> z [1] The TRS has the following type information: gt :: 0:s -> 0:s -> false:true 0 :: 0:s false :: false:true s :: 0:s -> 0:s true :: false:true plus :: 0:s -> 0:s -> 0:s double :: 0:s -> 0:s average :: 0:s -> 0:s -> 0:s aver :: 0:s -> 0:s -> 0:s if :: false:true -> 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: gt(0, y) -> false [1] gt(s(x), 0) -> true [1] gt(s(x), s(y)) -> gt(x, y) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] double(0) -> 0 [1] double(s(x)) -> s(s(double(x))) [1] average(x, y) -> aver(plus(x, y), 0) [1] aver(sum, z) -> if(gt(sum, double(z)), sum, z) [1] if(true, sum, z) -> aver(sum, s(z)) [1] if(false, sum, z) -> z [1] The TRS has the following type information: gt :: 0:s -> 0:s -> false:true 0 :: 0:s false :: false:true s :: 0:s -> 0:s true :: false:true plus :: 0:s -> 0:s -> 0:s double :: 0:s -> 0:s average :: 0:s -> 0:s -> 0:s aver :: 0:s -> 0:s -> 0:s if :: false:true -> 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 false => 0 true => 1 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: aver(z', z'') -{ 1 }-> if(gt(sum, double(z)), sum, z) :|: z'' = z, z >= 0, sum >= 0, z' = sum average(z', z'') -{ 1 }-> aver(plus(x, y), 0) :|: z' = x, z'' = y, x >= 0, y >= 0 double(z') -{ 1 }-> 0 :|: z' = 0 double(z') -{ 1 }-> 1 + (1 + double(x)) :|: z' = 1 + x, x >= 0 gt(z', z'') -{ 1 }-> gt(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y gt(z', z'') -{ 1 }-> 1 :|: z'' = 0, z' = 1 + x, x >= 0 gt(z', z'') -{ 1 }-> 0 :|: z'' = y, y >= 0, z' = 0 if(z', z'', z1) -{ 1 }-> z :|: z1 = z, z >= 0, sum >= 0, z'' = sum, z' = 0 if(z', z'', z1) -{ 1 }-> aver(sum, 1 + z) :|: z1 = z, z >= 0, z' = 1, sum >= 0, z'' = sum plus(z', z'') -{ 1 }-> y :|: z'' = y, y >= 0, z' = 0 plus(z', z'') -{ 1 }-> 1 + plus(x, y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 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, V1, V16),0,[gt(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1, V16),0,[plus(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1, V16),0,[double(V, Out)],[V >= 0]). eq(start(V, V1, V16),0,[average(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1, V16),0,[aver(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1, V16),0,[if(V, V1, V16, Out)],[V >= 0,V1 >= 0,V16 >= 0]). eq(gt(V, V1, Out),1,[],[Out = 0,V1 = V2,V2 >= 0,V = 0]). eq(gt(V, V1, Out),1,[],[Out = 1,V1 = 0,V = 1 + V3,V3 >= 0]). eq(gt(V, V1, Out),1,[gt(V4, V5, Ret)],[Out = Ret,V = 1 + V4,V4 >= 0,V5 >= 0,V1 = 1 + V5]). eq(plus(V, V1, Out),1,[],[Out = V6,V1 = V6,V6 >= 0,V = 0]). eq(plus(V, V1, Out),1,[plus(V7, V8, Ret1)],[Out = 1 + Ret1,V = 1 + V7,V1 = V8,V7 >= 0,V8 >= 0]). eq(double(V, Out),1,[],[Out = 0,V = 0]). eq(double(V, Out),1,[double(V9, Ret11)],[Out = 2 + Ret11,V = 1 + V9,V9 >= 0]). eq(average(V, V1, Out),1,[plus(V11, V10, Ret0),aver(Ret0, 0, Ret2)],[Out = Ret2,V = V11,V1 = V10,V11 >= 0,V10 >= 0]). eq(aver(V, V1, Out),1,[double(V13, Ret01),gt(V12, Ret01, Ret02),if(Ret02, V12, V13, Ret3)],[Out = Ret3,V1 = V13,V13 >= 0,V12 >= 0,V = V12]). eq(if(V, V1, V16, Out),1,[aver(V14, 1 + V15, Ret4)],[Out = Ret4,V16 = V15,V15 >= 0,V = 1,V14 >= 0,V1 = V14]). eq(if(V, V1, V16, Out),1,[],[Out = V17,V16 = V17,V17 >= 0,V18 >= 0,V1 = V18,V = 0]). input_output_vars(gt(V,V1,Out),[V,V1],[Out]). input_output_vars(plus(V,V1,Out),[V,V1],[Out]). input_output_vars(double(V,Out),[V],[Out]). input_output_vars(average(V,V1,Out),[V,V1],[Out]). input_output_vars(aver(V,V1,Out),[V,V1],[Out]). input_output_vars(if(V,V1,V16,Out),[V,V1,V16],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [double/2] 1. recursive : [gt/3] 2. recursive : [aver/3,if/4] 3. recursive : [plus/3] 4. non_recursive : [average/3] 5. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into double/2 1. SCC is partially evaluated into gt/3 2. SCC is partially evaluated into aver/3 3. SCC is partially evaluated into plus/3 4. SCC is partially evaluated into average/3 5. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations double/2 * CE 16 is refined into CE [18] * CE 15 is refined into CE [19] ### Cost equations --> "Loop" of double/2 * CEs [19] --> Loop 13 * CEs [18] --> Loop 14 ### Ranking functions of CR double(V,Out) * RF of phase [14]: [V] #### Partial ranking functions of CR double(V,Out) * Partial RF of phase [14]: - RF of loop [14:1]: V ### Specialization of cost equations gt/3 * CE 12 is refined into CE [20] * CE 11 is refined into CE [21] * CE 10 is refined into CE [22] ### Cost equations --> "Loop" of gt/3 * CEs [21] --> Loop 15 * CEs [22] --> Loop 16 * CEs [20] --> Loop 17 ### Ranking functions of CR gt(V,V1,Out) * RF of phase [17]: [V,V1] #### Partial ranking functions of CR gt(V,V1,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V V1 ### Specialization of cost equations aver/3 * CE 9 is refined into CE [23,24] * CE 8 is refined into CE [25,26,27] ### Cost equations --> "Loop" of aver/3 * CEs [27] --> Loop 18 * CEs [26] --> Loop 19 * CEs [25] --> Loop 20 * CEs [24] --> Loop 21 * CEs [23] --> Loop 22 ### Ranking functions of CR aver(V,V1,Out) * RF of phase [21]: [V/2-V1] #### Partial ranking functions of CR aver(V,V1,Out) * Partial RF of phase [21]: - RF of loop [21:1]: V/2-V1 ### Specialization of cost equations plus/3 * CE 14 is refined into CE [28] * CE 13 is refined into CE [29] ### Cost equations --> "Loop" of plus/3 * CEs [29] --> Loop 23 * CEs [28] --> Loop 24 ### Ranking functions of CR plus(V,V1,Out) * RF of phase [24]: [V] #### Partial ranking functions of CR plus(V,V1,Out) * Partial RF of phase [24]: - RF of loop [24:1]: V ### Specialization of cost equations average/3 * CE 17 is refined into CE [30,31,32,33,34] ### Cost equations --> "Loop" of average/3 * CEs [34] --> Loop 25 * CEs [33] --> Loop 26 * CEs [32] --> Loop 27 * CEs [31] --> Loop 28 * CEs [30] --> Loop 29 ### Ranking functions of CR average(V,V1,Out) #### Partial ranking functions of CR average(V,V1,Out) ### Specialization of cost equations start/3 * CE 2 is refined into CE [35,36,37] * CE 1 is refined into CE [38] * CE 3 is refined into CE [39,40,41,42] * CE 4 is refined into CE [43,44] * CE 5 is refined into CE [45,46] * CE 6 is refined into CE [47,48,49,50,51] * CE 7 is refined into CE [52,53,54,55,56,57] ### Cost equations --> "Loop" of start/3 * CEs [37] --> Loop 30 * CEs [36] --> Loop 31 * CEs [35,40,41,42,44,46,50,51,54,55,56,57] --> Loop 32 * CEs [38,39,43,45,47,48,49,52,53] --> Loop 33 ### Ranking functions of CR start(V,V1,V16) #### Partial ranking functions of CR start(V,V1,V16) Computing Bounds ===================================== #### Cost of chains of double(V,Out): * Chain [[14],13]: 1*it(14)+1 Such that:it(14) =< Out/2 with precondition: [2*V=Out,V>=1] * Chain [13]: 1 with precondition: [V=0,Out=0] #### Cost of chains of gt(V,V1,Out): * Chain [[17],16]: 1*it(17)+1 Such that:it(17) =< V with precondition: [Out=0,V>=1,V1>=V] * Chain [[17],15]: 1*it(17)+1 Such that:it(17) =< V1 with precondition: [Out=1,V1>=1,V>=V1+1] * Chain [16]: 1 with precondition: [V=0,Out=0,V1>=0] * Chain [15]: 1 with precondition: [V1=0,Out=1,V>=1] #### Cost of chains of aver(V,V1,Out): * Chain [[21],18]: 4*it(21)+1*s(1)+1*s(2)+1*s(7)+1*s(8)+4 Such that:s(2) =< V aux(1) =< V/2+1/2 it(21) =< V/2-V1 s(1) =< Out aux(2) =< it(21)*aux(1) s(7) =< it(21)*aux(1) s(8) =< aux(2)*2 with precondition: [V1>=1,V+1>=2*Out,2*Out>=V,Out>=V1+1] * Chain [22,[21],18]: 4*it(21)+1*s(1)+1*s(2)+1*s(7)+1*s(8)+8 Such that:s(2) =< V it(21) =< V/2 aux(1) =< V/2+1/2 s(1) =< Out aux(2) =< it(21)*aux(1) s(7) =< it(21)*aux(1) s(8) =< aux(2)*2 with precondition: [V1=0,Out>=2,V+1>=2*Out,2*Out>=V] * Chain [22,18]: 1*s(1)+1*s(2)+8 Such that:s(1) =< 1 s(2) =< V with precondition: [V1=0,Out=1,2>=V,V>=1] * Chain [20]: 4 with precondition: [V=0,V1=0,Out=0] * Chain [19]: 1*s(9)+4 Such that:s(9) =< V1 with precondition: [V=0,V1=Out,V1>=1] * Chain [18]: 1*s(1)+1*s(2)+4 Such that:s(2) =< V s(1) =< V1 with precondition: [V1=Out,V>=1,V1>=1,2*V1>=V] #### Cost of chains of plus(V,V1,Out): * Chain [[24],23]: 1*it(24)+1 Such that:it(24) =< -V1+Out with precondition: [V+V1=Out,V>=1,V1>=0] * Chain [23]: 1 with precondition: [V=0,V1=Out,V1>=0] #### Cost of chains of average(V,V1,Out): * Chain [29]: 6 with precondition: [V=0,V1=0,Out=0] * Chain [28]: 1*s(10)+1*s(11)+10 Such that:s(10) =< 1 s(11) =< V1 with precondition: [V=0,Out=1,2>=V1,V1>=1] * Chain [27]: 1*s(12)+4*s(13)+1*s(15)+1*s(17)+1*s(18)+10 Such that:s(12) =< V1 s(13) =< V1/2 aux(3) =< V1/2+1/2 s(15) =< aux(3) s(16) =< s(13)*aux(3) s(17) =< s(13)*aux(3) s(18) =< s(16)*2 with precondition: [V=0,Out>=2,V1+1>=2*Out,2*Out>=V1] * Chain [26]: 1*s(19)+1*s(20)+1*s(21)+10 Such that:s(20) =< 1 s(19) =< V s(21) =< V+V1 with precondition: [Out=1,V>=1,V1>=0,2>=V+V1] * Chain [25]: 1*s(22)+1*s(23)+4*s(24)+1*s(26)+1*s(28)+1*s(29)+10 Such that:s(22) =< V s(23) =< V+V1 s(24) =< V/2+V1/2 aux(4) =< V/2+V1/2+1/2 s(26) =< aux(4) s(27) =< s(24)*aux(4) s(28) =< s(24)*aux(4) s(29) =< s(27)*2 with precondition: [V>=1,V1>=0,Out>=2,V+V1+1>=2*Out,2*Out>=V+V1] #### Cost of chains of start(V,V1,V16): * Chain [33]: 1*s(30)+3*s(31)+4*s(33)+1*s(35)+1*s(37)+1*s(38)+10 Such that:s(30) =< 1 s(33) =< V1/2 s(34) =< V1/2+1/2 aux(5) =< V1 s(31) =< aux(5) s(35) =< s(34) s(36) =< s(33)*s(34) s(37) =< s(33)*s(34) s(38) =< s(36)*2 with precondition: [V=0] * Chain [32]: 1*s(40)+9*s(41)+2*s(42)+2*s(45)+2*s(47)+4*s(50)+1*s(52)+1*s(54)+1*s(55)+4*s(59)+2*s(61)+1*s(63)+1*s(64)+4*s(69)+1*s(72)+1*s(73)+10 Such that:s(59) =< V/2 s(69) =< V/2-V1 s(50) =< V/2+V1/2 s(51) =< V/2+V1/2+1/2 s(40) =< V16+1 aux(8) =< 1 aux(9) =< V aux(10) =< V+V1 aux(11) =< V/2+1/2 aux(12) =< V1 s(45) =< aux(8) s(41) =< aux(9) s(47) =< aux(10) s(42) =< aux(12) s(52) =< s(51) s(53) =< s(50)*s(51) s(54) =< s(50)*s(51) s(55) =< s(53)*2 s(61) =< aux(11) s(62) =< s(59)*aux(11) s(63) =< s(59)*aux(11) s(64) =< s(62)*2 s(71) =< s(69)*aux(11) s(72) =< s(69)*aux(11) s(73) =< s(71)*2 with precondition: [V>=1] * Chain [31]: 1*s(74)+1*s(75)+5 Such that:s(74) =< V1 s(75) =< V16+1 with precondition: [V=1,V1>=1,V16>=0,2*V16+2>=V1] * Chain [30]: 1*s(76)+4*s(78)+1*s(79)+1*s(81)+1*s(82)+5 Such that:s(76) =< V1 s(78) =< V1/2-V16 aux(13) =< V1/2+1/2 s(79) =< aux(13) s(80) =< s(78)*aux(13) s(81) =< s(78)*aux(13) s(82) =< s(80)*2 with precondition: [V=1,V16>=0,V1>=2*V16+3] Closed-form bounds of start(V,V1,V16): ------------------------------------- * Chain [33] with precondition: [V=0] - Upper bound: nat(V1)*3+11+nat(V1/2+1/2)+nat(V1/2+1/2)*3*nat(V1/2)+nat(V1/2)*4 - Complexity: n^2 * Chain [32] with precondition: [V>=1] - Upper bound: 9*V+12+nat(V1)*2+nat(V+V1)*2+nat(V16+1)+nat(V/2+V1/2+1/2)+nat(V/2+V1/2+1/2)*3*nat(V/2+V1/2)+nat(V/2+V1/2)*4+(V+1)+(3/2*V+3/2)*nat(V/2-V1)+V/2*(3/2*V+3/2)+nat(V/2-V1)*4+2*V - Complexity: n^2 * Chain [31] with precondition: [V=1,V1>=1,V16>=0,2*V16+2>=V1] - Upper bound: V1+V16+6 - Complexity: n * Chain [30] with precondition: [V=1,V16>=0,V1>=2*V16+3] - Upper bound: 2*V1-4*V16+(3/2*V1+11/2+(V1/2-V16)*(3/2*V1+3/2)) - Complexity: n^2 ### Maximum cost of start(V,V1,V16): nat(V1)+5+max([max([nat(V16+1),nat(V1/2+1/2)*3*nat(V1/2-V16)+nat(V1/2+1/2)+nat(V1/2-V16)*4]),nat(V1)+6+max([nat(V1/2+1/2)+nat(V1)+nat(V1/2+1/2)*3*nat(V1/2)+nat(V1/2)*4,9*V+1+nat(V+V1)*2+nat(V16+1)+nat(V/2+V1/2+1/2)+nat(V/2+V1/2+1/2)*3*nat(V/2+V1/2)+nat(V/2+V1/2)*4+(V+1)+(3/2*V+3/2)*nat(V/2-V1)+V/2*(3/2*V+3/2)+nat(V/2-V1)*4+2*V])]) Asymptotic class: n^2 * Total analysis performed in 331 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: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Innermost TRS: Rules: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z Types: gt :: 0':s -> 0':s -> false:true 0' :: 0':s false :: false:true s :: 0':s -> 0':s true :: false:true plus :: 0':s -> 0':s -> 0':s double :: 0':s -> 0':s average :: 0':s -> 0':s -> 0':s aver :: 0':s -> 0':s -> 0':s if :: false:true -> 0':s -> 0':s -> 0':s hole_false:true1_0 :: false:true hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (15) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: gt, plus, double, aver They will be analysed ascendingly in the following order: gt < aver double < aver ---------------------------------------- (16) Obligation: Innermost TRS: Rules: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z Types: gt :: 0':s -> 0':s -> false:true 0' :: 0':s false :: false:true s :: 0':s -> 0':s true :: false:true plus :: 0':s -> 0':s -> 0':s double :: 0':s -> 0':s average :: 0':s -> 0':s -> 0':s aver :: 0':s -> 0':s -> 0':s if :: false:true -> 0':s -> 0':s -> 0':s hole_false:true1_0 :: false:true hole_0':s2_0 :: 0':s 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: gt, plus, double, aver They will be analysed ascendingly in the following order: gt < aver double < aver ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) Induction Base: gt(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) false Induction Step: gt(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH false 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: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z Types: gt :: 0':s -> 0':s -> false:true 0' :: 0':s false :: false:true s :: 0':s -> 0':s true :: false:true plus :: 0':s -> 0':s -> 0':s double :: 0':s -> 0':s average :: 0':s -> 0':s -> 0':s aver :: 0':s -> 0':s -> 0':s if :: false:true -> 0':s -> 0':s -> 0':s hole_false:true1_0 :: false:true hole_0':s2_0 :: 0':s 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: gt, plus, double, aver They will be analysed ascendingly in the following order: gt < aver double < aver ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z Types: gt :: 0':s -> 0':s -> false:true 0' :: 0':s false :: false:true s :: 0':s -> 0':s true :: false:true plus :: 0':s -> 0':s -> 0':s double :: 0':s -> 0':s average :: 0':s -> 0':s -> 0':s aver :: 0':s -> 0':s -> 0':s if :: false:true -> 0':s -> 0':s -> 0':s hole_false:true1_0 :: false:true hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, 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: plus, double, aver They will be analysed ascendingly in the following order: double < aver ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s3_0(n306_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n306_0, b)), rt in Omega(1 + n306_0) Induction Base: plus(gen_0':s3_0(0), gen_0':s3_0(b)) ->_R^Omega(1) gen_0':s3_0(b) Induction Step: plus(gen_0':s3_0(+(n306_0, 1)), gen_0':s3_0(b)) ->_R^Omega(1) s(plus(gen_0':s3_0(n306_0), gen_0':s3_0(b))) ->_IH s(gen_0':s3_0(+(b, c307_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: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z Types: gt :: 0':s -> 0':s -> false:true 0' :: 0':s false :: false:true s :: 0':s -> 0':s true :: false:true plus :: 0':s -> 0':s -> 0':s double :: 0':s -> 0':s average :: 0':s -> 0':s -> 0':s aver :: 0':s -> 0':s -> 0':s if :: false:true -> 0':s -> 0':s -> 0':s hole_false:true1_0 :: false:true hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) plus(gen_0':s3_0(n306_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n306_0, b)), rt in Omega(1 + n306_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: double, aver They will be analysed ascendingly in the following order: double < aver ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: double(gen_0':s3_0(n913_0)) -> gen_0':s3_0(*(2, n913_0)), rt in Omega(1 + n913_0) Induction Base: double(gen_0':s3_0(0)) ->_R^Omega(1) 0' Induction Step: double(gen_0':s3_0(+(n913_0, 1))) ->_R^Omega(1) s(s(double(gen_0':s3_0(n913_0)))) ->_IH s(s(gen_0':s3_0(*(2, c914_0)))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Obligation: Innermost TRS: Rules: gt(0', y) -> false gt(s(x), 0') -> true gt(s(x), s(y)) -> gt(x, y) plus(0', y) -> y plus(s(x), y) -> s(plus(x, y)) double(0') -> 0' double(s(x)) -> s(s(double(x))) average(x, y) -> aver(plus(x, y), 0') aver(sum, z) -> if(gt(sum, double(z)), sum, z) if(true, sum, z) -> aver(sum, s(z)) if(false, sum, z) -> z Types: gt :: 0':s -> 0':s -> false:true 0' :: 0':s false :: false:true s :: 0':s -> 0':s true :: false:true plus :: 0':s -> 0':s -> 0':s double :: 0':s -> 0':s average :: 0':s -> 0':s -> 0':s aver :: 0':s -> 0':s -> 0':s if :: false:true -> 0':s -> 0':s -> 0':s hole_false:true1_0 :: false:true hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) plus(gen_0':s3_0(n306_0), gen_0':s3_0(b)) -> gen_0':s3_0(+(n306_0, b)), rt in Omega(1 + n306_0) double(gen_0':s3_0(n913_0)) -> gen_0':s3_0(*(2, n913_0)), rt in Omega(1 + n913_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: aver