WORST_CASE(Omega(n^1),O(n^2)) proof of input_rdpufIKPzX.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(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), 6 ms] (10) CpxRNTS (11) InliningProof [UPPER BOUND(ID), 91 ms] (12) CpxRNTS (13) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRNTS (15) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRNTS (17) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 228 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 45 ms] (22) CpxRNTS (23) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 181 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 72 ms] (28) CpxRNTS (29) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 128 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 1 ms] (34) CpxRNTS (35) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 157 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 52 ms] (40) CpxRNTS (41) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 1457 ms] (44) CpxRNTS (45) IntTrsBoundProof [UPPER BOUND(ID), 711 ms] (46) CpxRNTS (47) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 37 ms] (50) CpxRNTS (51) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (52) CpxRNTS (53) FinalProof [FINISHED, 0 ms] (54) BOUNDS(1, n^2) (55) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (56) CdtProblem (57) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (58) CpxRelTRS (59) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (60) CpxRelTRS (61) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (62) typed CpxTrs (63) OrderProof [LOWER BOUND(ID), 9 ms] (64) typed CpxTrs (65) RewriteLemmaProof [LOWER BOUND(ID), 354 ms] (66) BEST (67) proven lower bound (68) LowerBoundPropagationProof [FINISHED, 0 ms] (69) BOUNDS(n^1, INF) (70) typed CpxTrs (71) RewriteLemmaProof [LOWER BOUND(ID), 41 ms] (72) typed CpxTrs (73) RewriteLemmaProof [LOWER BOUND(ID), 75 ms] (74) typed CpxTrs (75) RewriteLemmaProof [LOWER BOUND(ID), 66 ms] (76) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x))) -> s(half(x)) inc(0) -> 0 inc(s(x)) -> s(inc(x)) zero(0) -> true zero(s(x)) -> false p(0) -> 0 p(s(x)) -> x bits(x) -> bitIter(x, 0) bitIter(x, y) -> if(zero(x), x, inc(y)) if(true, x, y) -> p(y) if(false, x, y) -> bitIter(half(x), y) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(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: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(x, y) -> if(zero(x), x, inc(y)) [1] if(true, x, y) -> p(y) [1] if(false, x, y) -> bitIter(half(x), y) [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: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(x, y) -> if(zero(x), x, inc(y)) [1] if(true, x, y) -> p(y) [1] if(false, x, y) -> bitIter(half(x), y) [1] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s inc :: 0:s -> 0:s zero :: 0:s -> true:false true :: true:false false :: true:false p :: 0:s -> 0:s bits :: 0:s -> 0:s bitIter :: 0:s -> 0:s -> 0:s if :: 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: p_1 bits_1 bitIter_2 if_3 (c) The following functions are completely defined: zero_1 inc_1 half_1 Due to the following rules being added: none 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: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(x, y) -> if(zero(x), x, inc(y)) [1] if(true, x, y) -> p(y) [1] if(false, x, y) -> bitIter(half(x), y) [1] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s inc :: 0:s -> 0:s zero :: 0:s -> true:false true :: true:false false :: true:false p :: 0:s -> 0:s bits :: 0:s -> 0:s bitIter :: 0:s -> 0:s -> 0:s if :: 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: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] zero(0) -> true [1] zero(s(x)) -> false [1] p(0) -> 0 [1] p(s(x)) -> x [1] bits(x) -> bitIter(x, 0) [1] bitIter(0, 0) -> if(true, 0, 0) [3] bitIter(0, s(x'')) -> if(true, 0, s(inc(x''))) [3] bitIter(s(x'), 0) -> if(false, s(x'), 0) [3] bitIter(s(x'), s(x1)) -> if(false, s(x'), s(inc(x1))) [3] if(true, x, y) -> p(y) [1] if(false, 0, y) -> bitIter(0, y) [2] if(false, s(0), y) -> bitIter(0, y) [2] if(false, s(s(x2)), y) -> bitIter(s(half(x2)), y) [2] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s inc :: 0:s -> 0:s zero :: 0:s -> true:false true :: true:false false :: true:false p :: 0:s -> 0:s bits :: 0:s -> 0:s bitIter :: 0:s -> 0:s -> 0:s if :: 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: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(x'')) :|: z' = 1 + x'', x'' >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + x', 0) :|: z = 1 + x', x' >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + x', 1 + inc(x1)) :|: z = 1 + x', x1 >= 0, x' >= 0, z' = 1 + x1 bits(z) -{ 1 }-> bitIter(x, 0) :|: x >= 0, z = x half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(x) :|: x >= 0, z = 1 + (1 + x) if(z, z', z'') -{ 1 }-> p(y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, y) :|: z'' = y, y >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, y) :|: z'' = y, y >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(x2), y) :|: z'' = y, z' = 1 + (1 + x2), y >= 0, z = 0, x2 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x ---------------------------------------- (11) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(x'')) :|: z' = 1 + x'', x'' >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + x', 0) :|: z = 1 + x', x' >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + x', 1 + inc(x1)) :|: z = 1 + x', x1 >= 0, x' >= 0, z' = 1 + x1 bits(z) -{ 1 }-> bitIter(x, 0) :|: x >= 0, z = x half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(x) :|: x >= 0, z = 1 + (1 + x) if(z, z', z'') -{ 2 }-> x' :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0, x' >= 0, y = 1 + x' if(z, z', z'') -{ 2 }-> bitIter(0, y) :|: z'' = y, y >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, y) :|: z'' = y, y >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(x2), y) :|: z'' = y, z' = 1 + (1 + x2), y >= 0, z = 0, x2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0, y = 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x ---------------------------------------- (13) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 ---------------------------------------- (15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { half } { inc } { zero } { p } { if, bitIter } { bits } ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {half}, {inc}, {zero}, {p}, {if,bitIter}, {bits} ---------------------------------------- (17) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {half}, {inc}, {zero}, {p}, {if,bitIter}, {bits} ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: half after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {half}, {inc}, {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: ?, size: O(n^1) [z] ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: half after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> bitIter(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {inc}, {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (23) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {inc}, {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (25) 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: z ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {inc}, {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: ?, size: O(n^1) [z] ---------------------------------------- (27) 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 ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] ---------------------------------------- (29) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] ---------------------------------------- (31) 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 ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {zero}, {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: ?, size: O(1) [1] ---------------------------------------- (33) 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 ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (35) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: p after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {p}, {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: ?, size: O(n^1) [z] ---------------------------------------- (39) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: p after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (41) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z'' Computed SIZE bound using CoFloCo for: bitIter after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {if,bitIter}, {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] if: runtime: ?, size: O(n^1) [z''] bitIter: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (45) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 12 + 7*z' + z'*z'' + z'^2 + 2*z'' Computed RUNTIME bound using KoAT for: bitIter after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 60 + 14*z + z*z' + 2*z^2 + 6*z' ---------------------------------------- (46) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(1, 0, 1 + s1) :|: s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 3 }-> if(0, 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 bitIter(z, z') -{ 3 + z' }-> if(0, 1 + (z - 1), 1 + s2) :|: s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 1 }-> bitIter(z, 0) :|: z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> bitIter(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> bitIter(1 + s', z'') :|: s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] if: runtime: O(n^2) [12 + 7*z' + z'*z'' + z'^2 + 2*z''], size: O(n^1) [z''] bitIter: runtime: O(n^2) [60 + 14*z + z*z' + 2*z^2 + 6*z'], size: O(n^1) [z'] ---------------------------------------- (47) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (48) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 15 }-> s4 :|: s4 >= 0, s4 <= 0, z = 0, z' = 0 bitIter(z, z') -{ 17 + 2*s1 + z' }-> s5 :|: s5 >= 0, s5 <= 1 + s1, s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 15 + 7*z + z^2 }-> s6 :|: s6 >= 0, s6 <= 0, z - 1 >= 0, z' = 0 bitIter(z, z') -{ 17 + 2*s2 + s2*z + 8*z + z^2 + z' }-> s7 :|: s7 >= 0, s7 <= 1 + s2, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 61 + 14*z + 2*z^2 }-> s3 :|: s3 >= 0, s3 <= 0, z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 78 + 18*s' + s'*z'' + 2*s'^2 + z' + 7*z'' }-> s10 :|: s10 >= 0, s10 <= z'', s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 62 + 6*z'' }-> s8 :|: s8 >= 0, s8 <= z'', z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 62 + 6*z'' }-> s9 :|: s9 >= 0, s9 <= z'', z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] if: runtime: O(n^2) [12 + 7*z' + z'*z'' + z'^2 + 2*z''], size: O(n^1) [z''] bitIter: runtime: O(n^2) [60 + 14*z + z*z' + 2*z^2 + 6*z'], size: O(n^1) [z'] ---------------------------------------- (49) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: bits after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 15 }-> s4 :|: s4 >= 0, s4 <= 0, z = 0, z' = 0 bitIter(z, z') -{ 17 + 2*s1 + z' }-> s5 :|: s5 >= 0, s5 <= 1 + s1, s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 15 + 7*z + z^2 }-> s6 :|: s6 >= 0, s6 <= 0, z - 1 >= 0, z' = 0 bitIter(z, z') -{ 17 + 2*s2 + s2*z + 8*z + z^2 + z' }-> s7 :|: s7 >= 0, s7 <= 1 + s2, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 61 + 14*z + 2*z^2 }-> s3 :|: s3 >= 0, s3 <= 0, z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 78 + 18*s' + s'*z'' + 2*s'^2 + z' + 7*z'' }-> s10 :|: s10 >= 0, s10 <= z'', s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 62 + 6*z'' }-> s8 :|: s8 >= 0, s8 <= z'', z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 62 + 6*z'' }-> s9 :|: s9 >= 0, s9 <= z'', z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 zero(z) -{ 1 }-> 1 :|: z = 0 zero(z) -{ 1 }-> 0 :|: z - 1 >= 0 Function symbols to be analyzed: {bits} Previous analysis results are: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] if: runtime: O(n^2) [12 + 7*z' + z'*z'' + z'^2 + 2*z''], size: O(n^1) [z''] bitIter: runtime: O(n^2) [60 + 14*z + z*z' + 2*z^2 + 6*z'], size: O(n^1) [z'] bits: runtime: ?, size: O(1) [0] ---------------------------------------- (51) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: bits after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 61 + 14*z + 2*z^2 ---------------------------------------- (52) Obligation: Complexity RNTS consisting of the following rules: bitIter(z, z') -{ 15 }-> s4 :|: s4 >= 0, s4 <= 0, z = 0, z' = 0 bitIter(z, z') -{ 17 + 2*s1 + z' }-> s5 :|: s5 >= 0, s5 <= 1 + s1, s1 >= 0, s1 <= z' - 1, z' - 1 >= 0, z = 0 bitIter(z, z') -{ 15 + 7*z + z^2 }-> s6 :|: s6 >= 0, s6 <= 0, z - 1 >= 0, z' = 0 bitIter(z, z') -{ 17 + 2*s2 + s2*z + 8*z + z^2 + z' }-> s7 :|: s7 >= 0, s7 <= 1 + s2, s2 >= 0, s2 <= z' - 1, z' - 1 >= 0, z - 1 >= 0 bits(z) -{ 61 + 14*z + 2*z^2 }-> s3 :|: s3 >= 0, s3 <= 0, z >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 78 + 18*s' + s'*z'' + 2*s'^2 + z' + 7*z'' }-> s10 :|: s10 >= 0, s10 <= z'', s' >= 0, s' <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 62 + 6*z'' }-> s8 :|: s8 >= 0, s8 <= z'', z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 62 + 6*z'' }-> s9 :|: s9 >= 0, s9 <= z'', z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> 0 :|: z = 1, z' >= 0, z'' >= 0, z'' = 0 if(z, z', z'') -{ 2 }-> z'' - 1 :|: z = 1, z' >= 0, z'' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1, z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: 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: half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] zero: runtime: O(1) [1], size: O(1) [1] p: runtime: O(1) [1], size: O(n^1) [z] if: runtime: O(n^2) [12 + 7*z' + z'*z'' + z'^2 + 2*z''], size: O(n^1) [z''] bitIter: runtime: O(n^2) [60 + 14*z + z*z' + 2*z^2 + 6*z'], size: O(n^1) [z'] bits: runtime: O(n^2) [61 + 14*z + 2*z^2], size: O(1) [0] ---------------------------------------- (53) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (54) BOUNDS(1, n^2) ---------------------------------------- (55) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (56) Obligation: Complexity Dependency Tuples Problem Rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(z0))) -> s(half(z0)) inc(0) -> 0 inc(s(z0)) -> s(inc(z0)) zero(0) -> true zero(s(z0)) -> false p(0) -> 0 p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0) bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Tuples: HALF(0) -> c HALF(s(0)) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0) -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0) -> c5 ZERO(s(z0)) -> c6 P(0) -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0)) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) S tuples: HALF(0) -> c HALF(s(0)) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0) -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0) -> c5 ZERO(s(z0)) -> c6 P(0) -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0)) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) K tuples:none Defined Rule Symbols: half_1, inc_1, zero_1, p_1, bits_1, bitIter_2, if_3 Defined Pair Symbols: HALF_1, INC_1, ZERO_1, P_1, BITS_1, BITITER_2, IF_3 Compound Symbols: c, c1, c2_1, c3, c4_1, c5, c6, c7, c8, c9_1, c10_2, c11_2, c12_1, c13_2 ---------------------------------------- (57) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (58) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: HALF(0) -> c HALF(s(0)) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0) -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0) -> c5 ZERO(s(z0)) -> c6 P(0) -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0)) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) The (relative) TRS S consists of the following rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(z0))) -> s(half(z0)) inc(0) -> 0 inc(s(z0)) -> s(inc(z0)) zero(0) -> true zero(s(z0)) -> false p(0) -> 0 p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0) bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Rewrite Strategy: INNERMOST ---------------------------------------- (59) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (60) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) The (relative) TRS S consists of the following rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Rewrite Strategy: INNERMOST ---------------------------------------- (61) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (62) Obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 ---------------------------------------- (63) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: HALF, INC, BITITER, inc, half, bitIter They will be analysed ascendingly in the following order: HALF < BITITER INC < BITITER inc < BITITER half < BITITER inc < bitIter half < bitIter ---------------------------------------- (64) Obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 Generator Equations: gen_c:c1:c210_14(0) <=> c gen_c:c1:c210_14(+(x, 1)) <=> c2(gen_c:c1:c210_14(x)) gen_0':s11_14(0) <=> 0' gen_0':s11_14(+(x, 1)) <=> s(gen_0':s11_14(x)) gen_c3:c412_14(0) <=> c3 gen_c3:c412_14(+(x, 1)) <=> c4(gen_c3:c412_14(x)) The following defined symbols remain to be analysed: HALF, INC, BITITER, inc, half, bitIter They will be analysed ascendingly in the following order: HALF < BITITER INC < BITITER inc < BITITER half < BITITER inc < bitIter half < bitIter ---------------------------------------- (65) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: HALF(gen_0':s11_14(*(2, n14_14))) -> gen_c:c1:c210_14(n14_14), rt in Omega(1 + n14_14) Induction Base: HALF(gen_0':s11_14(*(2, 0))) ->_R^Omega(1) c Induction Step: HALF(gen_0':s11_14(*(2, +(n14_14, 1)))) ->_R^Omega(1) c2(HALF(gen_0':s11_14(*(2, n14_14)))) ->_IH c2(gen_c:c1:c210_14(c15_14)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (66) Complex Obligation (BEST) ---------------------------------------- (67) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 Generator Equations: gen_c:c1:c210_14(0) <=> c gen_c:c1:c210_14(+(x, 1)) <=> c2(gen_c:c1:c210_14(x)) gen_0':s11_14(0) <=> 0' gen_0':s11_14(+(x, 1)) <=> s(gen_0':s11_14(x)) gen_c3:c412_14(0) <=> c3 gen_c3:c412_14(+(x, 1)) <=> c4(gen_c3:c412_14(x)) The following defined symbols remain to be analysed: HALF, INC, BITITER, inc, half, bitIter They will be analysed ascendingly in the following order: HALF < BITITER INC < BITITER inc < BITITER half < BITITER inc < bitIter half < bitIter ---------------------------------------- (68) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (69) BOUNDS(n^1, INF) ---------------------------------------- (70) Obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 Lemmas: HALF(gen_0':s11_14(*(2, n14_14))) -> gen_c:c1:c210_14(n14_14), rt in Omega(1 + n14_14) Generator Equations: gen_c:c1:c210_14(0) <=> c gen_c:c1:c210_14(+(x, 1)) <=> c2(gen_c:c1:c210_14(x)) gen_0':s11_14(0) <=> 0' gen_0':s11_14(+(x, 1)) <=> s(gen_0':s11_14(x)) gen_c3:c412_14(0) <=> c3 gen_c3:c412_14(+(x, 1)) <=> c4(gen_c3:c412_14(x)) The following defined symbols remain to be analysed: INC, BITITER, inc, half, bitIter They will be analysed ascendingly in the following order: INC < BITITER inc < BITITER half < BITITER inc < bitIter half < bitIter ---------------------------------------- (71) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: INC(gen_0':s11_14(n471_14)) -> gen_c3:c412_14(n471_14), rt in Omega(1 + n471_14) Induction Base: INC(gen_0':s11_14(0)) ->_R^Omega(1) c3 Induction Step: INC(gen_0':s11_14(+(n471_14, 1))) ->_R^Omega(1) c4(INC(gen_0':s11_14(n471_14))) ->_IH c4(gen_c3:c412_14(c472_14)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (72) Obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 Lemmas: HALF(gen_0':s11_14(*(2, n14_14))) -> gen_c:c1:c210_14(n14_14), rt in Omega(1 + n14_14) INC(gen_0':s11_14(n471_14)) -> gen_c3:c412_14(n471_14), rt in Omega(1 + n471_14) Generator Equations: gen_c:c1:c210_14(0) <=> c gen_c:c1:c210_14(+(x, 1)) <=> c2(gen_c:c1:c210_14(x)) gen_0':s11_14(0) <=> 0' gen_0':s11_14(+(x, 1)) <=> s(gen_0':s11_14(x)) gen_c3:c412_14(0) <=> c3 gen_c3:c412_14(+(x, 1)) <=> c4(gen_c3:c412_14(x)) The following defined symbols remain to be analysed: inc, BITITER, half, bitIter They will be analysed ascendingly in the following order: inc < BITITER half < BITITER inc < bitIter half < bitIter ---------------------------------------- (73) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: inc(gen_0':s11_14(n848_14)) -> gen_0':s11_14(n848_14), rt in Omega(0) Induction Base: inc(gen_0':s11_14(0)) ->_R^Omega(0) 0' Induction Step: inc(gen_0':s11_14(+(n848_14, 1))) ->_R^Omega(0) s(inc(gen_0':s11_14(n848_14))) ->_IH s(gen_0':s11_14(c849_14)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (74) Obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 Lemmas: HALF(gen_0':s11_14(*(2, n14_14))) -> gen_c:c1:c210_14(n14_14), rt in Omega(1 + n14_14) INC(gen_0':s11_14(n471_14)) -> gen_c3:c412_14(n471_14), rt in Omega(1 + n471_14) inc(gen_0':s11_14(n848_14)) -> gen_0':s11_14(n848_14), rt in Omega(0) Generator Equations: gen_c:c1:c210_14(0) <=> c gen_c:c1:c210_14(+(x, 1)) <=> c2(gen_c:c1:c210_14(x)) gen_0':s11_14(0) <=> 0' gen_0':s11_14(+(x, 1)) <=> s(gen_0':s11_14(x)) gen_c3:c412_14(0) <=> c3 gen_c3:c412_14(+(x, 1)) <=> c4(gen_c3:c412_14(x)) The following defined symbols remain to be analysed: half, BITITER, bitIter They will be analysed ascendingly in the following order: half < BITITER half < bitIter ---------------------------------------- (75) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: half(gen_0':s11_14(*(2, n1204_14))) -> gen_0':s11_14(n1204_14), rt in Omega(0) Induction Base: half(gen_0':s11_14(*(2, 0))) ->_R^Omega(0) 0' Induction Step: half(gen_0':s11_14(*(2, +(n1204_14, 1)))) ->_R^Omega(0) s(half(gen_0':s11_14(*(2, n1204_14)))) ->_IH s(gen_0':s11_14(c1205_14)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (76) Obligation: Innermost TRS: Rules: HALF(0') -> c HALF(s(0')) -> c1 HALF(s(s(z0))) -> c2(HALF(z0)) INC(0') -> c3 INC(s(z0)) -> c4(INC(z0)) ZERO(0') -> c5 ZERO(s(z0)) -> c6 P(0') -> c7 P(s(z0)) -> c8 BITS(z0) -> c9(BITITER(z0, 0')) BITITER(z0, z1) -> c10(IF(zero(z0), z0, inc(z1)), ZERO(z0)) BITITER(z0, z1) -> c11(IF(zero(z0), z0, inc(z1)), INC(z1)) IF(true, z0, z1) -> c12(P(z1)) IF(false, z0, z1) -> c13(BITITER(half(z0), z1), HALF(z0)) half(0') -> 0' half(s(0')) -> 0' half(s(s(z0))) -> s(half(z0)) inc(0') -> 0' inc(s(z0)) -> s(inc(z0)) zero(0') -> true zero(s(z0)) -> false p(0') -> 0' p(s(z0)) -> z0 bits(z0) -> bitIter(z0, 0') bitIter(z0, z1) -> if(zero(z0), z0, inc(z1)) if(true, z0, z1) -> p(z1) if(false, z0, z1) -> bitIter(half(z0), z1) Types: HALF :: 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 INC :: 0':s -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 ZERO :: 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 P :: 0':s -> c7:c8 c7 :: c7:c8 c8 :: c7:c8 BITS :: 0':s -> c9 c9 :: c10:c11 -> c9 BITITER :: 0':s -> 0':s -> c10:c11 c10 :: c12:c13 -> c5:c6 -> c10:c11 IF :: true:false -> 0':s -> 0':s -> c12:c13 zero :: 0':s -> true:false inc :: 0':s -> 0':s c11 :: c12:c13 -> c3:c4 -> c10:c11 true :: true:false c12 :: c7:c8 -> c12:c13 false :: true:false c13 :: c10:c11 -> c:c1:c2 -> c12:c13 half :: 0':s -> 0':s p :: 0':s -> 0':s bits :: 0':s -> 0':s bitIter :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c1:c21_14 :: c:c1:c2 hole_0':s2_14 :: 0':s hole_c3:c43_14 :: c3:c4 hole_c5:c64_14 :: c5:c6 hole_c7:c85_14 :: c7:c8 hole_c96_14 :: c9 hole_c10:c117_14 :: c10:c11 hole_c12:c138_14 :: c12:c13 hole_true:false9_14 :: true:false gen_c:c1:c210_14 :: Nat -> c:c1:c2 gen_0':s11_14 :: Nat -> 0':s gen_c3:c412_14 :: Nat -> c3:c4 Lemmas: HALF(gen_0':s11_14(*(2, n14_14))) -> gen_c:c1:c210_14(n14_14), rt in Omega(1 + n14_14) INC(gen_0':s11_14(n471_14)) -> gen_c3:c412_14(n471_14), rt in Omega(1 + n471_14) inc(gen_0':s11_14(n848_14)) -> gen_0':s11_14(n848_14), rt in Omega(0) half(gen_0':s11_14(*(2, n1204_14))) -> gen_0':s11_14(n1204_14), rt in Omega(0) Generator Equations: gen_c:c1:c210_14(0) <=> c gen_c:c1:c210_14(+(x, 1)) <=> c2(gen_c:c1:c210_14(x)) gen_0':s11_14(0) <=> 0' gen_0':s11_14(+(x, 1)) <=> s(gen_0':s11_14(x)) gen_c3:c412_14(0) <=> c3 gen_c3:c412_14(+(x, 1)) <=> c4(gen_c3:c412_14(x)) The following defined symbols remain to be analysed: BITITER, bitIter