WORST_CASE(Omega(n^1),O(n^1)) proof of input_AQn6a3MmBv.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, 31 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), 0 ms] (12) typed CpxTrs (13) OrderProof [LOWER BOUND(ID), 11 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 304 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), 97 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: foldl#3(x2, Nil) -> x2 foldl#3(x16, Cons(x24, x6)) -> foldl#3(Cons(x24, x16), x6) main(x1) -> foldl#3(Nil, x1) 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: foldl#3(x2, Nil) -> x2 foldl#3(x16, Cons(x24, x6)) -> foldl#3(Cons(x24, x16), x6) main(x1) -> foldl#3(Nil, x1) 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] transitions: Nil0() -> 0 Cons0(0, 0) -> 0 foldl#30(0, 0) -> 1 main0(0) -> 2 Cons1(0, 0) -> 3 foldl#31(3, 0) -> 1 Nil1() -> 4 foldl#31(4, 0) -> 2 Cons1(0, 3) -> 3 Cons1(0, 4) -> 3 foldl#31(3, 0) -> 2 0 -> 1 3 -> 1 3 -> 2 4 -> 2 ---------------------------------------- (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: foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, z0) Tuples: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) S tuples: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) K tuples:none Defined Rule Symbols: foldl#3_2, main_1 Defined Pair Symbols: FOLDL#3_2, MAIN_1 Compound Symbols: c, c1_1, c2_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: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) The (relative) TRS S consists of the following rules: foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, 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: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) The (relative) TRS S consists of the following rules: foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, z0) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, z0) Types: FOLDL#3 :: Nil:Cons -> Nil:Cons -> c:c1 Nil :: Nil:Cons c :: c:c1 Cons :: a -> Nil:Cons -> Nil:Cons c1 :: c:c1 -> c:c1 MAIN :: Nil:Cons -> c2 c2 :: c:c1 -> c2 foldl#3 :: Nil:Cons -> Nil:Cons -> Nil:Cons main :: Nil:Cons -> Nil:Cons hole_c:c11_4 :: c:c1 hole_Nil:Cons2_4 :: Nil:Cons hole_a3_4 :: a hole_c24_4 :: c2 gen_c:c15_4 :: Nat -> c:c1 gen_Nil:Cons6_4 :: Nat -> Nil:Cons ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: FOLDL#3, foldl#3 ---------------------------------------- (14) Obligation: Innermost TRS: Rules: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, z0) Types: FOLDL#3 :: Nil:Cons -> Nil:Cons -> c:c1 Nil :: Nil:Cons c :: c:c1 Cons :: a -> Nil:Cons -> Nil:Cons c1 :: c:c1 -> c:c1 MAIN :: Nil:Cons -> c2 c2 :: c:c1 -> c2 foldl#3 :: Nil:Cons -> Nil:Cons -> Nil:Cons main :: Nil:Cons -> Nil:Cons hole_c:c11_4 :: c:c1 hole_Nil:Cons2_4 :: Nil:Cons hole_a3_4 :: a hole_c24_4 :: c2 gen_c:c15_4 :: Nat -> c:c1 gen_Nil:Cons6_4 :: Nat -> Nil:Cons Generator Equations: gen_c:c15_4(0) <=> c gen_c:c15_4(+(x, 1)) <=> c1(gen_c:c15_4(x)) gen_Nil:Cons6_4(0) <=> Nil gen_Nil:Cons6_4(+(x, 1)) <=> Cons(hole_a3_4, gen_Nil:Cons6_4(x)) The following defined symbols remain to be analysed: FOLDL#3, foldl#3 ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: FOLDL#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(n8_4)) -> gen_c:c15_4(n8_4), rt in Omega(1 + n8_4) Induction Base: FOLDL#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(0)) ->_R^Omega(1) c Induction Step: FOLDL#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(+(n8_4, 1))) ->_R^Omega(1) c1(FOLDL#3(Cons(hole_a3_4, gen_Nil:Cons6_4(a)), gen_Nil:Cons6_4(n8_4))) ->_IH c1(gen_c:c15_4(c9_4)) 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: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, z0) Types: FOLDL#3 :: Nil:Cons -> Nil:Cons -> c:c1 Nil :: Nil:Cons c :: c:c1 Cons :: a -> Nil:Cons -> Nil:Cons c1 :: c:c1 -> c:c1 MAIN :: Nil:Cons -> c2 c2 :: c:c1 -> c2 foldl#3 :: Nil:Cons -> Nil:Cons -> Nil:Cons main :: Nil:Cons -> Nil:Cons hole_c:c11_4 :: c:c1 hole_Nil:Cons2_4 :: Nil:Cons hole_a3_4 :: a hole_c24_4 :: c2 gen_c:c15_4 :: Nat -> c:c1 gen_Nil:Cons6_4 :: Nat -> Nil:Cons Generator Equations: gen_c:c15_4(0) <=> c gen_c:c15_4(+(x, 1)) <=> c1(gen_c:c15_4(x)) gen_Nil:Cons6_4(0) <=> Nil gen_Nil:Cons6_4(+(x, 1)) <=> Cons(hole_a3_4, gen_Nil:Cons6_4(x)) The following defined symbols remain to be analysed: FOLDL#3, foldl#3 ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Innermost TRS: Rules: FOLDL#3(z0, Nil) -> c FOLDL#3(z0, Cons(z1, z2)) -> c1(FOLDL#3(Cons(z1, z0), z2)) MAIN(z0) -> c2(FOLDL#3(Nil, z0)) foldl#3(z0, Nil) -> z0 foldl#3(z0, Cons(z1, z2)) -> foldl#3(Cons(z1, z0), z2) main(z0) -> foldl#3(Nil, z0) Types: FOLDL#3 :: Nil:Cons -> Nil:Cons -> c:c1 Nil :: Nil:Cons c :: c:c1 Cons :: a -> Nil:Cons -> Nil:Cons c1 :: c:c1 -> c:c1 MAIN :: Nil:Cons -> c2 c2 :: c:c1 -> c2 foldl#3 :: Nil:Cons -> Nil:Cons -> Nil:Cons main :: Nil:Cons -> Nil:Cons hole_c:c11_4 :: c:c1 hole_Nil:Cons2_4 :: Nil:Cons hole_a3_4 :: a hole_c24_4 :: c2 gen_c:c15_4 :: Nat -> c:c1 gen_Nil:Cons6_4 :: Nat -> Nil:Cons Lemmas: FOLDL#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(n8_4)) -> gen_c:c15_4(n8_4), rt in Omega(1 + n8_4) Generator Equations: gen_c:c15_4(0) <=> c gen_c:c15_4(+(x, 1)) <=> c1(gen_c:c15_4(x)) gen_Nil:Cons6_4(0) <=> Nil gen_Nil:Cons6_4(+(x, 1)) <=> Cons(hole_a3_4, gen_Nil:Cons6_4(x)) The following defined symbols remain to be analysed: foldl#3 ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: foldl#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(n335_4)) -> gen_Nil:Cons6_4(+(n335_4, a)), rt in Omega(0) Induction Base: foldl#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(0)) ->_R^Omega(0) gen_Nil:Cons6_4(a) Induction Step: foldl#3(gen_Nil:Cons6_4(a), gen_Nil:Cons6_4(+(n335_4, 1))) ->_R^Omega(0) foldl#3(Cons(hole_a3_4, gen_Nil:Cons6_4(a)), gen_Nil:Cons6_4(n335_4)) ->_IH gen_Nil:Cons6_4(+(+(a, 1), c336_4)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) BOUNDS(1, INF)