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