WORST_CASE(Omega(n^1),?) proof of input_qKKK4OxfEI.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, INF). (0) CpxTRS (1) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CdtProblem (3) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxRelTRS (5) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) typed CpxTrs (9) OrderProof [LOWER BOUND(ID), 14 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 354 ms] (12) BEST (13) proven lower bound (14) LowerBoundPropagationProof [FINISHED, 0 ms] (15) BOUNDS(n^1, INF) (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 98 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 379 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 69 ms] (22) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) first(0, Z) -> nil first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z)) sel(0, cons(X, Z)) -> X sel(s(X), cons(Y, Z)) -> sel(X, Z) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: from(z0) -> cons(z0, from(s(z0))) first(0, z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Tuples: FROM(z0) -> c(FROM(s(z0))) FIRST(0, z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0, cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) FIRST(0, z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0, cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) K tuples:none Defined Rule Symbols: from_1, first_2, sel_2 Defined Pair Symbols: FROM_1, FIRST_2, SEL_2 Compound Symbols: c_1, c1, c2_1, c3, c4_1 ---------------------------------------- (3) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (4) 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: FROM(z0) -> c(FROM(s(z0))) FIRST(0, z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0, cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) The (relative) TRS S consists of the following rules: from(z0) -> cons(z0, from(s(z0))) first(0, z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Rewrite Strategy: INNERMOST ---------------------------------------- (5) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (6) 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: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) The (relative) TRS S consists of the following rules: from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Types: FROM :: s:0' -> c c :: c -> c s :: s:0' -> s:0' FIRST :: s:0' -> cons:nil -> c1:c2 0' :: s:0' c1 :: c1:c2 cons :: s:0' -> cons:nil -> cons:nil c2 :: c1:c2 -> c1:c2 SEL :: s:0' -> cons:nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 from :: s:0' -> cons:nil first :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_5 :: c hole_s:0'2_5 :: s:0' hole_c1:c23_5 :: c1:c2 hole_cons:nil4_5 :: cons:nil hole_c3:c45_5 :: c3:c4 gen_c6_5 :: Nat -> c gen_s:0'7_5 :: Nat -> s:0' gen_c1:c28_5 :: Nat -> c1:c2 gen_cons:nil9_5 :: Nat -> cons:nil gen_c3:c410_5 :: Nat -> c3:c4 ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: FROM, FIRST, SEL, from, first, sel ---------------------------------------- (10) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Types: FROM :: s:0' -> c c :: c -> c s :: s:0' -> s:0' FIRST :: s:0' -> cons:nil -> c1:c2 0' :: s:0' c1 :: c1:c2 cons :: s:0' -> cons:nil -> cons:nil c2 :: c1:c2 -> c1:c2 SEL :: s:0' -> cons:nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 from :: s:0' -> cons:nil first :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_5 :: c hole_s:0'2_5 :: s:0' hole_c1:c23_5 :: c1:c2 hole_cons:nil4_5 :: cons:nil hole_c3:c45_5 :: c3:c4 gen_c6_5 :: Nat -> c gen_s:0'7_5 :: Nat -> s:0' gen_c1:c28_5 :: Nat -> c1:c2 gen_cons:nil9_5 :: Nat -> cons:nil gen_c3:c410_5 :: Nat -> c3:c4 Generator Equations: gen_c6_5(0) <=> hole_c1_5 gen_c6_5(+(x, 1)) <=> c(gen_c6_5(x)) gen_s:0'7_5(0) <=> 0' gen_s:0'7_5(+(x, 1)) <=> s(gen_s:0'7_5(x)) gen_c1:c28_5(0) <=> c1 gen_c1:c28_5(+(x, 1)) <=> c2(gen_c1:c28_5(x)) gen_cons:nil9_5(0) <=> nil gen_cons:nil9_5(+(x, 1)) <=> cons(0', gen_cons:nil9_5(x)) gen_c3:c410_5(0) <=> c3 gen_c3:c410_5(+(x, 1)) <=> c4(gen_c3:c410_5(x)) The following defined symbols remain to be analysed: FROM, FIRST, SEL, from, first, sel ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: FIRST(gen_s:0'7_5(n137_5), gen_cons:nil9_5(n137_5)) -> gen_c1:c28_5(n137_5), rt in Omega(1 + n137_5) Induction Base: FIRST(gen_s:0'7_5(0), gen_cons:nil9_5(0)) ->_R^Omega(1) c1 Induction Step: FIRST(gen_s:0'7_5(+(n137_5, 1)), gen_cons:nil9_5(+(n137_5, 1))) ->_R^Omega(1) c2(FIRST(gen_s:0'7_5(n137_5), gen_cons:nil9_5(n137_5))) ->_IH c2(gen_c1:c28_5(c138_5)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (12) Complex Obligation (BEST) ---------------------------------------- (13) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Types: FROM :: s:0' -> c c :: c -> c s :: s:0' -> s:0' FIRST :: s:0' -> cons:nil -> c1:c2 0' :: s:0' c1 :: c1:c2 cons :: s:0' -> cons:nil -> cons:nil c2 :: c1:c2 -> c1:c2 SEL :: s:0' -> cons:nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 from :: s:0' -> cons:nil first :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_5 :: c hole_s:0'2_5 :: s:0' hole_c1:c23_5 :: c1:c2 hole_cons:nil4_5 :: cons:nil hole_c3:c45_5 :: c3:c4 gen_c6_5 :: Nat -> c gen_s:0'7_5 :: Nat -> s:0' gen_c1:c28_5 :: Nat -> c1:c2 gen_cons:nil9_5 :: Nat -> cons:nil gen_c3:c410_5 :: Nat -> c3:c4 Generator Equations: gen_c6_5(0) <=> hole_c1_5 gen_c6_5(+(x, 1)) <=> c(gen_c6_5(x)) gen_s:0'7_5(0) <=> 0' gen_s:0'7_5(+(x, 1)) <=> s(gen_s:0'7_5(x)) gen_c1:c28_5(0) <=> c1 gen_c1:c28_5(+(x, 1)) <=> c2(gen_c1:c28_5(x)) gen_cons:nil9_5(0) <=> nil gen_cons:nil9_5(+(x, 1)) <=> cons(0', gen_cons:nil9_5(x)) gen_c3:c410_5(0) <=> c3 gen_c3:c410_5(+(x, 1)) <=> c4(gen_c3:c410_5(x)) The following defined symbols remain to be analysed: FIRST, SEL, from, first, sel ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Types: FROM :: s:0' -> c c :: c -> c s :: s:0' -> s:0' FIRST :: s:0' -> cons:nil -> c1:c2 0' :: s:0' c1 :: c1:c2 cons :: s:0' -> cons:nil -> cons:nil c2 :: c1:c2 -> c1:c2 SEL :: s:0' -> cons:nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 from :: s:0' -> cons:nil first :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_5 :: c hole_s:0'2_5 :: s:0' hole_c1:c23_5 :: c1:c2 hole_cons:nil4_5 :: cons:nil hole_c3:c45_5 :: c3:c4 gen_c6_5 :: Nat -> c gen_s:0'7_5 :: Nat -> s:0' gen_c1:c28_5 :: Nat -> c1:c2 gen_cons:nil9_5 :: Nat -> cons:nil gen_c3:c410_5 :: Nat -> c3:c4 Lemmas: FIRST(gen_s:0'7_5(n137_5), gen_cons:nil9_5(n137_5)) -> gen_c1:c28_5(n137_5), rt in Omega(1 + n137_5) Generator Equations: gen_c6_5(0) <=> hole_c1_5 gen_c6_5(+(x, 1)) <=> c(gen_c6_5(x)) gen_s:0'7_5(0) <=> 0' gen_s:0'7_5(+(x, 1)) <=> s(gen_s:0'7_5(x)) gen_c1:c28_5(0) <=> c1 gen_c1:c28_5(+(x, 1)) <=> c2(gen_c1:c28_5(x)) gen_cons:nil9_5(0) <=> nil gen_cons:nil9_5(+(x, 1)) <=> cons(0', gen_cons:nil9_5(x)) gen_c3:c410_5(0) <=> c3 gen_c3:c410_5(+(x, 1)) <=> c4(gen_c3:c410_5(x)) The following defined symbols remain to be analysed: SEL, from, first, sel ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SEL(gen_s:0'7_5(n539_5), gen_cons:nil9_5(+(1, n539_5))) -> gen_c3:c410_5(n539_5), rt in Omega(1 + n539_5) Induction Base: SEL(gen_s:0'7_5(0), gen_cons:nil9_5(+(1, 0))) ->_R^Omega(1) c3 Induction Step: SEL(gen_s:0'7_5(+(n539_5, 1)), gen_cons:nil9_5(+(1, +(n539_5, 1)))) ->_R^Omega(1) c4(SEL(gen_s:0'7_5(n539_5), gen_cons:nil9_5(+(1, n539_5)))) ->_IH c4(gen_c3:c410_5(c540_5)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Types: FROM :: s:0' -> c c :: c -> c s :: s:0' -> s:0' FIRST :: s:0' -> cons:nil -> c1:c2 0' :: s:0' c1 :: c1:c2 cons :: s:0' -> cons:nil -> cons:nil c2 :: c1:c2 -> c1:c2 SEL :: s:0' -> cons:nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 from :: s:0' -> cons:nil first :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_5 :: c hole_s:0'2_5 :: s:0' hole_c1:c23_5 :: c1:c2 hole_cons:nil4_5 :: cons:nil hole_c3:c45_5 :: c3:c4 gen_c6_5 :: Nat -> c gen_s:0'7_5 :: Nat -> s:0' gen_c1:c28_5 :: Nat -> c1:c2 gen_cons:nil9_5 :: Nat -> cons:nil gen_c3:c410_5 :: Nat -> c3:c4 Lemmas: FIRST(gen_s:0'7_5(n137_5), gen_cons:nil9_5(n137_5)) -> gen_c1:c28_5(n137_5), rt in Omega(1 + n137_5) SEL(gen_s:0'7_5(n539_5), gen_cons:nil9_5(+(1, n539_5))) -> gen_c3:c410_5(n539_5), rt in Omega(1 + n539_5) Generator Equations: gen_c6_5(0) <=> hole_c1_5 gen_c6_5(+(x, 1)) <=> c(gen_c6_5(x)) gen_s:0'7_5(0) <=> 0' gen_s:0'7_5(+(x, 1)) <=> s(gen_s:0'7_5(x)) gen_c1:c28_5(0) <=> c1 gen_c1:c28_5(+(x, 1)) <=> c2(gen_c1:c28_5(x)) gen_cons:nil9_5(0) <=> nil gen_cons:nil9_5(+(x, 1)) <=> cons(0', gen_cons:nil9_5(x)) gen_c3:c410_5(0) <=> c3 gen_c3:c410_5(+(x, 1)) <=> c4(gen_c3:c410_5(x)) The following defined symbols remain to be analysed: from, first, sel ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: first(gen_s:0'7_5(n1189_5), gen_cons:nil9_5(n1189_5)) -> gen_cons:nil9_5(n1189_5), rt in Omega(0) Induction Base: first(gen_s:0'7_5(0), gen_cons:nil9_5(0)) ->_R^Omega(0) nil Induction Step: first(gen_s:0'7_5(+(n1189_5, 1)), gen_cons:nil9_5(+(n1189_5, 1))) ->_R^Omega(0) cons(0', first(gen_s:0'7_5(n1189_5), gen_cons:nil9_5(n1189_5))) ->_IH cons(0', gen_cons:nil9_5(c1190_5)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (20) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) FIRST(0', z0) -> c1 FIRST(s(z0), cons(z1, z2)) -> c2(FIRST(z0, z2)) SEL(0', cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) first(0', z0) -> nil first(s(z0), cons(z1, z2)) -> cons(z1, first(z0, z2)) sel(0', cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Types: FROM :: s:0' -> c c :: c -> c s :: s:0' -> s:0' FIRST :: s:0' -> cons:nil -> c1:c2 0' :: s:0' c1 :: c1:c2 cons :: s:0' -> cons:nil -> cons:nil c2 :: c1:c2 -> c1:c2 SEL :: s:0' -> cons:nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 from :: s:0' -> cons:nil first :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_5 :: c hole_s:0'2_5 :: s:0' hole_c1:c23_5 :: c1:c2 hole_cons:nil4_5 :: cons:nil hole_c3:c45_5 :: c3:c4 gen_c6_5 :: Nat -> c gen_s:0'7_5 :: Nat -> s:0' gen_c1:c28_5 :: Nat -> c1:c2 gen_cons:nil9_5 :: Nat -> cons:nil gen_c3:c410_5 :: Nat -> c3:c4 Lemmas: FIRST(gen_s:0'7_5(n137_5), gen_cons:nil9_5(n137_5)) -> gen_c1:c28_5(n137_5), rt in Omega(1 + n137_5) SEL(gen_s:0'7_5(n539_5), gen_cons:nil9_5(+(1, n539_5))) -> gen_c3:c410_5(n539_5), rt in Omega(1 + n539_5) first(gen_s:0'7_5(n1189_5), gen_cons:nil9_5(n1189_5)) -> gen_cons:nil9_5(n1189_5), rt in Omega(0) Generator Equations: gen_c6_5(0) <=> hole_c1_5 gen_c6_5(+(x, 1)) <=> c(gen_c6_5(x)) gen_s:0'7_5(0) <=> 0' gen_s:0'7_5(+(x, 1)) <=> s(gen_s:0'7_5(x)) gen_c1:c28_5(0) <=> c1 gen_c1:c28_5(+(x, 1)) <=> c2(gen_c1:c28_5(x)) gen_cons:nil9_5(0) <=> nil gen_cons:nil9_5(+(x, 1)) <=> cons(0', gen_cons:nil9_5(x)) gen_c3:c410_5(0) <=> c3 gen_c3:c410_5(+(x, 1)) <=> c4(gen_c3:c410_5(x)) The following defined symbols remain to be analysed: sel ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: sel(gen_s:0'7_5(n1640_5), gen_cons:nil9_5(+(1, n1640_5))) -> gen_s:0'7_5(0), rt in Omega(0) Induction Base: sel(gen_s:0'7_5(0), gen_cons:nil9_5(+(1, 0))) ->_R^Omega(0) 0' Induction Step: sel(gen_s:0'7_5(+(n1640_5, 1)), gen_cons:nil9_5(+(1, +(n1640_5, 1)))) ->_R^Omega(0) sel(gen_s:0'7_5(n1640_5), gen_cons:nil9_5(+(1, n1640_5))) ->_IH gen_s:0'7_5(0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) BOUNDS(1, INF)