WORST_CASE(Omega(n^1),?) proof of input_Qr5Xy4OqeJ.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), 10 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 359 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), 46 ms] (18) typed CpxTrs ---------------------------------------- (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: lookup(Cons(x', xs'), Cons(x, xs)) -> lookup(xs', xs) lookup(Nil, Cons(x, xs)) -> x run(e, p) -> intlookup(e, p) intlookup(e, p) -> intlookup(lookup(e, p), p) 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: lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Tuples: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) S tuples: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) K tuples:none Defined Rule Symbols: lookup_2, run_2, intlookup_2 Defined Pair Symbols: LOOKUP_2, RUN_2, INTLOOKUP_2 Compound Symbols: c_1, c1, c2_1, c3_2 ---------------------------------------- (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: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) The (relative) TRS S consists of the following rules: lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) 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: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) The (relative) TRS S consists of the following rules: lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Types: LOOKUP :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 Nil :: Cons:Nil c1 :: c:c1 RUN :: Cons:Nil -> Cons:Nil -> c2 c2 :: c3 -> c2 INTLOOKUP :: Cons:Nil -> Cons:Nil -> c3 c3 :: c3 -> c:c1 -> c3 lookup :: Cons:Nil -> Cons:Nil -> Cons:Nil run :: Cons:Nil -> Cons:Nil -> run:intlookup intlookup :: Cons:Nil -> Cons:Nil -> run:intlookup hole_c:c11_4 :: c:c1 hole_Cons:Nil2_4 :: Cons:Nil hole_c23_4 :: c2 hole_c34_4 :: c3 hole_run:intlookup5_4 :: run:intlookup gen_c:c16_4 :: Nat -> c:c1 gen_Cons:Nil7_4 :: Nat -> Cons:Nil gen_c38_4 :: Nat -> c3 ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: LOOKUP, INTLOOKUP, lookup, intlookup They will be analysed ascendingly in the following order: LOOKUP < INTLOOKUP lookup < INTLOOKUP lookup < intlookup ---------------------------------------- (10) Obligation: Innermost TRS: Rules: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Types: LOOKUP :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 Nil :: Cons:Nil c1 :: c:c1 RUN :: Cons:Nil -> Cons:Nil -> c2 c2 :: c3 -> c2 INTLOOKUP :: Cons:Nil -> Cons:Nil -> c3 c3 :: c3 -> c:c1 -> c3 lookup :: Cons:Nil -> Cons:Nil -> Cons:Nil run :: Cons:Nil -> Cons:Nil -> run:intlookup intlookup :: Cons:Nil -> Cons:Nil -> run:intlookup hole_c:c11_4 :: c:c1 hole_Cons:Nil2_4 :: Cons:Nil hole_c23_4 :: c2 hole_c34_4 :: c3 hole_run:intlookup5_4 :: run:intlookup gen_c:c16_4 :: Nat -> c:c1 gen_Cons:Nil7_4 :: Nat -> Cons:Nil gen_c38_4 :: Nat -> c3 Generator Equations: gen_c:c16_4(0) <=> c1 gen_c:c16_4(+(x, 1)) <=> c(gen_c:c16_4(x)) gen_Cons:Nil7_4(0) <=> Nil gen_Cons:Nil7_4(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil7_4(x)) gen_c38_4(0) <=> hole_c34_4 gen_c38_4(+(x, 1)) <=> c3(gen_c38_4(x), c1) The following defined symbols remain to be analysed: LOOKUP, INTLOOKUP, lookup, intlookup They will be analysed ascendingly in the following order: LOOKUP < INTLOOKUP lookup < INTLOOKUP lookup < intlookup ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LOOKUP(gen_Cons:Nil7_4(n10_4), gen_Cons:Nil7_4(+(1, n10_4))) -> gen_c:c16_4(n10_4), rt in Omega(1 + n10_4) Induction Base: LOOKUP(gen_Cons:Nil7_4(0), gen_Cons:Nil7_4(+(1, 0))) ->_R^Omega(1) c1 Induction Step: LOOKUP(gen_Cons:Nil7_4(+(n10_4, 1)), gen_Cons:Nil7_4(+(1, +(n10_4, 1)))) ->_R^Omega(1) c(LOOKUP(gen_Cons:Nil7_4(n10_4), gen_Cons:Nil7_4(+(1, n10_4)))) ->_IH c(gen_c:c16_4(c11_4)) 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: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Types: LOOKUP :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 Nil :: Cons:Nil c1 :: c:c1 RUN :: Cons:Nil -> Cons:Nil -> c2 c2 :: c3 -> c2 INTLOOKUP :: Cons:Nil -> Cons:Nil -> c3 c3 :: c3 -> c:c1 -> c3 lookup :: Cons:Nil -> Cons:Nil -> Cons:Nil run :: Cons:Nil -> Cons:Nil -> run:intlookup intlookup :: Cons:Nil -> Cons:Nil -> run:intlookup hole_c:c11_4 :: c:c1 hole_Cons:Nil2_4 :: Cons:Nil hole_c23_4 :: c2 hole_c34_4 :: c3 hole_run:intlookup5_4 :: run:intlookup gen_c:c16_4 :: Nat -> c:c1 gen_Cons:Nil7_4 :: Nat -> Cons:Nil gen_c38_4 :: Nat -> c3 Generator Equations: gen_c:c16_4(0) <=> c1 gen_c:c16_4(+(x, 1)) <=> c(gen_c:c16_4(x)) gen_Cons:Nil7_4(0) <=> Nil gen_Cons:Nil7_4(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil7_4(x)) gen_c38_4(0) <=> hole_c34_4 gen_c38_4(+(x, 1)) <=> c3(gen_c38_4(x), c1) The following defined symbols remain to be analysed: LOOKUP, INTLOOKUP, lookup, intlookup They will be analysed ascendingly in the following order: LOOKUP < INTLOOKUP lookup < INTLOOKUP lookup < intlookup ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Types: LOOKUP :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 Nil :: Cons:Nil c1 :: c:c1 RUN :: Cons:Nil -> Cons:Nil -> c2 c2 :: c3 -> c2 INTLOOKUP :: Cons:Nil -> Cons:Nil -> c3 c3 :: c3 -> c:c1 -> c3 lookup :: Cons:Nil -> Cons:Nil -> Cons:Nil run :: Cons:Nil -> Cons:Nil -> run:intlookup intlookup :: Cons:Nil -> Cons:Nil -> run:intlookup hole_c:c11_4 :: c:c1 hole_Cons:Nil2_4 :: Cons:Nil hole_c23_4 :: c2 hole_c34_4 :: c3 hole_run:intlookup5_4 :: run:intlookup gen_c:c16_4 :: Nat -> c:c1 gen_Cons:Nil7_4 :: Nat -> Cons:Nil gen_c38_4 :: Nat -> c3 Lemmas: LOOKUP(gen_Cons:Nil7_4(n10_4), gen_Cons:Nil7_4(+(1, n10_4))) -> gen_c:c16_4(n10_4), rt in Omega(1 + n10_4) Generator Equations: gen_c:c16_4(0) <=> c1 gen_c:c16_4(+(x, 1)) <=> c(gen_c:c16_4(x)) gen_Cons:Nil7_4(0) <=> Nil gen_Cons:Nil7_4(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil7_4(x)) gen_c38_4(0) <=> hole_c34_4 gen_c38_4(+(x, 1)) <=> c3(gen_c38_4(x), c1) The following defined symbols remain to be analysed: lookup, INTLOOKUP, intlookup They will be analysed ascendingly in the following order: lookup < INTLOOKUP lookup < intlookup ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: lookup(gen_Cons:Nil7_4(n325_4), gen_Cons:Nil7_4(+(1, n325_4))) -> gen_Cons:Nil7_4(0), rt in Omega(0) Induction Base: lookup(gen_Cons:Nil7_4(0), gen_Cons:Nil7_4(+(1, 0))) ->_R^Omega(0) Nil Induction Step: lookup(gen_Cons:Nil7_4(+(n325_4, 1)), gen_Cons:Nil7_4(+(1, +(n325_4, 1)))) ->_R^Omega(0) lookup(gen_Cons:Nil7_4(n325_4), gen_Cons:Nil7_4(+(1, n325_4))) ->_IH gen_Cons:Nil7_4(0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (18) Obligation: Innermost TRS: Rules: LOOKUP(Cons(z0, z1), Cons(z2, z3)) -> c(LOOKUP(z1, z3)) LOOKUP(Nil, Cons(z0, z1)) -> c1 RUN(z0, z1) -> c2(INTLOOKUP(z0, z1)) INTLOOKUP(z0, z1) -> c3(INTLOOKUP(lookup(z0, z1), z1), LOOKUP(z0, z1)) lookup(Cons(z0, z1), Cons(z2, z3)) -> lookup(z1, z3) lookup(Nil, Cons(z0, z1)) -> z0 run(z0, z1) -> intlookup(z0, z1) intlookup(z0, z1) -> intlookup(lookup(z0, z1), z1) Types: LOOKUP :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 Nil :: Cons:Nil c1 :: c:c1 RUN :: Cons:Nil -> Cons:Nil -> c2 c2 :: c3 -> c2 INTLOOKUP :: Cons:Nil -> Cons:Nil -> c3 c3 :: c3 -> c:c1 -> c3 lookup :: Cons:Nil -> Cons:Nil -> Cons:Nil run :: Cons:Nil -> Cons:Nil -> run:intlookup intlookup :: Cons:Nil -> Cons:Nil -> run:intlookup hole_c:c11_4 :: c:c1 hole_Cons:Nil2_4 :: Cons:Nil hole_c23_4 :: c2 hole_c34_4 :: c3 hole_run:intlookup5_4 :: run:intlookup gen_c:c16_4 :: Nat -> c:c1 gen_Cons:Nil7_4 :: Nat -> Cons:Nil gen_c38_4 :: Nat -> c3 Lemmas: LOOKUP(gen_Cons:Nil7_4(n10_4), gen_Cons:Nil7_4(+(1, n10_4))) -> gen_c:c16_4(n10_4), rt in Omega(1 + n10_4) lookup(gen_Cons:Nil7_4(n325_4), gen_Cons:Nil7_4(+(1, n325_4))) -> gen_Cons:Nil7_4(0), rt in Omega(0) Generator Equations: gen_c:c16_4(0) <=> c1 gen_c:c16_4(+(x, 1)) <=> c(gen_c:c16_4(x)) gen_Cons:Nil7_4(0) <=> Nil gen_Cons:Nil7_4(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil7_4(x)) gen_c38_4(0) <=> hole_c34_4 gen_c38_4(+(x, 1)) <=> c3(gen_c38_4(x), c1) The following defined symbols remain to be analysed: INTLOOKUP, intlookup