WORST_CASE(Omega(n^1),O(n^1)) proof of input_97yrun43yu.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) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) CpxTrsMatchBoundsProof [FINISHED, 0 ms] (4) BOUNDS(1, n^1) (5) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxRelTRS (9) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) typed CpxTrs (13) OrderProof [LOWER BOUND(ID), 0 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 219 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 1362 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), 1378 ms] (24) 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: g(s(x)) -> f(x) f(0) -> s(0) f(s(x)) -> s(s(g(x))) g(0) -> 0 S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: g(s(x)) -> f(x) f(0) -> s(0) f(s(x)) -> s(s(g(x))) g(0) -> 0 S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) 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. "[5, 6, 7, 8, 9] {(5,6,[g_1|0, f_1|0, f_1|1, 0|1]), (5,7,[s_1|1]), (5,8,[s_1|1]), (6,6,[s_1|0, 0|0]), (7,6,[0|1]), (8,9,[s_1|1]), (9,6,[g_1|1, f_1|1, 0|1]), (9,7,[s_1|1]), (9,8,[s_1|1])}" ---------------------------------------- (4) BOUNDS(1, n^1) ---------------------------------------- (5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: g(s(z0)) -> f(z0) g(0) -> 0 f(0) -> s(0) f(s(z0)) -> s(s(g(z0))) Tuples: G(s(z0)) -> c(F(z0)) G(0) -> c1 F(0) -> c2 F(s(z0)) -> c3(G(z0)) S tuples: G(s(z0)) -> c(F(z0)) G(0) -> c1 F(0) -> c2 F(s(z0)) -> c3(G(z0)) K tuples:none Defined Rule Symbols: g_1, f_1 Defined Pair Symbols: G_1, F_1 Compound Symbols: c_1, c1, c2, 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 CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: G(s(z0)) -> c(F(z0)) G(0) -> c1 F(0) -> c2 F(s(z0)) -> c3(G(z0)) The (relative) TRS S consists of the following rules: g(s(z0)) -> f(z0) g(0) -> 0 f(0) -> s(0) f(s(z0)) -> s(s(g(z0))) Rewrite Strategy: INNERMOST ---------------------------------------- (9) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (10) 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: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) The (relative) TRS S consists of the following rules: g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Types: G :: s:0' -> c:c1 s :: s:0' -> s:0' c :: c2:c3 -> c:c1 F :: s:0' -> c2:c3 0' :: s:0' c1 :: c:c1 c2 :: c2:c3 c3 :: c:c1 -> c2:c3 g :: s:0' -> s:0' f :: s:0' -> s:0' hole_c:c11_4 :: c:c1 hole_s:0'2_4 :: s:0' hole_c2:c33_4 :: c2:c3 gen_s:0'4_4 :: Nat -> s:0' ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: G, F, g, f They will be analysed ascendingly in the following order: G = F g = f ---------------------------------------- (14) Obligation: Innermost TRS: Rules: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Types: G :: s:0' -> c:c1 s :: s:0' -> s:0' c :: c2:c3 -> c:c1 F :: s:0' -> c2:c3 0' :: s:0' c1 :: c:c1 c2 :: c2:c3 c3 :: c:c1 -> c2:c3 g :: s:0' -> s:0' f :: s:0' -> s:0' hole_c:c11_4 :: c:c1 hole_s:0'2_4 :: s:0' hole_c2:c33_4 :: c2:c3 gen_s:0'4_4 :: Nat -> s:0' Generator Equations: gen_s:0'4_4(0) <=> 0' gen_s:0'4_4(+(x, 1)) <=> s(gen_s:0'4_4(x)) The following defined symbols remain to be analysed: f, G, F, g They will be analysed ascendingly in the following order: G = F g = f ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: f(gen_s:0'4_4(*(2, n6_4))) -> gen_s:0'4_4(+(1, *(2, n6_4))), rt in Omega(0) Induction Base: f(gen_s:0'4_4(*(2, 0))) ->_R^Omega(0) s(0') Induction Step: f(gen_s:0'4_4(*(2, +(n6_4, 1)))) ->_R^Omega(0) s(s(g(gen_s:0'4_4(+(1, *(2, n6_4)))))) ->_R^Omega(0) s(s(f(gen_s:0'4_4(*(2, n6_4))))) ->_IH s(s(gen_s:0'4_4(+(1, *(2, c7_4))))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (16) Obligation: Innermost TRS: Rules: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Types: G :: s:0' -> c:c1 s :: s:0' -> s:0' c :: c2:c3 -> c:c1 F :: s:0' -> c2:c3 0' :: s:0' c1 :: c:c1 c2 :: c2:c3 c3 :: c:c1 -> c2:c3 g :: s:0' -> s:0' f :: s:0' -> s:0' hole_c:c11_4 :: c:c1 hole_s:0'2_4 :: s:0' hole_c2:c33_4 :: c2:c3 gen_s:0'4_4 :: Nat -> s:0' Lemmas: f(gen_s:0'4_4(*(2, n6_4))) -> gen_s:0'4_4(+(1, *(2, n6_4))), rt in Omega(0) Generator Equations: gen_s:0'4_4(0) <=> 0' gen_s:0'4_4(+(x, 1)) <=> s(gen_s:0'4_4(x)) The following defined symbols remain to be analysed: g, G, F They will be analysed ascendingly in the following order: G = F g = f ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: F(gen_s:0'4_4(*(2, n239_4))) -> *5_4, rt in Omega(n239_4) Induction Base: F(gen_s:0'4_4(*(2, 0))) Induction Step: F(gen_s:0'4_4(*(2, +(n239_4, 1)))) ->_R^Omega(1) c3(G(gen_s:0'4_4(+(1, *(2, n239_4))))) ->_R^Omega(1) c3(c(F(gen_s:0'4_4(*(2, n239_4))))) ->_IH c3(c(*5_4)) 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: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Types: G :: s:0' -> c:c1 s :: s:0' -> s:0' c :: c2:c3 -> c:c1 F :: s:0' -> c2:c3 0' :: s:0' c1 :: c:c1 c2 :: c2:c3 c3 :: c:c1 -> c2:c3 g :: s:0' -> s:0' f :: s:0' -> s:0' hole_c:c11_4 :: c:c1 hole_s:0'2_4 :: s:0' hole_c2:c33_4 :: c2:c3 gen_s:0'4_4 :: Nat -> s:0' Lemmas: f(gen_s:0'4_4(*(2, n6_4))) -> gen_s:0'4_4(+(1, *(2, n6_4))), rt in Omega(0) Generator Equations: gen_s:0'4_4(0) <=> 0' gen_s:0'4_4(+(x, 1)) <=> s(gen_s:0'4_4(x)) The following defined symbols remain to be analysed: F, G They will be analysed ascendingly in the following order: G = F ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Types: G :: s:0' -> c:c1 s :: s:0' -> s:0' c :: c2:c3 -> c:c1 F :: s:0' -> c2:c3 0' :: s:0' c1 :: c:c1 c2 :: c2:c3 c3 :: c:c1 -> c2:c3 g :: s:0' -> s:0' f :: s:0' -> s:0' hole_c:c11_4 :: c:c1 hole_s:0'2_4 :: s:0' hole_c2:c33_4 :: c2:c3 gen_s:0'4_4 :: Nat -> s:0' Lemmas: f(gen_s:0'4_4(*(2, n6_4))) -> gen_s:0'4_4(+(1, *(2, n6_4))), rt in Omega(0) F(gen_s:0'4_4(*(2, n239_4))) -> *5_4, rt in Omega(n239_4) Generator Equations: gen_s:0'4_4(0) <=> 0' gen_s:0'4_4(+(x, 1)) <=> s(gen_s:0'4_4(x)) The following defined symbols remain to be analysed: G They will be analysed ascendingly in the following order: G = F ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: G(gen_s:0'4_4(+(1, *(2, n485_4)))) -> *5_4, rt in Omega(n485_4) Induction Base: G(gen_s:0'4_4(+(1, *(2, 0)))) Induction Step: G(gen_s:0'4_4(+(1, *(2, +(n485_4, 1))))) ->_R^Omega(1) c(F(gen_s:0'4_4(+(2, *(2, n485_4))))) ->_R^Omega(1) c(c3(G(gen_s:0'4_4(+(1, *(2, n485_4)))))) ->_IH c(c3(*5_4)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: G(s(z0)) -> c(F(z0)) G(0') -> c1 F(0') -> c2 F(s(z0)) -> c3(G(z0)) g(s(z0)) -> f(z0) g(0') -> 0' f(0') -> s(0') f(s(z0)) -> s(s(g(z0))) Types: G :: s:0' -> c:c1 s :: s:0' -> s:0' c :: c2:c3 -> c:c1 F :: s:0' -> c2:c3 0' :: s:0' c1 :: c:c1 c2 :: c2:c3 c3 :: c:c1 -> c2:c3 g :: s:0' -> s:0' f :: s:0' -> s:0' hole_c:c11_4 :: c:c1 hole_s:0'2_4 :: s:0' hole_c2:c33_4 :: c2:c3 gen_s:0'4_4 :: Nat -> s:0' Lemmas: f(gen_s:0'4_4(*(2, n6_4))) -> gen_s:0'4_4(+(1, *(2, n6_4))), rt in Omega(0) F(gen_s:0'4_4(*(2, n239_4))) -> *5_4, rt in Omega(n239_4) G(gen_s:0'4_4(+(1, *(2, n485_4)))) -> *5_4, rt in Omega(n485_4) Generator Equations: gen_s:0'4_4(0) <=> 0' gen_s:0'4_4(+(x, 1)) <=> s(gen_s:0'4_4(x)) The following defined symbols remain to be analysed: F They will be analysed ascendingly in the following order: G = F