WORST_CASE(Omega(n^1),O(n^1)) proof of input_lm1AwmiIUn.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) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTRS (9) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (10) CpxTRS (11) CpxTrsMatchBoundsTAProof [FINISHED, 0 ms] (12) BOUNDS(1, n^1) (13) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRelTRS (19) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (20) typed CpxTrs (21) OrderProof [LOWER BOUND(ID), 0 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 93.2 s] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 1029 ms] (30) 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: bin(x, 0) -> s(0) bin(0, s(y)) -> 0 bin(s(x), s(y)) -> +(bin(x, s(y)), bin(x, y)) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: bin(z0, 0) -> s(0) bin(0, s(z0)) -> 0 bin(s(z0), s(z1)) -> +(bin(z0, s(z1)), bin(z0, z1)) Tuples: BIN(z0, 0) -> c BIN(0, s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) S tuples: BIN(z0, 0) -> c BIN(0, s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) K tuples:none Defined Rule Symbols: bin_2 Defined Pair Symbols: BIN_2 Compound Symbols: c, c1, c2_1, c3_1 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: BIN(z0, 0) -> c BIN(0, s(z0)) -> c1 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: bin(z0, 0) -> s(0) bin(0, s(z0)) -> 0 bin(s(z0), s(z1)) -> +(bin(z0, s(z1)), bin(z0, z1)) Tuples: BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) S tuples: BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) K tuples:none Defined Rule Symbols: bin_2 Defined Pair Symbols: BIN_2 Compound Symbols: c2_1, c3_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: bin(z0, 0) -> s(0) bin(0, s(z0)) -> 0 bin(s(z0), s(z1)) -> +(bin(z0, s(z1)), bin(z0, z1)) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) S tuples: BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: BIN_2 Compound Symbols: c2_1, c3_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 CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (9) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (11) 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] transitions: s0(0) -> 0 c20(0) -> 0 c30(0) -> 0 BIN0(0, 0) -> 1 s1(0) -> 3 BIN1(0, 3) -> 2 c21(2) -> 1 BIN1(0, 0) -> 4 c31(4) -> 1 c21(2) -> 4 c21(2) -> 2 c31(4) -> 4 c31(4) -> 2 ---------------------------------------- (12) BOUNDS(1, n^1) ---------------------------------------- (13) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: bin(z0, 0) -> s(0) bin(0, s(z0)) -> 0 bin(s(z0), s(z1)) -> +(bin(z0, s(z1)), bin(z0, z1)) Tuples: BIN(z0, 0) -> c BIN(0, s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) S tuples: BIN(z0, 0) -> c BIN(0, s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) K tuples:none Defined Rule Symbols: bin_2 Defined Pair Symbols: BIN_2 Compound Symbols: c, c1, c2_1, c3_1 ---------------------------------------- (15) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (16) 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: BIN(z0, 0) -> c BIN(0, s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) The (relative) TRS S consists of the following rules: bin(z0, 0) -> s(0) bin(0, s(z0)) -> 0 bin(s(z0), s(z1)) -> +(bin(z0, s(z1)), bin(z0, z1)) Rewrite Strategy: INNERMOST ---------------------------------------- (17) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (18) 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: BIN(z0, 0') -> c BIN(0', s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) The (relative) TRS S consists of the following rules: bin(z0, 0') -> s(0') bin(0', s(z0)) -> 0' bin(s(z0), s(z1)) -> +'(bin(z0, s(z1)), bin(z0, z1)) Rewrite Strategy: INNERMOST ---------------------------------------- (19) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (20) Obligation: Innermost TRS: Rules: BIN(z0, 0') -> c BIN(0', s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) bin(z0, 0') -> s(0') bin(0', s(z0)) -> 0' bin(s(z0), s(z1)) -> +'(bin(z0, s(z1)), bin(z0, z1)) Types: BIN :: 0':s:+' -> 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 bin :: 0':s:+' -> 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' hole_c:c1:c2:c31_4 :: c:c1:c2:c3 hole_0':s:+'2_4 :: 0':s:+' gen_c:c1:c2:c33_4 :: Nat -> c:c1:c2:c3 gen_0':s:+'4_4 :: Nat -> 0':s:+' ---------------------------------------- (21) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: BIN, bin ---------------------------------------- (22) Obligation: Innermost TRS: Rules: BIN(z0, 0') -> c BIN(0', s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) bin(z0, 0') -> s(0') bin(0', s(z0)) -> 0' bin(s(z0), s(z1)) -> +'(bin(z0, s(z1)), bin(z0, z1)) Types: BIN :: 0':s:+' -> 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 bin :: 0':s:+' -> 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' hole_c:c1:c2:c31_4 :: c:c1:c2:c3 hole_0':s:+'2_4 :: 0':s:+' gen_c:c1:c2:c33_4 :: Nat -> c:c1:c2:c3 gen_0':s:+'4_4 :: Nat -> 0':s:+' Generator Equations: gen_c:c1:c2:c33_4(0) <=> c gen_c:c1:c2:c33_4(+(x, 1)) <=> c2(gen_c:c1:c2:c33_4(x)) gen_0':s:+'4_4(0) <=> 0' gen_0':s:+'4_4(+(x, 1)) <=> s(gen_0':s:+'4_4(x)) The following defined symbols remain to be analysed: BIN, bin ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: BIN(gen_0':s:+'4_4(+(1, n6_4)), gen_0':s:+'4_4(1)) -> *5_4, rt in Omega(n6_4) Induction Base: BIN(gen_0':s:+'4_4(+(1, 0)), gen_0':s:+'4_4(1)) Induction Step: BIN(gen_0':s:+'4_4(+(1, +(n6_4, 1))), gen_0':s:+'4_4(1)) ->_R^Omega(1) c2(BIN(gen_0':s:+'4_4(+(1, n6_4)), s(gen_0':s:+'4_4(0)))) ->_IH c2(*5_4) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Complex Obligation (BEST) ---------------------------------------- (25) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: BIN(z0, 0') -> c BIN(0', s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) bin(z0, 0') -> s(0') bin(0', s(z0)) -> 0' bin(s(z0), s(z1)) -> +'(bin(z0, s(z1)), bin(z0, z1)) Types: BIN :: 0':s:+' -> 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 bin :: 0':s:+' -> 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' hole_c:c1:c2:c31_4 :: c:c1:c2:c3 hole_0':s:+'2_4 :: 0':s:+' gen_c:c1:c2:c33_4 :: Nat -> c:c1:c2:c3 gen_0':s:+'4_4 :: Nat -> 0':s:+' Generator Equations: gen_c:c1:c2:c33_4(0) <=> c gen_c:c1:c2:c33_4(+(x, 1)) <=> c2(gen_c:c1:c2:c33_4(x)) gen_0':s:+'4_4(0) <=> 0' gen_0':s:+'4_4(+(x, 1)) <=> s(gen_0':s:+'4_4(x)) The following defined symbols remain to be analysed: BIN, bin ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: BIN(z0, 0') -> c BIN(0', s(z0)) -> c1 BIN(s(z0), s(z1)) -> c2(BIN(z0, s(z1))) BIN(s(z0), s(z1)) -> c3(BIN(z0, z1)) bin(z0, 0') -> s(0') bin(0', s(z0)) -> 0' bin(s(z0), s(z1)) -> +'(bin(z0, s(z1)), bin(z0, z1)) Types: BIN :: 0':s:+' -> 0':s:+' -> c:c1:c2:c3 0' :: 0':s:+' c :: c:c1:c2:c3 s :: 0':s:+' -> 0':s:+' c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 -> c:c1:c2:c3 c3 :: c:c1:c2:c3 -> c:c1:c2:c3 bin :: 0':s:+' -> 0':s:+' -> 0':s:+' +' :: 0':s:+' -> 0':s:+' -> 0':s:+' hole_c:c1:c2:c31_4 :: c:c1:c2:c3 hole_0':s:+'2_4 :: 0':s:+' gen_c:c1:c2:c33_4 :: Nat -> c:c1:c2:c3 gen_0':s:+'4_4 :: Nat -> 0':s:+' Lemmas: BIN(gen_0':s:+'4_4(+(1, n6_4)), gen_0':s:+'4_4(1)) -> *5_4, rt in Omega(n6_4) Generator Equations: gen_c:c1:c2:c33_4(0) <=> c gen_c:c1:c2:c33_4(+(x, 1)) <=> c2(gen_c:c1:c2:c33_4(x)) gen_0':s:+'4_4(0) <=> 0' gen_0':s:+'4_4(+(x, 1)) <=> s(gen_0':s:+'4_4(x)) The following defined symbols remain to be analysed: bin ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: bin(gen_0':s:+'4_4(+(1, n74444_4)), gen_0':s:+'4_4(1)) -> *5_4, rt in Omega(0) Induction Base: bin(gen_0':s:+'4_4(+(1, 0)), gen_0':s:+'4_4(1)) Induction Step: bin(gen_0':s:+'4_4(+(1, +(n74444_4, 1))), gen_0':s:+'4_4(1)) ->_R^Omega(0) +'(bin(gen_0':s:+'4_4(+(1, n74444_4)), s(gen_0':s:+'4_4(0))), bin(gen_0':s:+'4_4(+(1, n74444_4)), gen_0':s:+'4_4(0))) ->_IH +'(*5_4, bin(gen_0':s:+'4_4(+(1, n74444_4)), gen_0':s:+'4_4(0))) ->_R^Omega(0) +'(*5_4, s(0')) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (30) BOUNDS(1, INF)