WORST_CASE(Omega(n^1),O(n^1)) proof of input_A4UKT7w2Vg.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, 0 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), 7 ms] (12) typed CpxTrs (13) OrderProof [LOWER BOUND(ID), 0 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 285 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^1, INF) (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 0 ms] (22) BOUNDS(1, INF) ---------------------------------------- (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: list(Cons(x, xs)) -> list(xs) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(x) -> list(x) 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: list(Cons(x, xs)) -> list(xs) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(x) -> list(x) 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 1. The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by: final states : [1, 2, 3] transitions: Cons0(0, 0) -> 0 Nil0() -> 0 True0() -> 0 isEmpty[Match]0(0) -> 0 False0() -> 0 list0(0) -> 1 notEmpty0(0) -> 2 goal0(0) -> 3 list1(0) -> 1 True1() -> 1 Nil1() -> 4 isEmpty[Match]1(4) -> 1 True1() -> 2 False1() -> 2 list1(0) -> 3 True1() -> 3 isEmpty[Match]1(4) -> 3 ---------------------------------------- (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: list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) Tuples: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) S tuples: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) K tuples:none Defined Rule Symbols: list_1, notEmpty_1, goal_1 Defined Pair Symbols: LIST_1, NOTEMPTY_1, GOAL_1 Compound Symbols: c_1, c1, c2, c3, c4, c5_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: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) The (relative) TRS S consists of the following rules: list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) 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: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) The (relative) TRS S consists of the following rules: list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) Types: LIST :: Cons:Nil -> c:c1:c2 Cons :: a -> Cons:Nil -> Cons:Nil c :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c1 :: c:c1:c2 c2 :: c:c1:c2 NOTEMPTY :: Cons:Nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 GOAL :: Cons:Nil -> c5 c5 :: c:c1:c2 -> c5 list :: Cons:Nil -> True:isEmpty[Match]:False True :: True:isEmpty[Match]:False isEmpty[Match] :: Cons:Nil -> True:isEmpty[Match]:False notEmpty :: Cons:Nil -> True:isEmpty[Match]:False False :: True:isEmpty[Match]:False goal :: Cons:Nil -> True:isEmpty[Match]:False hole_c:c1:c21_6 :: c:c1:c2 hole_Cons:Nil2_6 :: Cons:Nil hole_a3_6 :: a hole_c3:c44_6 :: c3:c4 hole_c55_6 :: c5 hole_True:isEmpty[Match]:False6_6 :: True:isEmpty[Match]:False gen_c:c1:c27_6 :: Nat -> c:c1:c2 gen_Cons:Nil8_6 :: Nat -> Cons:Nil ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: LIST, list ---------------------------------------- (14) Obligation: Innermost TRS: Rules: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) Types: LIST :: Cons:Nil -> c:c1:c2 Cons :: a -> Cons:Nil -> Cons:Nil c :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c1 :: c:c1:c2 c2 :: c:c1:c2 NOTEMPTY :: Cons:Nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 GOAL :: Cons:Nil -> c5 c5 :: c:c1:c2 -> c5 list :: Cons:Nil -> True:isEmpty[Match]:False True :: True:isEmpty[Match]:False isEmpty[Match] :: Cons:Nil -> True:isEmpty[Match]:False notEmpty :: Cons:Nil -> True:isEmpty[Match]:False False :: True:isEmpty[Match]:False goal :: Cons:Nil -> True:isEmpty[Match]:False hole_c:c1:c21_6 :: c:c1:c2 hole_Cons:Nil2_6 :: Cons:Nil hole_a3_6 :: a hole_c3:c44_6 :: c3:c4 hole_c55_6 :: c5 hole_True:isEmpty[Match]:False6_6 :: True:isEmpty[Match]:False gen_c:c1:c27_6 :: Nat -> c:c1:c2 gen_Cons:Nil8_6 :: Nat -> Cons:Nil Generator Equations: gen_c:c1:c27_6(0) <=> c1 gen_c:c1:c27_6(+(x, 1)) <=> c(gen_c:c1:c27_6(x)) gen_Cons:Nil8_6(0) <=> Nil gen_Cons:Nil8_6(+(x, 1)) <=> Cons(hole_a3_6, gen_Cons:Nil8_6(x)) The following defined symbols remain to be analysed: LIST, list ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LIST(gen_Cons:Nil8_6(n10_6)) -> gen_c:c1:c27_6(n10_6), rt in Omega(1 + n10_6) Induction Base: LIST(gen_Cons:Nil8_6(0)) ->_R^Omega(1) c1 Induction Step: LIST(gen_Cons:Nil8_6(+(n10_6, 1))) ->_R^Omega(1) c(LIST(gen_Cons:Nil8_6(n10_6))) ->_IH c(gen_c:c1:c27_6(c11_6)) 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: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) Types: LIST :: Cons:Nil -> c:c1:c2 Cons :: a -> Cons:Nil -> Cons:Nil c :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c1 :: c:c1:c2 c2 :: c:c1:c2 NOTEMPTY :: Cons:Nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 GOAL :: Cons:Nil -> c5 c5 :: c:c1:c2 -> c5 list :: Cons:Nil -> True:isEmpty[Match]:False True :: True:isEmpty[Match]:False isEmpty[Match] :: Cons:Nil -> True:isEmpty[Match]:False notEmpty :: Cons:Nil -> True:isEmpty[Match]:False False :: True:isEmpty[Match]:False goal :: Cons:Nil -> True:isEmpty[Match]:False hole_c:c1:c21_6 :: c:c1:c2 hole_Cons:Nil2_6 :: Cons:Nil hole_a3_6 :: a hole_c3:c44_6 :: c3:c4 hole_c55_6 :: c5 hole_True:isEmpty[Match]:False6_6 :: True:isEmpty[Match]:False gen_c:c1:c27_6 :: Nat -> c:c1:c2 gen_Cons:Nil8_6 :: Nat -> Cons:Nil Generator Equations: gen_c:c1:c27_6(0) <=> c1 gen_c:c1:c27_6(+(x, 1)) <=> c(gen_c:c1:c27_6(x)) gen_Cons:Nil8_6(0) <=> Nil gen_Cons:Nil8_6(+(x, 1)) <=> Cons(hole_a3_6, gen_Cons:Nil8_6(x)) The following defined symbols remain to be analysed: LIST, list ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Innermost TRS: Rules: LIST(Cons(z0, z1)) -> c(LIST(z1)) LIST(Nil) -> c1 LIST(Nil) -> c2 NOTEMPTY(Cons(z0, z1)) -> c3 NOTEMPTY(Nil) -> c4 GOAL(z0) -> c5(LIST(z0)) list(Cons(z0, z1)) -> list(z1) list(Nil) -> True list(Nil) -> isEmpty[Match](Nil) notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> list(z0) Types: LIST :: Cons:Nil -> c:c1:c2 Cons :: a -> Cons:Nil -> Cons:Nil c :: c:c1:c2 -> c:c1:c2 Nil :: Cons:Nil c1 :: c:c1:c2 c2 :: c:c1:c2 NOTEMPTY :: Cons:Nil -> c3:c4 c3 :: c3:c4 c4 :: c3:c4 GOAL :: Cons:Nil -> c5 c5 :: c:c1:c2 -> c5 list :: Cons:Nil -> True:isEmpty[Match]:False True :: True:isEmpty[Match]:False isEmpty[Match] :: Cons:Nil -> True:isEmpty[Match]:False notEmpty :: Cons:Nil -> True:isEmpty[Match]:False False :: True:isEmpty[Match]:False goal :: Cons:Nil -> True:isEmpty[Match]:False hole_c:c1:c21_6 :: c:c1:c2 hole_Cons:Nil2_6 :: Cons:Nil hole_a3_6 :: a hole_c3:c44_6 :: c3:c4 hole_c55_6 :: c5 hole_True:isEmpty[Match]:False6_6 :: True:isEmpty[Match]:False gen_c:c1:c27_6 :: Nat -> c:c1:c2 gen_Cons:Nil8_6 :: Nat -> Cons:Nil Lemmas: LIST(gen_Cons:Nil8_6(n10_6)) -> gen_c:c1:c27_6(n10_6), rt in Omega(1 + n10_6) Generator Equations: gen_c:c1:c27_6(0) <=> c1 gen_c:c1:c27_6(+(x, 1)) <=> c(gen_c:c1:c27_6(x)) gen_Cons:Nil8_6(0) <=> Nil gen_Cons:Nil8_6(+(x, 1)) <=> Cons(hole_a3_6, gen_Cons:Nil8_6(x)) The following defined symbols remain to be analysed: list ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: list(gen_Cons:Nil8_6(n218_6)) -> True, rt in Omega(0) Induction Base: list(gen_Cons:Nil8_6(0)) ->_R^Omega(0) True Induction Step: list(gen_Cons:Nil8_6(+(n218_6, 1))) ->_R^Omega(0) list(gen_Cons:Nil8_6(n218_6)) ->_IH True We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) BOUNDS(1, INF)