WORST_CASE(Omega(n^1),O(n^1)) proof of input_11bISRCX2G.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, 0 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), 14 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 305 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) 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)) -> +(sqr(s(x)), sum(x)) sqr(x) -> *(x, x) sum(s(x)) -> +(*(s(x), s(x)), sum(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)) -> +(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +(*(s(z0), s(z0)), sum(z0)) sqr(z0) -> *(z0, z0) Tuples: SUM(0) -> c SUM(s(z0)) -> c1(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 S tuples: SUM(0) -> c SUM(s(z0)) -> c1(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 K tuples:none Defined Rule Symbols: sum_1, sqr_1 Defined Pair Symbols: SUM_1, SQR_1 Compound Symbols: c, c1_1, c2_1, c3_1, c4 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUM(0) -> c SUM(s(z0)) -> c1(SQR(s(z0))) SQR(z0) -> c4 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: sum(0) -> 0 sum(s(z0)) -> +(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +(*(s(z0), s(z0)), sum(z0)) sqr(z0) -> *(z0, z0) Tuples: SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) S tuples: SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) K tuples:none Defined Rule Symbols: sum_1, sqr_1 Defined Pair Symbols: SUM_1 Compound Symbols: c2_1, c3_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: sum(0) -> 0 sum(s(z0)) -> +(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +(*(s(z0), s(z0)), sum(z0)) sqr(z0) -> *(z0, z0) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) S tuples: SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: SUM_1 Compound Symbols: c2_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)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(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)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(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. "[43, 44, 45, 46] {(43,44,[SUM_1|0]), (43,45,[c2_1|1]), (43,46,[c3_1|1]), (44,44,[s_1|0, c2_1|0, c3_1|0]), (45,44,[SUM_1|1]), (45,45,[c2_1|1]), (45,46,[c3_1|1]), (46,44,[SUM_1|1]), (46,45,[c2_1|1]), (46,46,[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)) -> +(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +(*(s(z0), s(z0)), sum(z0)) sqr(z0) -> *(z0, z0) Tuples: SUM(0) -> c SUM(s(z0)) -> c1(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 S tuples: SUM(0) -> c SUM(s(z0)) -> c1(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 K tuples:none Defined Rule Symbols: sum_1, sqr_1 Defined Pair Symbols: SUM_1, SQR_1 Compound Symbols: c, c1_1, c2_1, c3_1, c4 ---------------------------------------- (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(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 The (relative) TRS S consists of the following rules: sum(0) -> 0 sum(s(z0)) -> +(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +(*(s(z0), s(z0)), sum(z0)) sqr(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(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 The (relative) TRS S consists of the following rules: sum(0') -> 0' sum(s(z0)) -> +'(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +'(*'(s(z0), s(z0)), sum(z0)) sqr(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(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 sum(0') -> 0' sum(s(z0)) -> +'(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +'(*'(s(z0), s(z0)), sum(z0)) sqr(z0) -> *'(z0, z0) Types: SUM :: 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c4 -> c:c1:c2:c3 SQR :: 0':s:+' -> c4 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 c4 :: c4 sum :: 0':s:+' -> 0':s:+' +' :: *' -> 0':s:+' -> 0':s:+' sqr :: 0':s:+' -> *' *' :: 0':s:+' -> 0':s:+' -> *' hole_c:c1:c2:c31_5 :: c:c1:c2:c3 hole_0':s:+'2_5 :: 0':s:+' hole_c43_5 :: c4 hole_*'4_5 :: *' gen_c:c1:c2:c35_5 :: Nat -> c:c1:c2:c3 gen_0':s:+'6_5 :: Nat -> 0':s:+' ---------------------------------------- (21) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: SUM, sum ---------------------------------------- (22) Obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 sum(0') -> 0' sum(s(z0)) -> +'(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +'(*'(s(z0), s(z0)), sum(z0)) sqr(z0) -> *'(z0, z0) Types: SUM :: 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c4 -> c:c1:c2:c3 SQR :: 0':s:+' -> c4 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 c4 :: c4 sum :: 0':s:+' -> 0':s:+' +' :: *' -> 0':s:+' -> 0':s:+' sqr :: 0':s:+' -> *' *' :: 0':s:+' -> 0':s:+' -> *' hole_c:c1:c2:c31_5 :: c:c1:c2:c3 hole_0':s:+'2_5 :: 0':s:+' hole_c43_5 :: c4 hole_*'4_5 :: *' gen_c:c1:c2:c35_5 :: Nat -> c:c1:c2:c3 gen_0':s:+'6_5 :: Nat -> 0':s:+' Generator Equations: gen_c:c1:c2:c35_5(0) <=> c gen_c:c1:c2:c35_5(+(x, 1)) <=> c2(gen_c:c1:c2:c35_5(x)) gen_0':s:+'6_5(0) <=> 0' gen_0':s:+'6_5(+(x, 1)) <=> s(gen_0':s:+'6_5(x)) The following defined symbols remain to be analysed: SUM, sum ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SUM(gen_0':s:+'6_5(n8_5)) -> gen_c:c1:c2:c35_5(n8_5), rt in Omega(1 + n8_5) Induction Base: SUM(gen_0':s:+'6_5(0)) ->_R^Omega(1) c Induction Step: SUM(gen_0':s:+'6_5(+(n8_5, 1))) ->_R^Omega(1) c2(SUM(gen_0':s:+'6_5(n8_5))) ->_IH c2(gen_c:c1:c2:c35_5(c9_5)) 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(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 sum(0') -> 0' sum(s(z0)) -> +'(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +'(*'(s(z0), s(z0)), sum(z0)) sqr(z0) -> *'(z0, z0) Types: SUM :: 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c4 -> c:c1:c2:c3 SQR :: 0':s:+' -> c4 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 c4 :: c4 sum :: 0':s:+' -> 0':s:+' +' :: *' -> 0':s:+' -> 0':s:+' sqr :: 0':s:+' -> *' *' :: 0':s:+' -> 0':s:+' -> *' hole_c:c1:c2:c31_5 :: c:c1:c2:c3 hole_0':s:+'2_5 :: 0':s:+' hole_c43_5 :: c4 hole_*'4_5 :: *' gen_c:c1:c2:c35_5 :: Nat -> c:c1:c2:c3 gen_0':s:+'6_5 :: Nat -> 0':s:+' Generator Equations: gen_c:c1:c2:c35_5(0) <=> c gen_c:c1:c2:c35_5(+(x, 1)) <=> c2(gen_c:c1:c2:c35_5(x)) gen_0':s:+'6_5(0) <=> 0' gen_0':s:+'6_5(+(x, 1)) <=> s(gen_0':s:+'6_5(x)) The following defined symbols remain to be analysed: SUM, sum ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: SUM(0') -> c SUM(s(z0)) -> c1(SQR(s(z0))) SUM(s(z0)) -> c2(SUM(z0)) SUM(s(z0)) -> c3(SUM(z0)) SQR(z0) -> c4 sum(0') -> 0' sum(s(z0)) -> +'(sqr(s(z0)), sum(z0)) sum(s(z0)) -> +'(*'(s(z0), s(z0)), sum(z0)) sqr(z0) -> *'(z0, z0) Types: SUM :: 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c4 -> c:c1:c2:c3 SQR :: 0':s:+' -> c4 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 c4 :: c4 sum :: 0':s:+' -> 0':s:+' +' :: *' -> 0':s:+' -> 0':s:+' sqr :: 0':s:+' -> *' *' :: 0':s:+' -> 0':s:+' -> *' hole_c:c1:c2:c31_5 :: c:c1:c2:c3 hole_0':s:+'2_5 :: 0':s:+' hole_c43_5 :: c4 hole_*'4_5 :: *' gen_c:c1:c2:c35_5 :: Nat -> c:c1:c2:c3 gen_0':s:+'6_5 :: Nat -> 0':s:+' Lemmas: SUM(gen_0':s:+'6_5(n8_5)) -> gen_c:c1:c2:c35_5(n8_5), rt in Omega(1 + n8_5) Generator Equations: gen_c:c1:c2:c35_5(0) <=> c gen_c:c1:c2:c35_5(+(x, 1)) <=> c2(gen_c:c1:c2:c35_5(x)) gen_0':s:+'6_5(0) <=> 0' gen_0':s:+'6_5(+(x, 1)) <=> s(gen_0':s:+'6_5(x)) The following defined symbols remain to be analysed: sum