WORST_CASE(NON_POLY,?) proof of input_qMFpYVgt1B.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, 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), 17 ms] (10) typed CpxTrs (11) RewriteLemmaProof [LOWER BOUND(ID), 267 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), 38 ms] (18) typed CpxTrs (19) RewriteLemmaProof [FINISHED, 986 ms] (20) BOUNDS(EXP, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(EXP, INF). The TRS R consists of the following rules: rev(nil) -> nil rev(cons(x, l)) -> cons(rev1(x, l), rev2(x, l)) rev1(0, nil) -> 0 rev1(s(x), nil) -> s(x) rev1(x, cons(y, l)) -> rev1(y, l) rev2(x, nil) -> nil rev2(x, cons(y, l)) -> rev(cons(x, rev2(y, l))) 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: rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0, nil) -> 0 rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Tuples: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0, nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) S tuples: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0, nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) K tuples:none Defined Rule Symbols: rev_1, rev1_2, rev2_2 Defined Pair Symbols: REV_1, REV1_2, REV2_2 Compound Symbols: c, c1_1, c2_1, c3, c4, c5_1, c6, c7_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(EXP, INF). The TRS R consists of the following rules: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0, nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) The (relative) TRS S consists of the following rules: rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0, nil) -> 0 rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, 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(EXP, INF). The TRS R consists of the following rules: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0', nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) The (relative) TRS S consists of the following rules: rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0', nil) -> 0' rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (8) Obligation: Innermost TRS: Rules: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0', nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0', nil) -> 0' rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Types: REV :: nil:cons -> c:c1:c2 nil :: nil:cons c :: c:c1:c2 cons :: 0':s -> nil:cons -> nil:cons c1 :: c3:c4:c5 -> c:c1:c2 REV1 :: 0':s -> nil:cons -> c3:c4:c5 c2 :: c6:c7 -> c:c1:c2 REV2 :: 0':s -> nil:cons -> c6:c7 0' :: 0':s c3 :: c3:c4:c5 s :: a -> 0':s c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 c6 :: c6:c7 c7 :: c:c1:c2 -> c6:c7 -> c6:c7 rev2 :: 0':s -> nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: 0':s -> nil:cons -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_nil:cons2_8 :: nil:cons hole_0':s3_8 :: 0':s hole_c3:c4:c54_8 :: c3:c4:c5 hole_c6:c75_8 :: c6:c7 hole_a6_8 :: a gen_nil:cons7_8 :: Nat -> nil:cons gen_c3:c4:c58_8 :: Nat -> c3:c4:c5 gen_c6:c79_8 :: Nat -> c6:c7 ---------------------------------------- (9) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: REV, REV1, REV2, rev2, rev, rev1 They will be analysed ascendingly in the following order: REV1 < REV REV = REV2 rev2 < REV2 rev2 = rev rev1 < rev ---------------------------------------- (10) Obligation: Innermost TRS: Rules: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0', nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0', nil) -> 0' rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Types: REV :: nil:cons -> c:c1:c2 nil :: nil:cons c :: c:c1:c2 cons :: 0':s -> nil:cons -> nil:cons c1 :: c3:c4:c5 -> c:c1:c2 REV1 :: 0':s -> nil:cons -> c3:c4:c5 c2 :: c6:c7 -> c:c1:c2 REV2 :: 0':s -> nil:cons -> c6:c7 0' :: 0':s c3 :: c3:c4:c5 s :: a -> 0':s c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 c6 :: c6:c7 c7 :: c:c1:c2 -> c6:c7 -> c6:c7 rev2 :: 0':s -> nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: 0':s -> nil:cons -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_nil:cons2_8 :: nil:cons hole_0':s3_8 :: 0':s hole_c3:c4:c54_8 :: c3:c4:c5 hole_c6:c75_8 :: c6:c7 hole_a6_8 :: a gen_nil:cons7_8 :: Nat -> nil:cons gen_c3:c4:c58_8 :: Nat -> c3:c4:c5 gen_c6:c79_8 :: Nat -> c6:c7 Generator Equations: gen_nil:cons7_8(0) <=> nil gen_nil:cons7_8(+(x, 1)) <=> cons(0', gen_nil:cons7_8(x)) gen_c3:c4:c58_8(0) <=> c3 gen_c3:c4:c58_8(+(x, 1)) <=> c5(gen_c3:c4:c58_8(x)) gen_c6:c79_8(0) <=> c6 gen_c6:c79_8(+(x, 1)) <=> c7(c, gen_c6:c79_8(x)) The following defined symbols remain to be analysed: REV1, REV, REV2, rev2, rev, rev1 They will be analysed ascendingly in the following order: REV1 < REV REV = REV2 rev2 < REV2 rev2 = rev rev1 < rev ---------------------------------------- (11) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: REV1(0', gen_nil:cons7_8(n11_8)) -> gen_c3:c4:c58_8(n11_8), rt in Omega(1 + n11_8) Induction Base: REV1(0', gen_nil:cons7_8(0)) ->_R^Omega(1) c3 Induction Step: REV1(0', gen_nil:cons7_8(+(n11_8, 1))) ->_R^Omega(1) c5(REV1(0', gen_nil:cons7_8(n11_8))) ->_IH c5(gen_c3:c4:c58_8(c12_8)) 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: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0', nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0', nil) -> 0' rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Types: REV :: nil:cons -> c:c1:c2 nil :: nil:cons c :: c:c1:c2 cons :: 0':s -> nil:cons -> nil:cons c1 :: c3:c4:c5 -> c:c1:c2 REV1 :: 0':s -> nil:cons -> c3:c4:c5 c2 :: c6:c7 -> c:c1:c2 REV2 :: 0':s -> nil:cons -> c6:c7 0' :: 0':s c3 :: c3:c4:c5 s :: a -> 0':s c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 c6 :: c6:c7 c7 :: c:c1:c2 -> c6:c7 -> c6:c7 rev2 :: 0':s -> nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: 0':s -> nil:cons -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_nil:cons2_8 :: nil:cons hole_0':s3_8 :: 0':s hole_c3:c4:c54_8 :: c3:c4:c5 hole_c6:c75_8 :: c6:c7 hole_a6_8 :: a gen_nil:cons7_8 :: Nat -> nil:cons gen_c3:c4:c58_8 :: Nat -> c3:c4:c5 gen_c6:c79_8 :: Nat -> c6:c7 Generator Equations: gen_nil:cons7_8(0) <=> nil gen_nil:cons7_8(+(x, 1)) <=> cons(0', gen_nil:cons7_8(x)) gen_c3:c4:c58_8(0) <=> c3 gen_c3:c4:c58_8(+(x, 1)) <=> c5(gen_c3:c4:c58_8(x)) gen_c6:c79_8(0) <=> c6 gen_c6:c79_8(+(x, 1)) <=> c7(c, gen_c6:c79_8(x)) The following defined symbols remain to be analysed: REV1, REV, REV2, rev2, rev, rev1 They will be analysed ascendingly in the following order: REV1 < REV REV = REV2 rev2 < REV2 rev2 = rev rev1 < rev ---------------------------------------- (14) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (15) BOUNDS(n^1, INF) ---------------------------------------- (16) Obligation: Innermost TRS: Rules: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0', nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0', nil) -> 0' rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Types: REV :: nil:cons -> c:c1:c2 nil :: nil:cons c :: c:c1:c2 cons :: 0':s -> nil:cons -> nil:cons c1 :: c3:c4:c5 -> c:c1:c2 REV1 :: 0':s -> nil:cons -> c3:c4:c5 c2 :: c6:c7 -> c:c1:c2 REV2 :: 0':s -> nil:cons -> c6:c7 0' :: 0':s c3 :: c3:c4:c5 s :: a -> 0':s c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 c6 :: c6:c7 c7 :: c:c1:c2 -> c6:c7 -> c6:c7 rev2 :: 0':s -> nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: 0':s -> nil:cons -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_nil:cons2_8 :: nil:cons hole_0':s3_8 :: 0':s hole_c3:c4:c54_8 :: c3:c4:c5 hole_c6:c75_8 :: c6:c7 hole_a6_8 :: a gen_nil:cons7_8 :: Nat -> nil:cons gen_c3:c4:c58_8 :: Nat -> c3:c4:c5 gen_c6:c79_8 :: Nat -> c6:c7 Lemmas: REV1(0', gen_nil:cons7_8(n11_8)) -> gen_c3:c4:c58_8(n11_8), rt in Omega(1 + n11_8) Generator Equations: gen_nil:cons7_8(0) <=> nil gen_nil:cons7_8(+(x, 1)) <=> cons(0', gen_nil:cons7_8(x)) gen_c3:c4:c58_8(0) <=> c3 gen_c3:c4:c58_8(+(x, 1)) <=> c5(gen_c3:c4:c58_8(x)) gen_c6:c79_8(0) <=> c6 gen_c6:c79_8(+(x, 1)) <=> c7(c, gen_c6:c79_8(x)) The following defined symbols remain to be analysed: rev1, REV, REV2, rev2, rev They will be analysed ascendingly in the following order: REV = REV2 rev2 < REV2 rev2 = rev rev1 < rev ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: rev1(0', gen_nil:cons7_8(n417_8)) -> 0', rt in Omega(0) Induction Base: rev1(0', gen_nil:cons7_8(0)) ->_R^Omega(0) 0' Induction Step: rev1(0', gen_nil:cons7_8(+(n417_8, 1))) ->_R^Omega(0) rev1(0', gen_nil:cons7_8(n417_8)) ->_IH 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: REV(nil) -> c REV(cons(z0, z1)) -> c1(REV1(z0, z1)) REV(cons(z0, z1)) -> c2(REV2(z0, z1)) REV1(0', nil) -> c3 REV1(s(z0), nil) -> c4 REV1(z0, cons(z1, z2)) -> c5(REV1(z1, z2)) REV2(z0, nil) -> c6 REV2(z0, cons(z1, z2)) -> c7(REV(cons(z0, rev2(z1, z2))), REV2(z1, z2)) rev(nil) -> nil rev(cons(z0, z1)) -> cons(rev1(z0, z1), rev2(z0, z1)) rev1(0', nil) -> 0' rev1(s(z0), nil) -> s(z0) rev1(z0, cons(z1, z2)) -> rev1(z1, z2) rev2(z0, nil) -> nil rev2(z0, cons(z1, z2)) -> rev(cons(z0, rev2(z1, z2))) Types: REV :: nil:cons -> c:c1:c2 nil :: nil:cons c :: c:c1:c2 cons :: 0':s -> nil:cons -> nil:cons c1 :: c3:c4:c5 -> c:c1:c2 REV1 :: 0':s -> nil:cons -> c3:c4:c5 c2 :: c6:c7 -> c:c1:c2 REV2 :: 0':s -> nil:cons -> c6:c7 0' :: 0':s c3 :: c3:c4:c5 s :: a -> 0':s c4 :: c3:c4:c5 c5 :: c3:c4:c5 -> c3:c4:c5 c6 :: c6:c7 c7 :: c:c1:c2 -> c6:c7 -> c6:c7 rev2 :: 0':s -> nil:cons -> nil:cons rev :: nil:cons -> nil:cons rev1 :: 0':s -> nil:cons -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_nil:cons2_8 :: nil:cons hole_0':s3_8 :: 0':s hole_c3:c4:c54_8 :: c3:c4:c5 hole_c6:c75_8 :: c6:c7 hole_a6_8 :: a gen_nil:cons7_8 :: Nat -> nil:cons gen_c3:c4:c58_8 :: Nat -> c3:c4:c5 gen_c6:c79_8 :: Nat -> c6:c7 Lemmas: REV1(0', gen_nil:cons7_8(n11_8)) -> gen_c3:c4:c58_8(n11_8), rt in Omega(1 + n11_8) rev1(0', gen_nil:cons7_8(n417_8)) -> 0', rt in Omega(0) Generator Equations: gen_nil:cons7_8(0) <=> nil gen_nil:cons7_8(+(x, 1)) <=> cons(0', gen_nil:cons7_8(x)) gen_c3:c4:c58_8(0) <=> c3 gen_c3:c4:c58_8(+(x, 1)) <=> c5(gen_c3:c4:c58_8(x)) gen_c6:c79_8(0) <=> c6 gen_c6:c79_8(+(x, 1)) <=> c7(c, gen_c6:c79_8(x)) The following defined symbols remain to be analysed: rev, REV, REV2, rev2 They will be analysed ascendingly in the following order: REV = REV2 rev2 < REV2 rev2 = rev ---------------------------------------- (19) RewriteLemmaProof (FINISHED) Proved the following rewrite lemma: rev2(0', gen_nil:cons7_8(n7712_8)) -> gen_nil:cons7_8(n7712_8), rt in Omega(EXP) Induction Base: rev2(0', gen_nil:cons7_8(0)) ->_R^Omega(0) nil Induction Step: rev2(0', gen_nil:cons7_8(+(n7712_8, 1))) ->_R^Omega(0) rev(cons(0', rev2(0', gen_nil:cons7_8(n7712_8)))) ->_IH rev(cons(0', gen_nil:cons7_8(c7713_8))) ->_R^Omega(0) cons(rev1(0', gen_nil:cons7_8(n7712_8)), rev2(0', gen_nil:cons7_8(n7712_8))) ->_L^Omega(0) cons(0', rev2(0', gen_nil:cons7_8(n7712_8))) ->_IH cons(0', gen_nil:cons7_8(c7713_8)) We have rt in EXP and sz in O(n). Thus, we have irc_R in EXP ---------------------------------------- (20) BOUNDS(EXP, INF)