WORST_CASE(Omega(n^1), O(n^1)) 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^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 36 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 7 ms] (10) CdtProblem (11) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (12) BOUNDS(1, 1) (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTRS (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (16) typed CpxTrs (17) OrderProof [LOWER BOUND(ID), 0 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 252 ms] (20) BEST (21) proven lower bound (22) LowerBoundPropagationProof [FINISHED, 0 ms] (23) BOUNDS(n^1, INF) (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 101 ms] (26) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: double(0) -> 0 double(s(x)) -> s(s(double(x))) +(x, 0) -> x +(x, s(y)) -> s(+(x, y)) +(s(x), y) -> s(+(x, y)) double(x) -> +(x, x) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: double(0) -> 0 double(s(z0)) -> s(s(double(z0))) double(z0) -> +(z0, z0) +(z0, 0) -> z0 +(z0, s(z1)) -> s(+(z0, z1)) +(s(z0), z1) -> s(+(z0, z1)) Tuples: DOUBLE(0) -> c DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, 0) -> c3 +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) S tuples: DOUBLE(0) -> c DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, 0) -> c3 +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) K tuples:none Defined Rule Symbols: double_1, +_2 Defined Pair Symbols: DOUBLE_1, +'_2 Compound Symbols: c, c1_1, c2_1, c3, c4_1, c5_1 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: DOUBLE(0) -> c +'(z0, 0) -> c3 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: double(0) -> 0 double(s(z0)) -> s(s(double(z0))) double(z0) -> +(z0, z0) +(z0, 0) -> z0 +(z0, s(z1)) -> s(+(z0, z1)) +(s(z0), z1) -> s(+(z0, z1)) Tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) S tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) K tuples:none Defined Rule Symbols: double_1, +_2 Defined Pair Symbols: DOUBLE_1, +'_2 Compound Symbols: c1_1, c2_1, c4_1, c5_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: double(0) -> 0 double(s(z0)) -> s(s(double(z0))) double(z0) -> +(z0, z0) +(z0, 0) -> z0 +(z0, s(z1)) -> s(+(z0, z1)) +(s(z0), z1) -> s(+(z0, z1)) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) S tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: DOUBLE_1, +'_2 Compound Symbols: c1_1, c2_1, c4_1, c5_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(s(z0), z1) -> c5(+'(z0, z1)) We considered the (Usable) Rules:none And the Tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(+'(x_1, x_2)) = x_1 POL(DOUBLE(x_1)) = [1] + x_1 POL(c1(x_1)) = x_1 POL(c2(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c5(x_1)) = x_1 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) S tuples: +'(z0, s(z1)) -> c4(+'(z0, z1)) K tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(s(z0), z1) -> c5(+'(z0, z1)) Defined Rule Symbols:none Defined Pair Symbols: DOUBLE_1, +'_2 Compound Symbols: c1_1, c2_1, c4_1, c5_1 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. +'(z0, s(z1)) -> c4(+'(z0, z1)) We considered the (Usable) Rules:none And the Tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(+'(x_1, x_2)) = [1] + x_2 POL(DOUBLE(x_1)) = [1] + x_1 POL(c1(x_1)) = x_1 POL(c2(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c5(x_1)) = x_1 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(z0, s(z1)) -> c4(+'(z0, z1)) +'(s(z0), z1) -> c5(+'(z0, z1)) S tuples:none K tuples: DOUBLE(s(z0)) -> c1(DOUBLE(z0)) DOUBLE(z0) -> c2(+'(z0, z0)) +'(s(z0), z1) -> c5(+'(z0, z1)) +'(z0, s(z1)) -> c4(+'(z0, z1)) Defined Rule Symbols:none Defined Pair Symbols: DOUBLE_1, +'_2 Compound Symbols: c1_1, c2_1, c4_1, c5_1 ---------------------------------------- (11) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (12) BOUNDS(1, 1) ---------------------------------------- (13) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (14) 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: double(0') -> 0' double(s(x)) -> s(s(double(x))) +'(x, 0') -> x +'(x, s(y)) -> s(+'(x, y)) +'(s(x), y) -> s(+'(x, y)) double(x) -> +'(x, x) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (16) Obligation: Innermost TRS: Rules: double(0') -> 0' double(s(x)) -> s(s(double(x))) +'(x, 0') -> x +'(x, s(y)) -> s(+'(x, y)) +'(s(x), y) -> s(+'(x, y)) double(x) -> +'(x, x) Types: double :: 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 ---------------------------------------- (17) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: double, +' They will be analysed ascendingly in the following order: +' < double ---------------------------------------- (18) Obligation: Innermost TRS: Rules: double(0') -> 0' double(s(x)) -> s(s(double(x))) +'(x, 0') -> x +'(x, s(y)) -> s(+'(x, y)) +'(s(x), y) -> s(+'(x, y)) double(x) -> +'(x, x) Types: double :: 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: +', double They will be analysed ascendingly in the following order: +' < double ---------------------------------------- (19) 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). ---------------------------------------- (20) Complex Obligation (BEST) ---------------------------------------- (21) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: double(0') -> 0' double(s(x)) -> s(s(double(x))) +'(x, 0') -> x +'(x, s(y)) -> s(+'(x, y)) +'(s(x), y) -> s(+'(x, y)) double(x) -> +'(x, x) Types: double :: 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: +', double They will be analysed ascendingly in the following order: +' < double ---------------------------------------- (22) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (23) BOUNDS(n^1, INF) ---------------------------------------- (24) Obligation: Innermost TRS: Rules: double(0') -> 0' double(s(x)) -> s(s(double(x))) +'(x, 0') -> x +'(x, s(y)) -> s(+'(x, y)) +'(s(x), y) -> s(+'(x, y)) double(x) -> +'(x, x) Types: double :: 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: double ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: double(gen_0':s2_0(n544_0)) -> gen_0':s2_0(*(2, n544_0)), rt in Omega(1 + n544_0) Induction Base: double(gen_0':s2_0(0)) ->_R^Omega(1) 0' Induction Step: double(gen_0':s2_0(+(n544_0, 1))) ->_R^Omega(1) s(s(double(gen_0':s2_0(n544_0)))) ->_IH s(s(gen_0':s2_0(*(2, c545_0)))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) BOUNDS(1, INF)