/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 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), 232 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 77 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 373 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 93 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 301 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 123 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 88 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 3574 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 1137 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), 283 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), 51 ms] (60) typed CpxTrs (61) RewriteLemmaProof [LOWER BOUND(ID), 41 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: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) zero(0) -> true zero(s(x)) -> false id(0) -> 0 id(s(x)) -> s(id(x)) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0 if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0 if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> 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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] zero(0) -> true [1] zero(s(x)) -> false [1] id(0) -> 0 [1] id(s(x)) -> s(id(x)) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) [1] if_mod(true, b1, b2, x, y) -> 0 [1] if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) [1] if2(true, b2, x, y) -> 0 [1] if2(false, b2, x, y) -> if3(b2, x, y) [1] if3(true, x, y) -> mod(minus(x, y), s(y)) [1] if3(false, x, y) -> 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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] zero(0) -> true [1] zero(s(x)) -> false [1] id(0) -> 0 [1] id(s(x)) -> s(id(x)) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) [1] if_mod(true, b1, b2, x, y) -> 0 [1] if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) [1] if2(true, b2, x, y) -> 0 [1] if2(false, b2, x, y) -> if3(b2, x, y) [1] if3(true, x, y) -> mod(minus(x, y), s(y)) [1] if3(false, x, y) -> x [1] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false zero :: 0:s -> true:false id :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s mod :: 0:s -> 0:s -> 0:s if_mod :: true:false -> true:false -> true:false -> 0:s -> 0:s -> 0:s if2 :: true:false -> true:false -> 0:s -> 0:s -> 0:s if3 :: true:false -> 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: mod_2 if_mod_5 if2_4 if3_3 (c) The following functions are completely defined: minus_2 zero_1 le_2 id_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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] zero(0) -> true [1] zero(s(x)) -> false [1] id(0) -> 0 [1] id(s(x)) -> s(id(x)) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) [1] if_mod(true, b1, b2, x, y) -> 0 [1] if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) [1] if2(true, b2, x, y) -> 0 [1] if2(false, b2, x, y) -> if3(b2, x, y) [1] if3(true, x, y) -> mod(minus(x, y), s(y)) [1] if3(false, x, y) -> x [1] minus(v0, v1) -> 0 [0] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false zero :: 0:s -> true:false id :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s mod :: 0:s -> 0:s -> 0:s if_mod :: true:false -> true:false -> true:false -> 0:s -> 0:s -> 0:s if2 :: true:false -> true:false -> 0:s -> 0:s -> 0:s if3 :: true:false -> 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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] zero(0) -> true [1] zero(s(x)) -> false [1] id(0) -> 0 [1] id(s(x)) -> s(id(x)) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(0, 0) -> if_mod(true, true, true, 0, 0) [6] mod(0, s(x'')) -> if_mod(true, false, false, 0, s(id(x''))) [6] mod(s(x'), 0) -> if_mod(false, true, true, s(id(x')), 0) [6] mod(s(x'), s(x1)) -> if_mod(false, false, le(x1, x'), s(id(x')), s(id(x1))) [6] if_mod(true, b1, b2, x, y) -> 0 [1] if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) [1] if2(true, b2, x, y) -> 0 [1] if2(false, b2, x, y) -> if3(b2, x, y) [1] if3(true, x, 0) -> mod(x, s(0)) [2] if3(true, s(x2), s(y')) -> mod(minus(x2, y'), s(s(y'))) [2] if3(true, x, y) -> mod(0, s(y)) [1] if3(false, x, y) -> x [1] minus(v0, v1) -> 0 [0] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false zero :: 0:s -> true:false id :: 0:s -> 0:s minus :: 0:s -> 0:s -> 0:s mod :: 0:s -> 0:s -> 0:s if_mod :: true:false -> true:false -> true:false -> 0:s -> 0:s -> 0:s if2 :: true:false -> true:false -> 0:s -> 0:s -> 0:s if3 :: true:false -> 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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 }-> 1 + id(x) :|: x >= 0, z = 1 + x if2(z, z', z'', z1) -{ 1 }-> if3(b2, x, y) :|: b2 >= 0, z1 = y, x >= 0, y >= 0, z' = b2, z'' = x, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: b2 >= 0, z1 = y, z = 1, x >= 0, y >= 0, z' = b2, z'' = x if3(z, z', z'') -{ 1 }-> x :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(x, 1 + 0) :|: z'' = 0, z' = x, z = 1, x >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(x2, y'), 1 + (1 + y')) :|: z' = 1 + x2, z = 1, y' >= 0, x2 >= 0, z'' = 1 + y' if3(z, z', z'') -{ 1 }-> mod(0, 1 + y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(b1, b2, x, y) :|: b2 >= 0, z2 = y, b1 >= 0, x >= 0, y >= 0, z' = b1, z = 0, z1 = x, z'' = b2 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: b2 >= 0, z2 = y, b1 >= 0, z = 1, x >= 0, y >= 0, z' = b1, z1 = x, z'' = b2 le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 1 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(1, 0, 0, 0, 1 + id(x'')) :|: z' = 1 + x'', x'' >= 0, z = 0 mod(z, z') -{ 6 }-> if_mod(0, 1, 1, 1 + id(x'), 0) :|: z = 1 + x', x' >= 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(0, 0, le(x1, x'), 1 + id(x'), 1 + id(x1)) :|: z = 1 + x', x1 >= 0, x' >= 0, z' = 1 + x1 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x ---------------------------------------- (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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 }-> 1 + id(z - 1) :|: z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(1, 0, 0, 0, 1 + id(z' - 1)) :|: z' - 1 >= 0, z = 0 mod(z, z') -{ 6 }-> if_mod(0, 1, 1, 1 + id(z - 1), 0) :|: z - 1 >= 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + id(z - 1), 1 + id(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 ---------------------------------------- (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { id } { minus } { le } { zero } { mod, if_mod, if2, if3 } ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 }-> 1 + id(z - 1) :|: z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(1, 0, 0, 0, 1 + id(z' - 1)) :|: z' - 1 >= 0, z = 0 mod(z, z') -{ 6 }-> if_mod(0, 1, 1, 1 + id(z - 1), 0) :|: z - 1 >= 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + id(z - 1), 1 + id(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {id}, {minus}, {le}, {zero}, {mod,if_mod,if2,if3} ---------------------------------------- (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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 }-> 1 + id(z - 1) :|: z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(1, 0, 0, 0, 1 + id(z' - 1)) :|: z' - 1 >= 0, z = 0 mod(z, z') -{ 6 }-> if_mod(0, 1, 1, 1 + id(z - 1), 0) :|: z - 1 >= 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + id(z - 1), 1 + id(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {id}, {minus}, {le}, {zero}, {mod,if_mod,if2,if3} ---------------------------------------- (17) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: id after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 }-> 1 + id(z - 1) :|: z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(1, 0, 0, 0, 1 + id(z' - 1)) :|: z' - 1 >= 0, z = 0 mod(z, z') -{ 6 }-> if_mod(0, 1, 1, 1 + id(z - 1), 0) :|: z - 1 >= 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + id(z - 1), 1 + id(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {id}, {minus}, {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: ?, size: O(n^1) [z] ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: id after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 }-> 1 + id(z - 1) :|: z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(1, 0, 0, 0, 1 + id(z' - 1)) :|: z' - 1 >= 0, z = 0 mod(z, z') -{ 6 }-> if_mod(0, 1, 1, 1 + id(z - 1), 0) :|: z - 1 >= 0, z' = 0 mod(z, z') -{ 6 }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + id(z - 1), 1 + id(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {minus}, {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] ---------------------------------------- (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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 6 + z + z' }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + s1, 1 + s2) :|: s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {minus}, {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] ---------------------------------------- (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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 6 + z + z' }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + s1, 1 + s2) :|: s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {minus}, {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] 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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 2 }-> mod(minus(z' - 1, z'' - 1), 1 + (1 + (z'' - 1))) :|: z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 6 + z + z' }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + s1, 1 + s2) :|: s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] 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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 6 + z + z' }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + s1, 1 + s2) :|: s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: le after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 6 + z + z' }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + s1, 1 + s2) :|: s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {le}, {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: ?, size: O(1) [1] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: le after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z' ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 6 + z + z' }-> if_mod(0, 0, le(z' - 1, z - 1), 1 + s1, 1 + s2) :|: s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] ---------------------------------------- (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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 2 + z' }-> s5 :|: s5 >= 0, s5 <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 7 + 2*z + z' }-> if_mod(0, 0, s6, 1 + s1, 1 + s2) :|: s6 >= 0, s6 <= 1, s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: zero after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 2 + z' }-> s5 :|: s5 >= 0, s5 <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 7 + 2*z + z' }-> if_mod(0, 0, s6, 1 + s1, 1 + s2) :|: s6 >= 0, s6 <= 1, s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {zero}, {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] zero: runtime: ?, size: O(1) [1] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: zero after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 2 + z' }-> s5 :|: s5 >= 0, s5 <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 7 + 2*z + z' }-> if_mod(0, 0, s6, 1 + s1, 1 + s2) :|: s6 >= 0, s6 <= 1, s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] zero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (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: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 2 + z' }-> s5 :|: s5 >= 0, s5 <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 7 + 2*z + z' }-> if_mod(0, 0, s6, 1 + s1, 1 + s2) :|: s6 >= 0, s6 <= 1, s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] zero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: mod after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z Computed SIZE bound using KoAT for: if_mod after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z1 Computed SIZE bound using KoAT for: if2 after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z'' Computed SIZE bound using KoAT for: if3 after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 2 + z' }-> s5 :|: s5 >= 0, s5 <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 7 + 2*z + z' }-> if_mod(0, 0, s6, 1 + s1, 1 + s2) :|: s6 >= 0, s6 <= 1, s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {mod,if_mod,if2,if3} Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] zero: runtime: O(1) [1], size: O(1) [1] mod: runtime: ?, size: O(n^1) [z] if_mod: runtime: ?, size: O(n^1) [z1] if2: runtime: ?, size: O(n^1) [z''] if3: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: mod after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 51 + 31*z + 3*z*z' + 5*z^2 + 4*z' Computed RUNTIME bound using KoAT for: if_mod after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 146 + 58*z1 + 3*z1*z2 + 10*z1^2 + 6*z2 Computed RUNTIME bound using KoAT for: if2 after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 144 + 58*z'' + 3*z''*z1 + 10*z''^2 + 6*z1 Computed RUNTIME bound using KoAT for: if3 after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 142 + 58*z' + 3*z'*z'' + 10*z'^2 + 6*z'' ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: id(z) -{ 1 }-> 0 :|: z = 0 id(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1, z - 1 >= 0 if2(z, z', z'', z1) -{ 1 }-> if3(z', z'', z1) :|: z' >= 0, z'' >= 0, z1 >= 0, z = 0 if2(z, z', z'', z1) -{ 1 }-> 0 :|: z' >= 0, z = 1, z'' >= 0, z1 >= 0 if3(z, z', z'') -{ 1 }-> z' :|: z' >= 0, z'' >= 0, z = 0 if3(z, z', z'') -{ 2 + z'' }-> mod(s4, 1 + (1 + (z'' - 1))) :|: s4 >= 0, s4 <= z' - 1, z = 1, z'' - 1 >= 0, z' - 1 >= 0 if3(z, z', z'') -{ 2 }-> mod(z', 1 + 0) :|: z'' = 0, z = 1, z' >= 0 if3(z, z', z'') -{ 1 }-> mod(0, 1 + z'') :|: z = 1, z' >= 0, z'' >= 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> if2(z', z'', z1, z2) :|: z'' >= 0, z' >= 0, z1 >= 0, z2 >= 0, z = 0 if_mod(z, z', z'', z1, z2) -{ 1 }-> 0 :|: z'' >= 0, z' >= 0, z = 1, z1 >= 0, z2 >= 0 le(z, z') -{ 2 + z' }-> s5 :|: s5 >= 0, s5 <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 minus(z, z') -{ 1 + z' }-> s3 :|: s3 >= 0, s3 <= 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 mod(z, z') -{ 6 }-> if_mod(1, 1, 1, 0, 0) :|: z = 0, z' = 0 mod(z, z') -{ 6 + z' }-> if_mod(1, 0, 0, 0, 1 + s') :|: s' >= 0, s' <= z' - 1, z' - 1 >= 0, z = 0 mod(z, z') -{ 6 + z }-> if_mod(0, 1, 1, 1 + s'', 0) :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0, z' = 0 mod(z, z') -{ 7 + 2*z + z' }-> if_mod(0, 0, s6, 1 + s1, 1 + s2) :|: s6 >= 0, s6 <= 1, s1 >= 0, s1 <= z - 1, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: Previous analysis results are: id: runtime: O(n^1) [1 + z], size: O(n^1) [z] minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] le: runtime: O(n^1) [2 + z'], size: O(1) [1] zero: runtime: O(1) [1], size: O(1) [1] mod: runtime: O(n^2) [51 + 31*z + 3*z*z' + 5*z^2 + 4*z'], size: O(n^1) [z] if_mod: runtime: O(n^2) [146 + 58*z1 + 3*z1*z2 + 10*z1^2 + 6*z2], size: O(n^1) [z1] if2: runtime: O(n^2) [144 + 58*z'' + 3*z''*z1 + 10*z''^2 + 6*z1], size: O(n^1) [z''] if3: runtime: O(n^2) [142 + 58*z' + 3*z'*z'' + 10*z'^2 + 6*z''], size: O(n^1) [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: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (49) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (50) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false zero :: 0':s -> true:false id :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s if2 :: true:false -> true:false -> 0':s -> 0':s -> 0':s if3 :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (51) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: le, id, minus, mod They will be analysed ascendingly in the following order: le < mod id < mod minus < mod ---------------------------------------- (52) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false zero :: 0':s -> true:false id :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s if2 :: true:false -> true:false -> 0':s -> 0':s -> 0':s if3 :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, id, minus, mod They will be analysed ascendingly in the following order: le < mod id < mod minus < mod ---------------------------------------- (53) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Induction Base: le(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) true Induction Step: le(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH true 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: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false zero :: 0':s -> true:false id :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s if2 :: true:false -> true:false -> 0':s -> 0':s -> 0':s if3 :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, id, minus, mod They will be analysed ascendingly in the following order: le < mod id < mod minus < mod ---------------------------------------- (56) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (57) BOUNDS(n^1, INF) ---------------------------------------- (58) Obligation: Innermost TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false zero :: 0':s -> true:false id :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s if2 :: true:false -> true:false -> 0':s -> 0':s -> 0':s if3 :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, 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: id, minus, mod They will be analysed ascendingly in the following order: id < mod minus < mod ---------------------------------------- (59) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: id(gen_0':s3_0(n354_0)) -> gen_0':s3_0(n354_0), rt in Omega(1 + n354_0) Induction Base: id(gen_0':s3_0(0)) ->_R^Omega(1) 0' Induction Step: id(gen_0':s3_0(+(n354_0, 1))) ->_R^Omega(1) s(id(gen_0':s3_0(n354_0))) ->_IH s(gen_0':s3_0(c355_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: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false zero :: 0':s -> true:false id :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s if2 :: true:false -> true:false -> 0':s -> 0':s -> 0':s if3 :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) id(gen_0':s3_0(n354_0)) -> gen_0':s3_0(n354_0), rt in Omega(1 + n354_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, mod They will be analysed ascendingly in the following order: minus < mod ---------------------------------------- (61) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s3_0(n612_0), gen_0':s3_0(n612_0)) -> gen_0':s3_0(0), rt in Omega(1 + n612_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(+(n612_0, 1)), gen_0':s3_0(+(n612_0, 1))) ->_R^Omega(1) minus(gen_0':s3_0(n612_0), gen_0':s3_0(n612_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: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) zero(0') -> true zero(s(x)) -> false id(0') -> 0' id(s(x)) -> s(id(x)) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(x, y) -> if_mod(zero(x), zero(y), le(y, x), id(x), id(y)) if_mod(true, b1, b2, x, y) -> 0' if_mod(false, b1, b2, x, y) -> if2(b1, b2, x, y) if2(true, b2, x, y) -> 0' if2(false, b2, x, y) -> if3(b2, x, y) if3(true, x, y) -> mod(minus(x, y), s(y)) if3(false, x, y) -> x Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false zero :: 0':s -> true:false id :: 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> true:false -> true:false -> 0':s -> 0':s -> 0':s if2 :: true:false -> true:false -> 0':s -> 0':s -> 0':s if3 :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) id(gen_0':s3_0(n354_0)) -> gen_0':s3_0(n354_0), rt in Omega(1 + n354_0) minus(gen_0':s3_0(n612_0), gen_0':s3_0(n612_0)) -> gen_0':s3_0(0), rt in Omega(1 + n612_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: mod