20.52/7.00 WORST_CASE(Omega(n^1), O(n^1)) 20.62/7.02 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 20.62/7.02 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 20.62/7.02 20.62/7.02 20.62/7.02 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 20.62/7.02 20.62/7.02 (0) CpxTRS 20.62/7.02 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 4 ms] 20.62/7.02 (2) CpxTRS 20.62/7.02 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (4) CpxWeightedTrs 20.62/7.02 (5) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (6) CpxWeightedTrs 20.62/7.02 (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (8) CpxTypedWeightedTrs 20.62/7.02 (9) CompletionProof [UPPER BOUND(ID), 0 ms] 20.62/7.02 (10) CpxTypedWeightedCompleteTrs 20.62/7.02 (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (12) CpxTypedWeightedCompleteTrs 20.62/7.02 (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 20.62/7.02 (14) CpxRNTS 20.62/7.02 (15) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (16) CpxRNTS 20.62/7.02 (17) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (18) CpxRNTS 20.62/7.02 (19) ResultPropagationProof [UPPER BOUND(ID), 1 ms] 20.62/7.02 (20) CpxRNTS 20.62/7.02 (21) IntTrsBoundProof [UPPER BOUND(ID), 1020 ms] 20.62/7.02 (22) CpxRNTS 20.62/7.02 (23) IntTrsBoundProof [UPPER BOUND(ID), 169 ms] 20.62/7.02 (24) CpxRNTS 20.62/7.02 (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 20.62/7.02 (26) CpxRNTS 20.62/7.02 (27) IntTrsBoundProof [UPPER BOUND(ID), 169 ms] 20.62/7.02 (28) CpxRNTS 20.62/7.02 (29) IntTrsBoundProof [UPPER BOUND(ID), 45 ms] 20.62/7.02 (30) CpxRNTS 20.62/7.02 (31) FinalProof [FINISHED, 0 ms] 20.62/7.02 (32) BOUNDS(1, n^1) 20.62/7.02 (33) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (34) CpxTRS 20.62/7.02 (35) SlicingProof [LOWER BOUND(ID), 0 ms] 20.62/7.02 (36) CpxTRS 20.62/7.02 (37) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 20.62/7.02 (38) typed CpxTrs 20.62/7.02 (39) OrderProof [LOWER BOUND(ID), 0 ms] 20.62/7.02 (40) typed CpxTrs 20.62/7.02 (41) RewriteLemmaProof [LOWER BOUND(ID), 1073 ms] 20.62/7.02 (42) proven lower bound 20.62/7.02 (43) LowerBoundPropagationProof [FINISHED, 0 ms] 20.62/7.02 (44) BOUNDS(n^1, INF) 20.62/7.02 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (0) 20.62/7.02 Obligation: 20.62/7.02 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 20.62/7.02 20.62/7.02 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 -(0, y) -> 0 20.62/7.02 -(x, 0) -> x 20.62/7.02 -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0) 20.62/7.02 p(0) -> 0 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 S is empty. 20.62/7.02 Rewrite Strategy: FULL 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Converted rc-obligation to irc-obligation. 20.62/7.02 20.62/7.02 The duplicating contexts are: 20.62/7.02 -([], s(y)) 20.62/7.02 -(x, s([])) 20.62/7.02 20.62/7.02 20.62/7.02 The defined contexts are: 20.62/7.02 -(x0, []) 20.62/7.02 p(s([])) 20.62/7.02 20.62/7.02 20.62/7.02 [] just represents basic- or constructor-terms in the following defined contexts: 20.62/7.02 -(x0, []) 20.62/7.02 20.62/7.02 20.62/7.02 As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (2) 20.62/7.02 Obligation: 20.62/7.02 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 20.62/7.02 20.62/7.02 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 -(0, y) -> 0 20.62/7.02 -(x, 0) -> x 20.62/7.02 -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0) 20.62/7.02 p(0) -> 0 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 S is empty. 20.62/7.02 Rewrite Strategy: INNERMOST 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Transformed relative TRS to weighted TRS 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (4) 20.62/7.02 Obligation: 20.62/7.02 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 20.62/7.02 20.62/7.02 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 -(0, y) -> 0 [1] 20.62/7.02 -(x, 0) -> x [1] 20.62/7.02 -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0) [1] 20.62/7.02 p(0) -> 0 [1] 20.62/7.02 p(s(x)) -> x [1] 20.62/7.02 20.62/7.02 Rewrite Strategy: INNERMOST 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (5) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Renamed defined symbols to avoid conflicts with arithmetic symbols: 20.62/7.02 20.62/7.02 - => minus 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (6) 20.62/7.02 Obligation: 20.62/7.02 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 20.62/7.02 20.62/7.02 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 minus(0, y) -> 0 [1] 20.62/7.02 minus(x, 0) -> x [1] 20.62/7.02 minus(x, s(y)) -> if(greater(x, s(y)), s(minus(x, p(s(y)))), 0) [1] 20.62/7.02 p(0) -> 0 [1] 20.62/7.02 p(s(x)) -> x [1] 20.62/7.02 20.62/7.02 Rewrite Strategy: INNERMOST 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Infered types. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (8) 20.62/7.02 Obligation: 20.62/7.02 Runtime Complexity Weighted TRS with Types. 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 minus(0, y) -> 0 [1] 20.62/7.02 minus(x, 0) -> x [1] 20.62/7.02 minus(x, s(y)) -> if(greater(x, s(y)), s(minus(x, p(s(y)))), 0) [1] 20.62/7.02 p(0) -> 0 [1] 20.62/7.02 p(s(x)) -> x [1] 20.62/7.02 20.62/7.02 The TRS has the following type information: 20.62/7.02 minus :: 0:s:if -> 0:s:if -> 0:s:if 20.62/7.02 0 :: 0:s:if 20.62/7.02 s :: 0:s:if -> 0:s:if 20.62/7.02 if :: greater -> 0:s:if -> 0:s:if -> 0:s:if 20.62/7.02 greater :: 0:s:if -> 0:s:if -> greater 20.62/7.02 p :: 0:s:if -> 0:s:if 20.62/7.02 20.62/7.02 Rewrite Strategy: INNERMOST 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (9) CompletionProof (UPPER BOUND(ID)) 20.62/7.02 The transformation into a RNTS is sound, since: 20.62/7.02 20.62/7.02 (a) The obligation is a constructor system where every type has a constant constructor, 20.62/7.02 20.62/7.02 (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: 20.62/7.02 20.62/7.02 minus_2 20.62/7.02 20.62/7.02 (c) The following functions are completely defined: 20.62/7.02 20.62/7.02 p_1 20.62/7.02 20.62/7.02 Due to the following rules being added: 20.62/7.02 20.62/7.02 p(v0) -> 0 [0] 20.62/7.02 20.62/7.02 And the following fresh constants: const 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (10) 20.62/7.02 Obligation: 20.62/7.02 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 20.62/7.02 20.62/7.02 Runtime Complexity Weighted TRS with Types. 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 minus(0, y) -> 0 [1] 20.62/7.02 minus(x, 0) -> x [1] 20.62/7.02 minus(x, s(y)) -> if(greater(x, s(y)), s(minus(x, p(s(y)))), 0) [1] 20.62/7.02 p(0) -> 0 [1] 20.62/7.02 p(s(x)) -> x [1] 20.62/7.02 p(v0) -> 0 [0] 20.62/7.02 20.62/7.02 The TRS has the following type information: 20.62/7.02 minus :: 0:s:if -> 0:s:if -> 0:s:if 20.62/7.02 0 :: 0:s:if 20.62/7.02 s :: 0:s:if -> 0:s:if 20.62/7.02 if :: greater -> 0:s:if -> 0:s:if -> 0:s:if 20.62/7.02 greater :: 0:s:if -> 0:s:if -> greater 20.62/7.02 p :: 0:s:if -> 0:s:if 20.62/7.02 const :: greater 20.62/7.02 20.62/7.02 Rewrite Strategy: INNERMOST 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (11) NarrowingProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Narrowed the inner basic terms of all right-hand sides by a single narrowing step. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (12) 20.62/7.02 Obligation: 20.62/7.02 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 20.62/7.02 20.62/7.02 Runtime Complexity Weighted TRS with Types. 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 minus(0, y) -> 0 [1] 20.62/7.02 minus(x, 0) -> x [1] 20.62/7.02 minus(x, s(y)) -> if(greater(x, s(y)), s(minus(x, y)), 0) [2] 20.62/7.02 minus(x, s(y)) -> if(greater(x, s(y)), s(minus(x, 0)), 0) [1] 20.62/7.02 p(0) -> 0 [1] 20.62/7.02 p(s(x)) -> x [1] 20.62/7.02 p(v0) -> 0 [0] 20.62/7.02 20.62/7.02 The TRS has the following type information: 20.62/7.02 minus :: 0:s:if -> 0:s:if -> 0:s:if 20.62/7.02 0 :: 0:s:if 20.62/7.02 s :: 0:s:if -> 0:s:if 20.62/7.02 if :: greater -> 0:s:if -> 0:s:if -> 0:s:if 20.62/7.02 greater :: 0:s:if -> 0:s:if -> greater 20.62/7.02 p :: 0:s:if -> 0:s:if 20.62/7.02 const :: greater 20.62/7.02 20.62/7.02 Rewrite Strategy: INNERMOST 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (13) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 20.62/7.02 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 20.62/7.02 The constant constructors are abstracted as follows: 20.62/7.02 20.62/7.02 0 => 0 20.62/7.02 const => 0 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (14) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y 20.62/7.02 minus(z, z') -{ 2 }-> 1 + (1 + x + (1 + y)) + (1 + minus(x, y)) + 0 :|: z' = 1 + y, x >= 0, y >= 0, z = x 20.62/7.02 minus(z, z') -{ 1 }-> 1 + (1 + x + (1 + y)) + (1 + minus(x, 0)) + 0 :|: z' = 1 + y, x >= 0, y >= 0, z = x 20.62/7.02 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 20.62/7.02 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (15) SimplificationProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Simplified the RNTS by moving equalities from the constraints into the right-hand sides. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (16) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 1 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, 0)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 2 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, z' - 1)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Found the following analysis order by SCC decomposition: 20.62/7.02 20.62/7.02 { minus } 20.62/7.02 { p } 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (18) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 1 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, 0)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 2 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, z' - 1)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: {minus}, {p} 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (19) ResultPropagationProof (UPPER BOUND(ID)) 20.62/7.02 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (20) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 1 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, 0)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 2 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, z' - 1)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: {minus}, {p} 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (21) IntTrsBoundProof (UPPER BOUND(ID)) 20.62/7.02 20.62/7.02 Computed SIZE bound using CoFloCo for: minus 20.62/7.02 after applying outer abstraction to obtain an ITS, 20.62/7.02 resulting in: O(n^2) with polynomial bound: 3 + 2*z + z*z' + 3*z' + z'^2 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (22) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 1 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, 0)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 2 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, z' - 1)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: {minus}, {p} 20.62/7.02 Previous analysis results are: 20.62/7.02 minus: runtime: ?, size: O(n^2) [3 + 2*z + z*z' + 3*z' + z'^2] 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (23) IntTrsBoundProof (UPPER BOUND(ID)) 20.62/7.02 20.62/7.02 Computed RUNTIME bound using CoFloCo for: minus 20.62/7.02 after applying outer abstraction to obtain an ITS, 20.62/7.02 resulting in: O(n^1) with polynomial bound: 4 + 2*z' 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (24) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 1 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, 0)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 2 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + minus(z, z' - 1)) + 0 :|: z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: {p} 20.62/7.02 Previous analysis results are: 20.62/7.02 minus: runtime: O(n^1) [4 + 2*z'], size: O(n^2) [3 + 2*z + z*z' + 3*z' + z'^2] 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (25) ResultPropagationProof (UPPER BOUND(ID)) 20.62/7.02 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (26) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 4 + 2*z' }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + s) + 0 :|: s >= 0, s <= (z' - 1) * (z' - 1) + 3 * (z' - 1) + 2 * z + 3 + (z' - 1) * z, z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 5 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + s') + 0 :|: s' >= 0, s' <= 0 * 0 + 3 * 0 + 2 * z + 3 + 0 * z, z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: {p} 20.62/7.02 Previous analysis results are: 20.62/7.02 minus: runtime: O(n^1) [4 + 2*z'], size: O(n^2) [3 + 2*z + z*z' + 3*z' + z'^2] 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (27) IntTrsBoundProof (UPPER BOUND(ID)) 20.62/7.02 20.62/7.02 Computed SIZE bound using KoAT for: p 20.62/7.02 after applying outer abstraction to obtain an ITS, 20.62/7.02 resulting in: O(n^1) with polynomial bound: z 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (28) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 4 + 2*z' }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + s) + 0 :|: s >= 0, s <= (z' - 1) * (z' - 1) + 3 * (z' - 1) + 2 * z + 3 + (z' - 1) * z, z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 5 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + s') + 0 :|: s' >= 0, s' <= 0 * 0 + 3 * 0 + 2 * z + 3 + 0 * z, z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: {p} 20.62/7.02 Previous analysis results are: 20.62/7.02 minus: runtime: O(n^1) [4 + 2*z'], size: O(n^2) [3 + 2*z + z*z' + 3*z' + z'^2] 20.62/7.02 p: runtime: ?, size: O(n^1) [z] 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (29) IntTrsBoundProof (UPPER BOUND(ID)) 20.62/7.02 20.62/7.02 Computed RUNTIME bound using CoFloCo for: p 20.62/7.02 after applying outer abstraction to obtain an ITS, 20.62/7.02 resulting in: O(1) with polynomial bound: 1 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (30) 20.62/7.02 Obligation: 20.62/7.02 Complexity RNTS consisting of the following rules: 20.62/7.02 20.62/7.02 minus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 20.62/7.02 minus(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 20.62/7.02 minus(z, z') -{ 4 + 2*z' }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + s) + 0 :|: s >= 0, s <= (z' - 1) * (z' - 1) + 3 * (z' - 1) + 2 * z + 3 + (z' - 1) * z, z >= 0, z' - 1 >= 0 20.62/7.02 minus(z, z') -{ 5 }-> 1 + (1 + z + (1 + (z' - 1))) + (1 + s') + 0 :|: s' >= 0, s' <= 0 * 0 + 3 * 0 + 2 * z + 3 + 0 * z, z >= 0, z' - 1 >= 0 20.62/7.02 p(z) -{ 1 }-> 0 :|: z = 0 20.62/7.02 p(z) -{ 0 }-> 0 :|: z >= 0 20.62/7.02 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 20.62/7.02 20.62/7.02 Function symbols to be analyzed: 20.62/7.02 Previous analysis results are: 20.62/7.02 minus: runtime: O(n^1) [4 + 2*z'], size: O(n^2) [3 + 2*z + z*z' + 3*z' + z'^2] 20.62/7.02 p: runtime: O(1) [1], size: O(n^1) [z] 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (31) FinalProof (FINISHED) 20.62/7.02 Computed overall runtime complexity 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (32) 20.62/7.02 BOUNDS(1, n^1) 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (33) RenamingProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Renamed function symbols to avoid clashes with predefined symbol. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (34) 20.62/7.02 Obligation: 20.62/7.02 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 20.62/7.02 20.62/7.02 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 -(0', y) -> 0' 20.62/7.02 -(x, 0') -> x 20.62/7.02 -(x, s(y)) -> if(greater(x, s(y)), s(-(x, p(s(y)))), 0') 20.62/7.02 p(0') -> 0' 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 S is empty. 20.62/7.02 Rewrite Strategy: FULL 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (35) SlicingProof (LOWER BOUND(ID)) 20.62/7.02 Sliced the following arguments: 20.62/7.02 if/0 20.62/7.02 if/2 20.62/7.02 greater/0 20.62/7.02 greater/1 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (36) 20.62/7.02 Obligation: 20.62/7.02 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 20.62/7.02 20.62/7.02 20.62/7.02 The TRS R consists of the following rules: 20.62/7.02 20.62/7.02 -(0', y) -> 0' 20.62/7.02 -(x, 0') -> x 20.62/7.02 -(x, s(y)) -> if(s(-(x, p(s(y))))) 20.62/7.02 p(0') -> 0' 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 S is empty. 20.62/7.02 Rewrite Strategy: FULL 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (37) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 20.62/7.02 Infered types. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (38) 20.62/7.02 Obligation: 20.62/7.02 TRS: 20.62/7.02 Rules: 20.62/7.02 -(0', y) -> 0' 20.62/7.02 -(x, 0') -> x 20.62/7.02 -(x, s(y)) -> if(s(-(x, p(s(y))))) 20.62/7.02 p(0') -> 0' 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 Types: 20.62/7.02 - :: 0':s:if -> 0':s:if -> 0':s:if 20.62/7.02 0' :: 0':s:if 20.62/7.02 s :: 0':s:if -> 0':s:if 20.62/7.02 if :: 0':s:if -> 0':s:if 20.62/7.02 p :: 0':s:if -> 0':s:if 20.62/7.02 hole_0':s:if1_0 :: 0':s:if 20.62/7.02 gen_0':s:if2_0 :: Nat -> 0':s:if 20.62/7.02 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (39) OrderProof (LOWER BOUND(ID)) 20.62/7.02 Heuristically decided to analyse the following defined symbols: 20.62/7.02 - 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (40) 20.62/7.02 Obligation: 20.62/7.02 TRS: 20.62/7.02 Rules: 20.62/7.02 -(0', y) -> 0' 20.62/7.02 -(x, 0') -> x 20.62/7.02 -(x, s(y)) -> if(s(-(x, p(s(y))))) 20.62/7.02 p(0') -> 0' 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 Types: 20.62/7.02 - :: 0':s:if -> 0':s:if -> 0':s:if 20.62/7.02 0' :: 0':s:if 20.62/7.02 s :: 0':s:if -> 0':s:if 20.62/7.02 if :: 0':s:if -> 0':s:if 20.62/7.02 p :: 0':s:if -> 0':s:if 20.62/7.02 hole_0':s:if1_0 :: 0':s:if 20.62/7.02 gen_0':s:if2_0 :: Nat -> 0':s:if 20.62/7.02 20.62/7.02 20.62/7.02 Generator Equations: 20.62/7.02 gen_0':s:if2_0(0) <=> 0' 20.62/7.02 gen_0':s:if2_0(+(x, 1)) <=> s(gen_0':s:if2_0(x)) 20.62/7.02 20.62/7.02 20.62/7.02 The following defined symbols remain to be analysed: 20.62/7.02 - 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (41) RewriteLemmaProof (LOWER BOUND(ID)) 20.62/7.02 Proved the following rewrite lemma: 20.62/7.02 -(gen_0':s:if2_0(a), gen_0':s:if2_0(n4_0)) -> *3_0, rt in Omega(n4_0) 20.62/7.02 20.62/7.02 Induction Base: 20.62/7.02 -(gen_0':s:if2_0(a), gen_0':s:if2_0(0)) 20.62/7.02 20.62/7.02 Induction Step: 20.62/7.02 -(gen_0':s:if2_0(a), gen_0':s:if2_0(+(n4_0, 1))) ->_R^Omega(1) 20.62/7.02 if(s(-(gen_0':s:if2_0(a), p(s(gen_0':s:if2_0(n4_0)))))) ->_R^Omega(1) 20.62/7.02 if(s(-(gen_0':s:if2_0(a), gen_0':s:if2_0(n4_0)))) ->_IH 20.62/7.02 if(s(*3_0)) 20.62/7.02 20.62/7.02 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (42) 20.62/7.02 Obligation: 20.62/7.02 Proved the lower bound n^1 for the following obligation: 20.62/7.02 20.62/7.02 TRS: 20.62/7.02 Rules: 20.62/7.02 -(0', y) -> 0' 20.62/7.02 -(x, 0') -> x 20.62/7.02 -(x, s(y)) -> if(s(-(x, p(s(y))))) 20.62/7.02 p(0') -> 0' 20.62/7.02 p(s(x)) -> x 20.62/7.02 20.62/7.02 Types: 20.62/7.02 - :: 0':s:if -> 0':s:if -> 0':s:if 20.62/7.02 0' :: 0':s:if 20.62/7.02 s :: 0':s:if -> 0':s:if 20.62/7.02 if :: 0':s:if -> 0':s:if 20.62/7.02 p :: 0':s:if -> 0':s:if 20.62/7.02 hole_0':s:if1_0 :: 0':s:if 20.62/7.02 gen_0':s:if2_0 :: Nat -> 0':s:if 20.62/7.02 20.62/7.02 20.62/7.02 Generator Equations: 20.62/7.02 gen_0':s:if2_0(0) <=> 0' 20.62/7.02 gen_0':s:if2_0(+(x, 1)) <=> s(gen_0':s:if2_0(x)) 20.62/7.02 20.62/7.02 20.62/7.02 The following defined symbols remain to be analysed: 20.62/7.02 - 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (43) LowerBoundPropagationProof (FINISHED) 20.62/7.02 Propagated lower bound. 20.62/7.02 ---------------------------------------- 20.62/7.02 20.62/7.02 (44) 20.62/7.02 BOUNDS(n^1, INF) 20.62/7.05 EOF