/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxWeightedTrs (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxTypedWeightedTrs (7) CompletionProof [UPPER BOUND(ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (12) CpxRNTS (13) InliningProof [UPPER BOUND(ID), 519 ms] (14) CpxRNTS (15) SimplificationProof [BOTH BOUNDS(ID, ID), 4 ms] (16) CpxRNTS (17) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 354 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 160 ms] (24) CpxRNTS (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 140 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 5 ms] (30) CpxRNTS (31) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 1052 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 1180 ms] (36) CpxRNTS (37) FinalProof [FINISHED, 0 ms] (38) BOUNDS(1, n^2) (39) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (40) CpxTRS (41) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (42) typed CpxTrs (43) OrderProof [LOWER BOUND(ID), 0 ms] (44) typed CpxTrs (45) RewriteLemmaProof [LOWER BOUND(ID), 289 ms] (46) BEST (47) proven lower bound (48) LowerBoundPropagationProof [FINISHED, 0 ms] (49) BOUNDS(n^1, INF) (50) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: -(x, 0) -> x -(s(x), s(y)) -> -(x, y) p(s(x)) -> x f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: -(x, 0) -> x [1] -(s(x), s(y)) -> -(x, y) [1] p(s(x)) -> x [1] f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) [1] f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: - => minus ---------------------------------------- (4) 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: minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] p(s(x)) -> x [1] f(s(x), y) -> f(p(minus(s(x), y)), p(minus(y, s(x)))) [1] f(x, s(y)) -> f(p(minus(x, s(y))), p(minus(s(y), x))) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] p(s(x)) -> x [1] f(s(x), y) -> f(p(minus(s(x), y)), p(minus(y, s(x)))) [1] f(x, s(y)) -> f(p(minus(x, s(y))), p(minus(s(y), x))) [1] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s p :: 0:s -> 0:s f :: 0:s -> 0:s -> f Rewrite Strategy: INNERMOST ---------------------------------------- (7) 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: f_2 (c) The following functions are completely defined: p_1 minus_2 Due to the following rules being added: p(v0) -> 0 [0] minus(v0, v1) -> 0 [0] And the following fresh constants: const ---------------------------------------- (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(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] p(s(x)) -> x [1] f(s(x), y) -> f(p(minus(s(x), y)), p(minus(y, s(x)))) [1] f(x, s(y)) -> f(p(minus(x, s(y))), p(minus(s(y), x))) [1] p(v0) -> 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 p :: 0:s -> 0:s f :: 0:s -> 0:s -> f const :: f Rewrite Strategy: INNERMOST ---------------------------------------- (9) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (10) 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(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] p(s(x)) -> x [1] f(s(x), 0) -> f(p(s(x)), p(0)) [2] f(s(x), s(y')) -> f(p(minus(x, y')), p(minus(y', x))) [3] f(s(x), s(y')) -> f(p(minus(x, y')), p(0)) [2] f(s(x), s(x')) -> f(p(0), p(minus(x', x))) [2] f(s(x), y) -> f(p(0), p(0)) [1] f(s(x''), s(y)) -> f(p(minus(x'', y)), p(minus(y, x''))) [3] f(s(x''), s(y)) -> f(p(minus(x'', y)), p(0)) [2] f(0, s(y)) -> f(p(0), p(s(y))) [2] f(s(y''), s(y)) -> f(p(0), p(minus(y, y''))) [2] f(x, s(y)) -> f(p(0), p(0)) [1] p(v0) -> 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 p :: 0:s -> 0:s f :: 0:s -> 0:s -> f const :: f Rewrite Strategy: INNERMOST ---------------------------------------- (11) 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 const => 0 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(p(minus(x, y')), p(minus(y', x))) :|: x >= 0, y' >= 0, z = 1 + x, z' = 1 + y' f(z, z') -{ 2 }-> f(p(minus(x, y')), p(0)) :|: x >= 0, y' >= 0, z = 1 + x, z' = 1 + y' f(z, z') -{ 3 }-> f(p(minus(x'', y)), p(minus(y, x''))) :|: z = 1 + x'', z' = 1 + y, y >= 0, x'' >= 0 f(z, z') -{ 2 }-> f(p(minus(x'', y)), p(0)) :|: z = 1 + x'', z' = 1 + y, y >= 0, x'' >= 0 f(z, z') -{ 2 }-> f(p(0), p(minus(x', x))) :|: z' = 1 + x', x >= 0, x' >= 0, z = 1 + x f(z, z') -{ 2 }-> f(p(0), p(minus(y, y''))) :|: z' = 1 + y, z = 1 + y'', y >= 0, y'' >= 0 f(z, z') -{ 1 }-> f(p(0), p(0)) :|: x >= 0, y >= 0, z = 1 + x, z' = y f(z, z') -{ 1 }-> f(p(0), p(0)) :|: z' = 1 + y, x >= 0, y >= 0, z = x f(z, z') -{ 2 }-> f(p(0), p(1 + y)) :|: z' = 1 + y, y >= 0, z = 0 f(z, z') -{ 2 }-> f(p(1 + x), p(0)) :|: x >= 0, z = 1 + x, z' = 0 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ---------------------------------------- (13) 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) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: x >= 0, z = 1 + x, z' = 0, x' >= 0, 1 + x = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(x, y')), p(minus(y', x))) :|: x >= 0, y' >= 0, z = 1 + x, z' = 1 + y' f(z, z') -{ 2 }-> f(p(minus(x, y')), 0) :|: x >= 0, y' >= 0, z = 1 + x, z' = 1 + y', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(x'', y)), p(minus(y, x''))) :|: z = 1 + x'', z' = 1 + y, y >= 0, x'' >= 0 f(z, z') -{ 2 }-> f(p(minus(x'', y)), 0) :|: z = 1 + x'', z' = 1 + y, y >= 0, x'' >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' = 1 + y, y >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + y = 1 + x f(z, z') -{ 2 }-> f(0, p(minus(x', x))) :|: z' = 1 + x', x >= 0, x' >= 0, z = 1 + x, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, p(minus(y, y''))) :|: z' = 1 + y, z = 1 + y'', y >= 0, y'' >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: x >= 0, z = 1 + x, z' = 0, v0 >= 0, 1 + x = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: x >= 0, y >= 0, z = 1 + x, z' = y, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' = 1 + y, y >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + y = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z' = 1 + y, x >= 0, y >= 0, z = x, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ---------------------------------------- (15) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(z - 1, z' - 1)), p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 }-> f(p(minus(z - 1, z' - 1)), 0) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 ---------------------------------------- (17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { minus } { p } { f } ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(z - 1, z' - 1)), p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 }-> f(p(minus(z - 1, z' - 1)), 0) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {minus}, {p}, {f} ---------------------------------------- (19) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(z - 1, z' - 1)), p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 }-> f(p(minus(z - 1, z' - 1)), 0) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {minus}, {p}, {f} ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: minus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(z - 1, z' - 1)), p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 }-> f(p(minus(z - 1, z' - 1)), 0) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {minus}, {p}, {f} Previous analysis results are: minus: runtime: ?, size: O(n^1) [z] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: minus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(p(minus(z - 1, z' - 1)), p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 }-> f(p(minus(z - 1, z' - 1)), 0) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, p(minus(z' - 1, z - 1))) :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 1 }-> minus(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {p}, {f} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] ---------------------------------------- (25) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 + z + z' }-> f(p(s'), p(s'')) :|: s' >= 0, s' <= z - 1, s'' >= 0, s'' <= z' - 1, z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 + z' }-> f(p(s1), 0) :|: s1 >= 0, s1 <= z - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 + z }-> f(0, p(s2)) :|: s2 >= 0, s2 <= z' - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= z - 1, z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {p}, {f} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] ---------------------------------------- (27) 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 ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 + z + z' }-> f(p(s'), p(s'')) :|: s' >= 0, s' <= z - 1, s'' >= 0, s'' <= z' - 1, z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 + z' }-> f(p(s1), 0) :|: s1 >= 0, s1 <= z - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 + z }-> f(0, p(s2)) :|: s2 >= 0, s2 <= z' - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= z - 1, z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {p}, {f} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] p: runtime: ?, size: O(n^1) [z] ---------------------------------------- (29) 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 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 + z + z' }-> f(p(s'), p(s'')) :|: s' >= 0, s' <= z - 1, s'' >= 0, s'' <= z' - 1, z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 2 + z' }-> f(p(s1), 0) :|: s1 >= 0, s1 <= z - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 + z }-> f(0, p(s2)) :|: s2 >= 0, s2 <= z' - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= z - 1, z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {f} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] p: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (31) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 5 + z + z' }-> f(s3, s4) :|: s3 >= 0, s3 <= s', s4 >= 0, s4 <= s'', s' >= 0, s' <= z - 1, s'' >= 0, s'' <= z' - 1, z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 3 + z' }-> f(s5, 0) :|: s5 >= 0, s5 <= s1, s1 >= 0, s1 <= z - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 + z }-> f(0, s6) :|: s6 >= 0, s6 <= s2, s2 >= 0, s2 <= z' - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= z - 1, z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {f} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] p: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: f after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 5 + z + z' }-> f(s3, s4) :|: s3 >= 0, s3 <= s', s4 >= 0, s4 <= s'', s' >= 0, s' <= z - 1, s'' >= 0, s'' <= z' - 1, z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 3 + z' }-> f(s5, 0) :|: s5 >= 0, s5 <= s1, s1 >= 0, s1 <= z - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 + z }-> f(0, s6) :|: s6 >= 0, s6 <= s2, s2 >= 0, s2 <= z' - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= z - 1, z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: {f} Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] p: runtime: O(1) [1], size: O(n^1) [z] f: runtime: ?, size: O(1) [0] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: f after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 17 + 8*z + z*z' + z^2 + 8*z' + z'^2 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: f(z, z') -{ 5 + z + z' }-> f(s3, s4) :|: s3 >= 0, s3 <= s', s4 >= 0, s4 <= s'', s' >= 0, s' <= z - 1, s'' >= 0, s'' <= z' - 1, z - 1 >= 0, z' - 1 >= 0 f(z, z') -{ 3 + z' }-> f(s5, 0) :|: s5 >= 0, s5 <= s1, s1 >= 0, s1 <= z - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(x', 0) :|: z - 1 >= 0, z' = 0, x' >= 0, 1 + (z - 1) = 1 + x', v0 >= 0, 0 = v0 f(z, z') -{ 3 + z }-> f(0, s6) :|: s6 >= 0, s6 <= s2, s2 >= 0, s2 <= z' - 1, z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0 f(z, z') -{ 3 }-> f(0, x) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, x >= 0, 1 + (z' - 1) = 1 + x f(z, z') -{ 2 }-> f(0, 0) :|: z - 1 >= 0, z' = 0, v0 >= 0, 1 + (z - 1) = v0, v0' >= 0, 0 = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z - 1 >= 0, z' >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' f(z, z') -{ 2 }-> f(0, 0) :|: z' - 1 >= 0, z = 0, v0 >= 0, 0 = v0, v0' >= 0, 1 + (z' - 1) = v0' f(z, z') -{ 1 }-> f(0, 0) :|: z >= 0, z' - 1 >= 0, v0 >= 0, 0 = v0, v0' >= 0, 0 = v0' minus(z, z') -{ 1 + z' }-> s :|: s >= 0, s <= z - 1, z - 1 >= 0, z' - 1 >= 0 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 minus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 p(z) -{ 0 }-> 0 :|: z >= 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 Function symbols to be analyzed: Previous analysis results are: minus: runtime: O(n^1) [1 + z'], size: O(n^1) [z] p: runtime: O(1) [1], size: O(n^1) [z] f: runtime: O(n^2) [17 + 8*z + z*z' + z^2 + 8*z' + z'^2], size: O(1) [0] ---------------------------------------- (37) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (38) BOUNDS(1, n^2) ---------------------------------------- (39) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (40) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: -(x, 0') -> x -(s(x), s(y)) -> -(x, y) p(s(x)) -> x f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (41) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (42) Obligation: Innermost TRS: Rules: -(x, 0') -> x -(s(x), s(y)) -> -(x, y) p(s(x)) -> x f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) Types: - :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s p :: 0':s -> 0':s f :: 0':s -> 0':s -> f hole_0':s1_0 :: 0':s hole_f2_0 :: f gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (43) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: -, f They will be analysed ascendingly in the following order: - < f ---------------------------------------- (44) Obligation: Innermost TRS: Rules: -(x, 0') -> x -(s(x), s(y)) -> -(x, y) p(s(x)) -> x f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) Types: - :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s p :: 0':s -> 0':s f :: 0':s -> 0':s -> f hole_0':s1_0 :: 0':s hole_f2_0 :: f gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: -, f They will be analysed ascendingly in the following order: - < f ---------------------------------------- (45) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: -(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(0), rt in Omega(1 + n5_0) Induction Base: -(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) gen_0':s3_0(0) Induction Step: -(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) -(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH gen_0':s3_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (46) Complex Obligation (BEST) ---------------------------------------- (47) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: -(x, 0') -> x -(s(x), s(y)) -> -(x, y) p(s(x)) -> x f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) Types: - :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s p :: 0':s -> 0':s f :: 0':s -> 0':s -> f hole_0':s1_0 :: 0':s hole_f2_0 :: f gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: -, f They will be analysed ascendingly in the following order: - < f ---------------------------------------- (48) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (49) BOUNDS(n^1, INF) ---------------------------------------- (50) Obligation: Innermost TRS: Rules: -(x, 0') -> x -(s(x), s(y)) -> -(x, y) p(s(x)) -> x f(s(x), y) -> f(p(-(s(x), y)), p(-(y, s(x)))) f(x, s(y)) -> f(p(-(x, s(y))), p(-(s(y), x))) Types: - :: 0':s -> 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s p :: 0':s -> 0':s f :: 0':s -> 0':s -> f hole_0':s1_0 :: 0':s hole_f2_0 :: f gen_0':s3_0 :: Nat -> 0':s Lemmas: -(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> gen_0':s3_0(0), rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: f