40.10/12.77 WORST_CASE(Omega(n^1), O(n^1)) 40.10/12.78 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 40.10/12.78 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 40.10/12.78 40.10/12.78 40.10/12.78 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 40.10/12.78 40.10/12.78 (0) CpxTRS 40.10/12.78 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 40.10/12.78 (2) CpxWeightedTrs 40.10/12.78 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 40.10/12.78 (4) CpxTypedWeightedTrs 40.10/12.78 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 40.10/12.78 (6) CpxTypedWeightedCompleteTrs 40.10/12.78 (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 40.10/12.78 (8) CpxRNTS 40.10/12.78 (9) CompleteCoflocoProof [FINISHED, 505 ms] 40.10/12.78 (10) BOUNDS(1, n^1) 40.10/12.78 (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 40.10/12.78 (12) CpxTRS 40.10/12.78 (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 40.10/12.78 (14) typed CpxTrs 40.10/12.78 (15) OrderProof [LOWER BOUND(ID), 0 ms] 40.10/12.78 (16) typed CpxTrs 40.10/12.78 (17) RewriteLemmaProof [LOWER BOUND(ID), 288 ms] 40.10/12.78 (18) BEST 40.10/12.78 (19) proven lower bound 40.10/12.78 (20) LowerBoundPropagationProof [FINISHED, 0 ms] 40.10/12.78 (21) BOUNDS(n^1, INF) 40.10/12.78 (22) typed CpxTrs 40.10/12.78 (23) RewriteLemmaProof [LOWER BOUND(ID), 40 ms] 40.10/12.78 (24) typed CpxTrs 40.10/12.78 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (0) 40.10/12.78 Obligation: 40.10/12.78 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 40.10/12.78 40.10/12.78 40.10/12.78 The TRS R consists of the following rules: 40.10/12.78 40.10/12.78 ge(x, 0) -> true 40.10/12.78 ge(0, s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0) -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0)), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 S is empty. 40.10/12.78 Rewrite Strategy: INNERMOST 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 40.10/12.78 Transformed relative TRS to weighted TRS 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (2) 40.10/12.78 Obligation: 40.10/12.78 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 40.10/12.78 40.10/12.78 40.10/12.78 The TRS R consists of the following rules: 40.10/12.78 40.10/12.78 ge(x, 0) -> true [1] 40.10/12.78 ge(0, s(x)) -> false [1] 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) [1] 40.10/12.78 minus(x, 0) -> x [1] 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) [1] 40.10/12.78 div(x, y) -> ify(ge(y, s(0)), x, y) [1] 40.10/12.78 ify(false, x, y) -> divByZeroError [1] 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) [1] 40.10/12.78 if(false, x, y) -> 0 [1] 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) [1] 40.10/12.78 40.10/12.78 Rewrite Strategy: INNERMOST 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 40.10/12.78 Infered types. 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (4) 40.10/12.78 Obligation: 40.10/12.78 Runtime Complexity Weighted TRS with Types. 40.10/12.78 The TRS R consists of the following rules: 40.10/12.78 40.10/12.78 ge(x, 0) -> true [1] 40.10/12.78 ge(0, s(x)) -> false [1] 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) [1] 40.10/12.78 minus(x, 0) -> x [1] 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) [1] 40.10/12.78 div(x, y) -> ify(ge(y, s(0)), x, y) [1] 40.10/12.78 ify(false, x, y) -> divByZeroError [1] 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) [1] 40.10/12.78 if(false, x, y) -> 0 [1] 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) [1] 40.10/12.78 40.10/12.78 The TRS has the following type information: 40.10/12.78 ge :: 0:s:divByZeroError -> 0:s:divByZeroError -> true:false 40.10/12.78 0 :: 0:s:divByZeroError 40.10/12.78 true :: true:false 40.10/12.78 s :: 0:s:divByZeroError -> 0:s:divByZeroError 40.10/12.78 false :: true:false 40.10/12.78 minus :: 0:s:divByZeroError -> 0:s:divByZeroError -> 0:s:divByZeroError 40.10/12.78 div :: 0:s:divByZeroError -> 0:s:divByZeroError -> 0:s:divByZeroError 40.10/12.78 ify :: true:false -> 0:s:divByZeroError -> 0:s:divByZeroError -> 0:s:divByZeroError 40.10/12.78 divByZeroError :: 0:s:divByZeroError 40.10/12.78 if :: true:false -> 0:s:divByZeroError -> 0:s:divByZeroError -> 0:s:divByZeroError 40.10/12.78 40.10/12.78 Rewrite Strategy: INNERMOST 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (5) CompletionProof (UPPER BOUND(ID)) 40.10/12.78 The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: 40.10/12.78 40.10/12.78 ge(v0, v1) -> null_ge [0] 40.10/12.78 minus(v0, v1) -> null_minus [0] 40.10/12.78 ify(v0, v1, v2) -> null_ify [0] 40.10/12.78 if(v0, v1, v2) -> null_if [0] 40.10/12.78 40.10/12.78 And the following fresh constants: null_ge, null_minus, null_ify, null_if 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (6) 40.10/12.78 Obligation: 40.10/12.78 Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: 40.10/12.78 40.10/12.78 Runtime Complexity Weighted TRS with Types. 40.10/12.78 The TRS R consists of the following rules: 40.10/12.78 40.10/12.78 ge(x, 0) -> true [1] 40.10/12.78 ge(0, s(x)) -> false [1] 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) [1] 40.10/12.78 minus(x, 0) -> x [1] 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) [1] 40.10/12.78 div(x, y) -> ify(ge(y, s(0)), x, y) [1] 40.10/12.78 ify(false, x, y) -> divByZeroError [1] 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) [1] 40.10/12.78 if(false, x, y) -> 0 [1] 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) [1] 40.10/12.78 ge(v0, v1) -> null_ge [0] 40.10/12.78 minus(v0, v1) -> null_minus [0] 40.10/12.78 ify(v0, v1, v2) -> null_ify [0] 40.10/12.78 if(v0, v1, v2) -> null_if [0] 40.10/12.78 40.10/12.78 The TRS has the following type information: 40.10/12.78 ge :: 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if -> true:false:null_ge 40.10/12.78 0 :: 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 true :: true:false:null_ge 40.10/12.78 s :: 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 false :: true:false:null_ge 40.10/12.78 minus :: 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 div :: 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 ify :: true:false:null_ge -> 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 divByZeroError :: 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 if :: true:false:null_ge -> 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if -> 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 null_ge :: true:false:null_ge 40.10/12.78 null_minus :: 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 null_ify :: 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 null_if :: 0:s:divByZeroError:null_minus:null_ify:null_if 40.10/12.78 40.10/12.78 Rewrite Strategy: INNERMOST 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 40.10/12.78 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 40.10/12.78 The constant constructors are abstracted as follows: 40.10/12.78 40.10/12.78 0 => 0 40.10/12.78 true => 2 40.10/12.78 false => 1 40.10/12.78 divByZeroError => 1 40.10/12.78 null_ge => 0 40.10/12.78 null_minus => 0 40.10/12.78 null_ify => 0 40.10/12.78 null_if => 0 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (8) 40.10/12.78 Obligation: 40.10/12.78 Complexity RNTS consisting of the following rules: 40.10/12.78 40.10/12.78 div(z, z') -{ 1 }-> ify(ge(y, 1 + 0), x, y) :|: x >= 0, y >= 0, z = x, z' = y 40.10/12.78 ge(z, z') -{ 1 }-> ge(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 40.10/12.78 ge(z, z') -{ 1 }-> 2 :|: x >= 0, z = x, z' = 0 40.10/12.78 ge(z, z') -{ 1 }-> 1 :|: z' = 1 + x, x >= 0, z = 0 40.10/12.78 ge(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 40.10/12.78 if(z, z', z'') -{ 1 }-> 0 :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 40.10/12.78 if(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 40.10/12.78 if(z, z', z'') -{ 1 }-> 1 + div(minus(x, y), y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 40.10/12.78 ify(z, z', z'') -{ 1 }-> if(ge(x, y), x, y) :|: z = 2, z' = x, z'' = y, x >= 0, y >= 0 40.10/12.78 ify(z, z', z'') -{ 1 }-> 1 :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 40.10/12.78 ify(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 40.10/12.78 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 40.10/12.78 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 40.10/12.78 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 40.10/12.78 40.10/12.78 Only complete derivations are relevant for the runtime complexity. 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (9) CompleteCoflocoProof (FINISHED) 40.10/12.78 Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: 40.10/12.78 40.10/12.78 eq(start(V1, V, V12),0,[ge(V1, V, Out)],[V1 >= 0,V >= 0]). 40.10/12.78 eq(start(V1, V, V12),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). 40.10/12.78 eq(start(V1, V, V12),0,[div(V1, V, Out)],[V1 >= 0,V >= 0]). 40.10/12.78 eq(start(V1, V, V12),0,[ify(V1, V, V12, Out)],[V1 >= 0,V >= 0,V12 >= 0]). 40.10/12.78 eq(start(V1, V, V12),0,[if(V1, V, V12, Out)],[V1 >= 0,V >= 0,V12 >= 0]). 40.10/12.78 eq(ge(V1, V, Out),1,[],[Out = 2,V2 >= 0,V1 = V2,V = 0]). 40.10/12.78 eq(ge(V1, V, Out),1,[],[Out = 1,V = 1 + V3,V3 >= 0,V1 = 0]). 40.10/12.78 eq(ge(V1, V, Out),1,[ge(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). 40.10/12.78 eq(minus(V1, V, Out),1,[],[Out = V6,V6 >= 0,V1 = V6,V = 0]). 40.10/12.78 eq(minus(V1, V, Out),1,[minus(V7, V8, Ret1)],[Out = Ret1,V = 1 + V8,V7 >= 0,V8 >= 0,V1 = 1 + V7]). 40.10/12.78 eq(div(V1, V, Out),1,[ge(V9, 1 + 0, Ret0),ify(Ret0, V10, V9, Ret2)],[Out = Ret2,V10 >= 0,V9 >= 0,V1 = V10,V = V9]). 40.10/12.78 eq(ify(V1, V, V12, Out),1,[],[Out = 1,V = V13,V12 = V11,V1 = 1,V13 >= 0,V11 >= 0]). 40.10/12.78 eq(ify(V1, V, V12, Out),1,[ge(V15, V14, Ret01),if(Ret01, V15, V14, Ret3)],[Out = Ret3,V1 = 2,V = V15,V12 = V14,V15 >= 0,V14 >= 0]). 40.10/12.78 eq(if(V1, V, V12, Out),1,[],[Out = 0,V = V17,V12 = V16,V1 = 1,V17 >= 0,V16 >= 0]). 40.10/12.78 eq(if(V1, V, V12, Out),1,[minus(V19, V18, Ret10),div(Ret10, V18, Ret11)],[Out = 1 + Ret11,V1 = 2,V = V19,V12 = V18,V19 >= 0,V18 >= 0]). 40.10/12.78 eq(ge(V1, V, Out),0,[],[Out = 0,V21 >= 0,V20 >= 0,V1 = V21,V = V20]). 40.10/12.78 eq(minus(V1, V, Out),0,[],[Out = 0,V23 >= 0,V22 >= 0,V1 = V23,V = V22]). 40.10/12.78 eq(ify(V1, V, V12, Out),0,[],[Out = 0,V25 >= 0,V12 = V26,V24 >= 0,V1 = V25,V = V24,V26 >= 0]). 40.10/12.78 eq(if(V1, V, V12, Out),0,[],[Out = 0,V27 >= 0,V12 = V28,V29 >= 0,V1 = V27,V = V29,V28 >= 0]). 40.10/12.78 input_output_vars(ge(V1,V,Out),[V1,V],[Out]). 40.10/12.78 input_output_vars(minus(V1,V,Out),[V1,V],[Out]). 40.10/12.78 input_output_vars(div(V1,V,Out),[V1,V],[Out]). 40.10/12.78 input_output_vars(ify(V1,V,V12,Out),[V1,V,V12],[Out]). 40.10/12.78 input_output_vars(if(V1,V,V12,Out),[V1,V,V12],[Out]). 40.10/12.78 40.10/12.78 40.10/12.78 CoFloCo proof output: 40.10/12.78 Preprocessing Cost Relations 40.10/12.78 ===================================== 40.10/12.78 40.10/12.78 #### Computed strongly connected components 40.10/12.78 0. recursive : [ge/3] 40.10/12.78 1. recursive : [minus/3] 40.10/12.78 2. recursive : [(div)/3,if/4,ify/4] 40.10/12.78 3. non_recursive : [start/3] 40.10/12.78 40.10/12.78 #### Obtained direct recursion through partial evaluation 40.10/12.78 0. SCC is partially evaluated into ge/3 40.10/12.78 1. SCC is partially evaluated into minus/3 40.10/12.78 2. SCC is partially evaluated into (div)/3 40.10/12.78 3. SCC is partially evaluated into start/3 40.10/12.78 40.10/12.78 Control-Flow Refinement of Cost Relations 40.10/12.78 ===================================== 40.10/12.78 40.10/12.78 ### Specialization of cost equations ge/3 40.10/12.78 * CE 13 is refined into CE [22] 40.10/12.78 * CE 10 is refined into CE [23] 40.10/12.78 * CE 11 is refined into CE [24] 40.10/12.78 * CE 12 is refined into CE [25] 40.10/12.78 40.10/12.78 40.10/12.78 ### Cost equations --> "Loop" of ge/3 40.10/12.78 * CEs [25] --> Loop 13 40.10/12.78 * CEs [22] --> Loop 14 40.10/12.78 * CEs [23] --> Loop 15 40.10/12.78 * CEs [24] --> Loop 16 40.10/12.78 40.10/12.78 ### Ranking functions of CR ge(V1,V,Out) 40.10/12.78 * RF of phase [13]: [V,V1] 40.10/12.78 40.10/12.78 #### Partial ranking functions of CR ge(V1,V,Out) 40.10/12.78 * Partial RF of phase [13]: 40.10/12.78 - RF of loop [13:1]: 40.10/12.78 V 40.10/12.78 V1 40.10/12.78 40.10/12.78 40.10/12.78 ### Specialization of cost equations minus/3 40.10/12.78 * CE 16 is refined into CE [26] 40.10/12.78 * CE 14 is refined into CE [27] 40.10/12.78 * CE 15 is refined into CE [28] 40.10/12.78 40.10/12.78 40.10/12.78 ### Cost equations --> "Loop" of minus/3 40.10/12.78 * CEs [28] --> Loop 17 40.10/12.78 * CEs [26] --> Loop 18 40.10/12.78 * CEs [27] --> Loop 19 40.10/12.78 40.10/12.78 ### Ranking functions of CR minus(V1,V,Out) 40.10/12.78 * RF of phase [17]: [V,V1] 40.10/12.78 40.10/12.78 #### Partial ranking functions of CR minus(V1,V,Out) 40.10/12.78 * Partial RF of phase [17]: 40.10/12.78 - RF of loop [17:1]: 40.10/12.78 V 40.10/12.78 V1 40.10/12.78 40.10/12.78 40.10/12.78 ### Specialization of cost equations (div)/3 40.10/12.78 * CE 18 is refined into CE [29] 40.10/12.78 * CE 17 is refined into CE [30,31,32] 40.10/12.78 * CE 19 is refined into CE [33,34] 40.10/12.78 * CE 21 is refined into CE [35,36,37,38] 40.10/12.78 * CE 20 is refined into CE [39,40] 40.10/12.78 40.10/12.78 40.10/12.78 ### Cost equations --> "Loop" of (div)/3 40.10/12.78 * CEs [40] --> Loop 20 40.10/12.78 * CEs [39] --> Loop 21 40.10/12.78 * CEs [29] --> Loop 22 40.10/12.78 * CEs [30] --> Loop 23 40.10/12.78 * CEs [31,32,33,34,35,36,37,38] --> Loop 24 40.10/12.78 40.10/12.78 ### Ranking functions of CR div(V1,V,Out) 40.10/12.78 * RF of phase [20]: [V1,V1-V+1] 40.10/12.78 40.10/12.78 #### Partial ranking functions of CR div(V1,V,Out) 40.10/12.78 * Partial RF of phase [20]: 40.10/12.78 - RF of loop [20:1]: 40.10/12.78 V1 40.10/12.78 V1-V+1 40.10/12.78 40.10/12.78 40.10/12.78 ### Specialization of cost equations start/3 40.10/12.78 * CE 3 is refined into CE [41,42] 40.10/12.78 * CE 4 is refined into CE [43,44,45,46,47,48,49] 40.10/12.78 * CE 5 is refined into CE [50,51,52,53,54] 40.10/12.78 * CE 6 is refined into CE [55,56,57,58,59,60] 40.10/12.78 * CE 1 is refined into CE [61] 40.10/12.78 * CE 2 is refined into CE [62] 40.10/12.78 * CE 7 is refined into CE [63,64,65,66,67] 40.10/12.78 * CE 8 is refined into CE [68,69,70] 40.10/12.78 * CE 9 is refined into CE [71,72,73] 40.10/12.78 40.10/12.78 40.10/12.78 ### Cost equations --> "Loop" of start/3 40.10/12.78 * CEs [64,68,72] --> Loop 25 40.10/12.78 * CEs [43,44,45,46,51,55,56,58] --> Loop 26 40.10/12.78 * CEs [41,42,47,48,49,50,52,53,54,57,59,60] --> Loop 27 40.10/12.78 * CEs [62] --> Loop 28 40.10/12.78 * CEs [61,63,65,66,67,69,70,71,73] --> Loop 29 40.10/12.78 40.10/12.78 ### Ranking functions of CR start(V1,V,V12) 40.10/12.78 40.10/12.78 #### Partial ranking functions of CR start(V1,V,V12) 40.10/12.78 40.10/12.78 40.10/12.78 Computing Bounds 40.10/12.78 ===================================== 40.10/12.78 40.10/12.78 #### Cost of chains of ge(V1,V,Out): 40.10/12.78 * Chain [[13],16]: 1*it(13)+1 40.10/12.78 Such that:it(13) =< V1 40.10/12.78 40.10/12.78 with precondition: [Out=1,V1>=1,V>=V1+1] 40.10/12.78 40.10/12.78 * Chain [[13],15]: 1*it(13)+1 40.10/12.78 Such that:it(13) =< V 40.10/12.78 40.10/12.78 with precondition: [Out=2,V>=1,V1>=V] 40.10/12.78 40.10/12.78 * Chain [[13],14]: 1*it(13)+0 40.10/12.78 Such that:it(13) =< V 40.10/12.78 40.10/12.78 with precondition: [Out=0,V1>=1,V>=1] 40.10/12.78 40.10/12.78 * Chain [16]: 1 40.10/12.78 with precondition: [V1=0,Out=1,V>=1] 40.10/12.78 40.10/12.78 * Chain [15]: 1 40.10/12.78 with precondition: [V=0,Out=2,V1>=0] 40.10/12.78 40.10/12.78 * Chain [14]: 0 40.10/12.78 with precondition: [Out=0,V1>=0,V>=0] 40.10/12.78 40.10/12.78 40.10/12.78 #### Cost of chains of minus(V1,V,Out): 40.10/12.78 * Chain [[17],19]: 1*it(17)+1 40.10/12.78 Such that:it(17) =< V 40.10/12.78 40.10/12.78 with precondition: [V1=Out+V,V>=1,V1>=V] 40.10/12.78 40.10/12.78 * Chain [[17],18]: 1*it(17)+0 40.10/12.78 Such that:it(17) =< V 40.10/12.78 40.10/12.78 with precondition: [Out=0,V1>=1,V>=1] 40.10/12.78 40.10/12.78 * Chain [19]: 1 40.10/12.78 with precondition: [V=0,V1=Out,V1>=0] 40.10/12.78 40.10/12.78 * Chain [18]: 0 40.10/12.78 with precondition: [Out=0,V1>=0,V>=0] 40.10/12.78 40.10/12.78 40.10/12.78 #### Cost of chains of div(V1,V,Out): 40.10/12.78 * Chain [[20],24]: 6*it(20)+8*s(3)+4*s(7)+2*s(10)+1*s(21)+5 40.10/12.78 Such that:aux(1) =< 1 40.10/12.78 aux(7) =< V1-V+1 40.10/12.78 aux(3) =< V 40.10/12.78 aux(10) =< V1 40.10/12.78 s(3) =< aux(1) 40.10/12.78 s(7) =< aux(10) 40.10/12.78 s(10) =< aux(3) 40.10/12.78 aux(5) =< aux(10) 40.10/12.78 it(20) =< aux(10) 40.10/12.78 aux(5) =< aux(7) 40.10/12.78 it(20) =< aux(7) 40.10/12.78 s(21) =< aux(5) 40.10/12.78 40.10/12.78 with precondition: [V>=1,Out>=1,V1+1>=Out+V] 40.10/12.78 40.10/12.78 * Chain [[20],21,24]: 6*it(20)+9*s(3)+4*s(10)+1*s(21)+2*s(22)+10 40.10/12.78 Such that:aux(12) =< 1 40.10/12.78 aux(6) =< V1 40.10/12.78 aux(7) =< V1-V+1 40.10/12.78 aux(13) =< V 40.10/12.78 aux(14) =< V1-V 40.10/12.78 s(3) =< aux(12) 40.10/12.78 s(10) =< aux(13) 40.10/12.78 aux(5) =< aux(6) 40.10/12.78 it(20) =< aux(6) 40.10/12.78 s(23) =< aux(6) 40.10/12.78 aux(5) =< aux(7) 40.10/12.78 it(20) =< aux(7) 40.10/12.78 aux(5) =< aux(14) 40.10/12.78 it(20) =< aux(14) 40.10/12.78 s(23) =< aux(14) 40.10/12.78 s(21) =< aux(5) 40.10/12.78 s(22) =< s(23) 40.10/12.78 40.10/12.78 with precondition: [V>=1,Out>=2,V1+2>=2*V+Out] 40.10/12.78 40.10/12.78 * Chain [24]: 8*s(3)+2*s(7)+2*s(10)+5 40.10/12.78 Such that:aux(1) =< 1 40.10/12.78 aux(2) =< V1 40.10/12.78 aux(3) =< V 40.10/12.78 s(3) =< aux(1) 40.10/12.78 s(7) =< aux(2) 40.10/12.78 s(10) =< aux(3) 40.10/12.78 40.10/12.78 with precondition: [Out=0,V1>=0,V>=0] 40.10/12.78 40.10/12.78 * Chain [23]: 2 40.10/12.78 with precondition: [V=0,Out=0,V1>=0] 40.10/12.78 40.10/12.78 * Chain [22]: 3 40.10/12.78 with precondition: [V=0,Out=1,V1>=0] 40.10/12.78 40.10/12.78 * Chain [21,24]: 9*s(3)+4*s(10)+10 40.10/12.78 Such that:aux(12) =< 1 40.10/12.78 aux(13) =< V 40.10/12.78 s(3) =< aux(12) 40.10/12.78 s(10) =< aux(13) 40.10/12.78 40.10/12.78 with precondition: [Out=1,V>=1,V1>=V] 40.10/12.78 40.10/12.78 40.10/12.78 #### Cost of chains of start(V1,V,V12): 40.10/12.78 * Chain [29]: 16*s(59)+7*s(60)+34*s(67)+6*s(78)+1*s(80)+2*s(81)+6*s(84)+1*s(85)+10 40.10/12.78 Such that:s(70) =< V1-V 40.10/12.78 s(73) =< V1-V+1 40.10/12.78 aux(19) =< 1 40.10/12.78 aux(20) =< V1 40.10/12.78 aux(21) =< V 40.10/12.78 s(60) =< aux(20) 40.10/12.78 s(59) =< aux(21) 40.10/12.78 s(67) =< aux(19) 40.10/12.78 s(77) =< aux(20) 40.10/12.78 s(78) =< aux(20) 40.10/12.78 s(79) =< aux(20) 40.10/12.78 s(77) =< s(73) 40.10/12.78 s(78) =< s(73) 40.10/12.78 s(77) =< s(70) 40.10/12.78 s(78) =< s(70) 40.10/12.78 s(79) =< s(70) 40.10/12.78 s(80) =< s(77) 40.10/12.78 s(81) =< s(79) 40.10/12.78 s(83) =< aux(20) 40.10/12.78 s(84) =< aux(20) 40.10/12.78 s(83) =< s(73) 40.10/12.78 s(84) =< s(73) 40.10/12.78 s(85) =< s(83) 40.10/12.78 40.10/12.78 with precondition: [V1>=0,V>=0] 40.10/12.78 40.10/12.78 * Chain [28]: 1 40.10/12.78 with precondition: [V1=1,V>=0,V12>=0] 40.10/12.78 40.10/12.78 * Chain [27]: 2*s(86)+39*s(87)+84*s(92)+12*s(101)+12*s(113)+2*s(115)+4*s(116)+12*s(119)+2*s(120)+14 40.10/12.78 Such that:aux(28) =< 1 40.10/12.78 aux(29) =< V 40.10/12.78 aux(30) =< V-2*V12 40.10/12.78 aux(31) =< V-2*V12+1 40.10/12.78 aux(32) =< V-V12 40.10/12.78 aux(33) =< V12 40.10/12.78 s(86) =< aux(29) 40.10/12.78 s(87) =< aux(33) 40.10/12.78 s(92) =< aux(28) 40.10/12.78 s(101) =< aux(32) 40.10/12.78 s(112) =< aux(32) 40.10/12.78 s(113) =< aux(32) 40.10/12.78 s(114) =< aux(32) 40.10/12.78 s(112) =< aux(31) 40.10/12.78 s(113) =< aux(31) 40.10/12.78 s(112) =< aux(30) 40.10/12.78 s(113) =< aux(30) 40.10/12.78 s(114) =< aux(30) 40.10/12.78 s(115) =< s(112) 40.10/12.78 s(116) =< s(114) 40.10/12.78 s(118) =< aux(32) 40.10/12.78 s(119) =< aux(32) 40.10/12.78 s(118) =< aux(31) 40.10/12.78 s(119) =< aux(31) 40.10/12.78 s(120) =< s(118) 40.10/12.78 40.10/12.78 with precondition: [V1=2,V>=0,V12>=0] 40.10/12.78 40.10/12.78 * Chain [26]: 24*s(158)+4*s(159)+9 40.10/12.78 Such that:aux(35) =< 1 40.10/12.78 aux(36) =< V 40.10/12.78 s(158) =< aux(35) 40.10/12.78 s(159) =< aux(36) 40.10/12.78 40.10/12.78 with precondition: [V1=2,V12=0,V>=0] 40.10/12.78 40.10/12.78 * Chain [25]: 3 40.10/12.78 with precondition: [V=0,V1>=0] 40.10/12.78 40.10/12.78 40.10/12.78 Closed-form bounds of start(V1,V,V12): 40.10/12.78 ------------------------------------- 40.10/12.78 * Chain [29] with precondition: [V1>=0,V>=0] 40.10/12.78 - Upper bound: 23*V1+16*V+44 40.10/12.78 - Complexity: n 40.10/12.78 * Chain [28] with precondition: [V1=1,V>=0,V12>=0] 40.10/12.78 - Upper bound: 1 40.10/12.78 - Complexity: constant 40.10/12.78 * Chain [27] with precondition: [V1=2,V>=0,V12>=0] 40.10/12.78 - Upper bound: 2*V+39*V12+98+nat(V-V12)*44 40.10/12.78 - Complexity: n 40.10/12.78 * Chain [26] with precondition: [V1=2,V12=0,V>=0] 40.10/12.78 - Upper bound: 4*V+33 40.10/12.78 - Complexity: n 40.10/12.78 * Chain [25] with precondition: [V=0,V1>=0] 40.10/12.78 - Upper bound: 3 40.10/12.78 - Complexity: constant 40.10/12.78 40.10/12.78 ### Maximum cost of start(V1,V,V12): 2*V+30+max([23*V1+14*V+11,nat(V12)*39+65+nat(V-V12)*44])+3 40.10/12.78 Asymptotic class: n 40.10/12.78 * Total analysis performed in 427 ms. 40.10/12.78 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (10) 40.10/12.78 BOUNDS(1, n^1) 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (11) RenamingProof (BOTH BOUNDS(ID, ID)) 40.10/12.78 Renamed function symbols to avoid clashes with predefined symbol. 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (12) 40.10/12.78 Obligation: 40.10/12.78 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 40.10/12.78 40.10/12.78 40.10/12.78 The TRS R consists of the following rules: 40.10/12.78 40.10/12.78 ge(x, 0') -> true 40.10/12.78 ge(0', s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0') -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0')), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0' 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 S is empty. 40.10/12.78 Rewrite Strategy: INNERMOST 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 40.10/12.78 Infered types. 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (14) 40.10/12.78 Obligation: 40.10/12.78 Innermost TRS: 40.10/12.78 Rules: 40.10/12.78 ge(x, 0') -> true 40.10/12.78 ge(0', s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0') -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0')), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0' 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 Types: 40.10/12.78 ge :: 0':s:divByZeroError -> 0':s:divByZeroError -> true:false 40.10/12.78 0' :: 0':s:divByZeroError 40.10/12.78 true :: true:false 40.10/12.78 s :: 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 false :: true:false 40.10/12.78 minus :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 div :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 ify :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 divByZeroError :: 0':s:divByZeroError 40.10/12.78 if :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 hole_true:false1_0 :: true:false 40.10/12.78 hole_0':s:divByZeroError2_0 :: 0':s:divByZeroError 40.10/12.78 gen_0':s:divByZeroError3_0 :: Nat -> 0':s:divByZeroError 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (15) OrderProof (LOWER BOUND(ID)) 40.10/12.78 Heuristically decided to analyse the following defined symbols: 40.10/12.78 ge, minus, div 40.10/12.78 40.10/12.78 They will be analysed ascendingly in the following order: 40.10/12.78 ge < div 40.10/12.78 minus < div 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (16) 40.10/12.78 Obligation: 40.10/12.78 Innermost TRS: 40.10/12.78 Rules: 40.10/12.78 ge(x, 0') -> true 40.10/12.78 ge(0', s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0') -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0')), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0' 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 Types: 40.10/12.78 ge :: 0':s:divByZeroError -> 0':s:divByZeroError -> true:false 40.10/12.78 0' :: 0':s:divByZeroError 40.10/12.78 true :: true:false 40.10/12.78 s :: 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 false :: true:false 40.10/12.78 minus :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 div :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 ify :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 divByZeroError :: 0':s:divByZeroError 40.10/12.78 if :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 hole_true:false1_0 :: true:false 40.10/12.78 hole_0':s:divByZeroError2_0 :: 0':s:divByZeroError 40.10/12.78 gen_0':s:divByZeroError3_0 :: Nat -> 0':s:divByZeroError 40.10/12.78 40.10/12.78 40.10/12.78 Generator Equations: 40.10/12.78 gen_0':s:divByZeroError3_0(0) <=> 0' 40.10/12.78 gen_0':s:divByZeroError3_0(+(x, 1)) <=> s(gen_0':s:divByZeroError3_0(x)) 40.10/12.78 40.10/12.78 40.10/12.78 The following defined symbols remain to be analysed: 40.10/12.78 ge, minus, div 40.10/12.78 40.10/12.78 They will be analysed ascendingly in the following order: 40.10/12.78 ge < div 40.10/12.78 minus < div 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (17) RewriteLemmaProof (LOWER BOUND(ID)) 40.10/12.78 Proved the following rewrite lemma: 40.10/12.78 ge(gen_0':s:divByZeroError3_0(n5_0), gen_0':s:divByZeroError3_0(n5_0)) -> true, rt in Omega(1 + n5_0) 40.10/12.78 40.10/12.78 Induction Base: 40.10/12.78 ge(gen_0':s:divByZeroError3_0(0), gen_0':s:divByZeroError3_0(0)) ->_R^Omega(1) 40.10/12.78 true 40.10/12.78 40.10/12.78 Induction Step: 40.10/12.78 ge(gen_0':s:divByZeroError3_0(+(n5_0, 1)), gen_0':s:divByZeroError3_0(+(n5_0, 1))) ->_R^Omega(1) 40.10/12.78 ge(gen_0':s:divByZeroError3_0(n5_0), gen_0':s:divByZeroError3_0(n5_0)) ->_IH 40.10/12.78 true 40.10/12.78 40.10/12.78 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (18) 40.10/12.78 Complex Obligation (BEST) 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (19) 40.10/12.78 Obligation: 40.10/12.78 Proved the lower bound n^1 for the following obligation: 40.10/12.78 40.10/12.78 Innermost TRS: 40.10/12.78 Rules: 40.10/12.78 ge(x, 0') -> true 40.10/12.78 ge(0', s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0') -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0')), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0' 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 Types: 40.10/12.78 ge :: 0':s:divByZeroError -> 0':s:divByZeroError -> true:false 40.10/12.78 0' :: 0':s:divByZeroError 40.10/12.78 true :: true:false 40.10/12.78 s :: 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 false :: true:false 40.10/12.78 minus :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 div :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 ify :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 divByZeroError :: 0':s:divByZeroError 40.10/12.78 if :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 hole_true:false1_0 :: true:false 40.10/12.78 hole_0':s:divByZeroError2_0 :: 0':s:divByZeroError 40.10/12.78 gen_0':s:divByZeroError3_0 :: Nat -> 0':s:divByZeroError 40.10/12.78 40.10/12.78 40.10/12.78 Generator Equations: 40.10/12.78 gen_0':s:divByZeroError3_0(0) <=> 0' 40.10/12.78 gen_0':s:divByZeroError3_0(+(x, 1)) <=> s(gen_0':s:divByZeroError3_0(x)) 40.10/12.78 40.10/12.78 40.10/12.78 The following defined symbols remain to be analysed: 40.10/12.78 ge, minus, div 40.10/12.78 40.10/12.78 They will be analysed ascendingly in the following order: 40.10/12.78 ge < div 40.10/12.78 minus < div 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (20) LowerBoundPropagationProof (FINISHED) 40.10/12.78 Propagated lower bound. 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (21) 40.10/12.78 BOUNDS(n^1, INF) 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (22) 40.10/12.78 Obligation: 40.10/12.78 Innermost TRS: 40.10/12.78 Rules: 40.10/12.78 ge(x, 0') -> true 40.10/12.78 ge(0', s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0') -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0')), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0' 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 Types: 40.10/12.78 ge :: 0':s:divByZeroError -> 0':s:divByZeroError -> true:false 40.10/12.78 0' :: 0':s:divByZeroError 40.10/12.78 true :: true:false 40.10/12.78 s :: 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 false :: true:false 40.10/12.78 minus :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 div :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 ify :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 divByZeroError :: 0':s:divByZeroError 40.10/12.78 if :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 hole_true:false1_0 :: true:false 40.10/12.78 hole_0':s:divByZeroError2_0 :: 0':s:divByZeroError 40.10/12.78 gen_0':s:divByZeroError3_0 :: Nat -> 0':s:divByZeroError 40.10/12.78 40.10/12.78 40.10/12.78 Lemmas: 40.10/12.78 ge(gen_0':s:divByZeroError3_0(n5_0), gen_0':s:divByZeroError3_0(n5_0)) -> true, rt in Omega(1 + n5_0) 40.10/12.78 40.10/12.78 40.10/12.78 Generator Equations: 40.10/12.78 gen_0':s:divByZeroError3_0(0) <=> 0' 40.10/12.78 gen_0':s:divByZeroError3_0(+(x, 1)) <=> s(gen_0':s:divByZeroError3_0(x)) 40.10/12.78 40.10/12.78 40.10/12.78 The following defined symbols remain to be analysed: 40.10/12.78 minus, div 40.10/12.78 40.10/12.78 They will be analysed ascendingly in the following order: 40.10/12.78 minus < div 40.10/12.78 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (23) RewriteLemmaProof (LOWER BOUND(ID)) 40.10/12.78 Proved the following rewrite lemma: 40.10/12.78 minus(gen_0':s:divByZeroError3_0(n293_0), gen_0':s:divByZeroError3_0(n293_0)) -> gen_0':s:divByZeroError3_0(0), rt in Omega(1 + n293_0) 40.10/12.78 40.10/12.78 Induction Base: 40.10/12.78 minus(gen_0':s:divByZeroError3_0(0), gen_0':s:divByZeroError3_0(0)) ->_R^Omega(1) 40.10/12.78 gen_0':s:divByZeroError3_0(0) 40.10/12.78 40.10/12.78 Induction Step: 40.10/12.78 minus(gen_0':s:divByZeroError3_0(+(n293_0, 1)), gen_0':s:divByZeroError3_0(+(n293_0, 1))) ->_R^Omega(1) 40.10/12.78 minus(gen_0':s:divByZeroError3_0(n293_0), gen_0':s:divByZeroError3_0(n293_0)) ->_IH 40.10/12.78 gen_0':s:divByZeroError3_0(0) 40.10/12.78 40.10/12.78 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 40.10/12.78 ---------------------------------------- 40.10/12.78 40.10/12.78 (24) 40.10/12.78 Obligation: 40.10/12.78 Innermost TRS: 40.10/12.78 Rules: 40.10/12.78 ge(x, 0') -> true 40.10/12.78 ge(0', s(x)) -> false 40.10/12.78 ge(s(x), s(y)) -> ge(x, y) 40.10/12.78 minus(x, 0') -> x 40.10/12.78 minus(s(x), s(y)) -> minus(x, y) 40.10/12.78 div(x, y) -> ify(ge(y, s(0')), x, y) 40.10/12.78 ify(false, x, y) -> divByZeroError 40.10/12.78 ify(true, x, y) -> if(ge(x, y), x, y) 40.10/12.78 if(false, x, y) -> 0' 40.10/12.78 if(true, x, y) -> s(div(minus(x, y), y)) 40.10/12.78 40.10/12.78 Types: 40.10/12.78 ge :: 0':s:divByZeroError -> 0':s:divByZeroError -> true:false 40.10/12.78 0' :: 0':s:divByZeroError 40.10/12.78 true :: true:false 40.10/12.78 s :: 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 false :: true:false 40.10/12.78 minus :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 div :: 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 ify :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 divByZeroError :: 0':s:divByZeroError 40.10/12.78 if :: true:false -> 0':s:divByZeroError -> 0':s:divByZeroError -> 0':s:divByZeroError 40.10/12.78 hole_true:false1_0 :: true:false 40.10/12.78 hole_0':s:divByZeroError2_0 :: 0':s:divByZeroError 40.10/12.78 gen_0':s:divByZeroError3_0 :: Nat -> 0':s:divByZeroError 40.10/12.78 40.10/12.78 40.10/12.78 Lemmas: 40.10/12.78 ge(gen_0':s:divByZeroError3_0(n5_0), gen_0':s:divByZeroError3_0(n5_0)) -> true, rt in Omega(1 + n5_0) 40.10/12.78 minus(gen_0':s:divByZeroError3_0(n293_0), gen_0':s:divByZeroError3_0(n293_0)) -> gen_0':s:divByZeroError3_0(0), rt in Omega(1 + n293_0) 40.10/12.78 40.10/12.78 40.10/12.78 Generator Equations: 40.10/12.78 gen_0':s:divByZeroError3_0(0) <=> 0' 40.10/12.78 gen_0':s:divByZeroError3_0(+(x, 1)) <=> s(gen_0':s:divByZeroError3_0(x)) 40.10/12.78 40.10/12.78 40.10/12.78 The following defined symbols remain to be analysed: 40.10/12.78 div 40.41/12.81 EOF