WORST_CASE(Omega(n^1),O(n^1)) proof of input_XM12dfRRzN.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-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) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTRS (9) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (10) CpxTRS (11) CpxTrsMatchBoundsProof [FINISHED, 4 ms] (12) BOUNDS(1, n^1) (13) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRelTRS (19) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (20) typed CpxTrs (21) OrderProof [LOWER BOUND(ID), 0 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 247 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 98 ms] (30) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: sum(0) -> 0 sum(s(x)) -> +(sum(x), s(x)) sum1(0) -> 0 sum1(s(x)) -> s(+(sum1(x), +(x, x))) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: sum(0) -> 0 sum(s(z0)) -> +(sum(z0), s(z0)) sum1(0) -> 0 sum1(s(z0)) -> s(+(sum1(z0), +(z0, z0))) Tuples: SUM(0) -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0) -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) S tuples: SUM(0) -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0) -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) K tuples:none Defined Rule Symbols: sum_1, sum1_1 Defined Pair Symbols: SUM_1, SUM1_1 Compound Symbols: c, c1_1, c2, c3_1 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: SUM1(0) -> c2 SUM(0) -> c ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: sum(0) -> 0 sum(s(z0)) -> +(sum(z0), s(z0)) sum1(0) -> 0 sum1(s(z0)) -> s(+(sum1(z0), +(z0, z0))) Tuples: SUM(s(z0)) -> c1(SUM(z0)) SUM1(s(z0)) -> c3(SUM1(z0)) S tuples: SUM(s(z0)) -> c1(SUM(z0)) SUM1(s(z0)) -> c3(SUM1(z0)) K tuples:none Defined Rule Symbols: sum_1, sum1_1 Defined Pair Symbols: SUM_1, SUM1_1 Compound Symbols: c1_1, c3_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: sum(0) -> 0 sum(s(z0)) -> +(sum(z0), s(z0)) sum1(0) -> 0 sum1(s(z0)) -> s(+(sum1(z0), +(z0, z0))) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: SUM(s(z0)) -> c1(SUM(z0)) SUM1(s(z0)) -> c3(SUM1(z0)) S tuples: SUM(s(z0)) -> c1(SUM(z0)) SUM1(s(z0)) -> c3(SUM1(z0)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: SUM_1, SUM1_1 Compound Symbols: c1_1, c3_1 ---------------------------------------- (7) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: SUM(s(z0)) -> c1(SUM(z0)) SUM1(s(z0)) -> c3(SUM1(z0)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (9) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: SUM(s(z0)) -> c1(SUM(z0)) SUM1(s(z0)) -> c3(SUM1(z0)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (11) CpxTrsMatchBoundsProof (FINISHED) A linear upper bound on the runtime complexity of the TRS R could be shown with a Match Bound [MATCHBOUNDS1,MATCHBOUNDS2] of 1. The certificate found is represented by the following graph. "[53, 54, 55, 56] {(53,54,[SUM_1|0, SUM1_1|0]), (53,55,[c1_1|1]), (53,56,[c3_1|1]), (54,54,[s_1|0, c1_1|0, c3_1|0]), (55,54,[SUM_1|1]), (55,55,[c1_1|1]), (56,54,[SUM1_1|1]), (56,56,[c3_1|1])}" ---------------------------------------- (12) BOUNDS(1, n^1) ---------------------------------------- (13) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: sum(0) -> 0 sum(s(z0)) -> +(sum(z0), s(z0)) sum1(0) -> 0 sum1(s(z0)) -> s(+(sum1(z0), +(z0, z0))) Tuples: SUM(0) -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0) -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) S tuples: SUM(0) -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0) -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) K tuples:none Defined Rule Symbols: sum_1, sum1_1 Defined Pair Symbols: SUM_1, SUM1_1 Compound Symbols: c, c1_1, c2, c3_1 ---------------------------------------- (15) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: SUM(0) -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0) -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) The (relative) TRS S consists of the following rules: sum(0) -> 0 sum(s(z0)) -> +(sum(z0), s(z0)) sum1(0) -> 0 sum1(s(z0)) -> s(+(sum1(z0), +(z0, z0))) Rewrite Strategy: INNERMOST ---------------------------------------- (17) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (18) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: SUM(0') -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0') -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) The (relative) TRS S consists of the following rules: sum(0') -> 0' sum(s(z0)) -> +'(sum(z0), s(z0)) sum1(0') -> 0' sum1(s(z0)) -> s(+'(sum1(z0), +'(z0, z0))) Rewrite Strategy: INNERMOST ---------------------------------------- (19) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (20) Obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0') -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) sum(0') -> 0' sum(s(z0)) -> +'(sum(z0), s(z0)) sum1(0') -> 0' sum1(s(z0)) -> s(+'(sum1(z0), +'(z0, z0))) Types: SUM :: 0':s:+' -> c:c1 0' :: 0':s:+' c :: c:c1 s :: 0':s:+' -> 0':s:+' c1 :: c:c1 -> c:c1 SUM1 :: 0':s:+' -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 -> c2:c3 sum :: 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' sum1 :: 0':s:+' -> 0':s:+' hole_c:c11_4 :: c:c1 hole_0':s:+'2_4 :: 0':s:+' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_0':s:+'5_4 :: Nat -> 0':s:+' gen_c2:c36_4 :: Nat -> c2:c3 ---------------------------------------- (21) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: SUM, SUM1, sum, sum1 ---------------------------------------- (22) Obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0') -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) sum(0') -> 0' sum(s(z0)) -> +'(sum(z0), s(z0)) sum1(0') -> 0' sum1(s(z0)) -> s(+'(sum1(z0), +'(z0, z0))) Types: SUM :: 0':s:+' -> c:c1 0' :: 0':s:+' c :: c:c1 s :: 0':s:+' -> 0':s:+' c1 :: c:c1 -> c:c1 SUM1 :: 0':s:+' -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 -> c2:c3 sum :: 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' sum1 :: 0':s:+' -> 0':s:+' hole_c:c11_4 :: c:c1 hole_0':s:+'2_4 :: 0':s:+' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_0':s:+'5_4 :: Nat -> 0':s:+' gen_c2:c36_4 :: Nat -> c2:c3 Generator Equations: gen_c:c14_4(0) <=> c gen_c:c14_4(+(x, 1)) <=> c1(gen_c:c14_4(x)) gen_0':s:+'5_4(0) <=> 0' gen_0':s:+'5_4(+(x, 1)) <=> s(gen_0':s:+'5_4(x)) gen_c2:c36_4(0) <=> c2 gen_c2:c36_4(+(x, 1)) <=> c3(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: SUM, SUM1, sum, sum1 ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SUM(gen_0':s:+'5_4(n8_4)) -> gen_c:c14_4(n8_4), rt in Omega(1 + n8_4) Induction Base: SUM(gen_0':s:+'5_4(0)) ->_R^Omega(1) c Induction Step: SUM(gen_0':s:+'5_4(+(n8_4, 1))) ->_R^Omega(1) c1(SUM(gen_0':s:+'5_4(n8_4))) ->_IH c1(gen_c:c14_4(c9_4)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Complex Obligation (BEST) ---------------------------------------- (25) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0') -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) sum(0') -> 0' sum(s(z0)) -> +'(sum(z0), s(z0)) sum1(0') -> 0' sum1(s(z0)) -> s(+'(sum1(z0), +'(z0, z0))) Types: SUM :: 0':s:+' -> c:c1 0' :: 0':s:+' c :: c:c1 s :: 0':s:+' -> 0':s:+' c1 :: c:c1 -> c:c1 SUM1 :: 0':s:+' -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 -> c2:c3 sum :: 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' sum1 :: 0':s:+' -> 0':s:+' hole_c:c11_4 :: c:c1 hole_0':s:+'2_4 :: 0':s:+' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_0':s:+'5_4 :: Nat -> 0':s:+' gen_c2:c36_4 :: Nat -> c2:c3 Generator Equations: gen_c:c14_4(0) <=> c gen_c:c14_4(+(x, 1)) <=> c1(gen_c:c14_4(x)) gen_0':s:+'5_4(0) <=> 0' gen_0':s:+'5_4(+(x, 1)) <=> s(gen_0':s:+'5_4(x)) gen_c2:c36_4(0) <=> c2 gen_c2:c36_4(+(x, 1)) <=> c3(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: SUM, SUM1, sum, sum1 ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0') -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) sum(0') -> 0' sum(s(z0)) -> +'(sum(z0), s(z0)) sum1(0') -> 0' sum1(s(z0)) -> s(+'(sum1(z0), +'(z0, z0))) Types: SUM :: 0':s:+' -> c:c1 0' :: 0':s:+' c :: c:c1 s :: 0':s:+' -> 0':s:+' c1 :: c:c1 -> c:c1 SUM1 :: 0':s:+' -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 -> c2:c3 sum :: 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' sum1 :: 0':s:+' -> 0':s:+' hole_c:c11_4 :: c:c1 hole_0':s:+'2_4 :: 0':s:+' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_0':s:+'5_4 :: Nat -> 0':s:+' gen_c2:c36_4 :: Nat -> c2:c3 Lemmas: SUM(gen_0':s:+'5_4(n8_4)) -> gen_c:c14_4(n8_4), rt in Omega(1 + n8_4) Generator Equations: gen_c:c14_4(0) <=> c gen_c:c14_4(+(x, 1)) <=> c1(gen_c:c14_4(x)) gen_0':s:+'5_4(0) <=> 0' gen_0':s:+'5_4(+(x, 1)) <=> s(gen_0':s:+'5_4(x)) gen_c2:c36_4(0) <=> c2 gen_c2:c36_4(+(x, 1)) <=> c3(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: SUM1, sum, sum1 ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SUM1(gen_0':s:+'5_4(n216_4)) -> gen_c2:c36_4(n216_4), rt in Omega(1 + n216_4) Induction Base: SUM1(gen_0':s:+'5_4(0)) ->_R^Omega(1) c2 Induction Step: SUM1(gen_0':s:+'5_4(+(n216_4, 1))) ->_R^Omega(1) c3(SUM1(gen_0':s:+'5_4(n216_4))) ->_IH c3(gen_c2:c36_4(c217_4)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (30) Obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SUM(z0)) SUM1(0') -> c2 SUM1(s(z0)) -> c3(SUM1(z0)) sum(0') -> 0' sum(s(z0)) -> +'(sum(z0), s(z0)) sum1(0') -> 0' sum1(s(z0)) -> s(+'(sum1(z0), +'(z0, z0))) Types: SUM :: 0':s:+' -> c:c1 0' :: 0':s:+' c :: c:c1 s :: 0':s:+' -> 0':s:+' c1 :: c:c1 -> c:c1 SUM1 :: 0':s:+' -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 -> c2:c3 sum :: 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' sum1 :: 0':s:+' -> 0':s:+' hole_c:c11_4 :: c:c1 hole_0':s:+'2_4 :: 0':s:+' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_0':s:+'5_4 :: Nat -> 0':s:+' gen_c2:c36_4 :: Nat -> c2:c3 Lemmas: SUM(gen_0':s:+'5_4(n8_4)) -> gen_c:c14_4(n8_4), rt in Omega(1 + n8_4) SUM1(gen_0':s:+'5_4(n216_4)) -> gen_c2:c36_4(n216_4), rt in Omega(1 + n216_4) Generator Equations: gen_c:c14_4(0) <=> c gen_c:c14_4(+(x, 1)) <=> c1(gen_c:c14_4(x)) gen_0':s:+'5_4(0) <=> 0' gen_0':s:+'5_4(+(x, 1)) <=> s(gen_0':s:+'5_4(x)) gen_c2:c36_4(0) <=> c2 gen_c2:c36_4(+(x, 1)) <=> c3(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: sum, sum1