/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^3), O(n^3)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). (0) CpxTRS (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) SimplificationProof [BOTH BOUNDS(ID, ID), 0 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), 192 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 65 ms] (24) CpxRNTS (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 68 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 78 ms] (30) CpxRNTS (31) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 292 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 83 ms] (36) CpxRNTS (37) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 229 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 72 ms] (42) CpxRNTS (43) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (44) CpxRNTS (45) IntTrsBoundProof [UPPER BOUND(ID), 390 ms] (46) CpxRNTS (47) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (48) CpxRNTS (49) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (50) CpxRNTS (51) IntTrsBoundProof [UPPER BOUND(ID), 457 ms] (52) CpxRNTS (53) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (54) CpxRNTS (55) FinalProof [FINISHED, 0 ms] (56) BOUNDS(1, n^3) (57) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (58) CpxTRS (59) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (60) typed CpxTrs (61) OrderProof [LOWER BOUND(ID), 0 ms] (62) typed CpxTrs (63) RewriteLemmaProof [LOWER BOUND(ID), 266 ms] (64) BEST (65) proven lower bound (66) LowerBoundPropagationProof [FINISHED, 0 ms] (67) BOUNDS(n^1, INF) (68) typed CpxTrs (69) RewriteLemmaProof [LOWER BOUND(ID), 87 ms] (70) typed CpxTrs (71) RewriteLemmaProof [LOWER BOUND(ID), 43 ms] (72) BEST (73) proven lower bound (74) LowerBoundPropagationProof [FINISHED, 0 ms] (75) BOUNDS(n^3, INF) (76) typed CpxTrs (77) RewriteLemmaProof [LOWER BOUND(ID), 8 ms] (78) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0) -> 0 half(s(0)) -> 0 half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) The following defined symbols can occur below the 0th argument of add: sqr, add, dbl The following defined symbols can occur below the 1th argument of add: dbl Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: half(dbl(X)) -> X ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^3). The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0) -> 0 half(s(0)) -> 0 half(s(s(X))) -> s(half(X)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. The duplicating contexts are: sqr(s([])) The defined contexts are: add([], x1) add(x0, []) As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^3). The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N))) sqr(0) -> 0 sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0) -> 0 dbl(s(X)) -> s(s(dbl(X))) add(0, X) -> X add(s(X), Y) -> s(add(X, Y)) first(0, X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0) -> 0 half(s(0)) -> 0 half(s(s(X))) -> s(half(X)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3). The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N))) [1] sqr(0) -> 0 [1] sqr(s(X)) -> s(add(sqr(X), dbl(X))) [1] dbl(0) -> 0 [1] dbl(s(X)) -> s(s(dbl(X))) [1] add(0, X) -> X [1] add(s(X), Y) -> s(add(X, Y)) [1] first(0, X) -> nil [1] first(s(X), cons(Y)) -> cons(Y) [1] half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(X))) -> s(half(X)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N))) [1] sqr(0) -> 0 [1] sqr(s(X)) -> s(add(sqr(X), dbl(X))) [1] dbl(0) -> 0 [1] dbl(s(X)) -> s(s(dbl(X))) [1] add(0, X) -> X [1] add(s(X), Y) -> s(add(X, Y)) [1] first(0, X) -> nil [1] first(s(X), cons(Y)) -> cons(Y) [1] half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(X))) -> s(half(X)) [1] The TRS has the following type information: terms :: 0:s -> cons:nil cons :: recip -> cons:nil recip :: 0:s -> recip sqr :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s add :: 0:s -> 0:s -> 0:s dbl :: 0:s -> 0:s first :: 0:s -> cons:nil -> cons:nil nil :: cons:nil half :: 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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: terms_1 first_2 half_1 (c) The following functions are completely defined: sqr_1 dbl_1 add_2 Due to the following rules being added: none And the following fresh constants: const ---------------------------------------- (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: terms(N) -> cons(recip(sqr(N))) [1] sqr(0) -> 0 [1] sqr(s(X)) -> s(add(sqr(X), dbl(X))) [1] dbl(0) -> 0 [1] dbl(s(X)) -> s(s(dbl(X))) [1] add(0, X) -> X [1] add(s(X), Y) -> s(add(X, Y)) [1] first(0, X) -> nil [1] first(s(X), cons(Y)) -> cons(Y) [1] half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(X))) -> s(half(X)) [1] The TRS has the following type information: terms :: 0:s -> cons:nil cons :: recip -> cons:nil recip :: 0:s -> recip sqr :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s add :: 0:s -> 0:s -> 0:s dbl :: 0:s -> 0:s first :: 0:s -> cons:nil -> cons:nil nil :: cons:nil half :: 0:s -> 0:s const :: recip Rewrite Strategy: INNERMOST ---------------------------------------- (11) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (12) 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: terms(N) -> cons(recip(sqr(N))) [1] sqr(0) -> 0 [1] sqr(s(0)) -> s(add(0, 0)) [3] sqr(s(s(X'))) -> s(add(s(add(sqr(X'), dbl(X'))), s(s(dbl(X'))))) [3] dbl(0) -> 0 [1] dbl(s(X)) -> s(s(dbl(X))) [1] add(0, X) -> X [1] add(s(X), Y) -> s(add(X, Y)) [1] first(0, X) -> nil [1] first(s(X), cons(Y)) -> cons(Y) [1] half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(X))) -> s(half(X)) [1] The TRS has the following type information: terms :: 0:s -> cons:nil cons :: recip -> cons:nil recip :: 0:s -> recip sqr :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s add :: 0:s -> 0:s -> 0:s dbl :: 0:s -> 0:s first :: 0:s -> cons:nil -> cons:nil nil :: cons:nil half :: 0:s -> 0:s const :: recip Rewrite Strategy: INNERMOST ---------------------------------------- (13) 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 nil => 0 const => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> X :|: z' = X, X >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(X, Y) :|: z = 1 + X, z' = Y, Y >= 0, X >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(X)) :|: z = 1 + X, X >= 0 first(z, z') -{ 1 }-> 0 :|: z' = X, X >= 0, z = 0 first(z, z') -{ 1 }-> 1 + Y :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(X) :|: z = 1 + (1 + X), X >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(X'), dbl(X')), 1 + (1 + dbl(X'))) :|: X' >= 0, z = 1 + (1 + X') terms(z) -{ 1 }-> 1 + (1 + sqr(N)) :|: z = N, N >= 0 ---------------------------------------- (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: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 ---------------------------------------- (17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { first } { dbl } { add } { half } { sqr } { terms } ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {first}, {dbl}, {add}, {half}, {sqr}, {terms} ---------------------------------------- (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: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {first}, {dbl}, {add}, {half}, {sqr}, {terms} ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: first 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: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {first}, {dbl}, {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: first after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {dbl}, {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], 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: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {dbl}, {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] ---------------------------------------- (27) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: dbl after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2*z ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {dbl}, {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: ?, size: O(n^1) [2*z] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: dbl after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 }-> 1 + (1 + dbl(z - 1)) :|: z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 3 }-> 1 + add(1 + add(sqr(z - 2), dbl(z - 2)), 1 + (1 + dbl(z - 2))) :|: z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*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: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: add after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {add}, {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: ?, size: O(n^1) [z + z'] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: add after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 }-> 1 + add(z - 1, z') :|: z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 3 }-> 1 + add(0, 0) :|: z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (37) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (39) 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 ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {half}, {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: ?, size: O(n^1) [z] ---------------------------------------- (41) 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 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (43) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 2, z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (45) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: sqr after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 1 + 4*z + 4*z^2 ---------------------------------------- (46) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 2, z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {sqr}, {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] sqr: runtime: ?, size: O(n^2) [1 + 4*z + 4*z^2] ---------------------------------------- (47) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: sqr after applying outer abstraction to obtain an ITS, resulting in: O(n^3) with polynomial bound: 5 + 22*z + 8*z^3 ---------------------------------------- (48) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 2, z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ 1 + 2*z }-> 1 + add(1 + add(sqr(z - 2), s), 1 + (1 + s')) :|: s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 1 }-> 1 + (1 + sqr(z)) :|: z >= 0 Function symbols to be analyzed: {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] sqr: runtime: O(n^3) [5 + 22*z + 8*z^3], size: O(n^2) [1 + 4*z + 4*z^2] ---------------------------------------- (49) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 2, z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ -99 + s5 + s6 + 120*z + -48*z^2 + 8*z^3 }-> 1 + s7 :|: s5 >= 0, s5 <= 4 * ((z - 2) * (z - 2)) + 4 * (z - 2) + 1, s6 >= 0, s6 <= s5 + s, s7 >= 0, s7 <= 1 + s6 + (1 + (1 + s')), s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 6 + 22*z + 8*z^3 }-> 1 + (1 + s4) :|: s4 >= 0, s4 <= 4 * (z * z) + 4 * z + 1, z >= 0 Function symbols to be analyzed: {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] sqr: runtime: O(n^3) [5 + 22*z + 8*z^3], size: O(n^2) [1 + 4*z + 4*z^2] ---------------------------------------- (51) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: terms after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 3 + 4*z + 4*z^2 ---------------------------------------- (52) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 2, z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ -99 + s5 + s6 + 120*z + -48*z^2 + 8*z^3 }-> 1 + s7 :|: s5 >= 0, s5 <= 4 * ((z - 2) * (z - 2)) + 4 * (z - 2) + 1, s6 >= 0, s6 <= s5 + s, s7 >= 0, s7 <= 1 + s6 + (1 + (1 + s')), s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 6 + 22*z + 8*z^3 }-> 1 + (1 + s4) :|: s4 >= 0, s4 <= 4 * (z * z) + 4 * z + 1, z >= 0 Function symbols to be analyzed: {terms} Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] sqr: runtime: O(n^3) [5 + 22*z + 8*z^3], size: O(n^2) [1 + 4*z + 4*z^2] terms: runtime: ?, size: O(n^2) [3 + 4*z + 4*z^2] ---------------------------------------- (53) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: terms after applying outer abstraction to obtain an ITS, resulting in: O(n^3) with polynomial bound: 6 + 22*z + 8*z^3 ---------------------------------------- (54) Obligation: Complexity RNTS consisting of the following rules: add(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 add(z, z') -{ 1 + z }-> 1 + s2 :|: s2 >= 0, s2 <= z - 1 + z', z' >= 0, z - 1 >= 0 dbl(z) -{ 1 }-> 0 :|: z = 0 dbl(z) -{ 1 + z }-> 1 + (1 + s'') :|: s'' >= 0, s'' <= 2 * (z - 1), z - 1 >= 0 first(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 first(z, z') -{ 1 }-> 1 + (z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 2, z - 2 >= 0 sqr(z) -{ 1 }-> 0 :|: z = 0 sqr(z) -{ 4 }-> 1 + s1 :|: s1 >= 0, s1 <= 0 + 0, z = 1 + 0 sqr(z) -{ -99 + s5 + s6 + 120*z + -48*z^2 + 8*z^3 }-> 1 + s7 :|: s5 >= 0, s5 <= 4 * ((z - 2) * (z - 2)) + 4 * (z - 2) + 1, s6 >= 0, s6 <= s5 + s, s7 >= 0, s7 <= 1 + s6 + (1 + (1 + s')), s >= 0, s <= 2 * (z - 2), s' >= 0, s' <= 2 * (z - 2), z - 2 >= 0 terms(z) -{ 6 + 22*z + 8*z^3 }-> 1 + (1 + s4) :|: s4 >= 0, s4 <= 4 * (z * z) + 4 * z + 1, z >= 0 Function symbols to be analyzed: Previous analysis results are: first: runtime: O(1) [1], size: O(n^1) [z'] dbl: runtime: O(n^1) [1 + z], size: O(n^1) [2*z] add: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] sqr: runtime: O(n^3) [5 + 22*z + 8*z^3], size: O(n^2) [1 + 4*z + 4*z^2] terms: runtime: O(n^3) [6 + 22*z + 8*z^3], size: O(n^2) [3 + 4*z + 4*z^2] ---------------------------------------- (55) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (56) BOUNDS(1, n^3) ---------------------------------------- (57) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (58) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X S is empty. Rewrite Strategy: FULL ---------------------------------------- (59) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (60) Obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s ---------------------------------------- (61) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: sqr, add, dbl, half They will be analysed ascendingly in the following order: add < sqr dbl < sqr ---------------------------------------- (62) Obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: add, sqr, dbl, half They will be analysed ascendingly in the following order: add < sqr dbl < sqr ---------------------------------------- (63) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n6_0, b)), rt in Omega(1 + n6_0) Induction Base: add(gen_0':s4_0(0), gen_0':s4_0(b)) ->_R^Omega(1) gen_0':s4_0(b) Induction Step: add(gen_0':s4_0(+(n6_0, 1)), gen_0':s4_0(b)) ->_R^Omega(1) s(add(gen_0':s4_0(n6_0), gen_0':s4_0(b))) ->_IH s(gen_0':s4_0(+(b, c7_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (64) Complex Obligation (BEST) ---------------------------------------- (65) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: add, sqr, dbl, half They will be analysed ascendingly in the following order: add < sqr dbl < sqr ---------------------------------------- (66) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (67) BOUNDS(n^1, INF) ---------------------------------------- (68) Obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s Lemmas: add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n6_0, b)), rt in Omega(1 + n6_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: dbl, sqr, half They will be analysed ascendingly in the following order: dbl < sqr ---------------------------------------- (69) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: dbl(gen_0':s4_0(n567_0)) -> gen_0':s4_0(*(2, n567_0)), rt in Omega(1 + n567_0) Induction Base: dbl(gen_0':s4_0(0)) ->_R^Omega(1) 0' Induction Step: dbl(gen_0':s4_0(+(n567_0, 1))) ->_R^Omega(1) s(s(dbl(gen_0':s4_0(n567_0)))) ->_IH s(s(gen_0':s4_0(*(2, c568_0)))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (70) Obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s Lemmas: add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n6_0, b)), rt in Omega(1 + n6_0) dbl(gen_0':s4_0(n567_0)) -> gen_0':s4_0(*(2, n567_0)), rt in Omega(1 + n567_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: sqr, half ---------------------------------------- (71) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: sqr(gen_0':s4_0(n827_0)) -> gen_0':s4_0(*(n827_0, n827_0)), rt in Omega(1 + n827_0 + n827_0^2 + n827_0^3) Induction Base: sqr(gen_0':s4_0(0)) ->_R^Omega(1) 0' Induction Step: sqr(gen_0':s4_0(+(n827_0, 1))) ->_R^Omega(1) s(add(sqr(gen_0':s4_0(n827_0)), dbl(gen_0':s4_0(n827_0)))) ->_IH s(add(gen_0':s4_0(*(c828_0, c828_0)), dbl(gen_0':s4_0(n827_0)))) ->_L^Omega(1 + n827_0) s(add(gen_0':s4_0(*(n827_0, n827_0)), gen_0':s4_0(*(2, n827_0)))) ->_L^Omega(1 + n827_0^2) s(gen_0':s4_0(+(*(n827_0, n827_0), *(2, n827_0)))) We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). ---------------------------------------- (72) Complex Obligation (BEST) ---------------------------------------- (73) Obligation: Proved the lower bound n^3 for the following obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s Lemmas: add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n6_0, b)), rt in Omega(1 + n6_0) dbl(gen_0':s4_0(n567_0)) -> gen_0':s4_0(*(2, n567_0)), rt in Omega(1 + n567_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: sqr, half ---------------------------------------- (74) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (75) BOUNDS(n^3, INF) ---------------------------------------- (76) Obligation: TRS: Rules: terms(N) -> cons(recip(sqr(N))) sqr(0') -> 0' sqr(s(X)) -> s(add(sqr(X), dbl(X))) dbl(0') -> 0' dbl(s(X)) -> s(s(dbl(X))) add(0', X) -> X add(s(X), Y) -> s(add(X, Y)) first(0', X) -> nil first(s(X), cons(Y)) -> cons(Y) half(0') -> 0' half(s(0')) -> 0' half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X Types: terms :: 0':s -> cons:nil cons :: recip -> cons:nil recip :: 0':s -> recip sqr :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s add :: 0':s -> 0':s -> 0':s dbl :: 0':s -> 0':s first :: 0':s -> cons:nil -> cons:nil nil :: cons:nil half :: 0':s -> 0':s hole_cons:nil1_0 :: cons:nil hole_0':s2_0 :: 0':s hole_recip3_0 :: recip gen_0':s4_0 :: Nat -> 0':s Lemmas: add(gen_0':s4_0(n6_0), gen_0':s4_0(b)) -> gen_0':s4_0(+(n6_0, b)), rt in Omega(1 + n6_0) dbl(gen_0':s4_0(n567_0)) -> gen_0':s4_0(*(2, n567_0)), rt in Omega(1 + n567_0) sqr(gen_0':s4_0(n827_0)) -> gen_0':s4_0(*(n827_0, n827_0)), rt in Omega(1 + n827_0 + n827_0^2 + n827_0^3) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: half ---------------------------------------- (77) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: half(gen_0':s4_0(*(2, n1160_0))) -> gen_0':s4_0(n1160_0), rt in Omega(1 + n1160_0) Induction Base: half(gen_0':s4_0(*(2, 0))) ->_R^Omega(1) 0' Induction Step: half(gen_0':s4_0(*(2, +(n1160_0, 1)))) ->_R^Omega(1) s(half(gen_0':s4_0(*(2, n1160_0)))) ->_IH s(gen_0':s4_0(c1161_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (78) BOUNDS(1, INF)