23.56/6.94 WORST_CASE(Omega(n^2), O(n^2)) 23.85/6.96 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 23.85/6.96 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 23.85/6.96 23.85/6.96 23.85/6.96 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). 23.85/6.96 23.85/6.96 (0) CpxTRS 23.85/6.96 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 23.85/6.96 (2) CpxWeightedTrs 23.85/6.96 (3) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 4 ms] 23.85/6.96 (4) CpxWeightedTrs 23.85/6.96 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 23.85/6.96 (6) CpxTypedWeightedTrs 23.85/6.96 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 23.85/6.96 (8) CpxTypedWeightedCompleteTrs 23.85/6.96 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 23.85/6.96 (10) CpxRNTS 23.85/6.96 (11) CompleteCoflocoProof [FINISHED, 208 ms] 23.85/6.96 (12) BOUNDS(1, n^2) 23.85/6.96 (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 23.85/6.96 (14) CpxTRS 23.85/6.96 (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 23.85/6.96 (16) typed CpxTrs 23.85/6.96 (17) OrderProof [LOWER BOUND(ID), 0 ms] 23.85/6.96 (18) typed CpxTrs 23.85/6.96 (19) RewriteLemmaProof [LOWER BOUND(ID), 334 ms] 23.85/6.96 (20) BEST 23.85/6.96 (21) proven lower bound 23.85/6.96 (22) LowerBoundPropagationProof [FINISHED, 0 ms] 23.85/6.96 (23) BOUNDS(n^1, INF) 23.85/6.96 (24) typed CpxTrs 23.85/6.96 (25) RewriteLemmaProof [LOWER BOUND(ID), 81 ms] 23.85/6.96 (26) typed CpxTrs 23.85/6.96 (27) RewriteLemmaProof [LOWER BOUND(ID), 105 ms] 23.85/6.96 (28) proven lower bound 23.85/6.96 (29) LowerBoundPropagationProof [FINISHED, 0 ms] 23.85/6.96 (30) BOUNDS(n^2, INF) 23.85/6.96 23.85/6.96 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (0) 23.85/6.96 Obligation: 23.85/6.96 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). 23.85/6.96 23.85/6.96 23.85/6.96 The TRS R consists of the following rules: 23.85/6.96 23.85/6.96 sqr(0) -> 0 23.85/6.96 sqr(s(x)) -> +(sqr(x), s(double(x))) 23.85/6.96 double(0) -> 0 23.85/6.96 double(s(x)) -> s(s(double(x))) 23.85/6.96 +(x, 0) -> x 23.85/6.96 +(x, s(y)) -> s(+(x, y)) 23.85/6.96 sqr(s(x)) -> s(+(sqr(x), double(x))) 23.85/6.96 23.85/6.96 S is empty. 23.85/6.96 Rewrite Strategy: INNERMOST 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 23.85/6.96 Transformed relative TRS to weighted TRS 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (2) 23.85/6.96 Obligation: 23.85/6.96 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 23.85/6.96 23.85/6.96 23.85/6.96 The TRS R consists of the following rules: 23.85/6.96 23.85/6.96 sqr(0) -> 0 [1] 23.85/6.96 sqr(s(x)) -> +(sqr(x), s(double(x))) [1] 23.85/6.96 double(0) -> 0 [1] 23.85/6.96 double(s(x)) -> s(s(double(x))) [1] 23.85/6.96 +(x, 0) -> x [1] 23.85/6.96 +(x, s(y)) -> s(+(x, y)) [1] 23.85/6.96 sqr(s(x)) -> s(+(sqr(x), double(x))) [1] 23.85/6.96 23.85/6.96 Rewrite Strategy: INNERMOST 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) 23.85/6.96 Renamed defined symbols to avoid conflicts with arithmetic symbols: 23.85/6.96 23.85/6.96 + => plus 23.85/6.96 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (4) 23.85/6.96 Obligation: 23.85/6.96 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). 23.85/6.96 23.85/6.96 23.85/6.96 The TRS R consists of the following rules: 23.85/6.96 23.85/6.96 sqr(0) -> 0 [1] 23.85/6.96 sqr(s(x)) -> plus(sqr(x), s(double(x))) [1] 23.85/6.96 double(0) -> 0 [1] 23.85/6.96 double(s(x)) -> s(s(double(x))) [1] 23.85/6.96 plus(x, 0) -> x [1] 23.85/6.96 plus(x, s(y)) -> s(plus(x, y)) [1] 23.85/6.96 sqr(s(x)) -> s(plus(sqr(x), double(x))) [1] 23.85/6.96 23.85/6.96 Rewrite Strategy: INNERMOST 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 23.85/6.96 Infered types. 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (6) 23.85/6.96 Obligation: 23.85/6.96 Runtime Complexity Weighted TRS with Types. 23.85/6.96 The TRS R consists of the following rules: 23.85/6.96 23.85/6.96 sqr(0) -> 0 [1] 23.85/6.96 sqr(s(x)) -> plus(sqr(x), s(double(x))) [1] 23.85/6.96 double(0) -> 0 [1] 23.85/6.96 double(s(x)) -> s(s(double(x))) [1] 23.85/6.96 plus(x, 0) -> x [1] 23.85/6.96 plus(x, s(y)) -> s(plus(x, y)) [1] 23.85/6.96 sqr(s(x)) -> s(plus(sqr(x), double(x))) [1] 23.85/6.96 23.85/6.96 The TRS has the following type information: 23.85/6.96 sqr :: 0:s -> 0:s 23.85/6.96 0 :: 0:s 23.85/6.96 s :: 0:s -> 0:s 23.85/6.96 plus :: 0:s -> 0:s -> 0:s 23.85/6.96 double :: 0:s -> 0:s 23.85/6.96 23.85/6.96 Rewrite Strategy: INNERMOST 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (7) CompletionProof (UPPER BOUND(ID)) 23.85/6.96 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 23.85/6.96 none 23.85/6.96 23.85/6.96 And the following fresh constants: none 23.85/6.96 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (8) 23.85/6.96 Obligation: 23.85/6.96 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 23.85/6.96 23.85/6.96 Runtime Complexity Weighted TRS with Types. 23.85/6.96 The TRS R consists of the following rules: 23.85/6.96 23.85/6.96 sqr(0) -> 0 [1] 23.85/6.96 sqr(s(x)) -> plus(sqr(x), s(double(x))) [1] 23.85/6.96 double(0) -> 0 [1] 23.85/6.96 double(s(x)) -> s(s(double(x))) [1] 23.85/6.96 plus(x, 0) -> x [1] 23.85/6.96 plus(x, s(y)) -> s(plus(x, y)) [1] 23.85/6.96 sqr(s(x)) -> s(plus(sqr(x), double(x))) [1] 23.85/6.96 23.85/6.96 The TRS has the following type information: 23.85/6.96 sqr :: 0:s -> 0:s 23.85/6.96 0 :: 0:s 23.85/6.96 s :: 0:s -> 0:s 23.85/6.96 plus :: 0:s -> 0:s -> 0:s 23.85/6.96 double :: 0:s -> 0:s 23.85/6.96 23.85/6.96 Rewrite Strategy: INNERMOST 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 23.85/6.96 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 23.85/6.96 The constant constructors are abstracted as follows: 23.85/6.96 23.85/6.96 0 => 0 23.85/6.96 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (10) 23.85/6.96 Obligation: 23.85/6.96 Complexity RNTS consisting of the following rules: 23.85/6.96 23.85/6.96 double(z) -{ 1 }-> 0 :|: z = 0 23.85/6.96 double(z) -{ 1 }-> 1 + (1 + double(x)) :|: x >= 0, z = 1 + x 23.85/6.96 plus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 23.85/6.96 plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = x 23.85/6.96 sqr(z) -{ 1 }-> plus(sqr(x), 1 + double(x)) :|: x >= 0, z = 1 + x 23.85/6.96 sqr(z) -{ 1 }-> 0 :|: z = 0 23.85/6.96 sqr(z) -{ 1 }-> 1 + plus(sqr(x), double(x)) :|: x >= 0, z = 1 + x 23.85/6.96 23.85/6.96 Only complete derivations are relevant for the runtime complexity. 23.85/6.96 23.85/6.96 ---------------------------------------- 23.85/6.96 23.85/6.96 (11) CompleteCoflocoProof (FINISHED) 23.85/6.96 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 23.85/6.96 23.85/6.96 eq(start(V, V3),0,[sqr(V, Out)],[V >= 0]). 23.85/6.96 eq(start(V, V3),0,[double(V, Out)],[V >= 0]). 23.85/6.96 eq(start(V, V3),0,[plus(V, V3, Out)],[V >= 0,V3 >= 0]). 23.85/6.96 eq(sqr(V, Out),1,[],[Out = 0,V = 0]). 23.85/6.96 eq(sqr(V, Out),1,[sqr(V1, Ret0),double(V1, Ret11),plus(Ret0, 1 + Ret11, Ret)],[Out = Ret,V1 >= 0,V = 1 + V1]). 23.85/6.96 eq(double(V, Out),1,[],[Out = 0,V = 0]). 23.85/6.96 eq(double(V, Out),1,[double(V2, Ret111)],[Out = 2 + Ret111,V2 >= 0,V = 1 + V2]). 23.85/6.96 eq(plus(V, V3, Out),1,[],[Out = V4,V4 >= 0,V = V4,V3 = 0]). 23.85/6.96 eq(plus(V, V3, Out),1,[plus(V5, V6, Ret1)],[Out = 1 + Ret1,V3 = 1 + V6,V5 >= 0,V6 >= 0,V = V5]). 23.85/6.96 eq(sqr(V, Out),1,[sqr(V7, Ret10),double(V7, Ret112),plus(Ret10, Ret112, Ret12)],[Out = 1 + Ret12,V7 >= 0,V = 1 + V7]). 23.85/6.96 input_output_vars(sqr(V,Out),[V],[Out]). 23.85/6.96 input_output_vars(double(V,Out),[V],[Out]). 23.85/6.96 input_output_vars(plus(V,V3,Out),[V,V3],[Out]). 23.85/6.96 23.85/6.96 23.85/6.96 CoFloCo proof output: 23.85/6.96 Preprocessing Cost Relations 23.85/6.96 ===================================== 23.85/6.96 23.85/6.96 #### Computed strongly connected components 23.85/6.96 0. recursive : [double/2] 23.85/6.96 1. recursive : [plus/3] 23.85/6.96 2. recursive [non_tail] : [sqr/2] 23.85/6.96 3. non_recursive : [start/2] 23.85/6.96 23.85/6.96 #### Obtained direct recursion through partial evaluation 23.85/6.96 0. SCC is partially evaluated into double/2 23.85/6.96 1. SCC is partially evaluated into plus/3 23.85/6.96 2. SCC is partially evaluated into sqr/2 23.85/6.96 3. SCC is partially evaluated into start/2 23.85/6.96 23.85/6.96 Control-Flow Refinement of Cost Relations 23.85/6.96 ===================================== 23.85/6.96 23.85/6.96 ### Specialization of cost equations double/2 23.85/6.96 * CE 8 is refined into CE [11] 23.85/6.96 * CE 7 is refined into CE [12] 23.85/6.96 23.85/6.96 23.85/6.96 ### Cost equations --> "Loop" of double/2 23.85/6.96 * CEs [12] --> Loop 8 23.85/6.96 * CEs [11] --> Loop 9 23.85/6.96 23.85/6.96 ### Ranking functions of CR double(V,Out) 23.85/6.96 * RF of phase [9]: [V] 23.85/6.96 23.85/6.96 #### Partial ranking functions of CR double(V,Out) 23.85/6.96 * Partial RF of phase [9]: 23.85/6.96 - RF of loop [9:1]: 23.85/6.96 V 23.85/6.96 23.85/6.96 23.85/6.96 ### Specialization of cost equations plus/3 23.85/6.96 * CE 10 is refined into CE [13] 23.85/6.96 * CE 9 is refined into CE [14] 23.85/6.96 23.85/6.96 23.85/6.96 ### Cost equations --> "Loop" of plus/3 23.85/6.96 * CEs [14] --> Loop 10 23.85/6.96 * CEs [13] --> Loop 11 23.85/6.96 23.85/6.96 ### Ranking functions of CR plus(V,V3,Out) 23.85/6.96 * RF of phase [11]: [V3] 23.85/6.96 23.85/6.96 #### Partial ranking functions of CR plus(V,V3,Out) 23.85/6.96 * Partial RF of phase [11]: 23.85/6.96 - RF of loop [11:1]: 23.85/6.96 V3 23.85/6.96 23.85/6.96 23.85/6.96 ### Specialization of cost equations sqr/2 23.85/6.96 * CE 5 is refined into CE [15,16] 23.85/6.96 * CE 6 is refined into CE [17,18] 23.85/6.96 * CE 4 is refined into CE [19] 23.85/6.96 23.85/6.96 23.85/6.96 ### Cost equations --> "Loop" of sqr/2 23.85/6.96 * CEs [19] --> Loop 12 23.85/6.96 * CEs [16,18] --> Loop 13 23.85/6.96 * CEs [15,17] --> Loop 14 23.85/6.96 23.85/6.96 ### Ranking functions of CR sqr(V,Out) 23.85/6.96 * RF of phase [13]: [V-1] 23.85/6.96 23.85/6.96 #### Partial ranking functions of CR sqr(V,Out) 23.85/6.97 * Partial RF of phase [13]: 23.85/6.97 - RF of loop [13:1]: 23.85/6.97 V-1 23.85/6.97 23.85/6.97 23.85/6.97 ### Specialization of cost equations start/2 23.85/6.97 * CE 1 is refined into CE [20,21,22] 23.85/6.97 * CE 2 is refined into CE [23,24] 23.85/6.97 * CE 3 is refined into CE [25,26] 23.85/6.97 23.85/6.97 23.85/6.97 ### Cost equations --> "Loop" of start/2 23.85/6.97 * CEs [26] --> Loop 15 23.85/6.97 * CEs [25] --> Loop 16 23.85/6.97 * CEs [21,22,24] --> Loop 17 23.85/6.97 * CEs [20,23] --> Loop 18 23.85/6.97 23.85/6.97 ### Ranking functions of CR start(V,V3) 23.85/6.97 23.85/6.97 #### Partial ranking functions of CR start(V,V3) 23.85/6.97 23.85/6.97 23.85/6.97 Computing Bounds 23.85/6.97 ===================================== 23.85/6.97 23.85/6.97 #### Cost of chains of double(V,Out): 23.85/6.97 * Chain [[9],8]: 1*it(9)+1 23.85/6.97 Such that:it(9) =< Out/2 23.85/6.97 23.85/6.97 with precondition: [2*V=Out,V>=1] 23.85/6.97 23.85/6.97 * Chain [8]: 1 23.85/6.97 with precondition: [V=0,Out=0] 23.85/6.97 23.85/6.97 23.85/6.97 #### Cost of chains of plus(V,V3,Out): 23.85/6.97 * Chain [[11],10]: 1*it(11)+1 23.85/6.97 Such that:it(11) =< V3 23.85/6.97 23.85/6.97 with precondition: [V+V3=Out,V>=0,V3>=1] 23.85/6.97 23.85/6.97 * Chain [10]: 1 23.85/6.97 with precondition: [V3=0,V=Out,V>=0] 23.85/6.97 23.85/6.97 23.85/6.97 #### Cost of chains of sqr(V,Out): 23.85/6.97 * Chain [[13],14,12]: 3*it(13)+2*s(10)+1*s(11)+1*s(12)+5 23.85/6.97 Such that:aux(6) =< V 23.85/6.97 it(13) =< aux(6) 23.85/6.97 aux(4) =< aux(6)*2+1 23.85/6.97 aux(3) =< it(13)*aux(6) 23.85/6.97 s(11) =< it(13)*aux(4) 23.85/6.97 s(12) =< aux(3)*2 23.85/6.97 s(10) =< aux(3) 23.85/6.97 23.85/6.97 with precondition: [V>=2,Out+1>=2*V] 23.85/6.97 23.85/6.97 * Chain [14,12]: 5 23.85/6.97 with precondition: [V=1,Out=1] 23.85/6.97 23.85/6.97 * Chain [12]: 1 23.85/6.97 with precondition: [V=0,Out=0] 23.85/6.97 23.85/6.97 23.85/6.97 #### Cost of chains of start(V,V3): 23.85/6.97 * Chain [18]: 1 23.85/6.97 with precondition: [V=0] 23.85/6.97 23.85/6.97 * Chain [17]: 4*s(15)+1*s(18)+1*s(19)+2*s(20)+5 23.85/6.97 Such that:aux(7) =< V 23.85/6.97 s(15) =< aux(7) 23.85/6.97 s(16) =< aux(7)*2+1 23.85/6.97 s(17) =< s(15)*aux(7) 23.85/6.97 s(18) =< s(15)*s(16) 23.85/6.97 s(19) =< s(17)*2 23.85/6.97 s(20) =< s(17) 23.85/6.97 23.85/6.97 with precondition: [V>=1] 23.85/6.97 23.85/6.97 * Chain [16]: 1 23.85/6.97 with precondition: [V3=0,V>=0] 23.85/6.97 23.85/6.97 * Chain [15]: 1*s(22)+1 23.85/6.97 Such that:s(22) =< V3 23.85/6.97 23.85/6.97 with precondition: [V>=0,V3>=1] 23.85/6.97 23.85/6.97 23.85/6.97 Closed-form bounds of start(V,V3): 23.85/6.97 ------------------------------------- 23.85/6.97 * Chain [18] with precondition: [V=0] 23.85/6.97 - Upper bound: 1 23.85/6.97 - Complexity: constant 23.85/6.97 * Chain [17] with precondition: [V>=1] 23.85/6.97 - Upper bound: 5*V+5+6*V*V 23.85/6.97 - Complexity: n^2 23.85/6.97 * Chain [16] with precondition: [V3=0,V>=0] 23.85/6.97 - Upper bound: 1 23.85/6.97 - Complexity: constant 23.85/6.97 * Chain [15] with precondition: [V>=0,V3>=1] 23.85/6.97 - Upper bound: V3+1 23.85/6.97 - Complexity: n 23.85/6.97 23.85/6.97 ### Maximum cost of start(V,V3): max([nat(V3),5*V+4+6*V*V])+1 23.85/6.97 Asymptotic class: n^2 23.85/6.97 * Total analysis performed in 132 ms. 23.85/6.97 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (12) 23.85/6.97 BOUNDS(1, n^2) 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (13) RenamingProof (BOTH BOUNDS(ID, ID)) 23.85/6.97 Renamed function symbols to avoid clashes with predefined symbol. 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (14) 23.85/6.97 Obligation: 23.85/6.97 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 23.85/6.97 23.85/6.97 23.85/6.97 The TRS R consists of the following rules: 23.85/6.97 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 S is empty. 23.85/6.97 Rewrite Strategy: INNERMOST 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 23.85/6.97 Infered types. 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (16) 23.85/6.97 Obligation: 23.85/6.97 Innermost TRS: 23.85/6.97 Rules: 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 Types: 23.85/6.97 sqr :: 0':s -> 0':s 23.85/6.97 0' :: 0':s 23.85/6.97 s :: 0':s -> 0':s 23.85/6.97 +' :: 0':s -> 0':s -> 0':s 23.85/6.97 double :: 0':s -> 0':s 23.85/6.97 hole_0':s1_0 :: 0':s 23.85/6.97 gen_0':s2_0 :: Nat -> 0':s 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (17) OrderProof (LOWER BOUND(ID)) 23.85/6.97 Heuristically decided to analyse the following defined symbols: 23.85/6.97 sqr, +', double 23.85/6.97 23.85/6.97 They will be analysed ascendingly in the following order: 23.85/6.97 +' < sqr 23.85/6.97 double < sqr 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (18) 23.85/6.97 Obligation: 23.85/6.97 Innermost TRS: 23.85/6.97 Rules: 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 Types: 23.85/6.97 sqr :: 0':s -> 0':s 23.85/6.97 0' :: 0':s 23.85/6.97 s :: 0':s -> 0':s 23.85/6.97 +' :: 0':s -> 0':s -> 0':s 23.85/6.97 double :: 0':s -> 0':s 23.85/6.97 hole_0':s1_0 :: 0':s 23.85/6.97 gen_0':s2_0 :: Nat -> 0':s 23.85/6.97 23.85/6.97 23.85/6.97 Generator Equations: 23.85/6.97 gen_0':s2_0(0) <=> 0' 23.85/6.97 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.85/6.97 23.85/6.97 23.85/6.97 The following defined symbols remain to be analysed: 23.85/6.97 +', sqr, double 23.85/6.97 23.85/6.97 They will be analysed ascendingly in the following order: 23.85/6.97 +' < sqr 23.85/6.97 double < sqr 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (19) RewriteLemmaProof (LOWER BOUND(ID)) 23.85/6.97 Proved the following rewrite lemma: 23.85/6.97 +'(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 23.85/6.97 23.85/6.97 Induction Base: 23.85/6.97 +'(gen_0':s2_0(a), gen_0':s2_0(0)) ->_R^Omega(1) 23.85/6.97 gen_0':s2_0(a) 23.85/6.97 23.85/6.97 Induction Step: 23.85/6.97 +'(gen_0':s2_0(a), gen_0':s2_0(+(n4_0, 1))) ->_R^Omega(1) 23.85/6.97 s(+'(gen_0':s2_0(a), gen_0':s2_0(n4_0))) ->_IH 23.85/6.97 s(gen_0':s2_0(+(a, c5_0))) 23.85/6.97 23.85/6.97 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (20) 23.85/6.97 Complex Obligation (BEST) 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (21) 23.85/6.97 Obligation: 23.85/6.97 Proved the lower bound n^1 for the following obligation: 23.85/6.97 23.85/6.97 Innermost TRS: 23.85/6.97 Rules: 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 Types: 23.85/6.97 sqr :: 0':s -> 0':s 23.85/6.97 0' :: 0':s 23.85/6.97 s :: 0':s -> 0':s 23.85/6.97 +' :: 0':s -> 0':s -> 0':s 23.85/6.97 double :: 0':s -> 0':s 23.85/6.97 hole_0':s1_0 :: 0':s 23.85/6.97 gen_0':s2_0 :: Nat -> 0':s 23.85/6.97 23.85/6.97 23.85/6.97 Generator Equations: 23.85/6.97 gen_0':s2_0(0) <=> 0' 23.85/6.97 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.85/6.97 23.85/6.97 23.85/6.97 The following defined symbols remain to be analysed: 23.85/6.97 +', sqr, double 23.85/6.97 23.85/6.97 They will be analysed ascendingly in the following order: 23.85/6.97 +' < sqr 23.85/6.97 double < sqr 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (22) LowerBoundPropagationProof (FINISHED) 23.85/6.97 Propagated lower bound. 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (23) 23.85/6.97 BOUNDS(n^1, INF) 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (24) 23.85/6.97 Obligation: 23.85/6.97 Innermost TRS: 23.85/6.97 Rules: 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 Types: 23.85/6.97 sqr :: 0':s -> 0':s 23.85/6.97 0' :: 0':s 23.85/6.97 s :: 0':s -> 0':s 23.85/6.97 +' :: 0':s -> 0':s -> 0':s 23.85/6.97 double :: 0':s -> 0':s 23.85/6.97 hole_0':s1_0 :: 0':s 23.85/6.97 gen_0':s2_0 :: Nat -> 0':s 23.85/6.97 23.85/6.97 23.85/6.97 Lemmas: 23.85/6.97 +'(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 23.85/6.97 23.85/6.97 23.85/6.97 Generator Equations: 23.85/6.97 gen_0':s2_0(0) <=> 0' 23.85/6.97 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.85/6.97 23.85/6.97 23.85/6.97 The following defined symbols remain to be analysed: 23.85/6.97 double, sqr 23.85/6.97 23.85/6.97 They will be analysed ascendingly in the following order: 23.85/6.97 double < sqr 23.85/6.97 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (25) RewriteLemmaProof (LOWER BOUND(ID)) 23.85/6.97 Proved the following rewrite lemma: 23.85/6.97 double(gen_0':s2_0(n513_0)) -> gen_0':s2_0(*(2, n513_0)), rt in Omega(1 + n513_0) 23.85/6.97 23.85/6.97 Induction Base: 23.85/6.97 double(gen_0':s2_0(0)) ->_R^Omega(1) 23.85/6.97 0' 23.85/6.97 23.85/6.97 Induction Step: 23.85/6.97 double(gen_0':s2_0(+(n513_0, 1))) ->_R^Omega(1) 23.85/6.97 s(s(double(gen_0':s2_0(n513_0)))) ->_IH 23.85/6.97 s(s(gen_0':s2_0(*(2, c514_0)))) 23.85/6.97 23.85/6.97 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (26) 23.85/6.97 Obligation: 23.85/6.97 Innermost TRS: 23.85/6.97 Rules: 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 Types: 23.85/6.97 sqr :: 0':s -> 0':s 23.85/6.97 0' :: 0':s 23.85/6.97 s :: 0':s -> 0':s 23.85/6.97 +' :: 0':s -> 0':s -> 0':s 23.85/6.97 double :: 0':s -> 0':s 23.85/6.97 hole_0':s1_0 :: 0':s 23.85/6.97 gen_0':s2_0 :: Nat -> 0':s 23.85/6.97 23.85/6.97 23.85/6.97 Lemmas: 23.85/6.97 +'(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 23.85/6.97 double(gen_0':s2_0(n513_0)) -> gen_0':s2_0(*(2, n513_0)), rt in Omega(1 + n513_0) 23.85/6.97 23.85/6.97 23.85/6.97 Generator Equations: 23.85/6.97 gen_0':s2_0(0) <=> 0' 23.85/6.97 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.85/6.97 23.85/6.97 23.85/6.97 The following defined symbols remain to be analysed: 23.85/6.97 sqr 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (27) RewriteLemmaProof (LOWER BOUND(ID)) 23.85/6.97 Proved the following rewrite lemma: 23.85/6.97 sqr(gen_0':s2_0(n777_0)) -> gen_0':s2_0(*(n777_0, n777_0)), rt in Omega(1 + n777_0 + n777_0^2) 23.85/6.97 23.85/6.97 Induction Base: 23.85/6.97 sqr(gen_0':s2_0(0)) ->_R^Omega(1) 23.85/6.97 0' 23.85/6.97 23.85/6.97 Induction Step: 23.85/6.97 sqr(gen_0':s2_0(+(n777_0, 1))) ->_R^Omega(1) 23.85/6.97 +'(sqr(gen_0':s2_0(n777_0)), s(double(gen_0':s2_0(n777_0)))) ->_IH 23.85/6.97 +'(gen_0':s2_0(*(c778_0, c778_0)), s(double(gen_0':s2_0(n777_0)))) ->_L^Omega(1 + n777_0) 23.85/6.97 +'(gen_0':s2_0(*(n777_0, n777_0)), s(gen_0':s2_0(*(2, n777_0)))) ->_L^Omega(2 + 2*n777_0) 23.85/6.97 gen_0':s2_0(+(+(*(2, n777_0), 1), *(n777_0, n777_0))) 23.85/6.97 23.85/6.97 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (28) 23.85/6.97 Obligation: 23.85/6.97 Proved the lower bound n^2 for the following obligation: 23.85/6.97 23.85/6.97 Innermost TRS: 23.85/6.97 Rules: 23.85/6.97 sqr(0') -> 0' 23.85/6.97 sqr(s(x)) -> +'(sqr(x), s(double(x))) 23.85/6.97 double(0') -> 0' 23.85/6.97 double(s(x)) -> s(s(double(x))) 23.85/6.97 +'(x, 0') -> x 23.85/6.97 +'(x, s(y)) -> s(+'(x, y)) 23.85/6.97 sqr(s(x)) -> s(+'(sqr(x), double(x))) 23.85/6.97 23.85/6.97 Types: 23.85/6.97 sqr :: 0':s -> 0':s 23.85/6.97 0' :: 0':s 23.85/6.97 s :: 0':s -> 0':s 23.85/6.97 +' :: 0':s -> 0':s -> 0':s 23.85/6.97 double :: 0':s -> 0':s 23.85/6.97 hole_0':s1_0 :: 0':s 23.85/6.97 gen_0':s2_0 :: Nat -> 0':s 23.85/6.97 23.85/6.97 23.85/6.97 Lemmas: 23.85/6.97 +'(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 23.85/6.97 double(gen_0':s2_0(n513_0)) -> gen_0':s2_0(*(2, n513_0)), rt in Omega(1 + n513_0) 23.85/6.97 23.85/6.97 23.85/6.97 Generator Equations: 23.85/6.97 gen_0':s2_0(0) <=> 0' 23.85/6.97 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 23.85/6.97 23.85/6.97 23.85/6.97 The following defined symbols remain to be analysed: 23.85/6.97 sqr 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (29) LowerBoundPropagationProof (FINISHED) 23.85/6.97 Propagated lower bound. 23.85/6.97 ---------------------------------------- 23.85/6.97 23.85/6.97 (30) 23.85/6.97 BOUNDS(n^2, INF) 23.93/7.02 EOF