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