WORST_CASE(Omega(n^1),O(n^1)) proof of input_P0odRfkyp3.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) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (12) CpxTRS (13) CpxTrsMatchBoundsTAProof [FINISHED, 0 ms] (14) BOUNDS(1, n^1) (15) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CdtProblem (17) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRelTRS (19) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRelTRS (21) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (22) typed CpxTrs (23) OrderProof [LOWER BOUND(ID), 16 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 288 ms] (26) BEST (27) proven lower bound (28) LowerBoundPropagationProof [FINISHED, 0 ms] (29) BOUNDS(n^1, INF) (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: p(s(x)) -> x fac(0) -> s(0) fac(s(x)) -> times(s(x), fac(p(s(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: p(s(z0)) -> z0 fac(0) -> s(0) fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Tuples: P(s(z0)) -> c FAC(0) -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) S tuples: P(s(z0)) -> c FAC(0) -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) K tuples:none Defined Rule Symbols: p_1, fac_1 Defined Pair Symbols: P_1, FAC_1 Compound Symbols: c, c1, c2_2 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: P(s(z0)) -> c FAC(0) -> c1 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: p(s(z0)) -> z0 fac(0) -> s(0) fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Tuples: FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) S tuples: FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) K tuples:none Defined Rule Symbols: p_1, fac_1 Defined Pair Symbols: FAC_1 Compound Symbols: c2_2 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: p(s(z0)) -> z0 fac(0) -> s(0) fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Tuples: FAC(s(z0)) -> c2(FAC(p(s(z0)))) S tuples: FAC(s(z0)) -> c2(FAC(p(s(z0)))) K tuples:none Defined Rule Symbols: p_1, fac_1 Defined Pair Symbols: FAC_1 Compound Symbols: c2_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: fac(0) -> s(0) fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: p(s(z0)) -> z0 Tuples: FAC(s(z0)) -> c2(FAC(p(s(z0)))) S tuples: FAC(s(z0)) -> c2(FAC(p(s(z0)))) K tuples:none Defined Rule Symbols: p_1 Defined Pair Symbols: FAC_1 Compound Symbols: c2_1 ---------------------------------------- (9) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: FAC(s(z0)) -> c2(FAC(p(s(z0)))) The (relative) TRS S consists of the following rules: p(s(z0)) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (11) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (12) 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: FAC(s(z0)) -> c2(FAC(p(s(z0)))) p(s(z0)) -> z0 S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTrsMatchBoundsTAProof (FINISHED) A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 1. The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by: final states : [1, 2] transitions: s0(0) -> 0 c20(0) -> 0 FAC0(0) -> 1 p0(0) -> 2 s1(0) -> 5 p1(5) -> 4 FAC1(4) -> 3 c21(3) -> 1 c21(3) -> 3 0 -> 2 0 -> 4 ---------------------------------------- (14) BOUNDS(1, n^1) ---------------------------------------- (15) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: p(s(z0)) -> z0 fac(0) -> s(0) fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Tuples: P(s(z0)) -> c FAC(0) -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) S tuples: P(s(z0)) -> c FAC(0) -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) K tuples:none Defined Rule Symbols: p_1, fac_1 Defined Pair Symbols: P_1, FAC_1 Compound Symbols: c, c1, c2_2 ---------------------------------------- (17) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (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: P(s(z0)) -> c FAC(0) -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) The (relative) TRS S consists of the following rules: p(s(z0)) -> z0 fac(0) -> s(0) fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Rewrite Strategy: INNERMOST ---------------------------------------- (19) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (20) 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: P(s(z0)) -> c FAC(0') -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) The (relative) TRS S consists of the following rules: p(s(z0)) -> z0 fac(0') -> s(0') fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Rewrite Strategy: INNERMOST ---------------------------------------- (21) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (22) Obligation: Innermost TRS: Rules: P(s(z0)) -> c FAC(0') -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) p(s(z0)) -> z0 fac(0') -> s(0') fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Types: P :: s:0':times -> c s :: s:0':times -> s:0':times c :: c FAC :: s:0':times -> c1:c2 0' :: s:0':times c1 :: c1:c2 c2 :: c1:c2 -> c -> c1:c2 p :: s:0':times -> s:0':times fac :: s:0':times -> s:0':times times :: s:0':times -> s:0':times -> s:0':times hole_c1_3 :: c hole_s:0':times2_3 :: s:0':times hole_c1:c23_3 :: c1:c2 gen_s:0':times4_3 :: Nat -> s:0':times gen_c1:c25_3 :: Nat -> c1:c2 ---------------------------------------- (23) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: FAC, fac ---------------------------------------- (24) Obligation: Innermost TRS: Rules: P(s(z0)) -> c FAC(0') -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) p(s(z0)) -> z0 fac(0') -> s(0') fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Types: P :: s:0':times -> c s :: s:0':times -> s:0':times c :: c FAC :: s:0':times -> c1:c2 0' :: s:0':times c1 :: c1:c2 c2 :: c1:c2 -> c -> c1:c2 p :: s:0':times -> s:0':times fac :: s:0':times -> s:0':times times :: s:0':times -> s:0':times -> s:0':times hole_c1_3 :: c hole_s:0':times2_3 :: s:0':times hole_c1:c23_3 :: c1:c2 gen_s:0':times4_3 :: Nat -> s:0':times gen_c1:c25_3 :: Nat -> c1:c2 Generator Equations: gen_s:0':times4_3(0) <=> 0' gen_s:0':times4_3(+(x, 1)) <=> s(gen_s:0':times4_3(x)) gen_c1:c25_3(0) <=> c1 gen_c1:c25_3(+(x, 1)) <=> c2(gen_c1:c25_3(x), c) The following defined symbols remain to be analysed: FAC, fac ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: FAC(gen_s:0':times4_3(n7_3)) -> gen_c1:c25_3(n7_3), rt in Omega(1 + n7_3) Induction Base: FAC(gen_s:0':times4_3(0)) ->_R^Omega(1) c1 Induction Step: FAC(gen_s:0':times4_3(+(n7_3, 1))) ->_R^Omega(1) c2(FAC(p(s(gen_s:0':times4_3(n7_3)))), P(s(gen_s:0':times4_3(n7_3)))) ->_R^Omega(0) c2(FAC(gen_s:0':times4_3(n7_3)), P(s(gen_s:0':times4_3(n7_3)))) ->_IH c2(gen_c1:c25_3(c8_3), P(s(gen_s:0':times4_3(n7_3)))) ->_R^Omega(1) c2(gen_c1:c25_3(n7_3), c) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Complex Obligation (BEST) ---------------------------------------- (27) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: P(s(z0)) -> c FAC(0') -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) p(s(z0)) -> z0 fac(0') -> s(0') fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Types: P :: s:0':times -> c s :: s:0':times -> s:0':times c :: c FAC :: s:0':times -> c1:c2 0' :: s:0':times c1 :: c1:c2 c2 :: c1:c2 -> c -> c1:c2 p :: s:0':times -> s:0':times fac :: s:0':times -> s:0':times times :: s:0':times -> s:0':times -> s:0':times hole_c1_3 :: c hole_s:0':times2_3 :: s:0':times hole_c1:c23_3 :: c1:c2 gen_s:0':times4_3 :: Nat -> s:0':times gen_c1:c25_3 :: Nat -> c1:c2 Generator Equations: gen_s:0':times4_3(0) <=> 0' gen_s:0':times4_3(+(x, 1)) <=> s(gen_s:0':times4_3(x)) gen_c1:c25_3(0) <=> c1 gen_c1:c25_3(+(x, 1)) <=> c2(gen_c1:c25_3(x), c) The following defined symbols remain to be analysed: FAC, fac ---------------------------------------- (28) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (29) BOUNDS(n^1, INF) ---------------------------------------- (30) Obligation: Innermost TRS: Rules: P(s(z0)) -> c FAC(0') -> c1 FAC(s(z0)) -> c2(FAC(p(s(z0))), P(s(z0))) p(s(z0)) -> z0 fac(0') -> s(0') fac(s(z0)) -> times(s(z0), fac(p(s(z0)))) Types: P :: s:0':times -> c s :: s:0':times -> s:0':times c :: c FAC :: s:0':times -> c1:c2 0' :: s:0':times c1 :: c1:c2 c2 :: c1:c2 -> c -> c1:c2 p :: s:0':times -> s:0':times fac :: s:0':times -> s:0':times times :: s:0':times -> s:0':times -> s:0':times hole_c1_3 :: c hole_s:0':times2_3 :: s:0':times hole_c1:c23_3 :: c1:c2 gen_s:0':times4_3 :: Nat -> s:0':times gen_c1:c25_3 :: Nat -> c1:c2 Lemmas: FAC(gen_s:0':times4_3(n7_3)) -> gen_c1:c25_3(n7_3), rt in Omega(1 + n7_3) Generator Equations: gen_s:0':times4_3(0) <=> 0' gen_s:0':times4_3(+(x, 1)) <=> s(gen_s:0':times4_3(x)) gen_c1:c25_3(0) <=> c1 gen_c1:c25_3(+(x, 1)) <=> c2(gen_c1:c25_3(x), c) The following defined symbols remain to be analysed: fac