316.14/291.49 WORST_CASE(Omega(n^2), O(n^3)) 316.14/291.50 proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml 316.14/291.50 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 316.14/291.50 316.14/291.50 316.14/291.50 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^3). 316.14/291.50 316.14/291.50 (0) CpxTRS 316.14/291.50 (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (2) CpxWeightedTrs 316.14/291.50 (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (4) CpxTypedWeightedTrs 316.14/291.50 (5) CompletionProof [UPPER BOUND(ID), 0 ms] 316.14/291.50 (6) CpxTypedWeightedCompleteTrs 316.14/291.50 (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (8) CpxTypedWeightedCompleteTrs 316.14/291.50 (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 5 ms] 316.14/291.50 (10) CpxRNTS 316.14/291.50 (11) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (12) CpxRNTS 316.14/291.50 (13) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (14) CpxRNTS 316.14/291.50 (15) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 316.14/291.50 (16) CpxRNTS 316.14/291.50 (17) IntTrsBoundProof [UPPER BOUND(ID), 626 ms] 316.14/291.50 (18) CpxRNTS 316.14/291.50 (19) IntTrsBoundProof [UPPER BOUND(ID), 170 ms] 316.14/291.50 (20) CpxRNTS 316.14/291.50 (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 316.14/291.50 (22) CpxRNTS 316.14/291.50 (23) IntTrsBoundProof [UPPER BOUND(ID), 557 ms] 316.14/291.50 (24) CpxRNTS 316.14/291.50 (25) IntTrsBoundProof [UPPER BOUND(ID), 55 ms] 316.14/291.50 (26) CpxRNTS 316.14/291.50 (27) FinalProof [FINISHED, 0 ms] 316.14/291.50 (28) BOUNDS(1, n^3) 316.14/291.50 (29) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (30) CpxTRS 316.14/291.50 (31) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 316.14/291.50 (32) typed CpxTrs 316.14/291.50 (33) OrderProof [LOWER BOUND(ID), 0 ms] 316.14/291.50 (34) typed CpxTrs 316.14/291.50 (35) RewriteLemmaProof [LOWER BOUND(ID), 289 ms] 316.14/291.50 (36) BEST 316.14/291.50 (37) proven lower bound 316.14/291.50 (38) LowerBoundPropagationProof [FINISHED, 0 ms] 316.14/291.50 (39) BOUNDS(n^1, INF) 316.14/291.50 (40) typed CpxTrs 316.14/291.50 (41) RewriteLemmaProof [LOWER BOUND(ID), 60 ms] 316.14/291.50 (42) proven lower bound 316.14/291.50 (43) LowerBoundPropagationProof [FINISHED, 0 ms] 316.14/291.50 (44) BOUNDS(n^2, INF) 316.14/291.50 316.14/291.50 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (0) 316.14/291.50 Obligation: 316.14/291.50 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^3). 316.14/291.50 316.14/291.50 316.14/291.50 The TRS R consists of the following rules: 316.14/291.50 316.14/291.50 times(x, 0) -> 0 316.14/291.50 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.50 plus(x, 0) -> x 316.14/291.50 plus(0, x) -> x 316.14/291.50 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.50 plus(s(x), y) -> s(plus(x, y)) 316.14/291.50 316.14/291.50 S is empty. 316.14/291.50 Rewrite Strategy: INNERMOST 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 316.14/291.50 Transformed relative TRS to weighted TRS 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (2) 316.14/291.50 Obligation: 316.14/291.50 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3). 316.14/291.50 316.14/291.50 316.14/291.50 The TRS R consists of the following rules: 316.14/291.50 316.14/291.50 times(x, 0) -> 0 [1] 316.14/291.50 times(x, s(y)) -> plus(times(x, y), x) [1] 316.14/291.50 plus(x, 0) -> x [1] 316.14/291.50 plus(0, x) -> x [1] 316.14/291.50 plus(x, s(y)) -> s(plus(x, y)) [1] 316.14/291.50 plus(s(x), y) -> s(plus(x, y)) [1] 316.14/291.50 316.14/291.50 Rewrite Strategy: INNERMOST 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 316.14/291.50 Infered types. 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (4) 316.14/291.50 Obligation: 316.14/291.50 Runtime Complexity Weighted TRS with Types. 316.14/291.50 The TRS R consists of the following rules: 316.14/291.50 316.14/291.50 times(x, 0) -> 0 [1] 316.14/291.50 times(x, s(y)) -> plus(times(x, y), x) [1] 316.14/291.50 plus(x, 0) -> x [1] 316.14/291.50 plus(0, x) -> x [1] 316.14/291.50 plus(x, s(y)) -> s(plus(x, y)) [1] 316.14/291.50 plus(s(x), y) -> s(plus(x, y)) [1] 316.14/291.50 316.14/291.50 The TRS has the following type information: 316.14/291.50 times :: 0:s -> 0:s -> 0:s 316.14/291.50 0 :: 0:s 316.14/291.50 s :: 0:s -> 0:s 316.14/291.50 plus :: 0:s -> 0:s -> 0:s 316.14/291.50 316.14/291.50 Rewrite Strategy: INNERMOST 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (5) CompletionProof (UPPER BOUND(ID)) 316.14/291.50 The transformation into a RNTS is sound, since: 316.14/291.50 316.14/291.50 (a) The obligation is a constructor system where every type has a constant constructor, 316.14/291.50 316.14/291.50 (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: 316.14/291.50 none 316.14/291.50 316.14/291.50 (c) The following functions are completely defined: 316.14/291.50 316.14/291.50 times_2 316.14/291.50 plus_2 316.14/291.50 316.14/291.50 Due to the following rules being added: 316.14/291.50 none 316.14/291.50 316.14/291.50 And the following fresh constants: none 316.14/291.50 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (6) 316.14/291.50 Obligation: 316.14/291.50 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 316.14/291.50 316.14/291.50 Runtime Complexity Weighted TRS with Types. 316.14/291.50 The TRS R consists of the following rules: 316.14/291.50 316.14/291.50 times(x, 0) -> 0 [1] 316.14/291.50 times(x, s(y)) -> plus(times(x, y), x) [1] 316.14/291.50 plus(x, 0) -> x [1] 316.14/291.50 plus(0, x) -> x [1] 316.14/291.50 plus(x, s(y)) -> s(plus(x, y)) [1] 316.14/291.50 plus(s(x), y) -> s(plus(x, y)) [1] 316.14/291.50 316.14/291.50 The TRS has the following type information: 316.14/291.50 times :: 0:s -> 0:s -> 0:s 316.14/291.50 0 :: 0:s 316.14/291.50 s :: 0:s -> 0:s 316.14/291.50 plus :: 0:s -> 0:s -> 0:s 316.14/291.50 316.14/291.50 Rewrite Strategy: INNERMOST 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (7) NarrowingProof (BOTH BOUNDS(ID, ID)) 316.14/291.50 Narrowed the inner basic terms of all right-hand sides by a single narrowing step. 316.14/291.50 ---------------------------------------- 316.14/291.50 316.14/291.50 (8) 316.14/291.50 Obligation: 316.14/291.50 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 316.14/291.50 316.14/291.50 Runtime Complexity Weighted TRS with Types. 316.14/291.50 The TRS R consists of the following rules: 316.14/291.50 316.14/291.50 times(x, 0) -> 0 [1] 316.14/291.50 times(x, s(0)) -> plus(0, x) [2] 316.14/291.50 times(x, s(s(y'))) -> plus(plus(times(x, y'), x), x) [2] 316.14/291.51 plus(x, 0) -> x [1] 316.14/291.51 plus(0, x) -> x [1] 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) [1] 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) [1] 316.14/291.51 316.14/291.51 The TRS has the following type information: 316.14/291.51 times :: 0:s -> 0:s -> 0:s 316.14/291.51 0 :: 0:s 316.14/291.51 s :: 0:s -> 0:s 316.14/291.51 plus :: 0:s -> 0:s -> 0:s 316.14/291.51 316.14/291.51 Rewrite Strategy: INNERMOST 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 316.14/291.51 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 316.14/291.51 The constant constructors are abstracted as follows: 316.14/291.51 316.14/291.51 0 => 0 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (10) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> x :|: z' = x, x >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = x 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(x, y'), x), x) :|: z' = 1 + (1 + y'), x >= 0, y' >= 0, z = x 316.14/291.51 times(z, z') -{ 2 }-> plus(0, x) :|: x >= 0, z' = 1 + 0, z = x 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 316.14/291.51 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (11) SimplificationProof (BOTH BOUNDS(ID, ID)) 316.14/291.51 Simplified the RNTS by moving equalities from the constraints into the right-hand sides. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (12) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z, z' - 1) :|: z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(0, z) :|: z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) 316.14/291.51 Found the following analysis order by SCC decomposition: 316.14/291.51 316.14/291.51 { plus } 316.14/291.51 { times } 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (14) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z, z' - 1) :|: z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(0, z) :|: z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: {plus}, {times} 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (15) ResultPropagationProof (UPPER BOUND(ID)) 316.14/291.51 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (16) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z, z' - 1) :|: z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(0, z) :|: z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: {plus}, {times} 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (17) IntTrsBoundProof (UPPER BOUND(ID)) 316.14/291.51 316.14/291.51 Computed SIZE bound using CoFloCo for: plus 316.14/291.51 after applying outer abstraction to obtain an ITS, 316.14/291.51 resulting in: O(n^1) with polynomial bound: z + z' 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (18) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z, z' - 1) :|: z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(0, z) :|: z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: {plus}, {times} 316.14/291.51 Previous analysis results are: 316.14/291.51 plus: runtime: ?, size: O(n^1) [z + z'] 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (19) IntTrsBoundProof (UPPER BOUND(ID)) 316.14/291.51 316.14/291.51 Computed RUNTIME bound using CoFloCo for: plus 316.14/291.51 after applying outer abstraction to obtain an ITS, 316.14/291.51 resulting in: O(n^1) with polynomial bound: 1 + z + z' 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (20) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z, z' - 1) :|: z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 2 }-> plus(0, z) :|: z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: {times} 316.14/291.51 Previous analysis results are: 316.14/291.51 plus: runtime: O(n^1) [1 + z + z'], size: O(n^1) [z + z'] 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (21) ResultPropagationProof (UPPER BOUND(ID)) 316.14/291.51 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (22) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 + z + z' }-> 1 + s' :|: s' >= 0, s' <= z + (z' - 1), z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 + z + z' }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1 + z', z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 3 + z }-> s :|: s >= 0, s <= 0 + z, z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: {times} 316.14/291.51 Previous analysis results are: 316.14/291.51 plus: runtime: O(n^1) [1 + z + z'], size: O(n^1) [z + z'] 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (23) IntTrsBoundProof (UPPER BOUND(ID)) 316.14/291.51 316.14/291.51 Computed SIZE bound using KoAT for: times 316.14/291.51 after applying outer abstraction to obtain an ITS, 316.14/291.51 resulting in: O(n^2) with polynomial bound: z + 2*z*z' 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (24) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 + z + z' }-> 1 + s' :|: s' >= 0, s' <= z + (z' - 1), z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 + z + z' }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1 + z', z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 3 + z }-> s :|: s >= 0, s <= 0 + z, z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: {times} 316.14/291.51 Previous analysis results are: 316.14/291.51 plus: runtime: O(n^1) [1 + z + z'], size: O(n^1) [z + z'] 316.14/291.51 times: runtime: ?, size: O(n^2) [z + 2*z*z'] 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (25) IntTrsBoundProof (UPPER BOUND(ID)) 316.14/291.51 316.14/291.51 Computed RUNTIME bound using KoAT for: times 316.14/291.51 after applying outer abstraction to obtain an ITS, 316.14/291.51 resulting in: O(n^3) with polynomial bound: 4 + z + 4*z*z'^2 + 4*z' 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (26) 316.14/291.51 Obligation: 316.14/291.51 Complexity RNTS consisting of the following rules: 316.14/291.51 316.14/291.51 plus(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 316.14/291.51 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 316.14/291.51 plus(z, z') -{ 1 + z + z' }-> 1 + s' :|: s' >= 0, s' <= z + (z' - 1), z >= 0, z' - 1 >= 0 316.14/291.51 plus(z, z') -{ 1 + z + z' }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1 + z', z - 1 >= 0, z' >= 0 316.14/291.51 times(z, z') -{ 3 + z }-> s :|: s >= 0, s <= 0 + z, z >= 0, z' = 1 + 0 316.14/291.51 times(z, z') -{ 2 }-> plus(plus(times(z, z' - 2), z), z) :|: z >= 0, z' - 2 >= 0 316.14/291.51 times(z, z') -{ 1 }-> 0 :|: z >= 0, z' = 0 316.14/291.51 316.14/291.51 Function symbols to be analyzed: 316.14/291.51 Previous analysis results are: 316.14/291.51 plus: runtime: O(n^1) [1 + z + z'], size: O(n^1) [z + z'] 316.14/291.51 times: runtime: O(n^3) [4 + z + 4*z*z'^2 + 4*z'], size: O(n^2) [z + 2*z*z'] 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (27) FinalProof (FINISHED) 316.14/291.51 Computed overall runtime complexity 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (28) 316.14/291.51 BOUNDS(1, n^3) 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (29) RenamingProof (BOTH BOUNDS(ID, ID)) 316.14/291.51 Renamed function symbols to avoid clashes with predefined symbol. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (30) 316.14/291.51 Obligation: 316.14/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, INF). 316.14/291.51 316.14/291.51 316.14/291.51 The TRS R consists of the following rules: 316.14/291.51 316.14/291.51 times(x, 0') -> 0' 316.14/291.51 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.51 plus(x, 0') -> x 316.14/291.51 plus(0', x) -> x 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) 316.14/291.51 316.14/291.51 S is empty. 316.14/291.51 Rewrite Strategy: INNERMOST 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (31) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 316.14/291.51 Infered types. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (32) 316.14/291.51 Obligation: 316.14/291.51 Innermost TRS: 316.14/291.51 Rules: 316.14/291.51 times(x, 0') -> 0' 316.14/291.51 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.51 plus(x, 0') -> x 316.14/291.51 plus(0', x) -> x 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) 316.14/291.51 316.14/291.51 Types: 316.14/291.51 times :: 0':s -> 0':s -> 0':s 316.14/291.51 0' :: 0':s 316.14/291.51 s :: 0':s -> 0':s 316.14/291.51 plus :: 0':s -> 0':s -> 0':s 316.14/291.51 hole_0':s1_0 :: 0':s 316.14/291.51 gen_0':s2_0 :: Nat -> 0':s 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (33) OrderProof (LOWER BOUND(ID)) 316.14/291.51 Heuristically decided to analyse the following defined symbols: 316.14/291.51 times, plus 316.14/291.51 316.14/291.51 They will be analysed ascendingly in the following order: 316.14/291.51 plus < times 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (34) 316.14/291.51 Obligation: 316.14/291.51 Innermost TRS: 316.14/291.51 Rules: 316.14/291.51 times(x, 0') -> 0' 316.14/291.51 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.51 plus(x, 0') -> x 316.14/291.51 plus(0', x) -> x 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) 316.14/291.51 316.14/291.51 Types: 316.14/291.51 times :: 0':s -> 0':s -> 0':s 316.14/291.51 0' :: 0':s 316.14/291.51 s :: 0':s -> 0':s 316.14/291.51 plus :: 0':s -> 0':s -> 0':s 316.14/291.51 hole_0':s1_0 :: 0':s 316.14/291.51 gen_0':s2_0 :: Nat -> 0':s 316.14/291.51 316.14/291.51 316.14/291.51 Generator Equations: 316.14/291.51 gen_0':s2_0(0) <=> 0' 316.14/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 316.14/291.51 316.14/291.51 316.14/291.51 The following defined symbols remain to be analysed: 316.14/291.51 plus, times 316.14/291.51 316.14/291.51 They will be analysed ascendingly in the following order: 316.14/291.51 plus < times 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (35) RewriteLemmaProof (LOWER BOUND(ID)) 316.14/291.51 Proved the following rewrite lemma: 316.14/291.51 plus(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 316.14/291.51 316.14/291.51 Induction Base: 316.14/291.51 plus(gen_0':s2_0(a), gen_0':s2_0(0)) ->_R^Omega(1) 316.14/291.51 gen_0':s2_0(a) 316.14/291.51 316.14/291.51 Induction Step: 316.14/291.51 plus(gen_0':s2_0(a), gen_0':s2_0(+(n4_0, 1))) ->_R^Omega(1) 316.14/291.51 s(plus(gen_0':s2_0(a), gen_0':s2_0(n4_0))) ->_IH 316.14/291.51 s(gen_0':s2_0(+(a, c5_0))) 316.14/291.51 316.14/291.51 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (36) 316.14/291.51 Complex Obligation (BEST) 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (37) 316.14/291.51 Obligation: 316.14/291.51 Proved the lower bound n^1 for the following obligation: 316.14/291.51 316.14/291.51 Innermost TRS: 316.14/291.51 Rules: 316.14/291.51 times(x, 0') -> 0' 316.14/291.51 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.51 plus(x, 0') -> x 316.14/291.51 plus(0', x) -> x 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) 316.14/291.51 316.14/291.51 Types: 316.14/291.51 times :: 0':s -> 0':s -> 0':s 316.14/291.51 0' :: 0':s 316.14/291.51 s :: 0':s -> 0':s 316.14/291.51 plus :: 0':s -> 0':s -> 0':s 316.14/291.51 hole_0':s1_0 :: 0':s 316.14/291.51 gen_0':s2_0 :: Nat -> 0':s 316.14/291.51 316.14/291.51 316.14/291.51 Generator Equations: 316.14/291.51 gen_0':s2_0(0) <=> 0' 316.14/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 316.14/291.51 316.14/291.51 316.14/291.51 The following defined symbols remain to be analysed: 316.14/291.51 plus, times 316.14/291.51 316.14/291.51 They will be analysed ascendingly in the following order: 316.14/291.51 plus < times 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (38) LowerBoundPropagationProof (FINISHED) 316.14/291.51 Propagated lower bound. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (39) 316.14/291.51 BOUNDS(n^1, INF) 316.14/291.51 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (40) 316.14/291.51 Obligation: 316.14/291.51 Innermost TRS: 316.14/291.51 Rules: 316.14/291.51 times(x, 0') -> 0' 316.14/291.51 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.51 plus(x, 0') -> x 316.14/291.51 plus(0', x) -> x 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) 316.14/291.51 316.14/291.51 Types: 316.14/291.51 times :: 0':s -> 0':s -> 0':s 316.14/291.51 0' :: 0':s 316.14/291.51 s :: 0':s -> 0':s 316.14/291.51 plus :: 0':s -> 0':s -> 0':s 316.14/291.51 hole_0':s1_0 :: 0':s 316.14/291.51 gen_0':s2_0 :: Nat -> 0':s 316.14/291.51 316.14/291.51 316.14/291.51 Lemmas: 316.14/291.51 plus(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 316.14/291.51 316.14/291.51 316.14/291.51 Generator Equations: 316.14/291.51 gen_0':s2_0(0) <=> 0' 316.14/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 316.14/291.51 316.14/291.51 316.14/291.51 The following defined symbols remain to be analysed: 316.14/291.51 times 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (41) RewriteLemmaProof (LOWER BOUND(ID)) 316.14/291.51 Proved the following rewrite lemma: 316.14/291.51 times(gen_0':s2_0(a), gen_0':s2_0(n592_0)) -> gen_0':s2_0(*(n592_0, a)), rt in Omega(1 + a*n592_0 + n592_0) 316.14/291.51 316.14/291.51 Induction Base: 316.14/291.51 times(gen_0':s2_0(a), gen_0':s2_0(0)) ->_R^Omega(1) 316.14/291.51 0' 316.14/291.51 316.14/291.51 Induction Step: 316.14/291.51 times(gen_0':s2_0(a), gen_0':s2_0(+(n592_0, 1))) ->_R^Omega(1) 316.14/291.51 plus(times(gen_0':s2_0(a), gen_0':s2_0(n592_0)), gen_0':s2_0(a)) ->_IH 316.14/291.51 plus(gen_0':s2_0(*(c593_0, a)), gen_0':s2_0(a)) ->_L^Omega(1 + a) 316.14/291.51 gen_0':s2_0(+(a, *(n592_0, a))) 316.14/291.51 316.14/291.51 We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (42) 316.14/291.51 Obligation: 316.14/291.51 Proved the lower bound n^2 for the following obligation: 316.14/291.51 316.14/291.51 Innermost TRS: 316.14/291.51 Rules: 316.14/291.51 times(x, 0') -> 0' 316.14/291.51 times(x, s(y)) -> plus(times(x, y), x) 316.14/291.51 plus(x, 0') -> x 316.14/291.51 plus(0', x) -> x 316.14/291.51 plus(x, s(y)) -> s(plus(x, y)) 316.14/291.51 plus(s(x), y) -> s(plus(x, y)) 316.14/291.51 316.14/291.51 Types: 316.14/291.51 times :: 0':s -> 0':s -> 0':s 316.14/291.51 0' :: 0':s 316.14/291.51 s :: 0':s -> 0':s 316.14/291.51 plus :: 0':s -> 0':s -> 0':s 316.14/291.51 hole_0':s1_0 :: 0':s 316.14/291.51 gen_0':s2_0 :: Nat -> 0':s 316.14/291.51 316.14/291.51 316.14/291.51 Lemmas: 316.14/291.51 plus(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 316.14/291.51 316.14/291.51 316.14/291.51 Generator Equations: 316.14/291.51 gen_0':s2_0(0) <=> 0' 316.14/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 316.14/291.51 316.14/291.51 316.14/291.51 The following defined symbols remain to be analysed: 316.14/291.51 times 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (43) LowerBoundPropagationProof (FINISHED) 316.14/291.51 Propagated lower bound. 316.14/291.51 ---------------------------------------- 316.14/291.51 316.14/291.51 (44) 316.14/291.51 BOUNDS(n^2, INF) 316.25/291.54 EOF