WORST_CASE(Omega(n^1),O(n^1)) proof of input_UGE6Eby3hr.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, 27 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), 0 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 295 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), 107 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: rev(ls) -> r1(ls, empty) r1(empty, a) -> a r1(cons(x, k), a) -> r1(k, cons(x, a)) 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: rev(ls) -> r1(ls, empty) r1(empty, a) -> a r1(cons(x, k), a) -> r1(k, cons(x, a)) 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: empty0() -> 0 cons0(0, 0) -> 0 rev0(0) -> 1 r10(0, 0) -> 2 empty1() -> 3 r11(0, 3) -> 1 cons1(0, 0) -> 4 r11(0, 4) -> 2 cons1(0, 3) -> 4 r11(0, 4) -> 1 cons1(0, 4) -> 4 0 -> 2 3 -> 1 4 -> 2 4 -> 1 ---------------------------------------- (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: rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) Tuples: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) S tuples: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) K tuples:none Defined Rule Symbols: rev_1, r1_2 Defined Pair Symbols: REV_1, R1_2 Compound Symbols: c_1, c1, 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: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) The (relative) TRS S consists of the following rules: rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) 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: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) The (relative) TRS S consists of the following rules: rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) Types: REV :: empty:cons -> c c :: c1:c2 -> c R1 :: empty:cons -> empty:cons -> c1:c2 empty :: empty:cons c1 :: c1:c2 cons :: a -> empty:cons -> empty:cons c2 :: c1:c2 -> c1:c2 rev :: empty:cons -> empty:cons r1 :: empty:cons -> empty:cons -> empty:cons hole_c1_3 :: c hole_empty:cons2_3 :: empty:cons hole_c1:c23_3 :: c1:c2 hole_a4_3 :: a gen_empty:cons5_3 :: Nat -> empty:cons gen_c1:c26_3 :: Nat -> c1:c2 ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: R1, r1 ---------------------------------------- (14) Obligation: Innermost TRS: Rules: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) Types: REV :: empty:cons -> c c :: c1:c2 -> c R1 :: empty:cons -> empty:cons -> c1:c2 empty :: empty:cons c1 :: c1:c2 cons :: a -> empty:cons -> empty:cons c2 :: c1:c2 -> c1:c2 rev :: empty:cons -> empty:cons r1 :: empty:cons -> empty:cons -> empty:cons hole_c1_3 :: c hole_empty:cons2_3 :: empty:cons hole_c1:c23_3 :: c1:c2 hole_a4_3 :: a gen_empty:cons5_3 :: Nat -> empty:cons gen_c1:c26_3 :: Nat -> c1:c2 Generator Equations: gen_empty:cons5_3(0) <=> empty gen_empty:cons5_3(+(x, 1)) <=> cons(hole_a4_3, gen_empty:cons5_3(x)) gen_c1:c26_3(0) <=> c1 gen_c1:c26_3(+(x, 1)) <=> c2(gen_c1:c26_3(x)) The following defined symbols remain to be analysed: R1, r1 ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: R1(gen_empty:cons5_3(n8_3), gen_empty:cons5_3(b)) -> gen_c1:c26_3(n8_3), rt in Omega(1 + n8_3) Induction Base: R1(gen_empty:cons5_3(0), gen_empty:cons5_3(b)) ->_R^Omega(1) c1 Induction Step: R1(gen_empty:cons5_3(+(n8_3, 1)), gen_empty:cons5_3(b)) ->_R^Omega(1) c2(R1(gen_empty:cons5_3(n8_3), cons(hole_a4_3, gen_empty:cons5_3(b)))) ->_IH c2(gen_c1:c26_3(c9_3)) 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: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) Types: REV :: empty:cons -> c c :: c1:c2 -> c R1 :: empty:cons -> empty:cons -> c1:c2 empty :: empty:cons c1 :: c1:c2 cons :: a -> empty:cons -> empty:cons c2 :: c1:c2 -> c1:c2 rev :: empty:cons -> empty:cons r1 :: empty:cons -> empty:cons -> empty:cons hole_c1_3 :: c hole_empty:cons2_3 :: empty:cons hole_c1:c23_3 :: c1:c2 hole_a4_3 :: a gen_empty:cons5_3 :: Nat -> empty:cons gen_c1:c26_3 :: Nat -> c1:c2 Generator Equations: gen_empty:cons5_3(0) <=> empty gen_empty:cons5_3(+(x, 1)) <=> cons(hole_a4_3, gen_empty:cons5_3(x)) gen_c1:c26_3(0) <=> c1 gen_c1:c26_3(+(x, 1)) <=> c2(gen_c1:c26_3(x)) The following defined symbols remain to be analysed: R1, r1 ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Innermost TRS: Rules: REV(z0) -> c(R1(z0, empty)) R1(empty, z0) -> c1 R1(cons(z0, z1), z2) -> c2(R1(z1, cons(z0, z2))) rev(z0) -> r1(z0, empty) r1(empty, z0) -> z0 r1(cons(z0, z1), z2) -> r1(z1, cons(z0, z2)) Types: REV :: empty:cons -> c c :: c1:c2 -> c R1 :: empty:cons -> empty:cons -> c1:c2 empty :: empty:cons c1 :: c1:c2 cons :: a -> empty:cons -> empty:cons c2 :: c1:c2 -> c1:c2 rev :: empty:cons -> empty:cons r1 :: empty:cons -> empty:cons -> empty:cons hole_c1_3 :: c hole_empty:cons2_3 :: empty:cons hole_c1:c23_3 :: c1:c2 hole_a4_3 :: a gen_empty:cons5_3 :: Nat -> empty:cons gen_c1:c26_3 :: Nat -> c1:c2 Lemmas: R1(gen_empty:cons5_3(n8_3), gen_empty:cons5_3(b)) -> gen_c1:c26_3(n8_3), rt in Omega(1 + n8_3) Generator Equations: gen_empty:cons5_3(0) <=> empty gen_empty:cons5_3(+(x, 1)) <=> cons(hole_a4_3, gen_empty:cons5_3(x)) gen_c1:c26_3(0) <=> c1 gen_c1:c26_3(+(x, 1)) <=> c2(gen_c1:c26_3(x)) The following defined symbols remain to be analysed: r1 ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: r1(gen_empty:cons5_3(n369_3), gen_empty:cons5_3(b)) -> gen_empty:cons5_3(+(n369_3, b)), rt in Omega(0) Induction Base: r1(gen_empty:cons5_3(0), gen_empty:cons5_3(b)) ->_R^Omega(0) gen_empty:cons5_3(b) Induction Step: r1(gen_empty:cons5_3(+(n369_3, 1)), gen_empty:cons5_3(b)) ->_R^Omega(0) r1(gen_empty:cons5_3(n369_3), cons(hole_a4_3, gen_empty:cons5_3(b))) ->_IH gen_empty:cons5_3(+(+(b, 1), c370_3)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) BOUNDS(1, INF)