WORST_CASE(Omega(n^1),O(n^1)) proof of input_zTUAgaP67Q.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) CpxTrsMatchBoundsTAProof [FINISHED, 43 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), 281 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^1, INF) (20) 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), y) -> g(x, S(y)) f(y, S(x)) -> f(S(y), x) g(0, x2) -> x2 f(x1, 0) -> g(x1, 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), y) -> g(x, S(y)) f(y, S(x)) -> f(S(y), x) g(0, x2) -> x2 f(x1, 0) -> g(x1, 0) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) 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 2. 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 00() -> 0 g0(0, 0) -> 1 f0(0, 0) -> 2 S1(0) -> 3 g1(0, 3) -> 1 S1(0) -> 4 f1(4, 0) -> 2 01() -> 5 g1(0, 5) -> 2 S1(3) -> 3 S1(5) -> 3 g1(0, 3) -> 2 S1(4) -> 4 g1(4, 5) -> 2 S2(5) -> 6 g2(0, 6) -> 2 g2(4, 6) -> 2 S1(6) -> 3 S2(6) -> 6 0 -> 1 3 -> 1 3 -> 2 5 -> 2 6 -> 2 ---------------------------------------- (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), z1) -> g(z0, S(z1)) g(0, z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0) -> g(z0, 0) Tuples: G(S(z0), z1) -> c(G(z0, S(z1))) G(0, z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0) -> c3(G(z0, 0)) S tuples: G(S(z0), z1) -> c(G(z0, S(z1))) G(0, z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0) -> c3(G(z0, 0)) K tuples:none Defined Rule Symbols: g_2, f_2 Defined Pair Symbols: G_2, F_2 Compound Symbols: c_1, c1, 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 CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: G(S(z0), z1) -> c(G(z0, S(z1))) G(0, z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0) -> c3(G(z0, 0)) The (relative) TRS S consists of the following rules: g(S(z0), z1) -> g(z0, S(z1)) g(0, z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0) -> g(z0, 0) 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), z1) -> c(G(z0, S(z1))) G(0', z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0') -> c3(G(z0, 0')) The (relative) TRS S consists of the following rules: g(S(z0), z1) -> g(z0, S(z1)) g(0', z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0') -> g(z0, 0') Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: G(S(z0), z1) -> c(G(z0, S(z1))) G(0', z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0') -> c3(G(z0, 0')) g(S(z0), z1) -> g(z0, S(z1)) g(0', z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0') -> g(z0, 0') Types: G :: S:0' -> S:0' -> c:c1 S :: S:0' -> S:0' c :: c:c1 -> c:c1 0' :: S:0' c1 :: c:c1 F :: S:0' -> S:0' -> c2:c3 c2 :: c2:c3 -> c2:c3 c3 :: c:c1 -> c2:c3 g :: S:0' -> S:0' -> S:0' f :: S:0' -> S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_S:0'5_4 :: Nat -> S:0' gen_c2:c36_4 :: Nat -> c2:c3 ---------------------------------------- (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), z1) -> c(G(z0, S(z1))) G(0', z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0') -> c3(G(z0, 0')) g(S(z0), z1) -> g(z0, S(z1)) g(0', z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0') -> g(z0, 0') Types: G :: S:0' -> S:0' -> c:c1 S :: S:0' -> S:0' c :: c:c1 -> c:c1 0' :: S:0' c1 :: c:c1 F :: S:0' -> S:0' -> c2:c3 c2 :: c2:c3 -> c2:c3 c3 :: c:c1 -> c2:c3 g :: S:0' -> S:0' -> S:0' f :: S:0' -> S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_S:0'5_4 :: Nat -> S:0' gen_c2:c36_4 :: Nat -> c2:c3 Generator Equations: gen_c:c14_4(0) <=> c1 gen_c:c14_4(+(x, 1)) <=> c(gen_c:c14_4(x)) gen_S:0'5_4(0) <=> 0' gen_S:0'5_4(+(x, 1)) <=> S(gen_S:0'5_4(x)) gen_c2:c36_4(0) <=> c3(c1) gen_c2:c36_4(+(x, 1)) <=> c2(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: G, F, g, f They will be analysed ascendingly in the following order: G < F g < f ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: G(gen_S:0'5_4(n8_4), gen_S:0'5_4(b)) -> gen_c:c14_4(n8_4), rt in Omega(1 + n8_4) Induction Base: G(gen_S:0'5_4(0), gen_S:0'5_4(b)) ->_R^Omega(1) c1 Induction Step: G(gen_S:0'5_4(+(n8_4, 1)), gen_S:0'5_4(b)) ->_R^Omega(1) c(G(gen_S:0'5_4(n8_4), S(gen_S:0'5_4(b)))) ->_IH c(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). ---------------------------------------- (16) Complex Obligation (BEST) ---------------------------------------- (17) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: G(S(z0), z1) -> c(G(z0, S(z1))) G(0', z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0') -> c3(G(z0, 0')) g(S(z0), z1) -> g(z0, S(z1)) g(0', z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0') -> g(z0, 0') Types: G :: S:0' -> S:0' -> c:c1 S :: S:0' -> S:0' c :: c:c1 -> c:c1 0' :: S:0' c1 :: c:c1 F :: S:0' -> S:0' -> c2:c3 c2 :: c2:c3 -> c2:c3 c3 :: c:c1 -> c2:c3 g :: S:0' -> S:0' -> S:0' f :: S:0' -> S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_S:0'5_4 :: Nat -> S:0' gen_c2:c36_4 :: Nat -> c2:c3 Generator Equations: gen_c:c14_4(0) <=> c1 gen_c:c14_4(+(x, 1)) <=> c(gen_c:c14_4(x)) gen_S:0'5_4(0) <=> 0' gen_S:0'5_4(+(x, 1)) <=> S(gen_S:0'5_4(x)) gen_c2:c36_4(0) <=> c3(c1) gen_c2:c36_4(+(x, 1)) <=> c2(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: G, F, g, f They will be analysed ascendingly in the following order: G < F g < f ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Innermost TRS: Rules: G(S(z0), z1) -> c(G(z0, S(z1))) G(0', z0) -> c1 F(z0, S(z1)) -> c2(F(S(z0), z1)) F(z0, 0') -> c3(G(z0, 0')) g(S(z0), z1) -> g(z0, S(z1)) g(0', z0) -> z0 f(z0, S(z1)) -> f(S(z0), z1) f(z0, 0') -> g(z0, 0') Types: G :: S:0' -> S:0' -> c:c1 S :: S:0' -> S:0' c :: c:c1 -> c:c1 0' :: S:0' c1 :: c:c1 F :: S:0' -> S:0' -> c2:c3 c2 :: c2:c3 -> c2:c3 c3 :: c:c1 -> c2:c3 g :: S:0' -> S:0' -> S:0' f :: S:0' -> S:0' -> S:0' hole_c:c11_4 :: c:c1 hole_S:0'2_4 :: S:0' hole_c2:c33_4 :: c2:c3 gen_c:c14_4 :: Nat -> c:c1 gen_S:0'5_4 :: Nat -> S:0' gen_c2:c36_4 :: Nat -> c2:c3 Lemmas: G(gen_S:0'5_4(n8_4), gen_S:0'5_4(b)) -> gen_c:c14_4(n8_4), rt in Omega(1 + n8_4) Generator Equations: gen_c:c14_4(0) <=> c1 gen_c:c14_4(+(x, 1)) <=> c(gen_c:c14_4(x)) gen_S:0'5_4(0) <=> 0' gen_S:0'5_4(+(x, 1)) <=> S(gen_S:0'5_4(x)) gen_c2:c36_4(0) <=> c3(c1) gen_c2:c36_4(+(x, 1)) <=> c2(gen_c2:c36_4(x)) The following defined symbols remain to be analysed: F, g, f They will be analysed ascendingly in the following order: g < f