WORST_CASE(Omega(n^1),?) proof of input_2RlOkhbZgv.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), 24 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 403 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), 400 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 40 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))) head(cons(X, XS)) -> X 2nd(cons(X, XS)) -> head(XS) take(0, XS) -> nil take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, XS) 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))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Tuples: FROM(z0) -> c(FROM(s(z0))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0, z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0, cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0, z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0, cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) K tuples:none Defined Rule Symbols: from_1, head_1, 2nd_1, take_2, sel_2 Defined Pair Symbols: FROM_1, HEAD_1, 2ND_1, TAKE_2, SEL_2 Compound Symbols: c_1, c1, c2_1, c3, c4_1, c5, c6_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))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0, z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0, cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) The (relative) TRS S consists of the following rules: from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) The (relative) TRS S consists of the following rules: from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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' HEAD :: cons:nil -> c1 cons :: s:0' -> cons:nil -> cons:nil c1 :: c1 2ND :: cons:nil -> c2 c2 :: c1 -> c2 TAKE :: s:0' -> cons:nil -> c3:c4 0' :: s:0' c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 SEL :: s:0' -> cons:nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 from :: s:0' -> cons:nil head :: cons:nil -> s:0' 2nd :: cons:nil -> s:0' take :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_7 :: c hole_s:0'2_7 :: s:0' hole_c13_7 :: c1 hole_cons:nil4_7 :: cons:nil hole_c25_7 :: c2 hole_c3:c46_7 :: c3:c4 hole_c5:c67_7 :: c5:c6 gen_c8_7 :: Nat -> c gen_s:0'9_7 :: Nat -> s:0' gen_cons:nil10_7 :: Nat -> cons:nil gen_c3:c411_7 :: Nat -> c3:c4 gen_c5:c612_7 :: Nat -> c5:c6 ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: FROM, TAKE, SEL, from, take, sel ---------------------------------------- (10) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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' HEAD :: cons:nil -> c1 cons :: s:0' -> cons:nil -> cons:nil c1 :: c1 2ND :: cons:nil -> c2 c2 :: c1 -> c2 TAKE :: s:0' -> cons:nil -> c3:c4 0' :: s:0' c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 SEL :: s:0' -> cons:nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 from :: s:0' -> cons:nil head :: cons:nil -> s:0' 2nd :: cons:nil -> s:0' take :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_7 :: c hole_s:0'2_7 :: s:0' hole_c13_7 :: c1 hole_cons:nil4_7 :: cons:nil hole_c25_7 :: c2 hole_c3:c46_7 :: c3:c4 hole_c5:c67_7 :: c5:c6 gen_c8_7 :: Nat -> c gen_s:0'9_7 :: Nat -> s:0' gen_cons:nil10_7 :: Nat -> cons:nil gen_c3:c411_7 :: Nat -> c3:c4 gen_c5:c612_7 :: Nat -> c5:c6 Generator Equations: gen_c8_7(0) <=> hole_c1_7 gen_c8_7(+(x, 1)) <=> c(gen_c8_7(x)) gen_s:0'9_7(0) <=> 0' gen_s:0'9_7(+(x, 1)) <=> s(gen_s:0'9_7(x)) gen_cons:nil10_7(0) <=> nil gen_cons:nil10_7(+(x, 1)) <=> cons(0', gen_cons:nil10_7(x)) gen_c3:c411_7(0) <=> c3 gen_c3:c411_7(+(x, 1)) <=> c4(gen_c3:c411_7(x)) gen_c5:c612_7(0) <=> c5 gen_c5:c612_7(+(x, 1)) <=> c6(gen_c5:c612_7(x)) The following defined symbols remain to be analysed: FROM, TAKE, SEL, from, take, sel ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: TAKE(gen_s:0'9_7(n139_7), gen_cons:nil10_7(n139_7)) -> gen_c3:c411_7(n139_7), rt in Omega(1 + n139_7) Induction Base: TAKE(gen_s:0'9_7(0), gen_cons:nil10_7(0)) ->_R^Omega(1) c3 Induction Step: TAKE(gen_s:0'9_7(+(n139_7, 1)), gen_cons:nil10_7(+(n139_7, 1))) ->_R^Omega(1) c4(TAKE(gen_s:0'9_7(n139_7), gen_cons:nil10_7(n139_7))) ->_IH c4(gen_c3:c411_7(c140_7)) 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))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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' HEAD :: cons:nil -> c1 cons :: s:0' -> cons:nil -> cons:nil c1 :: c1 2ND :: cons:nil -> c2 c2 :: c1 -> c2 TAKE :: s:0' -> cons:nil -> c3:c4 0' :: s:0' c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 SEL :: s:0' -> cons:nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 from :: s:0' -> cons:nil head :: cons:nil -> s:0' 2nd :: cons:nil -> s:0' take :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_7 :: c hole_s:0'2_7 :: s:0' hole_c13_7 :: c1 hole_cons:nil4_7 :: cons:nil hole_c25_7 :: c2 hole_c3:c46_7 :: c3:c4 hole_c5:c67_7 :: c5:c6 gen_c8_7 :: Nat -> c gen_s:0'9_7 :: Nat -> s:0' gen_cons:nil10_7 :: Nat -> cons:nil gen_c3:c411_7 :: Nat -> c3:c4 gen_c5:c612_7 :: Nat -> c5:c6 Generator Equations: gen_c8_7(0) <=> hole_c1_7 gen_c8_7(+(x, 1)) <=> c(gen_c8_7(x)) gen_s:0'9_7(0) <=> 0' gen_s:0'9_7(+(x, 1)) <=> s(gen_s:0'9_7(x)) gen_cons:nil10_7(0) <=> nil gen_cons:nil10_7(+(x, 1)) <=> cons(0', gen_cons:nil10_7(x)) gen_c3:c411_7(0) <=> c3 gen_c3:c411_7(+(x, 1)) <=> c4(gen_c3:c411_7(x)) gen_c5:c612_7(0) <=> c5 gen_c5:c612_7(+(x, 1)) <=> c6(gen_c5:c612_7(x)) The following defined symbols remain to be analysed: TAKE, SEL, from, take, sel ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: FROM(z0) -> c(FROM(s(z0))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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' HEAD :: cons:nil -> c1 cons :: s:0' -> cons:nil -> cons:nil c1 :: c1 2ND :: cons:nil -> c2 c2 :: c1 -> c2 TAKE :: s:0' -> cons:nil -> c3:c4 0' :: s:0' c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 SEL :: s:0' -> cons:nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 from :: s:0' -> cons:nil head :: cons:nil -> s:0' 2nd :: cons:nil -> s:0' take :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_7 :: c hole_s:0'2_7 :: s:0' hole_c13_7 :: c1 hole_cons:nil4_7 :: cons:nil hole_c25_7 :: c2 hole_c3:c46_7 :: c3:c4 hole_c5:c67_7 :: c5:c6 gen_c8_7 :: Nat -> c gen_s:0'9_7 :: Nat -> s:0' gen_cons:nil10_7 :: Nat -> cons:nil gen_c3:c411_7 :: Nat -> c3:c4 gen_c5:c612_7 :: Nat -> c5:c6 Lemmas: TAKE(gen_s:0'9_7(n139_7), gen_cons:nil10_7(n139_7)) -> gen_c3:c411_7(n139_7), rt in Omega(1 + n139_7) Generator Equations: gen_c8_7(0) <=> hole_c1_7 gen_c8_7(+(x, 1)) <=> c(gen_c8_7(x)) gen_s:0'9_7(0) <=> 0' gen_s:0'9_7(+(x, 1)) <=> s(gen_s:0'9_7(x)) gen_cons:nil10_7(0) <=> nil gen_cons:nil10_7(+(x, 1)) <=> cons(0', gen_cons:nil10_7(x)) gen_c3:c411_7(0) <=> c3 gen_c3:c411_7(+(x, 1)) <=> c4(gen_c3:c411_7(x)) gen_c5:c612_7(0) <=> c5 gen_c5:c612_7(+(x, 1)) <=> c6(gen_c5:c612_7(x)) The following defined symbols remain to be analysed: SEL, from, take, sel ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SEL(gen_s:0'9_7(n609_7), gen_cons:nil10_7(+(1, n609_7))) -> gen_c5:c612_7(n609_7), rt in Omega(1 + n609_7) Induction Base: SEL(gen_s:0'9_7(0), gen_cons:nil10_7(+(1, 0))) ->_R^Omega(1) c5 Induction Step: SEL(gen_s:0'9_7(+(n609_7, 1)), gen_cons:nil10_7(+(1, +(n609_7, 1)))) ->_R^Omega(1) c6(SEL(gen_s:0'9_7(n609_7), gen_cons:nil10_7(+(1, n609_7)))) ->_IH c6(gen_c5:c612_7(c610_7)) 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))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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' HEAD :: cons:nil -> c1 cons :: s:0' -> cons:nil -> cons:nil c1 :: c1 2ND :: cons:nil -> c2 c2 :: c1 -> c2 TAKE :: s:0' -> cons:nil -> c3:c4 0' :: s:0' c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 SEL :: s:0' -> cons:nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 from :: s:0' -> cons:nil head :: cons:nil -> s:0' 2nd :: cons:nil -> s:0' take :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_7 :: c hole_s:0'2_7 :: s:0' hole_c13_7 :: c1 hole_cons:nil4_7 :: cons:nil hole_c25_7 :: c2 hole_c3:c46_7 :: c3:c4 hole_c5:c67_7 :: c5:c6 gen_c8_7 :: Nat -> c gen_s:0'9_7 :: Nat -> s:0' gen_cons:nil10_7 :: Nat -> cons:nil gen_c3:c411_7 :: Nat -> c3:c4 gen_c5:c612_7 :: Nat -> c5:c6 Lemmas: TAKE(gen_s:0'9_7(n139_7), gen_cons:nil10_7(n139_7)) -> gen_c3:c411_7(n139_7), rt in Omega(1 + n139_7) SEL(gen_s:0'9_7(n609_7), gen_cons:nil10_7(+(1, n609_7))) -> gen_c5:c612_7(n609_7), rt in Omega(1 + n609_7) Generator Equations: gen_c8_7(0) <=> hole_c1_7 gen_c8_7(+(x, 1)) <=> c(gen_c8_7(x)) gen_s:0'9_7(0) <=> 0' gen_s:0'9_7(+(x, 1)) <=> s(gen_s:0'9_7(x)) gen_cons:nil10_7(0) <=> nil gen_cons:nil10_7(+(x, 1)) <=> cons(0', gen_cons:nil10_7(x)) gen_c3:c411_7(0) <=> c3 gen_c3:c411_7(+(x, 1)) <=> c4(gen_c3:c411_7(x)) gen_c5:c612_7(0) <=> c5 gen_c5:c612_7(+(x, 1)) <=> c6(gen_c5:c612_7(x)) The following defined symbols remain to be analysed: from, take, sel ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: take(gen_s:0'9_7(n1291_7), gen_cons:nil10_7(n1291_7)) -> gen_cons:nil10_7(n1291_7), rt in Omega(0) Induction Base: take(gen_s:0'9_7(0), gen_cons:nil10_7(0)) ->_R^Omega(0) nil Induction Step: take(gen_s:0'9_7(+(n1291_7, 1)), gen_cons:nil10_7(+(n1291_7, 1))) ->_R^Omega(0) cons(0', take(gen_s:0'9_7(n1291_7), gen_cons:nil10_7(n1291_7))) ->_IH cons(0', gen_cons:nil10_7(c1292_7)) 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))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0', z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0', cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(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' HEAD :: cons:nil -> c1 cons :: s:0' -> cons:nil -> cons:nil c1 :: c1 2ND :: cons:nil -> c2 c2 :: c1 -> c2 TAKE :: s:0' -> cons:nil -> c3:c4 0' :: s:0' c3 :: c3:c4 c4 :: c3:c4 -> c3:c4 SEL :: s:0' -> cons:nil -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 from :: s:0' -> cons:nil head :: cons:nil -> s:0' 2nd :: cons:nil -> s:0' take :: s:0' -> cons:nil -> cons:nil nil :: cons:nil sel :: s:0' -> cons:nil -> s:0' hole_c1_7 :: c hole_s:0'2_7 :: s:0' hole_c13_7 :: c1 hole_cons:nil4_7 :: cons:nil hole_c25_7 :: c2 hole_c3:c46_7 :: c3:c4 hole_c5:c67_7 :: c5:c6 gen_c8_7 :: Nat -> c gen_s:0'9_7 :: Nat -> s:0' gen_cons:nil10_7 :: Nat -> cons:nil gen_c3:c411_7 :: Nat -> c3:c4 gen_c5:c612_7 :: Nat -> c5:c6 Lemmas: TAKE(gen_s:0'9_7(n139_7), gen_cons:nil10_7(n139_7)) -> gen_c3:c411_7(n139_7), rt in Omega(1 + n139_7) SEL(gen_s:0'9_7(n609_7), gen_cons:nil10_7(+(1, n609_7))) -> gen_c5:c612_7(n609_7), rt in Omega(1 + n609_7) take(gen_s:0'9_7(n1291_7), gen_cons:nil10_7(n1291_7)) -> gen_cons:nil10_7(n1291_7), rt in Omega(0) Generator Equations: gen_c8_7(0) <=> hole_c1_7 gen_c8_7(+(x, 1)) <=> c(gen_c8_7(x)) gen_s:0'9_7(0) <=> 0' gen_s:0'9_7(+(x, 1)) <=> s(gen_s:0'9_7(x)) gen_cons:nil10_7(0) <=> nil gen_cons:nil10_7(+(x, 1)) <=> cons(0', gen_cons:nil10_7(x)) gen_c3:c411_7(0) <=> c3 gen_c3:c411_7(+(x, 1)) <=> c4(gen_c3:c411_7(x)) gen_c5:c612_7(0) <=> c5 gen_c5:c612_7(+(x, 1)) <=> c6(gen_c5:c612_7(x)) The following defined symbols remain to be analysed: sel ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: sel(gen_s:0'9_7(n1742_7), gen_cons:nil10_7(+(1, n1742_7))) -> gen_s:0'9_7(0), rt in Omega(0) Induction Base: sel(gen_s:0'9_7(0), gen_cons:nil10_7(+(1, 0))) ->_R^Omega(0) 0' Induction Step: sel(gen_s:0'9_7(+(n1742_7, 1)), gen_cons:nil10_7(+(1, +(n1742_7, 1)))) ->_R^Omega(0) sel(gen_s:0'9_7(n1742_7), gen_cons:nil10_7(+(1, n1742_7))) ->_IH gen_s:0'9_7(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)