/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 162 ms] (2) CpxRelTRS (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxWeightedTrs (5) CpxWeightedTrsRenamingProof [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), 1 ms] (18) CpxRNTS (19) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 458 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 108 ms] (24) CpxRNTS (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 1420 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 370 ms] (30) CpxRNTS (31) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 280 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 205 ms] (36) CpxRNTS (37) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 96 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (42) CpxRNTS (43) FinalProof [FINISHED, 0 ms] (44) BOUNDS(1, n^2) (45) RenamingProof [BOTH BOUNDS(ID, ID), 1 ms] (46) CpxRelTRS (47) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (48) typed CpxTrs (49) OrderProof [LOWER BOUND(ID), 0 ms] (50) typed CpxTrs (51) RewriteLemmaProof [LOWER BOUND(ID), 281 ms] (52) typed CpxTrs (53) RewriteLemmaProof [LOWER BOUND(ID), 465 ms] (54) BEST (55) proven lower bound (56) LowerBoundPropagationProof [FINISHED, 0 ms] (57) BOUNDS(n^1, INF) (58) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Rewrite Strategy: INNERMOST ---------------------------------------- (1) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Rewrite Strategy: INNERMOST ---------------------------------------- (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (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: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) [1] isort(Nil, r) -> Nil [1] insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) [1] inssort(xs) -> isort(xs, Nil) [1] <(S(x), S(y)) -> <(x, y) [0] <(0, S(y)) -> True [0] <(x, 0) -> False [0] insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) [0] insert[Ite](True, x, r) -> Cons(x, r) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (5) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: < => lt ---------------------------------------- (6) 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: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) [1] isort(Nil, r) -> Nil [1] insert(S(x), r) -> insert[Ite](lt(S(x), x), S(x), r) [1] inssort(xs) -> isort(xs, Nil) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) [0] insert[Ite](True, x, r) -> Cons(x, r) [0] 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: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) [1] isort(Nil, r) -> Nil [1] insert(S(x), r) -> insert[Ite](lt(S(x), x), S(x), r) [1] inssort(xs) -> isort(xs, Nil) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) [0] insert[Ite](True, x, r) -> Cons(x, r) [0] The TRS has the following type information: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0 -> Cons:Nil -> Cons:Nil insert :: S:0 -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0 -> S:0 insert[Ite] :: True:False -> S:0 -> Cons:Nil -> Cons:Nil lt :: S:0 -> S:0 -> True:False inssort :: Cons:Nil -> Cons:Nil 0 :: S:0 True :: True:False False :: True:False 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: isort_2 inssort_1 (c) The following functions are completely defined: insert_2 lt_2 insert[Ite]_3 Due to the following rules being added: lt(v0, v1) -> null_lt [0] insert[Ite](v0, v1, v2) -> Nil [0] insert(v0, v1) -> Nil [0] And the following fresh constants: null_lt ---------------------------------------- (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: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) [1] isort(Nil, r) -> Nil [1] insert(S(x), r) -> insert[Ite](lt(S(x), x), S(x), r) [1] inssort(xs) -> isort(xs, Nil) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) [0] insert[Ite](True, x, r) -> Cons(x, r) [0] lt(v0, v1) -> null_lt [0] insert[Ite](v0, v1, v2) -> Nil [0] insert(v0, v1) -> Nil [0] The TRS has the following type information: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0 -> Cons:Nil -> Cons:Nil insert :: S:0 -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0 -> S:0 insert[Ite] :: True:False:null_lt -> S:0 -> Cons:Nil -> Cons:Nil lt :: S:0 -> S:0 -> True:False:null_lt inssort :: Cons:Nil -> Cons:Nil 0 :: S:0 True :: True:False:null_lt False :: True:False:null_lt null_lt :: True:False:null_lt 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: isort(Cons(S(x''), xs), r) -> isort(xs, insert[Ite](lt(S(x''), x''), S(x''), r)) [2] isort(Cons(x, xs), r) -> isort(xs, Nil) [1] isort(Nil, r) -> Nil [1] insert(S(S(y')), r) -> insert[Ite](lt(S(y'), y'), S(S(y')), r) [1] insert(S(0), r) -> insert[Ite](False, S(0), r) [1] insert(S(x), r) -> insert[Ite](null_lt, S(x), r) [1] inssort(xs) -> isort(xs, Nil) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) [0] insert[Ite](True, x, r) -> Cons(x, r) [0] lt(v0, v1) -> null_lt [0] insert[Ite](v0, v1, v2) -> Nil [0] insert(v0, v1) -> Nil [0] The TRS has the following type information: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0 -> Cons:Nil -> Cons:Nil insert :: S:0 -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0 -> S:0 insert[Ite] :: True:False:null_lt -> S:0 -> Cons:Nil -> Cons:Nil lt :: S:0 -> S:0 -> True:False:null_lt inssort :: Cons:Nil -> Cons:Nil 0 :: S:0 True :: True:False:null_lt False :: True:False:null_lt null_lt :: True:False:null_lt 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: Nil => 0 0 => 0 True => 2 False => 1 null_lt => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 1 }-> insert[Ite](lt(1 + y', y'), 1 + (1 + y'), r) :|: r >= 0, z = 1 + (1 + y'), y' >= 0, z' = r insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, r) :|: r >= 0, z = 1 + 0, z' = r insert(z, z') -{ 1 }-> insert[Ite](0, 1 + x, r) :|: r >= 0, x >= 0, z = 1 + x, z' = r insert(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + r :|: z = 2, z'' = r, r >= 0, z' = x, x >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(x', xs) :|: z' = x', xs >= 0, z = 1, x' >= 0, x >= 0, z'' = 1 + x + xs inssort(z) -{ 1 }-> isort(xs, 0) :|: xs >= 0, z = xs isort(z, z') -{ 2 }-> isort(xs, insert[Ite](lt(1 + x'', x''), 1 + x'', r)) :|: xs >= 0, r >= 0, z = 1 + (1 + x'') + xs, x'' >= 0, z' = r isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, r >= 0, x >= 0, z' = r isort(z, z') -{ 1 }-> 0 :|: r >= 0, z = 0, z' = r lt(z, z') -{ 0 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lt(z, z') -{ 0 }-> 2 :|: z' = 1 + y, y >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: x >= 0, z = x, z' = 0 lt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 ---------------------------------------- (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: insert(z, z') -{ 1 }-> insert[Ite](lt(1 + (z - 2), z - 2), 1 + (1 + (z - 2)), z') :|: z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](lt(1 + x'', x''), 1 + x'', z')) :|: xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 ---------------------------------------- (17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { lt } { insert[Ite], insert } { isort } { inssort } ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 1 }-> insert[Ite](lt(1 + (z - 2), z - 2), 1 + (1 + (z - 2)), z') :|: z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](lt(1 + x'', x''), 1 + x'', z')) :|: xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {lt}, {insert[Ite],insert}, {isort}, {inssort} ---------------------------------------- (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: insert(z, z') -{ 1 }-> insert[Ite](lt(1 + (z - 2), z - 2), 1 + (1 + (z - 2)), z') :|: z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](lt(1 + x'', x''), 1 + x'', z')) :|: xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {lt}, {insert[Ite],insert}, {isort}, {inssort} ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 1 }-> insert[Ite](lt(1 + (z - 2), z - 2), 1 + (1 + (z - 2)), z') :|: z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](lt(1 + x'', x''), 1 + x'', z')) :|: xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {lt}, {insert[Ite],insert}, {isort}, {inssort} Previous analysis results are: lt: runtime: ?, size: O(1) [2] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 1 }-> insert[Ite](lt(1 + (z - 2), z - 2), 1 + (1 + (z - 2)), z') :|: z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](lt(1 + x'', x''), 1 + x'', z')) :|: xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {insert[Ite],insert}, {isort}, {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (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: insert(z, z') -{ 1 }-> insert[Ite](s', 1 + (1 + (z - 2)), z') :|: s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](s, 1 + x'', z')) :|: s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {insert[Ite],insert}, {isort}, {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (27) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: insert[Ite] after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' + z'' Computed SIZE bound using KoAT for: insert after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z + z' ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 1 }-> insert[Ite](s', 1 + (1 + (z - 2)), z') :|: s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](s, 1 + x'', z')) :|: s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {insert[Ite],insert}, {isort}, {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: ?, size: O(n^1) [1 + z' + z''] insert: runtime: ?, size: O(n^1) [1 + z + z'] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: insert[Ite] after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z'' Computed RUNTIME bound using CoFloCo for: insert after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 3 + z' ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 1 }-> insert[Ite](s', 1 + (1 + (z - 2)), z') :|: s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 1 }-> insert[Ite](1, 1 + 0, z') :|: z' >= 0, z = 1 + 0 insert(z, z') -{ 1 }-> insert[Ite](0, 1 + (z - 1), z') :|: z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 1 + x + insert(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 2 }-> isort(xs, insert[Ite](s, 1 + x'', z')) :|: s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {isort}, {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + 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: insert(z, z') -{ 3 + z' }-> s2 :|: s2 >= 0, s2 <= 1 + (1 + (z - 2)) + z' + 1, s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 3 + z' }-> s3 :|: s3 >= 0, s3 <= 1 + 0 + z' + 1, z' >= 0, z = 1 + 0 insert(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + z' + 1, z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s5 :|: s5 >= 0, s5 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 4 + z' }-> isort(xs, s1) :|: s1 >= 0, s1 <= 1 + x'' + z' + 1, s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {isort}, {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: isort 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: insert(z, z') -{ 3 + z' }-> s2 :|: s2 >= 0, s2 <= 1 + (1 + (z - 2)) + z' + 1, s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 3 + z' }-> s3 :|: s3 >= 0, s3 <= 1 + 0 + z' + 1, z' >= 0, z = 1 + 0 insert(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + z' + 1, z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s5 :|: s5 >= 0, s5 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 4 + z' }-> isort(xs, s1) :|: s1 >= 0, s1 <= 1 + x'' + z' + 1, s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {isort}, {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] isort: runtime: ?, size: O(1) [0] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: isort after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 1 + 3*z + z*z' + z^2 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 3 + z' }-> s2 :|: s2 >= 0, s2 <= 1 + (1 + (z - 2)) + z' + 1, s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 3 + z' }-> s3 :|: s3 >= 0, s3 <= 1 + 0 + z' + 1, z' >= 0, z = 1 + 0 insert(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + z' + 1, z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s5 :|: s5 >= 0, s5 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 1 }-> isort(z, 0) :|: z >= 0 isort(z, z') -{ 4 + z' }-> isort(xs, s1) :|: s1 >= 0, s1 <= 1 + x'' + z' + 1, s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 1 }-> isort(xs, 0) :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] isort: runtime: O(n^2) [1 + 3*z + z*z' + z^2], size: O(1) [0] ---------------------------------------- (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: insert(z, z') -{ 3 + z' }-> s2 :|: s2 >= 0, s2 <= 1 + (1 + (z - 2)) + z' + 1, s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 3 + z' }-> s3 :|: s3 >= 0, s3 <= 1 + 0 + z' + 1, z' >= 0, z = 1 + 0 insert(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + z' + 1, z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s5 :|: s5 >= 0, s5 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 2 + 3*z + z^2 }-> s8 :|: s8 >= 0, s8 <= 0, z >= 0 isort(z, z') -{ 5 + s1*xs + 3*xs + xs^2 + z' }-> s6 :|: s6 >= 0, s6 <= 0, s1 >= 0, s1 <= 1 + x'' + z' + 1, s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 2 + 3*xs + xs^2 }-> s7 :|: s7 >= 0, s7 <= 0, z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] isort: runtime: O(n^2) [1 + 3*z + z*z' + z^2], size: O(1) [0] ---------------------------------------- (39) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: inssort after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 3 + z' }-> s2 :|: s2 >= 0, s2 <= 1 + (1 + (z - 2)) + z' + 1, s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 3 + z' }-> s3 :|: s3 >= 0, s3 <= 1 + 0 + z' + 1, z' >= 0, z = 1 + 0 insert(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + z' + 1, z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s5 :|: s5 >= 0, s5 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 2 + 3*z + z^2 }-> s8 :|: s8 >= 0, s8 <= 0, z >= 0 isort(z, z') -{ 5 + s1*xs + 3*xs + xs^2 + z' }-> s6 :|: s6 >= 0, s6 <= 0, s1 >= 0, s1 <= 1 + x'' + z' + 1, s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 2 + 3*xs + xs^2 }-> s7 :|: s7 >= 0, s7 <= 0, z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: {inssort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] isort: runtime: O(n^2) [1 + 3*z + z*z' + z^2], size: O(1) [0] inssort: runtime: ?, size: O(1) [0] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: inssort after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 2 + 3*z + z^2 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: insert(z, z') -{ 3 + z' }-> s2 :|: s2 >= 0, s2 <= 1 + (1 + (z - 2)) + z' + 1, s' >= 0, s' <= 2, z' >= 0, z - 2 >= 0 insert(z, z') -{ 3 + z' }-> s3 :|: s3 >= 0, s3 <= 1 + 0 + z' + 1, z' >= 0, z = 1 + 0 insert(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= 1 + (z - 1) + z' + 1, z' >= 0, z - 1 >= 0 insert(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 insert[Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 insert[Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s5 :|: s5 >= 0, s5 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs insert[Ite](z, z', z'') -{ 0 }-> 1 + z' + z'' :|: z = 2, z'' >= 0, z' >= 0 inssort(z) -{ 2 + 3*z + z^2 }-> s8 :|: s8 >= 0, s8 <= 0, z >= 0 isort(z, z') -{ 5 + s1*xs + 3*xs + xs^2 + z' }-> s6 :|: s6 >= 0, s6 <= 0, s1 >= 0, s1 <= 1 + x'' + z' + 1, s >= 0, s <= 2, xs >= 0, z' >= 0, z = 1 + (1 + x'') + xs, x'' >= 0 isort(z, z') -{ 2 + 3*xs + xs^2 }-> s7 :|: s7 >= 0, s7 <= 0, z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 isort(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 Function symbols to be analyzed: Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] insert[Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] insert: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] isort: runtime: O(n^2) [1 + 3*z + z*z' + z^2], size: O(1) [0] inssort: runtime: O(n^2) [2 + 3*z + z^2], size: O(1) [0] ---------------------------------------- (43) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (44) BOUNDS(1, n^2) ---------------------------------------- (45) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (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: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Rewrite Strategy: INNERMOST ---------------------------------------- (47) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (48) Obligation: Innermost TRS: Rules: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Types: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil insert :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0' -> S:0' insert[Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil < :: S:0' -> S:0' -> True:False inssort :: Cons:Nil -> Cons:Nil 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' ---------------------------------------- (49) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: isort, insert, < They will be analysed ascendingly in the following order: insert < isort < < insert ---------------------------------------- (50) Obligation: Innermost TRS: Rules: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Types: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil insert :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0' -> S:0' insert[Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil < :: S:0' -> S:0' -> True:False inssort :: Cons:Nil -> Cons:Nil 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: <, isort, insert They will be analysed ascendingly in the following order: insert < isort < < insert ---------------------------------------- (51) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) Induction Base: <(gen_S:0'5_0(0), gen_S:0'5_0(+(1, 0))) ->_R^Omega(0) True Induction Step: <(gen_S:0'5_0(+(n7_0, 1)), gen_S:0'5_0(+(1, +(n7_0, 1)))) ->_R^Omega(0) <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) ->_IH True We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (52) Obligation: Innermost TRS: Rules: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Types: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil insert :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0' -> S:0' insert[Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil < :: S:0' -> S:0' -> True:False inssort :: Cons:Nil -> Cons:Nil 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Lemmas: <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: insert, isort They will be analysed ascendingly in the following order: insert < isort ---------------------------------------- (53) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: insert(gen_S:0'5_0(1), gen_Cons:Nil4_0(n215_0)) -> *6_0, rt in Omega(n215_0) Induction Base: insert(gen_S:0'5_0(1), gen_Cons:Nil4_0(0)) Induction Step: insert(gen_S:0'5_0(1), gen_Cons:Nil4_0(+(n215_0, 1))) ->_R^Omega(1) insert[Ite](<(S(gen_S:0'5_0(0)), gen_S:0'5_0(0)), S(gen_S:0'5_0(0)), gen_Cons:Nil4_0(+(n215_0, 1))) ->_R^Omega(0) insert[Ite](False, S(gen_S:0'5_0(0)), gen_Cons:Nil4_0(+(1, n215_0))) ->_R^Omega(0) Cons(0', insert(S(gen_S:0'5_0(0)), gen_Cons:Nil4_0(n215_0))) ->_IH Cons(0', *6_0) 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: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Types: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil insert :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0' -> S:0' insert[Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil < :: S:0' -> S:0' -> True:False inssort :: Cons:Nil -> Cons:Nil 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Lemmas: <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: insert, isort They will be analysed ascendingly in the following order: insert < isort ---------------------------------------- (56) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (57) BOUNDS(n^1, INF) ---------------------------------------- (58) Obligation: Innermost TRS: Rules: isort(Cons(x, xs), r) -> isort(xs, insert(x, r)) isort(Nil, r) -> Nil insert(S(x), r) -> insert[Ite](<(S(x), x), S(x), r) inssort(xs) -> isort(xs, Nil) <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False insert[Ite](False, x', Cons(x, xs)) -> Cons(x, insert(x', xs)) insert[Ite](True, x, r) -> Cons(x, r) Types: isort :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil insert :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil S :: S:0' -> S:0' insert[Ite] :: True:False -> S:0' -> Cons:Nil -> Cons:Nil < :: S:0' -> S:0' -> True:False inssort :: Cons:Nil -> Cons:Nil 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Lemmas: <(gen_S:0'5_0(n7_0), gen_S:0'5_0(+(1, n7_0))) -> True, rt in Omega(0) insert(gen_S:0'5_0(1), gen_Cons:Nil4_0(n215_0)) -> *6_0, rt in Omega(n215_0) Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: isort