WORST_CASE(Omega(n^1),O(n^1)) proof of input_6bYvhddjNF.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) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 40 ms] (8) CdtProblem (9) CdtKnowledgeProof [FINISHED, 0 ms] (10) BOUNDS(1, 1) (11) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRelTRS (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 8 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 649 ms] (22) BEST (23) proven lower bound (24) LowerBoundPropagationProof [FINISHED, 0 ms] (25) BOUNDS(n^1, INF) (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 165 ms] (28) 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: quot(0, s(y), s(z)) -> 0 quot(s(x), s(y), z) -> quot(x, y, z) quot(x, 0, s(z)) -> s(quot(x, s(z), s(z))) 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: quot(0, s(z0), s(z1)) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(quot(z0, s(z1), s(z1))) Tuples: QUOT(0, s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) S tuples: QUOT(0, s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) K tuples:none Defined Rule Symbols: quot_3 Defined Pair Symbols: QUOT_3 Compound Symbols: c, c1_1, c2_1 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: QUOT(0, s(z0), s(z1)) -> c ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: quot(0, s(z0), s(z1)) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(quot(z0, s(z1), s(z1))) Tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) S tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) K tuples:none Defined Rule Symbols: quot_3 Defined Pair Symbols: QUOT_3 Compound Symbols: c1_1, c2_1 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: quot(0, s(z0), s(z1)) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(quot(z0, s(z1), s(z1))) ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) S tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: QUOT_3 Compound Symbols: c1_1, c2_1 ---------------------------------------- (7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) We considered the (Usable) Rules:none And the Tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(QUOT(x_1, x_2, x_3)) = x_1 POL(c1(x_1)) = x_1 POL(c2(x_1)) = x_1 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) S tuples: QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) K tuples: QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) Defined Rule Symbols:none Defined Pair Symbols: QUOT_3 Compound Symbols: c1_1, c2_1 ---------------------------------------- (9) CdtKnowledgeProof (FINISHED) The following tuples could be moved from S to K by knowledge propagation: QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) Now S is empty ---------------------------------------- (10) BOUNDS(1, 1) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: quot(0, s(z0), s(z1)) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(quot(z0, s(z1), s(z1))) Tuples: QUOT(0, s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) S tuples: QUOT(0, s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) K tuples:none Defined Rule Symbols: quot_3 Defined Pair Symbols: QUOT_3 Compound Symbols: c, c1_1, c2_1 ---------------------------------------- (13) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (14) 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: QUOT(0, s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0, s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) The (relative) TRS S consists of the following rules: quot(0, s(z0), s(z1)) -> 0 quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0, s(z1)) -> s(quot(z0, s(z1), s(z1))) Rewrite Strategy: INNERMOST ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (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: QUOT(0', s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0', s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) The (relative) TRS S consists of the following rules: quot(0', s(z0), s(z1)) -> 0' quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0', s(z1)) -> s(quot(z0, s(z1), s(z1))) Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: QUOT(0', s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0', s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) quot(0', s(z0), s(z1)) -> 0' quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0', s(z1)) -> s(quot(z0, s(z1), s(z1))) Types: QUOT :: 0':s -> 0':s -> 0':s -> c:c1:c2 0' :: 0':s s :: 0':s -> 0':s c :: c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 quot :: 0':s -> 0':s -> 0':s -> 0':s hole_c:c1:c21_3 :: c:c1:c2 hole_0':s2_3 :: 0':s gen_c:c1:c23_3 :: Nat -> c:c1:c2 gen_0':s4_3 :: Nat -> 0':s ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: QUOT, quot ---------------------------------------- (20) Obligation: Innermost TRS: Rules: QUOT(0', s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0', s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) quot(0', s(z0), s(z1)) -> 0' quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0', s(z1)) -> s(quot(z0, s(z1), s(z1))) Types: QUOT :: 0':s -> 0':s -> 0':s -> c:c1:c2 0' :: 0':s s :: 0':s -> 0':s c :: c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 quot :: 0':s -> 0':s -> 0':s -> 0':s hole_c:c1:c21_3 :: c:c1:c2 hole_0':s2_3 :: 0':s gen_c:c1:c23_3 :: Nat -> c:c1:c2 gen_0':s4_3 :: Nat -> 0':s Generator Equations: gen_c:c1:c23_3(0) <=> c gen_c:c1:c23_3(+(x, 1)) <=> c1(gen_c:c1:c23_3(x)) gen_0':s4_3(0) <=> 0' gen_0':s4_3(+(x, 1)) <=> s(gen_0':s4_3(x)) The following defined symbols remain to be analysed: QUOT, quot ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: QUOT(gen_0':s4_3(n6_3), gen_0':s4_3(+(1, n6_3)), gen_0':s4_3(1)) -> gen_c:c1:c23_3(n6_3), rt in Omega(1 + n6_3) Induction Base: QUOT(gen_0':s4_3(0), gen_0':s4_3(+(1, 0)), gen_0':s4_3(1)) ->_R^Omega(1) c Induction Step: QUOT(gen_0':s4_3(+(n6_3, 1)), gen_0':s4_3(+(1, +(n6_3, 1))), gen_0':s4_3(1)) ->_R^Omega(1) c1(QUOT(gen_0':s4_3(n6_3), gen_0':s4_3(+(1, n6_3)), gen_0':s4_3(1))) ->_IH c1(gen_c:c1:c23_3(c7_3)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) Complex Obligation (BEST) ---------------------------------------- (23) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: QUOT(0', s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0', s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) quot(0', s(z0), s(z1)) -> 0' quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0', s(z1)) -> s(quot(z0, s(z1), s(z1))) Types: QUOT :: 0':s -> 0':s -> 0':s -> c:c1:c2 0' :: 0':s s :: 0':s -> 0':s c :: c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 quot :: 0':s -> 0':s -> 0':s -> 0':s hole_c:c1:c21_3 :: c:c1:c2 hole_0':s2_3 :: 0':s gen_c:c1:c23_3 :: Nat -> c:c1:c2 gen_0':s4_3 :: Nat -> 0':s Generator Equations: gen_c:c1:c23_3(0) <=> c gen_c:c1:c23_3(+(x, 1)) <=> c1(gen_c:c1:c23_3(x)) gen_0':s4_3(0) <=> 0' gen_0':s4_3(+(x, 1)) <=> s(gen_0':s4_3(x)) The following defined symbols remain to be analysed: QUOT, quot ---------------------------------------- (24) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (25) BOUNDS(n^1, INF) ---------------------------------------- (26) Obligation: Innermost TRS: Rules: QUOT(0', s(z0), s(z1)) -> c QUOT(s(z0), s(z1), z2) -> c1(QUOT(z0, z1, z2)) QUOT(z0, 0', s(z1)) -> c2(QUOT(z0, s(z1), s(z1))) quot(0', s(z0), s(z1)) -> 0' quot(s(z0), s(z1), z2) -> quot(z0, z1, z2) quot(z0, 0', s(z1)) -> s(quot(z0, s(z1), s(z1))) Types: QUOT :: 0':s -> 0':s -> 0':s -> c:c1:c2 0' :: 0':s s :: 0':s -> 0':s c :: c:c1:c2 c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 -> c:c1:c2 quot :: 0':s -> 0':s -> 0':s -> 0':s hole_c:c1:c21_3 :: c:c1:c2 hole_0':s2_3 :: 0':s gen_c:c1:c23_3 :: Nat -> c:c1:c2 gen_0':s4_3 :: Nat -> 0':s Lemmas: QUOT(gen_0':s4_3(n6_3), gen_0':s4_3(+(1, n6_3)), gen_0':s4_3(1)) -> gen_c:c1:c23_3(n6_3), rt in Omega(1 + n6_3) Generator Equations: gen_c:c1:c23_3(0) <=> c gen_c:c1:c23_3(+(x, 1)) <=> c1(gen_c:c1:c23_3(x)) gen_0':s4_3(0) <=> 0' gen_0':s4_3(+(x, 1)) <=> s(gen_0':s4_3(x)) The following defined symbols remain to be analysed: quot ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: quot(gen_0':s4_3(n2224_3), gen_0':s4_3(+(1, n2224_3)), gen_0':s4_3(1)) -> gen_0':s4_3(0), rt in Omega(0) Induction Base: quot(gen_0':s4_3(0), gen_0':s4_3(+(1, 0)), gen_0':s4_3(1)) ->_R^Omega(0) 0' Induction Step: quot(gen_0':s4_3(+(n2224_3, 1)), gen_0':s4_3(+(1, +(n2224_3, 1))), gen_0':s4_3(1)) ->_R^Omega(0) quot(gen_0':s4_3(n2224_3), gen_0':s4_3(+(1, n2224_3)), gen_0':s4_3(1)) ->_IH gen_0':s4_3(0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (28) BOUNDS(1, INF)