314.82/291.50 WORST_CASE(Omega(n^1), O(n^2)) 314.87/291.51 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 314.87/291.51 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 314.87/291.51 314.87/291.51 314.87/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 314.87/291.51 314.87/291.51 (0) CpxTRS 314.87/291.51 (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] 314.87/291.51 (2) CdtProblem 314.87/291.51 (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] 314.87/291.51 (4) CdtProblem 314.87/291.51 (5) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 89 ms] 314.87/291.51 (6) CdtProblem 314.87/291.51 (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 29 ms] 314.87/291.51 (8) CdtProblem 314.87/291.51 (9) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] 314.87/291.51 (10) BOUNDS(1, 1) 314.87/291.51 (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] 314.87/291.51 (12) CpxTRS 314.87/291.51 (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 314.87/291.51 (14) typed CpxTrs 314.87/291.51 (15) OrderProof [LOWER BOUND(ID), 0 ms] 314.87/291.51 (16) typed CpxTrs 314.87/291.51 (17) RewriteLemmaProof [LOWER BOUND(ID), 300 ms] 314.87/291.51 (18) BEST 314.87/291.51 (19) proven lower bound 314.87/291.51 (20) LowerBoundPropagationProof [FINISHED, 0 ms] 314.87/291.51 (21) BOUNDS(n^1, INF) 314.87/291.51 (22) typed CpxTrs 314.87/291.51 (23) RewriteLemmaProof [LOWER BOUND(ID), 778 ms] 314.87/291.51 (24) BOUNDS(1, INF) 314.87/291.51 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (0) 314.87/291.51 Obligation: 314.87/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). 314.87/291.51 314.87/291.51 314.87/291.51 The TRS R consists of the following rules: 314.87/291.51 314.87/291.51 sum(0) -> 0 314.87/291.51 sum(s(x)) -> +(sum(x), s(x)) 314.87/291.51 +(x, 0) -> x 314.87/291.51 +(x, s(y)) -> s(+(x, y)) 314.87/291.51 314.87/291.51 S is empty. 314.87/291.51 Rewrite Strategy: INNERMOST 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (1) CpxTrsToCdtProof (UPPER BOUND(ID)) 314.87/291.51 Converted Cpx (relative) TRS to CDT 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (2) 314.87/291.51 Obligation: 314.87/291.51 Complexity Dependency Tuples Problem 314.87/291.51 314.87/291.51 Rules: 314.87/291.51 sum(0) -> 0 314.87/291.51 sum(s(z0)) -> +(sum(z0), s(z0)) 314.87/291.51 +(z0, 0) -> z0 314.87/291.51 +(z0, s(z1)) -> s(+(z0, z1)) 314.87/291.51 Tuples: 314.87/291.51 SUM(0) -> c 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, 0) -> c2 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 S tuples: 314.87/291.51 SUM(0) -> c 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, 0) -> c2 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 K tuples:none 314.87/291.51 Defined Rule Symbols: sum_1, +_2 314.87/291.51 314.87/291.51 Defined Pair Symbols: SUM_1, +'_2 314.87/291.51 314.87/291.51 Compound Symbols: c, c1_2, c2, c3_1 314.87/291.51 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) 314.87/291.51 Removed 2 trailing nodes: 314.87/291.51 +'(z0, 0) -> c2 314.87/291.51 SUM(0) -> c 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (4) 314.87/291.51 Obligation: 314.87/291.51 Complexity Dependency Tuples Problem 314.87/291.51 314.87/291.51 Rules: 314.87/291.51 sum(0) -> 0 314.87/291.51 sum(s(z0)) -> +(sum(z0), s(z0)) 314.87/291.51 +(z0, 0) -> z0 314.87/291.51 +(z0, s(z1)) -> s(+(z0, z1)) 314.87/291.51 Tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 S tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 K tuples:none 314.87/291.51 Defined Rule Symbols: sum_1, +_2 314.87/291.51 314.87/291.51 Defined Pair Symbols: SUM_1, +'_2 314.87/291.51 314.87/291.51 Compound Symbols: c1_2, c3_1 314.87/291.51 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (5) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) 314.87/291.51 Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 We considered the (Usable) Rules:none 314.87/291.51 And the Tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 The order we found is given by the following interpretation: 314.87/291.51 314.87/291.51 Polynomial interpretation : 314.87/291.51 314.87/291.51 POL(+(x_1, x_2)) = [1] + x_2 314.87/291.51 POL(+'(x_1, x_2)) = 0 314.87/291.51 POL(0) = [1] 314.87/291.51 POL(SUM(x_1)) = x_1 314.87/291.51 POL(c1(x_1, x_2)) = x_1 + x_2 314.87/291.51 POL(c3(x_1)) = x_1 314.87/291.51 POL(s(x_1)) = [1] + x_1 314.87/291.51 POL(sum(x_1)) = [1] + x_1 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (6) 314.87/291.51 Obligation: 314.87/291.51 Complexity Dependency Tuples Problem 314.87/291.51 314.87/291.51 Rules: 314.87/291.51 sum(0) -> 0 314.87/291.51 sum(s(z0)) -> +(sum(z0), s(z0)) 314.87/291.51 +(z0, 0) -> z0 314.87/291.51 +(z0, s(z1)) -> s(+(z0, z1)) 314.87/291.51 Tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 S tuples: 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 K tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 Defined Rule Symbols: sum_1, +_2 314.87/291.51 314.87/291.51 Defined Pair Symbols: SUM_1, +'_2 314.87/291.51 314.87/291.51 Compound Symbols: c1_2, c3_1 314.87/291.51 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) 314.87/291.51 Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 We considered the (Usable) Rules:none 314.87/291.51 And the Tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 The order we found is given by the following interpretation: 314.87/291.51 314.87/291.51 Polynomial interpretation : 314.87/291.51 314.87/291.51 POL(+(x_1, x_2)) = [1] + x_2 + [2]x_2^2 314.87/291.51 POL(+'(x_1, x_2)) = x_2 314.87/291.51 POL(0) = 0 314.87/291.51 POL(SUM(x_1)) = x_1^2 314.87/291.51 POL(c1(x_1, x_2)) = x_1 + x_2 314.87/291.51 POL(c3(x_1)) = x_1 314.87/291.51 POL(s(x_1)) = [1] + x_1 314.87/291.51 POL(sum(x_1)) = [2] + [2]x_1 + [2]x_1^2 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (8) 314.87/291.51 Obligation: 314.87/291.51 Complexity Dependency Tuples Problem 314.87/291.51 314.87/291.51 Rules: 314.87/291.51 sum(0) -> 0 314.87/291.51 sum(s(z0)) -> +(sum(z0), s(z0)) 314.87/291.51 +(z0, 0) -> z0 314.87/291.51 +(z0, s(z1)) -> s(+(z0, z1)) 314.87/291.51 Tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 S tuples:none 314.87/291.51 K tuples: 314.87/291.51 SUM(s(z0)) -> c1(+'(sum(z0), s(z0)), SUM(z0)) 314.87/291.51 +'(z0, s(z1)) -> c3(+'(z0, z1)) 314.87/291.51 Defined Rule Symbols: sum_1, +_2 314.87/291.51 314.87/291.51 Defined Pair Symbols: SUM_1, +'_2 314.87/291.51 314.87/291.51 Compound Symbols: c1_2, c3_1 314.87/291.51 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (9) SIsEmptyProof (BOTH BOUNDS(ID, ID)) 314.87/291.51 The set S is empty 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (10) 314.87/291.51 BOUNDS(1, 1) 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (11) RenamingProof (BOTH BOUNDS(ID, ID)) 314.87/291.51 Renamed function symbols to avoid clashes with predefined symbol. 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (12) 314.87/291.51 Obligation: 314.87/291.51 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 314.87/291.51 314.87/291.51 314.87/291.51 The TRS R consists of the following rules: 314.87/291.51 314.87/291.51 sum(0') -> 0' 314.87/291.51 sum(s(x)) -> +'(sum(x), s(x)) 314.87/291.51 +'(x, 0') -> x 314.87/291.51 +'(x, s(y)) -> s(+'(x, y)) 314.87/291.51 314.87/291.51 S is empty. 314.87/291.51 Rewrite Strategy: INNERMOST 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 314.87/291.51 Infered types. 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (14) 314.87/291.51 Obligation: 314.87/291.51 Innermost TRS: 314.87/291.51 Rules: 314.87/291.51 sum(0') -> 0' 314.87/291.51 sum(s(x)) -> +'(sum(x), s(x)) 314.87/291.51 +'(x, 0') -> x 314.87/291.51 +'(x, s(y)) -> s(+'(x, y)) 314.87/291.51 314.87/291.51 Types: 314.87/291.51 sum :: 0':s -> 0':s 314.87/291.51 0' :: 0':s 314.87/291.51 s :: 0':s -> 0':s 314.87/291.51 +' :: 0':s -> 0':s -> 0':s 314.87/291.51 hole_0':s1_0 :: 0':s 314.87/291.51 gen_0':s2_0 :: Nat -> 0':s 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (15) OrderProof (LOWER BOUND(ID)) 314.87/291.51 Heuristically decided to analyse the following defined symbols: 314.87/291.51 sum, +' 314.87/291.51 314.87/291.51 They will be analysed ascendingly in the following order: 314.87/291.51 +' < sum 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (16) 314.87/291.51 Obligation: 314.87/291.51 Innermost TRS: 314.87/291.51 Rules: 314.87/291.51 sum(0') -> 0' 314.87/291.51 sum(s(x)) -> +'(sum(x), s(x)) 314.87/291.51 +'(x, 0') -> x 314.87/291.51 +'(x, s(y)) -> s(+'(x, y)) 314.87/291.51 314.87/291.51 Types: 314.87/291.51 sum :: 0':s -> 0':s 314.87/291.51 0' :: 0':s 314.87/291.51 s :: 0':s -> 0':s 314.87/291.51 +' :: 0':s -> 0':s -> 0':s 314.87/291.51 hole_0':s1_0 :: 0':s 314.87/291.51 gen_0':s2_0 :: Nat -> 0':s 314.87/291.51 314.87/291.51 314.87/291.51 Generator Equations: 314.87/291.51 gen_0':s2_0(0) <=> 0' 314.87/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 314.87/291.51 314.87/291.51 314.87/291.51 The following defined symbols remain to be analysed: 314.87/291.51 +', sum 314.87/291.51 314.87/291.51 They will be analysed ascendingly in the following order: 314.87/291.51 +' < sum 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (17) RewriteLemmaProof (LOWER BOUND(ID)) 314.87/291.51 Proved the following rewrite lemma: 314.87/291.51 +'(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 314.87/291.51 314.87/291.51 Induction Base: 314.87/291.51 +'(gen_0':s2_0(a), gen_0':s2_0(0)) ->_R^Omega(1) 314.87/291.51 gen_0':s2_0(a) 314.87/291.51 314.87/291.51 Induction Step: 314.87/291.51 +'(gen_0':s2_0(a), gen_0':s2_0(+(n4_0, 1))) ->_R^Omega(1) 314.87/291.51 s(+'(gen_0':s2_0(a), gen_0':s2_0(n4_0))) ->_IH 314.87/291.51 s(gen_0':s2_0(+(a, c5_0))) 314.87/291.51 314.87/291.51 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (18) 314.87/291.51 Complex Obligation (BEST) 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (19) 314.87/291.51 Obligation: 314.87/291.51 Proved the lower bound n^1 for the following obligation: 314.87/291.51 314.87/291.51 Innermost TRS: 314.87/291.51 Rules: 314.87/291.51 sum(0') -> 0' 314.87/291.51 sum(s(x)) -> +'(sum(x), s(x)) 314.87/291.51 +'(x, 0') -> x 314.87/291.51 +'(x, s(y)) -> s(+'(x, y)) 314.87/291.51 314.87/291.51 Types: 314.87/291.51 sum :: 0':s -> 0':s 314.87/291.51 0' :: 0':s 314.87/291.51 s :: 0':s -> 0':s 314.87/291.51 +' :: 0':s -> 0':s -> 0':s 314.87/291.51 hole_0':s1_0 :: 0':s 314.87/291.51 gen_0':s2_0 :: Nat -> 0':s 314.87/291.51 314.87/291.51 314.87/291.51 Generator Equations: 314.87/291.51 gen_0':s2_0(0) <=> 0' 314.87/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 314.87/291.51 314.87/291.51 314.87/291.51 The following defined symbols remain to be analysed: 314.87/291.51 +', sum 314.87/291.51 314.87/291.51 They will be analysed ascendingly in the following order: 314.87/291.51 +' < sum 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (20) LowerBoundPropagationProof (FINISHED) 314.87/291.51 Propagated lower bound. 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (21) 314.87/291.51 BOUNDS(n^1, INF) 314.87/291.51 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (22) 314.87/291.51 Obligation: 314.87/291.51 Innermost TRS: 314.87/291.51 Rules: 314.87/291.51 sum(0') -> 0' 314.87/291.51 sum(s(x)) -> +'(sum(x), s(x)) 314.87/291.51 +'(x, 0') -> x 314.87/291.51 +'(x, s(y)) -> s(+'(x, y)) 314.87/291.51 314.87/291.51 Types: 314.87/291.51 sum :: 0':s -> 0':s 314.87/291.51 0' :: 0':s 314.87/291.51 s :: 0':s -> 0':s 314.87/291.51 +' :: 0':s -> 0':s -> 0':s 314.87/291.51 hole_0':s1_0 :: 0':s 314.87/291.51 gen_0':s2_0 :: Nat -> 0':s 314.87/291.51 314.87/291.51 314.87/291.51 Lemmas: 314.87/291.51 +'(gen_0':s2_0(a), gen_0':s2_0(n4_0)) -> gen_0':s2_0(+(n4_0, a)), rt in Omega(1 + n4_0) 314.87/291.51 314.87/291.51 314.87/291.51 Generator Equations: 314.87/291.51 gen_0':s2_0(0) <=> 0' 314.87/291.51 gen_0':s2_0(+(x, 1)) <=> s(gen_0':s2_0(x)) 314.87/291.51 314.87/291.51 314.87/291.51 The following defined symbols remain to be analysed: 314.87/291.51 sum 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (23) RewriteLemmaProof (LOWER BOUND(ID)) 314.87/291.51 Proved the following rewrite lemma: 314.87/291.51 sum(gen_0':s2_0(+(1, n435_0))) -> *3_0, rt in Omega(n435_0) 314.87/291.51 314.87/291.51 Induction Base: 314.87/291.51 sum(gen_0':s2_0(+(1, 0))) 314.87/291.51 314.87/291.51 Induction Step: 314.87/291.51 sum(gen_0':s2_0(+(1, +(n435_0, 1)))) ->_R^Omega(1) 314.87/291.51 +'(sum(gen_0':s2_0(+(1, n435_0))), s(gen_0':s2_0(+(1, n435_0)))) ->_IH 314.87/291.51 +'(*3_0, s(gen_0':s2_0(+(1, n435_0)))) 314.87/291.51 314.87/291.51 We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). 314.87/291.51 ---------------------------------------- 314.87/291.51 314.87/291.51 (24) 314.87/291.51 BOUNDS(1, INF) 314.87/291.54 EOF