/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (10) CpxRNTS (11) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxRNTS (13) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRNTS (15) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) IntTrsBoundProof [UPPER BOUND(ID), 366 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 130 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 312 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 115 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 204 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 84 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 1818 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 1455 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 157 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 2 ms] (44) CpxRNTS (45) FinalProof [FINISHED, 0 ms] (46) BOUNDS(1, n^2) (47) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CpxTRS (49) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (50) typed CpxTrs (51) OrderProof [LOWER BOUND(ID), 0 ms] (52) typed CpxTrs (53) RewriteLemmaProof [LOWER BOUND(ID), 295 ms] (54) BEST (55) proven lower bound (56) LowerBoundPropagationProof [FINISHED, 0 ms] (57) BOUNDS(n^1, INF) (58) typed CpxTrs (59) RewriteLemmaProof [LOWER BOUND(ID), 67 ms] (60) typed CpxTrs (61) RewriteLemmaProof [LOWER BOUND(ID), 33 ms] (62) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: division(x, y) -> div(x, y, 0) div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0) -> false lt(0, s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0) -> s(0) inc(s(x)) -> s(inc(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: division(x, y) -> div(x, y, 0) [1] div(x, y, z) -> if(lt(x, y), x, y, inc(z)) [1] if(true, x, y, z) -> z [1] if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] lt(x, 0) -> false [1] lt(0, s(y)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [1] inc(0) -> s(0) [1] inc(s(x)) -> s(inc(x)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: division(x, y) -> div(x, y, 0) [1] div(x, y, z) -> if(lt(x, y), x, y, inc(z)) [1] if(true, x, y, z) -> z [1] if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] lt(x, 0) -> false [1] lt(0, s(y)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [1] inc(0) -> s(0) [1] inc(s(x)) -> s(inc(x)) [1] The TRS has the following type information: division :: 0:s -> 0:s -> 0:s div :: 0:s -> 0:s -> 0:s -> 0:s 0 :: 0:s if :: true:false -> 0:s -> 0:s -> 0:s -> 0:s lt :: 0:s -> 0:s -> true:false inc :: 0:s -> 0:s true :: true:false false :: true:false s :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The transformation into a RNTS is sound, since: (a) The obligation is a constructor system where every type has a constant constructor, (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: division_2 div_3 if_4 (c) The following functions are completely defined: minus_2 lt_2 inc_1 Due to the following rules being added: minus(v0, v1) -> 0 [0] And the following fresh constants: none ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: division(x, y) -> div(x, y, 0) [1] div(x, y, z) -> if(lt(x, y), x, y, inc(z)) [1] if(true, x, y, z) -> z [1] if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] lt(x, 0) -> false [1] lt(0, s(y)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [1] inc(0) -> s(0) [1] inc(s(x)) -> s(inc(x)) [1] minus(v0, v1) -> 0 [0] The TRS has the following type information: division :: 0:s -> 0:s -> 0:s div :: 0:s -> 0:s -> 0:s -> 0:s 0 :: 0:s if :: true:false -> 0:s -> 0:s -> 0:s -> 0:s lt :: 0:s -> 0:s -> true:false inc :: 0:s -> 0:s true :: true:false false :: true:false s :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (7) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: division(x, y) -> div(x, y, 0) [1] div(x, 0, 0) -> if(false, x, 0, s(0)) [3] div(x, 0, s(x'')) -> if(false, x, 0, s(inc(x''))) [3] div(0, s(y'), 0) -> if(true, 0, s(y'), s(0)) [3] div(0, s(y'), s(x1)) -> if(true, 0, s(y'), s(inc(x1))) [3] div(s(x'), s(y''), 0) -> if(lt(x', y''), s(x'), s(y''), s(0)) [3] div(s(x'), s(y''), s(x2)) -> if(lt(x', y''), s(x'), s(y''), s(inc(x2))) [3] if(true, x, y, z) -> z [1] if(false, s(x3), s(y), z) -> div(minus(x3, y), s(y), z) [2] if(false, x, s(y), z) -> div(0, s(y), z) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] lt(x, 0) -> false [1] lt(0, s(y)) -> true [1] lt(s(x), s(y)) -> lt(x, y) [1] inc(0) -> s(0) [1] inc(s(x)) -> s(inc(x)) [1] minus(v0, v1) -> 0 [0] The TRS has the following type information: division :: 0:s -> 0:s -> 0:s div :: 0:s -> 0:s -> 0:s -> 0:s 0 :: 0:s if :: true:false -> 0:s -> 0:s -> 0:s -> 0:s lt :: 0:s -> 0:s -> true:false inc :: 0:s -> 0:s true :: true:false false :: true:false s :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 true => 1 false => 0 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 3 }-> if(lt(x', y''), 1 + x', 1 + y'', 1 + inc(x2)) :|: z' = 1 + x', x' >= 0, y'' >= 0, x2 >= 0, z'' = 1 + y'', z1 = 1 + x2 div(z', z'', z1) -{ 3 }-> if(lt(x', y''), 1 + x', 1 + y'', 1 + 0) :|: z1 = 0, z' = 1 + x', x' >= 0, y'' >= 0, z'' = 1 + y'' div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + y', 1 + inc(x1)) :|: x1 >= 0, y' >= 0, z1 = 1 + x1, z' = 0, z'' = 1 + y' div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + y', 1 + 0) :|: z1 = 0, y' >= 0, z' = 0, z'' = 1 + y' div(z', z'', z1) -{ 3 }-> if(0, x, 0, 1 + inc(x'')) :|: z'' = 0, z' = x, z1 = 1 + x'', x >= 0, x'' >= 0 div(z', z'', z1) -{ 3 }-> if(0, x, 0, 1 + 0) :|: z'' = 0, z1 = 0, z' = x, x >= 0 division(z', z'') -{ 1 }-> div(x, y, 0) :|: z' = x, z'' = y, x >= 0, y >= 0 if(z', z'', z1, z2) -{ 1 }-> z :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(x3, y), 1 + y, z) :|: z >= 0, z'' = 1 + x3, z2 = z, y >= 0, z1 = 1 + y, x3 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + y, z) :|: z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z1 = 1 + y, z' = 0 inc(z') -{ 1 }-> 1 + inc(x) :|: z' = 1 + x, x >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 1 }-> lt(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y lt(z', z'') -{ 1 }-> 1 :|: y >= 0, z'' = 1 + y, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' = x, x >= 0 minus(z', z'') -{ 1 }-> x :|: z'' = 0, z' = x, x >= 0 minus(z', z'') -{ 1 }-> minus(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y minus(z', z'') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0 ---------------------------------------- (11) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 1 }-> lt(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 ---------------------------------------- (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { lt } { minus } { inc } { div, if } { division } ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 1 }-> lt(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {lt}, {minus}, {inc}, {div,if}, {division} ---------------------------------------- (15) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 1 }-> lt(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {lt}, {minus}, {inc}, {div,if}, {division} ---------------------------------------- (17) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 1 }-> lt(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {lt}, {minus}, {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: ?, size: O(1) [1] ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: lt after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z'' ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(lt(z' - 1, z'' - 1), 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 1 }-> lt(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {minus}, {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {minus}, {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: minus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {minus}, {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: minus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z'' ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> div(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 }-> minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 + z1 }-> div(s1, 1 + (z1 - 1), z2) :|: s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 + z1 }-> div(s1, 1 + (z1 - 1), z2) :|: s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {inc}, {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: ?, size: O(n^1) [1 + z'] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + inc(z1 - 1)) :|: z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + inc(z1 - 1)) :|: z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 + z1 }-> div(s1, 1 + (z1 - 1), z2) :|: s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 }-> 1 + inc(z' - 1) :|: z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] ---------------------------------------- (33) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' + z1 }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + s5) :|: s5 >= 0, s5 <= z1 - 1 + 1, s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 + z1 }-> if(1, 0, 1 + (z'' - 1), 1 + s4) :|: s4 >= 0, s4 <= z1 - 1 + 1, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 + z1 }-> if(0, z', 0, 1 + s3) :|: s3 >= 0, s3 <= z1 - 1 + 1, z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 + z1 }-> div(s1, 1 + (z1 - 1), z2) :|: s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 + z' }-> 1 + s6 :|: s6 >= 0, s6 <= z' - 1 + 1, z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: div after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z' + z1 Computed SIZE bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z'' + z2 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' + z1 }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + s5) :|: s5 >= 0, s5 <= z1 - 1 + 1, s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 + z1 }-> if(1, 0, 1 + (z'' - 1), 1 + s4) :|: s4 >= 0, s4 <= z1 - 1 + 1, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 + z1 }-> if(0, z', 0, 1 + s3) :|: s3 >= 0, s3 <= z1 - 1 + 1, z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 + z1 }-> div(s1, 1 + (z1 - 1), z2) :|: s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 + z' }-> 1 + s6 :|: s6 >= 0, s6 <= z' - 1 + 1, z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {div,if}, {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] div: runtime: ?, size: O(n^1) [2 + z' + z1] if: runtime: ?, size: O(n^1) [2 + z'' + z2] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: div after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 24 + 9*z' + 2*z'*z'' + z'*z1 + z'^2 + 7*z'' + 3*z1 Computed RUNTIME bound using KoAT for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 44 + 7*z'' + 2*z''*z1 + z''*z2 + z''^2 + 13*z1 + 5*z2 ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 4 + z'' }-> if(s, 1 + (z' - 1), 1 + (z'' - 1), 1 + 0) :|: s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 4 + z'' + z1 }-> if(s', 1 + (z' - 1), 1 + (z'' - 1), 1 + s5) :|: s5 >= 0, s5 <= z1 - 1 + 1, s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 + z1 }-> if(1, 0, 1 + (z'' - 1), 1 + s4) :|: s4 >= 0, s4 <= z1 - 1 + 1, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 }-> if(1, 0, 1 + (z'' - 1), 1 + 0) :|: z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 3 + z1 }-> if(0, z', 0, 1 + s3) :|: s3 >= 0, s3 <= z1 - 1 + 1, z'' = 0, z' >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 3 }-> if(0, z', 0, 1 + 0) :|: z'' = 0, z1 = 0, z' >= 0 division(z', z'') -{ 1 }-> div(z', z'', 0) :|: z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 + z1 }-> div(s1, 1 + (z1 - 1), z2) :|: s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> div(0, 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 inc(z') -{ 1 + z' }-> 1 + s6 :|: s6 >= 0, s6 <= z' - 1 + 1, z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] div: runtime: O(n^2) [24 + 9*z' + 2*z'*z'' + z'*z1 + z'^2 + 7*z'' + 3*z1], size: O(n^1) [2 + z' + z1] if: runtime: O(n^2) [44 + 7*z'' + 2*z''*z1 + z''*z2 + z''^2 + 13*z1 + 5*z2], size: O(n^1) [2 + z'' + z2] ---------------------------------------- (39) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 52 + 13*z'' }-> s10 :|: s10 >= 0, s10 <= 0 + (1 + 0) + 2, z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 52 + 5*s4 + 13*z'' + z1 }-> s11 :|: s11 >= 0, s11 <= 0 + (1 + s4) + 2, s4 >= 0, s4 <= z1 - 1 + 1, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 53 + 8*z' + 2*z'*z'' + z'^2 + 14*z'' }-> s12 :|: s12 >= 0, s12 <= 1 + (z' - 1) + (1 + 0) + 2, s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 53 + 5*s5 + s5*z' + 8*z' + 2*z'*z'' + z'^2 + 14*z'' + z1 }-> s13 :|: s13 >= 0, s13 <= 1 + (z' - 1) + (1 + s5) + 2, s5 >= 0, s5 <= z1 - 1 + 1, s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 52 + 8*z' + z'^2 }-> s8 :|: s8 >= 0, s8 <= z' + (1 + 0) + 2, z'' = 0, z1 = 0, z' >= 0 div(z', z'', z1) -{ 52 + 5*s3 + s3*z' + 8*z' + z'^2 + z1 }-> s9 :|: s9 >= 0, s9 <= z' + (1 + s3) + 2, s3 >= 0, s3 <= z1 - 1 + 1, z'' = 0, z' >= 0, z1 - 1 >= 0 division(z', z'') -{ 25 + 9*z' + 2*z'*z'' + z'^2 + 7*z'' }-> s7 :|: s7 >= 0, s7 <= z' + 0 + 2, z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 26 + 9*s1 + 2*s1*z1 + s1*z2 + s1^2 + 8*z1 + 3*z2 }-> s14 :|: s14 >= 0, s14 <= s1 + z2 + 2, s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 25 + 7*z1 + 3*z2 }-> s15 :|: s15 >= 0, s15 <= 0 + z2 + 2, z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 inc(z') -{ 1 + z' }-> 1 + s6 :|: s6 >= 0, s6 <= z' - 1 + 1, z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] div: runtime: O(n^2) [24 + 9*z' + 2*z'*z'' + z'*z1 + z'^2 + 7*z'' + 3*z1], size: O(n^1) [2 + z' + z1] if: runtime: O(n^2) [44 + 7*z'' + 2*z''*z1 + z''*z2 + z''^2 + 13*z1 + 5*z2], size: O(n^1) [2 + z'' + z2] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: division after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z' ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 52 + 13*z'' }-> s10 :|: s10 >= 0, s10 <= 0 + (1 + 0) + 2, z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 52 + 5*s4 + 13*z'' + z1 }-> s11 :|: s11 >= 0, s11 <= 0 + (1 + s4) + 2, s4 >= 0, s4 <= z1 - 1 + 1, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 53 + 8*z' + 2*z'*z'' + z'^2 + 14*z'' }-> s12 :|: s12 >= 0, s12 <= 1 + (z' - 1) + (1 + 0) + 2, s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 53 + 5*s5 + s5*z' + 8*z' + 2*z'*z'' + z'^2 + 14*z'' + z1 }-> s13 :|: s13 >= 0, s13 <= 1 + (z' - 1) + (1 + s5) + 2, s5 >= 0, s5 <= z1 - 1 + 1, s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 52 + 8*z' + z'^2 }-> s8 :|: s8 >= 0, s8 <= z' + (1 + 0) + 2, z'' = 0, z1 = 0, z' >= 0 div(z', z'', z1) -{ 52 + 5*s3 + s3*z' + 8*z' + z'^2 + z1 }-> s9 :|: s9 >= 0, s9 <= z' + (1 + s3) + 2, s3 >= 0, s3 <= z1 - 1 + 1, z'' = 0, z' >= 0, z1 - 1 >= 0 division(z', z'') -{ 25 + 9*z' + 2*z'*z'' + z'^2 + 7*z'' }-> s7 :|: s7 >= 0, s7 <= z' + 0 + 2, z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 26 + 9*s1 + 2*s1*z1 + s1*z2 + s1^2 + 8*z1 + 3*z2 }-> s14 :|: s14 >= 0, s14 <= s1 + z2 + 2, s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 25 + 7*z1 + 3*z2 }-> s15 :|: s15 >= 0, s15 <= 0 + z2 + 2, z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 inc(z') -{ 1 + z' }-> 1 + s6 :|: s6 >= 0, s6 <= z' - 1 + 1, z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: {division} Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] div: runtime: O(n^2) [24 + 9*z' + 2*z'*z'' + z'*z1 + z'^2 + 7*z'' + 3*z1], size: O(n^1) [2 + z' + z1] if: runtime: O(n^2) [44 + 7*z'' + 2*z''*z1 + z''*z2 + z''^2 + 13*z1 + 5*z2], size: O(n^1) [2 + z'' + z2] division: runtime: ?, size: O(n^1) [2 + z'] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: division after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 25 + 9*z' + 2*z'*z'' + z'^2 + 7*z'' ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: div(z', z'', z1) -{ 52 + 13*z'' }-> s10 :|: s10 >= 0, s10 <= 0 + (1 + 0) + 2, z1 = 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 52 + 5*s4 + 13*z'' + z1 }-> s11 :|: s11 >= 0, s11 <= 0 + (1 + s4) + 2, s4 >= 0, s4 <= z1 - 1 + 1, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 div(z', z'', z1) -{ 53 + 8*z' + 2*z'*z'' + z'^2 + 14*z'' }-> s12 :|: s12 >= 0, s12 <= 1 + (z' - 1) + (1 + 0) + 2, s >= 0, s <= 1, z1 = 0, z' - 1 >= 0, z'' - 1 >= 0 div(z', z'', z1) -{ 53 + 5*s5 + s5*z' + 8*z' + 2*z'*z'' + z'^2 + 14*z'' + z1 }-> s13 :|: s13 >= 0, s13 <= 1 + (z' - 1) + (1 + s5) + 2, s5 >= 0, s5 <= z1 - 1 + 1, s' >= 0, s' <= 1, z' - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0 div(z', z'', z1) -{ 52 + 8*z' + z'^2 }-> s8 :|: s8 >= 0, s8 <= z' + (1 + 0) + 2, z'' = 0, z1 = 0, z' >= 0 div(z', z'', z1) -{ 52 + 5*s3 + s3*z' + 8*z' + z'^2 + z1 }-> s9 :|: s9 >= 0, s9 <= z' + (1 + s3) + 2, s3 >= 0, s3 <= z1 - 1 + 1, z'' = 0, z' >= 0, z1 - 1 >= 0 division(z', z'') -{ 25 + 9*z' + 2*z'*z'' + z'^2 + 7*z'' }-> s7 :|: s7 >= 0, s7 <= z' + 0 + 2, z' >= 0, z'' >= 0 if(z', z'', z1, z2) -{ 26 + 9*s1 + 2*s1*z1 + s1*z2 + s1^2 + 8*z1 + 3*z2 }-> s14 :|: s14 >= 0, s14 <= s1 + z2 + 2, s1 >= 0, s1 <= z'' - 1, z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 25 + 7*z1 + 3*z2 }-> s15 :|: s15 >= 0, s15 <= 0 + z2 + 2, z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> z2 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 inc(z') -{ 1 + z' }-> 1 + s6 :|: s6 >= 0, s6 <= z' - 1 + 1, z' - 1 >= 0 inc(z') -{ 1 }-> 1 + 0 :|: z' = 0 lt(z', z'') -{ 2 + z'' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z'' - 1 >= 0 lt(z', z'') -{ 1 }-> 1 :|: z'' - 1 >= 0, z' = 0 lt(z', z'') -{ 1 }-> 0 :|: z'' = 0, z' >= 0 minus(z', z'') -{ 1 + z'' }-> s2 :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z'' - 1 >= 0 minus(z', z'') -{ 1 }-> z' :|: z'' = 0, z' >= 0 minus(z', z'') -{ 0 }-> 0 :|: z' >= 0, z'' >= 0 Function symbols to be analyzed: Previous analysis results are: lt: runtime: O(n^1) [2 + z''], size: O(1) [1] minus: runtime: O(n^1) [1 + z''], size: O(n^1) [z'] inc: runtime: O(n^1) [1 + z'], size: O(n^1) [1 + z'] div: runtime: O(n^2) [24 + 9*z' + 2*z'*z'' + z'*z1 + z'^2 + 7*z'' + 3*z1], size: O(n^1) [2 + z' + z1] if: runtime: O(n^2) [44 + 7*z'' + 2*z''*z1 + z''*z2 + z''^2 + 13*z1 + 5*z2], size: O(n^1) [2 + z'' + z2] division: runtime: O(n^2) [25 + 9*z' + 2*z'*z'' + z'^2 + 7*z''], size: O(n^1) [2 + z'] ---------------------------------------- (45) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (46) BOUNDS(1, n^2) ---------------------------------------- (47) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (48) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (49) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (50) Obligation: Innermost TRS: Rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) Types: division :: 0':s -> 0':s -> 0':s div :: 0':s -> 0':s -> 0':s -> 0':s 0' :: 0':s if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s lt :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false false :: true:false s :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (51) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: div, lt, inc, minus They will be analysed ascendingly in the following order: lt < div inc < div minus < div ---------------------------------------- (52) Obligation: Innermost TRS: Rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) Types: division :: 0':s -> 0':s -> 0':s div :: 0':s -> 0':s -> 0':s -> 0':s 0' :: 0':s if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s lt :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false false :: true:false s :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: lt, div, inc, minus They will be analysed ascendingly in the following order: lt < div inc < div minus < div ---------------------------------------- (53) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: lt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) Induction Base: lt(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) false Induction Step: lt(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) lt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH false We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (54) Complex Obligation (BEST) ---------------------------------------- (55) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) Types: division :: 0':s -> 0':s -> 0':s div :: 0':s -> 0':s -> 0':s -> 0':s 0' :: 0':s if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s lt :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false false :: true:false s :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: lt, div, inc, minus They will be analysed ascendingly in the following order: lt < div inc < div minus < div ---------------------------------------- (56) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (57) BOUNDS(n^1, INF) ---------------------------------------- (58) Obligation: Innermost TRS: Rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) Types: division :: 0':s -> 0':s -> 0':s div :: 0':s -> 0':s -> 0':s -> 0':s 0' :: 0':s if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s lt :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false false :: true:false s :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: lt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: inc, div, minus They will be analysed ascendingly in the following order: inc < div minus < div ---------------------------------------- (59) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: inc(gen_0':s3_0(n305_0)) -> gen_0':s3_0(+(1, n305_0)), rt in Omega(1 + n305_0) Induction Base: inc(gen_0':s3_0(0)) ->_R^Omega(1) s(0') Induction Step: inc(gen_0':s3_0(+(n305_0, 1))) ->_R^Omega(1) s(inc(gen_0':s3_0(n305_0))) ->_IH s(gen_0':s3_0(+(1, c306_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (60) Obligation: Innermost TRS: Rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) Types: division :: 0':s -> 0':s -> 0':s div :: 0':s -> 0':s -> 0':s -> 0':s 0' :: 0':s if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s lt :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false false :: true:false s :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: lt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) inc(gen_0':s3_0(n305_0)) -> gen_0':s3_0(+(1, n305_0)), rt in Omega(1 + n305_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: minus, div They will be analysed ascendingly in the following order: minus < div ---------------------------------------- (61) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s3_0(n547_0), gen_0':s3_0(n547_0)) -> gen_0':s3_0(0), rt in Omega(1 + n547_0) Induction Base: minus(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) gen_0':s3_0(0) Induction Step: minus(gen_0':s3_0(+(n547_0, 1)), gen_0':s3_0(+(n547_0, 1))) ->_R^Omega(1) minus(gen_0':s3_0(n547_0), gen_0':s3_0(n547_0)) ->_IH gen_0':s3_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (62) Obligation: Innermost TRS: Rules: division(x, y) -> div(x, y, 0') div(x, y, z) -> if(lt(x, y), x, y, inc(z)) if(true, x, y, z) -> z if(false, x, s(y), z) -> div(minus(x, s(y)), s(y), z) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) lt(x, 0') -> false lt(0', s(y)) -> true lt(s(x), s(y)) -> lt(x, y) inc(0') -> s(0') inc(s(x)) -> s(inc(x)) Types: division :: 0':s -> 0':s -> 0':s div :: 0':s -> 0':s -> 0':s -> 0':s 0' :: 0':s if :: true:false -> 0':s -> 0':s -> 0':s -> 0':s lt :: 0':s -> 0':s -> true:false inc :: 0':s -> 0':s true :: true:false false :: true:false s :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: lt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> false, rt in Omega(1 + n5_0) inc(gen_0':s3_0(n305_0)) -> gen_0':s3_0(+(1, n305_0)), rt in Omega(1 + n305_0) minus(gen_0':s3_0(n547_0), gen_0':s3_0(n547_0)) -> gen_0':s3_0(0), rt in Omega(1 + n547_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: div