WORST_CASE(Omega(n^1),O(n^1)) proof of input_wcb2EBzcLK.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (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), 3 ms] (6) CpxTypedWeightedCompleteTrs (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (10) CpxRNTS (11) InliningProof [UPPER BOUND(ID), 0 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), 248 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 97 ms] (22) CpxRNTS (23) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 162 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 74 ms] (28) CpxRNTS (29) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 114 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 124 ms] (34) CpxRNTS (35) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 318 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 230 ms] (40) CpxRNTS (41) FinalProof [FINISHED, 0 ms] (42) BOUNDS(1, n^1) (43) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CdtProblem (45) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CpxRelTRS (47) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CpxRelTRS (49) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (50) typed CpxTrs (51) OrderProof [LOWER BOUND(ID), 17 ms] (52) typed CpxTrs (53) RewriteLemmaProof [LOWER BOUND(ID), 370 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), 135 ms] (60) typed CpxTrs (61) RewriteLemmaProof [LOWER BOUND(ID), 57 ms] (62) typed CpxTrs (63) RewriteLemmaProof [LOWER BOUND(ID), 38 ms] (64) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: minus(0, Y) -> 0 minus(s(X), s(Y)) -> minus(X, Y) geq(X, 0) -> true geq(0, s(Y)) -> false geq(s(X), s(Y)) -> geq(X, Y) div(0, s(Y)) -> 0 div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) if(true, X, Y) -> X if(false, X, Y) -> 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^1). The TRS R consists of the following rules: minus(0, Y) -> 0 [1] minus(s(X), s(Y)) -> minus(X, Y) [1] geq(X, 0) -> true [1] geq(0, s(Y)) -> false [1] geq(s(X), s(Y)) -> geq(X, Y) [1] div(0, s(Y)) -> 0 [1] div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> 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: minus(0, Y) -> 0 [1] minus(s(X), s(Y)) -> minus(X, Y) [1] geq(X, 0) -> true [1] geq(0, s(Y)) -> false [1] geq(s(X), s(Y)) -> geq(X, Y) [1] div(0, s(Y)) -> 0 [1] div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s geq :: 0:s -> 0:s -> true:false true :: true:false false :: true:false div :: 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: none (c) The following functions are completely defined: geq_2 div_2 minus_2 if_3 Due to the following rules being added: div(v0, v1) -> 0 [0] 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: minus(0, Y) -> 0 [1] minus(s(X), s(Y)) -> minus(X, Y) [1] geq(X, 0) -> true [1] geq(0, s(Y)) -> false [1] geq(s(X), s(Y)) -> geq(X, Y) [1] div(0, s(Y)) -> 0 [1] div(s(X), s(Y)) -> if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0) [1] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] div(v0, v1) -> 0 [0] minus(v0, v1) -> 0 [0] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s geq :: 0:s -> 0:s -> true:false true :: true:false false :: true:false div :: 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: minus(0, Y) -> 0 [1] minus(s(X), s(Y)) -> minus(X, Y) [1] geq(X, 0) -> true [1] geq(0, s(Y)) -> false [1] geq(s(X), s(Y)) -> geq(X, Y) [1] div(0, s(Y)) -> 0 [1] div(s(0), s(0)) -> if(true, s(div(0, s(0))), 0) [3] div(s(X), s(0)) -> if(true, s(div(0, s(0))), 0) [2] div(s(0), s(s(Y'))) -> if(false, s(div(0, s(s(Y')))), 0) [3] div(s(0), s(s(Y'))) -> if(false, s(div(0, s(s(Y')))), 0) [2] div(s(s(X')), s(s(Y''))) -> if(geq(X', Y''), s(div(minus(X', Y''), s(s(Y'')))), 0) [3] div(s(s(X')), s(s(Y''))) -> if(geq(X', Y''), s(div(0, s(s(Y'')))), 0) [2] if(true, X, Y) -> X [1] if(false, X, Y) -> Y [1] div(v0, v1) -> 0 [0] minus(v0, v1) -> 0 [0] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s geq :: 0:s -> 0:s -> true:false true :: true:false false :: true:false div :: 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: div(z, z') -{ 3 }-> if(geq(X', Y''), 1 + div(minus(X', Y''), 1 + (1 + Y'')), 0) :|: Y'' >= 0, z' = 1 + (1 + Y''), X' >= 0, z = 1 + (1 + X') div(z, z') -{ 2 }-> if(geq(X', Y''), 1 + div(0, 1 + (1 + Y'')), 0) :|: Y'' >= 0, z' = 1 + (1 + Y''), X' >= 0, z = 1 + (1 + X') div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + X, X >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + Y')), 0) :|: z' = 1 + (1 + Y'), Y' >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + Y')), 0) :|: z' = 1 + (1 + Y'), Y' >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 div(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 geq(z, z') -{ 1 }-> geq(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 geq(z, z') -{ 1 }-> 1 :|: X >= 0, z = X, z' = 0 geq(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 minus(z, z') -{ 1 }-> minus(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 minus(z, z') -{ 1 }-> 0 :|: z' = Y, Y >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 ---------------------------------------- (11) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 3 }-> if(geq(X', Y''), 1 + div(minus(X', Y''), 1 + (1 + Y'')), 0) :|: Y'' >= 0, z' = 1 + (1 + Y''), X' >= 0, z = 1 + (1 + X') div(z, z') -{ 2 }-> if(geq(X', Y''), 1 + div(0, 1 + (1 + Y'')), 0) :|: Y'' >= 0, z' = 1 + (1 + Y''), X' >= 0, z = 1 + (1 + X') div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + X, X >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + Y')), 0) :|: z' = 1 + (1 + Y'), Y' >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + Y')), 0) :|: z' = 1 + (1 + Y'), Y' >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 div(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 geq(z, z') -{ 1 }-> geq(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 geq(z, z') -{ 1 }-> 1 :|: X >= 0, z = X, z' = 0 geq(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 if(z, z', z'') -{ 1 }-> X :|: z' = X, Y >= 0, z = 1, z'' = Y, X >= 0 if(z, z', z'') -{ 1 }-> Y :|: z' = X, Y >= 0, z'' = Y, X >= 0, z = 0 minus(z, z') -{ 1 }-> minus(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 minus(z, z') -{ 1 }-> 0 :|: z' = Y, Y >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 ---------------------------------------- (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: div(z, z') -{ 3 }-> if(geq(z - 2, z' - 2), 1 + div(minus(z - 2, z' - 2), 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 ---------------------------------------- (15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { minus } { if } { geq } { div } ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 3 }-> if(geq(z - 2, z' - 2), 1 + div(minus(z - 2, z' - 2), 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {minus}, {if}, {geq}, {div} ---------------------------------------- (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: div(z, z') -{ 3 }-> if(geq(z - 2, z' - 2), 1 + div(minus(z - 2, z' - 2), 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {minus}, {if}, {geq}, {div} ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: minus after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 3 }-> if(geq(z - 2, z' - 2), 1 + div(minus(z - 2, z' - 2), 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {minus}, {if}, {geq}, {div} Previous analysis results are: minus: runtime: ?, size: O(1) [0] ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: minus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 3 }-> if(geq(z - 2, z' - 2), 1 + div(minus(z - 2, z' - 2), 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {if}, {geq}, {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] ---------------------------------------- (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: div(z, z') -{ 2 + z' }-> if(geq(z - 2, z' - 2), 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {if}, {geq}, {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' + z'' ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 2 + z' }-> if(geq(z - 2, z' - 2), 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {if}, {geq}, {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: ?, size: O(n^1) [z' + z''] ---------------------------------------- (27) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 2 + z' }-> if(geq(z - 2, z' - 2), 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {geq}, {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + 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: div(z, z') -{ 2 + z' }-> if(geq(z - 2, z' - 2), 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {geq}, {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + z''] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: geq 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: div(z, z') -{ 2 + z' }-> if(geq(z - 2, z' - 2), 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {geq}, {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + z''] geq: runtime: ?, size: O(1) [1] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: geq after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z' ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 2 + z' }-> if(geq(z - 2, z' - 2), 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 }-> if(geq(z - 2, z' - 2), 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 1 }-> geq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + z''] geq: runtime: O(n^1) [2 + z'], 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: div(z, z') -{ 2 + 2*z' }-> if(s1, 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s1 >= 0, s1 <= 1, s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 + z' }-> if(s2, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: s2 >= 0, s2 <= 1, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 2 + z' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + z''] geq: runtime: O(n^1) [2 + z'], size: O(1) [1] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: div 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: div(z, z') -{ 2 + 2*z' }-> if(s1, 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s1 >= 0, s1 <= 1, s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 + z' }-> if(s2, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: s2 >= 0, s2 <= 1, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 2 + z' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {div} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + z''] geq: runtime: O(n^1) [2 + z'], size: O(1) [1] div: runtime: ?, size: O(1) [1] ---------------------------------------- (39) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: div after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 5 + 2*z' ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: div(z, z') -{ 2 + 2*z' }-> if(s1, 1 + div(s', 1 + (1 + (z' - 2))), 0) :|: s1 >= 0, s1 <= 1, s' >= 0, s' <= 0, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 2 + z' }-> if(s2, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: s2 >= 0, s2 <= 1, z' - 2 >= 0, z - 2 >= 0 div(z, z') -{ 3 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z = 1 + 0, z' = 1 + 0 div(z, z') -{ 2 }-> if(1, 1 + div(0, 1 + 0), 0) :|: z - 1 >= 0, z' = 1 + 0 div(z, z') -{ 3 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 2 }-> if(0, 1 + div(0, 1 + (1 + (z' - 2))), 0) :|: z' - 2 >= 0, z = 1 + 0 div(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 div(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 geq(z, z') -{ 2 + z' }-> s'' :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 geq(z, z') -{ 1 }-> 1 :|: z >= 0, z' = 0 geq(z, z') -{ 1 }-> 0 :|: z' - 1 >= 0, z = 0 if(z, z', z'') -{ 1 }-> z' :|: z'' >= 0, z = 1, z' >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' >= 0, z = 0 minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(1) [0] if: runtime: O(1) [1], size: O(n^1) [z' + z''] geq: runtime: O(n^1) [2 + z'], size: O(1) [1] div: runtime: O(n^1) [5 + 2*z'], size: O(1) [1] ---------------------------------------- (41) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (42) BOUNDS(1, n^1) ---------------------------------------- (43) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (44) Obligation: Complexity Dependency Tuples Problem Rules: minus(0, z0) -> 0 minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0) -> true geq(0, s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0, s(z0)) -> 0 div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Tuples: MINUS(0, z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0) -> c2 GEQ(0, s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0, s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 S tuples: MINUS(0, z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0) -> c2 GEQ(0, s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0, s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 K tuples:none Defined Rule Symbols: minus_2, geq_2, div_2, if_3 Defined Pair Symbols: MINUS_2, GEQ_2, DIV_2, IF_3 Compound Symbols: c, c1_1, c2, c3, c4_1, c5, c6_2, c7_3, c8, c9 ---------------------------------------- (45) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (46) 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: MINUS(0, z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0) -> c2 GEQ(0, s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0, s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 The (relative) TRS S consists of the following rules: minus(0, z0) -> 0 minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0) -> true geq(0, s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0, s(z0)) -> 0 div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0) if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Rewrite Strategy: INNERMOST ---------------------------------------- (47) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (48) 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: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 The (relative) TRS S consists of the following rules: minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Rewrite Strategy: INNERMOST ---------------------------------------- (49) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (50) Obligation: Innermost TRS: Rules: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 ---------------------------------------- (51) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: MINUS, GEQ, DIV, geq, div, minus They will be analysed ascendingly in the following order: MINUS < DIV GEQ < DIV geq < DIV div < DIV minus < DIV geq < div minus < div ---------------------------------------- (52) Obligation: Innermost TRS: Rules: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 Generator Equations: gen_c:c17_10(0) <=> c gen_c:c17_10(+(x, 1)) <=> c1(gen_c:c17_10(x)) gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c2:c3:c49_10(0) <=> c2 gen_c2:c3:c49_10(+(x, 1)) <=> c4(gen_c2:c3:c49_10(x)) gen_c5:c6:c710_10(0) <=> c5 gen_c5:c6:c710_10(+(x, 1)) <=> c7(c8, gen_c5:c6:c710_10(x), c) The following defined symbols remain to be analysed: MINUS, GEQ, DIV, geq, div, minus They will be analysed ascendingly in the following order: MINUS < DIV GEQ < DIV geq < DIV div < DIV minus < DIV geq < div minus < div ---------------------------------------- (53) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: MINUS(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> gen_c:c17_10(n12_10), rt in Omega(1 + n12_10) Induction Base: MINUS(gen_0':s8_10(0), gen_0':s8_10(0)) ->_R^Omega(1) c Induction Step: MINUS(gen_0':s8_10(+(n12_10, 1)), gen_0':s8_10(+(n12_10, 1))) ->_R^Omega(1) c1(MINUS(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10))) ->_IH c1(gen_c:c17_10(c13_10)) 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: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 Generator Equations: gen_c:c17_10(0) <=> c gen_c:c17_10(+(x, 1)) <=> c1(gen_c:c17_10(x)) gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c2:c3:c49_10(0) <=> c2 gen_c2:c3:c49_10(+(x, 1)) <=> c4(gen_c2:c3:c49_10(x)) gen_c5:c6:c710_10(0) <=> c5 gen_c5:c6:c710_10(+(x, 1)) <=> c7(c8, gen_c5:c6:c710_10(x), c) The following defined symbols remain to be analysed: MINUS, GEQ, DIV, geq, div, minus They will be analysed ascendingly in the following order: MINUS < DIV GEQ < DIV geq < DIV div < DIV minus < DIV geq < div minus < div ---------------------------------------- (56) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (57) BOUNDS(n^1, INF) ---------------------------------------- (58) Obligation: Innermost TRS: Rules: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 Lemmas: MINUS(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> gen_c:c17_10(n12_10), rt in Omega(1 + n12_10) Generator Equations: gen_c:c17_10(0) <=> c gen_c:c17_10(+(x, 1)) <=> c1(gen_c:c17_10(x)) gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c2:c3:c49_10(0) <=> c2 gen_c2:c3:c49_10(+(x, 1)) <=> c4(gen_c2:c3:c49_10(x)) gen_c5:c6:c710_10(0) <=> c5 gen_c5:c6:c710_10(+(x, 1)) <=> c7(c8, gen_c5:c6:c710_10(x), c) The following defined symbols remain to be analysed: GEQ, DIV, geq, div, minus They will be analysed ascendingly in the following order: GEQ < DIV geq < DIV div < DIV minus < DIV geq < div minus < div ---------------------------------------- (59) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: GEQ(gen_0':s8_10(n402_10), gen_0':s8_10(n402_10)) -> gen_c2:c3:c49_10(n402_10), rt in Omega(1 + n402_10) Induction Base: GEQ(gen_0':s8_10(0), gen_0':s8_10(0)) ->_R^Omega(1) c2 Induction Step: GEQ(gen_0':s8_10(+(n402_10, 1)), gen_0':s8_10(+(n402_10, 1))) ->_R^Omega(1) c4(GEQ(gen_0':s8_10(n402_10), gen_0':s8_10(n402_10))) ->_IH c4(gen_c2:c3:c49_10(c403_10)) 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: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 Lemmas: MINUS(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> gen_c:c17_10(n12_10), rt in Omega(1 + n12_10) GEQ(gen_0':s8_10(n402_10), gen_0':s8_10(n402_10)) -> gen_c2:c3:c49_10(n402_10), rt in Omega(1 + n402_10) Generator Equations: gen_c:c17_10(0) <=> c gen_c:c17_10(+(x, 1)) <=> c1(gen_c:c17_10(x)) gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c2:c3:c49_10(0) <=> c2 gen_c2:c3:c49_10(+(x, 1)) <=> c4(gen_c2:c3:c49_10(x)) gen_c5:c6:c710_10(0) <=> c5 gen_c5:c6:c710_10(+(x, 1)) <=> c7(c8, gen_c5:c6:c710_10(x), c) The following defined symbols remain to be analysed: geq, DIV, div, minus They will be analysed ascendingly in the following order: geq < DIV div < DIV minus < DIV geq < div minus < div ---------------------------------------- (61) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: geq(gen_0':s8_10(n1051_10), gen_0':s8_10(n1051_10)) -> true, rt in Omega(0) Induction Base: geq(gen_0':s8_10(0), gen_0':s8_10(0)) ->_R^Omega(0) true Induction Step: geq(gen_0':s8_10(+(n1051_10, 1)), gen_0':s8_10(+(n1051_10, 1))) ->_R^Omega(0) geq(gen_0':s8_10(n1051_10), gen_0':s8_10(n1051_10)) ->_IH true We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (62) Obligation: Innermost TRS: Rules: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 Lemmas: MINUS(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> gen_c:c17_10(n12_10), rt in Omega(1 + n12_10) GEQ(gen_0':s8_10(n402_10), gen_0':s8_10(n402_10)) -> gen_c2:c3:c49_10(n402_10), rt in Omega(1 + n402_10) geq(gen_0':s8_10(n1051_10), gen_0':s8_10(n1051_10)) -> true, rt in Omega(0) Generator Equations: gen_c:c17_10(0) <=> c gen_c:c17_10(+(x, 1)) <=> c1(gen_c:c17_10(x)) gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c2:c3:c49_10(0) <=> c2 gen_c2:c3:c49_10(+(x, 1)) <=> c4(gen_c2:c3:c49_10(x)) gen_c5:c6:c710_10(0) <=> c5 gen_c5:c6:c710_10(+(x, 1)) <=> c7(c8, gen_c5:c6:c710_10(x), c) The following defined symbols remain to be analysed: minus, DIV, div They will be analysed ascendingly in the following order: div < DIV minus < DIV minus < div ---------------------------------------- (63) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s8_10(n1411_10), gen_0':s8_10(n1411_10)) -> gen_0':s8_10(0), rt in Omega(0) Induction Base: minus(gen_0':s8_10(0), gen_0':s8_10(0)) ->_R^Omega(0) 0' Induction Step: minus(gen_0':s8_10(+(n1411_10, 1)), gen_0':s8_10(+(n1411_10, 1))) ->_R^Omega(0) minus(gen_0':s8_10(n1411_10), gen_0':s8_10(n1411_10)) ->_IH gen_0':s8_10(0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (64) Obligation: Innermost TRS: Rules: MINUS(0', z0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) GEQ(z0, 0') -> c2 GEQ(0', s(z0)) -> c3 GEQ(s(z0), s(z1)) -> c4(GEQ(z0, z1)) DIV(0', s(z0)) -> c5 DIV(s(z0), s(z1)) -> c6(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), GEQ(z0, z1)) DIV(s(z0), s(z1)) -> c7(IF(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0'), DIV(minus(z0, z1), s(z1)), MINUS(z0, z1)) IF(true, z0, z1) -> c8 IF(false, z0, z1) -> c9 minus(0', z0) -> 0' minus(s(z0), s(z1)) -> minus(z0, z1) geq(z0, 0') -> true geq(0', s(z0)) -> false geq(s(z0), s(z1)) -> geq(z0, z1) div(0', s(z0)) -> 0' div(s(z0), s(z1)) -> if(geq(z0, z1), s(div(minus(z0, z1), s(z1))), 0') if(true, z0, z1) -> z0 if(false, z0, z1) -> z1 Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 GEQ :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 DIV :: 0':s -> 0':s -> c5:c6:c7 c5 :: c5:c6:c7 c6 :: c8:c9 -> c2:c3:c4 -> c5:c6:c7 IF :: true:false -> 0':s -> 0':s -> c8:c9 geq :: 0':s -> 0':s -> true:false div :: 0':s -> 0':s -> 0':s minus :: 0':s -> 0':s -> 0':s c7 :: c8:c9 -> c5:c6:c7 -> c:c1 -> c5:c6:c7 true :: true:false c8 :: c8:c9 false :: true:false c9 :: c8:c9 if :: true:false -> 0':s -> 0':s -> 0':s hole_c:c11_10 :: c:c1 hole_0':s2_10 :: 0':s hole_c2:c3:c43_10 :: c2:c3:c4 hole_c5:c6:c74_10 :: c5:c6:c7 hole_c8:c95_10 :: c8:c9 hole_true:false6_10 :: true:false gen_c:c17_10 :: Nat -> c:c1 gen_0':s8_10 :: Nat -> 0':s gen_c2:c3:c49_10 :: Nat -> c2:c3:c4 gen_c5:c6:c710_10 :: Nat -> c5:c6:c7 Lemmas: MINUS(gen_0':s8_10(n12_10), gen_0':s8_10(n12_10)) -> gen_c:c17_10(n12_10), rt in Omega(1 + n12_10) GEQ(gen_0':s8_10(n402_10), gen_0':s8_10(n402_10)) -> gen_c2:c3:c49_10(n402_10), rt in Omega(1 + n402_10) geq(gen_0':s8_10(n1051_10), gen_0':s8_10(n1051_10)) -> true, rt in Omega(0) minus(gen_0':s8_10(n1411_10), gen_0':s8_10(n1411_10)) -> gen_0':s8_10(0), rt in Omega(0) Generator Equations: gen_c:c17_10(0) <=> c gen_c:c17_10(+(x, 1)) <=> c1(gen_c:c17_10(x)) gen_0':s8_10(0) <=> 0' gen_0':s8_10(+(x, 1)) <=> s(gen_0':s8_10(x)) gen_c2:c3:c49_10(0) <=> c2 gen_c2:c3:c49_10(+(x, 1)) <=> c4(gen_c2:c3:c49_10(x)) gen_c5:c6:c710_10(0) <=> c5 gen_c5:c6:c710_10(+(x, 1)) <=> c7(c8, gen_c5:c6:c710_10(x), c) The following defined symbols remain to be analysed: div, DIV They will be analysed ascendingly in the following order: div < DIV