WORST_CASE(Omega(n^1),O(n^1)) proof of input_xLBS4Gu2tE.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, 19 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), 12 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 263 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), 126 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: and(tt, X) -> activate(X) plus(N, 0) -> N plus(N, s(M)) -> s(plus(N, M)) activate(X) -> 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: and(tt, X) -> activate(X) plus(N, 0) -> N plus(N, s(M)) -> s(plus(N, M)) activate(X) -> 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: tt0() -> 0 00() -> 0 s0(0) -> 0 and0(0, 0) -> 1 plus0(0, 0) -> 2 activate0(0) -> 3 activate1(0) -> 1 plus1(0, 0) -> 4 s1(4) -> 2 s1(4) -> 4 0 -> 2 0 -> 3 0 -> 4 0 -> 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: and(tt, z0) -> activate(z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> z0 Tuples: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 S tuples: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 K tuples:none Defined Rule Symbols: and_2, plus_2, activate_1 Defined Pair Symbols: AND_2, PLUS_2, ACTIVATE_1 Compound Symbols: c_1, c1, c2_1, c3 ---------------------------------------- (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: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 The (relative) TRS S consists of the following rules: and(tt, z0) -> activate(z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> 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: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 The (relative) TRS S consists of the following rules: and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c3 -> c ACTIVATE :: a -> c3 PLUS :: b -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 c3 :: c3 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_4 :: c hole_tt2_4 :: tt hole_a3_4 :: a hole_c34_4 :: c3 hole_c1:c25_4 :: c1:c2 hole_b6_4 :: b hole_0':s7_4 :: 0':s hole_and:activate8_4 :: and:activate gen_c1:c29_4 :: Nat -> c1:c2 gen_0':s10_4 :: Nat -> 0':s ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: PLUS, plus ---------------------------------------- (14) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c3 -> c ACTIVATE :: a -> c3 PLUS :: b -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 c3 :: c3 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_4 :: c hole_tt2_4 :: tt hole_a3_4 :: a hole_c34_4 :: c3 hole_c1:c25_4 :: c1:c2 hole_b6_4 :: b hole_0':s7_4 :: 0':s hole_and:activate8_4 :: and:activate gen_c1:c29_4 :: Nat -> c1:c2 gen_0':s10_4 :: Nat -> 0':s Generator Equations: gen_c1:c29_4(0) <=> c1 gen_c1:c29_4(+(x, 1)) <=> c2(gen_c1:c29_4(x)) gen_0':s10_4(0) <=> 0' gen_0':s10_4(+(x, 1)) <=> s(gen_0':s10_4(x)) The following defined symbols remain to be analysed: PLUS, plus ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: PLUS(hole_b6_4, gen_0':s10_4(n12_4)) -> gen_c1:c29_4(n12_4), rt in Omega(1 + n12_4) Induction Base: PLUS(hole_b6_4, gen_0':s10_4(0)) ->_R^Omega(1) c1 Induction Step: PLUS(hole_b6_4, gen_0':s10_4(+(n12_4, 1))) ->_R^Omega(1) c2(PLUS(hole_b6_4, gen_0':s10_4(n12_4))) ->_IH c2(gen_c1:c29_4(c13_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: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c3 -> c ACTIVATE :: a -> c3 PLUS :: b -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 c3 :: c3 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_4 :: c hole_tt2_4 :: tt hole_a3_4 :: a hole_c34_4 :: c3 hole_c1:c25_4 :: c1:c2 hole_b6_4 :: b hole_0':s7_4 :: 0':s hole_and:activate8_4 :: and:activate gen_c1:c29_4 :: Nat -> c1:c2 gen_0':s10_4 :: Nat -> 0':s Generator Equations: gen_c1:c29_4(0) <=> c1 gen_c1:c29_4(+(x, 1)) <=> c2(gen_c1:c29_4(x)) gen_0':s10_4(0) <=> 0' gen_0':s10_4(+(x, 1)) <=> s(gen_0':s10_4(x)) The following defined symbols remain to be analysed: PLUS, plus ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) ACTIVATE(z0) -> c3 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c3 -> c ACTIVATE :: a -> c3 PLUS :: b -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 c3 :: c3 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_4 :: c hole_tt2_4 :: tt hole_a3_4 :: a hole_c34_4 :: c3 hole_c1:c25_4 :: c1:c2 hole_b6_4 :: b hole_0':s7_4 :: 0':s hole_and:activate8_4 :: and:activate gen_c1:c29_4 :: Nat -> c1:c2 gen_0':s10_4 :: Nat -> 0':s Lemmas: PLUS(hole_b6_4, gen_0':s10_4(n12_4)) -> gen_c1:c29_4(n12_4), rt in Omega(1 + n12_4) Generator Equations: gen_c1:c29_4(0) <=> c1 gen_c1:c29_4(+(x, 1)) <=> c2(gen_c1:c29_4(x)) gen_0':s10_4(0) <=> 0' gen_0':s10_4(+(x, 1)) <=> s(gen_0':s10_4(x)) The following defined symbols remain to be analysed: plus ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s10_4(a), gen_0':s10_4(n233_4)) -> gen_0':s10_4(+(n233_4, a)), rt in Omega(0) Induction Base: plus(gen_0':s10_4(a), gen_0':s10_4(0)) ->_R^Omega(0) gen_0':s10_4(a) Induction Step: plus(gen_0':s10_4(a), gen_0':s10_4(+(n233_4, 1))) ->_R^Omega(0) s(plus(gen_0':s10_4(a), gen_0':s10_4(n233_4))) ->_IH s(gen_0':s10_4(+(a, c234_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)